From 24ea413848bcfc2aabcbb868f50d847779aca7a6 Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Sat, 28 Sep 2024 22:20:51 -0400 Subject: [PATCH] more test etc. video needs stuff bad --- Cargo.lock | 1243 +---------------------- Cargo.toml | 2 +- emma/src/bin/emma.rs | 6 +- emma/src/bin/support/emmagui_support.rs | 4 +- emma/src/chip8/computer.rs | 28 - emma/src/chip8/instructions.rs | 95 +- emma/src/chip8/registers.rs | 2 + emma/src/chip8/sound_timer.rs | 2 +- emma/src/chip8/system_memory.rs | 16 - emma/src/chip8/video.rs | 93 +- 10 files changed, 176 insertions(+), 1315 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c6b11fe..46f3580 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,12 +61,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "aligned-vec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" - [[package]] name = "allocator-api2" version = "0.2.18" @@ -94,27 +88,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "android-activity" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" -dependencies = [ - "android-properties", - "bitflags 2.6.0", - "cc", - "cesu8", - "jni", - "jni-sys", - "libc", - "log", - "ndk 0.9.0", - "ndk-context", - "ndk-sys 0.6.0+11769913", - "num_enum 0.7.2", - "thiserror", -] - [[package]] name = "android-properties" version = "0.2.2" @@ -136,44 +109,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" - -[[package]] -name = "arboard" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" -dependencies = [ - "clipboard-win 5.4.0", - "log", - "objc2 0.5.2", - "objc2-app-kit", - "objc2-foundation", - "parking_lot", - "x11rb 0.13.1", -] - -[[package]] -name = "arg_enum_proc_macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -210,29 +145,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "av1-grain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" -dependencies = [ - "anyhow", - "arrayvec 0.7.4", - "log", - "nom", - "num-rational 0.4.2", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" -dependencies = [ - "arrayvec 0.7.4", -] - [[package]] name = "backtrace" version = "0.3.73" @@ -258,12 +170,6 @@ dependencies = [ "nix 0.20.2", ] -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - [[package]] name = "bitflags" version = "1.2.1" @@ -276,18 +182,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -[[package]] -name = "bitmask" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da9b3d9f6f585199287a473f4f8dfab6566cf827d15c00c219f53c645687ead" - -[[package]] -name = "bitstream-io" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcde5f311c85b8ca30c2e4198d4326bc342c76541590106f5fa4a50946ea499" - [[package]] name = "block" version = "0.1.6" @@ -310,24 +204,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ "block-sys", - "objc2 0.4.1", + "objc2", ] -[[package]] -name = "block2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" -dependencies = [ - "objc2 0.5.2", -] - -[[package]] -name = "built" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" - [[package]] name = "bumpalo" version = "3.16.0" @@ -346,12 +225,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - [[package]] name = "bytes" version = "1.6.1" @@ -386,20 +259,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "calloop" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" -dependencies = [ - "bitflags 2.6.0", - "log", - "polling", - "rustix", - "slab", - "thiserror", -] - [[package]] name = "calloop-wayland-source" version = "0.2.0" @@ -412,18 +271,6 @@ dependencies = [ "wayland-client 0.31.5", ] -[[package]] -name = "calloop-wayland-source" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" -dependencies = [ - "calloop 0.13.0", - "rustix", - "wayland-backend", - "wayland-client 0.31.5", -] - [[package]] name = "cassowary" version = "0.3.0" @@ -455,16 +302,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cfg-expr" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" -dependencies = [ - "smallvec", - "target-lexicon", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -477,12 +314,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "cgl" version = "0.3.2" @@ -522,15 +353,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "clipboard-win" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" -dependencies = [ - "error-code", -] - [[package]] name = "cmake" version = "0.1.51" @@ -631,26 +453,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "133fc8675ee3a4ec9aa513584deda9aa0faeda3586b87f7f0f2ba082c66fb172" dependencies = [ - "clipboard-win 3.1.1", + "clipboard-win", "objc", "objc-foundation", "objc_id", - "smithay-clipboard 0.6.6", - "x11-clipboard 0.7.1", -] - -[[package]] -name = "copypasta" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb85422867ca93da58b7f95fb5c0c10f6183ed6e1ef8841568968a896d3a858" -dependencies = [ - "clipboard-win 3.1.1", - "objc", - "objc-foundation", - "objc_id", - "smithay-clipboard 0.7.2", - "x11-clipboard 0.9.2", + "smithay-clipboard", + "x11-clipboard", ] [[package]] @@ -800,12 +608,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - [[package]] name = "cty" version = "0.2.2" @@ -895,15 +697,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dpi" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" -dependencies = [ - "mint", -] - [[package]] name = "dwrote" version = "0.11.0" @@ -930,16 +723,16 @@ version = "0.1.0" dependencies = [ "beep", "chrono", - "copypasta 0.8.2", + "copypasta", "dimensioned", "glium", - "image 0.23.14", + "image", "imgui", "imgui-glium-renderer", "imgui-winit-support", "log", "pretty_env_logger", - "rand 0.9.0-alpha.2", + "rand", "ratatui", "winit 0.27.5", ] @@ -973,12 +766,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "error-code" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" - [[package]] name = "expat-sys" version = "2.1.6" @@ -989,22 +776,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "exr" -version = "1.72.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" -dependencies = [ - "bit_field", - "flume", - "half", - "lebe", - "miniz_oxide 0.7.4", - "rayon-core", - "smallvec", - "zune-inflate", -] - [[package]] name = "fdeflate" version = "0.3.4" @@ -1024,15 +795,6 @@ dependencies = [ "miniz_oxide 0.7.4", ] -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "spin", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1154,16 +916,6 @@ dependencies = [ "weezl", ] -[[package]] -name = "gif" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gimli" version = "0.29.0" @@ -1190,8 +942,8 @@ dependencies = [ "backtrace", "fnv", "gl_generator", - "glutin 0.31.3", - "glutin-winit 0.4.2", + "glutin", + "glutin-winit", "lazy_static", "memoffset 0.9.1", "raw-window-handle 0.5.2", @@ -1207,16 +959,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18fcd4ae4e86d991ad1300b8f57166e5be0c95ef1f63f3f5b827f8a164548746" dependencies = [ "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "cfg_aliases", "cgl", "core-foundation", "dispatch", - "glutin_egl_sys 0.6.0", - "glutin_glx_sys 0.5.0", - "glutin_wgl_sys 0.5.0", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", "icrate", "libloading", - "objc2 0.4.1", + "objc2", "once_cell", "raw-window-handle 0.5.2", "wayland-sys 0.31.4", @@ -1224,55 +976,18 @@ dependencies = [ "x11-dl", ] -[[package]] -name = "glutin" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2491aa3090f682ddd920b184491844440fdd14379c7eef8f5bc10ef7fb3242fd" -dependencies = [ - "bitflags 2.6.0", - "cfg_aliases 0.2.1", - "cgl", - "core-foundation", - "dispatch", - "glutin_egl_sys 0.7.0", - "glutin_glx_sys 0.6.0", - "glutin_wgl_sys 0.6.0", - "libloading", - "objc2 0.5.2", - "objc2-app-kit", - "objc2-foundation", - "once_cell", - "raw-window-handle 0.6.2", - "wayland-sys 0.31.4", - "windows-sys 0.52.0", - "x11-dl", -] - [[package]] name = "glutin-winit" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" dependencies = [ - "cfg_aliases 0.1.1", - "glutin 0.31.3", + "cfg_aliases", + "glutin", "raw-window-handle 0.5.2", "winit 0.29.15", ] -[[package]] -name = "glutin-winit" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" -dependencies = [ - "cfg_aliases 0.2.1", - "glutin 0.32.0", - "raw-window-handle 0.6.2", - "winit 0.30.4", -] - [[package]] name = "glutin_egl_sys" version = "0.6.0" @@ -1283,16 +998,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "glutin_egl_sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae99fff4d2850dbe6fb8c1fa8e4fead5525bab715beaacfccf3fb994e01c827" -dependencies = [ - "gl_generator", - "windows-sys 0.52.0", -] - [[package]] name = "glutin_glx_sys" version = "0.5.0" @@ -1303,16 +1008,6 @@ dependencies = [ "x11-dl", ] -[[package]] -name = "glutin_glx_sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2b2d3918e76e18e08796b55eb64e8fe6ec67d5a6b2e2a7e2edce224ad24c63" -dependencies = [ - "gl_generator", - "x11-dl", -] - [[package]] name = "glutin_wgl_sys" version = "0.5.0" @@ -1322,25 +1017,6 @@ dependencies = [ "gl_generator", ] -[[package]] -name = "glutin_wgl_sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" -dependencies = [ - "gl_generator", -] - -[[package]] -name = "half" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -dependencies = [ - "cfg-if", - "crunchy", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -1404,9 +1080,9 @@ version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" dependencies = [ - "block2 0.3.0", + "block2", "dispatch", - "objc2 0.4.1", + "objc2", ] [[package]] @@ -1424,55 +1100,16 @@ dependencies = [ "bytemuck", "byteorder", "color_quant", - "gif 0.11.4", - "jpeg-decoder 0.1.22", + "gif", + "jpeg-decoder", "num-iter", - "num-rational 0.3.2", + "num-rational", "num-traits", "png 0.16.8", "scoped_threadpool", - "tiff 0.6.1", + "tiff", ] -[[package]] -name = "image" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" -dependencies = [ - "bytemuck", - "byteorder-lite", - "color_quant", - "exr", - "gif 0.13.1", - "image-webp", - "num-traits", - "png 0.17.13", - "qoi", - "ravif", - "rayon", - "rgb", - "tiff 0.9.1", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "image-webp" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904" -dependencies = [ - "byteorder-lite", - "quick-error", -] - -[[package]] -name = "imgref" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" - [[package]] name = "imgui" version = "0.12.0" @@ -1550,17 +1187,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "interpolate_name" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - [[package]] name = "is-terminal" version = "0.4.13" @@ -1572,15 +1198,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -1636,12 +1253,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" - [[package]] name = "js-sys" version = "0.3.69" @@ -1669,29 +1280,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lebe" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" - [[package]] name = "libc" version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" -[[package]] -name = "libfuzzer-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" -dependencies = [ - "arbitrary", - "cc", - "once_cell", -] - [[package]] name = "libloading" version = "0.8.5" @@ -1735,15 +1329,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "loop9" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" -dependencies = [ - "imgref", -] - [[package]] name = "lru" version = "0.12.4" @@ -1762,15 +1347,6 @@ dependencies = [ "libc", ] -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", -] - [[package]] name = "memchr" version = "2.7.4" @@ -1813,12 +1389,6 @@ dependencies = [ "autocfg", ] -[[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.3.7" @@ -1909,21 +1479,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "ndk" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" -dependencies = [ - "bitflags 2.6.0", - "jni-sys", - "log", - "ndk-sys 0.6.0+11769913", - "num_enum 0.7.2", - "raw-window-handle 0.6.2", - "thiserror", -] - [[package]] name = "ndk-context" version = "0.1.1" @@ -1977,21 +1532,6 @@ dependencies = [ "jni-sys", ] -[[package]] -name = "ndk-sys" -version = "0.6.0+11769913" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nix" version = "0.20.2" @@ -2030,43 +1570,6 @@ dependencies = [ "memoffset 0.6.5", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - [[package]] name = "num-integer" version = "0.1.46" @@ -2098,17 +1601,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2193,93 +1685,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ "objc-sys", - "objc2-encode 3.0.0", -] - -[[package]] -name = "objc2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" -dependencies = [ - "objc-sys", - "objc2-encode 4.0.3", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "libc", - "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-contacts", - "objc2-foundation", + "objc2-encode", ] [[package]] @@ -2288,117 +1694,6 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" -[[package]] -name = "objc2-encode" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "dispatch", - "libc", - "objc2 0.5.2", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-app-kit", - "objc2-foundation", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2 0.5.1", - "objc2 0.5.2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.6.0", - "block2 0.5.1", - "objc2 0.5.2", - "objc2-core-location", - "objc2-foundation", -] - [[package]] name = "objc_id" version = "0.1.1" @@ -2476,26 +1771,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", -] - [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2596,40 +1871,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "profiling" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" -dependencies = [ - "quote", - "syn 2.0.71", -] - -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quick-xml" version = "0.34.0" @@ -2648,38 +1889,17 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e256ff62cee3e03def855c4d4260106d2bb1696fdc01af03e9935b993720a5" dependencies = [ - "rand_chacha 0.9.0-alpha.2", - "rand_core 0.9.0-alpha.2", + "rand_chacha", + "rand_core", "zerocopy", ] -[[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 0.6.4", -] - [[package]] name = "rand_chacha" version = "0.9.0-alpha.2" @@ -2687,16 +1907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d299e9db34f6623b2a9e86c015d6e173d5f46d64d4b9b8cc46ae8a982a50b04c" dependencies = [ "ppv-lite86", - "rand_core 0.9.0-alpha.2", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", + "rand_core", ] [[package]] @@ -2720,7 +1931,7 @@ dependencies = [ "compact_str", "crossterm", "instability", - "itertools 0.13.0", + "itertools", "lru", "paste", "strum", @@ -2730,55 +1941,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "rav1e" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" -dependencies = [ - "arbitrary", - "arg_enum_proc_macro", - "arrayvec 0.7.4", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools 0.12.1", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "once_cell", - "paste", - "profiling", - "rand 0.8.5", - "rand_chacha 0.3.1", - "simd_helpers", - "system-deps", - "thiserror", - "v_frame", - "wasm-bindgen", -] - -[[package]] -name = "ravif" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5797d09f9bd33604689e87e8380df4951d4912f01b63f71205e2abd4ae25e6b6" -dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error", - "rav1e", - "rgb", -] - [[package]] name = "raw-window-handle" version = "0.4.3" @@ -2876,15 +2038,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "rgb" -version = "0.8.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade4539f42266ded9e755c605bdddf546242b2c961b03b06a7375260788a0523" -dependencies = [ - "bytemuck", -] - [[package]] name = "rustc-demangle" version = "0.1.24" @@ -2977,19 +2130,6 @@ dependencies = [ "tiny-skia 0.11.4", ] -[[package]] -name = "sctk-adwaita" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" -dependencies = [ - "ab_glyph", - "log", - "memmap2 0.9.4", - "smithay-client-toolkit 0.19.2", - "tiny-skia 0.11.4", -] - [[package]] name = "serde" version = "1.0.204" @@ -3010,15 +2150,6 @@ dependencies = [ "syn 2.0.71", ] -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - [[package]] name = "servo-fontconfig" version = "0.5.1" @@ -3076,15 +2207,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simd_helpers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" -dependencies = [ - "quote", -] - [[package]] name = "slab" version = "0.4.9" @@ -3136,7 +2258,7 @@ checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ "bitflags 2.6.0", "calloop 0.12.4", - "calloop-wayland-source 0.2.0", + "calloop-wayland-source", "cursor-icon", "libc", "log", @@ -3148,32 +2270,7 @@ dependencies = [ "wayland-csd-frame", "wayland-cursor 0.31.5", "wayland-protocols 0.31.2", - "wayland-protocols-wlr 0.2.0", - "wayland-scanner 0.31.4", - "xkeysym", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" -dependencies = [ - "bitflags 2.6.0", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", - "cursor-icon", - "libc", - "log", - "memmap2 0.9.4", - "rustix", - "thiserror", - "wayland-backend", - "wayland-client 0.31.5", - "wayland-csd-frame", - "wayland-cursor 0.31.5", - "wayland-protocols 0.32.3", - "wayland-protocols-wlr 0.3.3", + "wayland-protocols-wlr", "wayland-scanner 0.31.4", "xkeysym", ] @@ -3188,17 +2285,6 @@ dependencies = [ "wayland-client 0.29.5", ] -[[package]] -name = "smithay-clipboard" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8216eec463674a0e90f29e0ae41a4db573ec5b56b1c6c1c71615d249b6d846" -dependencies = [ - "libc", - "smithay-client-toolkit 0.19.2", - "wayland-backend", -] - [[package]] name = "smol_str" version = "0.2.2" @@ -3208,15 +2294,6 @@ dependencies = [ "serde", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -3279,31 +2356,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "system-deps" -version = "6.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" -dependencies = [ - "cfg-expr", - "heck", - "pkg-config", - "toml", - "version-compare", -] - [[package]] name = "takeable-option" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36ae8932fcfea38b7d3883ae2ab357b0d57a02caaa18ebb4f5ece08beaec4aa0" -[[package]] -name = "target-lexicon" -version = "0.12.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" - [[package]] name = "termcolor" version = "1.4.1" @@ -3339,22 +2397,11 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" dependencies = [ - "jpeg-decoder 0.1.22", + "jpeg-decoder", "miniz_oxide 0.4.4", "weezl", ] -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder 0.3.1", - "weezl", -] - [[package]] name = "tiny-skia" version = "0.7.0" @@ -3405,26 +2452,11 @@ dependencies = [ "strict-num", ] -[[package]] -name = "toml" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.16", -] - [[package]] name = "toml_datetime" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -3434,7 +2466,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "toml_datetime", - "winnow 0.5.40", + "winnow", ] [[package]] @@ -3445,20 +2477,7 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.16", + "winnow", ] [[package]] @@ -3477,32 +2496,6 @@ version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -[[package]] -name = "trevors_chip8_core" -version = "0.1.0" -dependencies = [ - "bitmask", -] - -[[package]] -name = "trevors_chip8_toy" -version = "0.1.0" -dependencies = [ - "arboard", - "copypasta 0.10.1", - "glium", - "glutin 0.32.0", - "glutin-winit 0.5.0", - "image 0.25.2", - "imgui", - "imgui-glium-renderer", - "imgui-winit-support", - "log", - "raw-window-handle 0.6.2", - "trevors_chip8_core", - "winit 0.30.4", -] - [[package]] name = "ttf-parser" version = "0.24.0" @@ -3533,7 +2526,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ - "itertools 0.13.0", + "itertools", "unicode-segmentation", "unicode-width", ] @@ -3544,29 +2537,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -[[package]] -name = "v_frame" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" -dependencies = [ - "aligned-vec", - "num-traits", - "wasm-bindgen", -] - [[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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" - [[package]] name = "version_check" version = "0.9.4" @@ -3766,18 +2742,6 @@ dependencies = [ "wayland-scanner 0.31.4", ] -[[package]] -name = "wayland-protocols" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62989625a776e827cc0f15d41444a3cea5205b963c3a25be48ae1b52d6b4daaa" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client 0.31.5", - "wayland-scanner 0.31.4", -] - [[package]] name = "wayland-protocols-plasma" version = "0.2.0" @@ -3791,19 +2755,6 @@ dependencies = [ "wayland-scanner 0.31.4", ] -[[package]] -name = "wayland-protocols-plasma" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79f2d57c7fcc6ab4d602adba364bf59a5c24de57bd194486bf9b8360e06bfc4" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client 0.31.5", - "wayland-protocols 0.32.3", - "wayland-scanner 0.31.4", -] - [[package]] name = "wayland-protocols-wlr" version = "0.2.0" @@ -3817,19 +2768,6 @@ dependencies = [ "wayland-scanner 0.31.4", ] -[[package]] -name = "wayland-protocols-wlr" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd993de54a40a40fbe5601d9f1fbcaef0aebcc5fda447d7dc8f6dcbaae4f8953" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client 0.31.5", - "wayland-protocols 0.32.3", - "wayland-scanner 0.31.4", -] - [[package]] name = "wayland-scanner" version = "0.29.5" @@ -3895,16 +2833,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - [[package]] name = "weezl" version = "0.1.8" @@ -4249,12 +3177,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" dependencies = [ "ahash", - "android-activity 0.5.2", + "android-activity", "atomic-waker", "bitflags 2.6.0", "bytemuck", "calloop 0.12.4", - "cfg_aliases 0.1.1", + "cfg_aliases", "core-foundation", "core-graphics 0.23.2", "cursor-icon", @@ -4265,7 +3193,7 @@ dependencies = [ "memmap2 0.9.4", "ndk 0.8.0", "ndk-sys 0.5.0+25.2.9519653", - "objc2 0.4.1", + "objc2", "once_cell", "orbclient", "percent-encoding", @@ -4282,67 +3210,15 @@ dependencies = [ "wayland-backend", "wayland-client 0.31.5", "wayland-protocols 0.31.2", - "wayland-protocols-plasma 0.2.0", + "wayland-protocols-plasma", "web-sys", - "web-time 0.2.4", + "web-time", "windows-sys 0.48.0", "x11-dl", "x11rb 0.13.1", "xkbcommon-dl", ] -[[package]] -name = "winit" -version = "0.30.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4225ddd8ab67b8b59a2fee4b34889ebf13c0460c1c3fa297c58e21eb87801b33" -dependencies = [ - "ahash", - "android-activity 0.6.0", - "atomic-waker", - "bitflags 2.6.0", - "block2 0.5.1", - "bytemuck", - "calloop 0.13.0", - "cfg_aliases 0.2.1", - "concurrent-queue", - "core-foundation", - "core-graphics 0.23.2", - "cursor-icon", - "dpi", - "js-sys", - "libc", - "memmap2 0.9.4", - "ndk 0.9.0", - "objc2 0.5.2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "orbclient", - "percent-encoding", - "pin-project", - "raw-window-handle 0.6.2", - "redox_syscall 0.4.1", - "rustix", - "sctk-adwaita 0.10.1", - "smithay-client-toolkit 0.19.2", - "smol_str", - "tracing", - "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", - "wayland-backend", - "wayland-client 0.31.5", - "wayland-protocols 0.32.3", - "wayland-protocols-plasma 0.3.3", - "web-sys", - "web-time 1.1.0", - "windows-sys 0.52.0", - "x11-dl", - "x11rb 0.13.1", - "xkbcommon-dl", -] - [[package]] name = "winnow" version = "0.5.40" @@ -4352,15 +3228,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" -dependencies = [ - "memchr", -] - [[package]] name = "wio" version = "0.2.2" @@ -4379,16 +3246,6 @@ dependencies = [ "x11rb 0.10.1", ] -[[package]] -name = "x11-clipboard" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98785a09322d7446e28a13203d2cae1059a0dd3dfb32cb06d0a225f023d8286" -dependencies = [ - "libc", - "x11rb 0.13.1", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -4494,27 +3351,3 @@ dependencies = [ "quote", "syn 2.0.71", ] - -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "zune-jpeg" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16099418600b4d8f028622f73ff6e3deaabdff330fb9a2a131dea781ee8b0768" -dependencies = [ - "zune-core", -] diff --git a/Cargo.toml b/Cargo.toml index a500a33..df0ca31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,3 @@ [workspace] -members = ["chip8_toy","chip8_core", "emma"] +members = ["emma"] resolver = "2" \ No newline at end of file diff --git a/emma/src/bin/emma.rs b/emma/src/bin/emma.rs index b201812..d27d490 100644 --- a/emma/src/bin/emma.rs +++ b/emma/src/bin/emma.rs @@ -1,5 +1,5 @@ use std::io::{stdout, Result}; - +/* use emmaemu::{chip8::{computer::Chip8Computer, video::Chip8Video}, constants::{CHIP8_MEMORY_SIZE, CHIP8_REGISTER_COUNT, CHIP8_ROM_SIZE, CHIP8_VIDEO_MEMORY}}; use ratatui::{ backend::CrosstermBackend, @@ -162,3 +162,7 @@ mod test { assert_eq!(Chip8Video::new(grid_data).format_as_string(), expected_data); } } +*/ +fn main() { + println!("Taxation is theft"); +} \ No newline at end of file diff --git a/emma/src/bin/support/emmagui_support.rs b/emma/src/bin/support/emmagui_support.rs index fc06a18..173d41d 100644 --- a/emma/src/bin/support/emmagui_support.rs +++ b/emma/src/bin/support/emmagui_support.rs @@ -53,8 +53,8 @@ impl EmmaGui { let mut buffer = Vec::new(); println!("PREPARING TO LOAD 1-chip8-logo.ch8"); - // let mut input_file = File::open(Path::new("./1-chip8-logo.ch8")).expect("put 1-chip8-logo.ch8 in this directory"); - let mut input_file = File::open(Path::new("./coraxhard.ch8")).expect("put 1-chip8-logo.ch8 in this directory"); + let mut input_file = File::open(Path::new("./1-chip8-logo.ch8")).expect("put 1-chip8-logo.ch8 in this directory"); + // let mut input_file = File::open(Path::new("./coraxhard.ch8")).expect("put 1-chip8-logo.ch8 in this directory"); input_file.read_to_end(&mut buffer).expect("unable to read file"); system_to_control.load_bytes_to_memory(0x200, buffer.into()); } diff --git a/emma/src/chip8/computer.rs b/emma/src/chip8/computer.rs index 53d33ce..3cdcc0a 100644 --- a/emma/src/chip8/computer.rs +++ b/emma/src/chip8/computer.rs @@ -99,34 +99,6 @@ mod test { assert!(true) } - #[test] - fn decoder_test_invalid_instructions() { - // 'bad' instructions that should be dropped... - - // 5xy0 is the only valid 5 series. - assert!(matches!(Chip8CpuInstructions::decode(0x5ab1), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0x5abf), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - - // 8__8 -> 8__D and 8__F are invalid - assert!(matches!(Chip8CpuInstructions::decode(0x8ab8), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0x8abd), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0x8abf), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - - // 9__1 -> 9__F are invalid - assert!(matches!(Chip8CpuInstructions::decode(0x9ab1), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0x9abf), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - - // Only valid E suffixes are 9E and A1 - assert!(matches!(Chip8CpuInstructions::decode(0xea9d), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0xea9f), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0xeaa0), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0xeaa2), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - - // oh god f is a mess. - assert!(matches!(Chip8CpuInstructions::decode(0xf006), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - assert!(matches!(Chip8CpuInstructions::decode(0xf008), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); - - } #[test] fn new_with_program() { diff --git a/emma/src/chip8/instructions.rs b/emma/src/chip8/instructions.rs index b002f14..5432558 100644 --- a/emma/src/chip8/instructions.rs +++ b/emma/src/chip8/instructions.rs @@ -410,17 +410,11 @@ impl Chip8CpuInstructions { } // 0x6xkk Set Vx = kk Chip8CpuInstructions::LdVxByte(register, byte) => { - let start_value = input.registers.peek(*register as u8); - let byte_value = *byte as u8; - // println!("SETTING REGISTER [{register}] FROM [{start_value}] to [{byte_value}] by loading."); - input.registers.poke(*register as u8, byte_value); + input.registers.poke(*register as u8, *byte as u8); } // 0x7xkk Set Vx = Vx + kk Chip8CpuInstructions::AddVxByte(vx_register, byte) => { - let to_add = *byte as u8; - let old_value = input.registers.peek(*vx_register as u8); - println!("Adding [{old_value}] from register [{vx_register}] to [{to_add}] "); - input.registers.poke(*vx_register as u8, (old_value + to_add)); + input.registers.poke(*vx_register as u8, (input.registers.peek(*vx_register as u8) + *byte as u8)); } // 0x8xy0 Set value of Vy in Vx Chip8CpuInstructions::LdVxVy(x, y) => { @@ -428,28 +422,20 @@ impl Chip8CpuInstructions { } // 0x8xy1 Set Vx = Vx OR Vy Chip8CpuInstructions::OrVxVy(x, y) => { - let lhs = input.registers.peek(*x as u8); - let rhs = input.registers.peek(*y as u8); - input.registers.poke(*x as u8, lhs | rhs); + input.registers.poke(*x as u8, input.registers.peek(*x as u8) | input.registers.peek(*y as u8)); } // 0x8xy2 Set Vx = Vx AND Vy Chip8CpuInstructions::AndVxVy(x, y) => { - let lhs = input.registers.peek(*x as u8); - let rhs = input.registers.peek(*y as u8); - - input.registers.poke(*x as u8, lhs & rhs); + input.registers.poke(*x as u8, input.registers.peek(*x as u8) & input.registers.peek(*y as u8)); } // 0x8xy3 Set Vx = Vx XOR Vy Chip8CpuInstructions::XorVxVy(x, y) => { - let lhs = input.registers.peek(*x as u8); - let rhs = input.registers.peek(*y as u8); - input.registers.poke(*x as u8, lhs ^ rhs); + input.registers.poke(*x as u8, input.registers.peek(*x as u8) ^ input.registers.peek(*y as u8)); } // 0x8xy4 Set Vx = Vx + Vy (SET VF on Carry) Chip8CpuInstructions::AddVxVy(x, y) => { let lhs = input.registers.peek(*x as u8); let rhs = input.registers.peek(*y as u8); - let working = (lhs as i16 + rhs as i16) as i16; if working > 255 { input.registers.poke(0xf, 0x01); @@ -461,9 +447,7 @@ impl Chip8CpuInstructions { // Set Vx = Vx - Vy, set VF = NOT borrow. // // If Vx > Vy, then VF is set to 1, otherwise 0. Then Vy is subtracted from Vx, and the results stored in Vx. - let lhs = input.registers.peek(*x as u8); - let rhs = input.registers.peek(*y as u8); - input.registers.poke(*x as u8, lhs - rhs); + input.registers.poke(*x as u8, input.registers.peek(*x as u8) - input.registers.peek(*y as u8)); } Chip8CpuInstructions::ShrVxVy(x, y) => { // 8xy6 - SHR Vx {, Vy} @@ -493,7 +477,6 @@ impl Chip8CpuInstructions { // Set Vx = Vx SHL 1. // // If the most-significant bit of Vx is 1, then VF is set to 1, otherwise to 0. Then Vx is multiplied by 2. - let initial_value = input.registers.peek(*x as u8); if 0x80 & initial_value == 0x80 { input.registers.poke(0xf, 1); @@ -517,6 +500,7 @@ impl Chip8CpuInstructions { // Set I = nnn. // // The value of register I is set to nnn. + println!("SETTING I to {new_index}"); input.registers.poke_i(*new_index); } // 0xBnnn Jump to nnn+V0 @@ -525,8 +509,7 @@ impl Chip8CpuInstructions { // Jump to location nnn + V0. // // The program counter is set to nnn plus the value of V0. - let x_reg = input.registers.peek(0); - input.registers.poke_pc(x_reg as u16 + addr); + input.registers.poke_pc(input.registers.peek(0) as u16 + addr); } Chip8CpuInstructions::RndVxByte(x, byte) => { // Cxkk - RND Vx, byte @@ -579,11 +562,15 @@ impl Chip8CpuInstructions { let key_to_check = input.registers.peek(*x as u8); } Chip8CpuInstructions::SnkpVx(x) => { - // ExA1 - SKNP Vx // Skip next instruction if key with the value of Vx is not pressed. // // Checks the keyboard, and if the key corresponding to the value of Vx is currently in the up position, PC is increased by 2. + let key_to_check = input.registers.peek(*x as u8); + let is_pressed = input.keypad.pressed(*x as u8); + if is_pressed { + input.registers.advance_pc(); + } } Chip8CpuInstructions::LdVxDt(x) => { // Fx07 - LD Vx, DT @@ -605,11 +592,9 @@ impl Chip8CpuInstructions { // // DT is set equal to the value of Vx. let new_time = input.registers.peek(*source_register as u8); - println!("SETTING DELAY TIMER TO [{}]", new_time); input.delay_timer.set_timer(new_time as i32); } Chip8CpuInstructions::LdStVx(new_time) => { - println!("SETTING SOUND TIMER TO [0x{:2x}]", *new_time); input.sound_timer.set_timer(*new_time as i32); } Chip8CpuInstructions::AddIVx(x) => { @@ -742,7 +727,20 @@ mod test { assert!(matches!(Chip8CpuInstructions::decode(0xfd33), Chip8CpuInstructions::LdBVx(0xd))); assert!(matches!(Chip8CpuInstructions::decode(0xfe55), Chip8CpuInstructions::LdIVx(0xe))); assert!(matches!(Chip8CpuInstructions::decode(0xf365), Chip8CpuInstructions::LdVxI(0x3))); + } + #[test] + fn decoder_test_invalid_instructions() { + let invalid_to_encode = [ + 0x5ab1, 0x5abf, 0x8ab8, 0x8abd, 0x8abf, + 0x9ab1, 0x9abf, 0xea9d, 0xea9f, 0xeaa0, + 0xeaa2, 0xf006, 0xf008 + ]; + + for i in invalid_to_encode { + assert_eq!(Chip8CpuInstructions::decode(i).encode(), 0xffff); + assert!(matches!(Chip8CpuInstructions::decode(i), Chip8CpuInstructions::XXXXERRORINSTRUCTION)); + } } /// START OF THE EXECUTION TESTS @@ -997,11 +995,46 @@ mod test { assert_eq!(x.registers.peek_pc(), 0x208); } - fn SneVxVy_test() {} + #[test] + fn SneVxVy_test() { + // 9xy0 - SNE Vx, Vy + // Skip next instruction if Vx != Vy. + // + // The values of Vx and Vy are compared, and if they are not equal, the program counter is increased by 2. + let mut x = Chip8Computer::new(); + Chip8CpuInstructions::LdVxByte(0x01, 0xab).execute(&mut x); + Chip8CpuInstructions::LdVxByte(0x02, 0xba).execute(&mut x); + // they are not the same. we should skip. + assert_eq!(x.registers.peek_pc(), 0x204); + Chip8CpuInstructions::SneVxVy(0x01, 0x02).execute(&mut x); + assert_eq!(x.registers.peek_pc(), 0x208); - fn LdiAddr_test() {} + Chip8CpuInstructions::LdVxByte(0x02, 0xab).execute(&mut x); + Chip8CpuInstructions::SneVxVy(0x01, 0x02).execute(&mut x); + assert_eq!(x.registers.peek_pc(), 0x20C); + } - fn JpV0Addr_test() {} + #[test] + fn LdiAddr_test() { + // Annn - LD I, addr + // Set I = nnn. + // + // The value of register I is set to nnn. + let mut x = Chip8Computer::new(); + + let value_for_memory = 0xbe; + // load the value into V0 + Chip8CpuInstructions::LdIAddr(0xfab).execute(&mut x); + assert_eq!(x.registers.peek_i(), 0xfab); + } + + fn JpV0Addr_test() { + // Bnnn - JP V0, addr + // Jump to location nnn + V0. + // + // The program counter is set to nnn plus the value of V0. + + } #[test] fn RndVxByte_test() { diff --git a/emma/src/chip8/registers.rs b/emma/src/chip8/registers.rs index 9f7e9af..0743dbc 100644 --- a/emma/src/chip8/registers.rs +++ b/emma/src/chip8/registers.rs @@ -1,3 +1,4 @@ +use log::debug; /// Registers. numbered 1-16 publicly. /// Privately using zero base array so -1 to shift from pub to priv. @@ -33,6 +34,7 @@ impl Chip8Registers { } pub fn poke_i(&mut self, new_value: u16) { + println!("REGISTER: Setting I to {new_value}"); self.i_register = new_value; } pub fn peek(&self, register_number: u8) -> u8 { diff --git a/emma/src/chip8/sound_timer.rs b/emma/src/chip8/sound_timer.rs index d1970fb..a2bb6bd 100644 --- a/emma/src/chip8/sound_timer.rs +++ b/emma/src/chip8/sound_timer.rs @@ -5,6 +5,7 @@ use beep::beep; pub struct SoundTimer { counter: i32 } + impl SoundTimer { pub fn current(&self) -> i32 { self.counter @@ -33,7 +34,6 @@ impl SoundTimer { } } - #[cfg(test)] mod test { use super::*; diff --git a/emma/src/chip8/system_memory.rs b/emma/src/chip8/system_memory.rs index 9db61a7..46faa01 100644 --- a/emma/src/chip8/system_memory.rs +++ b/emma/src/chip8/system_memory.rs @@ -42,20 +42,6 @@ impl Default for Chip8SystemMemory { } } -impl Widget for Chip8SystemMemory { - fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer) - where - Self: Sized, - { - // build the text version of the system memory... - // ...and stuff it in the display. - let style = Style::new(); - let string = String::new(); - buf.set_string(0, 0, string, style) - } - // Display the system memory as a widget -} - const cell_width: i32 = 5i32; const cell_height: i32 = 5i32; @@ -71,8 +57,6 @@ impl Chip8SystemMemory { self.memory[address as usize] = value; } - - pub fn load_program(&mut self, program_to_load: Box>) { for load_index in 0..program_to_load.len() { self.poke((load_index + 0x200) as u16, program_to_load[load_index]); diff --git a/emma/src/chip8/video.rs b/emma/src/chip8/video.rs index 0632cb5..87c63df 100644 --- a/emma/src/chip8/video.rs +++ b/emma/src/chip8/video.rs @@ -4,13 +4,31 @@ use ratatui::{layout::Rect, style::Style, widgets::Widget}; use crate::chip8::computer::Chip8Computer; use crate::constants::CHIP8_VIDEO_MEMORY; - #[derive(Clone, Copy)] pub struct Chip8Video { memory: [bool; CHIP8_VIDEO_MEMORY] } impl Chip8Video { + pub fn as_64bit(&self) -> Vec { + let mut to_return = vec![]; + + for row_in_video in 0..32 { + let mut working_row = 0u64; + for bit_in_video in 0..64 { + let data_offset = row_in_video * 64 + bit_in_video; + let to_convert = self.memory[data_offset]; + let shifted_bit = if to_convert { + 1 << bit_in_video + } else { 0 }; + working_row = working_row | shifted_bit; + } + to_return.push(working_row); + } + to_return + } + + pub fn new(initial_configuration: [bool; CHIP8_VIDEO_MEMORY]) -> Self { Self { memory: initial_configuration @@ -26,6 +44,19 @@ impl Chip8Video { self.to_owned() } + pub fn poke_byte(&mut self, first_address: u16, to_write: u8) -> Self { + println!("PREPARING TO POKE {to_write:b} to {first_address:4x}"); + for i in (0..8).rev() { + let shifted = ((1 << i) & to_write) >> i; + // + let target_address = first_address + (7 - i); + let is_set = shifted == 1; + println!("POKE {} with {} / {shifted:8b}", target_address, is_set); + self.poke(target_address, is_set); + } + self.to_owned() + } + pub fn format_as_string(self) -> String { let mut output = String::new(); for row in 0..32 { @@ -110,14 +141,15 @@ mod test { #[test] fn set_initial_memory() { - let mut initial_memory = [false; CHIP8_VIDEO_MEMORY]; + let mut x = Chip8Video::default(); + // let mut initial_memory = [false; CHIP8_VIDEO_MEMORY]; let mut ws = String::new(); // set our checkerboard for cbr in 0..32 { for cbc in 0..64 { let dof = cbr * 64 + cbc; if (dof as i32 % 2) == 0 { - initial_memory[dof] = true; + x.poke(dof, true); ws += "*"; } else { ws += " "; @@ -125,36 +157,37 @@ mod test { } ws += "\n"; } - let set_x = Chip8Video::new(initial_memory); - assert_eq!(set_x.format_as_string(), ws); + assert_eq!(x.format_as_string(), ws); } -/* + #[test] - fn set_sprite_test() { + fn poke_byte() { + let to_poke = 0b11001111; let mut x = Chip8Video::default(); - let sprite = vec![0b00110011, - 0b11001100, - 0b01010101, - 0b10101010]; - - x.write_sprite(sprite.clone(), (0,0)); - - for sprite_row in 0..sprite.len() { - for bit_in_row in 0..8 { - let data_offset = sprite_row * 8 + bit_in_row; - let test_bit = 1 << bit_in_row; - // now we have a 1 in the 'right' place - let test_value = test_bit & sprite[sprite_row]; - // if we found a bit where we looked - if test_bit == test_value { - assert!(x.peek(data_offset as u16)); - } else { - // no bit. expect false. - assert!(!x.peek(data_offset as u16)); - } - } + x.poke_byte(0x05, to_poke); + let mut expected = String::new(); + expected = " ** **** \n".to_string(); + for i in 0..31 { + expected += &*(" ".repeat(64) + "\n"); } - + assert_eq!(x.format_as_string(), expected); } -*/ + + #[test] + fn poke_sprite() { + let mut expected = String::new(); + let to_poke = [ + 0b11001100, + 0b00110011, + 0b11001100, + 0b00110011 + ]; + + // Position at 4,10 + // 5,10 + // 6,10 + // 7,10 + let start_address = (4 * 64) + 10; + } + } \ No newline at end of file