diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..3ba54f5 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1467 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +dependencies = [ + "memchr", +] + +[[package]] +name = "alsa" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c4da790adcb2ce5e758c064b4f3ec17a30349f9961d3e5e6c9688b052a9e18" +dependencies = [ + "alsa-sys", + "bitflags", + "libc", + "nix", +] + +[[package]] +name = "alsa-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "ascii" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" + +[[package]] +name = "bindgen" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "which", +] + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "bumpalo" +version = "3.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytes" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" + +[[package]] +name = "cc" +version = "1.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +dependencies = [ + "jobserver", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +dependencies = [ + "nom 5.1.2", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clang-sys" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clap" +version = "2.33.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +dependencies = [ + "ansi_term", + "atty", + "bitflags", + "strsim 0.8.0", + "textwrap", + "unicode-width", + "vec_map", +] + +[[package]] +name = "cmake" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" +dependencies = [ + "cc", +] + +[[package]] +name = "combine" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1645a65a99c7c8d345761f4b75a6ffe5be3b3b27a93ee731fccc5050ba6be97c" +dependencies = [ + "ascii", + "byteorder", +] + +[[package]] +name = "combine" +version = "4.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "coreaudio-rs" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" +dependencies = [ + "bitflags", + "coreaudio-sys", +] + +[[package]] +name = "coreaudio-sys" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b7e3347be6a09b46aba228d6608386739fb70beff4f61e07422da87b0bb31fa" +dependencies = [ + "bindgen", +] + +[[package]] +name = "cpal" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98f45f0a21f617cd2c788889ef710b63f075c949259593ea09c826f1e47a2418" +dependencies = [ + "alsa", + "core-foundation-sys", + "coreaudio-rs", + "jni", + "js-sys", + "lazy_static", + "libc", + "mach", + "ndk 0.3.0", + "ndk-glue 0.3.0", + "nix", + "oboe", + "parking_lot", + "stdweb", + "thiserror", + "web-sys", + "winapi", +] + +[[package]] +name = "crc32fast" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.9.3", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "downcast-rs" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" + +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +dependencies = [ + "encoding-index-japanese", + "encoding-index-korean", + "encoding-index-simpchinese", + "encoding-index-singlebyte", + "encoding-index-tradchinese", +] + +[[package]] +name = "encoding-index-japanese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-korean" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-simpchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-singlebyte" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding-index-tradchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +dependencies = [ + "encoding_index_tests", +] + +[[package]] +name = "encoding_index_tests" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" + +[[package]] +name = "encoding_rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "filetime" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "winapi", +] + +[[package]] +name = "flate2" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +dependencies = [ + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "getrandom" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi", +] + +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine 4.6.2", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" + +[[package]] +name = "libloading" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" +dependencies = [ + "cfg-if 1.0.0", + "winapi", +] + +[[package]] +name = "lock_api" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + +[[package]] +name = "memoffset" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minifb" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b6e41119d1667465608d36488fa5dcd228057a26c156e25f17f492f38435124" +dependencies = [ + "cc", + "orbclient", + "raw-window-handle", + "tempfile", + "wayland-client", + "wayland-cursor", + "wayland-protocols", + "winapi", + "x11-dl", + "xkb", + "xkbcommon-sys", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "ndk" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab" +dependencies = [ + "jni-sys", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d64d6af06fde0e527b1ba5c7b79a6cc89cfc46325b0b2887dffe8f70197e0c3c" +dependencies = [ + "bitflags", + "jni-sys", + "ndk-sys", + "num_enum", + "thiserror", +] + +[[package]] +name = "ndk-glue" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk 0.3.0", + "ndk-macro", + "ndk-sys", +] + +[[package]] +name = "ndk-glue" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e9e94628f24e7a3cb5b96a2dc5683acd9230bf11991c2a1677b87695138420" +dependencies = [ + "lazy_static", + "libc", + "log", + "ndk 0.4.0", + "ndk-macro", + "ndk-sys", +] + +[[package]] +name = "ndk-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d" +dependencies = [ + "darling", + "proc-macro-crate 0.1.5", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ndk-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d" + +[[package]] +name = "nix" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" +dependencies = [ + "bitflags", + "cc", + "cfg-if 1.0.0", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "5.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +dependencies = [ + "memchr", + "version_check", +] + +[[package]] +name = "nom" +version = "7.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +dependencies = [ + "memchr", + "minimal-lexical", + "version_check", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9bd055fb730c4f8f4f57d45d35cd6b3f0980535b056dc7ff119cee6a66ed6f" +dependencies = [ + "derivative", + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" +dependencies = [ + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "oboe" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e15e22bc67e047fe342a32ecba55f555e3be6166b04dd157cd0f803dfa9f48e1" +dependencies = [ + "jni", + "ndk 0.4.0", + "ndk-glue 0.4.0", + "num-derive", + "num-traits", + "oboe-sys", +] + +[[package]] +name = "oboe-sys" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338142ae5ab0aaedc8275aa8f67f460e43ae0fca76a695a742d56da0a269eadc" +dependencies = [ + "cc", +] + +[[package]] +name = "once_cell" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" + +[[package]] +name = "orbclient" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c976c5018e7f1db4359616d8b31ef8ae7d9649b11803c0b38fff67fd2999fc8" +dependencies = [ + "libc", + "raw-window-handle", + "redox_syscall", + "sdl2", + "sdl2-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "pkg-config" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" + +[[package]] +name = "ppv-lite86" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro2" +version = "1.0.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", + "rand_hc", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_hc" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +dependencies = [ + "rand_core", +] + +[[package]] +name = "raw-window-handle" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" +dependencies = [ + "libc", +] + +[[package]] +name = "redox_syscall" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +dependencies = [ + "winapi", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustual-boy-cli" +version = "0.3.0" +dependencies = [ + "clap", + "combine 2.5.2", + "cpal", + "encoding", + "minifb", + "rustual-boy-core", + "rustual-boy-middleware", +] + +[[package]] +name = "rustual-boy-core" +version = "0.1.0" +dependencies = [ + "encoding", +] + +[[package]] +name = "rustual-boy-middleware" +version = "0.1.0" +dependencies = [ + "rustual-boy-core", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "sdl2" +version = "0.34.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deecbc3fa9460acff5a1e563e05cb5f31bba0aa0c214bb49a43db8159176d54b" +dependencies = [ + "bitflags", + "lazy_static", + "libc", + "raw-window-handle", + "sdl2-sys", +] + +[[package]] +name = "sdl2-sys" +version = "0.34.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a29aa21f175b5a41a6e26da572d5e5d1ee5660d35f9f9d0913e8a802098f74" +dependencies = [ + "cfg-if 0.1.10", + "cmake", + "flate2", + "libc", + "tar", + "unidiff", + "version-compare", +] + +[[package]] +name = "serde" +version = "1.0.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" + +[[package]] +name = "shlex" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" + +[[package]] +name = "smallvec" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" + +[[package]] +name = "stdweb" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" + +[[package]] +name = "syn" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "tar" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "rand", + "redox_syscall", + "remove_dir_all", + "winapi", +] + +[[package]] +name = "termcolor" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "toml" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +dependencies = [ + "serde", +] + +[[package]] +name = "unicode-width" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" + +[[package]] +name = "unicode-xid" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" + +[[package]] +name = "unidiff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a62719acf1933bfdbeb73a657ecd9ecece70b405125267dd549e2e2edc232c" +dependencies = [ + "encoding_rs", + "lazy_static", + "regex", +] + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + +[[package]] +name = "version-compare" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" + +[[package]] +name = "version_check" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "wasm-bindgen" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" + +[[package]] +name = "wayland-client" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ab332350e502f159382201394a78e3cc12d0f04db863429260164ea40e0355" +dependencies = [ + "bitflags", + "downcast-rs", + "libc", + "nix", + "wayland-commons", + "wayland-scanner", + "wayland-sys", +] + +[[package]] +name = "wayland-commons" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21817947c7011bbd0a27e11b17b337bfd022e8544b071a2641232047966fbda" +dependencies = [ + "nix", + "once_cell", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-cursor" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be610084edd1586d45e7bdd275fe345c7c1873598caa464c4fb835dee70fa65a" +dependencies = [ + "nix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "286620ea4d803bacf61fa087a4242ee316693099ee5a140796aaba02b29f861f" +dependencies = [ + "bitflags", + "wayland-client", + "wayland-commons", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce923eb2deb61de332d1f356ec7b6bf37094dc5573952e1c8936db03b54c03f1" +dependencies = [ + "proc-macro2", + "quote", + "xml-rs", +] + +[[package]] +name = "wayland-sys" +version = "0.28.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d841fca9aed7febf9bed2e9796c49bf58d4152ceda8ac949ebe00868d8f0feb8" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "which" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +dependencies = [ + "libc", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "x11-dl" +version = "2.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea26926b4ce81a6f5d9d0f3a0bc401e5a37c6ae14a1bfaa8ff6099ca80038c59" +dependencies = [ + "lazy_static", + "libc", + "pkg-config", +] + +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + +[[package]] +name = "xcursor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" +dependencies = [ + "nom 7.1.0", +] + +[[package]] +name = "xkb" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aec02bc5de902aa579f3d2f2c522edaf40fa42963cbaffe645b058ddcc68fdb2" +dependencies = [ + "bitflags", + "libc", + "xkbcommon-sys", +] + +[[package]] +name = "xkbcommon-sys" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a001b79d45b0b4541c228a501177f2b35db976bf7ee3f7fce8fa2381554ab5" +dependencies = [ + "bindgen", + "libc", + "pkg-config", +] + +[[package]] +name = "xml-rs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ad5b3f0 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[workspace] + +members = [ + "rustual-boy-cli", + "rustual-boy-core", + "rustual-boy-middleware" +] diff --git a/rustual-boy-cli/Cargo.lock b/rustual-boy-cli/Cargo.lock deleted file mode 100644 index e8add8e..0000000 --- a/rustual-boy-cli/Cargo.lock +++ /dev/null @@ -1,492 +0,0 @@ -[[package]] -name = "alsa-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ansi_term" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ascii" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "atty" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clap" -version = "2.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "combine" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "coreaudio-rs" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "coreaudio-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "coreaudio-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cpal" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "alsa-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "coreaudio-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-korean" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "encoding_index_tests" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-zircon" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "futures" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "gcc" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "gdi32-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "minifb" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "orbclient 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ole32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "orbclient" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pkg-config" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_termios" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustual-boy-cli" -version = "0.3.0" -dependencies = [ - "clap 2.27.0 (registry+https://github.com/rust-lang/crates.io-index)", - "combine 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cpal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "minifb 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustual-boy-core 0.1.0", - "rustual-boy-middleware 0.1.0", -] - -[[package]] -name = "rustual-boy-core" -version = "0.1.0" -dependencies = [ - "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustual-boy-middleware" -version = "0.1.0" -dependencies = [ - "rustual-boy-core 0.1.0", -] - -[[package]] -name = "sdl2" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", - "sdl2-sys 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "sdl2-sys" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "strsim" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "termion" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-width" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "user32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "vec_map" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "x11-dl" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum alsa-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9013f855a808ab924a4c08b5c1ec9bd6b04fdb2295b4d570fb723e0ed2802a4f" -"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" -"checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" -"checksum atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "21e50800ec991574876040fff8ee46b136a53e985286fbe6a3bdfe6421b78860" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989" -"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" -"checksum clap 2.27.0 (registry+https://github.com/rust-lang/crates.io-index)" = "260aa209e1e7165920b6925d508cd73674a4adeb4086197385968c70ecd14947" -"checksum combine 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1645a65a99c7c8d345761f4b75a6ffe5be3b3b27a93ee731fccc5050ba6be97c" -"checksum coreaudio-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "22ec432725379967f9014b481afcb7c07a4fb154d836d3711730972ea91675ea" -"checksum coreaudio-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31231897622a4cd14cb211af6f26d6fcf0c78078fa60c586ce9db8f0b581cd44" -"checksum cpal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7c7ea57dd9260ee9faaccbf629648c4a00cf56a090dc26ebaf13ddbfe932261d" -"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" -"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" -"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" -"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" -"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" -"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" -"checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159" -"checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82" -"checksum futures 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "05a23db7bd162d4e8265968602930c476f688f0c180b44bdaf55e0cb2c687558" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum gdi32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "65256ec4dc2592e6f05bfc1ca3b956a4e0698aa90b1dff1f5687d55a5a3fd59a" -"checksum kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e014dab1082fd9d80ea1fa6fcb261b47ed3eb511612a14198bb507701add083e" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9e5e58fa1a4c3b915a561a78a22ee0cac6ab97dca2504428bc1cb074375f8d5" -"checksum libc 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)" = "56cce3130fd040c28df6f495c8492e5ec5808fb4c9093c310df02b0c8f030148" -"checksum minifb 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8bfb9de609fe3084d81318aecc0cb9b2473434dc0d7e0cadd0f5ea4864e2a5b" -"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525" -"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba" -"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01" -"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" -"checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum orbclient 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)" = "6e5d8d9900998fb4b9394e27058aa22a6d3509fb67dd860f74ba0507d4406943" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum rand 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "61efcbcd9fa8d8fbb07c84e34a8af18a1ff177b449689ad38a6e9457ecc7b2ae" -"checksum redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "8dde11f18c108289bef24469638a04dce49da56084f2d50618b226e47eb04509" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum sdl2 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63066036ad426250ac56d23e38fd05063b38b661556acd596f4046cc92d98415" -"checksum sdl2-sys 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b48638b7882759f3421038fcd38ad5f1ea19b119d80c99f1601933004629e34d" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" -"checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum user32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6717129de5ac253f5642fc78a51d0c7de6f9f53d617fc94e9bae7f6e71cf5504" -"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "326c500cdc166fd7c70dd8c8a829cd5c0ce7be5a5d98c25817de2b9bdc67faf8" diff --git a/rustual-boy-cli/Cargo.toml b/rustual-boy-cli/Cargo.toml index d21dc8f..e28df89 100644 --- a/rustual-boy-cli/Cargo.toml +++ b/rustual-boy-cli/Cargo.toml @@ -20,9 +20,8 @@ log-core-all = ["rustual-boy-core/log-all"] [dependencies] encoding = "0.2" -minifb = "0.9.0" -cpal = "0.4.4" -futures = "0.1.1" +minifb = "0.19.0" +cpal = "0.13.0" rustual-boy-middleware = { path = "../rustual-boy-middleware" } rustual-boy-core = { path = "../rustual-boy-core" } clap = "2.0.0" diff --git a/rustual-boy-cli/src/argparse.rs b/rustual-boy-cli/src/argparse.rs index 883c664..7f4b22a 100644 --- a/rustual-boy-cli/src/argparse.rs +++ b/rustual-boy-cli/src/argparse.rs @@ -6,9 +6,12 @@ pub struct CommandLineConfig { } pub fn parse_args() -> CommandLineConfig { + // This should be doable with `crate_authors!(", ")`, but clap is using a deprecated API in that call, + // so we do it ourselves. + let crate_authors = crate_authors!().replace(":", ", "); let app = App::new("Rustual Boy") .version("0.2.0") - .author(crate_authors!(", ")) + .author(&crate_authors[..]) .about("A CLI frontend to the Rustual Boy emulator") .arg(Arg::with_name("ROM") .help("The name of the ROM to load") diff --git a/rustual-boy-cli/src/command.rs b/rustual-boy-cli/src/command.rs index c847588..4d2fa91 100644 --- a/rustual-boy-cli/src/command.rs +++ b/rustual-boy-cli/src/command.rs @@ -171,13 +171,13 @@ fn command>(input: I) -> ParseResult { .parse_stream(input) } -fn u32_<'a, I: Stream + 'a>() -> Box + 'a> { +fn u32_<'a, I: Stream + 'a>() -> Box + 'a> { many1(digit()) .and_then(|s: String| s.parse::()) .boxed() } -fn u32_hex<'a, I: Stream + 'a>() -> Box + 'a> { +fn u32_hex<'a, I: Stream + 'a>() -> Box + 'a> { let hex_prefix = choice([try(string("0x")), try(string("$"))]); (optional(hex_prefix), many1(hex_digit())) .map(|x| x.1) @@ -185,6 +185,6 @@ fn u32_hex<'a, I: Stream + 'a>() -> Box + .boxed() } -fn label_name<'a, I: Stream + 'a>() -> Box + 'a> { +fn label_name<'a, I: Stream + 'a>() -> Box + 'a> { many1::(alpha_num()).boxed() } diff --git a/rustual-boy-cli/src/cpal_driver.rs b/rustual-boy-cli/src/cpal_driver.rs index f963029..27012b9 100644 --- a/rustual-boy-cli/src/cpal_driver.rs +++ b/rustual-boy-cli/src/cpal_driver.rs @@ -1,9 +1,6 @@ #![allow(dead_code)] -use cpal::{EventLoop, Voice, UnknownTypeBuffer, default_endpoint}; - -use futures::stream::Stream; -use futures::task::{self, Executor, Run}; +use cpal::traits::{HostTrait, DeviceTrait, StreamTrait}; use rustual_boy_core::sinks::{AudioFrame, SinkRef}; use rustual_boy_core::time_source::TimeSource; @@ -11,9 +8,9 @@ use rustual_boy_core::time_source::TimeSource; use std::borrow::Cow; use std::sync::{Arc, Mutex}; use std::iter::Iterator; -use std::thread::{self, JoinHandle}; -use std::cmp::Ordering; +use std::cmp::{self, Ordering}; +use cpal::SampleFormat; pub type CpalDriverError = Cow<'static, str>; @@ -80,20 +77,11 @@ impl TimeSource for CpalDriverTimeSource { } } -struct CpalDriverExecutor; - -impl Executor for CpalDriverExecutor { - fn execute(&self, r: Run) { - r.run(); - } -} - pub struct CpalDriver { ring_buffer: Arc>, sample_rate: u32, - _voice: Voice, - _join_handle: JoinHandle<()>, + _stream: cpal::Stream, } impl CpalDriver { @@ -102,25 +90,37 @@ impl CpalDriver { return Err(format!("desired_latency_ms must be greater than 0").into()); } - let endpoint = default_endpoint().expect("Failed to get audio endpoint"); - - let compare_sample_rates = |x: u32, y:u32| -> Ordering { - if x < sample_rate && y > sample_rate { - return Ordering::Greater; - } else if x > sample_rate && y < sample_rate { - return Ordering::Less; - } else if x < sample_rate && y < sample_rate { - return x.cmp(&y).reverse(); + let host = cpal::default_host(); + let output_device = host.default_output_device().expect("Failed to get output device"); + + let rate_sample_rate_range = |x: &cpal::SupportedStreamConfigRange, y: &cpal::SupportedStreamConfigRange| -> Ordering { + let sample_rate = cpal::SampleRate(sample_rate); + if x.max_sample_rate() < sample_rate && y.max_sample_rate() >= sample_rate { + Ordering::Less + } else if x.max_sample_rate() >= sample_rate && y.max_sample_rate() < sample_rate { + Ordering::Greater + } else if x.max_sample_rate() < sample_rate && y.max_sample_rate() < sample_rate { + x.max_sample_rate().cmp(&y.max_sample_rate()) } else { - return x.cmp(&y); + // Both max >= sample_rate, rank a lower minimum higher than not + x.min_sample_rate().cmp(&y.min_sample_rate()).reverse() } }; - let format = endpoint.supported_formats() - .expect("Failed to get supported format list for endpoint") - .filter(|format| format.channels.len() == 2) - .min_by(|x, y| compare_sample_rates(x.samples_rate.0, y.samples_rate.0)) + let supported_config = output_device.supported_output_configs() + .expect("Failed to get supported config list for output") + .filter(|config| config.channels() == 2) + .max_by(rate_sample_rate_range) .expect("Failed to find format with 2 channels"); + let supported_config = if supported_config.max_sample_rate().0 >= sample_rate { + let min_sample_rate = supported_config.min_sample_rate().0; + supported_config.with_sample_rate(cpal::SampleRate(cmp::max(min_sample_rate, sample_rate))) + } else { + supported_config.with_max_sample_rate() + }; + let config = supported_config.config(); + let channel_count = supported_config.channels(); + let buffer_frames = (sample_rate * desired_latency_ms / 1000 * 2) as usize; let ring_buffer = Arc::new(Mutex::new(RingBuffer { @@ -132,64 +132,65 @@ impl CpalDriver { samples_read: 0, })); - let event_loop = EventLoop::new(); - - let (mut voice, stream) = Voice::new(&endpoint, &format, &event_loop).expect("Failed to create voice"); - voice.play(); - - let mut resampler = LinearResampler::new(sample_rate as _, format.samples_rate.0 as _); - + let mut resampler = LinearResampler::new(sample_rate as _, config.sample_rate.0); let read_ring_buffer = ring_buffer.clone(); - task::spawn(stream.for_each(move |output_buffer| { - let mut read_ring_buffer = read_ring_buffer.lock().unwrap(); - match output_buffer { - UnknownTypeBuffer::I16(mut buffer) => { - for sample in buffer.chunks_mut(format.channels.len()) { + let err_handler = |err| eprintln!("Error occurred in output stream: {}", err); + let out_stream = match supported_config.sample_format() { + SampleFormat::I16 => output_device.build_output_stream( + &config, + move |dst: &mut [i16], _cb_info: &cpal::OutputCallbackInfo| { + let mut read_ring_buffer = read_ring_buffer.lock().unwrap(); + for sample in dst.chunks_mut(channel_count.into()) { for out in sample.iter_mut() { *out = resampler.next(&mut *read_ring_buffer); } } }, - UnknownTypeBuffer::U16(mut buffer) => { - for sample in buffer.chunks_mut(format.channels.len()) { + err_handler, + ), + SampleFormat::U16 => output_device.build_output_stream( + &config, + move |dst: &mut [u16], _cb_info: &cpal::OutputCallbackInfo| { + let mut read_ring_buffer = read_ring_buffer.lock().unwrap(); + for sample in dst.chunks_mut(channel_count.into()) { for out in sample.iter_mut() { *out = ((resampler.next(&mut *read_ring_buffer) as i32) + 32768) as u16; } } }, - UnknownTypeBuffer::F32(mut buffer) => { - for sample in buffer.chunks_mut(format.channels.len()) { + err_handler, + ), + SampleFormat::F32 => output_device.build_output_stream( + &config, + move |dst: &mut [f32], _cb_info: &cpal::OutputCallbackInfo| { + let mut read_ring_buffer = read_ring_buffer.lock().unwrap(); + for sample in dst.chunks_mut(channel_count.into()) { for out in sample.iter_mut() { *out = (resampler.next(&mut *read_ring_buffer) as f32) / 32768.0; } } }, - } - - Ok(()) - })).execute(Arc::new(CpalDriverExecutor)); - - let join_handle = thread::spawn(move || { - event_loop.run(); - }); + err_handler, + ), + }.expect("Failed to create stream"); + out_stream.play().expect("Failed to play output stream"); Ok(CpalDriver { ring_buffer: ring_buffer, sample_rate: sample_rate, - _voice: voice, - _join_handle: join_handle, + _stream: out_stream, }) } - pub fn sink(&self) -> Box> { + pub fn sink(&self) -> Box> { Box::new(CpalDriverBufferSink { ring_buffer: self.ring_buffer.clone(), }) } - pub fn time_source(&self) -> Box { + pub fn time_source(&self) -> Box { Box::new(CpalDriverTimeSource { ring_buffer: self.ring_buffer.clone(), sample_rate: self.sample_rate, @@ -234,7 +235,7 @@ impl LinearResampler { } } - fn next(&mut self, input: &mut Iterator) -> i16 { + fn next(&mut self, input: &mut dyn Iterator) -> i16 { fn interpolate(a: i16, b: i16, num: u32, denom: u32) -> i16 { (((a as i32) * ((denom - num) as i32) + (b as i32) * (num as i32)) / (denom as i32)) as _ } diff --git a/rustual-boy-cli/src/emulator.rs b/rustual-boy-cli/src/emulator.rs index 6d25792..45d988d 100644 --- a/rustual-boy-cli/src/emulator.rs +++ b/rustual-boy-cli/src/emulator.rs @@ -1,4 +1,4 @@ -use minifb::{WindowOptions, Window, Key, KeyRepeat, Scale}; +use minifb::{WindowOptions, Window, Key, KeyRepeat, Scale, ScaleMode}; use command::*; @@ -51,16 +51,16 @@ pub struct Emulator { stdin_receiver: Receiver, _stdin_thread: JoinHandle<()>, - audio_buffer_sink: Box>, + audio_buffer_sink: Box>, - time_source: Box, + time_source: Box, time_source_start_time_ns: u64, emulated_cycles: u64, } impl Emulator { - pub fn new(rom: Rom, sram: Sram, audio_buffer_sink: Box>, time_source: Box) -> Emulator { + pub fn new(rom: Rom, sram: Sram, audio_buffer_sink: Box>, time_source: Box) -> Emulator { let (stdin_sender, stdin_receiver) = channel(); let stdin_thread = thread::spawn(move || { loop { @@ -70,10 +70,9 @@ impl Emulator { Emulator { window: Window::new("Rustual Boy", 384, 224, WindowOptions { - borderless: false, - title: true, - resize: false, scale: Scale::X2, + scale_mode: ScaleMode::AspectRatioStretch, + ..Default::default() }).unwrap(), virtual_boy: VirtualBoy::new(rom, sram), @@ -142,7 +141,7 @@ impl Emulator { if let Some(frame) = video_frame_sink.into_inner().into_inner().into_inner() { let frame: Vec = frame.into_iter().map(|x| x.into()).collect(); - self.window.update_with_buffer(&frame); + self.window.update_with_buffer(&frame, 384, 224).unwrap(); if self.mode == Mode::Running { // We only want to update the key state when a frame is actually pushed @@ -160,7 +159,7 @@ impl Emulator { } } - fn step(&mut self, video_frame_sink: &mut Sink, audio_frame_sink: &mut Sink) -> (u32, bool) { + fn step(&mut self, video_frame_sink: &mut dyn Sink, audio_frame_sink: &mut dyn Sink) -> (u32, bool) { let ret = self.virtual_boy.step(video_frame_sink, audio_frame_sink); self.emulated_cycles += ret.0 as u64; @@ -194,7 +193,7 @@ impl Emulator { self.print_cursor(); } - fn run_debugger_commands(&mut self, video_frame_sink: &mut Sink, audio_frame_sink: &mut Sink) -> bool { + fn run_debugger_commands(&mut self, video_frame_sink: &mut dyn Sink, audio_frame_sink: &mut dyn Sink) -> bool { while let Ok(command_string) = self.stdin_receiver.try_recv() { let command = match (command_string.parse(), self.last_command.clone()) { (Ok(Command::Repeat), Some(c)) => Ok(c), diff --git a/rustual-boy-cli/src/main.rs b/rustual-boy-cli/src/main.rs index eb1eaf5..4b21ef9 100644 --- a/rustual-boy-cli/src/main.rs +++ b/rustual-boy-cli/src/main.rs @@ -2,8 +2,6 @@ extern crate minifb; extern crate cpal; -extern crate futures; - #[macro_use] extern crate clap; diff --git a/rustual-boy-core/src/interconnect.rs b/rustual-boy-core/src/interconnect.rs index 471b7ea..c84d4d4 100644 --- a/rustual-boy-core/src/interconnect.rs +++ b/rustual-boy-core/src/interconnect.rs @@ -37,8 +37,8 @@ impl Interconnect { pub fn read_byte(&mut self, addr: u32) -> u8 { let addr = addr & 0x07ffffff; match addr { - VIP_START ... VIP_END => self.vip.read_byte(addr - VIP_START), - VSU_START ... VSU_END => self.vsu.read_byte(addr - VSU_START), + VIP_START ..= VIP_END => self.vip.read_byte(addr - VIP_START), + VSU_START ..= VSU_END => self.vsu.read_byte(addr - VSU_START), CCR => self.com_port.read_ccr(), CCSR => self.com_port.read_ccsr(), CDTR => self.com_port.read_cdtr(), @@ -53,13 +53,13 @@ impl Interconnect { 0 } SCR => self.game_pad.read_scr(), - GAME_PAK_EXPANSION_START ... GAME_PAK_EXPANSION_END => { + GAME_PAK_EXPANSION_START ..= GAME_PAK_EXPANSION_END => { logln!(Log::Ic, "WARNING: Read byte from Game Pak Expansion not yet implemented (addr: 0x{:08x})", addr - GAME_PAK_EXPANSION_START); 0 } - WRAM_START ... WRAM_END => self.wram.read_byte(addr - WRAM_START), - GAME_PAK_RAM_START ... GAME_PAK_RAM_END => self.sram.read_byte(addr - GAME_PAK_RAM_START), - GAME_PAK_ROM_START ... GAME_PAK_ROM_END => self.rom.read_byte(addr - GAME_PAK_ROM_START), + WRAM_START ..= WRAM_END => self.wram.read_byte(addr - WRAM_START), + GAME_PAK_RAM_START ..= GAME_PAK_RAM_END => self.sram.read_byte(addr - GAME_PAK_RAM_START), + GAME_PAK_ROM_START ..= GAME_PAK_ROM_END => self.rom.read_byte(addr - GAME_PAK_ROM_START), _ => panic!("Unrecognized addr: 0x{:08x}", addr) } } @@ -68,8 +68,8 @@ impl Interconnect { let addr = addr & 0x07ffffff; let addr = addr & 0xfffffffe; match addr { - VIP_START ... VIP_END => self.vip.read_halfword(addr - VIP_START), - VSU_START ... VSU_END => self.vsu.read_halfword(addr - VSU_START), + VIP_START ..= VIP_END => self.vip.read_halfword(addr - VIP_START), + VSU_START ..= VSU_END => self.vsu.read_halfword(addr - VSU_START), CCR => self.com_port.read_ccr() as _, CCSR => self.com_port.read_ccsr() as _, CDTR => self.com_port.read_cdtr() as _, @@ -84,13 +84,13 @@ impl Interconnect { 0 } SCR => self.game_pad.read_scr() as _, - GAME_PAK_EXPANSION_START ... GAME_PAK_EXPANSION_END => { + GAME_PAK_EXPANSION_START ..= GAME_PAK_EXPANSION_END => { logln!(Log::Ic, "WARNING: Read halfword from Game Pak Expansion not yet implemented (addr: 0x{:08x})", addr - GAME_PAK_EXPANSION_START); 0 } - WRAM_START ... WRAM_END => self.wram.read_halfword(addr - WRAM_START), - GAME_PAK_RAM_START ... GAME_PAK_RAM_END => self.sram.read_halfword(addr - GAME_PAK_RAM_START), - GAME_PAK_ROM_START ... GAME_PAK_ROM_END => self.rom.read_halfword(addr - GAME_PAK_ROM_START), + WRAM_START ..= WRAM_END => self.wram.read_halfword(addr - WRAM_START), + GAME_PAK_RAM_START ..= GAME_PAK_RAM_END => self.sram.read_halfword(addr - GAME_PAK_RAM_START), + GAME_PAK_ROM_START ..= GAME_PAK_ROM_END => self.rom.read_halfword(addr - GAME_PAK_ROM_START), _ => panic!("Unrecognized addr: 0x{:08x}", addr) } } @@ -98,8 +98,8 @@ impl Interconnect { pub fn write_byte(&mut self, addr: u32, value: u8) { let addr = addr & 0x07ffffff; match addr { - VIP_START ... VIP_END => self.vip.write_byte(addr - VIP_START, value), - VSU_START ... VSU_END => self.vsu.write_byte(addr - VSU_START, value), + VIP_START ..= VIP_END => self.vip.write_byte(addr - VIP_START, value), + VSU_START ..= VSU_END => self.vsu.write_byte(addr - VSU_START, value), CCR => self.com_port.write_ccr(value), CCSR => self.com_port.write_ccsr(value), CDTR => self.com_port.write_cdtr(value), @@ -121,12 +121,12 @@ impl Interconnect { logln!(Log::Ic, " Game Pak Expansion Waits: {}", if value & 0x02 == 0 { 2 } else { 1 }); } SCR => self.game_pad.write_scr(value), - GAME_PAK_EXPANSION_START ... GAME_PAK_EXPANSION_END => { + GAME_PAK_EXPANSION_START ..= GAME_PAK_EXPANSION_END => { logln!(Log::Ic, "WARNING: Write byte to Game Pak Expansion not yet implemented (addr: 0x{:08x}, value: 0x{:02x})", addr - GAME_PAK_EXPANSION_START, value); } - WRAM_START ... WRAM_END => self.wram.write_byte(addr - WRAM_START, value), - GAME_PAK_RAM_START ... GAME_PAK_RAM_END => self.sram.write_byte(addr - GAME_PAK_RAM_START, value), - GAME_PAK_ROM_START ... GAME_PAK_ROM_END => { + WRAM_START ..= WRAM_END => self.wram.write_byte(addr - WRAM_START, value), + GAME_PAK_RAM_START ..= GAME_PAK_RAM_END => self.sram.write_byte(addr - GAME_PAK_RAM_START, value), + GAME_PAK_ROM_START ..= GAME_PAK_ROM_END => { logln!(Log::Ic, "WARNING: Attempted write to Game Pak ROM at 0x{:08x}", addr - GAME_PAK_ROM_START); } _ => panic!("Unrecognized addr: 0x{:08x}", addr) @@ -137,8 +137,8 @@ impl Interconnect { let addr = addr & 0x07ffffff; let addr = addr & 0xfffffffe; match addr { - VIP_START ... VIP_END => self.vip.write_halfword(addr - VIP_START, value), - VSU_START ... VSU_END => self.vsu.write_halfword(addr - VSU_START, value), + VIP_START ..= VIP_END => self.vip.write_halfword(addr - VIP_START, value), + VSU_START ..= VSU_END => self.vsu.write_halfword(addr - VSU_START, value), CCR => self.com_port.write_ccr(value as _), CCSR => self.com_port.write_ccsr(value as _), CDTR => self.com_port.write_cdtr(value as _), @@ -158,19 +158,19 @@ impl Interconnect { logln!(Log::Ic, "WARNING: Write halfword to WCR not yet implemented (value: 0x{:04x})", value); } SCR => self.game_pad.write_scr(value as _), - GAME_PAK_EXPANSION_START ... GAME_PAK_EXPANSION_END => { + GAME_PAK_EXPANSION_START ..= GAME_PAK_EXPANSION_END => { logln!(Log::Ic, "WARNING: Write halfword to Game Pak Expansion not yet implemented (addr: 0x{:08x}, value: 0x{:04x})", addr - GAME_PAK_EXPANSION_START, value); } - WRAM_START ... WRAM_END => self.wram.write_halfword(addr - WRAM_START, value), - GAME_PAK_RAM_START ... GAME_PAK_RAM_END => self.sram.write_halfword(addr - GAME_PAK_RAM_START, value), - GAME_PAK_ROM_START ... GAME_PAK_ROM_END => { + WRAM_START ..= WRAM_END => self.wram.write_halfword(addr - WRAM_START, value), + GAME_PAK_RAM_START ..= GAME_PAK_RAM_END => self.sram.write_halfword(addr - GAME_PAK_RAM_START, value), + GAME_PAK_ROM_START ..= GAME_PAK_ROM_END => { logln!(Log::Ic, "WARNING: Attempted write to Game Pak ROM at 0x{:08x}", addr - GAME_PAK_ROM_START); } _ => panic!("Unrecognized addr: 0x{:08x}", addr) } } - pub fn cycles(&mut self, cycles: u32, video_frame_sink: &mut Sink, audio_frame_sink: &mut Sink) -> Option { + pub fn cycles(&mut self, cycles: u32, video_frame_sink: &mut dyn Sink, audio_frame_sink: &mut dyn Sink) -> Option { let mut interrupt = None; if self.timer.cycles(cycles) { diff --git a/rustual-boy-core/src/vip/mod.rs b/rustual-boy-core/src/vip/mod.rs index 926368a..312c6e8 100644 --- a/rustual-boy-core/src/vip/mod.rs +++ b/rustual-boy-core/src/vip/mod.rs @@ -214,14 +214,14 @@ impl Vip { pub fn read_byte(&self, addr: u32) -> u8 { let addr = addr & 0x0007ffff; match addr { - VRAM_START ... VRAM_END => self.read_vram_byte(addr - VRAM_START), - CHR_RAM_PATTERN_TABLE_0_MIRROR_START ... CHR_RAM_PATTERN_TABLE_0_MIRROR_END => + VRAM_START ..= VRAM_END => self.read_vram_byte(addr - VRAM_START), + CHR_RAM_PATTERN_TABLE_0_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_0_MIRROR_END => self.read_vram_byte(addr - CHR_RAM_PATTERN_TABLE_0_MIRROR_START + CHR_RAM_PATTERN_TABLE_0_START), - CHR_RAM_PATTERN_TABLE_1_MIRROR_START ... CHR_RAM_PATTERN_TABLE_1_MIRROR_END => + CHR_RAM_PATTERN_TABLE_1_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_1_MIRROR_END => self.read_vram_byte(addr - CHR_RAM_PATTERN_TABLE_1_MIRROR_START + CHR_RAM_PATTERN_TABLE_1_START), - CHR_RAM_PATTERN_TABLE_2_MIRROR_START ... CHR_RAM_PATTERN_TABLE_2_MIRROR_END => + CHR_RAM_PATTERN_TABLE_2_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_2_MIRROR_END => self.read_vram_byte(addr - CHR_RAM_PATTERN_TABLE_2_MIRROR_START + CHR_RAM_PATTERN_TABLE_2_START), - CHR_RAM_PATTERN_TABLE_3_MIRROR_START ... CHR_RAM_PATTERN_TABLE_3_MIRROR_END => + CHR_RAM_PATTERN_TABLE_3_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_3_MIRROR_END => self.read_vram_byte(addr - CHR_RAM_PATTERN_TABLE_3_MIRROR_START + CHR_RAM_PATTERN_TABLE_3_START), _ => { let halfword = self.read_halfword(addr & 0xfffffffe); @@ -237,14 +237,14 @@ impl Vip { pub fn write_byte(&mut self, addr: u32, value: u8) { let addr = addr & 0x0007ffff; match addr { - VRAM_START ... VRAM_END => self.write_vram_byte(addr - VRAM_START, value), - CHR_RAM_PATTERN_TABLE_0_MIRROR_START ... CHR_RAM_PATTERN_TABLE_0_MIRROR_END => + VRAM_START ..= VRAM_END => self.write_vram_byte(addr - VRAM_START, value), + CHR_RAM_PATTERN_TABLE_0_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_0_MIRROR_END => self.write_vram_byte(addr - CHR_RAM_PATTERN_TABLE_0_MIRROR_START + CHR_RAM_PATTERN_TABLE_0_START, value), - CHR_RAM_PATTERN_TABLE_1_MIRROR_START ... CHR_RAM_PATTERN_TABLE_1_MIRROR_END => + CHR_RAM_PATTERN_TABLE_1_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_1_MIRROR_END => self.write_vram_byte(addr - CHR_RAM_PATTERN_TABLE_1_MIRROR_START + CHR_RAM_PATTERN_TABLE_1_START, value), - CHR_RAM_PATTERN_TABLE_2_MIRROR_START ... CHR_RAM_PATTERN_TABLE_2_MIRROR_END => + CHR_RAM_PATTERN_TABLE_2_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_2_MIRROR_END => self.write_vram_byte(addr - CHR_RAM_PATTERN_TABLE_2_MIRROR_START + CHR_RAM_PATTERN_TABLE_2_START, value), - CHR_RAM_PATTERN_TABLE_3_MIRROR_START ... CHR_RAM_PATTERN_TABLE_3_MIRROR_END => + CHR_RAM_PATTERN_TABLE_3_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_3_MIRROR_END => self.write_vram_byte(addr - CHR_RAM_PATTERN_TABLE_3_MIRROR_START + CHR_RAM_PATTERN_TABLE_3_START, value), _ => { let halfword = if (addr & 0x01) == 0 { @@ -261,7 +261,7 @@ impl Vip { let addr = addr & 0x0007ffff; let addr = addr & 0xfffffffe; match addr { - VRAM_START ... VRAM_END => self.read_vram_halfword(addr - VRAM_START), + VRAM_START ..= VRAM_END => self.read_vram_halfword(addr - VRAM_START), INTPND => { logln!(Log::Vip, "WARNING: Read halfword from INTPND not fully implemented"); self.reg_intpnd() @@ -344,13 +344,13 @@ impl Vip { JPLT2 => self.reg_jplt2 as _, JPLT3 => self.reg_jplt3 as _, BKCOL => self.reg_bkcol as _, - CHR_RAM_PATTERN_TABLE_0_MIRROR_START ... CHR_RAM_PATTERN_TABLE_0_MIRROR_END => + CHR_RAM_PATTERN_TABLE_0_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_0_MIRROR_END => self.read_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_0_MIRROR_START + CHR_RAM_PATTERN_TABLE_0_START), - CHR_RAM_PATTERN_TABLE_1_MIRROR_START ... CHR_RAM_PATTERN_TABLE_1_MIRROR_END => + CHR_RAM_PATTERN_TABLE_1_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_1_MIRROR_END => self.read_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_1_MIRROR_START + CHR_RAM_PATTERN_TABLE_1_START), - CHR_RAM_PATTERN_TABLE_2_MIRROR_START ... CHR_RAM_PATTERN_TABLE_2_MIRROR_END => + CHR_RAM_PATTERN_TABLE_2_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_2_MIRROR_END => self.read_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_2_MIRROR_START + CHR_RAM_PATTERN_TABLE_2_START), - CHR_RAM_PATTERN_TABLE_3_MIRROR_START ... CHR_RAM_PATTERN_TABLE_3_MIRROR_END => + CHR_RAM_PATTERN_TABLE_3_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_3_MIRROR_END => self.read_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_3_MIRROR_START + CHR_RAM_PATTERN_TABLE_3_START), _ => { logln!(Log::Vip, "WARNING: Attempted read halfword from unrecognized VIP address (addr: 0x{:08x})", addr); @@ -363,7 +363,7 @@ impl Vip { let addr = addr & 0x0007ffff; let addr = addr & 0xfffffffe; match addr { - VRAM_START ... VRAM_END => self.write_vram_halfword(addr - VRAM_START, value), + VRAM_START ..= VRAM_END => self.write_vram_halfword(addr - VRAM_START, value), INTPND => { logln!(Log::Vip, "WARNING: Attempted write halfword to Interrupt Pending Reg"); } @@ -466,13 +466,13 @@ impl Vip { JPLT2 => self.reg_jplt2 = value as _, JPLT3 => self.reg_jplt3 = value as _, BKCOL => self.reg_bkcol = (value & 0x03) as _, - CHR_RAM_PATTERN_TABLE_0_MIRROR_START ... CHR_RAM_PATTERN_TABLE_0_MIRROR_END => + CHR_RAM_PATTERN_TABLE_0_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_0_MIRROR_END => self.write_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_0_MIRROR_START + CHR_RAM_PATTERN_TABLE_0_START, value), - CHR_RAM_PATTERN_TABLE_1_MIRROR_START ... CHR_RAM_PATTERN_TABLE_1_MIRROR_END => + CHR_RAM_PATTERN_TABLE_1_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_1_MIRROR_END => self.write_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_1_MIRROR_START + CHR_RAM_PATTERN_TABLE_1_START, value), - CHR_RAM_PATTERN_TABLE_2_MIRROR_START ... CHR_RAM_PATTERN_TABLE_2_MIRROR_END => + CHR_RAM_PATTERN_TABLE_2_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_2_MIRROR_END => self.write_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_2_MIRROR_START + CHR_RAM_PATTERN_TABLE_2_START, value), - CHR_RAM_PATTERN_TABLE_3_MIRROR_START ... CHR_RAM_PATTERN_TABLE_3_MIRROR_END => + CHR_RAM_PATTERN_TABLE_3_MIRROR_START ..= CHR_RAM_PATTERN_TABLE_3_MIRROR_END => self.write_vram_halfword(addr - CHR_RAM_PATTERN_TABLE_3_MIRROR_START + CHR_RAM_PATTERN_TABLE_3_START, value), _ => { logln!(Log::Vip, "WARNING: Attempted write halfword to unrecognized VIP address (addr: 0x{:08x}, value: 0x{:04x})", addr, value); @@ -506,7 +506,7 @@ impl Vip { } } - pub fn cycles(&mut self, cycles: u32, video_frame_sink: &mut Sink) -> bool { + pub fn cycles(&mut self, cycles: u32, video_frame_sink: &mut dyn Sink) -> bool { for _ in 0..cycles { self.display_frame_eighth_clock_counter += 1; if self.display_frame_eighth_clock_counter >= DISPLAY_FRAME_EIGHTH_PERIOD { @@ -1083,7 +1083,7 @@ impl Vip { self.write_vram_byte(framebuffer_offset + framebuffer_byte_index, framebuffer_byte); } - fn display(&mut self, video_frame_sink: &mut Sink) { + fn display(&mut self, video_frame_sink: &mut dyn Sink) { let left_framebuffer_offset = if self.display_first_framebuffers { 0x00000000 } else { 0x00008000 }; let right_framebuffer_offset = left_framebuffer_offset + 0x00010000; diff --git a/rustual-boy-core/src/virtual_boy.rs b/rustual-boy-core/src/virtual_boy.rs index 7812fc1..1b88079 100644 --- a/rustual-boy-core/src/virtual_boy.rs +++ b/rustual-boy-core/src/virtual_boy.rs @@ -17,7 +17,7 @@ impl VirtualBoy { } } - pub fn step(&mut self, video_frame_sink: &mut Sink, audio_frame_sink: &mut Sink) -> (u32, bool) { + pub fn step(&mut self, video_frame_sink: &mut dyn Sink, audio_frame_sink: &mut dyn Sink) -> (u32, bool) { let ret = self.cpu.step(&mut self.interconnect); if let Some(exception_code) = self.interconnect.cycles(ret.0, video_frame_sink, audio_frame_sink) { diff --git a/rustual-boy-core/src/vsu/mod.rs b/rustual-boy-core/src/vsu/mod.rs index c9a4344..227e77a 100644 --- a/rustual-boy-core/src/vsu/mod.rs +++ b/rustual-boy-core/src/vsu/mod.rs @@ -530,32 +530,32 @@ impl Vsu { pub fn write_byte(&mut self, addr: u32, value: u8) { match addr { - WAVEFORM_DATA_0_START ... WAVEFORM_DATA_0_END => { + WAVEFORM_DATA_0_START ..= WAVEFORM_DATA_0_END => { if !self.are_channels_active() { self.waveform_data[((addr - WAVEFORM_DATA_0_START) / 4 + 0x00) as usize] = value & 0x3f; } } - WAVEFORM_DATA_1_START ... WAVEFORM_DATA_1_END => { + WAVEFORM_DATA_1_START ..= WAVEFORM_DATA_1_END => { if !self.are_channels_active() { self.waveform_data[((addr - WAVEFORM_DATA_1_START) / 4 + 0x20) as usize] = value & 0x3f; } } - WAVEFORM_DATA_2_START ... WAVEFORM_DATA_2_END => { + WAVEFORM_DATA_2_START ..= WAVEFORM_DATA_2_END => { if !self.are_channels_active() { self.waveform_data[((addr - WAVEFORM_DATA_2_START) / 4 + 0x40) as usize] = value & 0x3f; } } - WAVEFORM_DATA_3_START ... WAVEFORM_DATA_3_END => { + WAVEFORM_DATA_3_START ..= WAVEFORM_DATA_3_END => { if !self.are_channels_active() { self.waveform_data[((addr - WAVEFORM_DATA_3_START) / 4 + 0x60) as usize] = value & 0x3f; } } - WAVEFORM_DATA_4_START ... WAVEFORM_DATA_4_END => { + WAVEFORM_DATA_4_START ..= WAVEFORM_DATA_4_END => { if !self.are_channels_active() { self.waveform_data[((addr - WAVEFORM_DATA_4_START) / 4 + 0x80) as usize] = value & 0x3f; } } - MOD_DATA_START ... MOD_DATA_END => { + MOD_DATA_START ..= MOD_DATA_END => { if !self.are_channels_active() { self.mod_data[((addr - MOD_DATA_START) / 4) as usize] = value as _; } @@ -627,7 +627,7 @@ impl Vsu { self.write_byte(addr, value as _); } - pub fn cycles(&mut self, num_cycles: u32, audio_frame_sink: &mut Sink) { + pub fn cycles(&mut self, num_cycles: u32, audio_frame_sink: &mut dyn Sink) { for _ in 0..num_cycles { self.duration_clock_counter += 1; if self.duration_clock_counter >= DURATION_CLOCK_PERIOD { @@ -691,7 +691,7 @@ impl Vsu { } } - fn sample_clock(&mut self, audio_frame_sink: &mut Sink) { + fn sample_clock(&mut self, audio_frame_sink: &mut dyn Sink) { let mut acc_left = 0; let mut acc_right = 0; diff --git a/rustual-boy-middleware/src/anaglyphizer.rs b/rustual-boy-middleware/src/anaglyphizer.rs index 5749968..84df885 100644 --- a/rustual-boy-middleware/src/anaglyphizer.rs +++ b/rustual-boy-middleware/src/anaglyphizer.rs @@ -40,7 +40,7 @@ impl> Sink for Anaglyphizer { let l_buffer = l_buffer.as_ptr(); let r_buffer = r_buffer.as_ptr(); { - let o_ptr = output.as_mut_ptr(); + let o_ptr: *mut Color = output.as_mut_ptr(); for i in 0..(DISPLAY_PIXELS as isize) { let l = *(l_buffer.offset(i)); let r = *(r_buffer.offset(i)); diff --git a/rustual-boy-middleware/src/gamma_adjust_sink.rs b/rustual-boy-middleware/src/gamma_adjust_sink.rs index 103450f..2895bbb 100644 --- a/rustual-boy-middleware/src/gamma_adjust_sink.rs +++ b/rustual-boy-middleware/src/gamma_adjust_sink.rs @@ -1,3 +1,4 @@ +use color::Color; use color_frame::ColorFrame; use rustual_boy_core::sinks::Sink; use rustual_boy_core::vip::DISPLAY_PIXELS; @@ -47,7 +48,7 @@ impl> Sink for GammaAdjustSink { unsafe { let input_buffer_ptr = frame.as_ptr(); { - let output_buffer_ptr = output.as_mut_ptr(); + let output_buffer_ptr: *mut Color = output.as_mut_ptr(); for i in 0..(DISPLAY_PIXELS as isize) { let ref input = *(input_buffer_ptr.offset(i)); let (input_r, input_g, input_b) = input.into();