A GameCube/Wii emulator and debugger written in Rust.
restructure
Layle137937d6ea53
diff --git a/.gitignore b/.gitignoreindex 5aeab31..45cc66b 100644--- a/.gitignore+++ b/.gitignore@@ -1,9 +1,7 @@target/-rsrc/*.dol-rsrc/*.bin.idea/.vscode/perf.*profile.json.gzout*.txt-*-dump/\ No newline at end of file+private/\ No newline at end of filediff --git a/.gitmodules b/.gitmodulesindex 102848e..e2415e2 100644--- a/.gitmodules+++ b/.gitmodules@@ -1,3 +1,3 @@-[submodule "rsrc/chipi-spec"]- path = rsrc/chipi-spec+[submodule "submodules/chipi-spec"]+ path = submodules/chipi-specurl = https://github.com/ioncodes/chipi-specdiff --git a/Cargo.lock b/Cargo.lockindex edef5df..ab142f3 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -60,23 +60,21 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"[[package]]name = "android-activity"-version = "0.6.0"+version = "0.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"+checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd"dependencies = ["android-properties","bitflags 2.11.0","cc",- "cesu8",- "jni 0.21.1",- "jni-sys 0.3.0",+ "jni","libc","log","ndk","ndk-context","ndk-sys","num_enum",- "thiserror 1.0.69",+ "thiserror 2.0.18",][[package]]@@ -111,9 +109,9 @@ dependencies = [[[package]]name = "anstyle"-version = "1.0.13"+version = "1.0.14"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"[[package]]name = "anstyle-parse"@@ -160,7 +158,7 @@ dependencies = ["objc2-foundation 0.3.2","parking_lot","percent-encoding",- "windows-sys 0.59.0",+ "windows-sys 0.60.2","x11rb",]@@ -208,7 +206,7 @@ name = "backend-wgpu"version = "0.1.0"dependencies = ["bytemuck",- "gekko",+ "gecko","wgpu",]@@ -361,9 +359,9 @@ dependencies = [[[package]]name = "cc"-version = "1.2.56"+version = "1.2.57"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2"+checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423"dependencies = ["find-msvc-tools","jobserver",@@ -371,12 +369,6 @@ dependencies = ["shlex",]-[[package]]-name = "cesu8"-version = "1.1.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"-[[package]]name = "cfg-if"version = "1.0.4"@@ -391,16 +383,16 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"[[package]]name = "chapa"-version = "0.1.0"-source = "git+https://github.com/ioncodes/chapa.git#a718929a3cce9a6a219242511d52b0938480373f"+version = "0.1.1"+source = "git+https://github.com/ioncodes/chapa.git#79ae40b94a5823ea59bdcecf0b7a9878cd8accba"dependencies = ["chapa-macros",][[package]]name = "chapa-macros"-version = "0.1.0"-source = "git+https://github.com/ioncodes/chapa.git#a718929a3cce9a6a219242511d52b0938480373f"+version = "0.1.1"+source = "git+https://github.com/ioncodes/chapa.git#79ae40b94a5823ea59bdcecf0b7a9878cd8accba"dependencies = ["proc-macro2","quote",@@ -449,9 +441,9 @@ dependencies = [[[package]]name = "clap_lex"-version = "1.0.0"+version = "1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"[[package]]name = "clipboard-win"@@ -484,9 +476,9 @@ dependencies = [[[package]]name = "colorchoice"-version = "1.0.4"+version = "1.0.5"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"[[package]]name = "colored"@@ -648,7 +640,7 @@ dependencies = ["egui-wgpu","egui-winit","egui_material_icons",- "gekko",+ "gecko","image 0.1.0","pollster","scripting",@@ -868,9 +860,9 @@ checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"[[package]]name = "euclid"-version = "0.22.13"+version = "0.22.14"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63"+checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06"dependencies = ["num-traits",]@@ -943,9 +935,9 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"[[package]]name = "font-types"-version = "0.11.0"+version = "0.11.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b1e4d2d0cf79d38430cc9dc9aadec84774bff2e1ba30ae2bf6c16cfce9385a23"+checksum = "73829a7b5c91198af28a99159b7ae4afbb252fb906159ff7f189f3a2ceaa3df2"dependencies = ["bytemuck",]@@ -1023,7 +1015,7 @@ dependencies = [][[package]]-name = "gekko"+name = "gecko"version = "0.1.0"dependencies = ["chapa",@@ -1312,25 +1304,9 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"[[package]]name = "jni"-version = "0.21.1"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"-dependencies = [- "cesu8",- "cfg-if",- "combine",- "jni-sys 0.3.0",- "log",- "thiserror 1.0.69",- "walkdir",- "windows-sys 0.45.0",-]--[[package]]-name = "jni"-version = "0.22.3"+version = "0.22.4"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "295dc9997acda1562fdf8d299f56063c936443b60f078e63a5d8d3c34ef2642b"+checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"dependencies = ["cfg-if","combine",@@ -1345,9 +1321,9 @@ dependencies = [[[package]]name = "jni-macros"-version = "0.22.2"+version = "0.22.4"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1c3d1da60c95c98847b26b9d45f4360fee718b31de746df016d9cd6de916a7ef"+checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"dependencies = ["proc-macro2","quote",@@ -1358,9 +1334,12 @@ dependencies = [[[package]]name = "jni-sys"-version = "0.3.0"+version = "0.3.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"+checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"+dependencies = [+ "jni-sys 0.4.1",+][[package]]name = "jni-sys"@@ -1459,9 +1438,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"[[package]]name = "libredox"-version = "0.1.14"+version = "0.1.15"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a"+checksum = "7ddbf48fd451246b1f8c2610bd3b4ac0cc6e149d89832867093ab69a17194f08"dependencies = ["bitflags 2.11.0","libc",@@ -1641,7 +1620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"dependencies = ["bitflags 2.11.0",- "jni-sys 0.3.0",+ "jni-sys 0.3.1","log","ndk-sys","num_enum",@@ -1661,7 +1640,7 @@ version = "0.6.0+11769913"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"dependencies = [- "jni-sys 0.3.0",+ "jni-sys 0.3.1",][[package]]@@ -1691,9 +1670,9 @@ dependencies = [[[package]]name = "num_enum"-version = "0.7.5"+version = "0.7.6"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c"+checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26"dependencies = ["num_enum_derive","rustversion",@@ -1701,9 +1680,9 @@ dependencies = [[[package]]name = "num_enum_derive"-version = "0.7.5"+version = "0.7.6"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7"+checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"dependencies = ["proc-macro-crate","proc-macro2",@@ -2013,9 +1992,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"[[package]]name = "orbclient"-version = "0.3.50"+version = "0.3.51"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd"+checksum = "59aed3b33578edcfa1bc96a321d590d31832b6ad55a26f0313362ce687e9abd6"dependencies = ["libc","libredox",@@ -2023,9 +2002,9 @@ dependencies = [[[package]]name = "ordered-float"-version = "4.6.0"+version = "5.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"+checksum = "0218004a4aae742209bee9c3cef05672f6b2708be36a50add8eb613b1f2a4008"dependencies = ["num-traits",]@@ -2172,9 +2151,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"[[package]]name = "portable-atomic-util"-version = "0.2.5"+version = "0.2.6"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5"+checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3"dependencies = ["portable-atomic",]@@ -2404,7 +2383,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"name = "scripting"version = "0.1.0"dependencies = [- "gekko",+ "gecko","mlua","tracing",]@@ -2771,7 +2750,7 @@ dependencies = ["egui-wgpu","egui-winit","egui_plot",- "gekko",+ "gecko","image 0.1.0","pollster","scripting",@@ -2788,7 +2767,7 @@ dependencies = ["clap","colored","disasm",- "gekko",+ "gecko","image 0.1.0","tracing-subscriber",]@@ -2805,18 +2784,18 @@ dependencies = [[[package]]name = "toml_datetime"-version = "1.0.0+spec-1.1.0"+version = "1.1.0+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e"+checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f"dependencies = ["serde_core",][[package]]name = "toml_edit"-version = "0.25.4+spec-1.1.0"+version = "0.25.8+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2"+checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c"dependencies = ["indexmap","toml_datetime",@@ -2826,9 +2805,9 @@ dependencies = [[[package]]name = "toml_parser"-version = "1.0.9+spec-1.1.0"+version = "1.1.0+spec-1.1.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"+checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011"dependencies = ["winnow",]@@ -2918,9 +2897,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"[[package]]name = "unicode-segmentation"-version = "1.12.0"+version = "1.13.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"+checksum = "da36089a805484bcccfffe0739803392c8298778a2d2f09febf76fac5ad9025b"[[package]]name = "unicode-width"@@ -3230,7 +3209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fe985f41e291eecef5e5c0770a18d28390addb03331c043964d9e916453d6f16"dependencies = ["core-foundation 0.10.1",- "jni 0.22.3",+ "jni","log","ndk-context","objc2 0.6.4",@@ -3527,15 +3506,6 @@ dependencies = ["windows-link",]-[[package]]-name = "windows-sys"-version = "0.45.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"-dependencies = [- "windows-targets 0.42.2",-]-[[package]]name = "windows-sys"version = "0.52.0"@@ -3556,26 +3526,20 @@ dependencies = [[[package]]name = "windows-sys"-version = "0.61.2"+version = "0.60.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"dependencies = [- "windows-link",+ "windows-targets 0.53.5",][[package]]-name = "windows-targets"-version = "0.42.2"+name = "windows-sys"+version = "0.61.2"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"dependencies = [- "windows_aarch64_gnullvm 0.42.2",- "windows_aarch64_msvc 0.42.2",- "windows_i686_gnu 0.42.2",- "windows_i686_msvc 0.42.2",- "windows_x86_64_gnu 0.42.2",- "windows_x86_64_gnullvm 0.42.2",- "windows_x86_64_msvc 0.42.2",+ "windows-link",][[package]]@@ -3587,7 +3551,7 @@ dependencies = ["windows_aarch64_gnullvm 0.52.6","windows_aarch64_msvc 0.52.6","windows_i686_gnu 0.52.6",- "windows_i686_gnullvm",+ "windows_i686_gnullvm 0.52.6","windows_i686_msvc 0.52.6","windows_x86_64_gnu 0.52.6","windows_x86_64_gnullvm 0.52.6",@@ -3595,19 +3559,30 @@ dependencies = [][[package]]-name = "windows-threading"-version = "0.2.1"+name = "windows-targets"+version = "0.53.5"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"dependencies = ["windows-link",+ "windows_aarch64_gnullvm 0.53.1",+ "windows_aarch64_msvc 0.53.1",+ "windows_i686_gnu 0.53.1",+ "windows_i686_gnullvm 0.53.1",+ "windows_i686_msvc 0.53.1",+ "windows_x86_64_gnu 0.53.1",+ "windows_x86_64_gnullvm 0.53.1",+ "windows_x86_64_msvc 0.53.1",][[package]]-name = "windows_aarch64_gnullvm"-version = "0.42.2"+name = "windows-threading"+version = "0.2.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"+dependencies = [+ "windows-link",+][[package]]name = "windows_aarch64_gnullvm"@@ -3616,10 +3591,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"[[package]]-name = "windows_aarch64_msvc"-version = "0.42.2"+name = "windows_aarch64_gnullvm"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"[[package]]name = "windows_aarch64_msvc"@@ -3628,10 +3603,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"[[package]]-name = "windows_i686_gnu"-version = "0.42.2"+name = "windows_aarch64_msvc"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"[[package]]name = "windows_i686_gnu"@@ -3639,6 +3614,12 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"+[[package]]+name = "windows_i686_gnu"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"+[[package]]name = "windows_i686_gnullvm"version = "0.52.6"@@ -3646,10 +3627,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"[[package]]-name = "windows_i686_msvc"-version = "0.42.2"+name = "windows_i686_gnullvm"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"[[package]]name = "windows_i686_msvc"@@ -3658,10 +3639,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"[[package]]-name = "windows_x86_64_gnu"-version = "0.42.2"+name = "windows_i686_msvc"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"[[package]]name = "windows_x86_64_gnu"@@ -3670,10 +3651,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"[[package]]-name = "windows_x86_64_gnullvm"-version = "0.42.2"+name = "windows_x86_64_gnu"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"[[package]]name = "windows_x86_64_gnullvm"@@ -3682,10 +3663,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"[[package]]-name = "windows_x86_64_msvc"-version = "0.42.2"+name = "windows_x86_64_gnullvm"+version = "0.53.1"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"[[package]]name = "windows_x86_64_msvc"@@ -3693,6 +3674,12 @@ version = "0.52.6"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"+[[package]]+name = "windows_x86_64_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"+[[package]]name = "winit"version = "0.30.13"@@ -3747,9 +3734,9 @@ dependencies = [[[package]]name = "winnow"-version = "0.7.15"+version = "1.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"+checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8"dependencies = ["memchr",]@@ -3934,9 +3921,9 @@ checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9"[[package]]name = "zune-jpeg"-version = "0.5.13"+version = "0.5.14"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "ec5f41c76397b7da451efd19915684f727d7e1d516384ca6bd0ec43ec94de23c"+checksum = "0b7a1c0af6e5d8d1363f4994b7a091ccf963d8b694f7da5b0b9cceb82da2c0a6"dependencies = ["zune-core",]diff --git a/Cargo.toml b/Cargo.tomlindex 1210b13..97f1891 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -3,7 +3,7 @@ resolver = "3"members = ["crates/gctool","crates/disasm",- "crates/gekko",+ "crates/gecko","crates/tinyemu","crates/image","crates/tinyapp",diff --git a/crates/backend-wgpu/Cargo.toml b/crates/backend-wgpu/Cargo.tomlindex 826f0bd..2dfdaa6 100644--- a/crates/backend-wgpu/Cargo.toml+++ b/crates/backend-wgpu/Cargo.toml@@ -6,4 +6,4 @@ edition = "2024"[dependencies]wgpu = "28.0.0"bytemuck = { version = "1.25.0", features = ["derive"] }-gekko = { path = "../gekko" }+gecko = { path = "../gecko" }diff --git a/crates/backend-wgpu/src/helpers.rs b/crates/backend-wgpu/src/helpers.rsindex 07c9a37..ac9864e 100644--- a/crates/backend-wgpu/src/helpers.rs+++ b/crates/backend-wgpu/src/helpers.rs@@ -1,4 +1,4 @@-use gekko::flipper::gx::regs::{BlendFactor, CompareFunc, MagFilter, MinFilter, WrapMode};+use gecko::flipper::gx::regs::{BlendFactor, CompareFunc, MagFilter, MinFilter, WrapMode};pub fn map_wrap_mode(wrap: WrapMode) -> wgpu::AddressMode {match wrap {diff --git a/crates/backend-wgpu/src/lib.rs b/crates/backend-wgpu/src/lib.rsindex 1e329db..a8c9da2 100644--- a/crates/backend-wgpu/src/lib.rs+++ b/crates/backend-wgpu/src/lib.rs@@ -1,8 +1,8 @@mod helpers;pub mod texture;-use gekko::flipper::gx::draw::{DrawCall, DrawCommands, Primitive, TextureFormat};-use gekko::flipper::gx::regs::{BlendFactor, CompareFunc, MagFilter, MinFilter, WrapMode};+use gecko::flipper::gx::draw::{DrawCall, DrawCommands, Primitive, TextureFormat};+use gecko::flipper::gx::regs::{BlendFactor, CompareFunc, MagFilter, MinFilter, WrapMode};use std::collections::HashMap;#[repr(C)]@@ -13,8 +13,8 @@ struct GpuVertex {tex0: [f32; 2],}-impl From<&gekko::flipper::gx::draw::Vertex> for GpuVertex {- fn from(v: &gekko::flipper::gx::draw::Vertex) -> Self {+impl From<&gecko::flipper::gx::draw::Vertex> for GpuVertex {+ fn from(v: &gecko::flipper::gx::draw::Vertex) -> Self {Self {position: v.position,color: v.color0,diff --git a/crates/backend-wgpu/src/texture.rs b/crates/backend-wgpu/src/texture.rsindex 5d026ba..49ca850 100644--- a/crates/backend-wgpu/src/texture.rs+++ b/crates/backend-wgpu/src/texture.rs@@ -1,4 +1,4 @@-use gekko::flipper::gx::draw::{TextureDescriptor, TextureFormat};+use gecko::flipper::gx::draw::{TextureDescriptor, TextureFormat};pub fn decode_to_rgba(ram: &[u8], desc: &TextureDescriptor) -> Vec<u8> {let w = desc.width as usize;diff --git a/crates/debugger/Cargo.toml b/crates/debugger/Cargo.tomlindex 26512da..0585362 100644--- a/crates/debugger/Cargo.toml+++ b/crates/debugger/Cargo.toml@@ -4,10 +4,10 @@ version = "0.1.0"edition = "2024"[features]-scripting-mut-traps = ["gekko/scripting-mut-traps", "scripting/scripting-mut-traps"]+scripting-mut-traps = ["gecko/scripting-mut-traps", "scripting/scripting-mut-traps"][dependencies]-gekko = { path = "../gekko", features = ["scripting"] }+gecko = { path = "../gecko", features = ["scripting"] }scripting = { path = "../scripting" }image = { path = "../image" }disasm = { path = "../disasm" }diff --git a/crates/debugger/src/main.rs b/crates/debugger/src/main.rsindex e4c2dc6..7a40777 100644--- a/crates/debugger/src/main.rs+++ b/crates/debugger/src/main.rs@@ -8,8 +8,8 @@ use winit::{window::{Window, WindowId},};-use gekko::flipper::si::pad::{self, PadStatus, STICK_CENTER};-use gekko::gekko::Gekko;+use gecko::flipper::si::pad::{self, PadStatus, STICK_CENTER};+use gecko::gamecube::GameCube;use image::Dol;use crate::debugger::DebuggerUi;@@ -20,7 +20,7 @@ mod render;mod windows;struct App {- emulator: Gekko,+ emulator: GameCube,ui: DebuggerUi,window: Option<Arc<Window>>,state: Option<RenderState>,@@ -31,7 +31,7 @@ impl ApplicationHandler for App {fn resumed(&mut self, event_loop: &ActiveEventLoop) {let window = Arc::new(event_loop- .create_window(Window::default_attributes().with_title("Gekko"))+ .create_window(Window::default_attributes().with_title("Gecko")).unwrap(),);@@ -99,11 +99,11 @@ fn main() {let mut emulator = if let Some(ipl) = ipl_path {let ipl_data = std::fs::read(ipl).expect("failed to read IPL");- Gekko::with_ipl(&ipl_data, idle_skip)+ GameCube::with_ipl(&ipl_data, idle_skip)} else if let Some(rom) = rom_path {let rom_data = std::fs::read(rom).expect("failed to read ROM");let dol = Dol::parse(rom_data);- Gekko::with_image(&dol, idle_skip)+ GameCube::with_image(&dol, idle_skip)} else {eprintln!("usage: {} <path/to/game.dol> | --ipl <path> | --rom <path> [--immediate] [--idle-skip]",diff --git a/crates/debugger/src/render.rs b/crates/debugger/src/render.rsindex 47c9da3..d512c79 100644--- a/crates/debugger/src/render.rs+++ b/crates/debugger/src/render.rs@@ -1,5 +1,5 @@use egui::ViewportId;-use gekko::gekko::Gekko;+use gecko::gamecube::GameCube;use std::sync::Arc;use winit::window::Window;@@ -26,7 +26,7 @@ pub struct RenderState {}impl RenderState {- pub fn new(window: Arc<Window>, emulator: &Gekko, present_mode: wgpu::PresentMode) -> Self {+ pub fn new(window: Arc<Window>, emulator: &GameCube, present_mode: wgpu::PresentMode) -> Self {let (w, h) = emulator.frame_size();let (w, h) = (w as u32, h as u32);@@ -173,7 +173,7 @@ impl RenderState {self.gx_renderer.resize(&self.device, width, height);}- pub fn render(&mut self, emulator: &mut Gekko, debugger_ui: &mut DebuggerUi, window: &Window) {+ pub fn render(&mut self, emulator: &mut GameCube, debugger_ui: &mut DebuggerUi, window: &Window) {if let Some(open) = debugger_ui.dvd_cover_open.take() {if open {emulator.open_cover();@@ -362,7 +362,7 @@ impl RenderState {}}- fn render_gx(&mut self, emulator: &mut Gekko, view: &wgpu::TextureView) {+ fn render_gx(&mut self, emulator: &mut GameCube, view: &wgpu::TextureView) {self.gx_renderer.render(&self.device,&self.queue,@@ -374,7 +374,7 @@ impl RenderState {);}- fn render_xfb(&mut self, emulator: &Gekko, view: &wgpu::TextureView) {+ fn render_xfb(&mut self, emulator: &GameCube, view: &wgpu::TextureView) {let pixels = emulator.render_xfb();let (w, h) = emulator.frame_size();let (w, h) = (w as u32, h as u32);diff --git a/crates/debugger/src/windows/cpu.rs b/crates/debugger/src/windows/cpu.rsindex abf5272..5336958 100644--- a/crates/debugger/src/windows/cpu.rs+++ b/crates/debugger/src/windows/cpu.rs@@ -1,6 +1,6 @@use egui::{Align, Color32, Context, Grid, RichText, ScrollArea};-use gekko::cpu::Cpu;-use gekko::mmio::Mmio;+use gecko::cpu::Cpu;+use gecko::mmio::Mmio;fn token_color(token: &disasm::tokenizer::AsmToken<'_>) -> Option<Color32> {use disasm::tokenizer::AsmToken;diff --git a/crates/debugger/src/windows/exi.rs b/crates/debugger/src/windows/exi.rsindex 68fe54b..bb6f24c 100644--- a/crates/debugger/src/windows/exi.rs+++ b/crates/debugger/src/windows/exi.rs@@ -1,6 +1,6 @@use egui::{Color32, Context, Grid, RichText};use egui_material_icons::icons;-use gekko::flipper::exi::ExternalInterface;+use gecko::flipper::exi::ExternalInterface;fn flag(ui: &mut egui::Ui, val: bool) {let (icon, color) = if val {@@ -54,7 +54,7 @@ struct ChannelInfo {}fn channel_info(exi: &ExternalInterface, ch: usize) -> ChannelInfo {- use gekko::flipper::exi::regs::TransferType;+ use gecko::flipper::exi::regs::TransferType;match ch {0 => ChannelInfo {name: "CH0",diff --git a/crates/debugger/src/windows/gx.rs b/crates/debugger/src/windows/gx.rsindex 9d7beb2..04694f4 100644--- a/crates/debugger/src/windows/gx.rs+++ b/crates/debugger/src/windows/gx.rs@@ -1,8 +1,8 @@use egui::{Context, Grid, RichText, ScrollArea};use egui_material_icons::icons;-use gekko::flipper::gx::GraphicsProcessor;-use gekko::flipper::gx::draw::TextureDescriptor;-use gekko::mmio::Mmio;+use gecko::flipper::gx::GraphicsProcessor;+use gecko::flipper::gx::draw::TextureDescriptor;+use gecko::mmio::Mmio;fn texture_preview(ui: &mut egui::Ui, tex: &TextureDescriptor, ram: &[u8]) {let rgba = backend_wgpu::texture::decode_to_rgba(ram, tex);diff --git a/crates/debugger/src/windows/irq.rs b/crates/debugger/src/windows/irq.rsindex ff07c5d..80571b6 100644--- a/crates/debugger/src/windows/irq.rs+++ b/crates/debugger/src/windows/irq.rs@@ -1,7 +1,7 @@use egui::{Align, Color32, Context, Grid, Layout, RichText};use egui_material_icons::icons;-use gekko::cpu::Cpu;-use gekko::flipper::pi::ProcessorInterface;+use gecko::cpu::Cpu;+use gecko::flipper::pi::ProcessorInterface;fn centered_icon(ui: &mut egui::Ui, icon: &str, color: Color32) {ui.with_layout(Layout::top_down(Align::Center), |ui| {diff --git a/crates/debugger/src/windows/mmio.rs b/crates/debugger/src/windows/mmio.rsindex 45bb575..387554c 100644--- a/crates/debugger/src/windows/mmio.rs+++ b/crates/debugger/src/windows/mmio.rs@@ -1,6 +1,6 @@use egui::{Context, Grid, ScrollArea};use egui_material_icons::icons;-use gekko::mmio::Mmio;+use gecko::mmio::Mmio;pub fn show_mmio(ctx: &Context, open: &mut bool, base: &mut u32, addr_input: &mut String, mmio: &Mmio) {egui::Window::new("Memory").open(open).show(ctx, |ui| {diff --git a/crates/disasm/build.rs b/crates/disasm/build.rsindex da97c7e..daae735 100644--- a/crates/disasm/build.rs+++ b/crates/disasm/build.rs@@ -6,17 +6,17 @@ fn main() {// Generate Gekko (PowerPC) decoderchipi::generate(- "../../rsrc/chipi-spec/gamecube/gekko.chipi",+ "../../submodules/chipi-spec/gamecube/gekko.chipi",out_dir.join("gekko.rs").to_str().unwrap(),).expect("failed to generate gekko decoder");- println!("cargo:rerun-if-changed=../../rsrc/chipi-spec/gamecube/gekko.chipi");+ println!("cargo:rerun-if-changed=../../submodules/chipi-spec/gamecube/gekko.chipi");// Generate DSP decoderchipi::generate(- "../../rsrc/chipi-spec/gamecube/dsp.chipi",+ "../../submodules/chipi-spec/gamecube/dsp.chipi",out_dir.join("dsp.rs").to_str().unwrap(),).expect("failed to generate dsp decoder");- println!("cargo:rerun-if-changed=../../rsrc/chipi-spec/gamecube/dsp.chipi");+ println!("cargo:rerun-if-changed=../../submodules/chipi-spec/gamecube/dsp.chipi");}diff --git a/crates/gekko/Cargo.toml b/crates/gecko/Cargo.tomlsimilarity index 95%rename from crates/gekko/Cargo.tomlrename to crates/gecko/Cargo.tomlindex 510bc09..ad09e48 100644--- a/crates/gekko/Cargo.toml+++ b/crates/gecko/Cargo.toml@@ -1,5 +1,5 @@[package]-name = "gekko"+name = "gecko"version = "0.1.0"edition = "2024"diff --git a/crates/gekko/build.rs b/crates/gecko/build.rssimilarity index 96%rename from crates/gekko/build.rsrename to crates/gecko/build.rsindex 90d8f14..6c3f370 100644--- a/crates/gekko/build.rs+++ b/crates/gecko/build.rs@@ -4,11 +4,11 @@ use std::path::PathBuf;fn main() {let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());- let spec = "../../rsrc/chipi-spec/gamecube/gekko.chipi";+ let spec = "../../submodules/chipi-spec/gamecube/gekko.chipi";let builder = chipi::LutBuilder::new(spec).handler_mod("crate::cpu::interpreter")- .ctx_type("crate::gekko::Gekko")+ .ctx_type("crate::gamecube::GameCube").instr_type("crate::cpu::semantics::Instruction").group("branch", ["bx", "bcx", "bclrx", "bcctrx"]).group(@@ -142,7 +142,7 @@ fn main() {// Always regenerate the LUT dispatch tablesbuilder.build_lut(out_dir.join("gekko_lut.rs").to_str().unwrap())- .expect("failed to generate Gekko LUT");+ .expect("failed to generate Gecko LUT");// Generate interpreter stubs oncelet stubs = manifest_dir.join("src/cpu/interpreter.rs");diff --git a/crates/gekko/src/cpu.rs b/crates/gecko/src/cpu.rssimilarity index 100%rename from crates/gekko/src/cpu.rsrename to crates/gecko/src/cpu.rsdiff --git a/crates/gekko/src/cpu/condition.rs b/crates/gecko/src/cpu/condition.rssimilarity index 100%rename from crates/gekko/src/cpu/condition.rsrename to crates/gecko/src/cpu/condition.rsdiff --git a/crates/gekko/src/cpu/interpreter.rs b/crates/gecko/src/cpu/interpreter.rssimilarity index 100%rename from crates/gekko/src/cpu/interpreter.rsrename to crates/gecko/src/cpu/interpreter.rsdiff --git a/crates/gekko/src/cpu/interpreter/alu.rs b/crates/gecko/src/cpu/interpreter/alu.rssimilarity index 97%rename from crates/gekko/src/cpu/interpreter/alu.rsrename to crates/gecko/src/cpu/interpreter/alu.rsindex cfff8a4..b03547b 100644--- a/crates/gekko/src/cpu/interpreter/alu.rs+++ b/crates/gecko/src/cpu/interpreter/alu.rs@@ -1,4 +1,4 @@-pub fn alu<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn alu<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_ADDX => {let res = ctx.cpu.read_gpr(instr.ra()).wrapping_add(ctx.cpu.read_gpr(instr.rb()));@@ -210,7 +210,7 @@ pub fn alu<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::sema}}-pub fn logical<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn logical<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let rs = ctx.cpu.read_gpr(instr.rs());let rb = ctx.cpu.read_gpr(instr.rb());diff --git a/crates/gekko/src/cpu/interpreter/branch.rs b/crates/gecko/src/cpu/interpreter/branch.rssimilarity index 94%rename from crates/gekko/src/cpu/interpreter/branch.rsrename to crates/gecko/src/cpu/interpreter/branch.rsindex e2a03c1..7b0ef76 100644--- a/crates/gekko/src/cpu/interpreter/branch.rs+++ b/crates/gecko/src/cpu/interpreter/branch.rs@@ -1,6 +1,6 @@use crate::cpu::condition::BranchControl;-pub fn branch<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn branch<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {// Read LR before potentially overwriting LR with CIA+4 (matters for blrl/bctrl)let old_lr = ctx.cpu.spr.lr;diff --git a/crates/gekko/src/cpu/interpreter/compare.rs b/crates/gecko/src/cpu/interpreter/compare.rssimilarity index 88%rename from crates/gekko/src/cpu/interpreter/compare.rsrename to crates/gecko/src/cpu/interpreter/compare.rsindex f5ddf5b..2d3e46e 100644--- a/crates/gekko/src/cpu/interpreter/compare.rs+++ b/crates/gecko/src/cpu/interpreter/compare.rs@@ -1,6 +1,6 @@use crate::cpu::condition::ConditionRegister;-pub fn compare<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn compare<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let field = match OP {crate::cpu::lut::OP_CMP => ConditionRegister::field_from_ord((ctx.cpu.read_gpr(instr.ra()) as i32).cmp(&(ctx.cpu.read_gpr(instr.rb()) as i32)),diff --git a/crates/gekko/src/cpu/interpreter/cr_ops.rs b/crates/gecko/src/cpu/interpreter/cr_ops.rssimilarity index 93%rename from crates/gekko/src/cpu/interpreter/cr_ops.rsrename to crates/gecko/src/cpu/interpreter/cr_ops.rsindex a65aec3..b8e5138 100644--- a/crates/gekko/src/cpu/interpreter/cr_ops.rs+++ b/crates/gecko/src/cpu/interpreter/cr_ops.rs@@ -1,4 +1,4 @@-pub fn cr_ops<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn cr_ops<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_MTCRF => {let crm = instr.crm();diff --git a/crates/gekko/src/cpu/interpreter/fp_ops.rs b/crates/gecko/src/cpu/interpreter/fp_ops.rssimilarity index 96%rename from crates/gekko/src/cpu/interpreter/fp_ops.rsrename to crates/gecko/src/cpu/interpreter/fp_ops.rsindex e9d1bda..3b76a06 100644--- a/crates/gekko/src/cpu/interpreter/fp_ops.rs+++ b/crates/gecko/src/cpu/interpreter/fp_ops.rs@@ -1,6 +1,6 @@use crate::cpu::condition::ConditionField;-pub fn fp_ops<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn fp_ops<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_MTFSFX => {let fm = instr.fm();@@ -186,7 +186,7 @@ pub fn fp_ops<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::s/// Write FP result to fD and optionally update CR1#[inline(always)]-fn fp_write(ctx: &mut crate::gekko::Gekko, instr: &crate::cpu::semantics::Instruction, val: f64) {+fn fp_write(ctx: &mut crate::gamecube::GameCube, instr: &crate::cpu::semantics::Instruction, val: f64) {ctx.cpu.write_fpr(instr.rd(), val);if instr.rc() {ctx.cpu.update_cr1();@@ -196,7 +196,7 @@ fn fp_write(ctx: &mut crate::gekko::Gekko, instr: &crate::cpu::semantics::Instru/// Write single-precision FP result to fD./// On Gekko, single-precision instructions duplicate the result into both ps0 and ps1.#[inline(always)]-fn fp_write_single(ctx: &mut crate::gekko::Gekko, instr: &crate::cpu::semantics::Instruction, val: f64) {+fn fp_write_single(ctx: &mut crate::gamecube::GameCube, instr: &crate::cpu::semantics::Instruction, val: f64) {ctx.cpu.write_fpr(instr.rd(), val);ctx.cpu.write_ps1(instr.rd(), val);if instr.rc() {diff --git a/crates/gekko/src/cpu/interpreter/ps_ops.rs b/crates/gecko/src/cpu/interpreter/ps_ops.rssimilarity index 97%rename from crates/gekko/src/cpu/interpreter/ps_ops.rsrename to crates/gecko/src/cpu/interpreter/ps_ops.rsindex e26d04e..cab0194 100644--- a/crates/gekko/src/cpu/interpreter/ps_ops.rs+++ b/crates/gecko/src/cpu/interpreter/ps_ops.rs@@ -1,6 +1,6 @@use crate::cpu::condition::ConditionField;-pub fn ps_ops<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn ps_ops<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_PS_ADD => {let ps0 = (ctx.cpu.read_fpr(instr.ra()) + ctx.cpu.read_fpr(instr.rb())) as f32 as f64;@@ -161,7 +161,7 @@ pub fn ps_ops<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::s}#[inline(always)]-fn ps_write(ctx: &mut crate::gekko::Gekko, instr: &crate::cpu::semantics::Instruction, ps0: f64, ps1: f64) {+fn ps_write(ctx: &mut crate::gamecube::GameCube, instr: &crate::cpu::semantics::Instruction, ps0: f64, ps1: f64) {ctx.cpu.write_fpr(instr.rd(), ps0);ctx.cpu.write_ps1(instr.rd(), ps1);if instr.rc() {diff --git a/crates/gekko/src/cpu/interpreter/psq.rs b/crates/gecko/src/cpu/interpreter/psq.rssimilarity index 90%rename from crates/gekko/src/cpu/interpreter/psq.rsrename to crates/gecko/src/cpu/interpreter/psq.rsindex 30400d1..78be071 100644--- a/crates/gekko/src/cpu/interpreter/psq.rs+++ b/crates/gecko/src/cpu/interpreter/psq.rs@@ -52,7 +52,7 @@ fn quant_element_size(qtype: u8) -> u32 {}}-fn dequantize(ctx: &mut crate::gekko::Gekko, addr: u32, ld_type: u8, ld_scale: u8) -> f64 {+fn dequantize(ctx: &mut crate::gamecube::GameCube, addr: u32, ld_type: u8, ld_scale: u8) -> f64 {let scale = DEQUANT_TABLE[ld_scale as usize];match ld_type {0 => ctx.read_f32(addr),@@ -64,7 +64,7 @@ fn dequantize(ctx: &mut crate::gekko::Gekko, addr: u32, ld_type: u8, ld_scale: u}}-fn quantize(ctx: &mut crate::gekko::Gekko, addr: u32, value: f64, st_type: u8, st_scale: u8) {+fn quantize(ctx: &mut crate::gamecube::GameCube, addr: u32, value: f64, st_type: u8, st_scale: u8) {let scale = QUANT_TABLE[st_scale as usize];match st_type {0 => ctx.write_f32(addr, value),@@ -88,7 +88,7 @@ fn quantize(ctx: &mut crate::gekko::Gekko, addr: u32, value: f64, st_type: u8, s}}-fn psq_load(ctx: &mut crate::gekko::Gekko, fd: u8, addr: u32, w: bool, gqr: u32) {+fn psq_load(ctx: &mut crate::gamecube::GameCube, fd: u8, addr: u32, w: bool, gqr: u32) {let ld_type = gqr_ld_type(gqr);let ld_scale = gqr_ld_scale(gqr);let ps0 = dequantize(ctx, addr, ld_type, ld_scale);@@ -102,7 +102,7 @@ fn psq_load(ctx: &mut crate::gekko::Gekko, fd: u8, addr: u32, w: bool, gqr: u32)ctx.cpu.write_ps1(fd, ps1);}-fn psq_store(ctx: &mut crate::gekko::Gekko, fs: u8, addr: u32, w: bool, gqr: u32) {+fn psq_store(ctx: &mut crate::gamecube::GameCube, fs: u8, addr: u32, w: bool, gqr: u32) {let st_type = gqr_st_type(gqr);let st_scale = gqr_st_scale(gqr);let ps0 = ctx.cpu.read_fpr(fs);@@ -114,7 +114,7 @@ fn psq_store(ctx: &mut crate::gekko::Gekko, fs: u8, addr: u32, w: bool, gqr: u32}}-pub fn store_load_psq<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn store_load_psq<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {use crate::cpu::lut::*;match OP {diff --git a/crates/gekko/src/cpu/interpreter/rotate.rs b/crates/gecko/src/cpu/interpreter/rotate.rssimilarity index 89%rename from crates/gekko/src/cpu/interpreter/rotate.rsrename to crates/gecko/src/cpu/interpreter/rotate.rsindex 4065de7..590e039 100644--- a/crates/gekko/src/cpu/interpreter/rotate.rs+++ b/crates/gecko/src/cpu/interpreter/rotate.rs@@ -5,7 +5,7 @@ fn mask(mb: u32, me: u32) -> u32 {if mb <= me { begin & !end } else { begin | !end }}-pub fn rotate<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn rotate<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let rs = ctx.cpu.read_gpr(instr.rs());let mb = instr.mb() as u32;let me = instr.me() as u32;diff --git a/crates/gekko/src/cpu/interpreter/store_load.rs b/crates/gecko/src/cpu/interpreter/store_load.rssimilarity index 96%rename from crates/gekko/src/cpu/interpreter/store_load.rsrename to crates/gecko/src/cpu/interpreter/store_load.rsindex 0411025..0d890a4 100644--- a/crates/gekko/src/cpu/interpreter/store_load.rs+++ b/crates/gecko/src/cpu/interpreter/store_load.rs@@ -1,6 +1,6 @@use crate::cpu::condition::ConditionField;-pub fn store_load<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn store_load<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_STW | crate::cpu::lut::OP_STWU => {let addr = ctx.cpu.read_gpr_or_zero(instr.ra()).wrapping_add_signed(instr.disp());@@ -149,7 +149,7 @@ pub fn store_load<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cp}}-pub fn lwarx(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn lwarx(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let addr = ctx.cpu.read_gpr_or_zero(instr.ra())@@ -159,7 +159,7 @@ pub fn lwarx(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instructx.cpu.reserve_addr = Some(addr);}-pub fn stwcx_dot(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn stwcx_dot(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let addr = ctx.cpu.read_gpr_or_zero(instr.ra())@@ -175,7 +175,7 @@ pub fn stwcx_dot(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::In}}-pub fn store_load_fp<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn store_load_fp<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_LFD | crate::cpu::lut::OP_LFDU => {let addr = ctx.cpu.read_gpr_or_zero(instr.ra()).wrapping_add_signed(instr.disp());diff --git a/crates/gekko/src/cpu/interpreter/stubs.rs b/crates/gecko/src/cpu/interpreter/stubs.rssimilarity index 88%rename from crates/gekko/src/cpu/interpreter/stubs.rsrename to crates/gecko/src/cpu/interpreter/stubs.rsindex 8128e8a..fd2134a 100644--- a/crates/gekko/src/cpu/interpreter/stubs.rs+++ b/crates/gecko/src/cpu/interpreter/stubs.rs@@ -3,7 +3,7 @@ macro_rules! stub {$(#[rustfmt::skip]pub fn $name(- _ctx: &mut crate::gekko::Gekko,+ _ctx: &mut crate::gamecube::GameCube,_instr: crate::cpu::semantics::Instruction,) {todo!(stringify!($name))diff --git a/crates/gekko/src/cpu/interpreter/system.rs b/crates/gecko/src/cpu/interpreter/system.rssimilarity index 77%rename from crates/gekko/src/cpu/interpreter/system.rsrename to crates/gecko/src/cpu/interpreter/system.rsindex 050a594..1fbab48 100644--- a/crates/gekko/src/cpu/interpreter/system.rs+++ b/crates/gecko/src/cpu/interpreter/system.rs@@ -1,6 +1,6 @@use crate::cpu::sr::Sr;-pub fn msr<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn msr<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_MTMSR => {ctx.cpu.msr = crate::cpu::msr::Msr::from(ctx.cpu.read_gpr(instr.rs()));@@ -18,7 +18,7 @@ pub fn msr<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::sema}}-pub fn spr<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn spr<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_MTSPR => {let spr_num = instr.spr_swapped();@@ -42,7 +42,7 @@ pub fn spr<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::sema}}-pub fn segment<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn segment<const OP: u32>(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {match OP {crate::cpu::lut::OP_MTSR => {ctx.cpu.sr[instr.sr() as usize] = Sr::from_raw(ctx.cpu.read_gpr(instr.rs()));@@ -54,7 +54,7 @@ pub fn segment<const OP: u32>(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::}}-pub fn mftb(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instruction) {+pub fn mftb(ctx: &mut crate::gamecube::GameCube, instr: crate::cpu::semantics::Instruction) {let tbr = instr.spr_swapped();let val = match tbr {268 => ctx.scheduler.timebase_lower(),@@ -64,8 +64,8 @@ pub fn mftb(ctx: &mut crate::gekko::Gekko, instr: crate::cpu::semantics::Instrucctx.cpu.write_gpr(instr.rd(), val);}-pub fn nop<const OP: u32>(_ctx: &mut crate::gekko::Gekko, _instr: crate::cpu::semantics::Instruction) {}+pub fn nop<const OP: u32>(_ctx: &mut crate::gamecube::GameCube, _instr: crate::cpu::semantics::Instruction) {}-pub fn sc(ctx: &mut crate::gekko::Gekko, _instr: crate::cpu::semantics::Instruction) {+pub fn sc(ctx: &mut crate::gamecube::GameCube, _instr: crate::cpu::semantics::Instruction) {ctx.cause_syscall_interrupt();}diff --git a/crates/gekko/src/cpu/irq.rs b/crates/gecko/src/cpu/irq.rssimilarity index 97%rename from crates/gekko/src/cpu/irq.rsrename to crates/gecko/src/cpu/irq.rsindex 15df39d..2ec3b63 100644--- a/crates/gekko/src/cpu/irq.rs+++ b/crates/gecko/src/cpu/irq.rs@@ -1,4 +1,4 @@-use crate::{cpu::spr::Srr0, gekko::Gekko, mmio::Mmio};+use crate::{cpu::spr::Srr0, gamecube::GameCube, mmio::Mmio};// Exception vectors#[rustfmt::skip] pub const IRQ_SYSTEM_RESET: u32 = Mmio::virt_to_phys(0x8000_0100);@@ -16,7 +16,7 @@ use crate::{cpu::spr::Srr0, gekko::Gekko, mmio::Mmio};#[rustfmt::skip] pub const IRQ_IABR: u32 = Mmio::virt_to_phys(0x8000_1300);#[rustfmt::skip] pub const IRQ_THERMAL: u32 = Mmio::virt_to_phys(0x8000_1400);-impl Gekko {+impl GameCube {pub fn cause_external_interrupt(&mut self) {let base: u32 = if self.cpu.msr.exception_prefix() {0xFFF0_0000diff --git a/crates/gekko/src/cpu/msr.rs b/crates/gecko/src/cpu/msr.rssimilarity index 100%rename from crates/gekko/src/cpu/msr.rsrename to crates/gecko/src/cpu/msr.rsdiff --git a/crates/gekko/src/cpu/semantics.rs b/crates/gecko/src/cpu/semantics.rssimilarity index 100%rename from crates/gekko/src/cpu/semantics.rsrename to crates/gecko/src/cpu/semantics.rsdiff --git a/crates/gekko/src/cpu/spr.rs b/crates/gecko/src/cpu/spr.rssimilarity index 100%rename from crates/gekko/src/cpu/spr.rsrename to crates/gecko/src/cpu/spr.rsdiff --git a/crates/gekko/src/cpu/sr.rs b/crates/gecko/src/cpu/sr.rssimilarity index 100%rename from crates/gekko/src/cpu/sr.rsrename to crates/gecko/src/cpu/sr.rsdiff --git a/crates/gekko/src/di.rs b/crates/gecko/src/di.rssimilarity index 98%rename from crates/gekko/src/di.rsrename to crates/gecko/src/di.rsindex e88ab19..9f3623d 100644--- a/crates/gekko/src/di.rs+++ b/crates/gecko/src/di.rs@@ -22,7 +22,6 @@ impl DvdInterface {|| (self.status.transfer_complete() && self.status.transfer_complete_mask())|| (self.cover.cover_interrupt() && self.cover.cover_interrupt_mask())}-}impl MmioRw for DvdInterface {@@ -32,7 +31,7 @@ impl MmioRw for DvdInterface {crate::impl_mmio_dispatch!(regs::DiStatusRegister, regs::DiCoverRegister,);}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_di_interrupts(&mut self) {if self.di.interrupt_active() {self.pi.assert_interrupt(crate::flipper::pi::InterruptFlag::Di);diff --git a/crates/gekko/src/di/regs.rs b/crates/gecko/src/di/regs.rssimilarity index 100%rename from crates/gekko/src/di/regs.rsrename to crates/gecko/src/di/regs.rsdiff --git a/crates/gekko/src/flipper.rs b/crates/gecko/src/flipper.rssimilarity index 100%rename from crates/gekko/src/flipper.rsrename to crates/gecko/src/flipper.rsdiff --git a/crates/gekko/src/flipper/ai.rs b/crates/gecko/src/flipper/ai.rssimilarity index 98%rename from crates/gekko/src/flipper/ai.rsrename to crates/gecko/src/flipper/ai.rsindex 30b05ae..7698f6e 100644--- a/crates/gekko/src/flipper/ai.rs+++ b/crates/gecko/src/flipper/ai.rs@@ -61,7 +61,6 @@ impl AudioInterface {self.control = self.control.with_interrupt(true);}}-}impl MmioRw for AudioInterface {@@ -76,7 +75,7 @@ impl MmioRw for AudioInterface {);}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_ai_interrupts(&mut self) {self.ai.check_sample_counter_interrupt(self.scheduler.cycles);if self.ai.interrupt_active() {diff --git a/crates/gekko/src/flipper/ai/regs.rs b/crates/gecko/src/flipper/ai/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/ai/regs.rsrename to crates/gecko/src/flipper/ai/regs.rsdiff --git a/crates/gekko/src/flipper/cp.rs b/crates/gecko/src/flipper/cp.rssimilarity index 98%rename from crates/gekko/src/flipper/cp.rsrename to crates/gecko/src/flipper/cp.rsindex 2e78a1b..c8c6077 100644--- a/crates/gekko/src/flipper/cp.rs+++ b/crates/gecko/src/flipper/cp.rs@@ -49,7 +49,6 @@ impl CommandProcessor {|| (self.status.fifo_overflow() && self.control.fifo_overflow_interrupt_enable())|| (self.status.fifo_underflow() && self.control.fifo_underflow_interrupt_enable())}-}impl MmioRw for CommandProcessor {@@ -77,7 +76,7 @@ impl MmioRw for CommandProcessor {);}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_cp_interrupts(&mut self) {if self.cp.interrupt_active() {self.pi.assert_interrupt(crate::flipper::pi::InterruptFlag::Cp);diff --git a/crates/gekko/src/flipper/cp/regs.rs b/crates/gecko/src/flipper/cp/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/cp/regs.rsrename to crates/gecko/src/flipper/cp/regs.rsdiff --git a/crates/gekko/src/flipper/dsp.rs b/crates/gecko/src/flipper/dsp.rssimilarity index 99%rename from crates/gekko/src/flipper/dsp.rsrename to crates/gecko/src/flipper/dsp.rsindex a04e7bc..faf876b 100644--- a/crates/gekko/src/flipper/dsp.rs+++ b/crates/gecko/src/flipper/dsp.rs@@ -123,7 +123,6 @@ impl Dsp {self.mailbox_to_cpu_lo = regs::MailboxToCpuLo::from_raw(0xFEED);}}-}impl MmioRw for Dsp {@@ -152,7 +151,7 @@ impl Dsp {}}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_dsp_interrupts(&mut self) {if self.dsp.interrupt_active() {self.pi.assert_interrupt(crate::flipper::pi::InterruptFlag::Dsp);diff --git a/crates/gekko/src/flipper/dsp/regs.rs b/crates/gecko/src/flipper/dsp/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/dsp/regs.rsrename to crates/gecko/src/flipper/dsp/regs.rsdiff --git a/crates/gekko/src/flipper/exi.rs b/crates/gecko/src/flipper/exi.rssimilarity index 99%rename from crates/gekko/src/flipper/exi.rsrename to crates/gecko/src/flipper/exi.rsindex 8a942e8..206fdab 100644--- a/crates/gekko/src/flipper/exi.rs+++ b/crates/gecko/src/flipper/exi.rs@@ -284,7 +284,6 @@ impl ExternalInterface {_ => unreachable!(),}}-}impl MmioRw for ExternalInterface {@@ -324,7 +323,7 @@ impl ExternalInterface {}}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_exi_interrupts(&mut self) {if self.exi.interrupt_active() {self.pi.assert_interrupt(crate::flipper::pi::InterruptFlag::Exi);diff --git a/crates/gekko/src/flipper/exi/device.rs b/crates/gecko/src/flipper/exi/device.rssimilarity index 100%rename from crates/gekko/src/flipper/exi/device.rsrename to crates/gecko/src/flipper/exi/device.rsdiff --git a/crates/gekko/src/flipper/exi/macronix.rs b/crates/gecko/src/flipper/exi/macronix.rssimilarity index 100%rename from crates/gekko/src/flipper/exi/macronix.rsrename to crates/gecko/src/flipper/exi/macronix.rsdiff --git a/crates/gekko/src/flipper/exi/regs.rs b/crates/gecko/src/flipper/exi/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/exi/regs.rsrename to crates/gecko/src/flipper/exi/regs.rsdiff --git a/crates/gekko/src/flipper/gx.rs b/crates/gecko/src/flipper/gx.rssimilarity index 99%rename from crates/gekko/src/flipper/gx.rsrename to crates/gecko/src/flipper/gx.rsindex 9dc9951..d0e94f0 100644--- a/crates/gekko/src/flipper/gx.rs+++ b/crates/gecko/src/flipper/gx.rs@@ -24,7 +24,7 @@ use crate::{VatB, VatC, VcdHi, VcdLo, ZMode,},},- gekko::Gekko,+ gamecube::GameCube,mmio::Mmio,};use fifo::FifoCmd;@@ -1268,7 +1268,7 @@ fn read_index(cur: &mut Cursor<&Vec<u8>>, attr: regs::AttributeType) -> usize {}}-impl Gekko {+impl GameCube {/// Check if the GX stub detected a finish command and signal PEpub fn check_gx_pe_finish(&mut self) {if self.gx.raise_interrupt {diff --git a/crates/gekko/src/flipper/gx/constants.rs b/crates/gecko/src/flipper/gx/constants.rssimilarity index 100%rename from crates/gekko/src/flipper/gx/constants.rsrename to crates/gecko/src/flipper/gx/constants.rsdiff --git a/crates/gekko/src/flipper/gx/draw.rs b/crates/gecko/src/flipper/gx/draw.rssimilarity index 100%rename from crates/gekko/src/flipper/gx/draw.rsrename to crates/gecko/src/flipper/gx/draw.rsdiff --git a/crates/gekko/src/flipper/gx/fifo.rs b/crates/gecko/src/flipper/gx/fifo.rssimilarity index 100%rename from crates/gekko/src/flipper/gx/fifo.rsrename to crates/gecko/src/flipper/gx/fifo.rsdiff --git a/crates/gekko/src/flipper/gx/math.rs b/crates/gecko/src/flipper/gx/math.rssimilarity index 100%rename from crates/gekko/src/flipper/gx/math.rsrename to crates/gecko/src/flipper/gx/math.rsdiff --git a/crates/gekko/src/flipper/gx/regs.rs b/crates/gecko/src/flipper/gx/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/gx/regs.rsrename to crates/gecko/src/flipper/gx/regs.rsdiff --git a/crates/gekko/src/flipper/mi.rs b/crates/gecko/src/flipper/mi.rssimilarity index 99%rename from crates/gekko/src/flipper/mi.rsrename to crates/gecko/src/flipper/mi.rsindex 5da7384..15fe153 100644--- a/crates/gekko/src/flipper/mi.rs+++ b/crates/gecko/src/flipper/mi.rs@@ -13,7 +13,6 @@ impl MemoryInterface {interrupt_mask: regs::MiInterruptMask::from_raw(0),}}-}impl MmioRw for MemoryInterface {diff --git a/crates/gekko/src/flipper/mi/regs.rs b/crates/gecko/src/flipper/mi/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/mi/regs.rsrename to crates/gecko/src/flipper/mi/regs.rsdiff --git a/crates/gekko/src/flipper/pe.rs b/crates/gecko/src/flipper/pe.rssimilarity index 98%rename from crates/gekko/src/flipper/pe.rsrename to crates/gecko/src/flipper/pe.rsindex 26069e4..f930ab4 100644--- a/crates/gekko/src/flipper/pe.rs+++ b/crates/gecko/src/flipper/pe.rs@@ -1,7 +1,7 @@pub mod regs;use crate::{flipper::pi::InterruptFlag,- gekko::Gekko,+ gamecube::GameCube,mmio::{constants::PE_BASE,traits::{MmioAccess, MmioRegister, MmioRw},@@ -47,7 +47,6 @@ impl PixelEngine {self.token = regs::Token::from_raw(token.into());self.sr = self.sr.with_pe_token(true);}-}impl MmioRw for PixelEngine {@@ -65,7 +64,7 @@ impl MmioRw for PixelEngine {);}-impl Gekko {+impl GameCube {pub fn check_pe_interrupts(&mut self) {if self.pe.token_interrupt_active() {self.pi.assert_interrupt(InterruptFlag::PeToken);diff --git a/crates/gekko/src/flipper/pe/regs.rs b/crates/gecko/src/flipper/pe/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/pe/regs.rsrename to crates/gecko/src/flipper/pe/regs.rsdiff --git a/crates/gekko/src/flipper/pi.rs b/crates/gecko/src/flipper/pi.rssimilarity index 99%rename from crates/gekko/src/flipper/pi.rsrename to crates/gecko/src/flipper/pi.rsindex 2eab309..6e61566 100644--- a/crates/gekko/src/flipper/pi.rs+++ b/crates/gecko/src/flipper/pi.rs@@ -72,7 +72,6 @@ impl ProcessorInterface {pub fn interrupt_pending(&self) -> bool {(self.intsr.raw() & self.intmr.raw()) != 0}-}impl MmioRw for ProcessorInterface {diff --git a/crates/gekko/src/flipper/pi/regs.rs b/crates/gecko/src/flipper/pi/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/pi/regs.rsrename to crates/gecko/src/flipper/pi/regs.rsdiff --git a/crates/gekko/src/flipper/si.rs b/crates/gecko/src/flipper/si.rssimilarity index 99%rename from crates/gekko/src/flipper/si.rsrename to crates/gecko/src/flipper/si.rsindex be5fffd..7900ae3 100644--- a/crates/gekko/src/flipper/si.rs+++ b/crates/gecko/src/flipper/si.rs@@ -313,7 +313,7 @@ impl SerialInterface {}}-impl crate::gekko::Gekko {+impl crate::gamecube::GameCube {pub fn check_si_interrupts(&mut self) {if self.si.interrupt_active() {self.pi.assert_interrupt(crate::flipper::pi::InterruptFlag::Si);diff --git a/crates/gekko/src/flipper/si/pad.rs b/crates/gecko/src/flipper/si/pad.rssimilarity index 100%rename from crates/gekko/src/flipper/si/pad.rsrename to crates/gecko/src/flipper/si/pad.rsdiff --git a/crates/gekko/src/flipper/si/regs.rs b/crates/gecko/src/flipper/si/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/si/regs.rsrename to crates/gecko/src/flipper/si/regs.rsdiff --git a/crates/gekko/src/flipper/vi.rs b/crates/gecko/src/flipper/vi.rssimilarity index 99%rename from crates/gekko/src/flipper/vi.rsrename to crates/gecko/src/flipper/vi.rsindex 71ba0c0..c610fa2 100644--- a/crates/gekko/src/flipper/vi.rs+++ b/crates/gecko/src/flipper/vi.rs@@ -2,7 +2,7 @@ pub mod regs;use crate::{flipper::pi::InterruptFlag,- gekko::Gekko,+ gamecube::GameCube,mmio::{constants::VI_BASE,traits::{MmioAccess, MmioRegister, MmioRw},@@ -243,7 +243,7 @@ impl MmioRw for VideoInterface {);}-impl Gekko {+impl GameCube {pub fn maybe_schedule_vi_half_line(&mut self) {if !self.vi.half_line_scheduled {let ticks_per_hl = self.vi.ticks_per_half_line();diff --git a/crates/gekko/src/flipper/vi/regs.rs b/crates/gecko/src/flipper/vi/regs.rssimilarity index 100%rename from crates/gekko/src/flipper/vi/regs.rsrename to crates/gecko/src/flipper/vi/regs.rsdiff --git a/crates/gekko/src/gekko.rs b/crates/gecko/src/gamecube.rssimilarity index 94%rename from crates/gekko/src/gekko.rsrename to crates/gecko/src/gamecube.rsindex 65fc63f..fd76903 100644--- a/crates/gekko/src/gekko.rs+++ b/crates/gecko/src/gamecube.rs@@ -21,7 +21,7 @@ use crate::{};use image::Executable;-pub struct Gekko {+pub struct GameCube {pub vsync_pending: bool,pub cpu: Cpu,pub scheduler: Scheduler,@@ -47,7 +47,7 @@ pub struct Gekko {pub script_hook_filters: ScriptHookFilters,}-impl Gekko {+impl GameCube {#[cfg(feature = "scripting")]#[inline(always)]pub(crate) fn apply_script_hook_state(&mut self, state: ScriptHookState) {@@ -70,7 +70,7 @@ impl Gekko {}pub fn new(entrypoint: u32, idle_skip: bool) -> Self {- Gekko {+ GameCube {vsync_pending: false,cpu: Cpu::new(entrypoint),scheduler: Scheduler::new(),@@ -98,7 +98,7 @@ impl Gekko {}pub fn with_image(exe: &impl Executable, idle_skip: bool) -> Self {- let mut gekko = Gekko::new(exe.entry_point(), idle_skip);+ let mut emulator = GameCube::new(exe.entry_point(), idle_skip);let data = exe.data();// Copy TEXT sections to memory@@ -106,7 +106,7 @@ impl Gekko {for i in 0..section.size {let addr = section.vaddr + i;let value = data[(section.offset + i) as usize];- gekko.mmio.virt_write_u8(addr, value);+ emulator.mmio.virt_write_u8(addr, value);}}@@ -115,7 +115,7 @@ impl Gekko {for i in 0..section.size {let addr = section.vaddr + i;let value = data[(section.offset + i) as usize];- gekko.mmio.virt_write_u8(addr, value);+ emulator.mmio.virt_write_u8(addr, value);}}@@ -123,10 +123,10 @@ impl Gekko {let (bss_start, bss_size) = exe.bss();for i in 0..bss_size {let addr = bss_start + i;- gekko.mmio.virt_write_u8(addr, 0);+ emulator.mmio.virt_write_u8(addr, 0);}- gekko+ emulator}pub fn with_ipl(ipl: &[u8], idle_skip: bool) -> Self {@@ -141,18 +141,18 @@ impl Gekko {// BSS: 0x00000000 - 0x00000000 (size: 0x00000000)// => BS2 DOL, does not apply to the actual IPL here!!- let mut gekko = Gekko::new(IPL_RESET_VECTOR, idle_skip);- gekko.cpu.msr.set_ip(true);- gekko.mmio.ipl = ipl.to_vec();- gekko.exi.attach_device(+ let mut emulator = GameCube::new(IPL_RESET_VECTOR, idle_skip);+ emulator.cpu.msr.set_ip(true);+ emulator.mmio.ipl = ipl.to_vec();+ emulator.exi.attach_device(ExiMacronix::CHANNEL,ExiMacronix::DEVICE,Box::new(ExiMacronix::new(ipl.to_vec())),);// TODO: this makes 0x8130107C (NTSC BS2) exit the DVD state machine// as it forces it to enter "state 19"- gekko.open_cover();- gekko+ emulator.open_cover();+ emulator}#[inline]diff --git a/crates/gekko/src/idle.rs b/crates/gecko/src/idle.rssimilarity index 100%rename from crates/gekko/src/idle.rsrename to crates/gecko/src/idle.rsdiff --git a/crates/gekko/src/lib.rs b/crates/gecko/src/lib.rssimilarity index 88%rename from crates/gekko/src/lib.rsrename to crates/gecko/src/lib.rsindex 02574d4..0f64a76 100644--- a/crates/gekko/src/lib.rs+++ b/crates/gecko/src/lib.rs@@ -1,7 +1,7 @@pub mod cpu;pub mod di;pub mod flipper;-pub mod gekko;+pub mod gamecube;pub mod idle;pub mod mmio;pub mod scheduler;diff --git a/crates/gekko/src/mmio.rs b/crates/gecko/src/mmio.rssimilarity index 100%rename from crates/gekko/src/mmio.rsrename to crates/gecko/src/mmio.rsdiff --git a/crates/gekko/src/mmio/bus.rs b/crates/gecko/src/mmio/bus.rssimilarity index 99%rename from crates/gekko/src/mmio/bus.rsrename to crates/gecko/src/mmio/bus.rsindex 2862d96..d31ea78 100644--- a/crates/gekko/src/mmio/bus.rs+++ b/crates/gecko/src/mmio/bus.rs@@ -1,15 +1,14 @@#[cfg(feature = "scripting")]use crate::scripting::HookFlags;use crate::{- gekko::Gekko,+ gamecube::GameCube,mmio::{- Mmio,+ Mmio, MmioRw,constants::{AI_BASE, AI_END, CP_BASE, CP_END, DI_BASE, DI_END, DSP_BASE, DSP_END, EXI_BASE, EXI_END, GX_FIFO_BASE,GX_FIFO_END, IPL_BASE, IPL_END, MI_BASE, MI_END, PE_BASE, PE_END, PI_BASE, PI_END, RAM_BASE, RAM_END,SI_BASE, SI_END, VI_BASE, VI_END,},- MmioRw,},};@@ -120,7 +119,7 @@ macro_rules! bus_write_hooks {}};}-impl Gekko {+impl GameCube {#[rustfmt::skip]#[inline(always)]pub fn read_u8(&mut self, addr: u32) -> u8 {diff --git a/crates/gekko/src/mmio/constants.rs b/crates/gecko/src/mmio/constants.rssimilarity index 100%rename from crates/gekko/src/mmio/constants.rsrename to crates/gecko/src/mmio/constants.rsdiff --git a/crates/gekko/src/mmio/fp.rs b/crates/gecko/src/mmio/fp.rssimilarity index 96%rename from crates/gekko/src/mmio/fp.rsrename to crates/gecko/src/mmio/fp.rsindex 7db2079..5cc9dd1 100644--- a/crates/gekko/src/mmio/fp.rs+++ b/crates/gecko/src/mmio/fp.rs@@ -1,9 +1,9 @@use crate::{- gekko::Gekko,+ gamecube::GameCube,mmio::{Mmio, constants::RAM_END},};-impl Gekko {+impl GameCube {// Load a 64-bit double from memory#[inline]pub fn read_f64(&mut self, addr: u32) -> f64 {diff --git a/crates/gekko/src/mmio/macros.rs b/crates/gecko/src/mmio/macros.rssimilarity index 100%rename from crates/gekko/src/mmio/macros.rsrename to crates/gecko/src/mmio/macros.rsdiff --git a/crates/gekko/src/mmio/tests.rs b/crates/gecko/src/mmio/tests.rssimilarity index 100%rename from crates/gekko/src/mmio/tests.rsrename to crates/gecko/src/mmio/tests.rsdiff --git a/crates/gekko/src/mmio/traits.rs b/crates/gecko/src/mmio/traits.rssimilarity index 100%rename from crates/gekko/src/mmio/traits.rsrename to crates/gecko/src/mmio/traits.rsdiff --git a/crates/gekko/src/scheduler.rs b/crates/gecko/src/scheduler.rssimilarity index 100%rename from crates/gekko/src/scheduler.rsrename to crates/gecko/src/scheduler.rsdiff --git a/crates/gekko/src/scripting.rs b/crates/gecko/src/scripting.rssimilarity index 84%rename from crates/gekko/src/scripting.rsrename to crates/gecko/src/scripting.rsindex 7a75371..dba8c8a 100644--- a/crates/gekko/src/scripting.rs+++ b/crates/gecko/src/scripting.rs@@ -1,4 +1,4 @@-use crate::gekko::Gekko;+use crate::gamecube::GameCube;#[derive(Clone, Copy, Default)]pub struct HookFlags(u16);@@ -109,20 +109,20 @@ pub trait ScriptHost {}/// Called before each CPU instruction executes.- fn on_cpu_pre(&mut self, emu: &mut Gekko);+ fn on_cpu_pre(&mut self, emu: &mut GameCube);/// Called after each CPU instruction executes.- fn on_cpu_post(&mut self, emu: &mut Gekko);+ fn on_cpu_post(&mut self, emu: &mut GameCube);/// Called before a bus read. Return Some(val) to override the read value.- fn on_bus_read_pre(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8) -> Option<u32>;+ fn on_bus_read_pre(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8) -> Option<u32>;/// Called after a bus read completes.- fn on_bus_read_post(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32);+ fn on_bus_read_post(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32);/// Called before a bus write. Returns the (possibly modified) value to write.- fn on_bus_write_pre(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32) -> u32;+ fn on_bus_write_pre(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32) -> u32;/// Called after a bus write completes.- fn on_bus_write_post(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32);+ fn on_bus_write_post(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32);}diff --git a/crates/scripting/Cargo.toml b/crates/scripting/Cargo.tomlindex 9f206e0..7b47d75 100644--- a/crates/scripting/Cargo.toml+++ b/crates/scripting/Cargo.toml@@ -4,9 +4,9 @@ version = "0.1.0"edition = "2024"[features]-scripting-mut-traps = ["gekko/scripting-mut-traps"]+scripting-mut-traps = ["gecko/scripting-mut-traps"][dependencies]-gekko = { path = "../gekko", features = ["scripting"] }+gecko = { path = "../gecko", features = ["scripting"] }mlua = { version = "0.10", features = ["lua54", "send"] }tracing = "0.1"diff --git a/crates/scripting/src/lib.rs b/crates/scripting/src/lib.rsindex 7c2c26a..6cca6a5 100644--- a/crates/scripting/src/lib.rs+++ b/crates/scripting/src/lib.rs@@ -5,8 +5,8 @@ use std::sync::{atomic::{AtomicBool, Ordering},};-use gekko::gekko::Gekko;-use gekko::scripting::{AddressFilter, BusAddressFilter, HookFlags, ScriptHookFilters, ScriptHookState, ScriptHost};+use gecko::gamecube::GameCube;+use gecko::scripting::{AddressFilter, BusAddressFilter, HookFlags, ScriptHookFilters, ScriptHookState, ScriptHost};use mlua::{Function, Lua, RegistryKey, Result as LuaResult, Table, UserDataMethods, Value};pub struct LuaScriptHost {@@ -207,7 +207,7 @@ impl LuaScriptHost {Ok(state)}- fn register_emu_methods(methods: &mut impl UserDataMethods<GekkoRef>) {+ fn register_emu_methods(methods: &mut impl UserDataMethods<GameCubeRef>) {methods.add_method("gpr", |_, this, i: u8| Ok(this.cpu.read_gpr(i)));methods.add_method_mut("set_gpr", |_, this, (i, val): (u8, u32)| {this.cpu.write_gpr(i, val);@@ -275,14 +275,14 @@ impl LuaScriptHost {Ok(())});methods.add_method("virt_to_phys", |_, _this, addr: u32| {- Ok(gekko::mmio::Mmio::virt_to_phys(addr))+ Ok(gecko::mmio::Mmio::virt_to_phys(addr))});}- fn call_cpu_hook(&self, hook_name: &str, callback: &LuaCallback, emu: &mut Gekko) -> LuaResult<()> {+ fn call_cpu_hook(&self, hook_name: &str, callback: &LuaCallback, emu: &mut GameCube) -> LuaResult<()> {self.lua.scope(|scope| {- let ud = scope.create_userdata(GekkoRef(emu as *mut Gekko))?;+ let ud = scope.create_userdata(GameCubeRef(emu as *mut GameCube))?;let func = callback.resolve(&self.lua)?;func.call::<()>(&ud)})@@ -293,14 +293,14 @@ impl LuaScriptHost {&self,hook_name: &str,callback: &LuaCallback,- emu: &mut Gekko,+ emu: &mut GameCube,virt_addr: u32,phys_addr: u32,size: u8,) -> LuaResult<Option<u32>> {self.lua.scope(|scope| {- let ud = scope.create_userdata(GekkoRef(emu as *mut Gekko))?;+ let ud = scope.create_userdata(GameCubeRef(emu as *mut GameCube))?;let func = callback.resolve(&self.lua)?;func.call::<Option<u32>>((&ud, virt_addr, phys_addr, size))})@@ -311,7 +311,7 @@ impl LuaScriptHost {&self,hook_name: &str,callback: &LuaCallback,- emu: &mut Gekko,+ emu: &mut GameCube,virt_addr: u32,phys_addr: u32,size: u8,@@ -319,7 +319,7 @@ impl LuaScriptHost {) -> LuaResult<()> {self.lua.scope(|scope| {- let ud = scope.create_userdata(GekkoRef(emu as *mut Gekko))?;+ let ud = scope.create_userdata(GameCubeRef(emu as *mut GameCube))?;let func = callback.resolve(&self.lua)?;func.call::<()>((&ud, virt_addr, phys_addr, size, value))})@@ -330,7 +330,7 @@ impl LuaScriptHost {&self,hook_name: &str,callback: &LuaCallback,- emu: &mut Gekko,+ emu: &mut GameCube,virt_addr: u32,phys_addr: u32,size: u8,@@ -338,7 +338,7 @@ impl LuaScriptHost {) -> LuaResult<Option<u32>> {self.lua.scope(|scope| {- let ud = scope.create_userdata(GekkoRef(emu as *mut Gekko))?;+ let ud = scope.create_userdata(GameCubeRef(emu as *mut GameCube))?;let func = callback.resolve(&self.lua)?;func.call::<Option<u32>>((&ud, virt_addr, phys_addr, size, value))})@@ -349,7 +349,7 @@ impl LuaScriptHost {&self,hook_name: &str,callback: &LuaCallback,- emu: &mut Gekko,+ emu: &mut GameCube,virt_addr: u32,phys_addr: u32,size: u8,@@ -357,7 +357,7 @@ impl LuaScriptHost {) -> LuaResult<()> {self.lua.scope(|scope| {- let ud = scope.create_userdata(GekkoRef(emu as *mut Gekko))?;+ let ud = scope.create_userdata(GameCubeRef(emu as *mut GameCube))?;let func = callback.resolve(&self.lua)?;func.call::<()>((&ud, virt_addr, phys_addr, size, value))})@@ -439,26 +439,26 @@ fn parse_address_key(value: Value, context: &str) -> LuaResult<u32> {}}-struct GekkoRef(*mut Gekko);+struct GameCubeRef(*mut GameCube);-unsafe impl Send for GekkoRef {}+unsafe impl Send for GameCubeRef {}-impl mlua::UserData for GekkoRef {+impl mlua::UserData for GameCubeRef {fn add_methods<M: UserDataMethods<Self>>(methods: &mut M) {LuaScriptHost::register_emu_methods(methods);}}-impl std::ops::Deref for GekkoRef {- type Target = Gekko;+impl std::ops::Deref for GameCubeRef {+ type Target = GameCube;- fn deref(&self) -> &Gekko {+ fn deref(&self) -> &GameCube {unsafe { &*self.0 }}}-impl std::ops::DerefMut for GekkoRef {- fn deref_mut(&mut self) -> &mut Gekko {+impl std::ops::DerefMut for GameCubeRef {+ fn deref_mut(&mut self) -> &mut GameCube {unsafe { &mut *self.0 }}}@@ -492,7 +492,7 @@ impl ScriptHost for LuaScriptHost {self.reload_dispatches().map(Some).map_err(|err| err.to_string())}- fn on_cpu_pre(&mut self, emu: &mut Gekko) {+ fn on_cpu_pre(&mut self, emu: &mut GameCube) {let pc = emu.cpu.pc;if let Some(callback) = self.cpu_pre.get(&pc) {if let Err(err) = self.call_cpu_hook("cpu_pre", callback, emu) {@@ -501,7 +501,7 @@ impl ScriptHost for LuaScriptHost {}}- fn on_cpu_post(&mut self, emu: &mut Gekko) {+ fn on_cpu_post(&mut self, emu: &mut GameCube) {let pc = emu.cpu.cia;if let Some(callback) = self.cpu_post.get(&pc) {if let Err(err) = self.call_cpu_hook("cpu_post", callback, emu) {@@ -510,7 +510,7 @@ impl ScriptHost for LuaScriptHost {}}- fn on_bus_read_pre(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8) -> Option<u32> {+ fn on_bus_read_pre(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8) -> Option<u32> {let callback = self.bus_read_pre.resolve(virt_addr, phys_addr)?;match self.call_bus_read_pre_hook("bus_read_pre", callback, emu, virt_addr, phys_addr, size) {Ok(value) => value,@@ -521,7 +521,7 @@ impl ScriptHost for LuaScriptHost {}}- fn on_bus_read_post(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32) {+ fn on_bus_read_post(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32) {if let Some(callback) = self.bus_read_post.resolve(virt_addr, phys_addr) {if let Err(err) =self.call_bus_read_post_hook("bus_read_post", callback, emu, virt_addr, phys_addr, size, value)@@ -531,7 +531,7 @@ impl ScriptHost for LuaScriptHost {}}- fn on_bus_write_pre(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32) -> u32 {+ fn on_bus_write_pre(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32) -> u32 {let Some(callback) = self.bus_write_pre.resolve(virt_addr, phys_addr) else {return value;};@@ -546,7 +546,7 @@ impl ScriptHost for LuaScriptHost {}}- fn on_bus_write_post(&mut self, emu: &mut Gekko, virt_addr: u32, phys_addr: u32, size: u8, value: u32) {+ fn on_bus_write_post(&mut self, emu: &mut GameCube, virt_addr: u32, phys_addr: u32, size: u8, value: u32) {if let Some(callback) = self.bus_write_post.resolve(virt_addr, phys_addr) {if let Err(err) =self.call_bus_write_post_hook("bus_write_post", callback, emu, virt_addr, phys_addr, size, value)diff --git a/crates/tinyapp/Cargo.toml b/crates/tinyapp/Cargo.tomlindex 102c7d0..015217f 100644--- a/crates/tinyapp/Cargo.toml+++ b/crates/tinyapp/Cargo.toml@@ -4,11 +4,11 @@ version = "0.1.0"edition = "2024"[features]-scripting = ["gekko/scripting", "dep:scripting"]-scripting-mut-traps = ["scripting", "gekko/scripting-mut-traps", "scripting/scripting-mut-traps"]+scripting = ["gecko/scripting", "dep:scripting"]+scripting-mut-traps = ["scripting", "gecko/scripting-mut-traps", "scripting/scripting-mut-traps"][dependencies]-gekko = { path = "../gekko" }+gecko = { path = "../gecko" }scripting = { path = "../scripting", optional = true }image = { path = "../image" }backend-wgpu = { path = "../backend-wgpu" }diff --git a/crates/tinyapp/src/main.rs b/crates/tinyapp/src/main.rsindex 847cca6..bd209ae 100644--- a/crates/tinyapp/src/main.rs+++ b/crates/tinyapp/src/main.rs@@ -1,8 +1,8 @@use egui::ViewportId;use egui_plot::{Line, Plot, PlotPoints};-use gekko::flipper::si::pad::{self, PadStatus, STICK_CENTER};-use gekko::flipper::vi::regs::RefreshRate;-use gekko::gekko::Gekko;+use gecko::flipper::si::pad::{self, PadStatus, STICK_CENTER};+use gecko::flipper::vi::regs::RefreshRate;+use gecko::gamecube::GameCube;use image::Dol;use std::collections::VecDeque;use std::env;@@ -40,7 +40,7 @@ struct State {}impl State {- fn new(window: Arc<Window>, emulator: &Gekko, present_mode: wgpu::PresentMode) -> Self {+ fn new(window: Arc<Window>, emulator: &GameCube, present_mode: wgpu::PresentMode) -> Self {let (w, h) = emulator.frame_size();let (w, h) = (w as u32, h as u32);@@ -185,7 +185,7 @@ impl State {self.gx_renderer.resize(&self.device, width, height);}- fn render(&mut self, emulator: &mut Gekko, window: &Window) {+ fn render(&mut self, emulator: &mut GameCube, window: &Window) {// update FPS historylet delta = self.last_frame.elapsed().as_secs_f64();self.last_frame = Instant::now();@@ -299,7 +299,7 @@ impl State {frame.present();}- fn render_gx(&mut self, emulator: &mut Gekko, view: &wgpu::TextureView) {+ fn render_gx(&mut self, emulator: &mut GameCube, view: &wgpu::TextureView) {self.gx_renderer.render(&self.device,&self.queue,@@ -312,7 +312,7 @@ impl State {emulator.gx.draw_commands.commands.clear();}- fn render_xfb(&mut self, emulator: &Gekko, view: &wgpu::TextureView) {+ fn render_xfb(&mut self, emulator: &GameCube, view: &wgpu::TextureView) {let pixels = emulator.render_xfb();let (w, h) = emulator.frame_size();let (w, h) = (w as u32, h as u32);@@ -424,7 +424,7 @@ fn create_xfb_texture(}struct App {- emulator: Gekko,+ emulator: GameCube,window: Option<Arc<Window>>,state: Option<State>,present_mode: wgpu::PresentMode,@@ -434,7 +434,7 @@ impl ApplicationHandler for App {fn resumed(&mut self, event_loop: &ActiveEventLoop) {let window = Arc::new(event_loop- .create_window(Window::default_attributes().with_title("Gekko"))+ .create_window(Window::default_attributes().with_title("Gecko")).unwrap(),);@@ -505,11 +505,11 @@ fn main() {let mut emulator = if let Some(ipl) = ipl_path {let ipl_data = std::fs::read(ipl).expect("failed to read IPL");- Gekko::with_ipl(&ipl_data, idle_skip)+ GameCube::with_ipl(&ipl_data, idle_skip)} else if let Some(rom) = rom_path {let rom_data = std::fs::read(rom).expect("failed to read ROM");let dol = Dol::parse(rom_data);- Gekko::with_image(&dol, idle_skip)+ GameCube::with_image(&dol, idle_skip)} else {eprintln!("usage: {} <path/to/game.dol> | --ipl <path> | --rom <path> [--immediate] [--idle-skip]",diff --git a/crates/tinyemu/Cargo.toml b/crates/tinyemu/Cargo.tomlindex 138eefc..6905d2b 100644--- a/crates/tinyemu/Cargo.toml+++ b/crates/tinyemu/Cargo.toml@@ -4,7 +4,7 @@ version = "0.1.0"edition = "2024"[dependencies]-gekko = { path = "../gekko" }+gecko = { path = "../gecko" }image = { path = "../image" }colored = "3.1.1"disasm = { path = "../disasm" }diff --git a/crates/tinyemu/src/dump.rs b/crates/tinyemu/src/dump.rsindex ffd9731..5239d81 100644--- a/crates/tinyemu/src/dump.rs+++ b/crates/tinyemu/src/dump.rs@@ -1,5 +1,5 @@use colored::Colorize;-use gekko::flipper::exi::regs::TransferType;+use gecko::flipper::exi::regs::TransferType;use crate::snaptshot::CpuSnapshot;@@ -45,7 +45,7 @@ pub fn registers(curr: &CpuSnapshot, prev: &CpuSnapshot) {];let fmt_cr_field =- |label: &str, val: gekko::cpu::condition::ConditionField, prev_val: gekko::cpu::condition::ConditionField| {+ |label: &str, val: gecko::cpu::condition::ConditionField, prev_val: gecko::cpu::condition::ConditionField| {let flags = format!("{}{}{}{}",if val.lt() { "L" } else { "·" },@@ -70,7 +70,7 @@ pub fn registers(curr: &CpuSnapshot, prev: &CpuSnapshot) {println!();}-pub fn memory(mmio: &gekko::mmio::Mmio, addr: u32) {+pub fn memory(mmio: &gecko::mmio::Mmio, addr: u32) {let aligned_addr = addr & !0xF;let start = aligned_addr.wrapping_sub(0x40);let data = mmio.virt_slice(start, 0x80);@@ -90,7 +90,7 @@ pub fn memory(mmio: &gekko::mmio::Mmio, addr: u32) {}}-pub fn vi(vi: &gekko::flipper::vi::VideoInterface) {+pub fn vi(vi: &gecko::flipper::vi::VideoInterface) {println!("Display Configuration: {:?}", vi.dcr);println!("Bottom Field Base: {:08X?}", vi.bfbl);println!("Top Field Base: {:08X?}", vi.tfbl);@@ -192,7 +192,7 @@ fn exi_channel(ch: &ExiChannelView) {println!(" Immediate Data: 0x{:08X}", ch.immediate_data);}-pub fn exi(exi: &gekko::flipper::exi::ExternalInterface) {+pub fn exi(exi: &gecko::flipper::exi::ExternalInterface) {println!("EXI:");exi_channel(&ExiChannelView {name: "Channel 0",diff --git a/crates/tinyemu/src/main.rs b/crates/tinyemu/src/main.rsindex e7a10e7..797058c 100644--- a/crates/tinyemu/src/main.rs+++ b/crates/tinyemu/src/main.rs@@ -9,7 +9,7 @@ use disasm::gekko::GekkoInstruction;use snaptshot::CpuSnapshot;#[derive(Parser)]-#[command(about = "Gekko CPU emulator / debugger")]+#[command(about = "GameCube emulator")]struct Args {/// Path to the ROM/DOL file#[arg(long)]@@ -60,13 +60,13 @@ fn main() {).init();- let mut gekko = if let Some(rom_path) = &args.rom {+ let mut emulator = if let Some(rom_path) = &args.rom {let rom_data = std::fs::read(rom_path).expect("failed to read ROM");let dol = image::Dol::parse(rom_data);- gekko::gekko::Gekko::with_image(&dol, args.idle_skip)+ gecko::gamecube::GameCube::with_image(&dol, args.idle_skip)} else if let Some(ipl_path) = &args.ipl {let ipl_data = std::fs::read(ipl_path).expect("failed to read IPL");- gekko::gekko::Gekko::with_ipl(&ipl_data, args.idle_skip)+ gecko::gamecube::GameCube::with_ipl(&ipl_data, args.idle_skip)} else {panic!("Either --rom or --ipl must be provided");};@@ -76,29 +76,29 @@ fn main() {image::elf::parse_elf_symbols(&elf_data).expect("failed to parse ELF symbols")});- run_emulator(&mut gekko, &args, symbols.as_ref());+ run_emulator(&mut emulator, &args, symbols.as_ref());if !args.quiet {- dump::vi(&gekko.vi);- dump::exi(&gekko.exi);+ dump::vi(&emulator.vi);+ dump::exi(&emulator.exi);println!("Render current XFB:");}- let pixels = gekko.render_xfb();- let video_format = gekko.vi.dcr.video_format();+ let pixels = emulator.render_xfb();+ let video_format = emulator.vi.dcr.video_format();kitty::render_xfb(&pixels, video_format.columns(), video_format.lines());}-fn run_emulator(gekko: &mut gekko::gekko::Gekko, args: &Args, symbols: Option<&image::symbols::SymbolTable>) {- let mut prev_snapshot = CpuSnapshot::from_cpu(&gekko.cpu);- let mut prev_pc = gekko.cpu.pc;+fn run_emulator(emulator: &mut gecko::gamecube::GameCube, args: &Args, symbols: Option<&image::symbols::SymbolTable>) {+ let mut prev_snapshot = CpuSnapshot::from_cpu(&emulator.cpu);+ let mut prev_pc = emulator.cpu.pc;let mut in_busyloop = false;let mut current_func: Option<String> = None;loop {if !in_busyloop && !args.quiet {if let Some(symbols) = symbols {- if let Some(sym) = symbols.lookup_exact(gekko.cpu.pc) {+ if let Some(sym) = symbols.lookup_exact(emulator.cpu.pc) {if sym.kind == image::symbols::SymbolKind::Func {let name = &sym.name;let changed = current_func.as_ref() != Some(name);@@ -109,13 +109,13 @@ fn run_emulator(gekko: &mut gekko::gekko::Gekko, args: &Args, symbols: Option<&i}}}- print_instruction(gekko, &prev_snapshot, args.debug);+ print_instruction(emulator, &prev_snapshot, args.debug);}- gekko.step();+ emulator.step();- let curr_snapshot = CpuSnapshot::from_cpu(&gekko.cpu);- let curr_pc = gekko.cpu.pc;+ let curr_snapshot = CpuSnapshot::from_cpu(&emulator.cpu);+ let curr_pc = emulator.cpu.pc;if curr_pc == prev_pc {if !in_busyloop && !args.quiet {@@ -139,15 +139,15 @@ fn run_emulator(gekko: &mut gekko::gekko::Gekko, args: &Args, symbols: Option<&i}}-fn print_instruction(gekko: &gekko::gekko::Gekko, prev_snapshot: &CpuSnapshot, debug: bool) {- let instr = GekkoInstruction::decode(gekko.mmio.virt_slice(gekko.cpu.pc, 4))+fn print_instruction(emulator: &gecko::gamecube::GameCube, prev_snapshot: &CpuSnapshot, debug: bool) {+ let instr = GekkoInstruction::decode(emulator.mmio.virt_slice(emulator.cpu.pc, 4)).unwrap_or_else(|| {dump::registers(prev_snapshot, prev_snapshot);- dump::memory(&gekko.mmio, gekko.cpu.read_gpr(1));+ dump::memory(&emulator.mmio, emulator.cpu.read_gpr(1));panic!("Failed to decode instruction at {:08X} => {:08X}",- gekko.cpu.pc,- gekko.mmio.virt_read_u32(gekko.cpu.pc)+ emulator.cpu.pc,+ emulator.mmio.virt_read_u32(emulator.cpu.pc));}).0;@@ -161,7 +161,7 @@ fn print_instruction(gekko: &gekko::gekko::Gekko, prev_snapshot: &CpuSnapshot, dlet comment = fmt::reg_comment(&prev_snapshot.gprs, &refs, &prev_snapshot.fprs, &fpr_refs);let prefix = format!("{}: {}",- format!("{:08X}", gekko.cpu.pc).bold(),+ format!("{:08X}", emulator.cpu.pc).bold(),fmt::colorize_instr(&instr));diff --git a/crates/tinyemu/src/snaptshot.rs b/crates/tinyemu/src/snaptshot.rsindex cb841ad..288d44d 100644--- a/crates/tinyemu/src/snaptshot.rs+++ b/crates/tinyemu/src/snaptshot.rs@@ -1,4 +1,4 @@-use gekko::cpu::condition::ConditionRegister;+use gecko::cpu::condition::ConditionRegister;#[derive(Clone, Copy)]pub struct CpuSnapshot {@@ -10,7 +10,7 @@ pub struct CpuSnapshot {}impl CpuSnapshot {- pub fn from_cpu(cpu: &gekko::cpu::Cpu) -> Self {+ pub fn from_cpu(cpu: &gecko::cpu::Cpu) -> Self {Self {gprs: cpu.gprs,fprs: cpu.fprs,diff --git a/rsrc/roms/panda.dol b/roms/panda.dolsimilarity index 100%rename from rsrc/roms/panda.dolrename to roms/panda.doldiff --git a/rsrc/roms/panda.dol.i64 b/roms/panda.dol.i64similarity index 100%rename from rsrc/roms/panda.dol.i64rename to roms/panda.dol.i64diff --git a/rsrc/chipi-spec b/submodules/chipi-specsimilarity index 100%rename from rsrc/chipi-specrename to submodules/chipi-spec