diff --git a/bsnes/Database/Cheat Codes.bml b/bsnes/Database/Cheat Codes.bml new file mode 100644 index 00000000..0e17e767 --- /dev/null +++ b/bsnes/Database/Cheat Codes.bml @@ -0,0 +1,87497 @@ +database revision=2015-09-28 + +cartridge sha256:8e844d77da01f86ace52823f1f974c9230f09e6a6cbf33a07abfe9beeff00292 + name:10-Yard Fight (USA, Europe) + cheat + description:Your team runs faster + code:a18d/05/0a + +cartridge sha256:e868400409c70876b98dad2cca87b8e9ee31877b0cccbbd8405be5c54922722a + name:1942 (Japan, USA) + cheat + description:Don't die when touched + code:f828/b9 + cheat + description:Most enemies die instantly + code:dc02/ff/01 + cheat + description:Infinite lives - 1P game + code:b824/ce/ad + cheat + description:Infinite rolls + code:d309/ce/ad + cheat + description:Hit anywhere + code:b44e/b0/30+b4b5/9d/ad+b404/9d/ad+b44b/20/ad + cheat + description:Rapid fire + code:d2bc/10/00 + cheat + description:After continue P1 has 6 lives - 2P game + code:b84b/02/05 + cheat + description:After continue P1 has 9 lives - 2P game + code:b84b/02/08 + cheat + description:P2 has 6 lives - 2P game + code:b859/02/05 + cheat + description:P2 has 9 lives - 2P game + code:b859/02/08 + cheat + description:Start with 9 rolls - both players + code:d851/03/09 + cheat + description:Start with 6 lives - 1P game + code:b7de/02/05 + cheat + description:Start with 9 lives - 1P game + code:b7de/02/08 + cheat + description:Invincibility + code:048e/88 + cheat + description:Infinite rolls (alt) + code:0436/03 + cheat + description:Infinite lives + code:0432/02 + +cartridge sha256:9f54aafa367247b99c344ba9a0c58ad8fa8aceeeae1c304b8fefc9985c3c118c + name:1943 - The Battle of Midway (USA) + cheat + description:Infinite energy + code:b2f0/04/b1 + cheat + description:Infinite energy (alt) + code:b2e2/8d/ad+b29b/ce/ee + cheat + description:Infinite power-ups + code:a7ec/bd + cheat + description:Infinite weapon upgrade time + code:b31a/ce/cd + cheat + description:Don't instantly die from touching boss planes + code:dbc0/04/d7 + cheat + description:Always shoot power shots + code:9b82/00/0b + cheat + description:Hit anywhere + code:dbfc/10/00+dc08/b0/24+c859/99/bd+db97/99/ad+c8a6/99/ad+ea45/99/ad+ce65/99/ad + cheat + description:10 power points + code:f3db/03/0a + cheat + description:20 power points + code:f3db/03/14 + cheat + description:30 power points + code:f3db/03/1e + cheat + description:Start on mission 5 + code:f3e2/00/08 + cheat + description:Start on mission 10 + code:f3e2/00/12 + cheat + description:Start on mission 15 + code:f3e2/00/1c + cheat + description:Start on mission 20 + code:f3e2/00/26 + cheat + description:Invincibility + code:040e/60 + cheat + description:Infinite power points + code:0347/01 + cheat + description:Infinite energy (alt 2) + code:0410/09 + +cartridge sha256:cd8d9859f334901aca717e08be03dab077766927c87a2becda22982b9234d532 + name:1945 [p1] + cheat + description:Invincibility + code:9298/20/ad+94e9/20/ad + cheat + description:Infinite Bombs + code:83b7/20/ad + +cartridge sha256:c457644ccfb93f8978326e728931800283821e531edc409fca9c0167495319c4 + name:3-D WorldRunner (USA) + cheat + description:Invincibility + code:a41d/60 + cheat + description:Infinite lives + code:96bb/01/00 + cheat + description:Infinite time + code:94b2/c6/a5 + cheat + description:Slow down timer + code:94af/c0/ff + cheat + description:Speed up timer + code:94af/c0/60 + cheat + description:Start with and keep laser missiles + code:9dbe/04/00 + cheat + description:Autofire + code:9dbf/a5/a9 + cheat + description:Start with 1 life + code:96b1/03/01+966b/33/31 + cheat + description:Start with 6 lives + code:96b1/03/06+966b/33/36 + cheat + description:Start with 9 lives + code:96b1/03/09+966b/33/39 + cheat + description:Start on world 2 + code:8903/a9/a2+8904/00/01+8905/85/86 + cheat + description:Start on world 3 + code:8903/a9/a2+8904/00/02+8905/85/86 + cheat + description:Start on world 4 + code:8903/a9/a2+8904/00/03+8905/85/86 + cheat + description:Start on world 5 + code:8903/a9/a2+8904/00/04+8905/85/86 + cheat + description:Start on world 6 + code:8903/a9/a2+8904/00/05+8905/85/86 + cheat + description:Start on world 7 + code:8903/a9/a2+8904/00/06+8905/85/86 + cheat + description:No enemies or pitfalls + code:003a/05 + +cartridge sha256:df696ce2af90b18ca2b57468bdc525afce371bb1868152eb2cbbe1d62252f617 + name:720 Degrees (USA) + cheat + description:Infinite continues + code:f530/ce/ad + cheat + description:9 continues + code:c2ab/03/09 + cheat + description:6 continues + code:c2ab/03/06 + cheat + description:No continues instead of 2 + code:c2ab/03/01 + cheat + description:Start with all equipment + code:c2cf/00/04 + cheat + description:Start with half equipment + code:c2cf/00/02 + cheat + description:Start on level 2 + code:c2a4/ad/ea+c2a5/0e/a9+c2a6/02/02 + cheat + description:Start on level 3 + code:c2a4/ad/ea+c2a5/0e/a9+c2a6/02/03 + cheat + description:Start on level 4 + code:c2a4/ad/ea+c2a5/0e/a9+c2a6/02/04 + cheat + description:Infinite time + code:0572/19 + cheat + description:Infinite time (one's digit) in half-pipe + code:0573/09 + cheat + description:Infinite time (ten's digit) in half-pipe + code:0574/09 + +cartridge sha256:3493f7621d964af7a56c407718ef1d056c6c46d4e4c6b3c48364d58a1b97a06a + name:8 Eyes (USA) + cheat + description:Invincibility - Orin + code:bb3d/f0/d0 + cheat + description:Invincibility - Cutrus + code:c976/f0/d0 + cheat + description:Infinite health - Orin + code:bb9d/8d/ad + cheat + description:Infinite health - Cutrus + code:c9f7/8d/ad + cheat + description:Most attacks won't damage Orin + code:bb9d/8d/2c + cheat + description:Most attacks won't damage Cutrus + code:c9f7/8d/2c + cheat + description:Start with more health - Orin + code:a26c/2f/40 + cheat + description:Start with more health - Cutrus + code:a26d/2f/40 + cheat + description:Infinite ammo + code:bed4/8d/ad + cheat + description:Start with all weapons + code:ee1b/86/85 + cheat + description:Start with max ammo + code:a26e/2f/4f + cheat + description:Start with some item power + code:a26e/00/2f + cheat + description:Never lose item power once gained + code:bed4/8d/2c + cheat + description:Start with Dagger + code:ee1f/86/e6 + cheat + description:Invincibility - Orin (blinking) + code:030e/10 + cheat + description:Invincibility - Cutrus (blinking) + code:032e/10 + cheat + description:Infinite health - Orin (alt) + code:0594/4f + cheat + description:Infinite health - Cutrus (alt) + code:0595/4f + cheat + description:Infinite item power + code:0596/4f + cheat + description:Bosses have no invulnerability time + code:034e/00 + cheat + description:Bosses defeated instantly + code:034f/00 + cheat + description:Doors never close once opened + code:009d/fa + cheat + description:Have Boomerang + code:007f/02 + cheat + description:Have Ice Ball + code:007f/04 + cheat + description:Have Power Ball + code:007f/08 + cheat + description:Have Dagger, Boomerang, Molotov Cocktail, Hand Gun + code:007f/33 + +cartridge sha256:c4d4ff0bd283656c63d9a30dfc7dc6d2956744730a3641ba2c8f9f8e7204d9a1 + name:Abadox - The Deadly Inner War (USA) + cheat + description:Invincibility + code:dd08/f0/d0+de0c/d0/f0 + cheat + description:Invincible against touching enemies + code:efe2/a5/60 + cheat + description:Invincible against walls (does not stop music) + code:d5ab/c0/00 + cheat + description:Infinite lives (lives never decrease) + code:c7d1/09 + cheat + description:Infinite lives (lives increase when you die) + code:c7d0/e6 + cheat + description:Hit anywhere + code:f1d5/90/d0+f1fa/d0/b0+f1b1/90/b0+f210/30/24 + cheat + description:Invincibility (music stops if you touch a wall) + code:0086/00+008a/00 + cheat + description:One hit kills - bosses + code:03de/00 + cheat + description:Weapon shoots clones + code:008c/ff + cheat + description:Speed up level 1 + code:008b/01 + cheat + description:Speed up level 2 + code:008b/02 + cheat + description:Speed up level 3 + code:008b/03 + cheat + description:Start at level 2 + code:cc74/01/02 + cheat + description:Start at level 3 + code:cc74/01/03 + cheat + description:Start at level 4 + code:cc74/01/05 + cheat + description:Start at level 6 + code:cc74/01/06 + +cartridge sha256:6da6c8ac123df0f51e6f1b2ba79cb067d3352262532604ab08cf5dd587e84006 + name:Action in New York (Europe) + cheat + description:Invincibility + code:dcde/60 + cheat + description:One hit kills + code:ed4e/f0/d0 + cheat + description:No enemies + code:d5b2/50/24 + +cartridge sha256:005c48a5984e3b75e069ef78d736266b12f7f6b102d88d90172ba9ae480b378b + name:Addams Family, The (USA) + cheat + description:Invincibility + code:8496/ad + cheat + description:Infinite life + code:c5ca/ce/2c + cheat + description:Infinite lives + code:e3d8/ce/2c + cheat + description:Infinite Things + code:e68b/ce/2c + cheat + description:No Piranah Plant enemies + code:ac01/90/b0 + cheat + description:Get items from anywhere - from above + code:a684/90/24 + cheat + description:Get items from anywhere - from the right + code:a695/90/24 + cheat + description:Get items from anywhere - from the left + code:a69f/90/24 + cheat + description:Get items from anywhere - from below + code:a68b/b0/24 + cheat + description:Walk through walls + code:877c/d0/50+8787/d0/50 + cheat + description:Start with 1 life - 1st game only + code:c0e4/03/01 + cheat + description:Start with 6 lives - 1st game only + code:c0e4/03/06 + cheat + description:Start with 9 lives - 1st game only + code:c0e4/03/09 + cheat + description:Start in the tree + code:c0c6/00/01 + cheat + description:Start in the crypt + code:c0c6/00/02 + cheat + description:Start in the hallway + code:c0c6/00/03 + cheat + description:Start in Fester's room + code:c0c6/00/08 + cheat + description:Start in Pugsly's room + code:c0c6/00/09 + cheat + description:Start in the toy room + code:c0c6/00/0a + cheat + description:Start in Wednesday's room + code:c0c6/00/0b + cheat + description:Start in the attic + code:c0c6/00/0c + cheat + description:Start in a secret room + code:c0c6/00/0f + cheat + description:Start in a secret room + code:c0c6/00/10 + cheat + description:Start in a secret room + code:c0c6/00/11 + cheat + description:Start in the bone room + code:c0c6/00/1d + cheat + description:Start in the freezer + code:c0c6/00/21 + cheat + description:Start in the furnace + code:c0c6/00/22 + cheat + description:Start in Gomez's room + code:c0c6/00/20 + +cartridge sha256:b3e09c94e33e0293672c1405c60fc69b2ab1564c8a4ee988e3ab6ada51484eea + name:Addams Family, The - Pugsley's Scavenger Hunt (USA) + cheat + description:Invincibility + code:c448/60 + cheat + description:Invincibility status effect + code:e9b4/f0/24 + cheat + description:Infinite health + code:c448/ad + cheat + description:Infinite health (alt) + code:c447/01/00 + cheat + description:Infinite lives + code:c4b2/ce/ad + cheat + description:Infinite lives (alt) + code:c4b2/bd + cheat + description:Always able to fly + code:ec5b/35/00 + cheat + description:Always able to fly (alt) + code:e799/f0/24 + cheat + description:No enemies + code:9d49/30/10 + cheat + description:Enemies can't move horizontally + code:9cef/f0/d0 + cheat + description:Enemies can't move vertically + code:9d08/f0/d0 + cheat + description:Mega-jump + code:eee0/10/18 + cheat + description:Sweets count as extra lives + code:c40f/f0/d0 + cheat + description:Start with 1 life + code:c6ea/05/01 + cheat + description:Start with 9 lives + code:c6ea/05/09 + cheat + description:Start with 1 heart + code:c6fa/02/01 + cheat + description:Start with 4 hearts + code:c6fa/02/04 + cheat + description:Infinite health (alt 2) + code:0435/02 + cheat + description:Infinite lives (alt 2) + code:0438/09 + +cartridge sha256:22e92af92aed2d8d7bddb60732963642788b3ea9341592ce2c66a542a3d7ce7d + name:Advanced Dungeons & Dragons - DragonStrike (USA) + cheat + description:Invincibility + code:cf47/60 + cheat + description:Infinite health + code:cf47/ad + cheat + description:Infinite health (alt) + code:cf45/e5/e9 + cheat + description:Weapon power doesn't weaken with health + code:cf4f/8d/2c + cheat + description:Gold dragon has excellent armor class + code:c025/63/66 + cheat + description:Gold dragon flies faster + code:c028/41/47 + cheat + description:Silver dragon flies faster + code:c027/64/68 + cheat + description:Bronze dragon flies faster + code:c026/53/57 + cheat + description:Start wtih less health - bronze dragon + code:a044/28/14 + cheat + description:Start wtih more health - bronze dragon + code:a044/28/50 + cheat + description:Start wtih less health - silver dragon + code:a045/3c/1e + cheat + description:Start wtih more health - silver dragon + code:a045/3c/50 + cheat + description:Start wtih less health - gold dragon + code:a046/50/2a + cheat + description:Start wtih more health - gold dragon + code:a046/50/65 + +cartridge sha256:df2609c80e818bb95983b30a3ac1435ea2332ac83e29fde469f397e1d5a2db93 + name:Advanced Dungeons & Dragons - Heroes of the Lance (USA) + cheat + description:Infinite HP for party in most battles + code:8492/95/b5 + +cartridge sha256:60061c0042741f7c1e53ad8f738c27ffd9057310ff5d556662b3667e5700e751 + name:Advanced Dungeons & Dragons - Hillsfar (USA) + cheat + description:Infinite Knock Rings + code:b5ce/ce/ad+b5cd/58/00 + cheat + description:Faster timer when lock-picking + code:b3b5/20/10 + cheat + description:Slower timer when lock-picking + code:b3b5/20/50 + cheat + description:Very slow timer when lock-picking + code:b3b5/20/f0 + cheat + description:Start with 50% less gold on a character that you create + code:8ce7/0a/05 + cheat + description:Start with 50% more gold on a character that you create + code:8ce7/0a/0f + cheat + description:Start with 100% more gold on a character that you create + code:8ce7/0a/14 + +cartridge sha256:38e5253131d264395a302d0910316f94bec00f60db616caa7a53806f08c5b5f9 + name:Advanced Dungeons & Dragons - Pool of Radiance (USA) + cheat + description:Create super characters + code:8fb3/9d + cheat + description:Girdle Of Giant strength (must be used to be effective) + code:8f33/ca+8933/44 + cheat + description:Extra EXP points + code:8b42/36 + cheat + description:One hit ends battle with no gold or EXP + code:87b3/28 + +cartridge sha256:5ee479ef04d80366a75dd144cbeb47d0347ee82025d1b65dd358e1f6498c9a39 + name:Adventure Island II (USA) + cheat + description:Invincibility + code:deb9/d0/f0 + cheat + description:Invincibility (alt) + code:dede/a9/60 + cheat + description:Infinite health + code:d034/ce/ee + cheat + description:Infinite health (alt) + code:d034/ce/ad + cheat + description:Infinite health against hitting objects + code:df48/02/00 + cheat + description:Infinite Axes + code:aa6b/51 + cheat + description:Infinite Axes plus get an extra Red Camptosaurus + code:bab0/bf + cheat + description:Infinite lives + code:bcf1/ce/ad + cheat + description:Hit anywhere + code:ddc0/b0/d0+de04/99/b9+de21/99/b9+de85/99/b9+ddbd/20/ad+ddbf/ff/06+ddbe/c3/02 + cheat + description:Never lose Dinosaur + code:bca0/85/a5+df08/85/a5+df6e/85/a5 + cheat + description:Get fruits from anywhere + code:a74d/4d/00 + cheat + description:Multi-jump (hold jump to float) + code:b19a/5f/9c+b1a1/5f/a3 + cheat + description:Hold jump to float + code:b2ad/02/fe + cheat + description:Reversible skateboard + code:a1f6/20/00 + cheat + description:Faster running + code:a048/20/30 + cheat + description:Higher jump + code:b1d8/bd/ad+b4ab/01/04 + cheat + description:Start with 2 lives + code:e0a8/03/01 + cheat + description:Start with 7 lives + code:e0a8/03/06 + cheat + description:Start with 10 lives + code:e0a8/03/09 + +cartridge sha256:e8dc8c0441c54d09a1cfe0c112a3137bb6d709989b23e6528f8e30360e1ad910 + name:Adventure Island 3 (USA) + cheat + description:Invincibility + code:acec/01/00 + cheat + description:Infinite health + code:fd91/ce/ad + cheat + description:Infinite vitality + code:fd91/ce/cd + cheat + description:Infinite lives + code:b5f5/8d/ad + cheat + description:Hit anywhere + code:ab04/03/00+addc/b9/60+ad8f/99/b9+ae8d/99/b9 + cheat + description:Hold jump to float + code:a05a/d0/f0 + cheat + description:Don't die when hitting spikes + code:aeb7/01/00 + cheat + description:Don't lose pet when hitting spikes + code:af45/e6/85 + cheat + description:Mega-jumping Master Higgins + code:aa80/7b/bd + cheat + description:Gain 99 lives after gaining 100 fruit + code:a64c/02/00 + cheat + description:Keep items after dying - after 1st stage + code:b1bc/9d/2c + cheat + description:Start a new game to view the ending + code:a507/04/00+a503/0a/03 + cheat + description:Start with 2 lives + code:a0d0/03/01 + cheat + description:Start with 7 lives + code:a0d0/03/06 + cheat + description:Start with 9 lives + code:a0d0/03/09 + cheat + description:Start with 2 Red Taylors + code:a062/8d/ee + cheat + description:Start with 2 Blue Taylors + code:a065/8d/ee + cheat + description:Start with 2 Classies + code:a068/8d/ee + cheat + description:Start with 2 Don-Dons + code:a06b/8d/ee + cheat + description:Start with 2 Poleys + code:a06e/8d/ee + cheat + description:Start with 2 Boomerangs + code:a071/8d/ee + cheat + description:Start with 2 Axes + code:a074/8d/ee + cheat + description:Start with 2 invincibility crystals + code:a077/8d/ee + +cartridge sha256:185e4adb2cbcb71ebf0fd3f6af767f2215f93916cd2ccf932ce5864d3953239a + name:Adventures in the Magic Kingdom (USA) + cheat + description:Invincibility + code:f51e/60 + cheat + description:Infinite health + code:f9aa/c6/60 + cheat + description:Infinite time + code:fa24/b0/60 + cheat + description:Infinite candles + code:e654/ce/ad + cheat + description:Infinite lives + code:f9c3/ce/ad + cheat + description:Almost infinite health in attractions + code:f9aa/c6/a5 + cheat + description:All items for free + code:b283/fd/2c+b228/7c/00 + cheat + description:Mega-jump + code:ec4f/fa/f8 + cheat + description:'Life' costs less + code:b44e/06/03 + cheat + description:'Life' costs more + code:b44e/06/0c + cheat + description:'Freeze' costs less + code:b44f/08/04 + cheat + description:'Freeze' costs more + code:b44f/08/0f + cheat + description:'Invincible' costs less + code:b450/0a/05 + cheat + description:'Invincible' costs more + code:b450/0a/14 + cheat + description:'Life Up' costs less + code:b451/0c/06 + cheat + description:'Life Up' costs more + code:b451/0c/18 + cheat + description:Never lose a life in 'attractions' + code:f9c3/ce/ad + cheat + description:More 'Freeze' time + code:b24b/b4/ff + cheat + description:Less 'Freeze' time + code:b24b/b4/40 + cheat + description:More 'Invincible' time + code:b25f/3c/c0 + cheat + description:Start with less health in attractions + code:8162/03/01 + cheat + description:Start with more health in attractions + code:8162/03/05 + cheat + description:Start with even more health in attractions + code:8162/03/09 + cheat + description:Start with 1 life + code:80ed/03/01 + cheat + description:Start with 6 lives + code:80ed/03/06 + cheat + description:Start with 9 lives + code:80ed/03/09 + +cartridge sha256:0e862077f390348b8e109caa8189ff5ecdf3fac53eefc204369fae880e077d19 + name:Adventures of Bayou Billy, The (USA) + cheat + description:Infinite health + code:e2cd/07/01+9c9b/ce/ad + cheat + description:Infinite lives + code:e31b/c6/24 + cheat + description:Always have pistol + code:8476/ac/a0+8478/07/ea+8477/c1/01 + cheat + description:Always have knife + code:8476/ac/a0+8478/07/ea+8477/c1/02 + cheat + description:Always have ugly stick + code:8476/ac/a0+8478/07/ea+8477/c1/03 + cheat + description:Always have whip + code:8476/ac/a0+8478/07/ea+8477/c1/05 + cheat + description:Start a new game to view the ending (game A or B) + code:e798/04/05 + cheat + description:Start with 1 life + code:e400/02/00 + cheat + description:Start with 6 lives + code:e400/02/05 + cheat + description:Start with 9 lives + code:e400/02/08 + cheat + description:Start on level 2 + code:e40a/00/01+e40c/39/fb+e408/04/00 + cheat + description:Start on level 3 + code:e40a/00/02+e40c/39/fb+e408/04/00 + cheat + description:Start on level 4 + code:e40a/00/03+e40c/39/fb+e408/04/00 + cheat + description:Start on level 5 + code:e40a/00/04+e40c/39/fb+e408/04/00 + cheat + description:Start on level 6 + code:e40a/00/05+e40c/39/fb+e408/04/00 + cheat + description:Start on level 7 + code:e40a/00/06+e40c/39/fb+e408/04/00 + cheat + description:Start on level 8 + code:e40a/00/07+e40c/39/fb+e408/04/00 + cheat + description:Infinite health (alt) + code:07c5/07 + cheat + description:One hit kills + code:0510/00+0511/00+0512/00+0513/00+0514/00 + cheat + description:Have the Gun + code:07c1/01 + cheat + description:have the Knife + code:07c1/02 + cheat + description:Have the Ugly Stick + code:07c1/03 + cheat + description:Have the Whip + code:07c1/05 + cheat + description:Infinite bullets + code:07c0/99 + +cartridge sha256:58d0f0e504b8450e7d2dfbe11948a244143bfe3065f7e78524633cce8ac73103 + name:Adventures of Dino Riki (USA) + cheat + description:Invincibility + code:8a30/60 + cheat + description:Don't fall into the pits (you'll still lose any special ability you currently have) + code:89c1/02/00 + cheat + description:Hit anywhere + code:99ff/bd/4c+9a01/03/9a+9a00/64/4f + cheat + description:Once Macho, stay Macho + code:89e5/45/05 + cheat + description:Start and stay as Macho-Riki + code:8581/85/c6 + cheat + description:Start as Macho-Riki + code:8581/85/e6 + cheat + description:Start with infinite lives + code:860e/c6/a5 + cheat + description:Start with 1 life + code:84d9/02/00 + cheat + description:Start with 6 lives + code:84d9/02/05 + cheat + description:Start with 9 lives + code:84d9/02/08 + cheat + description:Start with infinite life hearts + code:8a3f/c6/a5 + cheat + description:Start with 4 life hearts + code:84dd/02/04 + cheat + description:Start with 8 life hearts + code:84dd/02/08 + cheat + description:Start on stage 2-1 + code:84d0/85/46+84cd/00/02 + cheat + description:Start on stage 3-1 + code:84d0/85/46+84cd/00/04 + cheat + description:Start on stage 4-1 + code:84d0/85/46+84cd/00/06 + cheat + description:Start on stage 4-2 + code:84d0/85/46+84cd/00/08 + cheat + description:Start on stage 4-3 + code:84d0/85/46+84cd/00/0a + cheat + description:Start on stage 4-4 + code:84d0/85/46+84cd/00/0c + +cartridge sha256:bb5859ced6b028934edddc734e3599f8dd7857b92838baf6a7d46df5dd151f6b + name:Adventures of Dr. Franken, The (USA) (Proto) + cheat + description:Infinite health + code:e6ef/c6/a5 + +cartridge sha256:a0bc241936acf1993a300ab21c197a2647b6c072cfbb8e3f83424a9ab6655cc7 + name:Adventures of Gilligan's Island, The (USA) + cheat + description:Infinite time + code:f20b/c6/a5 + cheat + description:Infinite rope + code:b358/ce/ad + cheat + description:Infinite supply of food + code:b32d/ce/ad + cheat + description:Start with 9 units of food + code:dd23/02/09 + cheat + description:Start with 1 unit of food + code:dd23/02/01 + cheat + description:More time for Episode 1 + code:f27b/09/0b + cheat + description:More time for Episode 2 + code:f27c/0b/0d + cheat + description:More time for Episode 3 + code:f27d/13/14 + cheat + description:Start with 9 ropes + code:dd28/02/09 + cheat + description:Start with 1 rope + code:dd28/02/01 + cheat + description:Start on Episode 2 + code:dc6a/00/01+dc6b/85/24 + cheat + description:Start on Episode 3 + code:dc6a/00/02+dc6b/85/24 + +cartridge sha256:c5e47c0479f500b86995fc8d09e132f5ba3f54cfd9a2a601ea3848bb60871a20 + name:Adventures of Lolo (USA) + cheat + description:Invincibility + code:9988/06/00+c8c1/45/00+ceb1/e6/a5 + cheat + description:Infinite lives + code:9995/c6/a5 + cheat + description:Infinite shots + code:b058/c6/a5 + cheat + description:Always have shot ability + code:b055/fb/06 + cheat + description:Hit anywhere + code:b12f/b0/d0+b130/0a/44 + cheat + description:Chests are always open + code:af76/f0/90 + cheat + description:Walk through anything + code:ace0/f0/24 + cheat + description:Walk faster + code:ae43/ff/fe+ae25/ff/fe+ae3f/01/02+ae29/01/02 + cheat + description:1 life for Lolo + code:98c1/05/01 + cheat + description:9 lives for Lolo + code:98c1/05/09 + +cartridge sha256:12d3119e25f7b40a7ccc546f5d92edaad86fb0083facf6dd61db512bac45f99d + name:Adventures of Lolo 2 (USA) + cheat + description:Invincibility + code:abba/e6/60 + cheat + description:Infinite lives + code:9b26/c6/24 + cheat + description:Always have shot ability + code:a8f8/fb/04 + cheat + description:Never lose magic shots + code:a8fb/c6/24 + cheat + description:Start with 1 life + code:99d2/05/01 + cheat + description:Start with 10 lives + code:99d2/05/0a + cheat + description:Start with 15 lives + code:99d2/05/0f + cheat + description:Start with 2 magic shots + code:9a05/00/02 + cheat + description:Start with 4 magic shots + code:9a05/00/04 + cheat + description:Start on world 5 + code:99b4/00/04 + cheat + description:Start on world 10 + code:99b4/00/09 + cheat + description:Start on world 15 + code:99b4/00/0e + cheat + description:Start on world 20 + code:99b4/00/13 + cheat + description:Start on world 25 + code:99b4/00/18 + cheat + description:Start on world 30 + code:99b4/00/1d + +cartridge sha256:24f7bb802a0ddce0648ea9f156db42b3eaf4cc6598ce852ffac9f849bf92abee + name:Adventures of Lolo 3 (USA) + cheat + description:Invincibility + code:96f6/e6/60+8d26/e6/60 + cheat + description:Always have shot ability + code:8a94/fb/02 + cheat + description:Infinite shots for each room on pick-up + code:8a95/c6/a5 + +cartridge sha256:322d6be47ed539c3dd3c1c92398e9842c3922d7c13914b9c72752ddec377145c + name:Adventures of Rad Gravity, The (USA) + cheat + description:Infinite health + code:ebe2/bd + +cartridge sha256:03db3d003eaa91e1434093ea259a82b9f2d5ed5b02404f9feba05819f69f81c4 + name:Adventures of Rocky and Bullwinkle and Friends, The (USA) + cheat + description:Infinite health + code:8c9d/8d/ad + cheat + description:Infinite lives + code:8c7b/ce/ad + cheat + description:Infinite Bombs + code:86c1/ce/cd + cheat + description:Get bombs from anywhere + code:8b41/98/00+8b60/9b/00 + cheat + description:Rocky loses no health when flying when you have full health + code:846f/07/06 + cheat + description:Rocky loses more health when flying when you have full health + code:8468/02/06 + cheat + description:Bullwinkle loses no health when headbutting + code:8475/01/00 + cheat + description:Bullwinkle loses more health when headbutting + code:8471/04/08 + cheat + description:Start with no Bombs + code:801f/0a/00+d284/0a/00 + cheat + description:Start with 2 lives + code:801a/04/01 + cheat + description:Start with 30 Bombs + code:801f/0a/1e + +cartridge sha256:227e8a900206d0f8c67b7cb09eaee25f181085623b42bd9694dc30986d955f27 + name:Adventures of Tom Sawyer (USA) + cheat + description:Infinite lives + code:c114/c6/a6 + cheat + description:Hit anywhere + code:b88e/35/00+e379/b0/50+bcc0/b0/50+c3ef/b0/50 + cheat + description:Only 5 T's lost from skulls + code:c526/0a/05 + cheat + description:Start with 1 Tom - P1 + code:a0b5/03/01 + cheat + description:Start with 1 Tom - P2 + code:a37b/03/01 + cheat + description:Start with 6 Toms - P1 + code:a0b5/03/06 + cheat + description:Start with 6 Toms - P2 + code:a37b/03/06 + cheat + description:Start with 9 Toms - P1 + code:a0b5/03/09 + cheat + description:Start with 9 Toms - P2 + code:a37b/03/09 + cheat + description:Start at the river - P1 + code:a552/be/c9 + cheat + description:Start in the forest - P1 + code:a552/be/d4 + cheat + description:Start in the house - P1 + code:a552/be/df + cheat + description:Start in the sky - P1 + code:a552/be/ea + cheat + description:Start in the cave - P1 + code:a552/be/f5 + cheat + description:Start at the river - P2 + code:a380/01/02+a38a/03/08 + cheat + description:Start in the forest - P2 + code:a380/01/03+a38a/03/0d + cheat + description:Start in the house - P2 + code:a380/01/04+a38a/03/12 + cheat + description:Start in the sky - P2 + code:a380/01/05+a38a/03/17 + cheat + description:Start in the cave - P2 + code:a380/01/06+a38a/03/1c + +cartridge sha256:69300586af39342fccc249134f6f44ebbd0fce7c1e5b93151cff63bb35072add + name:After Burner (USA) (Unl) + cheat + description:Invincibility + code:924b/85/a5 + cheat + description:Infinite lives + code:e2a9/c6/c5 + cheat + description:Infinite missiles + code:8af2/c6/c5 + +cartridge sha256:4fb12ad1c791c7ee8d5ec824eff871d71b43b92c4e93b45ed0b60f022459b917 + name:After Burner (Japan) + cheat + description:Infinite lives + code:e1f1/c6/a5 + +cartridge sha256:1b5857f9fd57d6f50d8d1e57db67203155fb2974ae426deac3398efef1dbf042 + name:Aigina no Yogen - Balubalouk no Densetsu Yori (Japan) + cheat + description:Invincibility + code:95d1/ad + cheat + description:Infinite lives + code:9439/bd + +cartridge sha256:e10ff4cfeaf0c16a71d7fffbf79ad3260c119431db6fad603d07ec971746849a + name:Airball (Unknown) (Proto1) + cheat + description:Can use float at any difficulty level + code:c580/10/00 + +cartridge sha256:6d0215929f2dfeeecdeee4dd50b8aec07f279a8ab8df1dc4e877bbcad3db0d37 + name:Air Fortress (USA) + cheat + description:Invincibility + code:a7d8/f0/d0+a7dd/d0/f0 + cheat + description:Infinite energy + code:cdcf/8d/ad+ce01/8d/ad + cheat + description:Don't take damage inside fortress + code:cdcd/e5/24+cdff/e5/24 + cheat + description:Infinite lives + code:9c34/c6/c5 + cheat + description:Infinite lives outside fortress + code:9c34/c6/a5 + cheat + description:Infinite Beam Bullets + code:9e45/01/00 + cheat + description:Hit anywhere - inside fortress + code:9c5a/bc/4c+9c5c/64/9c+9c5b/a4/a1+9cfd/95/a5 + cheat + description:Hit anywhere - outside fortress + code:ab17/3b/00+ab27/fd/4c+ab28/4c/5c+ab65/95/a5+ab29/65/ab + cheat + description:Double Bombs on pick-up + code:ac47/05/10 + cheat + description:Extra energy on pick-up + code:aa7b/64/7f+aa80/64/7f + cheat + description:Start with 1 life + code:9a64/03/01 + cheat + description:Start with 6 lives + code:9a64/03/06 + cheat + description:Start with 9 lives + code:9a64/03/09 + cheat + description:Start on level 2 + code:9a5a/29/a2+9a5b/07/01+9a5c/85/86 + cheat + description:Start on level 3 + code:9a5a/29/a2+9a5b/07/02+9a5c/85/86 + cheat + description:Start on level 4 + code:9a5a/29/a2+9a5b/07/03+9a5c/85/86 + cheat + description:Start on level 5 + code:9a5a/29/a2+9a5b/07/04+9a5c/85/86 + cheat + description:Start on level 6 + code:9a5a/29/a2+9a5b/07/05+9a5c/85/86 + cheat + description:Start on level 7 + code:9a5a/29/a2+9a5b/07/06+9a5c/85/86 + +cartridge sha256:b82c1234165cd725d8e7f3e51926bceb834744eb49ad915bd3ea8b76fa465eb1 + name:Airwolf (USA) + cheat + description:Infinite health + code:af6d/bd + cheat + description:Infinite lives + code:82e1/bd + cheat + description:Start with 1 life + code:cd36/03/01 + cheat + description:Start with 6 lives + code:cd36/03/06 + cheat + description:Start with 9 lives + code:cd36/03/09 + cheat + description:Start at last mission reached + code:ccac/5b/61 + cheat + description:Start with 30 missiles + code:8261/0f/1e + cheat + description:Start with 45 missiles + code:8261/0f/2d + cheat + description:Start with infinite missiles + code:a1d0/c6/24 + cheat + description:Sets missiles to 5 when you refuel + code:85e5/0f/05 + cheat + description:Sets missiles to 30 when you refuel + code:85e5/0f/1e + cheat + description:Infinite health (alt) + code:00b9/00 + cheat + description:Infinite lives (alt) + code:036c/02 + +cartridge sha256:60b1aebdc0a19afc5d3e7dc4f09d8a968580e007197461a8a142656702c27f0d + name:Akumajou Dracula (Japan) + cheat + description:Infinite health + code:e7c0/85/ad + cheat + description:Infinite lives + code:c312/c6/a9 + cheat + description:Infinite time + code:a0b4/20/ad + cheat + description:Clock doesn't use hearts + code:daaa/84/a4 + cheat + description:Weapons don't use hearts + code:dae5/84/a4 + cheat + description:Can't add hearts + code:e7e9/85/a4 + cheat + description:Keep weapon after losing a life + code:c33b/8d/2c + cheat + description:Start with rapid-fire shots + code:b680/01/00 + cheat + description:Start with 80 hearts + code:c983/05/50 + cheat + description:Start with 99 hearts + code:c983/05/63 + +cartridge sha256:c70f0f5d4054ce7c4850259879c9823add73ccc234ddcf96d95681bb78bd2c58 + name:Akumajou Densetsu (Japan) + cheat + description:Infinite life + code:8c27/a5/85 + cheat + description:Infinite hearts + code:8b7c/01/00 + cheat + description:Infinite time + code:899d/03/05 + cheat + description:Infinite lives + code:897c/85/ad + cheat + description:Multi-jump + code:8bd7/10/60+97dc/56/58+93dc/56/58+9859/c9/28+9863/65/d8+985b/b0/90+9868/08/05+9861/0c/05+9866/26/05+9860/d0/a9+985d/ad/8d+9862/ad/8d+9838/85/a5+9858/04/a5+985a/08/0a + cheat + description:Invincibility (blinking) + code:007d/01 + cheat + description:Trevor Belmont - Have fully powered whip + code:008b/02 + cheat + description:Have no special weapon + code:0082/00 + cheat + description:Have Axe + code:0082/01 + cheat + description:Have Clock + code:0082/0b + cheat + description:Have Cross + code:0082/02 + cheat + description:Have Dagger + code:0082/03 + cheat + description:Have Holy Water + code:0082/04 + +cartridge sha256:ff5b96853cf67171918aad5157661dc223e0002e0373e2580cee2e207bb0a682 + name:Akumajou Special - Boku Dracula-kun (Japan) + cheat + description:Invincibility + code:dd88/60 + cheat + description:Infinite health + code:dd88/c6/a5 + cheat + description:Infinite lives + code:dcae/c6/a5 + +cartridge sha256:4c95afeda9a92842933c174983fee954cf40d1301d32f6169f6653f1e5cdc10f + name:Al Unser Jr. Turbo Racing (USA) + cheat + description:Can't be slowed down by signs and grass, prevents suspension from being shot + code:d7f8/29/00+d851/85/a5+d801/c6/a5 + +cartridge sha256:722096b8929442310bc268f9cfea10b26cff8a7e900197b54c73b4a8603b5d96 + name:Aladdin (Europe) + cheat + description:Invincibility + code:ccff/f0/d0+f983/f0/d0 + cheat + description:Infinite energy + code:ba0d/85/a5 + cheat + description:Infinite lives + code:c2c7/8d/ad + cheat + description:Infinite Apples + code:c88c/8d/ad + +cartridge sha256:4b088e1e78981308da68883cf8292337ff8d899bf82a78d17e7a7af2745846e7 + name:Alfred Chicken (USA) + cheat + description:Invincibility + code:f4ad/a5 + cheat + description:Infinite time (alt) + code:b8c2/60 + cheat + description:Infinite lives + code:f8cc/01/e0 + cheat + description:Infinite lives (alt) + code:f8ca/ad + cheat + description:Infinite time + code:b8b0/ad/60 + cheat + description:255 points for each present collected + code:f9a4/32/ff + cheat + description:108 points for each present collected + code:f9a4/32/64 + cheat + description:Only need 1 diamond for an extra life + code:b146/06/01 + cheat + description:3 balloons needed to complete a level + code:ca2a/b1/a9+ca2b/51/03 + cheat + description:2 balloons needed to complete a level + code:ca2a/b1/a9+ca2b/51/02 + cheat + description:1 balloon needed to complete a level + code:ca2a/b1/a9+ca2b/51/01 + cheat + description:Start with 1 life + code:c655/02/00 + cheat + description:Start with 2 lives + code:c655/02/01 + cheat + description:Always spring-jump + code:dd68/90 + +cartridge sha256:d73a9a1fae7396754c19eecd6aa9e44d02c230df8efed0bafd86aa1cb0dd2a23 + name:Alien 3 (USA) + cheat + description:Invincibility + code:9c97/ce/ad+e9cb/64/0f+d5d4/64/0f + cheat + description:Infinite health + code:fab3/8d/ad + cheat + description:Infinite time + code:b28e/9d/bd + cheat + description:Infinite lives + code:e24a/ce/ad + cheat + description:Infinite gun heat + code:dc9f/ee/a5 + cheat + description:Invincible against long falls + code:cf54/0f/00 + cheat + description:Infinite Radar + code:aa6e/ce/ad + cheat + description:Infinite ammo for Machine gun + code:dcaf/ce/ad + cheat + description:Infinite ammo for Grenade Launcher + code:dc6d/ce/ad + cheat + description:Infinite ammo for Grenade Launcher 2 + code:bd46/ce/ad + cheat + description:Infinite ammo for Flame Thrower + code:d903/ce/ad + cheat + description:Hit anywhere + code:b697/0d/00+f542/e5/60 + cheat + description:Super-jump + code:a036/03/15+a039/03/15 + cheat + description:Level skip (pause and press any key (except left) + code:b3ef/42/36 + cheat + description:Always have Radar + code:e9cf/00/ff + cheat + description:Invincibility (alt) + code:03c8/4a + cheat + description:Infinite health (alt) + code:074a/12 + cheat + description:Infinite time (alt) + code:0742/09+0743/09+0744/09 + cheat + description:Infinite weapon 1 + code:074b/3f + cheat + description:Infinite weapon 2 + code:074c/20 + cheat + description:Infinite weapon 3 + code:074e/1c + cheat + description:Infinite weapon 4 + code:074d/32 + cheat + description:Rescue all now + code:0747/00 + +cartridge sha256:cd1a9bc6c9e2181668fea96db14bc67fbbf9bf1572eef2bb074e5912a0dd54c9 + name:Alien Syndrome (Japan) + cheat + description:Infinite lives + code:cefc/b1 + cheat + description:Infinite time + code:f789/bd + cheat + description:Don't lose life when touched + code:8928/b1 + +cartridge sha256:d676ef6f7aa3b042ae5a0c95a7f07fabb4c3a5fccb3767ae1950713e51189a47 + name:Alien Syndrome (USA) (Unl) + cheat + description:Infinite time + code:f23f/ce/ad + cheat + description:Don't lose life when shot or touched + code:c98a/ff/00 + cheat + description:Don't lose life from falling down holes + code:ca76/ff/00 + cheat + description:Set timer to 440 + code:f199/33/34 + cheat + description:1 life after continue + code:c3a4/04/01 + cheat + description:8 lives after continue + code:c3a4/04/08 + cheat + description:Start with 1 life - both players + code:c511/04/01 + cheat + description:Start with 8 lives - both players + code:c511/04/08 + cheat + description:Start with Flame Thrower + code:c56c/00/01 + cheat + description:Start with Fireball + code:c56c/00/02 + cheat + description:Start with Laser + code:c56c/00/03 + cheat + description:Start on round 2 + code:fbf8/10/01+fbfa/00/b4+fbfb/20/03 + cheat + description:Start on round 3 + code:fbf8/10/02+fbfa/00/b4+fbfb/20/03 + cheat + description:Start on round 4 + code:fbf8/10/03+fbfa/00/b4+fbfb/20/03 + cheat + description:Start on round 5 + code:fbf8/10/04+fbfa/00/b4+fbfb/20/03 + cheat + description:Start on round 6 + code:fbf8/10/05+fbfa/00/b4+fbfb/20/03 + cheat + description:Start on round 7 + code:fbf8/10/06+fbfa/00/b4+fbfb/20/03 + +cartridge sha256:a762d0a90d16c84b5f2b014816b37675cf5115320be7e815effbb64d91b2014d + name:All Night Nippon Super Mario Brothers (Japan) (Promotion Card) + cheat + description:All blocks are starmen + code:89c9/cd + cheat + description:Invisible 1-up blocks are visible and all mushroom blocks are 1-ups + code:89f9/c1 + cheat + description:Start on level 8-4 + code:c4b2/00/07+c4bc/00/03 + +cartridge sha256:3addebdec132929ecad2a8612a4ba54ccc39b9ada2295692f836c6b48d015054 + name:Alpha Mission (USA) + cheat + description:Invincibility + code:c1aa/91/b1 + cheat + description:Infinite lives + code:92d7/c6/a5 + cheat + description:Keep power up after death + code:8375/85/24 + cheat + description:Keep energy after death + code:8377/85/24 + cheat + description:Thunder uses 25% normal energy + code:980b/08/04 + cheat + description:Triple energy gained on 'E' pick-up + code:b6a1/02/06 + cheat + description:Less energy lost on 'Bad E' pick-ups + code:b6b4/04/02 + cheat + description:Shield doesn't use energy + code:c004/85/a5 + cheat + description:You can re-use weapon after selecting + code:8c70/85/25 + cheat + description:Start with all weapons available + code:8347/03/ff + cheat + description:Start with 1 life + code:8356/03/01 + cheat + description:Start with double lives + code:8356/03/06 + cheat + description:Start with triple lives + code:8356/03/09 + +cartridge sha256:a978de5d5f343eacb0a6f12427327ecbe9b2e9cf881569aec7b838bd44237d84 + name:Amagon (USA) + cheat + description:Invincibility + code:d3f2/f0/d0 + cheat + description:Invincible against enemies + code:a19c/a9/60 + cheat + description:Invincible against bullets + code:a121/a9/60 + cheat + description:Invincible against area boss + code:a1f0/a9/60 + cheat + description:Infinite mega-power + code:a255/95/24 + cheat + description:Infinite ammo + code:f663/01/00 + cheat + description:Infinite ammo (alt) + code:f664/95/b5 + cheat + description:Hit anywhere + code:f6bf/62/00 + cheat + description:One hit kills + code:f6d2/4e/00 + cheat + description:Multi-jump + code:ce7c/06/00+ce8e/04/00+ce87/06/08 + cheat + description:Gain 10 bullets on pick-up + code:cd6b/02/01 + cheat + description:Gain 30 bullets on pick-up + code:cd6b/02/03 + cheat + description:Start with no bullets + code:e299/04/01 + cheat + description:Start with 600 bullets + code:e299/04/07 + cheat + description:Start with infinite lives + code:cf27/01/00 + cheat + description:Start with 1 life + code:e29d/04/01 + cheat + description:Start with 8 lives + code:e29d/04/08 + +cartridge sha256:be12cff13a06e0b5de2dad4d431f7cf9a6aa73be45cdbd952dfd03a9d23571b6 + name:American Gladiators (USA) + cheat + description:Less joust time + code:943a/63/3c + cheat + description:Stop joust timer + code:a32b/ce/2c + cheat + description:Less cannonball time + code:801c/63/3c + cheat + description:Stop cannonball time + code:9104/ce/2c + cheat + description:Less wall time + code:aa4a/63/3c + cheat + description:Stop wall timer + code:aa98/de/2c + cheat + description:More assault time + code:8726/3d/63 + cheat + description:Less assault time + code:8726/3d/29 + cheat + description:Stop assault timer + code:8755/ce/2c + cheat + description:More power ball time - level 1 + code:915a/3d/63 + cheat + description:More power ball time - level 2 + code:915b/38/63 + cheat + description:More power ball time - level 3 + code:915c/33/63 + cheat + description:More power ball time - level 4 + code:915d/2e/63 + cheat + description:Start with 1 life - P1 + code:86a3/05/01 + cheat + description:Start with 8 lives - P1 + code:86a3/05/08 + cheat + description:Start with 10 lives - P1 + code:86a3/05/0a + cheat + description:Start with 20 lives - P1 + code:86a3/05/14 + cheat + description:Start with 1 life - P2 + code:86e3/05/01 + cheat + description:Start with 8 lives - P2 + code:86e3/05/08 + cheat + description:Start with 10 lives - P2 + code:86e3/05/0a + cheat + description:Start with 20 lives - P2 + code:86e3/05/14 + cheat + description:Start on level 2 - P1 + code:86a1/00/01 + cheat + description:Start on level 3 - P1 + code:86a1/00/02 + cheat + description:Start on level 4 - P1 + code:86a1/00/03 + cheat + description:Start on level 2 - P2 + code:86e1/00/01 + cheat + description:Start on level 3 - P2 + code:86e1/00/02 + cheat + description:Start on level 4 - P2 + code:86e1/00/03 + +cartridge sha256:427876021e6c077479a1a1171e013f84ae951197005a317b099df3b6c2862603 + name:Anticipation (USA) + cheat + description:More time to answer questions + code:97b7/19/32 + cheat + description:Less time to answer questions + code:97b7/19/0f + cheat + description:Infinite chances + code:a670/c0/00 + +cartridge sha256:bb834eb82f0ac53114035e6f353434a934d4aa47742644740de5fa8b2b033b5b + name:Arch Rivals - A Basketbrawl! (USA) + cheat + description:Never miss a shot - both players + code:9a61/d0/24 + cheat + description:More time for a quarter + code:ba27/34/38+b171/34/38 + cheat + description:Less time for a quarter + code:ba27/34/32+b171/34/32 + cheat + description:Run faster without ball + code:90f3/20/60+9160/20/60 + cheat + description:Super speed + code:90e9/04/25+9154/04/25 + +cartridge sha256:751d3bf4722ce117d8ab7ff78059f42206ead5299716d91d5ff27d3900d555ad + name:Archon (USA) + cheat + description:Unrestricted ground movement + code:d05d/eb/00 + cheat + description:Unrestricted flying movement + code:d044/04/00 + +cartridge sha256:7768ef85519c94dc40d09bc598121825d103fcf1d4927be59f597b0a3509d15f + name:Argus (Japan) + cheat + description:Invincibility + code:980c/85/a5 + cheat + description:Infinite lives + code:812f/c6/c5 + +cartridge sha256:a3763e702f8ae0818480cf0a8b2395d3f928c539f75e230ed43fa6b904fe6365 + name:Arkanoid (USA) + cheat + description:Infinite lives - both players + code:8678/c6/a9 + cheat + description:Infinite lives + code:8678/c6/a5 + cheat + description:Paddle hits ball anywhere + code:a8df/33/00+a8e7/90/50 + cheat + description:No lasers + code:80e6/20/ad + cheat + description:Square ball + code:a1a1/e6 + cheat + description:Start with 1 life - P1 + code:9c13/03/01 + cheat + description:Start with 6 lives - P1 + code:9c13/03/06 + cheat + description:Start with 9 lives - P1 + code:9c13/03/09 + cheat + description:Start on boss level + code:9c1f/01/24 + cheat + description:Start on level 0 + code:9c1f/01/00 + cheat + description:Start on level 1 + code:9c1f/01/01 + cheat + description:Start on level 2 + code:9c1f/01/02 + cheat + description:Start on level 3 + code:9c1f/01/03 + cheat + description:Start on level 4 + code:9c1f/01/04 + cheat + description:Start on level 5 + code:9c1f/01/05 + cheat + description:Start on level 6 + code:9c1f/01/06 + cheat + description:Start on level 7 + code:9c1f/01/07 + cheat + description:Start on level 8 + code:9c1f/01/08 + cheat + description:Start on level 9 + code:9c1f/01/09 + cheat + description:Start on level 10 + code:9c1f/01/0a + cheat + description:Start on level 11 + code:9c1f/01/0b + cheat + description:Start on level 12 + code:9c1f/01/0c + cheat + description:Start on level 13 + code:9c1f/01/0d + cheat + description:Start on level 14 + code:9c1f/01/0e + cheat + description:Start on level 15 + code:9c1f/01/0f + cheat + description:Start on level 16 + code:9c1f/01/10 + cheat + description:Start on level 17 + code:9c1f/01/11 + cheat + description:Start on level 18 + code:9c1f/01/12 + cheat + description:Start on level 19 + code:9c1f/01/13 + cheat + description:Start on level 20 + code:9c1f/01/14 + cheat + description:Start on level 21 + code:9c1f/01/15 + cheat + description:Start on level 22 + code:9c1f/01/17 + cheat + description:Start on level 23 + code:9c1f/01/17 + cheat + description:Start on level 24 + code:9c1f/01/18 + cheat + description:Start on level 25 + code:9c1f/01/19 + cheat + description:Start on level 26 + code:9c1f/01/1a + cheat + description:Start on level 27 + code:9c1f/01/1b + cheat + description:Start on level 28 + code:9c1f/01/1c + cheat + description:Start on level 29 + code:9c1f/01/1d + cheat + description:Start on level 30 + code:9c1f/01/1e + cheat + description:Start on level 31 + code:9c1f/01/1f + cheat + description:Start on level 32 + code:9c1f/01/20 + cheat + description:Start on level 33 + code:9c1f/01/21 + cheat + description:Start on level 34 + code:9c1f/01/22 + cheat + description:Start on level 35 + code:9c1f/01/23 + cheat + description:Start on level 36 + code:9c1f/01/24 + +cartridge sha256:8593b6ae7b19b2e767ad2c207c5a83dea90030414f45eef4c0dec3c3a5530364 + name:Arkanoid II (Japan) + cheat + description:Infinite lives + code:c8d2/c6/c5 + +cartridge sha256:381fcbe2b714c38fdeb4045d93f0867fe80f4a219077c3dc5a683a05a8b8e78a + name:Arkista's Ring (USA) + cheat + description:Infinite health + code:9516/e5/24 + cheat + description:Less damage from powerful monsters + code:9507/0f/03 + cheat + description:Infinite lives + code:bc32/ce/ad + cheat + description:Hit anywhere + code:ae2a/c0/00 + cheat + description:Walk through walls + code:9742/18/00+9717/0f/00+978a/9c/00+96dc/16/00 + cheat + description:Start with fewer hearts + code:8546/05/02 + cheat + description:Start with more hearts + code:8546/05/09 + cheat + description:Start with 20 continues + code:8534/0b/15 + cheat + description:Start with 5 continues + code:8534/0b/06 + cheat + description:Start with 1 life + code:854e/03/01 + cheat + description:Start with 6 lives + code:854e/03/06 + cheat + description:Start with 9 lives + code:854e/03/09 + cheat + description:Infinite health (alt) + code:03d6/05 + cheat + description:Have Ring, Necklace, Mirror + code:03dc/ff + cheat + description:Have all armor + code:03d5/0a+03d6/0a + cheat + description:Have Ultimate Bow status + code:03d3/07 + cheat + description:Have Ultimate Arrow status + code:03d4/07 + cheat + description:Max item slots + code:03d7/03 + cheat + description:Unlock doors (enable only when at a door otherwise you'll move very slowly) + code:0001/ff + cheat + description:Have Fire Ball + code:0022/40 + cheat + description:Start on stage 02 + code:03d0/01 + cheat + description:Start on stage 03 + code:03d0/02 + cheat + description:Start on stage 04 + code:03d0/03 + cheat + description:Start on stage 05 + code:03d0/04 + cheat + description:Start on stage 06 + code:03d0/05 + cheat + description:Start on stage 07 + code:03d0/06 + cheat + description:Start on stage 08 + code:03d0/07 + cheat + description:Start on stage 09 + code:03d0/08 + cheat + description:Start on stage 10 + code:03d0/09 + cheat + description:Start on stage 11 + code:03d0/0a + cheat + description:Start on stage 12 + code:03d0/0b + cheat + description:Start on stage 13 + code:03d0/0c + cheat + description:Start on stage 14 + code:03d0/0d + cheat + description:Start on stage 15 + code:03d0/0e + cheat + description:Start on stage 16 + code:03d0/0f + cheat + description:Start on stage 17 + code:03d0/10 + cheat + description:Start on stage 18 + code:03d0/11 + cheat + description:Start on stage 19 + code:03d0/12 + cheat + description:Start on stage 20 + code:03d0/13 + cheat + description:Start on stage 21 + code:03d0/14 + cheat + description:Start on stage 22 + code:03d0/15 + cheat + description:Start on stage 23 + code:03d0/16 + cheat + description:Start on stage 24 + code:03d0/17 + cheat + description:Start on stage 25 + code:03d0/18 + cheat + description:Start on stage 26 + code:03d0/19 + cheat + description:Start on stage 27 + code:03d0/1a + cheat + description:Start on stage 28 + code:03d0/1b + cheat + description:Start on stage 29 + code:03d0/1c + cheat + description:Start on stage 30 + code:03d0/1d + cheat + description:Start on stage 31 + code:03d0/1e + +cartridge sha256:54526dc9444c0eb4b0e5814f98b5e522bcb9881a6f2c0644fc7a21ca8c03502b + name:Armadillo (Japan) + cheat + description:Invincibility + code:b4a8/c9/a9+b4a9/03/00 + +cartridge sha256:20aaf9705d2cc17bac10468544afb250019f43983677b904ca88328f67aa9439 + name:Astro Fang - Super Machine (Japan) + cheat + description:Infinite fuel + code:d98a/85/a5 + cheat + description:Infinite Missiles + code:b278/85/a5 + +cartridge sha256:a08e6b53f1fa593e001719d87e2f203deb24ee1d389a8f3f339d75e9fb7c02f4 + name:Astyanax (USA) + cheat + description:Invincibility + code:8174/d0/f0 + cheat + description:Infinite health + code:c536/85/a5 + cheat + description:Infinite SP (spell) + code:c38c/18/30 + cheat + description:Hit anywhere + code:d9cc/b0/24+d9b5/30/24 + cheat + description:Multi-jump + code:828d/77/80+828f/10/80+8291/35/32 + cheat + description:Double health and SP + code:8a46/14/28 + cheat + description:Keep weapons after death + code:cb30/ce/ad + cheat + description:Start with Blast Spell + code:8a4c/00/01 + cheat + description:Start with Bind Spell + code:8a4c/00/02 + cheat + description:Start with extra weapon power + code:8a42/04/14 + cheat + description:Start with 1 life + code:8cbb/02/00+8a52/02/00 + cheat + description:Start with double lives + code:8cbb/02/05+8a52/02/05 + cheat + description:Start with triple lives + code:8cbb/02/08+8a52/02/08 + cheat + description:Invincibility (alt) + code:007d/03 + cheat + description:Infinie lives + code:0096/03 + +cartridge sha256:2137d1621d29df50100f4d0fba3bafa0be56ccd0c832e44cd29dd7f0d75b374e + name:Athena (USA) + cheat + description:Infinite health (after first 2 units) + code:a533/85/24 + cheat + description:Infinite time + code:b733/01/00 + cheat + description:Collect items from anywhere + code:89c9/b0/10 + cheat + description:Start with energy boost + code:f1cf/0c/20 + cheat + description:Start with extra time + code:e758/05/07 + cheat + description:Start with less time + code:e758/05/04 + cheat + description:Start with 1 life + code:f1cb/02/00 + cheat + description:Start with 6 lives + code:f1cb/02/05 + cheat + description:Start with 9 lives + code:f1cb/02/08 + cheat + description:Infinite health + code:0095/0f + cheat + description:Infinite lives + code:009b/09 + cheat + description:Infinite time (alt) + code:0092/59 + +cartridge sha256:3b687bf0a8ccd23736bb7ed2e6e75f9d150318d79da22bbf7ff1dd97ab980957 + name:Attack of the Killer Tomatoes (USA) + cheat + description:Invincibility + code:f1e6/60 + cheat + description:Infinite health + code:f1f6/ad + cheat + description:Infinite lives + code:f4f4/cd + cheat + description:Invincibility (alt) + code:07f4/32 + cheat + description:Infinite health (alt) + code:0722/3c + cheat + description:Infinite lives (alt) + code:0718/03 + +cartridge sha256:f3601248633f47a0ef10723e42a1072c76dd487d7ddf943e618611bb7cfec737 + name:Atlantis no Nazo (Japan) + cheat + description:Infinite lives + code:81e8/ce/bd + cheat + description:Partial invincibility + code:b79f/20/ad+b279/20/ad+b411/20/ad+81b0/20/ad + +cartridge sha256:f91113b6a4bcd39d86ad5bbeaeb0f103461ada2cae513d1648a77ee575caf69b + name:Auto-Upturn (Asia) (PAL) (Unl) + cheat + description:Infinite health (blinking) + code:a3f6/c6/a5+a42b/c6/a5 + cheat + description:Infinite lives + code:a416/c6/a5 + cheat + description:Infinite time + code:95c6/c6/a5 + +cartridge sha256:fb20d9562088cfa620ad0221e6e6f6c6d1f08e5a9cee2a97c0ef4fc39f050c6c + name:Baby Boomer (USA) (Unl) + cheat + description:Infinite lives + code:e242/ce/cd + +cartridge sha256:2bd744ff0d76653b9e218f6cea37f86bbdc6bc9b7a816c5fa236594ed1eb496a + name:Back to the Future (USA) + cheat + description:Invincibility - Street stages + code:8afa/05/00+8aff/37/10+8b3c/f0/10 + cheat + description:Disable all timers + code:9aeb/a5/60 + cheat + description:Never lose a life in Hill Valley game + code:814c/ce/ad + cheat + description:Never lose a life in Cafe game + code:819b/ce/ad + cheat + description:Never lose a life in School game + code:81c3/ce/ad + cheat + description:Never lose a life in Dancing Hall game + code:81eb/ce/ad + cheat + description:Start with 1 life + code:80ac/04/01 + cheat + description:Start with 8 lives + code:80ac/04/08 + +cartridge sha256:b265adba4a6f751f4da7b157672f324264f11fed3ca0b1e4ca703eb0b8a5ab77 + name:Back to the Future Part II & III (USA) + cheat + description:Infinite lives + code:81ab/ce/ad + cheat + description:Infinite fuel + code:8209/e5/24+821a/e5/24 + cheat + description:Keep shots + code:8c44/85/24 + cheat + description:Quicker shots + code:88c5/19/09 + cheat + description:Start with 20 nuclear fuel units + code:c22f/01/02 + cheat + description:Start with 30 nuclear fuel units + code:c22f/01/03 + cheat + description:Start with 20 lives + code:c22a/01/02 + cheat + description:Start with 30 lives + code:c22a/01/03 + +cartridge sha256:56382fac9104b26797de262a7c70ddd5850451d81a5008f3943d7bc492cbeb41 + name:Bad Dudes (USA) + cheat + description:Invincibility + code:8102/10/50+91df/ad/60+8101/0a/b8 + cheat + description:Infinite health + code:810e/f0/10 + cheat + description:Infinite health (alt) + code:8118/8d/ad + cheat + description:Infinite lives + code:c578/ce/ad + cheat + description:Infinite continues + code:c598/ce/2c + cheat + description:Infinite time + code:fb61/ce/cd + cheat + description:Hit anywhere + code:9135/5c/00 + cheat + description:One hit kills + code:dcbf/f0/10 + cheat + description:Start with 1 life and 1 continue + code:a2ff/03/01 + cheat + description:Start with double lives and continues + code:a2ff/03/06 + cheat + description:Start with triple lives and continues + code:a2ff/03/09 + cheat + description:Gain double usual energy from drinks + code:87d5/05/09 + cheat + description:Have the Nunchaku + code:02a2/01 + cheat + description:Have the Knife + code:02a2/02 + cheat + description:One hit kills on bosses + code:032f/00+0344/00 + +cartridge sha256:467a2e53c7af4c60809db9c2670850a6e21a98ea37c1d920dc4fcb6afcb5a104 + name:Bad News Baseball (USA) + cheat + description:Balls are considered strikes + code:9410/e8/ea + cheat + description:Play as girls team + code:c102/13/71+c100/90/01 + cheat + description:Have 0 outs + code:050d/00 + cheat + description:Have 2 outs + code:050d/02 + cheat + description:Team 1 score is 0 + code:0305/00 + cheat + description:Team 2 score is 0 + code:0306/00 + +cartridge sha256:98658d5c8e530994730be6f4f7f76fe09142dee90e0afca613f5d6baaf208f52 + name:Bad Street Brawler (USA) + cheat + description:Infinite health + code:c9f2/9d/bd + cheat + description:Infinite time + code:d723/d6/d5 + cheat + description:Don't die at time out + code:d716/ce/ad + cheat + description:Infinite lives + code:d117/c6/a9 + cheat + description:Infinite lives (alt) + code:d20c/c6/c5 + cheat + description:Start with 1 life + code:d026/03/01 + cheat + description:Start with 6 lives + code:d026/03/06 + cheat + description:Start with 9 lives + code:d026/03/09 + cheat + description:Start on level 5 + code:a7b2/00/04 + cheat + description:Start on level 10 + code:a7b2/00/09 + cheat + description:Start on level 15 + code:a7b2/00/0e + cheat + description:Infinite health (alt) + code:05f1/14 + +cartridge sha256:7328b2eb1c9fe06b98e0cba5c9058bf026e06a94900d490f79436d714eb48d6b + name:Balloon Fight (USA) + cheat + description:Infinite lives + code:f2fd/d6/b5 + cheat + description:Start with only one balloon + code:f3b6/02/01 + cheat + description:Balloons are unburstable + code:efa7/84/60 + cheat + description:Enemies can't burst balloons + code:ea60/0b + cheat + description:Start with 1 life + code:f1f1/02/00 + cheat + description:Start with 6 lives + code:f1f1/02/05 + cheat + description:Start with 9 lives + code:f1f1/02/08 + cheat + description:Start on level 5 - 2P only + code:f1fd/00/04 + cheat + description:Start on level 10 - 2P only + code:f1fd/00/09 + cheat + description:Start on level 15 - 2P only + code:f1fd/00/0e + cheat + description:Infinite lives - P1 + code:0041/02 + cheat + description:Infinite lives - P2 + code:0042/02 + +cartridge sha256:d718f10d4ab57f7ed3891a84bdc496472a242b9c8496a3c0a0de77b45ae2fd58 + name:Banana Prince (Germany) + cheat + description:Invincibility + code:a03e/24/04 + cheat + description:Invincible to enemies + code:aa24/40/00 + cheat + description:Invincible to shots + code:a9d1/40/00 + cheat + description:Invincible to lava + code:baf5/30/50 + cheat + description:Infinite energy + code:a92a/ce/cd + cheat + description:Infinite lives + code:d3ab/ce/cd + cheat + description:Infinite time + code:d42f/ce/cd + cheat + description:Infinite errors in quizes + code:af55/ce/ad + cheat + description:Max health when you die instead of 00 + code:b4ab/00/0c + cheat + description:Each Ring worth 10 + code:cd71/90/70 + cheat + description:Disable invincibility flickering + code:da1c/10/50 + cheat + description:Dice always at 9 in bonus island + code:e6b5/00/09 + cheat + description:Don't loose health when you touch lava + code:bb06/ce/ad + cheat + description:Start with 9 lives + code:de61/03/09 + cheat + description:Start with max health + code:de79/06/0c + +cartridge sha256:bb30e4f4b1f6d8ccfdbd538b6f20347ed732cd37e8ac0a8305a277cf298b3dc8 + name:Barbie (USA) + cheat + description:Invincibility (blinks) + code:d5b8/f0/d0 + cheat + description:Infinite Z's on Dream Meter + code:dfcc/ce/ad + cheat + description:Can re-enter Barbie's dream an infinite number of times + code:8660/ce/ad + cheat + description:Cannot re-enter Barbie's dream + code:808f/02/00 + cheat + description:Start with 9 Z's (1st credit only) + code:aa80/05/09 + cheat + description:Start with 1 Z (1st credit only) + code:aa80/05/01 + +cartridge sha256:f22944452be3259aac853258759f469e7d2e2447c6178f26cc7bd0e89945bc04 + name:Baseball (USA, Europe) + cheat + description:Balls are considered strikes + code:d752/a5/a9 + +cartridge sha256:8bb20791eb3f4fd2455c33f0eead4538af3372205fba70fd4c3e0867b2c34c9a + name:Baseball Simulator 1.000 (USA) + cheat + description:Balls are considered strikes + code:9e44/02/01 + cheat + description:Strike outs aren't allowed + code:a6e5/e6/a9 + cheat + description:Balls aren't counted + code:8670/e6/a5 + cheat + description:1 strike and you're out + code:86d9/03/01 + cheat + description:2 strikes and you're out + code:86d9/03/02 + cheat + description:5 strikes and you're out + code:86d9/03/05 + cheat + description:Strikes aren't counted + code:8667/e6/a5 + cheat + description:1 ball and you walk + code:86d3/04/01 + cheat + description:2 balls and you walk + code:86d3/04/02 + cheat + description:3 balls and you walk + code:86d3/04/03 + cheat + description:9 balls and you walk + code:86d3/04/09 + +cartridge sha256:b035ec9e2a7fc408c19bb2ffd22dceb0483a73e5f5bf232132628c9d8657b1e8 + name:Baseball Stars (USA) + cheat + description:Balls are considered strikes + code:d4e9/03/00 + +cartridge sha256:5f8807999205f3800e445d6265b66fa6edff0070fc38905f7284f0ad437f9f53 + name:Baseball Stars II (USA) + cheat + description:Balls are considered strikes + code:d4c3/f0/a9 + cheat + description:Strikes do not count + code:d55a/ee/ad + cheat + description:Balls do not count + code:d4d6/ee/ad + cheat + description:One strike for an out + code:d561/03/01 + cheat + description:Two strikes for an out + code:d561/03/02 + cheat + description:Four strikes for an out + code:d561/03/04 + cheat + description:Five strikes for an out (only 3 show on screen) + code:d561/03/05 + cheat + description:One ball for a walk + code:d4dd/04/01 + cheat + description:Two balls for a walk + code:d4dd/04/02 + cheat + description:Three balls for a walk + code:d4dd/04/03 + cheat + description:Five balls for a walk (only 3 show on screen) + code:d4dd/04/05 + cheat + description:Six balls for a walk (only 3 show on screen) + code:d4dd/04/06 + cheat + description:One out per side instead of 3 (against human players) + code:d673/03/01 + cheat + description:Two outs per side (against human players) + code:d673/03/02 + cheat + description:Four outs per side (against human players) + code:d673/03/04 + cheat + description:One out per side instead of 3 (against computer) + code:8315/03/01 + cheat + description:Two outs per side (against computer) + code:8315/03/02 + cheat + description:Four outs per side (against computer) + code:8315/03/04 + cheat + description:Game ends after 1 inning + code:9ca6/23/01 + cheat + description:Game ends after 2 innings + code:9ca6/23/03 + cheat + description:Game ends after 3 innings + code:9ca6/23/06 + cheat + description:Game ends after 4 innings + code:9ca6/23/08 + cheat + description:Game ends after 5 innings + code:9ca6/23/0a + cheat + description:Game ends after 6 innings + code:9ca6/23/0c + cheat + description:Game ends after 7 innings + code:9ca6/23/0e + cheat + description:Game ends after 8 innings + code:9ca6/23/10 + +cartridge sha256:b9af9efdf490e14895e7980097a86d2f69d6396383773c221e77c6183a4ab9c8 + name:Bases Loaded II - Second Season (USA) + cheat + description:Balls are considered strikes + code:c6cd/4c/ad + cheat + description:1 strike and you're out - most of the time + code:c891/03/01 + cheat + description:2 strikes and you're out - most of the time + code:c891/03/02 + cheat + description:Outs aren't counted + code:8a1e/ee/ad + cheat + description:Only 2 outs allowed + code:8a1b/02/01 + cheat + description:Only 1 out allowed + code:8a1b/02/00 + cheat + description:Strikes aren't counted + code:89f2/ee/ad+ccd3/ee/ad + cheat + description:Balls aren't counted + code:8a0a/ee/ad+8a0d/ee/ad + +cartridge sha256:5d84d61e7e4c2b7d72a2b4599bd8cc415b71c90d1e332a83f95d96c75bc48efd + name:Bases Loaded 3 (USA) + cheat + description:Computer can't score + code:f754/ee/ad+f75e/fe/ad + cheat + description:Balls are counted as strikes + code:9861/0e/ff+9863/f9/0e + cheat + description:Some strikes aren't counted + code:9895/ee/ad + cheat + description:Balls aren't counted + code:98ca/ee/ad + cheat + description:Strike outs aren't counted + code:8395/ee/ad + cheat + description:1 strike and you're out + code:9892/02/00 + cheat + description:2 strikes and you're out + code:9892/02/01 + cheat + description:Each strike out counts as 3 outs + code:839c/03/01 + cheat + description:Each strike out counts as 2 outs + code:839c/03/02 + cheat + description:5 strike outs allowed + code:839c/03/05 + cheat + description:9 strike outs allowed + code:839c/03/01 + +cartridge sha256:e4aa19e0fd2800b58655eac814e1d9a9aa16d83eabd641789f8a6625591063a3 + name:Bases Loaded 4 (USA) + cheat + description:Balls are considered strikes + code:a34a/0c/ff+a34c/f9/0e + cheat + description:Balls do not count + code:a37c/ee/ad + cheat + description:Strikes do not count + code:a39f/ee/ad + cheat + description:2 strikes and you're out + code:a39c/02/01 + cheat + description:4 strikes and you're out + code:a39c/02/03 + cheat + description:1 ball and you walk + code:a374/03/00 + cheat + description:2 balls and you walk + code:a374/03/01 + cheat + description:3 balls and you walk + code:a374/03/02 + cheat + description:Some batters start with count of 1 and 1 - 2P mode + code:9e73/00/01+849e/00/01 + cheat + description:Some batters start with count of 2 and 2 - 2P mode + code:9e73/00/02+849e/00/02 + +cartridge sha256:a37c97557fc4a8853057c1d193ba9144e560152a2723338a0490ee4fcac5227a + name:Bashi Bazook - Morphoid Masher (USA) (Proto) + cheat + description:Invincibility + code:948f/29/a9 + cheat + description:Everything is Free + code:8201/17/00+8202/8d/ad + cheat + description:One Hit Kills + code:b168/90/d0 + +cartridge sha256:f28821df0114eb6cff1d7b4eadcee87713591709da1dd8b3525cf250156111f1 + name:Batman - The Video Game (USA) + cheat + description:Infinite health + code:9a10/c6/11 + cheat + description:Infinite health (alt) + code:c6c6/c5 + cheat + description:Regenerates health meter (except Joker's gun) + code:c6c4/c5 + cheat + description:Infinite lives + code:c634/c6/a5 + cheat + description:Infinite weapons + code:9c81/85/a5 + cheat + description:Infinite bullets on pick-up + code:9c7b/e5/24 + cheat + description:Hit anywhere + one hit kills + code:9b47/4c/ad + cheat + description:Extra health on heart pick-up + code:9e81/01/04 + cheat + description:Double usual bullets on pick-up + code:9e52/0a/14 + cheat + description:Half usual bullets on pick-up + code:9e52/0a/05 + cheat + description:Multi-jump + code:94b5/dc/f5 + cheat + description:Start with 1 life + code:dc8c/02/00 + cheat + description:Start with 6 lives + code:dc8c/02/05 + cheat + description:Start with 9 lives + code:dc8c/02/08 + cheat + description:Invincibility + code:00cc/a4 + cheat + description:Infinite health (alt 2) + code:00b7/08 + cheat + description:Infinite weapons (alt) + code:00b8/63 + cheat + description:Super gun (cannot change weapons) + code:00a6/ff + +cartridge sha256:183ede1115b428b046ae223f27e2db366a5b62c43f52b6fced5f22a57d39e663 + name:Batman - Return of the Joker (USA) + cheat + description:Invincibility + code:b192/8d/ad+aa54/8d/ad+af21/8d/ad + cheat + description:Invincible to bosses + code:b06d/85/ad + cheat + description:Invincibility lasts until next stage + code:9549/02/00 + cheat + description:Protection from enemy bullets + code:af21/8d/ad + cheat + description:Protection from collisions + code:aa54/8d/ad + cheat + description:Protection from electric grids + code:82d6/8d/ad + cheat + description:Infinite health + code:c603/8d/ad + cheat + description:Infinite weapons + code:c4dc/ce/cd + cheat + description:Infinite lives + code:d52a/ce/ad + cheat + description:Each Backpack Energy Capsule counts as two + code:ab6e/02/04 + cheat + description:Each Backpack Energy Capsule counts as four + code:ab6e/02/08 + cheat + description:Don't get stunned when hit + code:b18d/8d/2c + cheat + description:Stand your ground + code:b1b8/04/00+b1c0/8c/2c + cheat + description:Intense knock-back when hit (may get stuck if you knock back into a wall) + code:b1b6/ff/fe+b1bc/00/01 + cheat + description:Continue game with 3 life increments instead of 8 + code:915e/0e/04 + cheat + description:Start with 7 Backpack Energy Capsules instead of none + code:d499/fe/0c + cheat + description:Start with 3 life increments instead of 8 + code:d49e/0e/04 + cheat + description:Start with 1 life + code:d4a3/02/00 + cheat + description:Start with 100 lives + code:d4a3/02/64 + cheat + description:Invincibility after first hit + code:0479/00 + cheat + description:Infinite health + code:0478/08 + cheat + description:Infinite Baterangs + code:0141/0a + cheat + description:Bosses lose health quickly + code:00aa/00 + cheat + description:Start on stage 1-2 + code:0400/02 + cheat + description:Start on stage 1-3 + code:0400/04 + cheat + description:Start on stage 2-1 + code:0400/06 + cheat + description:Start on stage 2-2 + code:0400/08 + cheat + description:Start on stage 3-1 + code:0400/0a + cheat + description:Start on stage 3-2 + code:0400/0c + cheat + description:Start on stage 3-3 + code:0400/0e + cheat + description:Start on stage 4-1 + code:0400/10 + cheat + description:Start on stage 4-2 + code:0400/12 + cheat + description:Start on stage 4-3 + code:0400/14 + cheat + description:Start on stage 5-1 + code:0400/16 + cheat + description:Start on stage 5-2 + code:0400/18 + cheat + description:Start on stage 6-1 + code:0400/1a + cheat + description:Start on stage 6-2 + code:0400/1c + cheat + description:Start on stage 6-3 + code:0400/1e + cheat + description:Start on stage 7-1 + code:0400/20 + cheat + description:Start on stage 7-2 + code:0400/22 + +cartridge sha256:8b7363e037883aaa36d2c643c36a6f09ce49bd515f166154bd2a48e0a6468b9d + name:Batman Returns (USA) + cheat + description:Infinite Batarangs + code:c4dc/ce/ad + cheat + description:Don't lose health from spin attack + code:8a65/02/00 + cheat + description:Almost infinite lives and health + code:c603/8d/2c + cheat + description:Small hearts give more health + code:81d1/10/30 + cheat + description:Hit anywhere + code:a1bd/90/d0+a1b2/90/d0 + cheat + description:One hit kills + code:a215/b0/24 + cheat + description:Power punch + code:a546/02/0f + cheat + description:Power slide attack + code:a54b/05/0f + cheat + description:Power jump kick + code:a54a/05/1a + cheat + description:Walk faster horizontally + code:8dd4/01/04+8dee/01/04 + cheat + description:Start with 9 Batarangs + code:802b/05/09 + cheat + description:Start with full health + code:8013/28/3f + cheat + description:Start with less health + code:8013/28/10 + cheat + description:Invincibility (blinking) + code:04c8/15 + cheat + description:Infinite health + code:0140/41 + cheat + description:Infinite Batarangs (alt) + code:0141/09 + cheat + description:0 health - Enemy 1 + code:0145/00 + cheat + description:0 health - Enemy 2 + code:0146/00 + cheat + description:0 health - Enemy 3 + code:0147/00 + +cartridge sha256:64832bef6533d98f49e807c000537c8cb26ef94e6c3f871b8b6b35c5a11e427b + name:BattleCity (Japan) + cheat + description:Infinite freeze time once you obtain a clock + code:dc00/ce/ad + cheat + description:256 seconds of freeze time once you obtain a clock + code:e9f6/0a/ff + +cartridge sha256:a50c0b6d93f7e20ecfd8a95abd5b7bccd4cf290901376fcf9e4053b3f964fca1 + name:Battle Formula (Japan) + cheat + description:Infinite life + code:9ad8/85/a5 + +cartridge sha256:d095eab5376c2b7c4f1c09018c9591598831c557e0b691c01ca2480e49e60c0a + name:Battle of Olympus, The (USA) + cheat + description:Invincibility + code:8491/d0/f0 + cheat + description:Infinite health + code:d8df/85/a5 + cheat + description:Hit anywhere + code:846d/d0/18+846e/ee/60 + cheat + description:Get items from anywhere (press down) + code:8ded/e9/00+8de7/b0/24 + cheat + description:Start with less stamina + code:c031/10/08 + cheat + description:Start with more stamina + code:c031/10/20 + cheat + description:Start with Sandals of Hermes + code:ca01/02/00 + cheat + description:Start with Staff of Fennel + code:c037/00/01+c03c/85/24+c03e/85/24 + cheat + description:Start with Sword + code:c037/00/02+c03c/85/24+c03e/85/24 + cheat + description:Start with Divine Sword + code:c037/00/03+c03c/85/24+c03e/85/24 + +cartridge sha256:c49a5d7f565646d76bdc307ccb0202197f579b77c5bf5ea409b5cb29f72edf3a + name:Battleship (USA) + cheat + description:1 round per level + code:8cb3/05/01 + cheat + description:3 rounds per level + code:8cb3/05/03 + cheat + description:Each ship can take only one hit + code:8d31/b9/ad + cheat + description:You only have RIM-66 missiles + code:8d21/95/85 + cheat + description:Start on level 2 + code:8c54/00/01+8c59/85/86+8c55/85/86 + cheat + description:Start on level 3 + code:8c54/00/02+8c59/85/86+8c55/85/86 + cheat + description:Start on level 4 + code:8c54/00/03+8c59/85/86+8c55/85/86 + cheat + description:Start on level 5 + code:8c54/00/04+8c59/85/86+8c55/85/86 + cheat + description:Start on level 6 + code:8c54/00/05+8c59/85/86+8c55/85/86 + cheat + description:Start on level 7 + code:8c54/00/06+8c59/85/86+8c55/85/86 + cheat + description:Start on level 8 + code:8c54/00/07+8c59/85/86+8c55/85/86 + +cartridge sha256:56d25e05dde2048c3a9b4e36ab5325091310ce2b65171615b5596fc542db66fa + name:Battletoads (USA) + cheat + description:Infinite lives + code:a3a2/d6/24 + cheat + description:One hit kills + code:d383/b9 + cheat + description:Enemies easier to kill + code:d383/9d/2c + cheat + description:Mega-jumping + code:8e53/d8/f0 + cheat + description:Double health from flies + code:cfba/08/10 + cheat + description:Maximum health from flies + code:cfba/08/2f + cheat + description:Super fast punching + code:a6b5/01/00 + cheat + description:Force 2-player mode + code:e5f0/31/00 + cheat + description:Start with 0 lives + code:e5fa/03/00 + cheat + description:Start with 1 life + code:e5fa/03/01 + cheat + description:Start with 6 lives + code:e5fa/03/06 + cheat + description:Start with 9 lives + code:e5fa/03/09 + cheat + description:Start on level 2 - Wookie Hole + code:8320/00/02 + cheat + description:Start on level 3 - Turbo Tunnel + code:8320/00/03 + cheat + description:Start on level 4 - Arctic Cavern + code:8320/00/04 + cheat + description:Start on level 5 - Surf City + code:8320/00/05 + cheat + description:Start on level 6 - Karnath's Lair + code:8320/00/06 + cheat + description:Start on level 7 - Volkmire's Inferno + code:8320/00/07 + cheat + description:Start on level 8 - Intruder Excluder + code:8320/00/08 + cheat + description:Start on level 9 - Terra Tubes + code:8320/00/09 + cheat + description:Start on level 10 - Rat Race + code:8320/00/0a + cheat + description:Start on level 11 - Clinger Winger + code:8320/00/0b + cheat + description:Start on level 12 - The Revolution + code:8320/00/0c + cheat + description:Invincibility + code:0574/02 + cheat + description:Infinite lives (alt) + code:0011/05 + +cartridge sha256:4f67a81cc978e5aaf8aa03046c27ddc954f835e2110e346bc28d35f6b4ac61ca + name:Battletoads-Double Dragon (USA) + cheat + description:Infinite lives (except stage 4) + code:b0a0/d6/24 + cheat + description:Infinite lives on stage 4 + code:995a/d6/24 + cheat + description:Bonus score now gives invincibility (instead of invincibility pod) + code:f44d/2c/7d + cheat + description:Longer invincibility + code:f451/05/1f + cheat + description:Even longer invincibility + code:f451/05/35 + cheat + description:Double Dragon super punch + code:88de/02/10 + cheat + description:Battletoads super punch + code:88bb/04/10 + cheat + description:Stronger enemies + code:d1b1/0f/20 + cheat + description:Start with 10 continues + code:82eb/02/09 + cheat + description:Start with full lives + code:9889/03/05 + cheat + description:Start with 1 life + code:9889/03/00 + cheat + description:Infinite lives - P1 + code:0011/05 + cheat + description:Infinite lives - P2 + code:0012/05 + cheat + description:0 hits to SMASH! enemies + code:051c/00+051d/00+051e/00+051f/00+0520/00+0521/00 + +cartridge sha256:3b3865e6e44f8ef749e8a9509651a6fad688b8d744fab22974a6f4cb9e7f2b0b + name:Beauty and the Beast (Europe) + cheat + description:Infinite hits + code:cf7c/c6/bd + cheat + description:Infinite lives + code:d48a/c6/bd + cheat + description:Infinite time + code:d2a8/e6/bd + +cartridge sha256:b9434d2f359f6e464da36fbcf6d9eb794b7edff03b89467d1609158f13bfef52 + name:Beetlejuice (USA) + cheat + description:Invincibility + code:dc05/f0/d0 + cheat + description:Invincibility (blinking) + code:d71f/8d/ad + cheat + description:Infinite hits + code:d716/01/00 + cheat + description:Infinite lives + code:d417/ce/ad + cheat + description:Take fewer hits to die + code:8095/02/01+d3ff/02/01 + cheat + description:Start with 1 life + code:8090/03/01 + cheat + description:Start with 6 lives + code:8090/03/06 + cheat + description:Start with 9 lives + code:8090/03/09 + +cartridge sha256:f93163a51f4a671c5f4da390d4d286d6d8440d87dfe24285c40ed73dc422bf7d + name:Bee 52 (USA) (Unl) + cheat + description:Invincibility + code:e375/f0/d0 + cheat + description:Invincibility (alt) + code:e1f3/85/a5 + cheat + description:Infinite lives + code:cdd1/ce/ad + cheat + description:Hit anywhere - sting attack + code:e321/d0/50+e322/3b/18 + cheat + description:Keep pick-ups + code:fe2a/20/ad + cheat + description:Don't get stunned + code:d65e/d0/24 + cheat + description:Fly quicker + code:ceff/30/24+cf1b/10/24 + cheat + description:Start with 1 life + code:fc24/03/01 + cheat + description:Start with 6 lives + code:fc24/03/06 + cheat + description:Start with 9 lives + code:fc24/03/09 + +cartridge sha256:2366af9fc0512d39bfa6e908b4caa12be3d21225af49274ffe2ff51cf0b9c1e6 + name:Best of the Best - Championship Karate (USA) + cheat + description:Infinite time (round never ends) + code:d2e8/c6/a5 + cheat + description:Each round is 0:10 instead of 1:00 + code:d774/01/00+d771/85/e6 + cheat + description:Each round is 0:20 + code:d774/01/00+d76f/85/a9+d770/5e/02 + cheat + description:Each round is 0:30 + code:d774/01/00+d76f/85/a9+d770/5e/03 + cheat + description:Each round is 0:40 + code:d774/01/00+d76f/85/a9+d770/5e/04 + cheat + description:Each round is 0:50 + code:d774/01/00+d76f/85/a9+d770/5e/05 + cheat + description:Each round is 2:00 + code:d774/01/02 + cheat + description:Each round is 3:00 + code:d774/01/03 + cheat + description:Each round is 4:00 + code:d774/01/04 + cheat + description:Each round is 5:00 + code:d774/01/05 + cheat + description:Each round is 6:00 + code:d774/01/06 + cheat + description:Each round is 7:00 + code:d774/01/07 + cheat + description:Each round is 8:00 + code:d774/01/08 + cheat + description:Each round is 9:00 + code:d774/01/09 + cheat + description:Each match is 1 round instead of 5 + code:da1b/05/01 + cheat + description:Each match is 2 rounds + code:da1b/05/02 + cheat + description:Each match is 3 rounds + code:da1b/05/03 + cheat + description:Each match is 4 rounds + code:da1b/05/04 + cheat + description:Each match is 6 rounds + code:da1b/05/06 + cheat + description:Gain more strength and reflex points in training + code:e80e/04/08+e981/02/00 + cheat + description:Gain more resistance points in training + code:e80e/04/10+e981/02/00 + cheat + description:All physical types are 30 (causes graphic errors near top of screen) + code:d5fc/b1/a9+d5fd/02/1e + cheat + description:All physical types are 50 (causes graphic errors near top of screen) + code:d5fc/b1/a9+d5fd/02/32 + cheat + description:Start with 50 resistance points + code:8002/1e/32 + cheat + description:Start with 50 strength points + code:8001/28/32 + cheat + description:Start with 50 reflex points + code:8003/14/32 + cheat + description:Start with 70 resistance points + code:8002/1e/46 + cheat + description:Start with 70 strength points + code:8001/28/46 + cheat + description:Start with 70 reflex points + code:8003/14/46 + +cartridge sha256:18c134f8cc7effc0b90dcca86a27c305cbd7dadfb159689c89790c7fe4ff9b77 + name:Bible Adventures (USA) (v1.4) (Unl) + cheat + description:Infinite health + code:dae4/9d/bd + +cartridge sha256:b56f867ad6b067f9ca7e46afb8e7a953fa281404232e2497c88e43448a2c3a57 + name:Bible Adventures (USA) (v1.3) (Unl) + cheat + description:Infinite health + code:dae8/9d/bd + +cartridge sha256:981b39b22c9b17055c90a612b9c8ea6711541ff5196018043f3516ed238f3ce9 + name:Bible Adventures (USA) (v1.2) (Unl) + cheat + description:Infinite health + code:dafe/9d/bd + +cartridge sha256:88ee64119746de659f70f3d459c62dd2af3b21f29f5064ea14f0fb03904cbcfe + name:Bible Adventures (USA) (v1.1) (Unl) + cheat + description:Infinite health + code:daa3/9d/bd + +cartridge sha256:2807c405f072a1e828cbdd4812822ec301979472fd9b8c6225aa4d1dca89613c + name:Bible Adventures (USA) (Unl) + cheat + description:Infinite health + code:d61c/9d/bd + +cartridge sha256:32fa00d52f39b053c30061d6789944fc61c0c88c885bd8248ff5771fd2f78ae6 + name:Bigfoot (USA) + cheat + description:Infinite nitros + code:abce/de/bd + cheat + description:Longer nitro boost + code:abca/64/ff + cheat + description:Shorter nitro boost + code:abca/64/20 + cheat + description:Engines are half price + code:8cc1/08/04 + cheat + description:Engines cost more + code:8cc1/08/09 + cheat + description:Tires are half price + code:8cc2/06/03 + cheat + description:Tires cost more + code:8cc2/06/09 + cheat + description:Transmission work is half price + code:8cc3/04/02 + cheat + description:Transmission work is double price + code:8cc3/04/08 + cheat + description:Suspension is half price + code:8cc4/02/01 + cheat + description:Suspension is triple price + code:8cc4/02/06 + cheat + description:P1 gets P2's nitros + code:b16f/fe/ee+b168/8d/ad + +cartridge sha256:b183c0952994cadc1c8d6dd290730f43ecacb051d3dfe53784578635a1049455 + name:Bill & Ted's Excellent Video Game Adventure (USA) + cheat + description:Infinite skeleton keys + code:b249/ce/ad + cheat + description:Infinite coins for locals + code:c90b/8d/ad + cheat + description:Infinite Good Stuff + code:989b/99/b9 + cheat + description:Phone call segments cost only 1 coin + code:e196/8d/ad + cheat + description:Ted starts with 99 coins instead of 15 + code:cecb/15/99 + cheat + description:Bill starts with 99 coins + code:e1d8/15/99 + cheat + description:Ted starts with 5 coins + code:cecb/15/05 + cheat + description:Bill starts with 5 coins + code:e1d8/15/05 + +cartridge sha256:ddf58f90fa5966137e71a0f30a162bf03b3e8b1b99f4f1d16cac26d5e2cf5b35 + name:Bill Elliott's NASCAR Challenge (USA) + cheat + description:Accelerate faster + code:c38e/90/b0 + cheat + description:Infinite 'free time' in the pits + code:843e/ce/ad + cheat + description:Freeze timer while crew works on car in pits + code:8692/ce/ad + +cartridge sha256:4f59f3ef6045be753ed5f7988e4b302b7f71216354a644f760f4a0aa43af7d22 + name:Bio Force Ape (Japan) (En) (Proto) + cheat + description:Infinite health + code:ba5f/8d/ad + cheat + description:Walk through walls + code:9600/38/60+96b0/38/60 + cheat + description:Start on level 2 + code:8427/00/01 + cheat + description:Start on level 3 + code:8427/00/02 + +cartridge sha256:92c481350b63c57385834dfa0ab02aeb527df7e80cec14a3e1a1a77118cd38d1 + name:Bio Miracle Bokutte Upa (Japan) + cheat + description:Hit anywhere - normal enemies + code:e642/45/00+bc96/26/00 + +cartridge sha256:aeb61fd5cf5a5ed73344c46a43f8a8d539f601ff57e8f56c49bc1caea4ab3d9e + name:Bionic Commando (USA) + cheat + description:Invincibility + code:e7d7/ce/60 + cheat + description:Infinite lives in main game + code:b77d/c6/a5 + cheat + description:Infinite lives in sub-game + code:81ba/c6/a5 + cheat + description:Don't take damage from bullets and collisions + code:e7d7/ce/ad + cheat + description:Don't take damage from spikes + code:ae72/ce/ee + cheat + description:Don't take damange from bullets and collisions in sub-game + code:9138/ce/ad + cheat + description:Hit anywhere + code:ec1b/20/60+90c9/98/60+ecfb/38/60+8eaf/bd/60+eb46/99/ad + cheat + description:Autofire - main game + code:b92b/f8/fa + cheat + description:Longer grapple line - sidescrolling levels + code:9276/30/50+928c/40/56+9260/3a/5f + cheat + description:Longest grapple line - sidescrolling levels + code:9277/90/d0+9261/90/d0+928d/90/d0 + cheat + description:Longer range for normal 3-way gun - sidescrolling levels + code:bde8/09/17 + cheat + description:Longer range for fireball 3-way gun - sidescrolling levels + code:be44/0c/15 + cheat + description:Use with BIO Code 11 for improved autofire with normal gun + code:b949/0a/00 + cheat + description:Have all items (using the hidden gun will crash the game) + code:b042/f0/b0+b126/f0/d0 + cheat + description:Start with 3 life energy capsules + code:ca39/00/03+ca3b/be/ea + cheat + description:Start with 1 life + code:ca35/02/00 + cheat + description:Start with double lives + code:ca35/02/05 + cheat + description:Start with triple lives + code:ca35/02/08 + cheat + description:Start with 3-way gun + code:ca4f/cb/ce + +cartridge sha256:99806081ba58c0a108bcc61468972d4b2319de74d7dca1bba932f1a3bd2fe1cc + name:Black Bass, The (USA) + cheat + description:Always have fish checking out your lure + code:03c7/ff + cheat + description:Fish on screen will always bite your lure + code:03f7/00 + cheat + description:Rank 1st place + code:0445/01 + +cartridge sha256:abde6fc87b2d90e0b40cd3420d4b7381e1f23285efbbdc62fd27b59c591ad2cc + name:Blades of Steel (USA) + cheat + description:Invincible in minigame + code:a77d/d0/50 + cheat + description:Faster timer + code:c6b6/07/04 + cheat + description:Slower timer + code:c6b6/07/14 + cheat + description:Player with puck don't slow down + code:d81d/20/00 + cheat + description:Players can take only one punch + code:a423/05/01 + cheat + description:Players 2/CPU don't throw punches + code:a6ce/49/a9+a5d2/bd/ad + cheat + description:Start a new game to view the ending + code:c655/03/07 + +cartridge sha256:7a26c62a9b1605cbedf7cd5b2672aa0fc15b688b227a6cb57dbf74aa71a05f1c + name:Blaster Master (USA) + cheat + description:Infinite car health + code:89b4/ea + cheat + description:Enemies are killed instantly + code:d70b/07 + cheat + description:Infinite lives + code:c537/c6/a5 + cheat + description:Infinite Hover + code:9328/c6/a5 + cheat + description:Infinite Homing Missiles + code:9858/ce/2c + cheat + description:Infinite Thunderbreaks + code:99c0/ce/2c + cheat + description:Infinite Multi-Warheads + code:9ade/ce/2c + cheat + description:Start with all abilities + code:c2cc/00/ff + cheat + description:Start with 5 of each weapon + code:c309/00/05 + cheat + description:Start with 10 of each weapon + code:c309/00/0a + cheat + description:Start with 15 of each weapon + code:c309/00/0f + cheat + description:Start with 99 of each weapon + code:c309/00/63 + cheat + description:Start with 99 of each weapon and max Hover + code:c309/00/ff + cheat + description:Start with 1 life + code:c302/02/00 + cheat + description:Start with 6 lives + code:c302/02/05 + cheat + description:Start with 9 lives + code:c302/02/08 + cheat + description:Start on world 2 + code:c2fe/08/09 + cheat + description:Start on world 3 + code:c2fe/08/0a + cheat + description:Start on world 4 + code:c2fe/08/0b + cheat + description:Start on world 5 + code:c2fe/08/0c + cheat + description:Start on world 6 + code:c2fe/08/0d + cheat + description:Start on world 7 + code:c2fe/08/0e + cheat + description:Start on world 8 + code:c2fe/08/0f + cheat + description:Start at the boss of world 1 + code:c2fd/09/a9+c2fe/08/00 + cheat + description:Start at the boss of world 2 + code:c2fd/09/a9+c2fe/08/01 + cheat + description:Start at the boss of world 3 + code:c2fd/09/a9+c2fe/08/02 + cheat + description:Start at the boss of world 4 + code:c2fd/09/a9+c2fe/08/03 + cheat + description:Start at the boss of world 5 + code:c2fd/09/a9+c2fe/08/04 + cheat + description:Start at the boss of world 6 + code:c2fd/09/a9+c2fe/08/05 + cheat + description:Start at the boss of world 7 + code:c2fd/09/a9+c2fe/08/06 + cheat + description:Start at the boss of world 8 + code:c2fd/09/a9+c2fe/08/07 + cheat + description:Die to see ending + code:c53a/16/42 + cheat + description:Invincibility + code:007e/00 + cheat + description:Infinite health (alt) + code:040d/ff + cheat + description:Infinite Hover (alt) + code:0092/ff + cheat + description:Infinite lives (alt) + code:00dd/03 + cheat + description:Infinite Homing Missiles (alt) + code:06f0/63 + cheat + description:Infinite Thunderbreaks (alt) + code:06f1/63 + cheat + description:Infinite Multi-Warheads (alt) + code:06f2/63 + cheat + description:Full Gun Power - Jason + code:00c3/ff + cheat + description:Most end bosses die instantly + code:047d/00 + +cartridge sha256:e311f33f98a4461f9ca79e2df863323d42572234bc59321bb9fb39ca1b18d0cf + name:Blue Marlin, The (USA) + cheat + description:Line is a 1000 yards long + code:edf3/02/04 + cheat + description:Catch fish right after they bite - most of the time + code:ead9/c8/00 + cheat + description:When fish bite they are close to the boat + code:ead9/c8/09 + cheat + description:Line is set to 153 feet + code:ead9/c8/99 + cheat + description:Pull fish in quicker + code:edda/00/01 + cheat + description:Vitality always at max + code:ec5c/69/a9+ec5d/01/0f + +cartridge sha256:46fb05f80167bd185bd6eef40e1f86a0dcdd36e250ef8e2b29a575550d75473a + name:Blues Brothers, The (USA) + cheat + description:Invincibility + code:ed66/f0/d0+e420/f0/d0 + cheat + description:Infinite health + code:e098/de/bd + cheat + description:Infinite lives + code:e0bf/de/bd + cheat + description:Multi-jump + code:f1d0/00/01 + cheat + description:Invincibility (alt) (blinking) + code:03c2/02 + cheat + description:Infinite energy (alt) + code:042a/03 + cheat + description:Infinite lives (alt) + code:0428/02 + +cartridge sha256:7e59dcd2576d2e83f6f628a7bb8d5f1e54fa300f7ecb9aa5e1e0f6d967be8371 + name:Bo Jackson Baseball (USA) + cheat + description:Balls are considered strikes + code:c487/18/00 + +cartridge sha256:2967746c2a434c97a074b14d894ea132fab8e443899f6ca870718eeee1669039 + name:Bomberman (USA) + cheat + description:Immune to explosions + code:c6e5/a5/a9 + cheat + description:Infinite time + code:c650/a5 + cheat + description:Infinite lives + code:c498/a5 + cheat + description:Hit anywhere (all enemies killed with one bomb) + code:c716/37/00+c71d/30/00 + cheat + description:Remove all breakable blocks + code:ca6a/02/00 + cheat + description:Never lose Detonator once obtained + code:c48b/85/24 + cheat + description:Increase Bomb detonation time + code:cd2b/a0/ff + cheat + description:Reduce Bomb detonation time + code:cd2b/a0/70 + cheat + description:Use up to 10 Bombs + code:cd07/a6/a2+cd08/74/09 + cheat + description:Walk through walls + code:cf7f/49/a9+cf80/01/00 + cheat + description:Decrease time + code:c44c/96 + cheat + description:Increase timer + code:c44c/fe + cheat + description:Start with double power Bomb blasts + code:c3c8/10/20 + cheat + description:Start with triple power Bomb blasts + code:c3c8/10/30 + cheat + description:Start with maximum power Bomb blasts + code:c3c8/10/80 + cheat + description:Start with Detonator, max Bomb power and use up to 10 Bombs + code:c3dc/2d/00 + cheat + description:Start with and keep Detonator + code:c98e/a5/a9+ccdf/0e/00 + cheat + description:Start with 1 life + code:c3ab/00 + cheat + description:Start with 10 lives + code:c3ab/09 + cheat + description:Start on stage 10 + code:c3b7/0a + cheat + description:Start on stage 20 + code:c3b7/14 + cheat + description:Start on stage 30 + code:c3b7/1e + cheat + description:Start on stage 40 + code:c3b7/28 + cheat + description:Start on stage 50 + code:c3b7/32 + cheat + description:Invincibility + code:005c/00 + cheat + description:Immune to explosions (alt) + code:0079/01 + cheat + description:Infinite time (alt) + code:0093/ee + cheat + description:Infinite lives (alt) + code:0068/09 + cheat + description:Max Bomb power + code:0073/80 + cheat + description:Use up to 10 Bombs (alt) + code:0074/0a + cheat + description:Walk through walls (alt) + code:0076/01 + cheat + description:Have Detonator + code:0077/01 + cheat + description:Start on stage 50 (alt) + code:0058/32 + +cartridge sha256:83cb47fda376900e8c1d8eef5c413229fb6cacaff43201afd421c71610c20368 + name:Bomberman II (USA) + cheat + description:Infinite lives + code:cac4/ce/2c + cheat + description:Infinite time + code:98af/ce/2c + cheat + description:Super start + code:ce2d/00/04+ce5c/00/04 + cheat + description:Immune to explosions + code:87a1/a5/a9+87a2/ae/01 + cheat + description:Walk through walls + code:879c/a5/a9+879d/ad/01 + cheat + description:Always have Detonator + code:87c2/03/00 + cheat + description:Hit anywhere (kill all enemies with one bomb) + code:8327/2f/1b+8328/29/61+8326/b1/ad+8329/80/ea + cheat + description:Remove all breakable bricks + code:b946/20/00+b94f/20/ad + cheat + description:Slower timer + code:98ab/3b/63 + cheat + description:Faster timer + code:98ab/3b/1e + cheat + description:Bomb has a longer fuse + code:928b/4b/7f + cheat + description:Bomb has a shorter fuse + code:928b/4b/20 + cheat + description:Stop Bombs from exploding + code:ba95/de/2c + cheat + description:Dollar sign acts as flame face + code:9056/c7/80 + cheat + description:Dollar sign acts as Bomb + code:9056/c7/74 + cheat + description:Dollar sign acts as heart with Bomb + code:9056/c7/8c + cheat + description:Dollar sign acts as skate + code:9056/c7/91 + cheat + description:Dollar sign acts as vest for a short time + code:9056/c7/a9 + cheat + description:Start with 1 life + code:c980/02/00 + cheat + description:Start with 6 lives + code:c980/02/05 + cheat + description:Start with 9 lives + code:c980/02/08 + cheat + description:Invincibility (except in normal game) - P1 + code:0069/05 + cheat + description:Invincibility (except in normal game) - P2 + code:006a/05 + cheat + description:Invincibility (except in normal game) - P3 + code:006b/05 + cheat + description:Infinite time (hundred's digit) + code:0559/09 + cheat + description:Infinite time (ten's digit) + code:055a/09 + cheat + description:Infinite time (one's digit) + code:055b/09 + cheat + description:Infinite lives - P1 + code:04e5/09 + cheat + description:Max Bomb power - P1 + code:0093/0c + cheat + description:Max Bomb power - P2 + code:0094/0c + cheat + description:Max Bomb power - P3 + code:0095/0c + cheat + description:Max Bomb quantity - P1 + code:0090/0c + cheat + description:Max Bomb quantity - P2 + code:0091/0c + cheat + description:Max Bomb quantity - P3 + code:0092/0c + +cartridge sha256:b3d82e2818aea6caa69dcfe7d56197a7a51afe87819527880cf08876d1a988de + name:Bonk's Adventure (USA) + cheat + description:Infinite lives + code:a765/ce/ad + cheat + description:Hit anywhere + code:a52a/03/00+a27e/27/53 + cheat + description:Super-jump when normal + code:808f/0c/24 + cheat + description:Keep speed up after powered down + code:94e5/8d/2c + cheat + description:Gain energy from picking up smiles + code:a756/00/04 + cheat + description:Start with less initial energy (but more maximum energy) + code:80b0/0c/04 + cheat + description:Start with more energy + code:80b0/0c/18 + cheat + description:Start with 1 life + code:80c0/02/00 + cheat + description:Start with 6 lives + code:80c0/02/05 + cheat + description:Start with 9 lives + code:80c0/02/08 + cheat + description:Start on stage 2-1 + code:80ab/00/07 + cheat + description:Start on stage 3-1 + code:80ab/00/0d + cheat + description:Start on stage 4-1 + code:80ab/00/12 + cheat + description:Start on Stage 5-1 + code:80ab/00/17 + cheat + description:Start on stage 6-1 + code:80ab/00/21 + +cartridge sha256:0e58f270e7b116782e0822f52058eff66465df49527c6f8c6f0eca994d8cae7a + name:Boulder Dash (USA) + cheat + description:Invincibility + code:c603/01/00+c3c9/a5/60+c18f/2f/4d + cheat + description:Infinite lives + code:ae02/d6/b5 + cheat + description:Infinite time + code:cfd5/20/ad + cheat + description:One Diamond needed to open exit + code:ccb6/25/00 + cheat + description:Speed up timer + code:cfd2/3f/1f + cheat + description:Slow down timer + code:cfd2/3f/ff + cheat + description:1 life after continue + code:af98/03/01 + cheat + description:6 lives after continue + code:af98/03/06 + cheat + description:9 lives after continue + code:af98/03/09 + cheat + description:Start with 1 life + code:db40/03/01 + cheat + description:Start with 6 lives + code:db40/03/06 + cheat + description:Start with 9 lives + code:db40/03/09 + +cartridge sha256:a8b6829d8d1e17cc23c8815e0b0add09e26fc5a2a27ad6bba260cef926535af2 + name:Bram Stoker's Dracula (USA) + cheat + description:Invincibility + code:d1e0/d0/50 + cheat + description:Invincibility after getting hit + code:ba46/20/ad + cheat + description:Infinite health (except falling off cliffs) + code:b5a5/de/bd + cheat + description:Infinite health + code:b5a5/de/ad + cheat + description:Infinite lives + code:e3f2/bc/bf + cheat + description:Infinite lives (alt) + code:e3f1/ce/ad + cheat + description:Infinite time + code:c1e1/01/00 + cheat + description:Infinite time (alt) + code:c1fc/8d/ad+c1f7/8d/ad + cheat + description:Infinite ammo + code:ed7e/ce/ad + cheat + description:Infinite weapons (except scene 1 daytime) + code:ed80/02/bb + cheat + description:Faster timer + code:c1e1/01/02 + cheat + description:Always have 63 ammo + code:c277/05/00 + cheat + description:Disable axe + code:f1dc/02/ff + +cartridge sha256:e1487d23800aa2c29cb9da6f2bf538aa10044930ef566d087f7acf1aa649fb9e + name:BreakThru (USA) + cheat + description:Infinite lives - both players + code:c13f/c6/24 + cheat + description:Infinite weapon time + code:d24b/c6/24 + cheat + description:Start each life with 3-way firing and 99 seconds + code:c33e/00/63 + cheat + description:Start with 1 life - P1 + code:c2b9/03/01 + cheat + description:Start with 6 lives - P1 + code:c2b9/03/06 + cheat + description:Start with 9 lives - P1 + code:c2b9/03/09 + cheat + description:Start with 1 life - P2 + code:c2c4/03/01 + cheat + description:Start with 6 lives - P2 + code:c2c4/03/06 + cheat + description:Start with 9 lives - P2 + code:c2c4/03/09 + cheat + description:Start on level 2 + code:c27b/01/02 + cheat + description:Start on level 3 + code:c27b/01/03 + cheat + description:Start on level 4 + code:c27b/01/04 + cheat + description:Start on level 5 + code:c27b/01/05 + +cartridge sha256:fde81fc5af055819700842db8650077d64b853f95b3542bf12f039a6df48115d + name:Break Time - The National Pool Tour (USA) + cheat + description:Start in Milwaukee + code:836d/85/86+836c/00/01 + cheat + description:Start in Atlanta + code:836d/85/86+836c/00/02 + cheat + description:Start in Los Angeles + code:836d/85/86+836c/00/03 + cheat + description:Start in Las Vegas + code:836d/85/86+836c/00/04 + +cartridge sha256:3bcce1ff03b55c20eeaefa44f35f19b3f06b3ff88a86ed51968bad9bd44d9144 + name:Bubble Bath Babes (USA) (Unl) + cheat + description:Infinite credits + code:930b/c6/a5 + cheat + description:View slideshow + code:8045/01/08+892a/85/e6+892b/64/88+8935/0b/0c + +cartridge sha256:31523322db8f94e7244f6e2d958692a412c1395fc744601d83d1e5111eff9042 + name:Bubble Bobble (USA) + cheat + description:Skip only 2 levels + code:cb11/04/02 + cheat + description:Skip 10 levels + code:cb11/04/0a + cheat + description:Lots of bubble power + code:d533/19/00 + cheat + description:Monsters move faster + code:8478/01/02+8488/fe/ff + cheat + description:Monsters move super fast + code:8478/01/03+8488/fd/ff + cheat + description:Angry monsters move faster + code:847d/02/03+848d/fe/fd + cheat + description:Always wear turbo shoes + code:d47d/06/00+d4d1/06/00 + cheat + description:Start with 1 life - both players + code:ca38/03/01 + cheat + description:Start with 6 lives - both players + code:ca38/03/06 + cheat + description:Start with 9 lives - both players + code:ca38/03/09 + cheat + description:Start on level 10 + code:ca30/01/0a + cheat + description:Start on level 25 + code:ca30/01/19 + cheat + description:Start on level 50 + code:ca30/01/32 + cheat + description:Start on level 75 + code:ca30/01/4b + cheat + description:Invincibility - P1 + code:003f/2f + cheat + description:Invincibility - P2 + code:0053/2f + cheat + description:Infinite lives - P1 + code:002e/09 + cheat + description:Infinite lives - P2 + code:0042/09 + cheat + description:Float + code:0032/0a + cheat + description:Have Long Shot + code:0030/02 + cheat + description:Have Rapid Shot + code:0030/04 + cheat + description:Have Long and Rapid Shot + code:0030/06 + cheat + description:Have Lightning Shot + code:0030/45 + +cartridge sha256:d02b24e4ee8e639bf77af6746d6b3a92e996c0d2298861071851e2beec0ef812 + name:Bucky O'Hare (USA) + cheat + description:Infinite lives + code:ce69/c6/a5 + cheat + description:Hit anywhere + code:869a/b0/24+867f/b0/24+8684/69/a9+869f/69/a9 + cheat + description:One hit kills + code:db4e/9d/bd + cheat + description:Multi-jump + code:8fb9/b0/00+8fa3/10/00 + cheat + description:Double Bucky's special health + code:bf06/8c/98 + cheat + description:Triple Bucky's special health + code:bf06/8c/a4 + cheat + description:All characters always selectable + code:8cce/10/f0 + cheat + description:All characters start with normal special health + code:bf0a/0c/8c + cheat + description:All characters start with 2x special health + code:bf0a/0c/98 + cheat + description:All characters start with 3x special health + code:bf0a/0c/a4 + cheat + description:1 life after continue + code:cfa6/02/00 + cheat + description:6 lives after continue + code:cfa6/02/05 + cheat + description:10 lives after continue + code:cfa6/02/09 + cheat + description:Press Start to complete the level + code:c3d5/01/08+c3d8/01/00+c3d7/09/1c+c3d4/49/a9 + cheat + description:Start a new game to see ending + code:cdb8/02/09 + cheat + description:Start with 1/2 health + code:bf14/14/06 + cheat + description:Start with 1 life + code:bf02/02/00 + cheat + description:Start with 6 lives + code:bf02/02/05 + cheat + description:Start with 10 lives + code:bf02/02/09 + cheat + description:Infinite health - all characters + code:05a0/14 + cheat + description:Infinite lives - all characters + code:004c/09 + cheat + description:Play as Jenny + code:0034/01 + cheat + description:Play as Dead Eye + code:0034/02 + cheat + description:Play as Blinky + code:0034/03 + cheat + description:Play as Willy DuWitt + code:0034/04 + +cartridge sha256:f01fe9436ca7b50953dbe5b8dd3574612df0e5df1fa9ae50d3f3b5faac818ab2 + name:Bugs Bunny Birthday Blowout, The (USA) + cheat + description:Invincibility + code:a371/60 + cheat + description:Infinite health + code:a384/8d/ad + cheat + description:Infinite lives + code:d464/ce/ad + cheat + description:Mega-jumping Bugs + code:8a17/06/0b + cheat + description:Two hearts of energy gained on pick-up + code:a299/04/08 + cheat + description:Less energy gained on pick-up + code:a299/04/01 + cheat + description:Stunned for longer + code:a370/30/60 + cheat + description:Stunned for less time + code:a370/30/15 + cheat + description:Use hammer when stunned + code:8954/3e/00 + +cartridge sha256:7882e99e08deb1c22a3c38b17e12bd6373af503fd76e97b31699f3d19bef5aad + name:Bugs Bunny Crazy Castle, The (USA) + cheat + description:Invincibility + code:e282/d0/24 + cheat + description:Baddies go as fast as Bugs Bunny + code:c2c2/f0/24 + cheat + description:Make platforms invisible + code:c050/01/04 + cheat + description:Start with super rabbit punches + code:e4a4/f0/29+e4a0/10/29 + cheat + description:Start with infinite lives + code:c11c/c6/a5 + cheat + description:Start with 1 life + code:c031/05/01 + cheat + description:Start with 10 lives + code:c031/05/0a + cheat + description:Start on level 10 + code:c01c/20/ad+ffa6/00/09 + cheat + description:Start on level 20 + code:c01c/20/ad+ffa6/00/13 + cheat + description:Start on level 30 + code:c01c/20/ad+ffa6/00/1d + cheat + description:Start on level 40 + code:c01c/20/ad+ffa6/00/27 + +cartridge sha256:6f37316bbfec539809a946f7020e7a411fe5dbe204157522f01b9c616e918247 + name:Bugs Bunny Fun House (USA) (Beta) + cheat + description:Infinite turns + code:ccfd/ce/ad + cheat + description:Slower timer + code:962b/3c/80 + cheat + description:Faster timer + code:962b/3c/1f + cheat + description:Quicker turning + code:acde/04/02 + cheat + description:More time from Large Glop Clocks + code:98eb/0f/1e + cheat + description:Less time from Large Glop Clocks + code:98eb/0f/07 + cheat + description:1 turn after continuing + code:cd25/03/01 + cheat + description:9 turns after continuing + code:cd25/03/09 + cheat + description:Start with 1 turn + code:c892/03/01 + cheat + description:Start with 9 turns + code:c892/03/09 + cheat + description:Start on Floor 2 + code:c88d/01/07 + cheat + description:Start on Floor 4 + code:c88d/01/13 + cheat + description:Start on Floor 6 + code:c88d/01/1f + cheat + description:Start on Floor 8 + code:c88d/01/2b + +cartridge sha256:ba8c9990f378b941ea362858509182b2b009e5b463e9732dc0071392b6253c2b + name:Bump'n'Jump (USA) + cheat + description:Jump OK, even with no power + code:9b67/14/00 + cheat + description:Gain double power on every pick-up + code:a530/01/02 + cheat + description:Jump OK at any speed + code:9b6f/00/40 + cheat + description:Set jump OK speed to 190 + code:9b77/05/09 + cheat + description:Set jump OK speed to 130 + code:9b77/05/03 + cheat + description:Start on scene 2 + code:8494/00/01 + cheat + description:Start on scene 3 + code:8494/00/02 + cheat + description:Start On scene 4 + code:8494/00/03 + cheat + description:Start on scene 5 + code:8494/00/04 + cheat + description:Start on scene 6 + code:8494/00/05 + cheat + description:Start on scene 7 + code:8494/00/06 + cheat + description:Start on scene 8 + code:8494/00/07 + cheat + description:Start on scene 9 + code:8494/00/08 + cheat + description:Start on scene 10 + code:8494/00/09 + cheat + description:Start on scene 11 + code:8494/00/0a + cheat + description:Start on scene 12 + code:8494/00/0b + cheat + description:Start on scene 13 + code:8494/00/0c + cheat + description:Start on scene 14 + code:8494/00/0d + cheat + description:Start on scene 15 + code:8494/00/0e + +cartridge sha256:abbddcb7c85a9956f94e6185aa1f30c34c45ad0db2f7f9db40066d749ffa7920 + name:Burai Fighter (USA) + cheat + description:Infinite lives + code:ef90/ce/fe + cheat + description:Extra lives for Eagle level + code:b690/05/09 + cheat + description:Extra lives for Albatross level + code:b691/04/08 + cheat + description:Extra lives for Ace level + code:b692/03/06 + cheat + description:More power for weapons + code:e126/01/03 + cheat + description:Maximum power for weapons + code:e126/01/0a + cheat + description:Increase cobalt power picked up + code:e15e/02/09 + cheat + description:Never lose weapon power + code:f2e8/99/b9 + cheat + description:Never lose speed up + code:f2f3/85/a4 + cheat + description:Never lose weapons + code:f2ef/85/a4 + cheat + description:Never lose rotating pod + code:f2f1/85/a4 + cheat + description:Never lose anything + code:f2eb/a9/60 + cheat + description:Start with laser + code:f16d/85/e6 + cheat + description:Start with rotating pod + code:f171/85/e6 + +cartridge sha256:8f349b0ed7d31a07ccdf26958de8219165eff7c9ad43801a82c5dcf831fd82c2 + name:BurgerTime (USA) + cheat + description:Infinite Pepper Spray + code:d743/5c/ea + cheat + description:Anti-gravity shoes + code:d260/d0/24 + cheat + description:Peter Pepper gets super speed + code:db09/1c/1f + cheat + description:Fast play for experts + code:fd4f/20/ad + cheat + description:Monsters always move slowly + code:daed/bd/ad + cheat + description:Monsters move at double speed + code:daed/bd/ad+daee/18/1c + cheat + description:Monsters move at quadruple speed + code:daed/bd/ad+daee/18/1f + cheat + description:Start with infinite lives + code:e856/d6/a5 + cheat + description:Start with 8 lives + code:cb54/04/08 + cheat + description:Start with infinite peppers + code:d742/d6/b5 + cheat + description:Start with double peppers + code:cb65/05/10 + +cartridge sha256:2b4ac20082e2f45a8f8fd4922a0e995829719a523e118a9eec891c3206adf25b + name:B-Wings (Japan) + cheat + description:Invincibility + code:a53c/a5/85 + cheat + description:Infinite lives + code:ad73/ce/bd + cheat + description:Enable unlimited morphs + code:b38a/f0/50 + cheat + description:Enable secret weapons morph + code:b397/0b/0e + cheat + description:Can always morph + code:b38a/50/24 + cheat + description:Start with secret weapon 1 + code:b0fc/01/0b + cheat + description:Start with secret weapon 2 + code:b0fc/01/0d + +cartridge sha256:47dfae941b3c660be476bc28f199474b6c418431e3d493da4384a6aef3cc5016 + name:Cabal (USA) + cheat + description:Invincibility + code:94fb/d0/f0 + cheat + description:Infinite lives + code:928a/d6/24 + cheat + description:Infinite lives (alt) + code:928a/d6/d5 + cheat + description:Infinite grenades + code:adbd/01/00 + cheat + description:Shorter immunity + code:9293/c0/40 + cheat + description:Longer immunity + code:9393/c0/ff + cheat + description:12 Grenades on pick-up + code:ac6f/04/0c + cheat + description:2 Grenades on pick-up + code:ac6f/04/02 + cheat + description:Start with 20 grenades + code:8a69/f3/f4 + cheat + description:Start with 50 grenades + code:8a69/f3/f7 + cheat + description:Start with 9 lives - both players + code:96be/f7/fb + cheat + description:Start with 1 life - both players + code:96be/f7/f3 + cheat + description:Invincibility - P1 + code:009f/02 + cheat + description:Invincibility - P2 + code:00a0/01 + cheat + description:Infinite Grenades - P1 + code:00d7/09 + cheat + description:Infinite Grenades - P2 + code:00d8/fb+00d9/fb + +cartridge sha256:85da8656317bb939de111a036132ccf358259bab29cf2e4fc694bbef4e55fff0 + name:California Raisins - The Grape Escape (USA) (Proto1) + cheat + description:Infinite health + code:d924/c6/a5 + cheat + description:Infinite health (alt) + code:0048/04 + cheat + description:Infinite lives + code:0049/02 + +cartridge sha256:9ea5bedef90810b89afb70db90c6e0338aa2a6976603058dafe08838009651f0 + name:California Raisins - The Grape Escape (USA) (Proto2) + cheat + description:Invincibility + code:d12e/f0/d0 + cheat + description:Infinite lives + code:ce89/c6/c5 + cheat + description:Invincibility (blinking) + code:004d/ff + cheat + description:Infinite health + code:004a/04 + cheat + description:Infinite lives (alt) + code:004b/03 + +cartridge sha256:4ec881462687e08433605516d28624c5d9a7f33a243c64989c957adff8e0432a + name:Capcom's Gold Medal Challenge '92 (USA) + cheat + description:Massive run power + code:f6d2/f9/a9+f6d3/f0/50+f6d4/f6/ea + +cartridge sha256:6d694349435603c0dcd7645081b0761e109f3994b30f9d822586c991d93510d8 + name:Captain America and the Avengers (USA) + cheat + description:Infinite life - Captain America and Hawkeye, 1P mode + code:b87f/99/b9 + cheat + description:Infinite continues + code:b75b/c6/a5 + cheat + description:Large power stones worth 20 points + code:a37d/0a/14 + cheat + description:Large power stones worth 30 points + code:a37d/0a/1e + cheat + description:Large power stones worth 50 points + code:a37d/0a/32 + cheat + description:Small power stones worth 10 points + code:a335/01/0a + cheat + description:Hawkeye shoots arrows faster + code:98b3/1b/5b + cheat + description:Faster Captain America and Hawkeye - one direction only + code:a27e/ff/fe+a280/01/02 + cheat + description:Even faster Captain America and Hawkeye - one direction only + code:a27e/ff/fd+a280/01/03 + cheat + description:Ininite life - Captain America, 1P mode + code:03d9/0f + cheat + description:Infinite life - Hawkeye, 1P mode + code:03da/0f + cheat + description:Have 99 Red Gems - Captain America, 1P mode + code:03dd/63 + cheat + description:Have 99 Red Gems - Hawkeye, 1P mode + code:03de/63 + +cartridge sha256:935aa637ca8fb0ec4e0f3f09881c46c134b9a5821707e35899d8a7eedb17c6c3 + name:Captain Comic - The Adventure (USA) (Unl) + cheat + description:Invincibility + code:ec00/ad + cheat + description:Infinite energy + code:ec06/bd + cheat + description:Infinite lives + code:e702/ad + cheat + description:Max blast level + code:0316/09 + cheat + description:Infinite blast meter + code:0318/80 + cheat + description:Have Door Key + code:05aa/01 + cheat + description:Have Corkscrew + code:05ab/01 + cheat + description:Have Power Boots + code:05ac/01 + cheat + description:Have Teleport Wand + code:05b3/01 + cheat + description:Have Lantern + code:05b4/01 + cheat + description:Have Mystical Gems of Lascorbanos + code:05b5/01 + cheat + description:Have Coins of Tenure + code:05b6/01 + cheat + description:Have Crown of the Ages + code:05b7/01 + +cartridge sha256:41dd396fbd9b0883b4222b6fbdae09d0e3894eb015e965a0d228f21edd98ad8c + name:Captain Planet and the Planeteers (USA) + cheat + description:Invincibility + code:cb7f/8d/ad + cheat + description:Infinite lives (alt) + code:b6f7/ce/cd + cheat + description:Infinite lives, outside levels + code:b6f7/ce/ad + cheat + description:Infinite lives, inside levels + code:b65c/ce/ad + cheat + description:Infinite power, outside levels + code:a27c/ce/ad+a469/ce/ad + cheat + description:Infinite power, inside levels + code:aba8/ce/ad+b40c/ce/ad + cheat + description:Start with 2 lives instead of 5, outside levels + code:e4fd/04/01 + cheat + description:Start with 10 lives, outside levels + code:e4fd/04/09 + cheat + description:Start with 10 lives, inside levels + code:e605/04/09 + cheat + description:Start with 2 lives, inside levels + code:e605/04/01 + cheat + description:Start inside level 1 instead of outside. + code:e078/2c/00 + +cartridge sha256:da7886920245b1342185ed5fb963798dc38f96e8c5186b9c23446ef68c58a248 + name:Captain Skyhawk (USA) (Rev A) + cheat + description:Infinite lives + code:8445/c6/a9 + cheat + description:Infinite lives (alt) + code:8445/c6/c5 + cheat + description:Infinite Maverick missiles + code:9a23/c6/a9 + cheat + description:Infinite Hawk Bombs + code:9cc6/c6/a9 + cheat + description:Double cost of Hawk Bombs + code:acfc/02/04 + cheat + description:Double cost of Phoenix missiles + code:ad24/02/04 + cheat + description:Double cost of Maverick missiles + code:ad10/05/0a + cheat + description:Start with half Hawk Bombs + code:d5d6/06/03 + cheat + description:Start with 20 Hawk Bombs + code:d5d6/06/14 + cheat + description:Start with 8 Phoenix and Maverick missiles + code:d5da/02/08 + cheat + description:Start with 1 life + code:d5b6/05/01 + cheat + description:Start with 10 lives + code:d5b6/05/0a + +cartridge sha256:141cda262aad72971c00dd9a9655f32cee03e259d371bd8937a864e3300e9e58 + name:Captain Skyhawk (USA) + cheat + description:Invincibility (PRG0) + code:9d9e/f0/d0 + cheat + description:Infinite lives + code:8445/c6/a9 + cheat + description:Infinite lives (alt) + code:8445/c6/c5 + cheat + description:Infinite Maverick missiles + code:9a23/c6/a9 + cheat + description:Infinite Hawk Bombs + code:9cc6/c6/a9 + cheat + description:Double cost of Hawk Bombs + code:acfc/02/04 + cheat + description:Double cost of Phoenix missiles + code:ad24/02/04 + cheat + description:Double cost of Maverick missiles + code:ad10/05/0a + cheat + description:Start with half Hawk Bombs + code:d5d6/06/03 + cheat + description:Start with 20 Hawk Bombs + code:d5d6/06/14 + cheat + description:Start with 8 Phoenix and Maverick missiles + code:d5da/02/08 + cheat + description:Start with 1 life + code:d5b6/05/01 + cheat + description:Start with 10 lives + code:d5b6/05/0a + +cartridge sha256:f76f1779454a8a98168c2c26bc79058161cbaefb3006c8e6aa8c63d301a66f4f + name:Casino Kid (USA) + cheat + description:Always win hand in Blackjack + code:86c9/d0/a9 + cheat + description:Always win hand in Poker + code:9c1b/4c/ad + cheat + description:Can always bet all money in Blackjack + code:859d/90/a9 + cheat + description:Can always bet all money in Poker + code:8a64/68/86 + +cartridge sha256:87e479b14421fc4b56553937dc817789ebfb2987b0724c6790705f0361a955a7 + name:Casino Kid II (USA) + cheat + description:Can't double down in blackjack (game will say you do not have enough money) + code:8c15/05/09 + cheat + description:Can't split in blackjack (game will say you do not have enough money) + code:8d46/05/09 + cheat + description:Start new game with $82 instead of $200 + code:c14f/4e/20 + cheat + description:Start new game with $512 + code:c14f/4e/c8 + cheat + description:Start new game with $21,171 + code:c154/00/20 + cheat + description:Start new game with $131,272 + code:c154/00/c8 + cheat + description:Start new game with $1,342,377 + code:c159/00/08 + cheat + description:Start new game with $5,368,909 + code:c159/00/20 + +cartridge sha256:98ba2353111a0b2cf557b03d8b8c4f5c15d7be56e47182536d710913d62582fa + name:Castelian (USA) + cheat + description:Invincibility + code:edc0/85/a5 + cheat + description:Infinite lives + code:c31a/d6/b5 + cheat + description:Infinite lives (alt) + code:c31a/d6/d5 + cheat + description:Infinite time + code:a07f/c6/a5 + cheat + description:Start with 1 life + code:c1e7/03/01 + cheat + description:Start with 6 lives + code:c1e7/03/06 + cheat + description:Start with 9 lives + code:c1e7/03/09 + cheat + description:Start with 5 continues + code:c216/02/05 + cheat + description:Start with 8 continues + code:c216/02/08 + +cartridge sha256:3668454e1904ada7f80ec2f94c4c2d45272d8a8c9e8d3b78ceebae5f890eb164 + name:Castle of Deceit (USA) (Unl) + cheat + description:Infinite energy + code:dbf1/ce/ad + cheat + description:Infinite lives + code:d51f/ce/ad + +cartridge sha256:6887230077d8eefa311d313672c31e7497211e21c5df78aa8d2030ea72471108 + name:Castle of Dragon (USA) + cheat + description:Infinite health + code:bf95/00/7f + cheat + description:Super health + code:c02b/04/ff + cheat + description:No harm from most enemy attacks + code:bf6d/ce/ad + cheat + description:Stop Skeletons from fighting + code:9be3/10/01 + cheat + description:Faster fighting + code:c297/01/04 + cheat + description:Super strong enemies + code:bf51/1b/12 + cheat + description:Start with Knives + code:c023/00/02 + cheat + description:Start with Knives and Mace + code:c023/00/03 + cheat + description:Start with Armor + code:c023/00/80 + cheat + description:Start with Armor, Knives and Mace + code:c023/00/83 + +cartridge sha256:9abebd837287a38ab64153ff662b3bd79ebc8e55b07c2fc2fef8c15244517576 + name:Castlequest (USA) + cheat + description:Invincibility + code:8dba/8d/ad + cheat + description:Infinite lives + code:8dc6/c6/a5 + cheat + description:Infinite keys + code:a658/f0/60 + cheat + description:75 lives instead of 50 + code:a2b6/32/4b + cheat + description:25 lives instead of 50 + code:a2b6/32/19 + cheat + description:Don't lose life from 'reset' or 'back' options + code:fbcc/c6/a5 + cheat + description:Use sword (press 'B') as long as you like + code:831d/ce/ad + cheat + description:Now you can move while using sword + code:8492/07/a2 + cheat + description:Must use with the last code for permanent sword-wielding ability + code:8308/17/05 + cheat + description:Supercharged speed-up + code:852c/02/04+853c/02/04 + cheat + description:Turbo fuel-injected 16-valve speed-up + code:852c/02/08+853c/02/08 + +cartridge sha256:7eba1637cd2fdbc4f0732eb5249e32d827dbdadbd7e165f961440af4310880dc + name:Castlevania (USA) (Rev A) + cheat + description:Invincibility + code:e6d2/a5/c5 + cheat + description:Invincibility after one hit + code:e8fa/c6/a6 + cheat + description:Infinite health + code:e75b/85/ad + cheat + description:Infinite lives + code:c2f3/c6/a9 + cheat + description:Infinite time + code:a0af/20/ad + cheat + description:Infinite hearts + code:da58/84/a4+da8b/84/a4 + cheat + description:Keep weapons after dying + code:c317/8d/2c + cheat + description:Gain triple shot on weapon pick-up + code:e7b0/00/02 + cheat + description:Don't get knocked back when hit + code:971b/8f + cheat + description:Jump 3x as high + code:9b90/c5 + cheat + description:Jump 2x as high + code:9b90/e0 + cheat + description:Multi-jump + code:941d/8d/a9+941e/43/01+941f/01/8d+9420/ee/6c+9421/6c/04+9422/04/4a+94ca/ad/20+94cb/14/01+94cc/05/94+9792/90/60+948c/e5/8e+948d/a1/94 + cheat + description:Start with 40 hearts + code:c991/05/28 + cheat + description:Start with 80 hearts + code:c991/05/50 + cheat + description:Start with 1 life + code:c97a/04/01+c875/04/01 + cheat + description:Start with 8 lives + code:c97a/04/08+c875/04/08 + cheat + description:Start on last level + code:b990/8e/ae+b988/03/09+b98d/00/12 + cheat + description:Invincibility (blinking) + code:005b/02 + cheat + description:Infinite health (alt) + code:0045/40 + cheat + description:Infinite lives (alt) + code:002a/63 + cheat + description:Infinite hearts (alt) (disable at end of stage) + code:0071/63 + cheat + description:Bosses have no health + code:01a9/00 + cheat + description:Have the Axe + code:015b/0d + cheat + description:Have the Cross + code:015b/09 + cheat + description:Have the Holy Water + code:015b/0b + cheat + description:Have the Knife + code:015b/08 + cheat + description:Have the Stopwatch + code:015b/0f + cheat + description:Have the best whip + code:0070/02 + +cartridge sha256:a35e846379ff252594ace83da2a1a1cb0692717b931055d1f6603812f18ad5cd + name:Castlevania (USA) + cheat + description:Infinite time + code:a0af/20/ad + cheat + description:Hit anywhere (Whip) + code:e51b/ce/00+e52b/be/00 + cheat + description:Jump 3x as high + code:9b90/c5 + cheat + description:Jump 2x as high + code:9b90/e0 + cheat + description:Multi-jump + code:941d/8d/a9+941e/43/01+941f/01/8d+9420/ee/6c+9421/6c/04+9422/04/4a+94ca/ad/20+94cb/14/01+94cc/05/94+9792/90/60+948c/e5/8e+948d/a1/94 + cheat + description:Keep sub-weapon after dying + code:c2c8/8d/ad + cheat + description:Walk through walls + code:9f49/4d + cheat + description:Start on last level + code:b990/8e/ae+b988/03/09+b98d/00/12 + cheat + description:Invincibility (blinking) + code:005b/02 + cheat + description:Infinite health + code:0045/40 + cheat + description:Infinite lives + code:002a/63 + cheat + description:Infinite hearts + code:0071/63 + cheat + description:Bosses have no health + code:01a9/00 + cheat + description:Have the Axe + code:015b/0d + cheat + description:Have the Cross + code:015b/09 + cheat + description:Have the Holy Water + code:015b/0b + cheat + description:Have the Knife + code:015b/08 + cheat + description:Have the Stopwatch + code:015b/0f + cheat + description:Have the best whip + code:0070/02 + +cartridge sha256:9575ec31c1c658fd6b77ae1d69e4861ecada8570e4eebf51409941486e4b4ef4 + name:Castlevania II - Simon's Quest (USA) + cheat + description:Invincibility + code:864b/f0/d0 + cheat + description:Invincibility (enemies die on contact) + code:8735/de/23+8736/87/89 + cheat + description:Invincibility against water + code:80bb/e7/e0+fee3/ff/4c+fee5/ff/c4+fee4/ff/f4+fee2/ff/01+fee1/ff/8b+80bc/c0/fe+fee0/ff/ce + cheat + description:Invincibility against poisonous swamps and spikes + code:8045/d0/50 + cheat + description:Infinite health + code:d35f/85/a5 + cheat + description:Infinite lives + code:c294/c6/24 + cheat + description:Infinite Laurels + code:d921/c6/05 + cheat + description:Infinite Laurel time + code:8199/ce/ad + cheat + description:Infinite Garlic + code:d935/c6/a5 + cheat + description:Stops time (always daytime) + code:d79b/85/a5 + cheat + description:One hit kills + code:8926/40/00 + cheat + description:Hit anywhere - whip + code:8917/47/00+891c/54/00+88fd/61/00 + cheat + description:Hit anywhere - sub-weapons + code:8a09/30/b0+8a27/30/b0 + cheat + description:Small hearts worth 100 + code:8762/84 + cheat + description:Enemies always drop large Hearts + code:82a9/d0/b0+82ae/bd/ad+82b0/04/fa + cheat + description:Can use sub-weapons regardless of Heart count + code:d876/b0/f0 + cheat + description:Multi-jump + code:89d9/10/80+89da/13/d0+89db/a0/0c+89dd/20/4c+89df/86/89+89d8/03/29+89d7/6c/f5+89d6/ad/a5+89e9/00/fb+89de/ed/ee+89dc/f0/ea + cheat + description:Jump higher (4 1/3 blocks) + code:89ef/38/20 + cheat + description:Buy a White Crystal and receive the Red Crystal and all of Dracula's Relics + code:ee29/20/ff + cheat + description:Buy Thorn Whip and receive the Flame Whip (do not buy any other whips) + code:edf3/07/04 + cheat + description:Whip much faster + code:dc11/f0/d0 + cheat + description:Diamond can destroy any block + code:da12/18/a7+da13/c1/da+d691/8e/ea + cheat + description:Whip can destroy any block + code:d639/00+d628/00+d65d/10+d691/ea + cheat + description:Whip destroys all enemies/townspeople on screen + code:88d8/75 + cheat + description:Towns never sleep (can enter doors) + code:87af/11/00+814f/d0/f0 + cheat + description:Ponds open instantly without needing a Crystal + code:cd70/d0/f0 + cheat + description:Faster dialog text + code:ee98/f0/d0 + cheat + description:Walk faster + code:8770/ff/fe+8910/ff/fe+891b/01/02+8756/01/02 + cheat + description:Always get the best ending + code:a17e/a5/85 + cheat + description:Start with 100 Experience (E) + code:f12c/09 + cheat + description:Start with more health + code:c55e/30/50 + cheat + description:Start with 25 hearts + code:c55a/50/25 + cheat + description:Start with 75 hearts + code:c55a/50/75 + cheat + description:Start with 1 life + code:c553/03/01 + cheat + description:Start with 6 lives + code:c553/03/06 + cheat + description:Start with 9 lives + code:c553/03/09 + cheat + description:Invincibility (alt 2) + code:04f8/02 + cheat + description:Infinite health (alt) + code:0080/50 + cheat + description:Infinite lives (alt) + code:0031/03 + cheat + description:Infinite hearts + code:0048/f0 + cheat + description:Infinite Laurels (alt) + code:004c/99 + cheat + description:Infinite Garlic on pick-up + code:004d/08 + cheat + description:Stops time (time set to 12:02) + code:0085/02 + cheat + description:Have all Daggers, Holy Water, Diamond, Flame and Oak Stake + code:004a/7f + cheat + description:Have White Crystal + code:0091/20 + cheat + description:Have all Dracula's parts and White Crystal + code:0091/3f + cheat + description:Have Blue Crystal + code:0091/40 + cheat + description:Have all Dracula's parts and Blue Crystal + code:0091/5f + cheat + description:Have Red Crystal + code:0091/60 + cheat + description:Have all Dracula's parts and Red Crystal + code:0091/7f + cheat + description:Have Garlic, Laurels, Silk Bag and Magic Cross + code:0092/0f + cheat + description:Have Fire Whip + code:0434/04 + +cartridge sha256:6e8d289635ac39479ff1d36733aa3f8b9650593ab972cedb8e2cdbfc03aaa739 + name:Castlevania III - Dracula's Curse (USA) + cheat + description:Invincibility (disable if you cannot enter a door) + code:8112/f0/d0 + cheat + description:Invincibility (disable if you cannot enter a door) (alt) + code:b241/85/a5 + cheat + description:Infinite health + code:828a/85/a9 + cheat + description:Infinite lives + code:8993/85/a9 + cheat + description:Infinite hearts + code:ba03/90/91 + cheat + description:Hit anywhere (Whip) + code:b287/18/00 + cheat + description:High jump + code:9633/09/03 + cheat + description:Multi-jump + code:8be0/10/60+985c/65/d8+9854/b0/90+985f/26/05+985a/0c/05+9861/08/05+9859/d0/a9+97d5/4f/51+93e7/4f/51+985b/ad/8d+9856/ad/8d+9851/04/a5+9831/85/a5+9852/c9/26+9853/08/0a + cheat + description:No knock-back when hurt + code:823c/8d/60 + cheat + description:Disable automatic upwards scrolling (on vertical stages) + code:d73b/82/80 + cheat + description:Walk twice as fast to the left + code:9728/ff/fe + cheat + description:Walk twice as fast to the right + code:96ec/01/02 + cheat + description:Start with 9500 seconds + code:b33f/01 + cheat + description:Start each stage with 99 hearts + code:90c1/05/99 + cheat + description:Invincibility (blinking) (disable if you cannot enter a door) + code:0080/02 + cheat + description:Remove invincibility blinking + code:001a/00 + cheat + description:Infinite health (alt) + code:003c/40 + cheat + description:Infinite lives (alt) + code:0035/99 + cheat + description:Infinite hearts (alt) + code:0084/99 + cheat + description:Alucard has best attack + code:008f/02 + cheat + description:Trevor Belmont has best Whip + code:008e/02 + cheat + description:Enable Sypha + code:003a/01 + cheat + description:Enable Grant + code:003a/02 + cheat + description:Enable Alucard + code:003a/03 + cheat + description:Have Triple Shot (III) + code:0087/02 + cheat + description:Trevor Belmont's sub-weapon - Axe + code:0085/01 + cheat + description:Trevor Belmont's sub-weapon - Clock + code:0085/0b + cheat + description:Trevor Belmont's sub-weapon - Cross + code:0085/02 + cheat + description:Trevor Belmont's sub-weapon - Dagger + code:0085/03 + cheat + description:Trevor Belmont's sub-weapon - Holy Water + code:0085/04 + cheat + description:Sypha Belnades' sub-weapon - Fire Spell + code:0086/05 + cheat + description:Sypha Belnades' sub-weapon - Ice Spell + code:0086/06 + cheat + description:Sypha Belnades' sub-weapon - Lightning Spell + code:0086/07 + cheat + description:Grant Danasty's sub-weapon - Dagger + code:0086/08 + cheat + description:Grant Danasty's sub-weapon - Axe + code:0086/09 + cheat + description:Grant Danasty's sub-weapon - Clock + code:0086/0b + cheat + description:Start on stage 2 (glitchy if you die) + code:0032/01 + cheat + description:Start on stage 3 (glitchy if you die) + code:0032/02 + cheat + description:Start on stage 4 (glitchy if you die) + code:0032/03 + cheat + description:Start on stage 5 (glitchy if you die) + code:0032/04 + cheat + description:Start on stage 6 (glitchy if you die) + code:0032/05 + cheat + description:Start on stage 7 (glitchy if you die) + code:0032/06 + cheat + description:Start on stage 8 (glitchy if you die) + code:0032/07 + cheat + description:Start on stage 9 (glitchy if you die) + code:0032/08 + cheat + description:Start on stage 10 (glitchy if you die) + code:0032/09 + cheat + description:Start on stage 11 (glitchy if you die) + code:0032/0a + cheat + description:Start on stage 12 (glitchy if you die) + code:0032/0b + cheat + description:Start on stage 13 (glitchy if you die) + code:0032/0c + cheat + description:Start on stage 14 (glitchy if you die) + code:0032/0d + cheat + description:Start on stage 15 (glitchy if you die) + code:0032/0e + +cartridge sha256:52451a89296cfcb006beb6363ddc8486fcc88154338cbec778a846056c522f50 + name:Cat Ninden Teyandee (Japan) + cheat + description:Infinite health + code:003f/0b + cheat + description:Infinite magic energy + code:0040/ff + +cartridge sha256:c20a8cc1b2dacb8a45e706b5763ac6c82c17b4ee4fb547ba4a853e4aabd6e35c + name:Challenge of the Dragon (USA) (Unl) + cheat + description:Infinite health + code:e252/9d/ad + cheat + description:Infinite lives + code:e49a/99/b9 + cheat + description:Always have Bombs + code:eca6/d0/50 + +cartridge sha256:7f4b9307e228c737b5f6e4ef3efb40438aa2024b95b29f9aabf18a15af6ed185 + name:Challenge of the Dragon (Asia) (PAL) (Unl) + cheat + description:Invincibility + code:a079/f0/60 + cheat + description:Infinite health + code:a120/c6/a5 + cheat + description:Infinite lives + code:8f1a/c6/a9 + +cartridge sha256:d5b039637a2315458f71ec57a287f93b3532e6243b712b55767f07dc83c5a3c9 + name:Championship Pool (USA) + cheat + description:1 foul loses the game (instead of 3) - only in 10-ball in party mode + code:b01f/03/01 + cheat + description:2 fouls in a row loses the game - only on 9 and 10-ball in party mode + code:b01f/03/02 + cheat + description:Fouls don't count - only on 9 and 10-ball and rotation in party mode + code:ba7c/9d/bd + cheat + description:Number of fouls is not cleared after a good shot (3 fouls don't have to be in a row to lose) - only on 10-ball in party mode + code:ba92/9d/bd + cheat + description:Always break in 9 or 10-ball - P1 + code:806e/a5/a9+806f/ed/00 + cheat + description:Always break in 9 or 10-ball - P2 + code:806e/a5/a9+806f/ed/01 + +cartridge sha256:a8f18eb52126cdf3d004877f8c4c315ddf15f823f13f42b0154da17db21ecddd + name:Championship Rally (Europe) + cheat + description:Drive a short distance to finish lap + code:cb5d/20/00 + +cartridge sha256:ebdd748cd488c4acdc5d2c7321de692c1ab0b37044cf0c6ea043457176dbd306 + name:Cheetahmen II (USA) (Unl) + cheat + description:Infinite health - level 1 and 2 + code:a3bc/ce/ad + cheat + description:Infinite health - level 3 + code:a3dc/ce/ad + cheat + description:Infinite health - level 4 + code:a384/ce/ad + cheat + description:Infinite lives - level 1 and 2 + code:b378/ce/ad + cheat + description:Infinite lives - level 3 + code:b30f/ce/ad + cheat + description:Infinite lives - level 4 + code:b2ad/ce/ad + +cartridge sha256:b705f866955c7d19292b55a9b0f3ec0e970e3f2509c3da15708b7afd879d98ed + name:Chessmaster, The (USA) + cheat + description:Move pieces anywhere + code:cb6f/56/00+cb73/85/a5+cb78/85/a5 + +cartridge sha256:e84d90fefb92f2b6ab70e35bfb990978c7e384e357ec6b995c3880bff4c5b460 + name:Chip 'n Dale - Rescue Rangers (USA) + cheat + description:Infinite health + code:d086/f8/18 + cheat + description:Multi-jump + code:cc45/01/00+c9a8/0a/a5 + cheat + description:Freeze mechanical bulldog + code:8f38/bd/60 + cheat + description:Freeze mechanical mice + code:8fc6/bd/60 + cheat + description:Freeze buzzer + code:9096/bd/60 + cheat + description:Freeze buzz bomb + code:94fb/bd/60 + cheat + description:Freeze racket-rod + code:95e2/bd/60 + cheat + description:Freeze ditz + code:945f/bd/60 + cheat + description:Freeze hawk bomber + code:9750/bd/60 + cheat + description:Freeze bouncing boxes + code:9be9/bd/60 + cheat + description:Mega-jump + code:c9af/06/0a + cheat + description:Never get stunned + code:d005/de/04 + cheat + description:Press Start to finish the level + code:c78d/98/6d + +cartridge sha256:afa359b53e90781ed3810642c09f7cb22f0ba21c40142649771bfb21a897b4d3 + name:Chip 'n Dale - Rescue Rangers 2 (USA) + cheat + description:Invincibility (glitchy) + code:aa20/f0/d0 + cheat + description:Infinite health + code:b0a3/de/dd + cheat + description:Infinite health - both players + code:b0a3/de/b9 + cheat + description:Infinite lives - both players + code:aec4/d6/a7 + cheat + description:Almost infinite lives - both players + code:aec4/d6/24 + cheat + description:Infinite credits + code:f5bc/c6/a9 + cheat + description:Never get stunned + code:acaa/d6/ea + cheat + description:Start with 1 life - both players + code:f5b5/03/01 + cheat + description:Start with 2 lives - both players + code:f5b5/03/02 + cheat + description:Start with 4 lives - both players + code:f5b5/03/04 + cheat + description:Start with 5 lives - both players + code:f5b5/03/05 + cheat + description:Start with 1 heart - both players + code:f592/03/01 + cheat + description:Start with 2 hearts - both players + code:f592/03/02 + cheat + description:Start with 4 hearts - both players + code:f592/03/04 + cheat + description:Start with 5 hearts - both players + code:f592/03/05 + cheat + description:Start with 1 credit + code:f578/03/01 + cheat + description:Start with 2 credits + code:f578/03/02 + cheat + description:Start with 6 credits + code:f578/03/06 + cheat + description:Start with 9 credits + code:f578/03/09 + cheat + description:Start with 255 credits (ignore the counter) + code:f578/03/ff + +cartridge sha256:21a7f7a5a043ddc2017cd97b4088156b0d728271455966ab6748a79eddd3410e + name:Chubby Cherub (USA) + cheat + description:Infinite lives + code:8207/c6/a5 + cheat + description:Infinite power + code:a70d/85/a5 + cheat + description:Half regular power gained from food + code:8ee4/08/04 + cheat + description:Slow down power loss on the ground + code:a6f8/02/01 + cheat + description:Slow down power loss in the air + code:a6fe/09/03 + cheat + description:Infinite Gau (shots) + code:8d7e/eb/02 + cheat + description:Double Gau (shots) on candy pick-up + code:a859/04/08 + cheat + description:Start with 1 life + code:8290/02/00 + cheat + description:Start with double lives + code:8290/02/05 + cheat + description:Start with triple lives + code:8290/02/08 + cheat + description:Start on Stage 5 + code:8293/01/05+8291/00/04 + cheat + description:Start on Stage 10 + code:8293/01/0a+8291/00/09 + +cartridge sha256:fa701601d39819ef26821d05350ccb793cc606191e03c06203a4274b434dfaeb + name:Circus Caper (USA) + cheat + description:Invincibility in normal levels + code:f479/03/f5+f478/52/0e+f477/ad/20 + cheat + description:Infinite power (health) + code:f501/8d/2c + cheat + description:Infinite power (health) (alt) + code:f501/8d/ad + cheat + description:Full energy from food + code:e85f/02/00 + cheat + description:Start with lots of weapons + code:eb97/00/ff + cheat + description:Start on stage 2 (starts on stage 1 after continuing) + code:c0e4/01/02 + cheat + description:Start on stage 3 (starts on stage 1 after continuing) + code:c0e4/01/03 + cheat + description:Start on stage 4 (starts on stage 1 after continuing) + code:c0e4/01/04 + cheat + description:Start on stage 5 (starts on stage 1 after continuing) + code:c0e4/01/05 + cheat + description:Start on stage 6 (starts on stage 1 after continuing) + code:c0e4/01/06 + cheat + description:Infinite power (health) (alt 2) + code:0392/7a + +cartridge sha256:590535e8cda84cb4054425539bc320c16307f141d688b57f258a162dedc8888f + name:City Connection (USA) + cheat + description:Infinite lives + code:d17e/c6/a5 + cheat + description:Infinite Oil + code:94c2/c6/a5 + cheat + description:Start with double lives + code:85cf/02/05 + cheat + description:Start with triple lives + code:85cf/02/08 + cheat + description:Start with extra Oil + code:85d1/05/20 + cheat + description:Start on level 1 + code:85cd/00/01 + cheat + description:Start on level 2 + code:85cd/00/02 + cheat + description:Start on level 3 + code:85cd/00/03 + cheat + description:Start on level 4 + code:85cd/00/04 + cheat + description:Start on level 5 + code:85cd/00/05 + cheat + description:Infinite lives - both players + code:00a2/09 + cheat + description:Infinite Oil - both players + code:00a4/63 + cheat + description:MI is very high + code:00a5/ff + +cartridge sha256:cf226f0d9486103bbaa19ee124b673d47aa2b3766334b6b7587d704c03e6649e + name:Clash at Demonhead (USA) + cheat + description:Invincibility + code:9293/d0/f0+90d1/f0/d0 + cheat + description:Infinite health + code:c502/85/a5 + cheat + description:Infinite barrier hits + code:adf4/ce/ad + cheat + description:Infinite supply of all items bought + code:a5c4/de/ad + cheat + description:Don't die when power hits zero + code:b15b/ee/ae + cheat + description:All items in shop are free + code:c4b0/e5/60 + cheat + description:Start with 1 of each item + code:cbf7/9d/fe + cheat + description:Start with extra cash + code:cc34/f4/06+cc36/9a/9b + cheat + description:Start with 50% power + code:cc0e/10/08+a9e7/10/08+cc12/04/02 + cheat + description:Start with 150% power + code:cc0e/10/18+cc12/04/06+a9e7/10/18 + cheat + description:Start with 200% power + code:cc0e/10/20+cc12/04/08+a9e7/10/20 + cheat + description:Infinite health (alt) + code:009f/10 + +cartridge sha256:79969ab6741823e5560794489d5b20a677a1207c06265855e5d7b633e6fef29a + name:Cliffhanger (USA) + cheat + description:Protection from most hits + code:9c61/ce/ad + cheat + description:Infinite lives + code:cd8c/ce/ad + cheat + description:Infinite continues + code:ef15/76/bb + cheat + description:Don't burn money at campfire + code:9af2/9d/bd + cheat + description:Some bags contain mega-money, some contain no money + code:cafc/18/17 + cheat + description:Start with 2 lives + code:cc56/03/01 + cheat + description:Start with 6 lives + code:cc56/03/05 + cheat + description:Start with 8 lives + code:cc56/03/07 + cheat + description:Start with 10 lives + code:cc56/03/09 + cheat + description:Start with 1 continue + code:cc43/03/01 + cheat + description:Start with 5 continues + code:cc43/03/05 + cheat + description:Start with 7 continues + code:cc43/03/07 + cheat + description:Start with 9 continues + code:cc43/03/09 + cheat + description:Start with 2x health (does not show on meter) + code:cc9f/10/20 + cheat + description:Start with 1/2 health + code:cc9f/10/08 + cheat + description:Start with $100 + code:cc6e/8d/ee + cheat + description:Start with $10,000 + code:cc6b/8d/ee + cheat + description:Start with $650,000 (displays $xx0000 until you pick up first money bag) + code:cc6b/8d/ce + cheat + description:Infinite health + code:0405/10 + cheat + description:Infinite lives (alt) + code:0406/03 + +cartridge sha256:ed0a1a5ca7cf404116d0073e8ccd213a082d2ac50132f54f3c8621f3dbcdb248 + name:Clu Clu Land (World) + cheat + description:Infinite lives - both players + code:d3b3/24 + cheat + description:Infinite time + code:cb15/24 + cheat + description:Increase extra time + code:d3f4/06 + cheat + description:Shoot more rays + code:dae5/02/05 + cheat + description:Shoot shorter rays + code:dae9/20/10 + cheat + description:Shoot longer rays + code:dae9/20/50 + cheat + description:Enemy can go thru gold bars + code:d750/04/00 + cheat + description:Start with 1 life - both players + code:c34c/01 + cheat + description:Start with 10 lives - both players + code:c34c/10 + cheat + description:Start with 1 life - P2 + code:c359/85/e6 + +cartridge sha256:711eee6690af76a59321f49c8dbfec39eef702775e6cc2a1e63553b40fa3aa5f + name:Cobra Command (USA) + cheat + description:Immune to weapon damage + code:dc5f/e5/24 + cheat + description:Start with infinite lives + code:81b0/ce/ad + cheat + description:Start with 1 life + code:e23c/04/00 + cheat + description:Start with 9 lives + code:e23c/04/08 + cheat + description:Start with Infinite lives (alt) + code:05bb/09 + cheat + description:Start with Dual Gun + code:05a5/01 + cheat + description:Start with ATG + code:05a5/02 + cheat + description:Start with Rapid Fire + code:05a5/03 + cheat + description:Start with 3-Way Gun + code:05a5/04 + cheat + description:Start with Twin Missiles + code:05a6/01 + cheat + description:Start with Homing Missiles + code:05a6/02 + cheat + description:Start with Homing Missiles 1 + code:05a6/03 + cheat + description:Start with Homing Missiles 2 + code:05a6/04 + cheat + description:Start with Firebomb + code:05a6/05 + cheat + description:Start with Mines + code:05a6/06 + cheat + description:Start with Armor + code:05a7/01 + cheat + description:Start with Super Armor + code:05a7/02 + cheat + description:Start with Hyper Armor + code:05a7/03 + cheat + description:Start with Turbo Engine + code:05a8/01 + cheat + description:Start with Super Engine + code:05a8/02 + cheat + description:Start with Hyper Engine + code:05a8/03 + cheat + description:Start with Rope + code:05a9/00 + cheat + description:Start with Ladder + code:05a9/01 + +cartridge sha256:db26936868427b5b01b7823a781ec09ed15bb5dd06945bba0147ffb12215234b + name:Cobra Triangle (USA) + cheat + description:Invincibility + code:ab6c/d0/60 + cheat + description:Infinite continue options + code:a63a/ce/ad + cheat + description:Don't lose life after dying from damage + code:e90f/ce/ad + cheat + description:Don't lose life after dying from time running out + code:e965/ce/ad + cheat + description:Never lose your power-ups + code:e6a1/8d/f0+e6a2/28/0b + cheat + description:Hit anywhere + code:b421/b0/d0+acc2/b0/d0+b432/97/9c+ad49/99/b9+b422/12/0e+acc3/1a/17 + cheat + description:Gain an extra minute + code:83a8/8d/ee+83a9/15/13 + cheat + description:Invincibility (blinking) + code:00b9/1a + cheat + description:Infinite health + code:05f5/0c + cheat + description:Infinite lives + code:0738/09 + cheat + description:Infinite time (disable before finishing a level) + code:0714/05 + cheat + description:Boss HP will be at minimum + code:05ff/00 + cheat + description:Max Missile power + code:072c/03 + cheat + description:Max Speed + code:072b/03 + cheat + description:One 1 mine needed for mine removing stages + code:00a3/00 + cheat + description:Start on stage 2 (disable after stage begins) + code:0702/02+0737/01 + cheat + description:Start on stage 3 (disable after stage begins) + code:0702/03+0737/02 + cheat + description:Start on stage 4 (disable after stage begins) + code:0702/04+0737/03 + cheat + description:Start on stage 5 (disable after stage begins) + code:0702/05+0737/04 + cheat + description:Start on stage 6 (disable after stage begins) + code:0702/06+0737/05 + cheat + description:Start on stage 7 (disable after stage begins) + code:0702/07+0737/06 + cheat + description:Start on stage 8 (disable after stage begins) + code:0702/08+0737/07 + cheat + description:Start on stage 9 (disable after stage begins) + code:0702/09+0737/08 + cheat + description:Start on stage 10 (disable after stage begins) + code:0702/0a+0737/09 + cheat + description:Start on stage 11 (disable after stage begins) + code:0702/0b+0737/0a + cheat + description:Start on stage 12 (disable after stage begins) + code:0702/0c+0737/0b + cheat + description:Start on stage 13 (disable after stage begins) + code:0702/0d+0737/0c + cheat + description:Start on stage 14 (disable after stage begins) + code:0702/0e+0737/0d + cheat + description:Start on stage 15 (disable after stage begins) + code:0702/0f+0737/0e + cheat + description:Start on stage 16 (disable after stage begins) + code:0702/10+0737/0f + cheat + description:Start on stage 17 (disable after stage begins) + code:0702/11+0737/10 + cheat + description:Start on stage 18 (disable after stage begins) + code:0702/12+0737/11 + cheat + description:Start on stage 19 (disable after stage begins) + code:0702/13+0737/12 + cheat + description:Start on stage 20 (disable after stage begins) + code:0702/14+0737/13 + cheat + description:Start on stage 21 (disable after stage begins) + code:0702/15+0737/14 + cheat + description:Start on stage 22 (disable after stage begins) + code:0702/16+0737/15 + cheat + description:Start on stage 23 (disable after stage begins) + code:0702/17+0737/16 + cheat + description:Start on stage 24 (disable after stage begins) + code:0702/18+0737/17 + cheat + description:Start on stage 25 (disable after stage begins) + code:0702/19+0737/18 + +cartridge sha256:2be0bd6e64cf2cb47c7b4a2d6bdb5fd4ff9ed1cd5eb6eadb4d56c410c659bdc5 + name:Code Name - Viper (USA) + cheat + description:Invincibility + code:d55c/20/ad + cheat + description:Infinite health + code:9966/f9/ed+9a5e/01/00 + cheat + description:Infinite health (alt) + code:996d/8d/ad + cheat + description:Infinite lives + code:ef1c/ce/ad + cheat + description:Infinite Gun + code:a1fa/01/00 + cheat + description:Infinite Machine Gun + code:a21b/01/00 + cheat + description:Hit anywhere + code:d856/38/00+9c1d/03/10+9c20/13/34+9c1c/bd/ad + cheat + description:Double usual bullets on new life + code:ef18/32/64 + cheat + description:Half bullets on new life + code:ef18/32/19 + cheat + description:Machine Gun with 256 bullets on new life + code:ef11/8d/ee + cheat + description:Upper level jump + code:8fce/b9/ad+908f/fa/f9 + cheat + description:Keep Machine Gun after dying + code:ef11/8d/2c+ef0e/8d/2c + cheat + description:Have Bomb (can exit level without the Bomb) + code:d58d/04/00 + cheat + description:Start with 1 life + code:e4f0/03/01 + cheat + description:Start with 6 lives + code:e4f0/03/06 + cheat + description:Start with 9 lives + code:e4f0/03/09 + cheat + description:Start with Machine Gun and 256 bullets + code:e4fc/8d/ee + cheat + description:Start with double usual bullets + code:e503/32/64 + cheat + description:Start with half usual bullets + code:e503/32/19 + cheat + description:Infinite health (alt) + code:06f8/04 + cheat + description:Infinite lives + code:06e8/0a + cheat + description:Infinite Gun (alt) + code:06e0/3f + cheat + description:Infinite Machine Gun (alt) + code:06e2/3f + cheat + description:Have all children rescued + code:06ea/09 + cheat + description:Have all adults rescued + code:06ec/09 + cheat + description:Have all adults and children rescued + code:0757/ff + +cartridge sha256:47ebed8be6679468d0627065153520a539b292244b51c54263c027e106b6ef65 + name:Colorful Dragon (Asia) (PAL) (Unl) + cheat + description:Invincibility + code:9a02/f0/d0 + cheat + description:Infinite lives + code:99bc/d6/b5 + cheat + description:Start on level 2 + code:8037/01/02 + cheat + description:Start on level 5 + code:8037/01/05 + cheat + description:Start on level 10 + code:8037/01/0a + cheat + description:Start on level 15 + code:8037/01/0f + cheat + description:Start on level 20 + code:8037/01/14 + +cartridge sha256:0512b4aa2220f74e40fe8652b758893fa87efb6c3407808f7dda0e1901017432 + name:Commando (USA) + cheat + description:Invincibility + code:d176/85/60 + cheat + description:Infinite Grenades + code:b5b0/ca/ea + cheat + description:Infinite lives + code:c907/ce/a0 + cheat + description:Infinite lives (alt) + code:c907/ce/ad + cheat + description:Get items from anywhere + code:df00/14/00+d640/dc/00 + cheat + description:Hit anywhere + code:e3f6/53/00+e406/43/00 + cheat + description:Walk through anything + code:b784/09/00+b753/06/00 + cheat + description:Start with 1 life - both players + code:c5cd/03/00 + cheat + description:Start with 6 lives - both players + code:c5cd/03/06 + cheat + description:Start with 9 lives - both players + code:c5cd/03/09 + cheat + description:Start with double rations of grenades + code:c5d5/05/10 + cheat + description:Have all power-ups - both players + code:04ab/e9 + cheat + description:Have rapid fire - both players + code:0074/00 + +cartridge sha256:8ae9b624c08b86f6af41b5d58c328188c6df9c35868ae0763d75a22fbfb6c712 + name:Conan (USA) + cheat + description:Invincibility + code:87bf/20/ad+8461/20/ad + cheat + description:Infinite lives + code:dec5/c6/a5+db6b/c6/a5 + cheat + description:Infinite health + code:e9d1/8d/ad + +cartridge sha256:a5b8e24589539b0b84a6ad98aee9c91eb86eff795162be38b020dc42c3e3eca7 + name:Conquest of the Crystal Palace (USA) + cheat + description:Invincibility + code:d1e7/f0/d0+d1e5/a5/85 + cheat + description:Invincibility (alt) + code:e59b/20/ad + cheat + description:Infinite lives + code:e160/20/2c + cheat + description:Infinite lives (alt) + code:e163/85/a5 + cheat + description:Infinite energy (will display wrong info) + code:d1ca/bd/ee + cheat + description:Infinite energy for Farron + code:e5a0/20/ad + cheat + description:Infinite fire power + code:d393/bd + cheat + description:Maximum energy without Life Crystal + code:fa03/0e/14 + cheat + description:Don't use up money when buying things + code:e129/20/2c+e132/20/2c + cheat + description:Super-jump without Flight Crystal + code:d664/02/00+d666/03/01 + cheat + description:Increase super-jump to mega-jump + code:d6bb/0e/15 + cheat + description:Increase super-jump to super-mega-jump + code:d6bb/0e/45 + +cartridge sha256:62c9d4e0578cb1e615ce9bb2c8ebc15b1e8de4c928c5c07ba9a85c11aa36ae4d + name:Contra (Japan) + cheat + description:Invincibility + code:e1fa/20/ad + cheat + description:Infinite lives + code:d939/d6/a5 + +cartridge sha256:d41e28b1a33b3b6768e7c39c9fdfb1fda4b49940542d14085911fabd399e1ca9 + name:Contra (USA) + cheat + description:Invincibility + code:e2c9/20/ad + cheat + description:Invincibility (blinking) + code:d467/b5 + cheat + description:Invincibility (blinking) (alt) + code:d466/05/00 + cheat + description:Hit anywhere + code:e388/90/d0+e3a1/b0/24+e37f/b0/24+e3c7/20/ad + cheat + description:Enemies die automatically (causes graphical glitches in some levels) + code:e3f1/08/00+e358/f0/a9+e360/29/42 + cheat + description:Multi-jump - both players + code:d476/b5/20+d477/b0/9f+d478/f0/d6+d479/08/ea+d480/d6/b5+d9e9/95/b5+d54a/a9/60 + cheat + description:Jump higher + code:d6ef/fc/fb+d6e9/fb/fa + cheat + description:Run 2x as fast + code:d761/ff/fe+d75d/01/02 + cheat + description:Run 4x as fast + code:d75d/01/04+d761/ff/fc + cheat + description:Keep weapons after dying + code:dad3/95/a5 + cheat + description:Keep weapons after dying (alt) + code:dad3/2c + cheat + description:Press Select to change weapons - P1 + code:f61a/ff/20+f618/ff/d0+f62f/ff/d0+f623/ff/d0+f61b/ff/f0+f614/ff/f0+f622/ff/04+d042/a4/4c+f616/ff/4c+f62d/ff/4c+f613/ff/25+f612/ff/a4+f615/ff/03+f617/ff/53+f621/ff/c9+f625/ff/a9+f628/ff/01+f627/ff/69+f619/ff/29+f61f/ff/29+f629/ff/85+f62b/ff/a5+f62c/ff/f5+f61d/ff/a5+f61c/ff/0e+f62e/ff/46+d044/d0/f6+f61e/ff/aa+f62a/ff/aa+f620/ff/07+f624/ff/02+d043/25/12 + cheat + description:Press Start to complete the level + code:d04d/25/3b + cheat + description:Start with infinite lives + code:da03/b5 + cheat + description:Start new life with Machine Gun + code:dad2/01 + cheat + description:Start new life with Fireball + code:dad2/02 + cheat + description:Start new life with Spread Gun + code:dad2/03 + cheat + description:Start new life with Laser + code:dad2/04 + cheat + description:Start on level 2 + code:c479/3f/30+c475/00/01 + cheat + description:Start on level 3 + code:c479/3f/30+c475/00/02 + cheat + description:Start on level 4 + code:c479/3f/30+c475/00/03 + cheat + description:Start on level 5 + code:c479/3f/30+c475/00/04 + cheat + description:Start on level 6 + code:c479/3f/30+c475/00/05 + cheat + description:Start on level 7 + code:c479/3f/30+c475/00/06 + cheat + description:Start on level 8 + code:c479/3f/30+c475/00/07 + cheat + description:Invincibility (star effect) - P1 + code:00b0/fe + cheat + description:Invincibility (star effect) - P2 + code:00b1/fe + cheat + description:Invincibility (blinking) (alt 2) + code:00ae/41 + cheat + description:Have 99 lives + code:0032/99 + cheat + description:Have Machine Gun - P1 + code:00aa/01 + cheat + description:Have Fireball - P1 + code:00aa/02 + cheat + description:Have Spread Gun - P1 + code:00aa/03 + cheat + description:Have Laser - P1 + code:00aa/04 + cheat + description:Have Clone Attack (glitch weapon) - P1 + code:00aa/18 + cheat + description:Have Machine Gun - P2 + code:00ab/01 + cheat + description:Have Fireball - P2 + code:00ab/02 + cheat + description:Have Spread Gun - P2 + code:00ab/03 + cheat + description:Have Laser - P2 + code:00ab/04 + cheat + description:Have Clone Attack (glitch weapon) - P2 + code:00ab/18 + +cartridge sha256:0c190a8a7bfb57d7887e70183560db46fb5336abf569f6a38f5452fa32f1339f + name:Contra Force (USA) + cheat + description:Invincibility + code:a5ca/20/ad+a5b1/20/ad + cheat + description:Infinite lives (alt) + code:ac9e/99/b9 + cheat + description:Infinite lives - all characters + code:e07d/01/00 + cheat + description:Keep weapons after death + code:ac8f/99/b9 + cheat + description:Start with 9 lives - all characters + code:f636/03/09 + cheat + description:Start with 6 lives - all characters + code:f636/03/06 + cheat + description:Start with 1 life - all characters + code:f636/03/01 + +cartridge sha256:22ea833fd9466795bd2b05df96a47081ca45a26f545af1242f4c89b2d6688bdd + name:Cool World (USA) + cheat + description:Infinite lives + code:e4be/ce/2c + cheat + description:Infinite Bombs + code:eed1/c6/a5 + cheat + description:Infinite Erasers + code:eeec/c6/a5 + cheat + description:Lots of Erasers + code:af70/00/28 + cheat + description:Start with 3 Bombs + code:b2e4/01/03 + cheat + description:Start with 6 Bombs + code:b2e4/01/06 + cheat + description:Start with 9 Bombs + code:b2e4/01/09 + cheat + description:Start with 2 lives + code:c0c7/02/01+af44/02/01 + cheat + description:Start with 7 lives + code:c0c7/02/06+af44/02/06 + cheat + description:Start with 10 lives + code:c0c7/02/09+af44/02/09 + cheat + description:Start with 3 Erasers + code:c0cc/01/03+af6a/01/03 + cheat + description:Start with 6 Erasers + code:c0cc/01/06+af6a/01/06 + cheat + description:Start with 9 Erasers + code:c0cc/01/09+af6a/01/09 + cheat + description:Infinite energy + code:04e8/00 + +cartridge sha256:528d501320ed0276bbc542f03c7c05fb59f9eeb540cd0d39e7286b1542aa153a + name:Cowboy Kid (USA) + cheat + description:Infinite lives + code:cbf8/99/b9 + cheat + description:Hit anywhere + code:93a0/5e/7c+939d/c9/a9 + cheat + description:Infinite health + code:0698/08 + +cartridge sha256:23b16928a7615ec599536b17dd2026370e2e1a13835f61276ea383d6b4d3f8c0 + name:Crackout (USA) (Proto) + cheat + description:Infinite lives + code:b87a/c6/a5 + +cartridge sha256:fda4fd839497634df5e77b1842f88c05ffa0ac13a894c9ea288aedcd168489c3 + name:Crash 'n' the Boys - Street Challenge (USA) + cheat + description:Start with 99 Gold + code:b5e8/05/99 + cheat + description:Start with 50 Gold + code:b5e8/05/50 + +cartridge sha256:b504d0ebff8aa6439f1f9606526d8739f5007c1fdac31f9550caa7ca26edce16 + name:Crisis Force (Japan) + cheat + description:Infinite lives + code:86fd/d6/b5 + cheat + description:Infinite Bombs + code:861c/de/bd + cheat + description:Start on stage 2 + code:cb14/00/01 + cheat + description:Start on stage 3 + code:cb14/00/02 + cheat + description:Start on stage 4 + code:cb14/00/03 + cheat + description:Start on stage 5 + code:cb14/00/04 + cheat + description:Start on stage 6 + code:cb14/00/05 + cheat + description:Start on stage 7 + code:cb14/00/06 + +cartridge sha256:7eca4ce264363ab8cc2c9aeb52f2e5be43a72a8223bac977492c7f8d78a49fb4 + name:Cross Fire (USA) (Proto) + cheat + description:Invincibility + code:93e8/d0/f0+93e3/f0/d0 + cheat + description:Infinite energy + code:8779/d0/a9+877b/ad/8d + cheat + description:Infinite lives + code:81bf/ce/ad + cheat + description:Protection from enemies + code:fafb/8d/ad+a00b/ce/ad + +cartridge sha256:5ad644d368f70b61700b74a1d04778888efcbbf98d5435d79f9fcefd23ac39c2 + name:Crystalis (USA) + cheat + description:Always fire charged shot + code:9c79/4a/a9+9c7a/4a/01 + cheat + description:Always fire bracelet charged shot + code:9c79/4a/a9+9c7a/4a/03 + cheat + description:Faster sword charge + code:9e10/03/00 + cheat + description:Allow sword charge while moving + code:9e00/4c/ad + cheat + description:First pupil gives you more gold + code:d269/64/ff + cheat + description:Magic doesn't use up MP + code:9afe/8d/ad + cheat + description:Immune to poison + code:ef5e/0f/00 + cheat + description:Immune to paralysis + code:efc5/0f/00 + cheat + description:Stronger poison + code:ef96/04/06 + cheat + description:Weaker poison + code:ef96/04/02 + cheat + description:Walk through walls + code:99cb/06/00 + cheat + description:Don't get charged for boarding at Inn + code:963d/8d/ad+9643/8d/ad + cheat + description:Don't get charged for items in shops + code:99e3/8d/ad+99e9/8d/ad + cheat + description:Start with some gold + code:c993/8d/ee + +cartridge sha256:e239709320fca149b40a1f04625741dc2b6d3b9cc933d4062882ad762fa67ca7 + name:Cyberball (USA) + cheat + description:Infinite level time + code:f4b0/ce/ad + cheat + description:Start with level time at 1 minute + code:93ff/03/01 + cheat + description:Start with level time at 2 minutes + code:93ff/03/02 + cheat + description:Start with level time at 5 minutes + code:93ff/03/05 + cheat + description:Start with level time at 9 minutes + code:93ff/03/09 + cheat + description:Goals worth 0 points + code:802a/02/00 + cheat + description:Goals worth 1 points + code:802a/02/01 + cheat + description:Goals worth 5 points + code:802a/02/05 + cheat + description:Goals worth 9 points + code:802a/02/09 + cheat + description:Goals worth mega points + code:802a/02/63 + +cartridge sha256:ad1e14d08657d99c8b70f779931f62524b4beb529090b82b368925d8b642e40c + name:Cybernoid - The Fighting Machine (USA) + cheat + description:Infinite Bombs + code:9976/ce/ad + cheat + description:Infinite Genocides + code:bd8d/ce/ad + cheat + description:Infinite Shields + code:9d93/ce/ad + cheat + description:Infinite Seekers + code:977b/ce/ad + cheat + description:20 Genocides on new life + code:a192/02/14 + cheat + description:Keep rear laser after death + code:a142/8d/2c + cheat + description:Keep mace after death + code:a148/8d/2c+a145/8d/2c + cheat + description:Start with rear laser + code:8199/00/ff + cheat + description:Start with infinite lives + code:a164/ce/ad + cheat + description:Start new life with 20 shields + code:823e/01/14+a197/01/14 + cheat + description:Start with 20 seekers and bouncers + code:8242/05/14+a19c/05/14 + cheat + description:Start with double Bombs + code:8233/14/28+a18d/14/28 + cheat + description:Start with 1 life + code:8206/ff/f7 + cheat + description:Start with 5 lives + code:8206/ff/fb + cheat + description:Start with 18 lives + code:8206/ff/08 + cheat + description:Invincibility + code:06d4/00 + cheat + description:Infinite lives + code:06d5/ff + +cartridge sha256:9d832956a533292e740be553e0eb46d3a3d449578bcbaa9c7556a31d2b6a594d + name:D.J. Boy (Unl) + cheat + description:Infinite health + code:8662/9d/ad + cheat + description:Infinite time + code:8d1f/85/a5 + cheat + description:Infinite lives + code:f788/c6/a5 + +cartridge sha256:4cbf1c1d0be227127513065ccbc8ecf5e5ee61a7a58b6dea79ff01f0eb9f26af + name:Danny Sullivan's Indy Heat (USA) + cheat + description:Infinite turbos + code:b905/de/ad + cheat + description:Infinite fuel + code:8ee5/9d/ad + cheat + description:Everything costs how much you have + code:b1c6/9d/ed + cheat + description:Don't take damage in the front + code:a2e0/99/b9 + cheat + description:Start with $255,000 + code:933a/64/ff + +cartridge sha256:9b6d967f493a565e25b51aee044354f857c5cefc41f476d4f259e7368b1fdd70 + name:Darkman (USA) + cheat + description:Infinite health + code:cdc3/8d/ad + cheat + description:Infinite health (alt) + code:0496/37+04b5/37 + cheat + description:Infinite lives + code:0497/04 + cheat + description:Multi-jump + code:8746/1d/00+8736/5e/00 + cheat + description:Hit anywhere - side-scrolling levels + code:9c8e/d0/24+9c86/f0/24+9c6c/f0/24 + cheat + description:Never lose balance + code:cb5d/90/60 + +cartridge sha256:f97f05a4f8747d81dc8adaf07df70d1f87366632ae3e93103d387043ef5ec508 + name:Darkwing Duck (USA) + cheat + description:Invincibility + code:813d/d0/f0 + cheat + description:Infinite health + code:f9ed/c9/60 + cheat + description:Infinite lives + code:cb15/ce/2c + cheat + description:Infinite lives (alt) + code:cb15/ce/cd + cheat + description:Infinite gas (if you avoid the "Go" missions) + code:89bb/ad/60 + cheat + description:More gas on pick-up + code:8904/70/75 + cheat + description:Start with infinite health + code:f9f3/8d/ad + cheat + description:Start with 2 lives + code:c95a/73/71 + cheat + description:Start with 6 lives + code:c95a/73/75 + cheat + description:Start with 9 lives + code:c95a/73/78 + +cartridge sha256:227e789fef94eabcf24a5ec9a3944de58b183bbc7d96140269d1c908f162b853 + name:Dash Galaxy in the Alien Asylum (USA) + cheat + description:Invincibility + code:c7b3/ad/ea + cheat + description:No damage from shots and collisions + code:9502/01/00 + cheat + description:Infinite Oxygen + code:9515/ce/ad + cheat + description:Infinite Bombs in elevator shaft + code:da78/ad/ee + cheat + description:Infinite Bombs in rooms + code:daea/ad/ee + cheat + description:Infinite Detonators in shafts + code:da9d/ad/ee + cheat + description:Infinite Detonators in rooms + code:db0f/ad/ee + cheat + description:Infinite Keys in shafts + code:a405/ad/ee + cheat + description:Infinite Keys in rooms + code:a19e/ad/ee + cheat + description:Can't lose lives in rooms + code:9166/ce/ad + cheat + description:Can't lose lives in elevator shaft + code:9133/ce/ad + cheat + description:Oxygen used up more slowly in shaft + code:a158/78/ff + cheat + description:Oxygen used up more quickly in rooms + code:af2d/ff/70 + cheat + description:Start with 1 life + code:90f5/03/01 + cheat + description:Start with 6 lives + code:90f5/03/06 + cheat + description:Start with 9 lives + code:90f5/03/09 + cheat + description:Start with 99 lives + code:90f5/03/63 + cheat + description:Start on level 5 + code:9d01/85/a9+9d02/de/05 + cheat + description:Start on level 10 + code:9d01/85/a9+9d02/de/0a + cheat + description:Start on level 15 + code:9d01/85/a9+9d02/de/0f + cheat + description:Start on level 20 + code:9d01/85/a9+9d02/de/14 + +cartridge sha256:911fb75ec1f900a5c258635fae79e56520eeb4aec35b40737c44b735eeccdc56 + name:David Crane's A Boy and His Blob - Trouble on Blobolonia (USA) + cheat + description:Invincible (restart if you die underwater and get stuck by being unable to call your Blob) + code:c090/a9/60 + cheat + description:Never take damage from enemies + code:9c96/d0/60 + cheat + description:Infinite lives + code:89a9/c6/24 + cheat + description:Infinite Jellybeans + code:c16d/01/00 + cheat + description:1 life only + code:bc37/05/00 + cheat + description:Double lives + code:bc37/05/0a + cheat + description:Fast play + code:808a/20/ad + cheat + description:Gives 10 Orange Jellybeans + code:bd0b/00/10 + cheat + description:10 Lime Jellybeans + code:bcfd/00/10 + cheat + description:99 Licorice Jellybeans + code:bcf1/72/99 + cheat + description:Double Strawberry Jellybeans + code:bcf3/15/30 + cheat + description:Double Cola Jellybeans + code:bcf7/18/36 + cheat + description:Double Cinnamon Jellybeans + code:bcf9/24/48 + cheat + description:Double Apple Jellybeans + code:bcfb/12/24 + cheat + description:Double Vanilla Jellybeans + code:bcff/30/60 + cheat + description:Double Ketchup Jellybeans + code:bd07/06/12 + cheat + description:Triple Coconut Jellybeans + code:bcf5/06/18 + cheat + description:Triple Rootbeer Jellybeans + code:bd03/06/18 + cheat + description:10 Vitamin A for Vita-Blaster + code:bd0d/00/10 + cheat + description:10 Vitamin B for Vita-Blaster + code:bd0f/00/10 + cheat + description:10 Vitamin C for Vita-Blaster + code:bd11/00/10 + cheat + description:Start with 101 of all starting Jellybeans + code:bc22/bd/ad+bc23/f0/77 + +cartridge sha256:41f949cfedf7167985f779c0782ee17ee83d82e35111c5f22ee5037f54313a06 + name:Day Dreamin' Davey (USA) + cheat + description:Infinite health + code:94d2/85/a5 + cheat + description:Hit anywhere + code:b472/4a/00 + cheat + description:Infinite health (alt) + code:0067/ff + cheat + description:Infinite Small Spears + code:0411/99 + cheat + description:Infinite Long Spears + code:0412/99 + cheat + description:Infinite One Rock + code:0413/99 + cheat + description:Infinite Three Rock + code:0414/99 + cheat + description:Infinite Four Rock + code:0415/99 + cheat + description:Infinite Potions + code:041f/99 + cheat + description:Infinite Red Potions + code:0420/99 + cheat + description:Have Key + code:0420/01 + cheat + description:Have Ring + code:0422/01 + cheat + description:Have Pendant + code:0423/01 + cheat + description:Have Sword + code:040e/01 + cheat + description:Have Long Lance + code:040f/01 + cheat + description:Have Long Sword + code:0410/01 + cheat + description:Walk through walls + code:ce42/00+ced9/00+cf64/00+cfe0/00 + +cartridge sha256:9371fab4f58fa6d6e5211950fdaff2810cccff512fc301e88af9c5b1bf586257 + name:Days of Thunder (USA) + cheat + description:Faster acceleration + code:f381/bd/ad + cheat + description:Tires don't burst + code:9a68/ff/00 + cheat + description:Better left-hand cornering + code:9cad/f8/f5 + cheat + description:Maximum acceleration + code:f3bb/03/05+f381/bd/ad + cheat + description:Start with more fuel + code:f34d/9f/ff + cheat + description:Start with less fuel + code:f34d/9f/5f + cheat + description:Infinite fuel + code:021f/ff + cheat + description:Always 1st place + code:0464/01 + cheat + description:Always excellent condition - front left tire + code:046c/00 + cheat + description:Always excellent condition - front right tire + code:046d/00 + cheat + description:Always excellent conditon - rear left tire + code:046e/00 + cheat + description:Always excellent condition - rear right tire + code:046f/00 + cheat + description:Always excellent condition - engine + code:0471/00 + cheat + description:Max speed + code:0473/15 + cheat + description:Lap 02 + code:0463/02 + cheat + description:Lap 03 + code:0463/03 + cheat + description:Lap 04 + code:0463/04 + cheat + description:Lap 05 + code:0463/05 + cheat + description:Lap 06 + code:0463/06 + cheat + description:Lap 07 + code:0463/07 + cheat + description:Lap 08 + code:0463/08 + cheat + description:Lap 09 + code:0463/09 + cheat + description:Lap 10 + code:0463/0a + +cartridge sha256:0115356b0791cc8ddcb7d3163d6ef7aa664f3ff4e68dba561ffffb79eefcbca9 + name:Deadly Towers (USA) + cheat + description:Invincibility + code:99aa/29/a9 + cheat + description:Infinite HP + code:99df/e5/24 + cheat + description:1 Ludder gives 10 on pick-up + code:9fb4/01/0a + cheat + description:5 Ludder gives 20 on pick-up + code:9fb3/05/14 + cheat + description:Shopkeeper forgets to charge you + code:c6b3/f9/2c + cheat + description:Start with 127 Ludder + code:812b/32/7f + cheat + description:Start with 75 Ludder + code:812b/32/4b + cheat + description:Always max Ludder + code:009b/fa + cheat + description:Max HP + code:01b3/ff + cheat + description:All belts burned (door on the right in the beginning of the game is now open) + code:01b4/07 + cheat + description:Slot 1 - Splendor (game's best sword) + code:0176/10 + cheat + description:Slot 2 - Hyper Helm + code:0177/04 + cheat + description:Slot 3 - Shield Of Kings + code:0178/08 + cheat + description:Slot 4 - Hyper Armor + code:0179/0c + cheat + description:Slot 5 - Hyper Boots + code:017a/14 + cheat + description:Slot 6 - Parallel Shot + code:017b/1a + +cartridge sha256:32aeef6bae170d2628d9c678f0b198a61e787a498a995eb374518635f0b55199 + name:Deathbots (USA) (Rev 1) (Unl) + cheat + description:Infinite energy + code:aa71/9d/bd + cheat + description:Infinite lives + code:a0a5/ce/ad + cheat + description:Infinite shots + code:ae30/99/b9 + +cartridge sha256:5dac8da44ac4e28bebf3d33c8e00e1fdffcc7baee3ff98bec5a10415d1226791 + name:Deathbots (USA) (Unl) + cheat + description:Infinite energy + code:aa71/9d/bd + cheat + description:Infinite lives + code:a0a5/ce/ad + cheat + description:Infinite shots + code:ae30/99/b9 + +cartridge sha256:bf58512dc3bc427d14a6d851445801967cd14f3d02ae236eabceeb7928a55462 + name:Defender II (USA) + cheat + description:Invincibility + code:dee1/85/a5 + cheat + description:Infinite lives + code:cfe0/24 + cheat + description:Infinite Smart Bombs + code:d5fc/24 + cheat + description:Super speed + code:e429/07+e3ed/07 + cheat + description:Start with 1 life + code:cfb7/01 + cheat + description:Start with 6 lives + code:cfb7/06 + cheat + description:Start with 9 lives + code:cfb7/09 + +cartridge sha256:9e31d3d918a352c0c5a81c52efc364253f3fb75cc84151ee904ad078be62d8e1 + name:Defender of the Crown (USA) + cheat + description:Only 10 soldiers in your Garrison + code:e368/14/0a + cheat + description:40 soldiers in your Garrison + code:e368/14/28 + cheat + description:Soldiers for free + code:990b/01/00 + cheat + description:Triple the cost of soldiers + code:990b/01/03 + cheat + description:Halve the cost of knights + code:990c/08/04 + cheat + description:Double the cost of knights + code:990c/08/10 + cheat + description:Halve the cost of catapults + code:990d/0f/07 + cheat + description:Halve the cost of castles + code:990e/14/0a + +cartridge sha256:c408dd19ca49e55173ff2c491868f437d8100671f7b9646ee20e3204e0ba216f + name:Demon Sword (USA) (USA) + cheat + description:Invincibility + code:8a3b/20/ad + cheat + description:Infinite health (life) + code:c646/85/a5 + cheat + description:Infinite powers and lives + code:e6db/01/00 + cheat + description:Infinite lives + code:d0d7/85/a5 + cheat + description:Phoenix always rescues you + code:e060/ad/ee + cheat + description:Infinite Fire, Lightning, Power Beams on pick-up + code:f778/9d/bd + cheat + description:Hit anywhere + code:c720/b5/38+c721/98/60+c6f9/4c/ad + cheat + description:Extra dart strength + code:a178/8d/ee + cheat + description:Start with 44 Red Spheres + code:a174/85/a2+a187/8d/8e + cheat + description:Start with 44 Black Spheres + code:a174/85/a2+a18a/8d/8e + cheat + description:Start with 44 Fire Spheres + code:a174/85/a2+a17b/8d/8e + cheat + description:Start with 44 Lightning Bolts + code:a174/85/a2+a17e/8d/8e + cheat + description:Start with 44 Power Beams + code:a174/85/a2+a181/8d/8e + cheat + description:Start with 1 life + code:ddeb/02/00 + cheat + description:Start with 6 lives + code:ddeb/02/05 + cheat + description:Start with 9 lives + code:ddeb/02/08 + cheat + description:Start on level 2 + code:a178/8d/60+a173/00/01 + cheat + description:Start on level 3 + code:a178/8d/60+a173/00/02 + cheat + description:Start on level 4 + code:a178/8d/60+a173/00/03 + cheat + description:Start on level 5 + code:a178/8d/60+a173/00/04 + cheat + description:Start on level 6 + code:a178/8d/60+a173/00/05 + cheat + description:Infinite health (life) (alt) + code:007e/08 + cheat + description:Infinite Power + code:007c/0f + cheat + description:Infinite lives (alt) + code:007d/99 + cheat + description:Infinite Keys + code:0207/99 + cheat + description:Infinite Red Spheres + code:0208/99 + cheat + description:Infinite Black Spheres + code:0209/99 + cheat + description:Infinite Phoenix + code:020a/99 + +cartridge sha256:4b13643e53f2f7b43075233eebe65489d1d0a4ce3cf71a4f934178c3091930cf + name:Dengeki - Big Bang! (Japan) + cheat + description:Invincibility (blinking) + code:90d9/03/90+90d1/f0/24+90d8/d0/a9 + +cartridge sha256:281ad7bdb4f94e2303d95c6078c20295e240b80370fdceda27950966b0e09198 + name:Desert Commander (USA) + cheat + description:Start with 99 Tank units + code:0084/63 + cheat + description:Start with 99 Tank #2 units + code:0085/63 + cheat + description:Start with 99 Truck units + code:0086/63 + cheat + description:Start with 99 Troop units + code:0087/63 + cheat + description:Start with 99 Grenade units + code:0088/63 + cheat + description:Start with 99 Stationary Artillery units + code:0089/63 + cheat + description:Start with 99 Transport Truck units + code:008a/63 + cheat + description:Start with 99 Heavy Airplane units + code:008b/63 + cheat + description:Start with 99 Light Airplane units + code:008c/63 + +cartridge sha256:44cd6b2aa05286c37e78bd04d15793018bb0656b24260e5c76fc5cfad39f699b + name:Destination Earthstar (USA) + cheat + description:Infinite lives + code:ddee/c6/a5 + cheat + description:Less energy + code:8bfb/99/55 + cheat + description:More energy + code:8bfb/99/ff + cheat + description:Don't lose special weapon in sub-game + code:ef7d/ca/ea + cheat + description:Start with 1 life + code:ec62/03/01 + cheat + description:Infinite energy (ten-thousand's digit) + code:05a8/99 + cheat + description:Infinite energy (hundred's digit) + code:05a9/75 + cheat + description:Infinite energy (ten's and one's digit) + code:05aa/76 + cheat + description:Infinite Ruby Laser + code:05ad/ff + cheat + description:Infinite Torpedos + code:05af/ff + +cartridge sha256:6d082c801942ce6787b471428ab4c8a6acb3e21f3f38fa197f2aeb698d9a2d7e + name:Destiny of an Emperor (USA) + cheat + description:No random battles + code:f47a/c5/a9+f4d7/39/ad + cheat + description:Buy 300 provisions for no money + code:92c2/64/00 + cheat + description:Buy 30,000 provisions for no money + code:92c5/27/00+92c6/10/00 + cheat + description:Dagger costs nothing + code:bbf3/32/00 + cheat + description:Bandana costs nothing + code:bce4/32/00 + cheat + description:Flail costs nothing + code:bbfc/64/00 + cheat + description:Robe costs nothing + code:bca2/64/00 + cheat + description:Elixir A costs nothing + code:bbba/14/00 + cheat + description:Resurrect costs nothing + code:bbae/64/00 + cheat + description:Steed costs nothing + code:bba6/c8/00 + cheat + description:Gullwing costs nothing + code:bb8c/c8/00 + cheat + description:Leather costs nothing + code:bca9/2c/00+bcaa/01/00 + cheat + description:Walk anywhere + code:f336/4c/ad + +cartridge sha256:163479e2b1571538cf2f0f147bcbdebaab8ed8b0251f87dabd9bc4c80d786ea1 + name:Dick Tracy (USA) + cheat + description:Infinite health + code:97ed/ed/2c + cheat + description:Infinite hand gun bullets + code:a920/ce/ad + cheat + description:Infinite machine gun bullets + code:a0ea/ce/ad + cheat + description:Infinite super punches + code:a245/ce/ad + cheat + description:Infinite tear gas + code:a20d/ce/ad + cheat + description:More super punches on pick-up + code:9185/0a/14 + cheat + description:Mega-jump + code:a060/f7/f4 + cheat + description:Take more damage + code:97ec/38/18 + cheat + description:Infinite health (alt) + code:0663/09 + cheat + description:Infinite hand gun bullets (alt) + code:0761/31 + +cartridge sha256:e060fd43ef58d6e022f1fcab853a388142fd68d4bbd00dedc095992152e27976 + name:Die Hard (USA) + cheat + description:Infinite health against Pistol ammo + code:a786/85/a5 + cheat + description:Infinite health against Submachine Gun ammo + code:a795/85/a5 + cheat + description:Infinite health against punches + code:a7a3/85/a5 + cheat + description:Infinite Pistol ammo + code:8273/ce/60 + cheat + description:Infinite Submachine Gun ammo + code:827d/ce/60 + cheat + description:Infinite ammo on all guns + code:826d/a5/60 + cheat + description:Infinite time + code:f1bc/a5/60 + cheat + description:Lose foot health very slowly + code:f397/8d/ad + cheat + description:Time runs at 1/4 normal speed + code:f1b1/3c/f0 + cheat + description:Time runs at 1/3 normal speed + code:f1b1/3c/b4 + cheat + description:Time runs at 1/2 normal speed + code:f1b1/3c/78 + cheat + description:Time runs at 2x normal speed + code:f1b1/3c/1e + cheat + description:Time runs at 3x normal speed + code:f1b1/3c/14 + cheat + description:Time runs at 4x normal speed + code:f1b1/3c/0f + cheat + description:Start with no Pistol shots instead of 15 + code:c1a1/0f/00 + cheat + description:Start with 5 Pistol ammo + code:c1a1/0f/05 + cheat + description:Start with 10 Pistol ammo + code:c1a1/0f/0a + cheat + description:Start with 20 Pistol ammo + code:c1a1/0f/14 + cheat + description:Start with 25 Pistol ammo + code:c1a1/0f/19 + cheat + description:Start with 1 life point instead of 16 + code:c19d/10/01 + cheat + description:Start with 2 life points + code:c19d/10/02 + cheat + description:Start with 4 life points + code:c19d/10/04 + cheat + description:Start with 8 life point + code:c19d/10/08 + cheat + description:Start with 12 life points + code:c19d/10/0c + cheat + description:Start with 20 life points + code:c19d/10/14 + cheat + description:Invincibility + code:00a5/05 + cheat + description:Infinite health (alt) + code:00ac/10 + cheat + description:Infinite feet health + code:0798/00 + cheat + description:Infinite time (alt) + code:00af/60 + cheat + description:Immune to flashes + code:00a8/00 + cheat + description:0 crooks left + code:00ab/00 + cheat + description:Have all items + code:0779/ff + cheat + description:Infinite pistol ammo (alt) + code:077a/14 + cheat + description:Infinite Submachine Gun ammo (alt) + code:077b/64 + cheat + description:Infinite Submachine Gun cartridges + code:077c/07 + cheat + description:Infinite C4 + code:077d/05 + cheat + description:Infinite flashes + code:077e/07 + +cartridge sha256:721c464598519132fbb62f74c39a5b0ef67d1b74ebc571e77d33b5b2b4fae8c4 + name:Digger - The Legend of the Lost City (USA) + cheat + description:Infinite health + code:f9d1/c6/a5 + cheat + description:Infinite lives + code:86e7/c6/a5 + cheat + description:Less rocks on pick-up + code:c332/09/05 + cheat + description:Infinite rocks on pick-up + code:f606/ce/ad + cheat + description:Infinite rope on pick-up + code:b38d/ce/ad + cheat + description:Infinite dynamite on pick-up + code:a08e/ce/ad + cheat + description:Start with weapons + code:fc19/00/09 + cheat + description:Infinite time (disable before exiting stage) + code:0187/09 + +cartridge sha256:7c8b6add50b20e4612e3043df0671e701cd2aa163e4af864913e3940feee27f2 + name:Dig Dug (Japan) + cheat + description:Infinite lives - both players + code:0060/03 + cheat + description:Start on stage 25 (disable after loading stage) + code:006e/18 + cheat + description:Start on stage 50 (disable after loading stage) + code:006e/31 + cheat + description:Start on stage 75 (disable after loading stage) + code:006e/4a + cheat + description:Start on stage 99 (disable after loading stage) + code:006e/63 + +cartridge sha256:1bf92138500e24a4e48da6d1f2eecbaeb3f36d28a425f06179fe9283381640e6 + name:Dig Dug II - Trouble in Paradise (USA) + cheat + description:Instant inflate and explode + code:e205/d0/24 + cheat + description:Never lose lives from touching water + code:be25/ce/ad + cheat + description:Never lose lives from Fygar's flame + code:c6eb/ce/ad + cheat + description:Never lose lives from hitting enemies + code:d0f1/ce/ad + cheat + description:Turbo speed + code:f371/29/a9+f372/03/02 + cheat + description:Start with 1 life - both players + code:e981/03/01 + cheat + description:Start with 8 lives - both players + code:e981/03/08 + +cartridge sha256:5aaa8382ec79c170472840dfd8e9d93512bdf2be09ecd6b3709a9d27658888cd + name:Dirty Harry (USA) + cheat + description:Infinite health + code:cca2/e5/24 + cheat + description:Infinite lives + code:ccb9/ce/ad + cheat + description:Maximum health from Chili Dogs + code:b1e5/02/00 + cheat + description:Only 10 Magnum Bullets allowed + code:d5de/19/0a+d5e2/19/0a + cheat + description:50 Magnum Bullets allowed + code:d5de/19/32+d5e2/19/32 + cheat + description:Start with 1 life + code:d57c/05/01 + cheat + description:Start with 10 lives + code:d57c/05/0a + cheat + description:Infinite Time Bombs + code:06d3/63 + cheat + description:Infinite Hot Dogs + code:06d4/63 + cheat + description:Infinite Spear Gun + code:06d5/63 + cheat + description:Infinite Bazooka + code:06d6/63 + cheat + description:Infinite Rope + code:06d7/63 + cheat + description:Infinite Armor Vest + code:06d8/63 + cheat + description:Infinite Mask + code:06d9/63 + cheat + description:Infinite Flashlight + code:06da/63 + cheat + description:Infinite Prybars + code:06db/63 + +cartridge sha256:65295da1f14578b659b6613be80d0516c2a4932dc6bc33bad2cc71a3154672e7 + name:Doki! Doki! Yuuenchi (Japan) + cheat + description:Invincibility + code:9101/30/10 + cheat + description:Infinite hits + code:afe8/ce/ad + cheat + description:Infinite lives + code:dfdc/ce/ad + +cartridge sha256:aa408f5a6b97c0d738e7e8b489a5617ad4a9ecdee2b05c4ee504210ce31b2825 + name:Donkey Kong (World) (Rev A) + cheat + description:Invincible against barrels + code:ecac/85/a5 + cheat + description:Invincible against fireballs + code:edb2/85/a5 + cheat + description:Infinite lives + code:caf1/c6/a5 + cheat + description:Hammer lasts 3.4 times longer + code:d636/4b/ff + cheat + description:Start with 1 life + code:c9ff/03/01 + cheat + description:Start with 9 lives + code:c9ff/03/09 + +cartridge sha256:b15b298dc37692d0bed2cbf922727ea48ed38bbd6cf3acdd28be6d2b9be344d3 + name:Donkey Kong 3 (World) + cheat + description:Invincibility + code:cbe0/f0/60 + cheat + description:Reduce the time for pros + code:c7cc/80/0a + cheat + description:Normal spray more powerful + code:d01a/01/02 + cheat + description:Normal spray longer + code:d01b/00/32 + cheat + description:Spray cuts through baddies + code:d15f/01/00 + cheat + description:Normal bees explode + code:e04a/33/00 + cheat + description:Speeding Stanley + code:ccae/03/06 + cheat + description:Start with infinite lives + code:c979/d6/a5 + cheat + description:Start with 1 life + code:c685/03/01 + cheat + description:Start with 9 lives + code:c685/03/09 + +cartridge sha256:950ebe68e7f74219b9e5e104200b03165d59c24264f02e32c12be967fd311ac2 + name:Donkey Kong Jr. (World) (Rev A) + cheat + description:Cannot die from falling from a high platform + code:da30/05/01 + +cartridge sha256:07dd16464d769429c651bd203ac2e74c7aa5852824482ca8877959d643bc8689 + name:Donkey Kong Jr. Math (USA, Europe) + cheat + description:Always get the correct answer + code:d543/0a/00+d533/1a/00 + +cartridge sha256:234c2f62cbc3c72eb7519425a1893229e19a3fd1b1630fb75f3e951960a300e5 + name:Donkey Kong Classics (USA, Europe) + cheat + description:Donkey Kong - Infinite lives + code:89f1/a5 + cheat + description:Donkey Kong - Start with 1 life + code:88e7/01 + cheat + description:Donkey Kong - Start with 6 lives + code:88e7/06 + cheat + description:Donkey Kong - Start with 9 lives + code:88e7/09 + cheat + description:Donkey Kong - Controllable jump + code:8de6/0d/00 + cheat + description:Donkey Kong - Keep hammer longer + code:954b/4b/80 + cheat + description:Donkey Kong Jr - Infinite lives + code:c126/a5 + cheat + description:Donkey Kong Jr - Start with 1 life + code:be65/01 + cheat + description:Donkey Kong Jr - Start with 6 lives + code:be65/06 + cheat + description:Donkey Kong Jr - Start with 9 lives + code:be65/09 + cheat + description:Donkey Kong Jr - Controllable jump + code:c3c0/0d/00 + cheat + description:Donkey Kong Jr - Faster single vine climbing + code:cd66/40/80 + cheat + description:Donkey Kong Jr - Can fall onto platforms + code:d021/05/01 + cheat + description:Donkey Kong Jr - Speed up + code:ccdd/f0/a0+ccbf/f0/a0 + +cartridge sha256:56cb5897c539b6874e311a314767df85186184690f10d9982b02cb90ff606537 + name:Double Dare (USA) + cheat + description:Infinite time to answer questions + code:8ba7/ce/ad + +cartridge sha256:8f2f9ba926280edd3652745e1d04a30ecce64089fbf3f022a35b4039a2dd7b66 + name:Double Dragon (USA) + cheat + description:Infinite lives + code:e2b3/02/88 + cheat + description:Infinite time + code:f33f/01/00 + cheat + description:Gain hearts quickly + code:fbc2/e6/c6 + cheat + description:Gain a heart every time you hit an enemy + code:fbdf/c0 + cheat + description:More health - P1 + code:f841/4a/ea + cheat + description:More health - P2 or computer + code:f84a/4a/ea + cheat + description:No enemies + code:9959/5d + cheat + description:Enemies will not fight back + code:8959/5d + cheat + description:Slow motion + code:cce9/9c + cheat + description:Timer will count down faster + code:f332/30/20 + cheat + description:Timer will count down super-fast + code:f332/30/10 + cheat + description:Disable level 4 wall trap + code:d32d/ff + cheat + description:Start with 1 life + code:e2b3/02/00 + cheat + description:Start with 6 lives + code:e2b3/02/05 + cheat + description:Start with 9 lives + code:e2b3/02/08 + cheat + description:Infinite health + code:03b4/64 + cheat + description:Start with all hearts + code:0040/07 + cheat + description:Start on stage 2 (disable after stage begins) + code:003d/01 + cheat + description:Start on stage 3 (disable after stage begins) + code:003d/02 + cheat + description:Start on stage 4 (disable after stage begins) + code:003d/03 + +cartridge sha256:c564704993cf79c94db5c2954792e99e86100586d0ef1d4bf1aefc6d008d4c0f + name:Double Dragon II - The Revenge (USA) (Rev A) + cheat + description:Invincibility (blinking) - both players + code:807b/28/00 + cheat + description:No enemies + code:9021/72 + cheat + description:Enemies die automatically + code:b137/b1/a9+b138/29/27 + cheat + description:Never lose lives from falling + code:8427/de/ad + cheat + description:Never lose lives from low energy + code:8a97/de/ad + cheat + description:Never lose lives from water + code:8b6d/de/ad + cheat + description:Uppercut after only two punches + code:bb68/02/01 + cheat + description:Slow down gameplay + code:ed89/00/ff + cheat + description:Start with 259 lives - P1 + code:ee58/04/ff + cheat + description:Start with 8 lives - P1 + code:ee58/04/08 + cheat + description:Start with 8 lives - P2 + code:ee6d/04/08 + cheat + description:Start with 1 life - P1 + code:ee58/04/01 + cheat + description:Start with 1 life - P2 + code:ee6d/04/01 + cheat + description:Start on mission 2 + code:ee32/00/01 + cheat + description:Start on mission 3 + code:ee32/00/02 + cheat + description:Start on mission 4 + code:ee32/00/03 + cheat + description:Start on mission 5 + code:ee32/00/05 + cheat + description:Start on mission 6 + code:ee32/00/06 + cheat + description:Start on mission 7 + code:ee32/00/09 + cheat + description:Start on mission 8 + code:ee32/00/0c + cheat + description:Start at final boss + code:ee32/00/0e + cheat + description:Start at final boss (alt) + code:ee32/0e + cheat + description:Invincibility + code:03cc/f0 + cheat + description:Enemies die after one knockdown (disable at final boss) + code:0420/00+0421/00 + +cartridge sha256:f329de1e2653499221dc4d14d0e8b1040fee87bda4daccf6098b316a1a024fe2 + name:Double Dragon II - The Revenge (USA) + cheat + description:Invincibility (blinking) - both players + code:807b/28/00 + cheat + description:No enemies + code:9021/72 + cheat + description:Enemies die automatically + code:b137/b1/a9+b138/29/27 + cheat + description:Never lose lives from falling + code:8427/de/ad + cheat + description:Never lose lives from low energy + code:8a97/de/ad + cheat + description:Never lose lives from water + code:8b6d/de/ad + cheat + description:Uppercut after only two punches + code:bb68/02/01 + cheat + description:Slow down gameplay + code:ed89/00/ff + cheat + description:Start with 259 lives - P1 + code:ee58/04/ff + cheat + description:Start with 8 lives - P1 + code:ee58/04/08 + cheat + description:Start with 8 lives - P2 + code:ee6d/04/08 + cheat + description:Start with 1 life - P1 + code:ee58/04/01 + cheat + description:Start with 1 life - P2 + code:ee6d/04/01 + cheat + description:Start on mission 2 + code:ee32/00/01 + cheat + description:Start on mission 3 + code:ee32/00/02 + cheat + description:Start on mission 4 + code:ee32/00/03 + cheat + description:Start on mission 5 + code:ee32/00/05 + cheat + description:Start on mission 6 + code:ee32/00/06 + cheat + description:Start on mission 7 + code:ee32/00/09 + cheat + description:Start on mission 8 + code:ee32/00/0c + cheat + description:Start at final boss + code:ee32/00/0e + cheat + description:Start at final boss (alt) + code:ee32/0e + cheat + description:Invincibility + code:03cc/f0 + cheat + description:Enemies die after one knockdown (disable at final boss) + code:0420/00+0421/00 + +cartridge sha256:9f5891d333ea410c9a20f952ed21ec8b35c1b4f2a6fc2408fb2510921b64660f + name:Double Dragon III - The Sacred Stones (USA) + cheat + description:Infinite health - Bill, Jimmy and Chin + code:b039/20/ad + cheat + description:Infinite special weapons - everyone + code:b405/01/00+b329/de/2c + cheat + description:More powerful punch, weapon and high kick + code:b064/a5/a9 + cheat + description:More health - Billy and Jimmy + code:9c82/54/64 + cheat + description:More health - Ranzou + code:9c8a/4a/64 + cheat + description:Less health - Billy and Jimmy + code:9c82/54/2a + cheat + description:Less health - Ranzou + code:9c8a/4a/25 + cheat + description:Less health - Chin + code:9c8f/64/32 + cheat + description:Start with Chin enabled + code:bcb3/0f/00 + cheat + description:Start with Ranzou enabled + code:bcc6/08/00 + cheat + description:Start with Jimmy enabled + code:f1c9/05/00 + cheat + description:Start with 255 health - Billy and Jimmy + code:9c82/54/ff + cheat + description:Start with 255 health - Chin + code:9c8f/64/ff + cheat + description:Start with 255 health - Ranzou + code:9c8a/4a/ff + cheat + description:Start with 99 weapon use - Billy, Jimmy and Chin + code:9c94/05/63 + cheat + description:Infinite health - P1 + code:045d/40 + cheat + description:Infinite health - P2 + code:045e/40 + +cartridge sha256:eb0e5f318e84e931a9bd663764c43fefa1a78565fa1328c1544b41bc8155ccb1 + name:Double Dribble (USA) (Rev A) + cheat + description:CPU scores add to your score + code:c489/f8/f4 + cheat + description:CPU never scores + code:c489/f8/fc + cheat + description:50 points - team 1 + code:07f4/50 + cheat + description:50 points - team 2 + code:07f8/50 + +cartridge sha256:f5517606d81d4e993d7fb86f11cae24c7b5029fd7184c7247771d6d7791e54ab + name:Double Dribble (USA) + cheat + description:CPU scores add to your score + code:c489/f8/f4 + cheat + description:CPU never scores + code:c489/f8/fc + cheat + description:50 points - team 1 + code:07f4/50 + cheat + description:50 points - team 2 + code:07f8/50 + +cartridge sha256:ddc08430b83061814fec929872aa6df3abc1a624888a8e3eb3fa96abb8d32e36 + name:Double Moon Densetsu (Japan) + cheat + description:Play as girl + code:b6dc/f0/d0 + +cartridge sha256:aa3b652591a7310e6e2cc025deabd9accf49506bd2313265fee67f2c5e83036a + name:Drac's Night Out (USA) (Proto) + cheat + description:Infinite Blood + code:c650/8d/ad + cheat + description:Infinite time + code:c5fe/ee/ed + +cartridge sha256:af505b8530b3303ebe0bf727730733cdbcd83ce1a19781d9487cd7cb202933c1 + name:Dragon Fighter (USA) + cheat + description:Invincibility + code:e508/d0/f0 + cheat + description:Invincibility (alt) + code:004d/4f + cheat + description:Invincible to spikes + code:d3dd/01/00 + cheat + description:Infinite health + code:e55c/85/a5 + cheat + description:Max Dragon energy + code:dc30/a5/84 + cheat + description:Always shoot special + code:d22f/00/7f + cheat + description:Infinite health (alt) + code:0050/08 + cheat + description:Max Dragon energy (alt) + code:0053/18 + cheat + description:Have green shots + code:004f/00 + cheat + description:Have red shots + code:004f/01 + cheat + description:Have blue shots + code:004f/02 + cheat + description:Hard mode + code:007b/01 + +cartridge sha256:038f2241fd6e58600ce234623be752cca47875ef7295fe92c30c328c81ffe7ec + name:Dragon Power (USA) + cheat + description:Infinite health (POW) + code:9a6d/c6/a5 + cheat + description:Start with 128 health (POW) + code:8325/64/80 + cheat + description:Start with 24 Wind Waves (turtle shells) (hold B then press A) + code:831e/85/84 + cheat + description:Infinite health (POW) (alt) + code:002e/63 + cheat + description:Infinite Wind Waves (turtle shells) (hold B then press A) + code:012f/09 + cheat + description:Infinite Red Power Pole time (spin attack) + code:0036/0f + +cartridge sha256:901b7a9b3e8c0256bd091f845f48b0e7bd903f7456ce3dcea386cc1871fe70c1 + name:Dragon Spirit - The New Legend (USA) + cheat + description:Invincibility and three heads after one hit (blinking) + code:ab88/a8 + cheat + description:Infinite health + code:aa61/c6/a1 + cheat + description:Hit anywhere + code:bdf0/d0/a9+bda1/d0/a9 + cheat + description:Always gold dragon + code:d894/84/86 + cheat + description:Always blue dragon + code:d894/84/a4 + cheat + description:Invincibility + code:0588/00 + +cartridge sha256:5564e54943deddc6d290b256638c774aa379a0d33dcea3b0a4f0c4b9fc2034e3 + name:Dragon's Lair (USA) + cheat + description:Infinite E (health) + code:d0ac/fc/00 + cheat + description:Infinite Candle energy + code:f9c3/ce/ad+f9e2/ce/ad + cheat + description:Infinite lives + code:d626/ff/00 + cheat + description:Less energy gained on pick-up + code:f769/10/05 + cheat + description:More energy gained on pick-up + code:f769/10/27 + cheat + description:Start with Axe + code:d5b4/00/01 + cheat + description:Start with Fireball + code:d5b4/00/02 + cheat + description:Start with 1 extra life + code:d5ac/fb/f7 + cheat + description:Start with 6 extra lives + code:d5ac/fb/fc + cheat + description:Start with 9 extra lives + code:d5ac/fb/ff + cheat + description:Start on level 2 + code:d57a/00/01 + cheat + description:Start on level 3 + code:d57a/00/02 + cheat + description:Start on level 4 + code:d57a/00/03 + cheat + description:Infinite E (health) (alt) + code:0330/1f + cheat + description:Infinite Gold (hundred's digit) + code:05ea/ff + cheat + description:Infinite Gold (ten's digit) + code:05eb/ff + cheat + description:Infinite Gold (one's digit) + code:05ec/ff + +cartridge sha256:abc5bcb459316a7d245065149ea72b5a8317f62fa6ed578569e15b670d3c0022 + name:Dragon Warrior (USA) + cheat + description:Infinite Magic Power + code:db96/85/a5 + cheat + description:Take no damage in swamp + code:cde3/02/00 + cheat + description:Start with 256 gold coins + code:f697/85/e6 + cheat + description:All spells use only one magic point + code:db96/85/c6 + cheat + description:Barriers cause half usual damage + code:ce48/0f/07 + +cartridge sha256:c15ab051ff066f018cf4b0159780c58026114bb47a6376ef81c1571a39a8fe9b + name:Dragon Warrior II (USA) + cheat + description:One hit kills + code:a6b7/90/50 + cheat + description:Prince of Midenhall starts with 50 HP + code:bdc3/1c/32 + cheat + description:Prince of Midenhall starts with 99 HP + code:bdc3/1c/63 + cheat + description:Prince of Midenhall starts with 40 strength points + code:bdc1/05/28 + cheat + description:Prince of Midenhall starts with 80 strength points + code:bdc1/05/50 + cheat + description:Prince of Midenhall starts with 40 agility points + code:bdc2/04/28 + cheat + description:Prince of Midenhall starts with 80 agility points + code:bdc2/04/50 + cheat + description:Prince of Cannock starts with 50 HP + code:bdc7/1f/32 + cheat + description:Prince of Cannock starts with 99 HP + code:bdc7/1f/63 + cheat + description:Prince of Cannock starts with 40 strength points + code:bdc5/04/28 + cheat + description:Prince of Cannock starts with 60 strength points + code:bdc5/04/3c + cheat + description:Prince of Cannock starts with 30 agility points + code:bdc6/04/1e + cheat + description:Prince of Cannock starts with 60 agility points + code:bdc6/04/3c + cheat + description:Prince of Cannock starts with 40 magic points + code:bdc8/06/28 + cheat + description:Prince of Cannock starts with 60 magic points + code:bdc8/06/3c + cheat + description:Princess of Moonbrooke starts with 50 HP + code:bdcb/20/32 + cheat + description:Princess of Moonbrooke starts with 99 HP + code:bdcb/20/63 + cheat + description:Princess of Moonbrooke starts with 25 strength points + code:bdc9/02/19 + cheat + description:Princess of Moonbrooke starts with 50 strength points + code:bdc9/02/32 + cheat + description:Princess of Moonbrooke starts with 40 agility points + code:bdca/16/28 + cheat + description:Princess of Moonbrooke starts with 40 magic points + code:bdcc/1c/28 + +cartridge sha256:f91a8bfc25bd267f5ae77bafa7fc650f77f8e50067869e99682b32d5b410644e + name:Dragon Warrior III (USA) + cheat + description:King gives 255 gold + code:913f/32/ff + cheat + description:King gives mega-gold + code:9152/00/01 + cheat + description:Player starts with increased strength and/or attack power + code:b26c/07/6f + cheat + description:Player starts with greatly increased strength and/or attack power + code:b26c/07/fe + cheat + description:Player starts with increased agility and/or defense + code:b271/05/63 + cheat + description:Player starts with greatly increased agility and/or defense + code:b271/05/ff + cheat + description:Player starts with increased vitality and/or HP + code:b276/07/63 + cheat + description:Player starts with greatly increased vitality and/or HP + code:b276/07/ff + cheat + description:Player starts with increased magic, maximum magic points and/or intelligence + code:b27b/06/63 + cheat + description:Player starts with greatly increased magic, maximum magic points and/or intelligence + code:b27b/06/ff + cheat + description:Player starts with increased luck + code:b280/04/62 + cheat + description:Player starts with greatly increased luck + code:b280/04/fe + cheat + description:Wizard starts with increased strength and/or attack power + code:b26d/01/63 + cheat + description:Wizard starts with greatly increased strength and/or attack power + code:b26d/01/fe + cheat + description:Wizard starts with increased agility and/or defense + code:b272/04/62 + cheat + description:Wizard starts with greatly increased agility and/or defense + code:b272/04/ff + cheat + description:Wizard starts with increased vitality and/or maximum HP + code:b277/02/62 + cheat + description:Wizard starts with greatly increased vitality and/or maximum HP + code:b277/02/99 + cheat + description:Wizard starts with increased magic, intelligence and/or maximum magic + code:b27c/09/63 + cheat + description:Wizard starts with increased luck + code:b281/02/63 + cheat + description:Wizard starts with greatly increased luck + code:b281/02/fe + cheat + description:Pilgrim starts with increased strength and/or attack power + code:b26e/03/62 + cheat + description:Pilgrim starts with greatly increased strength and/or attack power + code:b26e/03/fe + cheat + description:Pilgrim starts with increased agility and/or defense + code:b273/04/62 + cheat + description:Pilgrim starts with increased vitality and/or maximum HP + code:b278/03/63 + cheat + description:Pilgrim starts with greatly increased vitality and/or maximum HP + code:b278/03/fe + cheat + description:Pilgrim starts with increased magic and/or intelligence + code:b27d/08/63 + cheat + description:Pilgrim starts with greatly increased magic and/or intelligence + code:b27d/08/fe + cheat + description:Pilgrim starts with increased luck + code:b282/03/62 + cheat + description:Pilgrim starts with greatly increased luck + code:b282/03/fe + cheat + description:Soldier starts with increased strength and/or attack power + code:b270/09/63 + cheat + description:Soldier starts with greatly increased strength and/or attack power + code:b270/09/fe + cheat + description:Soldier starts with increased agility and/or defense + code:b275/02/62 + cheat + description:Soldier starts with increased vitality and/or maximum HP + code:b27a/07/63 + cheat + description:Start with 6 battle-axes + code:af10/ff/05 + cheat + description:Start with 6 broadswords + code:af10/ff/06 + cheat + description:Start with 6 wizard's wands + code:af10/ff/07 + cheat + description:Start with 6 demon's axes + code:af10/ff/0f + cheat + description:Start with 6 multi-edge swords + code:af10/ff/14 + cheat + description:Start with 6 staffs of force + code:af10/ff/15 + cheat + description:Start with 6 swords of illusion + code:af10/ff/16 + cheat + description:Start with 6 falcon swords + code:af10/ff/18 + cheat + description:Start with 6 armor of radiance + code:af10/ff/28 + +cartridge sha256:e49cb745370065a40aff078ae52b5de1c0db137fedcbe93b78ab18d76479deed + name:Dragon Warrior IV (USA) + cheat + description:No damage and lose no MP - all members (don't combine with the "start with items" codes) + code:8466/b5/60 + cheat + description:Start Chapter 1 with 25 gold + code:91d8/32/19 + cheat + description:Start Chapter 1 with 100 gold + code:91d8/32/64 + cheat + description:Start Chapter 1 with 255 gold + code:91d8/32/ff + cheat + description:Start Chapter 1 with lots 'o gold + code:902a/57/58 + cheat + description:Start Chapter 1 with 15 HP + code:a28f/1b/0f + cheat + description:Start Chapter 1 with 100 HP + code:a28f/1b/64 + cheat + description:Start Chapter 1 with 255 HP + code:a28f/1b/ff + cheat + description:Start Chapter 1 with final key + code:91c3/ff/73 + cheat + description:Start Chapter 1 with metal babble sword + code:91c3/ff/0e + cheat + description:Start Chapter 1 with multi-edge sword + code:91c3/ff/13 + cheat + description:Start Chapter 1 with thorn whip + code:91c3/ff/09 + cheat + description:Start Chapter 1 with shield of strength + code:91c3/ff/40 + cheat + description:Start Chapter 1 with dragon shield + code:91c3/ff/43 + cheat + description:Start Chapter 1 with final key and chain sickle + code:91c3/ff/73+91c4/ff/04 + cheat + description:Start Chapter 1 with metal babble sword and boomerang + code:91c3/ff/0e+91c4/ff/0b + cheat + description:Start Chapter 1 with multi-edge sword and wizard's ring + code:91c3/ff/13+91c4/ff/59 + cheat + description:Start Chapter 1 with thorn whip and demon hammer + code:91c3/ff/09+91c4/ff/12 + cheat + description:Start Chapter 1 with shield of strength and meteorite armband + code:91c3/ff/40+91c4/ff/50 + cheat + description:Start Chapter 1 with dragon shield and iron fan + code:91c3/ff/43+91c4/ff/0d + cheat + description:Start Chapter 2 with 50 gold + code:91d9/64/32 + cheat + description:Start Chapter 2 with 255 gold + code:91d9/64/ff + cheat + description:Start Chapter 2 with lots of gold + code:902a/57/58 + cheat + description:Start Alena with 100 HP + code:a290/10/64 + cheat + description:Start Alena with 255 HP + code:a290/10/ff + cheat + description:Start Alena with final key + code:91ca/ff/73 + cheat + description:Start Alena with fire claw + code:91ca/ff/1a + cheat + description:Start Alena with multi-edge sword + code:91ca/ff/13 + cheat + description:Start Alena with thorn whip + code:91ca/ff/09 + cheat + description:Start Alena with boomerang + code:91cb/ff/0b + cheat + description:Start Alena with final key and fire claw + code:91ca/ff/73+91cb/ff/1a + cheat + description:Start Alena with multi-edge sword and wizard's ring + code:91ca/ff/13+91cb/ff/59 + cheat + description:Start Alena with thorn whip and demon hammer + code:91ca/ff/09+91cb/ff/12 + cheat + description:Start Alena with shield of strength and meteorite arm band + code:91ca/ff/40+91cb/ff/50 + cheat + description:Start Alena with dragon shield and iron fan + code:91ca/ff/43+91cb/ff/0d + cheat + description:Start Brey with final key + code:91b3/ff/73 + cheat + description:Start Brey with magma staff + code:91b3/ff/1e + cheat + description:Start Brey with multi-edge sword + code:91b3/ff/13 + cheat + description:Start Brey with thorn whip + code:91b3/ff/09 + cheat + description:Start Brey with shield of strength + code:91b3/ff/40 + cheat + description:Start Brey with dragon shield + code:91b3/ff/43 + cheat + description:Start Brey with boomerang + code:91b4/ff/0b + cheat + description:Start Brey with final key and magma staff + code:91b3/ff/73+91b4/ff/1e + cheat + description:Start Brey with multi-edge sword and wizard's ring + code:91b3/ff/13+91b4/ff/59 + cheat + description:Start Brey with thorn whip and demon hammer + code:91b3/ff/09+91b4/ff/12 + cheat + description:Start Brey with shield of strength and meteorite arm band + code:91b3/ff/40+91b4/ff/50 + cheat + description:Start Brey with dragon shield and iron fan + code:91b3/ff/43+91b4/ff/0d + cheat + description:Start Cristo with final key + code:919b/ff/73 + cheat + description:Start Cristo with metal babble sword + code:919b/ff/0e + cheat + description:Start Cristo with multi-edge sword + code:919b/ff/13 + cheat + description:Start Cristo with thorn whip + code:919b/ff/09 + cheat + description:Start Cristo with shield of strength + code:919b/ff/40 + cheat + description:Start Cristo with dragon shield + code:919b/ff/43 + cheat + description:Start Cristo with final key and chain sickle + code:919b/ff/73+919c/ff/04 + cheat + description:Start Cristo with metal babble sword and boomerang + code:919b/ff/0e+919c/ff/0b + cheat + description:Start Cristo with multi-edge sword and wizard's ring + code:919b/ff/13+919c/ff/59 + cheat + description:Start Cristo with thorn whip and demon hammer + code:919b/ff/09+919c/ff/12 + cheat + description:Start Cristo with shield of strength and meteorite arm band + code:919b/ff/40+919c/ff/50 + cheat + description:Start Cristo with dragon shield and iron fan + code:919b/ff/43+919c/ff/0d + cheat + description:Start Chapter 3 with 16 HP + code:a28e/14/10 + cheat + description:Start Chapter 3 with 100 HP + code:a28e/14/64 + cheat + description:Start Chapter 3 with 255 HP + code:a28e/14/ff + cheat + description:Start Chapter 3 with 100 gold + code:91da/00/64 + cheat + description:Start Chapter 3 with 255 gold + code:91da/00/ff + cheat + description:Start Chapter 3 with final key + code:91bb/ff/f3 + cheat + description:Start Chapter 3 with metal babble sword + code:91bb/ff/0b + cheat + description:Start Chapter 3 with multi-edge sword + code:91bb/ff/16 + cheat + description:Start Chapter 3 with thorn whip + code:91bb/ff/0b + cheat + description:Start Chapter 3 with shield of strength + code:91bb/ff/41 + cheat + description:Start Chapter 3 with dragon shield + code:91bb/ff/40 + cheat + description:Start Chapter 3 with final key and chain sickle + code:91bb/ff/73+91bc/ff/04 + cheat + description:Start Chapter 3 with metal babble sword and boomerang + code:91bb/ff/0e+91bc/ff/0b + cheat + description:Start Chapter 3 with multi-edge sword and wizard's ring + code:91bb/ff/13+91bc/ff/59 + cheat + description:Start Chapter 3 with thorn whip and demon hammer + code:91bb/ff/09+91bc/ff/12 + cheat + description:Start Chapter 3 with shield of strength and meteorite arm band + code:91bb/ff/40+91bc/ff/50 + cheat + description:Start Chapter 3 with dragon shield and iron fan + code:91bb/ff/43+91bc/ff/0d + cheat + description:Start Nara with 100 HP + code:a28b/12/64 + cheat + description:Start Nara with 255 HP + code:a28b/12/ff + cheat + description:Start Nara with final key + code:91a3/ff/73 + cheat + description:Start Nara with metal babble sword + code:91a3/ff/0e + cheat + description:Start Nara with multi-edge sword + code:91a3/ff/13 + cheat + description:Start Nara with thorn whip + code:91a3/ff/09 + cheat + description:Start Nara with shield of strength + code:91a3/ff/40 + cheat + description:Start Nara with dragon shield + code:91a3/ff/43 + cheat + description:Start Nara with final key and chain sickle + code:91a3/ff/73+91a4/ff/04 + cheat + description:Start Nara with metal babble sword and boomerang + code:91a3/ff/0e+91a4/ff/0b + cheat + description:Start Nara with multi-edge sword and wizard's ring + code:91a3/ff/13+91a4/ff/59 + cheat + description:Start Nara with thorn whip and demon hammer + code:91a3/ff/09+91a4/ff/12 + cheat + description:Start Nara with shield of strength and meteorite arm band + code:91a3/ff/40+91a4/ff/50 + cheat + description:Start Nara with dragon shield and iron fan + code:91a3/ff/43+91a4/ff/0d + cheat + description:Start Mara with 100 HP + code:a28c/10/64 + cheat + description:Start Mara with 255 HP + code:a28c/10/ff + cheat + description:Start Mara with final key + code:91a9/ff/73 + cheat + description:Start Mara with magma staff + code:91a9/ff/1e + cheat + description:Start Mara with multi-edge sword + code:91a9/ff/13 + cheat + description:Start Mara with thorn whip + code:91a9/ff/09 + cheat + description:Start Mara with shield of strength + code:91a9/ff/40 + cheat + description:Start Mara with dragon shield + code:91a9/ff/43 + cheat + description:Start Mara with final key and chain sickle + code:91a9/ff/73+91aa/ff/04 + cheat + description:Start Mara with metal babble sword and boomerang + code:91a9/ff/0e+91aa/ff/0b + cheat + description:Start Mara with multi-edge sword and wizard's ring + code:91a9/ff/13+91aa/ff/59 + cheat + description:Start Mara with thorn whip and demon hammer + code:91a9/ff/09+91aa/ff/12 + cheat + description:Start Mara with shield of strength and meteorite arm band + code:91a9/ff/40+91aa/ff/50 + cheat + description:Start Mara with dragon shield and iron fan + code:91a9/ff/43+91aa/ff/0d + cheat + description:Start Chapter 5 with final key + code:9195/ff/73 + cheat + description:Start Chapter 5 with zenithian sword + code:9195/ff/21 + cheat + description:Start Chapter 5 with zenithian shield + code:9195/ff/44 + cheat + description:Start Chapter 5 with zenithian armor + code:9195/ff/37 + cheat + description:Start Chapter 5 with zenithian helmet + code:9195/ff/4b + +cartridge sha256:a0b2ec9b44033fc4d2356259ad99a4f2dcdf5396da53efdfcb17a54c0e7fcdbe + name:Dr. Chaos (USA) + cheat + description:Infinite life + code:ddc4/e5/24 + cheat + description:Take minimal damage + code:ddc4/e5/e9+ddc5/74/01 + cheat + description:Infinite Gun ammo on pick-up + code:f800/ce/2c + cheat + description:More invincibility time + code:dddc/14/40 + cheat + description:Less invincibility time + code:dddc/14/04 + cheat + description:Take more damage and Shield Suit has no effect + code:dd9d/46/66+dd9c/07/00 + cheat + description:Mega-jump + code:ca83/03/08 + cheat + description:Start with Shield Suit + code:c95d/00/01+c95f/43/52 + cheat + description:Start with 99 life + code:c94e/32/63 + cheat + description:Start with less health + code:c94e/32/19 + cheat + description:Invincibility (blinking) + code:0073/03 + cheat + description:Infinite life (alt) + code:0744/ff + cheat + description:Infinite Gun ammo + code:0746/63 + cheat + description:Infinite Machine Gun ammo + code:0747/63 + cheat + description:Infinite Grenades + code:0748/63 + +cartridge sha256:5860e217030f9da957d487b3ca59000d5f4d79bf23486bad08205c5aa4d992ea + name:Dr. Jekyll and Mr. Hyde (USA) + cheat + description:Infinite life + code:e42e/ce/2c+e526/ce/2c + cheat + description:Multi-jump + code:cff6/c3/cf+cff8/c9/29+cff9/04/01+cffa/d0/f0+cffd/00/01+cfff/c3/b9 + cheat + description:Keep coins from previous games + code:bef4/8d/2c + cheat + description:Instant game restart + code:d0fa/99/af + cheat + description:Start with 16 coins + code:bef4/8d/8c + +cartridge sha256:01d303a8c0ed6f374586d3a2562065b77f627e8dbf071bd919877e3b48dbdb57 + name:Dr. Mario (Japan, USA) + cheat + description:Vitamin capsules don't fall (press down) + code:8d7e/e6/24 + cheat + description:5 in a row needed to complete a vertical line instead of 4 + code:94a7/03/04 + cheat + description:6 in a row needed to complete a vertical line instead of 4 + code:94a7/03/05 + cheat + description:7 in a row needed to complete a vertical line instead of 4 + code:94a7/03/06 + cheat + description:5 in a row needed to complete a horizontal line instead of 4 + code:9241/03/04 + cheat + description:6 in a row needed to complete a horizontal line instead of 4 + code:9241/03/05 + cheat + description:7 in a row needed to complete a horizontal line instead of 4 + code:9241/03/06 + cheat + description:More pieces sent across to other player when two or more rows or columns are eliminated at once in a 2P game + code:9bef/18/38 + cheat + description:No pieces sent across to other player when two or more rows or columns are eliminated at once in a 2P game + code:94aa/e6/24+9244/e6/24 + +cartridge sha256:7026334a7e8742b61b450f4b3b182922c6a69fc723d7cd19c83db365f15e45ba + name:Duck Hunt (World) + cheat + description:Infinite ammo + code:d171/c6/a5 + cheat + description:Hit anywhere + code:d22c/f5/00 + cheat + description:Always get the perfect bonus + code:d350/0a/00+d351/d0/30 + cheat + description:Ducks never fly away - Game A + code:ca6c/c6/05 + cheat + description:Enable game "D" (hit select three times) + code:c19e/03/04 + cheat + description:Infinite ammo (alt) + code:00ba/03 + +cartridge sha256:262c1fcacd30a7f3018bd33ea6cf3fb86f8d9a77273d4f822268bff2c7deeb9a + name:Duck Maze (Australia) (Unl) + cheat + description:Invincibility + code:bbbe/20/ad + cheat + description:No breaking eggs from falling + code:bb88/2a/00 + +cartridge sha256:8ba8baed01a9fbaf1e9ff29e0c9825db1963ac2aff211d6f1f3bcfd3839e2013 + name:DuckTales (USA) + cheat + description:Invincibility + code:e35a/f0/d0+800c/f0/d0 + cheat + description:Infinite health + code:eb6a/a0/60 + cheat + description:Infinite health (alt) + code:eb7d/01/00 + cheat + description:Infinite lives + code:dcb0/ce/ad + cheat + description:Infinite time + code:e2b8/e5/e9 + cheat + description:Lose half normal health (in easy game) + code:eb67/01/03 + cheat + description:Double usual time + code:db2c/05/0a+dcf3/b9/ad+d875/bd/ad + cheat + description:Multi-jump + code:e397/3b/b8+e3a8/e6/e3+e3bd/f0/10+e403/3b/87+e691/f0/24 + cheat + description:Walk 2x faster + code:e49f/01/02 + cheat + description:Walk 4x faster + code:e49f/01/04 + cheat + description:Start with 1 life + code:db0b/02/00 + cheat + description:Start with 6 lives + code:db0b/02/05 + cheat + description:Start with 9 lives + code:db0b/02/08 + cheat + description:Invincibility (star effect) + code:0075/01 + cheat + description:Invincibility (blinking) + code:007d/fa + cheat + description:Infinite health (alt) + code:0342/00+0346/00+034a/00 + cheat + description:Infinite time (one's digit) + code:0159/09 + cheat + description:Infinite time (ten's digit) + code:0155/09 + cheat + description:Infinite time (hundred's digit) + code:0151/09 + cheat + description:All levels cleared except the Amazon + code:00a0/1e + cheat + description:Have the Skeleton Key, Mine Key and Remote Control + code:00a1/01+00a3/ff + cheat + description:Have $9,000,000 + code:0324/09 + +cartridge sha256:54c70628739c9cfab40b8d79555e9076adae34127ef369988ca91635b4a688bf + name:DuckTales 2 (USA) + cheat + description:Invincibility + code:e896/f0/d0 + cheat + description:Infinite health + code:f21e/85/a5 + cheat + description:Infinite lives + code:c422/c6/24 + cheat + description:Infinite lives (alt) + code:c422/c6/c5 + cheat + description:Multi-jump + code:e1ed/97/f0+e1e9/9e/21+e1ee/e2/92+e1ec/4c/4a + cheat + description:Take more damage + code:f219/08/10 + cheat + description:Take less damage + code:f219/08/04 + cheat + description:Take very little damage + code:f219/08/02 + cheat + description:Have lots of money + code:d229/00/01 + cheat + description:$5,000 cash from small diamonds + code:d3c9/01/05 + cheat + description:$9,000 cash from small diamonds + code:d3c9/01/09 + cheat + description:Start with full energy + code:c0f9/30/50 + cheat + description:Start with a lot less energy + code:c0f9/30/10 + cheat + description:Start with 1 life + code:c108/02/00 + cheat + description:Start with 6 lives + code:c108/02/05 + cheat + description:Start with 9 lives + code:c108/02/08 + +cartridge sha256:12c92261dfae9c01ce0172cd1e7d70192105ceb350b37c3f1cb2c72f9a10a6b9 + name:Dudes with Attitude (USA) (Rev 1) (Unl) + cheat + description:Infinite energy + code:dd3d/d6/b5 + cheat + description:Infinite time + code:d73d/c6/a5 + +cartridge sha256:99bba29bd92942f64d8a0beda7df3d8bff1ddcebcd3172eec16009fcb4a8bd3e + name:Dudes with Attitude (USA) (Unl) + cheat + description:Infinite energy + code:dd3d/d6/b5 + cheat + description:Infinite time + code:d73d/c6/a5 + +cartridge sha256:c613c10e32b93dbc402356273d698efa14814a51b0339d6d7aacdfb639a7acd7 + name:Dungeon Magic - Sword of the Elements (USA) + cheat + description:Take no damage except from scorpions + code:b3e6/85/a5 + cheat + description:Take less damage + code:b3e4/e5/e9+b3e5/3f/02 + cheat + description:Stay at the Inn for free + code:e2d3/41/21+e2d7/40/20 + cheat + description:Items at Grocer's shop are free + code:eeba/41/21+eebe/40/20 + cheat + description:Items at Armory are free + code:f389/41/21+f38d/40/20 + cheat + description:Start with 100 gold pieces + code:d645/00/64 + cheat + description:Start with 512 gold pieces + code:d645/00/02+d64c/40/41 + +cartridge sha256:690ec2de233486d9fdb1e096ca4aa07aa6e764b0d6d6417454d0a770c875078d + name:Dynowarz - Destruction of Spondylus (USA) + cheat + description:Mostly invincible + code:d078/29/09+d076/c6/24 + cheat + description:Infinite shield + code:ecf7/8a/60 + cheat + description:No harm from spikes + code:dc51/a5/60 + cheat + description:No harm from any dinosaur + code:f96e/03/00 + cheat + description:Mega-jump power + code:d3a7/03/07 + cheat + description:Speed up left and right + code:d27d/01/03 + cheat + description:Start on level 2 + code:c123/01/06 + cheat + description:Start on level 3 + code:c123/01/0a + cheat + description:Start on level 4 + code:c123/01/0e + cheat + description:Start on level 5 + code:c123/01/12 + +cartridge sha256:7951287af48ef9f2e2b375934acff99fe1543aea39d2729d2863b38ab498e231 + name:Egypt (Japan) + cheat + description:Infinite power-ups + code:9f82/99/b9 + cheat + description:No steps + code:8be3/e6/a5+8be7/e6/a5 + cheat + description:No rotates + code:8c07/e6/a5+8c03/e6/a5 + +cartridge sha256:e2824a71c74106326013915d9f8a67be22c367599feefd8da6538f62d5e6f5b0 + name:Elevator Action (USA) + cheat + description:Infinite lives - P1 + code:bb89/ce/2c + cheat + description:Can only shoot one bullet + code:e153/06/04 + cheat + description:Slower man + code:d7d0/03/01+d7ba/fd/ff + cheat + description:Faster man + code:d7d0/03/05+d7ba/fd/fa + cheat + description:Faster bullets + code:e163/08/0a+e167/f8/f6 + cheat + description:Slower bullets + code:e163/08/04+e167/f8/fc + cheat + description:Faster enemy + code:f19c/02/04+f1ac/fe/fa + cheat + description:Slower enemy + code:f19c/02/01+f1ac/fe/ff + cheat + description:Start with 1 life - P1 + code:bb37/02/00 + cheat + description:Start with 6 lives - P1 + code:bb37/02/05 + cheat + description:Start with 9 lives - P1 + code:bb37/02/08 + cheat + description:Start with 6 lives - P2 + code:bbeb/02/05 + cheat + description:Start with 9 lives - P2 + code:bbeb/02/08 + +cartridge sha256:9d0396286f2c027367422b8347216a309200a21b019939f08a7c457c7c4c918d + name:Eliminator Boat Duel (USA) + cheat + description:Almost infinite nitros - no on buoy stage + code:df6e/de/ad + cheat + description:Boat starts with full turbo, steering, hull, max engine power + code:81ff/01/05 + cheat + description:Have full hull strength + code:c8b1/de/ad + cheat + description:Computer boat goes crazy + code:da05/84 + cheat + description:Start with 0 nitros + code:820a/04/00 + cheat + description:Start with 36 nitros + code:820a/04/25 + +cartridge sha256:d1b51f04a6112d8f75d1bf29a9db5a06cfba308be824dcc9db15b228f8e85bd5 + name:Esper Dream (Japan) (v1.0) [b] + cheat + description:Walk anywhere + code:b9c9/ff/00 + +cartridge sha256:761df2c2e04f9ffec5eec59afd821bd74af3b155546519d649876aad37160c06 + name:Esper Dream 2 - Aratanaru Tatakai (Japan) + cheat + description:Infinite HP + code:d475/85/a5 + cheat + description:Infinite ESP + code:e930/85/a5 + cheat + description:Quick level up + code:d6a7/09/08 + cheat + description:Chests worth lots of gold + code:9ead/01/00 + +cartridge sha256:e9f4c9d1b7c66c6af83f2db5d4f704cf5f4b3c86e26a49c05539237807d8875e + name:Excitebike (Japan, USA) + cheat + description:Never crash + code:de1c/95/a5 + cheat + description:Never crash when holding forward + code:e05d/95/60+e063/95/60+dc6b/95/60 + cheat + description:Never lose speed (even if you crash) + code:ce7d/d6/b5 + cheat + description:Never overheat + code:e3a7/ee/ad + cheat + description:Recover fast after crashes + code:d9a4/0f/07 + cheat + description:Reduced enemy bikes in game B + code:daa0/03/01 + cheat + description:Timer runs at half speed + code:df38/10/08 + cheat + description:Timer runs at quarter speed + code:df38/10/04 + cheat + description:Turbo speed on button A + code:c0bc/18/f0+c0d1/03/04 + cheat + description:Mega turbo speed on button A + code:c0bc/18/e0+c0d1/03/06 + cheat + description:Infinite obstacles in design mode + code:f805/01/00 + cheat + description:Start racing before gate opens + code:ea0a/38/00+cd22/1d/00+da29/3f/00+de39/d0/10 + cheat + description:Press Start to complete current race (uses your race position for the verdict) + code:ca59/03/00+ca58/b1/52 + +cartridge sha256:9e3c5574e31cbf74146808df930a70856d7196ec581e40cae3061743504bfba2 + name:Exodus - Journey to the Promised Land (USA) (v4.0) (Unl) + cheat + description:Infinite lives + code:a834/d6/a5 + cheat + description:Infinite time + code:ddfc/c6/a5 + +cartridge sha256:e9aab85fd91822b9dc7a89997eda3415e45a07fe21580c0df4765ce392e63824 + name:F-1 Race (Japan) + cheat + description:Invincibility + code:e411/e6/60 + cheat + description:Infinite time + code:d13e/c6/85 + cheat + description:Don't lose speed when driving over grass/dirt + code:d2a5/85/a5+d2ab/85/a5 + cheat + description:Don't lose speed when skidding in the road + code:c38f/85/a5 + +cartridge sha256:3fd39ba2cdd6e220b07050d752a2c67d4a0f16a72ea9e519adf7390721cd9bdd + name:F15 City War (USA) (v1.1) (Unl) + cheat + description:Infinite lives + code:00e4/09 + +cartridge sha256:0e3db714b82795111afa386f32534ece968d0f8ccb63dc70189d2010dc77a2a7 + name:F15 City War (USA) (v1.0) (Unl) + cheat + description:Infinite lives + code:00e4/09 + +cartridge sha256:bf4b9f8706814e9164971a3c32535bb2ec718232cf05decda785770fa949d396 + name:F-15 Strike Eagle (USA) + cheat + description:Infinite type 1 missiles + code:004a/09 + cheat + description:Infinite type 2 missiles + code:004b/09 + cheat + description:Infinite type 3 missiles + code:004c/09 + cheat + description:Billions of points + code:0171/09 + +cartridge sha256:69bc9f0a2f0cd50d624fafced0051056fd91816f0593719678a42c8637622426 + name:F-117A - Stealth Fighter (USA) + cheat + description:Invincibility + code:96a8/85/a5 + cheat + description:Invincibility (alt) + code:0026/00 + cheat + description:Infinite AAM Missiles + code:001f/63 + cheat + description:Infinite AGM Missiles + code:0020/63 + cheat + description:Infinite Flares + code:0021/63 + cheat + description:Infinite Chaff + code:0022/63 + cheat + description:Have 5 million+ points + code:0175/ff + +cartridge sha256:0de5af54fd433bc6678cd8c62b5e6f0a0987c26d64b2081764e66263cf0c658c + name:Family Feud (USA) + cheat + description:Infinite time to answer a question + code:cdc8/ce/ad + cheat + description:10 strikes allowed + code:90dc/03/0a + +cartridge sha256:e0b124ddd8ac7be9e0f0b14679a089c475646fe97425fea36674d75a0f481461 + name:Fantastic Adventures of Dizzy, The (USA) (Unl) + cheat + description:Infinite lives + code:d0e0/c6/a5 + cheat + description:Spiders, bats, ants and rats do no damage + code:f261/08/00 + cheat + description:Play bubble sub-game only + code:a531/0e/7f + cheat + description:Play river sub-game only + code:a531/0e/7e + cheat + description:Play mine sub-game only + code:a531/0e/7d + cheat + description:Play puzzle sub-game ony + code:a531/0e/7a + cheat + description:Start with 10 stars instead of 100 + code:fac6/64/0a + cheat + description:Start with 10 lives + code:8012/02/09 + +cartridge sha256:ad14301747e0ae0f9b941c6002102d69916ca5e87b355156ab79311ce8dd7236 + name:Fantasy Zone (USA) (Unl) + cheat + description:Infinite lives + code:e60f/c6/a9 + cheat + description:Keep bought weapon for a life + code:e881/c6/a9 + cheat + description:Keep bought weapon until next shop visit + code:e881/c6/a9+e618/85/c9 + cheat + description:Autofire on all weapons + code:ee1c/01/00 + cheat + description:Start with 1 life + code:e929/03/01 + cheat + description:Start with 6 lives + code:e929/03/06 + cheat + description:Start with 9 lives + code:e929/03/09 + cheat + description:Start on level 2 + code:e75f/00/01 + cheat + description:Start on level 3 + code:e75f/00/02 + cheat + description:Start on level 4 + code:e75f/00/03 + cheat + description:Start on level 5 + code:e75f/00/04 + cheat + description:Start on level 6 + code:e75f/00/05 + cheat + description:Start on level 7 + code:e75f/00/06 + +cartridge sha256:6f23f245b9edc5af0c07fab9e12f5c0571ea0f52413e4ce6ad36e2f57ddf4097 + name:Faria - A World of Mystery & Danger! (USA) + cheat + description:Infinite HP + code:811c/e5/85+b8b8/e5/85 + cheat + description:Infinite batteries + code:c725/ce/ad + cheat + description:Infinite Bombs + code:b197/ce/ad + cheat + description:Infinite Sede magic + code:85d0/ce/2c + cheat + description:Infinite Saba magic + code:85fa/ce/2c + cheat + description:Get 250 arrows when buying any amount of arrows + code:a965/02/00 + cheat + description:Don't get charged in shops for items you can afford + code:a32a/8d/2c+a32f/8d/2c+a334/8d/2c + +cartridge sha256:58f2ba801354a8e5b32e7d1cbcc740b8dc838e7d48c3d2f3eedea36b49b1a518 + name:Faxanadu (USA) (Rev A) + cheat + description:Infinite P (health) + code:c092/ed/2c+c09b/ed/2c + cheat + description:Infinite M (magic) + code:fa88/02/00 + cheat + description:Infinite Gold + code:f9ab/8d/ad+f9b3/8d/ad+f9bb/8d/ad + cheat + description:Jump in direction you are facing + code:e1ac/a5/60 + cheat + description:Slow mode + code:e030/f9/00+e041/f4/00+e032/01/00 + cheat + description:Start with double P (health) + code:deaf/10/20 + cheat + description:Start with triple P (health) + code:deaf/10/30 + cheat + description:Start with half normal amount of Gold + code:8559/0a/05 + cheat + description:Start with double normal amount of Gold + code:8559/0a/14 + cheat + description:Invincibility + code:00ad/48 + cheat + description:Infinite P (health) (alt) + code:0431/55 + cheat + description:Infinite M (magic) (alt) + code:039a/50 + cheat + description:Infinite Gold (alt) + code:0394/ff + cheat + description:Have Wing Boots ability (hold up and A) + code:0429/0a + cheat + description:Walk faster + code:00aa/02 + +cartridge sha256:52f7e7309f1f53f632912182f3a65f574c949392ab92f55c2494a7e648ef5ccb + name:Faxanadu (USA) + cheat + description:Infinite P (health) + code:c092/ed/2c+c09b/ed/2c + cheat + description:Infinite M (magic) + code:fa88/02/00 + cheat + description:Infinite Gold + code:f9ab/8d/ad+f9b3/8d/ad+f9bb/8d/ad + cheat + description:Jump in direction you are facing + code:e1ac/a5/60 + cheat + description:Slow mode + code:e030/f9/00+e041/f4/00+e032/01/00 + cheat + description:Start with double P (health) + code:deaf/10/20 + cheat + description:Start with triple P (health) + code:deaf/10/30 + cheat + description:Start with half normal amount of Gold + code:8559/0a/05 + cheat + description:Start with double normal amount of Gold + code:8559/0a/14 + cheat + description:Invincibility + code:00ad/48 + cheat + description:Infinite P (health) (alt) + code:0431/55 + cheat + description:Infinite M (magic) (alt) + code:039a/50 + cheat + description:Infinite Gold (alt) + code:0394/ff + cheat + description:Have Wing Boots ability (hold up and A) + code:0429/0a + cheat + description:Walk faster + code:00aa/02 + +cartridge sha256:884b46ad4eb5160a94c19e8954846d644be36803efc53c977e99b1342886cc6b + name:Felix the Cat (USA) + cheat + description:Infinite time + code:f7fc/9d/bd + cheat + description:Infinite lives + code:f9b4/01/00 + cheat + description:Weapon has longer reach + code:8efa/30/10 + cheat + description:Hearts can't be replenished from bottles + code:880f/02/00 + cheat + description:Bottles replenish more hearts + code:880f/02/04 + cheat + description:Bottles replenish even more hearts + code:880f/02/08 + cheat + description:1 Felix icon gives 2 + code:da19/01/02+da79/19/18 + cheat + description:No sound effects + code:8608/90/b0 + cheat + description:Walk through walls + code:d111/d0/70+d12a/d0/70 + cheat + description:Start with 9 lives + code:c430/12/18 + cheat + description:Start with 6 lives + code:c430/12/15 + cheat + description:Start with 1 life + code:c430/12/10 + cheat + description:Invincibility (blinking) + code:03cd/03 + cheat + description:Infinite lives (alt) + code:03a6/19 + cheat + description:Infinite special + code:03c0/0a + cheat + description:Have 99 Felix icons + code:03a7/19+03a8/19 + cheat + description:Play as Magic/Balloon Felix + code:03c6/01 + cheat + description:Play as Buggy/Plane Felix + code:03c6/02 + cheat + description:Play as Tank Felix + code:03c6/03 + +cartridge sha256:c0c98471130cd09c82af6ead5e706c9299cc2cb4584016a5e5eb0c8897380172 + name:Fester's Quest (USA) + cheat + description:Invincibility + code:9c51/70 + cheat + description:Infinite health + code:9c83/ce/ea + cheat + description:Infinite Invisible Potions on pick-up + code:d107/ce/ad + cheat + description:Infinite Missiles on pick-up + code:eb6a/ce/ad + cheat + description:Infinite Money + code:d13f/8d/ad + cheat + description:Infinite Nooses on pick-up + code:d0b6/ce/ad + cheat + description:Infinite Potions on pick-up + code:d0eb/ce/ad + cheat + description:Infinite T.N.T on pick-up + code:d177/ce/ad + cheat + description:Infinite Vice Grips on pick-up + code:d0d6/ce/ad + cheat + description:Invincibility (alt) + code:04f8/c0 + cheat + description:Infinite health (alt) + code:04e5/03+04e9/03 + cheat + description:Max health + code:04ea/04 + cheat + description:Have level 8 Gun + code:04e7/08 + cheat + description:Have level 4 Whip + code:04e8/04 + cheat + description:Infinite Bulbs + code:015c/64 + cheat + description:Infinite Invisible Potions + code:0161/64 + cheat + description:Infinite Keys + code:015d/64 + cheat + description:Infinite Money (alt) + code:0162/64 + cheat + description:Infinite Missiles + code:0163/64 + cheat + description:Infinite Nooses + code:015e/64 + cheat + description:Infinite Potions + code:0160/64 + cheat + description:Infinite T.N.T + code:0164/64 + cheat + description:Infinite Vice Grips + code:015f/64 + +cartridge sha256:179bd9c16fc5b85168fecac685045ed58f6bec5a51363babb7aaaaceb6fa0932 + name:Fighting Road (Japan) + cheat + description:Infinite health + code:d68b/85/a5 + +cartridge sha256:2ae778c5a59fac650fa97e93d883381dbf96c5a0ad2c1db94fd822663904f7e5 + name:Final Combat (Asia) (PAL) (Unl) + cheat + description:Infinite health + code:a6d0/8d/ad+c794/8d/ad + cheat + description:Infinite lives + code:bb61/d6/a5 + cheat + description:Infinite time + code:9d79/ce/ad + +cartridge sha256:fa456d852372173ea31b192459ba1a2026f779df67793327ba6e132476c1d034 + name:Final Fantasy (USA) + cheat + description:Skip intro screen + code:84d4/29/a9 + cheat + description:Faster dialogue + code:d61c/a5/a9+d61d/1b/5e+d69f/f2/00 + cheat + description:Almost infinite Gold + code:a4d1/ed/2c+a4da/ed/2c + cheat + description:999999+ Gold + code:b01e/00/ff + cheat + description:Gain 65535 EXP from every battle + code:9ed9/01 + cheat + description:Enemies don't attack + code:b323/80 + cheat + description:Non-magic users can use level 1 magic + code:ab0e/f0/b0+c7d0/0c/00+c7d4/08/00 + cheat + description:LIFE spell never uses up Magic Points + code:b035/de/ad + cheat + description:LIF2 spell never uses up Magic Points + code:b06b/de/ad + cheat + description:Magic users start with 6 Magic Points + code:c7d6/02/06 + cheat + description:Magic users start with 9 Magic Points + code:c7d6/02/09 + cheat + description:No random battles (enable at start of game) + code:99e6/91 + cheat + description:Double Fighter's Hit Points (enable at start of game) + code:b041/23/46 + cheat + description:Double Fighter's Hit (enable at start of game) + code:b048/0a/14 + cheat + description:Double Fighter's Evade (enable at start of game) + code:b049/35/6a + cheat + description:Double Fighter's Luck (enable at start of game) + code:b046/05/0a + cheat + description:Double Thief's Hit Points (enable at start of game) + code:b051/1e/3c + cheat + description:Triple Thief's Damage (enable at start of game) + code:b057/02/06 + cheat + description:Double Thief's Hit (enable at start of game) + code:b058/05/0a + cheat + description:Double Thief's Evade (enable at start of game) + code:b059/3a/74 + cheat + description:Double Thief's Luck (enable at start of game) + code:b056/0f/1e + cheat + description:Double Black Belt's Hit Points (enable at start of game) + code:b061/21/42 + cheat + description:Triple Black Belt's Damage (enable at start of game) + code:b067/02/06 + cheat + description:Double Black Belt's Hit (enable at start of game) + code:b068/05/0a + cheat + description:Double Black Belt's Evade (enable at start of game) + code:b069/35/6a + cheat + description:Double Black Belt's Luck (enable at start of game) + code:b066/05/0a + cheat + description:Double Red Mage's Hit Points (enable at start of game) + code:b071/1e/3c + cheat + description:Double Red Mage's Damage (enable at start of game) + code:b077/05/0a + cheat + description:Double Red Mage's Hit (enable at start of game) + code:b078/07/0e + cheat + description:Double Red Mage's Evade (enable at start of game) + code:b079/3a/74 + cheat + description:Double Red Mage's Luck (enable at start of game) + code:b076/05/0a + cheat + description:Double White Mage's Hit Points (enable at start of game) + code:b081/1c/38 + cheat + description:Triple White Mage's Damage (enable at start of game) + code:b087/02/06 + cheat + description:Double White Mage's Hit (enable at start of game) + code:b088/05/0a + cheat + description:Double White Mage's Evade (enable at start of game) + code:b089/35/6a + cheat + description:Double White Mage's Luck (enable at start of game) + code:b086/05/0a + cheat + description:Double Black Mage's Hit Points (enable at start of game) + code:b091/19/32 + cheat + description:Triple Black Mage's Damage (enable at start of game) + code:b097/01/03 + cheat + description:Double Black Mage's Hit (enable at start of game) + code:b098/05/0a + cheat + description:Double Black Mage's Evade (enable at start of game) + code:b099/3a/74 + cheat + description:Double Black Mage's Luck (enable at start of game) + code:b096/0a/14 + cheat + description:Start with 800 Gold + code:b01c/90/20+b01d/01/03 + cheat + description:More enemies, more difficult + code:6d8d/99 + cheat + description:No random battles (alt) + code:00f5/ff + cheat + description:Have Adamant + code:6027/01 + cheat + description:Have Bottle + code:602f/01 + cheat + description:Have Canoe + code:6031/01 + cheat + description:Have Chime + code:602c/01 + cheat + description:Have Crown + code:6022/01 + cheat + description:Have Crystal + code:6023/01 + cheat + description:Have Cube + code:602e/01 + cheat + description:Have Floater + code:602b/01 + cheat + description:Have Herb + code:6024/01 + cheat + description:Have Key + code:6025/01 + cheat + description:Have Lute + code:6021/01 + cheat + description:Have Oxyale + code:6030/01 + cheat + description:Have Rod + code:602a/01 + cheat + description:Have Ruby + code:6029/01 + cheat + description:Have Slab + code:6028/01 + cheat + description:Have Tail + code:602d/01 + cheat + description:Have TNT + code:6026/01 + cheat + description:Have first Crystal lit + code:6032/01 + cheat + description:Have second Crystal lit + code:6033/01 + cheat + description:Have third Crystal lit + code:6034/01 + cheat + description:Have last Crystal lit + code:6035/01 + cheat + description:Character 1 - 255 HP + code:610a/ff + cheat + description:Character 1 - 99 STR + code:6110/63 + cheat + description:Character 1 - 99 AGL + code:6111/63 + cheat + description:Character 1 - 99 INT + code:6112/63 + cheat + description:Character 1 - 99 VIT + code:6113/63 + cheat + description:Character 1 - 99 Luck + code:6114/63 + cheat + description:Character 1 - 255 Damage + code:6120/ff + cheat + description:Character 1 - 255 Hit % + code:6121/ff + cheat + description:Character 1 - 255 Absorb + code:6122/ff + cheat + description:Character 1 - 255 Evade % + code:6123/ff + cheat + description:Character 1 - Infinite level 1 magic use + code:6320/08+6328/08 + cheat + description:Character 1 - Infinite level 2 magic use + code:6321/08+6329/08 + cheat + description:Character 1 - Infinite level 3 magic use + code:6322/08+632a/08 + cheat + description:Character 1 - Infinite level 4 magic use + code:6323/08+632b/08 + cheat + description:Character 1 - Infinite level 5 magic use + code:6324/08+632c/08 + cheat + description:Character 1 - Infinite level 6 magic use + code:6325/08+632d/08 + cheat + description:Character 1 - Infinite level 7 magic use + code:6326/08+632e/08 + cheat + description:Character 1 - Infinite level 8 magic use + code:6327/08+632f/08 + cheat + description:Character 2 - 255 HP + code:614a/ff + cheat + description:Character 2 - 99 STR + code:6150/63 + cheat + description:Character 2 - 99 AGL + code:6151/63 + cheat + description:Character 2 - 99 INT + code:6152/63 + cheat + description:Character 2 - 99 VIT + code:6153/63 + cheat + description:Character 2 - 99 Luck + code:6154/63 + cheat + description:Character 2 - 255 Damage + code:6160/ff + cheat + description:Character 2 - 255 Hit % + code:6161/ff + cheat + description:Character 2 - 255 Absorb + code:6162/ff + cheat + description:Character 2 - 255 Evade % + code:6163/ff + cheat + description:Character 3 - 255 HP + code:618a/ff + cheat + description:Character 3 - 99 STR + code:6190/63 + cheat + description:Character 3 - 99 AGL + code:6191/63 + cheat + description:Character 3 - 99 INT + code:6192/63 + cheat + description:Character 3 - 99 VIT + code:6193/63 + cheat + description:Character 3 - 99 Luck + code:6194/63 + cheat + description:Character 3 - 255 Damage + code:61a0/ff + cheat + description:Character 3 - 255 Hit % + code:61a1/ff + cheat + description:Character 3 - 255 Absorb + code:61a2/ff + cheat + description:Character 3 - 255 Evade % + code:61a3/ff + cheat + description:Character 4 - 255 HP + code:61ca/ff + cheat + description:Character 4 - 99 STR + code:61d0/63 + cheat + description:Character 4 - 99 AGL + code:61d1/63 + cheat + description:Character 4 - 99 INT + code:61d2/63 + cheat + description:Character 4 - 99 VIT + code:61d3/63 + cheat + description:Character 4 - 99 Luck + code:61d4/63 + cheat + description:Character 4 - 255 Damage + code:61e0/ff + cheat + description:Character 4 - 255 Hit % + code:61e1/ff + cheat + description:Character 4 - 255 Absorb + code:61e2/ff + cheat + description:Character 4 - 255 Evade % + code:61e3/ff + +cartridge sha256:7ff89b50156b6f5b3d78d3d2eeec8a9221d9f7b18f8350abf89b7867a205f710 + name:Final Fantasy III (Japan) + cheat + description:Infinite capacity points. You still have to have enough points to make the job change, but no points will be subtracted from your total + code:ab9b/8d/ad + cheat + description:All items in shops are free. You must have enough to cover the item, but will not be charged + code:b0b0/e5/ea + cheat + description:Knife casts a FIRE spell when used as a item in battle + code:94f4/7f/31 + cheat + description:Knife casts a FIRE3 spell when used as a item in battle + code:94f4/7f/0e + cheat + description:Knife casts a BOLT3 spell when used as a item in battle + code:94f4/7f/15 + cheat + description:Knife casts a ICE3 spell when used as a item in battle + code:94f4/7f/1d + cheat + description:Knife casts a DEATH spell when used as a item in battle + code:94f4/7f/01 + cheat + description:Knife casts a METEO spell when used as a item in battle + code:94f4/7f/02 + cheat + description:Knife casts a HEAL spell when used as a item in battle + code:94f4/7f/0b + cheat + description:Knife casts a CURE4 spell when used as a item in battle + code:94f4/7f/0a + cheat + description:Dagger casts a FIRE3 spell when used as a item in battle + code:94fc/7f/0e + cheat + description:Dagger casts a BOLT3 spell when used as a item in battle + code:94fc/7f/15 + cheat + description:Dagger casts a ICE3 spell when used as a item in battle + code:94fc/7f/1d + cheat + description:Dagger casts a DEATH spell when used as a item in battle + code:94fc/7f/01 + cheat + description:Dagger casts a METEO spell when used as a item in battle + code:94fc/7f/02 + cheat + description:Dagger casts a HEAL spell when used as a item in battle + code:94fc/7f/0b + cheat + description:Dagger casts a CURE4 spell when used as a item in battle + code:94fc/7f/0a + cheat + description:Long Sword casts a FIRE3 spell when used as a item in battle + code:9524/7f/0e + cheat + description:Long Sword casts a BOLT3 spell when used as a item in battle + code:9524/7f/15 + cheat + description:Long Sword casts a ICE3 spell when used as a item in battle + code:9524/7f/1d + cheat + description:Long Sword casts a DEATH spell when used as a item in battle + code:9524/7f/01 + cheat + description:Long Sword casts a METEO spell when used as a item in battle + code:9524/7f/02 + cheat + description:Long Sword casts a HEAL spell when used as a item in battle + code:9524/7f/0b + cheat + description:Long Sword casts a CURE4 spell when used as a item in battle + code:9524/7f/0a + +cartridge sha256:5f21fadd084947d11224d1f37218a504bd75f7c6f17212f638a6917ba8a96f99 + name:Fire Bam (FDS) + cheat + description:All fire items worth 65,535 + code:9a02/00/ff + cheat + description:Start with 65,534 Fire + code:dfc4/81/fe+dfc5/09/ff + +cartridge sha256:9a0cc935c7d8452eff5b90f591bb6390d04362545ecd66b4be67a875ad63dc73 + name:Fire Dragon (Asia) (Unl) + cheat + description:One fireball needed to finish the level + code:034f/04 + cheat + description:Start on stage 50 + code:034d/32 + +cartridge sha256:3f5ed8b5207ff10ef490e7533bdd8419e5266101d4049d7689c01b5b352a4547 + name:Fire Hawk (USA) (Unl) + cheat + description:Invincibility + code:ae19/d0/a9 + cheat + description:Start with 1 life + code:8019/03/01 + cheat + description:Start with 6 lives + code:8019/03/06 + cheat + description:Start with 9 lives + code:8019/03/09 + cheat + description:Infinite Missiles + code:04da/1f + cheat + description:Infinite ammo + code:04dc/1f + cheat + description:Infinite fuel + code:04f4/26 + +cartridge sha256:db16f0a5cb05dfa9344e0ae459f6c44fac7c28d4a8ecd47d3418053ab16c8a62 + name:Fire 'n Ice (USA) + cheat + description:Automatically finish levels + code:f48f/08/00 + +cartridge sha256:04264565cf33f4bd1b23a3f7a1be1487a548c7f6b85323c68af754b0927b0a56 + name:Fist of the North Star (USA) + cheat + description:Invincibility + code:c5a0/20/ad + cheat + description:Infinite health + code:cc53/85/a5 + cheat + description:Infinite time + code:e65c/c6/a5 + cheat + description:Infinite lives + code:c1cf/c6/a5 + cheat + description:One hit kills you + code:cc51/e5/e9 + cheat + description:Sweep kick damages enemies more + code:b186/01/06 + cheat + description:Straight kick damages enemies more + code:b194/03/08 + cheat + description:Can't be knocked back by big thugs + code:cc3e/04/00 + cheat + description:Pogo stick + code:c953/f0/d0 + cheat + description:Take minimum damage from all enemies + code:cc51/e5/e9+cc52/d9/01 + cheat + description:Any attack mega-damages enemies + code:b19a/e5/e9+b19b/d9/0a + cheat + description:Start with 1 life + code:c0cc/03/01 + cheat + description:Start with 6 lives + code:c0cc/03/06 + cheat + description:Start with 9 lives + code:c0cc/03/09 + cheat + description:Invincibility (blinking) + code:0066/01 + cheat + description:Infinite health (alt) + code:0073/38 + cheat + description:Infinite time (alt) + code:0065/09 + cheat + description:Infinite power + code:006c/07 + cheat + description:Infinite Bomb + code:0063/07 + +cartridge sha256:6e5bdfe7ee4cc4d949ea80016dbfb2b4322bbe193b5f28483ce7009e506efe40 + name:Flight of the Intruder (USA) + cheat + description:Infinite radar-guided missiles - bombing/strafing screen + code:973a/c6/24 + cheat + description:Start with 9 radar-guided missiles - bombing/strafing screen + code:8213/06/09 + cheat + description:Infinite missiles - cockpit screen + code:943b/ce/2c + cheat + description:Start each mission with 6 missiles + code:a246/c9/a9+a24c/01/00 + cheat + description:Start on mission 3 + code:cc44/00/04 + cheat + description:Start on mission 6 + code:cc44/00/0a + cheat + description:Start on mission 9 + code:cc44/00/10 + cheat + description:Start on mission 12 + code:cc44/00/16 + +cartridge sha256:3036a59bb7bf16a3b80c94750bccaa35be9ab5cd94f99d68d3979ec53cd42c03 + name:Flintstones, The - The Rescue of Dino & Hoppy (USA) + cheat + description:Invincibility + code:9192/ce/60 + cheat + description:Infinite lives + code:8090/ce/ad + cheat + description:Infinite energy (hearts) + code:e472/ce/ad+9192/ce/ad + cheat + description:15 coins on pick-up + code:e2d2/05/0f + cheat + description:2 coins on pick-up + code:e2d2/05/02 + cheat + description:Slingshot doesn't use up coins + code:8e32/03/00 + cheat + description:Axe doesn't use up coins + code:8e33/03/00 + cheat + description:Bomb doesn't use up coins + code:8e34/0a/00 + cheat + description:Infinite Firepower + code:8dec/00 + cheat + description:Max power charge + code:99c8/01/13+a103/01/13+9183/01/13+923b/01/13 + cheat + description:Start with Slingshot + code:8180/00/01 + cheat + description:Start with Axe + code:8180/00/02 + cheat + description:Start with Bomb + code:8180/00/04 + cheat + description:Start with 1 life + code:8167/02/00 + cheat + description:Start with 6 lives + code:8167/02/05 + cheat + description:Start with 9 lives + code:8167/02/08 + cheat + description:Start with 99 coins + code:817b/0a/63 + cheat + description:Infinite energy (hearts) (alt) + code:0308/03 + cheat + description:Infinite lives + code:0305/09 + cheat + description:Infinite Coins + code:030b/ff + cheat + description:Max power charge (alt) + code:0312/0c + cheat + description:One hit kills on most bosses + code:03d7/00 + +cartridge sha256:8da82a28be164453d1f8aa293fc8b02aaede397b52622a14ead331e475e5ca2f + name:Flintstones, The - The Surprise at Dinosaur Peak! (USA) + cheat + description:Invincibility + code:9984/8d/60 + cheat + description:Infinite lives + code:808e/ce/ad + cheat + description:Infinite energy + code:997f/01/00 + cheat + description:Infinite energy (alt) + code:9984/8d/ad + cheat + description:Infinite stone hammers on pick-up + code:9eab/8d/ad + cheat + description:Enemies do more damage (3 hearts) + code:997f/01/03 + cheat + description:Get bowling ball instead of stone hammer + code:8f8b/01/02 + cheat + description:Get mystery item instead of stone hammer + code:8f8b/01/03 + cheat + description:Continue on Level 2 + code:8946/00/01 + cheat + description:Continue on Level 3 + code:8946/00/02 + cheat + description:Continue on Level 4 + code:8946/00/03 + cheat + description:Continue on Level 5 + code:8946/00/04 + cheat + description:Continue on Level 6 + code:8946/00/05 + cheat + description:Continue on Level 7 + code:8946/00/06 + cheat + description:Continue on Level 8 + code:8946/00/07 + cheat + description:Continue on Level 9 + code:8946/00/08 + cheat + description:Continue on Level 10 + code:8946/00/09 + cheat + description:Start with max power + code:8186/0c/14 + cheat + description:Start with 1 heart + code:817b/03/01 + cheat + description:Start with 2 hearts + code:817b/03/02 + cheat + description:Start with 6 hearts + code:817b/03/06 + cheat + description:Start with 9 hearts + code:817b/03/09 + cheat + description:Start with 1 life instead of 3 + code:8153/02/00 + cheat + description:Start with 5 lives + code:8153/02/04 + cheat + description:Start with 9 lives + code:8153/02/08 + cheat + description:Start on level 2 + code:897a/8d/ee + +cartridge sha256:fd7523b5ec5769e4d782a9699a2253bd15d0036111b8ed26195238b35b74257d + name:Flying Dragon - The Secret Scroll (USA) + cheat + description:Start with infinite lives + code:b0c6/a4/86 + cheat + description:Start with infinite time + code:8988/c6/24 + cheat + description:Start with double KO power + code:ab1b/03/06 + cheat + description:Start with 1 life + code:8076/03/01 + cheat + description:Start with 6 lives + code:8076/03/06 + cheat + description:Start with 9 lives + code:8076/03/09 + +cartridge sha256:5e2db0db6b1d3d7fe1630a6bab38a66081e3266070a4dfac9c3ace9edf39375e + name:Flying Hero (Japan) + cheat + description:Finish levels automatically + code:03a9/00 + cheat + description:Infinite lives + code:0400/03 + cheat + description:Max Bounce + code:04b0/03 + cheat + description:One hit kills on Fires + code:0510/80 + +cartridge sha256:1568e77e6533087eee26f952b0f58373fc5e56c4b2139023dbfdadc0828249c8 + name:Flying Warriors (USA) + cheat + description:Infinite life + code:c4fd/8d/ad + cheat + description:Infinite lives + code:c964/ce/ad + cheat + description:Infinite KO's + code:a491/8d/ad+c25b/8d/ad + cheat + description:Infnite credits + code:822a/c6/a5 + +cartridge sha256:eedcf3fae4fe66102a1bf1338a1ea3276f5aadb3c3bc5770dd1d260e2fc44bac + name:Formation Z (Japan) + cheat + description:Invincibility + code:a059/8d/ad+a458/8d/ad+abae/8d/ad+9f82/8d/ad+976e/8d/ad+aa9d/8d/ad+afb1/8d/ad+adfc/8d/ad+9629/8d/ad+961e/8d/ad + cheat + description:Infinite fuel + code:96de/c6/25 + +cartridge sha256:758ea7bee928136abf612ba564fab4dd4f3caa951cb685bc8e1d4533c7b0680e + name:Formula One - Built to Win (USA) + cheat + description:Infinite nitro + code:d8b2/ce/ad + cheat + description:Better nitro + code:d84a/20/60 + cheat + description:Psycho speed + code:d869/02/00 + cheat + description:Items cost nothing + code:bb7e/ad/60 + cheat + description:Items for free + code:bb7e/ad/60+bb6c/e5/60 + +cartridge sha256:e9fe69c87a9ab1183ce8492843bacf868e1f8df2fd4e1441403091d13025a619 + name:Fox's Peter Pan & the Pirates - The Revenge of Captain Hook (USA) + cheat + description:Infinite lives + code:c31f/c6/a5 + cheat + description:Infinite flight meter + code:da6a/ce/ad + cheat + description:Slower flight meter + code:da5f/04/0c + cheat + description:Faster flight meter + code:da5f/04/02 + cheat + description:Faster flying left and right + code:da33/01/02+d816/01/02 + cheat + description:Start with 30 units of health + code:c4f2/0a/1e+c32f/0a/1e + cheat + description:Start with 5 units of health + code:c4f2/0a/05+c32f/0a/05 + cheat + description:Start with 1 life + code:c4fb/03/01 + cheat + description:Start with 6 lives + code:c4fb/03/06 + cheat + description:Start with 9 lives + code:c4fb/03/09 + cheat + description:Infinite health + code:0051/ff + cheat + description:Infinite lives (alt) + code:0050/09 + cheat + description:Infinite Flight meter (alt) + code:0640/ff + +cartridge sha256:682a0629d25275a95975e3822ded9fc6cfe5ce8dfb4650aeda0981bfe6a6afc0 + name:Frankenstein - The Monster Returns (USA) + cheat + description:Invincibility + code:c4eb/00/02 + cheat + description:Invincible after you die once (may get stuck in boss stages) + code:8049/85/a5+c001/85/a5 + cheat + description:Infinite health + code:83cb/85/a5+907f/85/a5+8bc9/85/a5+90ba/85/a5+90bc/85/a5 + cheat + description:Can't collect extra energy + code:8b0b/85/a5 + cheat + description:Die after one hit + code:83c7/b0/80 + cheat + description:Start with 0 continue + code:c197/03/01 + cheat + description:Infinite health (alt) + code:007d/08 + +cartridge sha256:995b57f7d2c68a5689549fc53645dcc44f871c8d172e15deafd7389bc3f6ee0a + name:Freedom Force (USA) + cheat + description:Infinite health + code:8367/85/24 + cheat + description:Infinite ammo + code:e7b3/22/00 + cheat + description:Infinite errors allowed + code:e797/c9/a9 + cheat + description:Fewer errors allowed + code:e798/06/03 + cheat + description:Start with half health + code:e64f/18/0c + cheat + description:Start with half ammo + code:e697/24/12 + cheat + description:Start at level 2 + code:e633/01/02 + cheat + description:Start at level 3 + code:e633/01/03 + cheat + description:Start at level 4 + code:e633/01/04 + cheat + description:Start at level 5 + code:e633/01/05 + cheat + description:Infinite health - P1 + code:0516/18 + cheat + description:Infinite health - P2 + code:0526/18 + cheat + description:Infinite ammo - P1 + code:0515/24 + cheat + description:Infinite ammo - P2 + code:0525/24 + cheat + description:Infinite errors allowed - P1 + code:0517/00 + cheat + description:Infinite errors allowed - P2 + code:0527/00 + cheat + description:Infinite time in bonus stages (disable to continue) + code:0089/09 + cheat + description:Automatically finish stage + code:00c2/3c + +cartridge sha256:ea054316b0e2ab99c2dcbcccacb4f28bae6809f183d29a4cb797a07f55ad8ff8 + name:Free Fall (USA) (Proto) + cheat + description:Infinite hands + code:ce7d/99/b9 + cheat + description:Freeze time (disable at end of level so counter can decrease) + code:d040/95/b5 + cheat + description:One saved to beat level + code:d46a/a5/a9+d46d/d8/75+d46e/04/01 + cheat + description:No score decrease with loss of men + code:ce13/62/08+ce12/a5/30 + cheat + description:Each dead man, one to score instead of five + code:ce13/62/63 + +cartridge sha256:7e94b4fe8c33439779bb653d007ba4678dd589636ffbc87d1535629578a64d5e + name:Friday the 13th (USA) + cheat + description:Invincibility + code:af0d/20/ad + cheat + description:Infinite health + code:dd0c/8d/ad + cheat + description:Infinite health for active counselor + code:dd06/e5/e9 + cheat + description:Infinite child save time + code:b77c/20/ad + cheat + description:Infinite children + code:b853/ce/ad+b845/78/75 + cheat + description:Hit anywhere + code:dc43/d0/50 + cheat + description:One hit kills + code:dc99/12/00 + cheat + description:Enemies die automatically + code:cad2/22/00 + cheat + description:No enemies + code:cbc4/02/00+daa5/fe/ad + cheat + description:Vitamins heal active counselor better + code:b418/06/2a + cheat + description:Vitamins heal others better + code:eb0a/04/28 + cheat + description:Autofire + code:b2f5/74/75 + cheat + description:Everyone can jump high + code:b50a/00/0c + cheat + description:Turbo running + code:b264/b9/ad+b265/68/1f + cheat + description:Throw rocks straight + code:c285/a5/07 + cheat + description:Start with 55 children + code:8ee7/01/05+8efd/0f/37 + cheat + description:Invincibility (alt) + code:0488/03 + cheat + description:Infinite health (alt) + code:0505/ff + cheat + description:Infinite Medicine + code:0519/09 + cheat + description:Infinite Children + code:0504/05 + cheat + description:Infinite child save time (alt) + code:058d/09 + cheat + description:Have the Torch + code:0506/00 + cheat + description:Have the Knife + code:0506/01 + cheat + description:Have the Axe + code:0506/02 + cheat + description:Have the Stone + code:0506/03 + cheat + description:Have the Cleaver + code:0506/04 + cheat + description:Have the Pitchfork + code:0506/05 + cheat + description:Have the Lighter Torch + code:0517/01 + cheat + description:Have the Flashlight + code:0518/01 + cheat + description:Have the Key + code:051a/01 + cheat + description:Jason has no health + code:051c/00 + cheat + description:Play as George + code:0507/00 + cheat + description:Play as Mark + code:0507/01 + cheat + description:Play as Paul + code:0507/02 + cheat + description:Play as Laura + code:0507/03 + cheat + description:Play as Debbie + code:0507/04 + cheat + description:Play as Crissy + code:0507/05 + cheat + description:Set time - day + code:0508/00 + cheat + description:Set time - dusk + code:0508/01 + cheat + description:Set time - night + code:0508/02 + +cartridge sha256:d077b282b751a246549e334885d83ee587d9e6178b170afcf57553ec62015c52 + name:G.I. Joe - A Real American Hero (USA) + cheat + description:Invincibility + code:94ec/f0/d0+94f0/38/ea + cheat + description:Infinite health + code:e477/99/b9 + cheat + description:Infinite ammo + code:aee9/8d/ad + cheat + description:Infinte time + code:83fe/8d/ad + cheat + description:Infinite time (alt) + code:83f6/01/00 + cheat + description:More health - Duke + code:edb4/0d/14 + cheat + description:More health - Blizzard + code:edb5/0c/14 + cheat + description:More health - Snake Eyes + code:edb6/0a/14 + cheat + description:More health - Capt. Grid-Iron + code:edb7/0b/14 + cheat + description:More health - Rock and Roll + code:edb8/09/14 + cheat + description:Less health - Duke + code:edb4/0d/06 + cheat + description:Less health - Blizzard + code:edb5/0c/06 + cheat + description:Less health - Snake Eyes + code:edb6/0a/05 + cheat + description:Less health - Capt. Grid-Iron + code:edb7/0b/05 + cheat + description:Less health - Rock and Roll + code:edb8/09/04 + cheat + description:Shorter immunity + code:e47d/78/30 + cheat + description:Longer immunity + code:e47d/78/ff + cheat + description:Max health on pick-up + code:8139/03/00 + cheat + description:Mega-jump - Duke + code:edfc/17/20 + cheat + description:Mega-jump - Blizzard + code:edfd/12/20 + cheat + description:Mega-jump - Snake Eyes + code:edfe/1c/20 + cheat + description:Mega-jump - Capt. Grid-Iron + code:edff/14/20 + cheat + description:Mega-jump - Rock and Roll + code:ee00/10/20 + +cartridge sha256:9e65e4d55123612c5eb05b332e48fd975a187d706a3fd44b62125e1ae48af028 + name:G.I. Joe - The Atlantis Factor (USA) + cheat + description:Invincibility + code:9a53/f0/d0+9a57/38/ea + cheat + description:Infinite health + code:e5d3/99/b9 + cheat + description:Infinite time + code:855a/01/00 + cheat + description:Infinite Mines + code:9b90/de/bd + cheat + description:Infinite stamina + code:e5d3/99/a5+8595/9d/bd + cheat + description:Infinite bullets after obtaining a power up shell + code:b6da/8d/2c+b6e6/8d/2c + cheat + description:Don't flash after getting hit + code:e5d9/78/00 + cheat + description:Flash about half as long after getting hit + code:e5d9/78/39 + cheat + description:Each Pow worth increases player level by one + code:9721/01/04 + cheat + description:Infinite ammo + code:b6da/8d/ad+b6e6/8d/ad+b6d5/ce/ad+b6e9/8d/ad + cheat + description:Start with all characters + code:83ce/01/3f + cheat + description:Start with 500 bullets + code:840b/01/05 + cheat + description:Start with 1 life + code:effd/05/01 + +cartridge sha256:023ff157d96a8efc847c7d7cbe89574091fe099996e6283c63e3fb58918f3502 + name:Gaiapolis (Asia) (Unl) + cheat + description:Invincibility + code:8e47/f0/d0 + cheat + description:Infinite time + code:c93e/c6/a5 + cheat + description:Infinite credits + code:cea5/ce/ad + cheat + description:Hit anywhere + code:9a34/b0/50+9a35/24/18+9988/b0/50+a486/74/b8+a485/d9/4c+a487/05/a4+9989/58/32 + cheat + description:Get items from anywhere + code:9a72/b0/50+9a73/29/1f + +cartridge sha256:a636a947acf1ef0b50e66d31699b64aa4f3b4865e2f2031385780974fb6d8c91 + name:Galactic Crusader (USA) (Unl) + cheat + description:Invincibility + code:f13e/f0/d0 + cheat + description:Infinite lives + code:debb/c6/a6 + +cartridge sha256:df49cc788fff36881fcf1d1cb22281d305260d4d8fbbe07ca2c4d699fe54843a + name:Galaga - Demons of Death (USA) + cheat + description:Invincibility + code:e87d/a6/60 + cheat + description:Infinite lives + code:cb9e/ca/ea + cheat + description:Play challenge stages only + code:ce99/d0/24 + cheat + description:Can't be caught by tractor beam + code:e1d2/a5/a9+e1d3/79/07 + cheat + description:Press Start for next wave + code:d271/80/94+d272/05/04+d26d/01/00 + cheat + description:Press Start for extra life + code:d26c/a9/4c+d26d/01/a8+d26e/85/cb + cheat + description:Start with twin shots + code:e089/d0/24 + cheat + description:Start with 1 life + code:cd4c/03/01 + cheat + description:Start with 6 lives + code:cd4c/03/06 + cheat + description:Infinite lives (alt) + code:0485/05+0487/05 + +cartridge sha256:e6fe68b9f12578e74ba016ca146aaf8232b20475fb675c7d32e0ea4e47eb1cc8 + name:Galaga (Japan) + cheat + description:Invincibility + code:e904/a9/60 + cheat + description:Infinite lives + code:cb9e/ca/ea + cheat + description:Keep double ship after being destroyed + code:e8f4/a9/60 + cheat + description:Only one part to collect + code:81dc/64/01 + cheat + description:Always get a perfect bonus + code:d0e5/c9/29+d0e6/28/00 + cheat + description:Start with double shot + code:c3e5/80/d5+cd47/95/29 + cheat + description:Infinite lives (alt) + code:0485/05+0487/05 + +cartridge sha256:50178a2856f8ed3574b4e7fd45b9d1ec44c660d51fe9783d0012a19df5892cce + name:Galaxian (Japan) + cheat + description:Infinite lives + code:0042/05 + +cartridge sha256:c019750cc439810de6cbf1c3a895099674df3f397744ad3149ba1b25dd55d0ab + name:Galaxy 5000 (USA) + cheat + description:Infinite time + code:9040/de/bd + cheat + description:Reduce damage free of charge + code:aefd/fd/2c + cheat + description:No damage from falling + code:a9c0/20/ad + cheat + description:Take less damage + code:f9fe/a5/a9+f9ff/1a/01 + cheat + description:More damage from falling + code:a9bd/bd/ad+bf6e/23/30 + cheat + description:More damage from shots + code:948a/e6/0e+948b/fe/bf + cheat + description:Always in 1st place - P1 + code:00ab/00 + cheat + description:Always in 1st place - P2 + code:00ac/00 + cheat + description:Always in 1st place - P3 + code:00ad/00 + cheat + description:Always in 1st place - P4 + code:00ae/00 + cheat + description:Infinite time (one's digit) + code:069a/09 + cheat + description:Infinite time (ten's digit) + code:069b/09 + cheat + description:Infinite time (hundred's digit) + code:069c/09 + +cartridge sha256:055fb73baaed0f3c4a31902402e7fe581d2d2cb948d3a2f5c3552050f316e6df + name:Gargoyle's Quest II (USA) + cheat + description:Invincibility (except Doppelganger when it mimics you) + code:88d4/05/89 + cheat + description:Invincible against spikes + code:e3ff/05/e4 + cheat + description:Infinite fight + code:81db/a5/a9 + cheat + description:Walk through walls + code:831c/90/10 + +cartridge sha256:a2039efb5b5b8d4941c31ae0977dacccec5aaa72fe307ae36af2a454d30d9e26 + name:Garry Kitchen's BattleTank (USA) + cheat + description:Infinite energy + code:9090/e6/c5 + cheat + description:Infinite hits + code:9090/e6/a5+b9d7/85/a5 + cheat + description:Infinite fuel + code:87b0/8d/cd + cheat + description:Infinite weapons + code:e820/de/dd+e74d/ce/cd + cheat + description:Infinite ammo + code:e820/de/bd + cheat + description:Start with half 150mm ammo + code:a0e5/32/16 + cheat + description:Start with double 150mm ammo + code:a0e5/32/63 + cheat + description:Start with more wire guided shells + code:a0ee/01/32 + cheat + description:Start with max wire guided shells + code:a0ee/01/63 + cheat + description:Start with more smoke shells + code:a0f8/01/32 + cheat + description:Start with max smoke shells + code:a0f8/01/63 + cheat + description:Start with less 50mm shells + code:a101/96/4b + cheat + description:Start with max 50mm shells + code:a101/96/ff + cheat + description:Start with less 50mm ammo after mission 5 + code:a105/c8/64 + cheat + description:Start with max 50mm ammo after mission 5 + code:a105/c8/ff + +cartridge sha256:fbc976422ca910d9391060898c8b58694f19b6e53a68bd33c457fb38dac1e5c6 + name:Gauntlet (USA) (Unl) + cheat + description:Infinite health + code:8f70/95/b5+9861/95/b5 + cheat + description:Infinite keys + code:ab1e/00/09+ab21/a5/85 + cheat + description:Infinite time in puzzle and treasure rooms + code:989f/c6/ea + cheat + description:Infinite time in puzzle and treasure rooms (alt) + code:00c0/1e + cheat + description:Have all power-ups - P1 + code:00ac/3f + cheat + description:Have all power-ups - P2 + code:00ad/3f + cheat + description:Have Invisibility - P1 + code:00aa/01 + cheat + description:Have Invisibility - P2 + code:00ac/01 + cheat + description:Have Invulnerability - P1 + code:00aa/20 + cheat + description:Have Invulnerability - P2 + code:00ac/20 + cheat + description:Have Reflective shot - P1 + code:00aa/04 + cheat + description:Have Reflective Shot - P2 + code:00ac/04 + cheat + description:Have Repulsiveness - P1 + code:00aa/02 + cheat + description:Have Repulsiveness - P2 + code:00ac/02 + cheat + description:Have Super Shot - P1 + code:00aa/10 + cheat + description:Have Super Shot - P2 + code:00ac/10 + +cartridge sha256:fd2a8520314fb183e15fd62f48df97f92eb9c81140da4e6ab9ff0386e4797071 + name:Gauntlet (USA) + cheat + description:Infinite health + code:8f70/95/b5+9861/95/b5 + cheat + description:Infinite keys + code:ab1e/00/09+ab21/a5/85 + cheat + description:Infinite time in puzzle and treasure rooms + code:989f/c6/ea + cheat + description:Infinite time in puzzle and treasure rooms (alt) + code:00c0/1e + cheat + description:Have all power-ups - P1 + code:00ac/3f + cheat + description:Have all power-ups - P2 + code:00ad/3f + cheat + description:Have Invisibility - P1 + code:00aa/01 + cheat + description:Have Invisibility - P2 + code:00ac/01 + cheat + description:Have Invulnerability - P1 + code:00aa/20 + cheat + description:Have Invulnerability - P2 + code:00ac/20 + cheat + description:Have Reflective shot - P1 + code:00aa/04 + cheat + description:Have Reflective Shot - P2 + code:00ac/04 + cheat + description:Have Repulsiveness - P1 + code:00aa/02 + cheat + description:Have Repulsiveness - P2 + code:00ac/02 + cheat + description:Have Super Shot - P1 + code:00aa/10 + cheat + description:Have Super Shot - P2 + code:00ac/10 + +cartridge sha256:ffa61d9f7bfb1d60662ddf246b21a8756d518292e8fdc0f58ac1c9b3fbad672d + name:Gauntlet II (USA) + cheat + description:Infinite health + code:df2f/9d/bd+e207/9d/bd + cheat + description:Take less damage + code:df2d/e5/e9+df2e/00/02 + cheat + description:Infinite keys (new game) + code:e01f/00/01+eb60/de/ad + cheat + description:Infinite time in treasure rooms + code:e294/bd/ea + cheat + description:Walk through walls + code:e53e/90/10+e55c/90/b0 + cheat + description:Weaker poison + code:ed6e/64/32 + cheat + description:Stronger poison + code:ed6e/64/c8 + cheat + description:5 super shots on pick-up + code:eb30/0a/05 + cheat + description:20 super shots on pick-up + code:eb30/0a/14 + cheat + description:Invincibility lasts longer + code:eb06/3c/78 + cheat + description:Invincibility doesn't last as long + code:eb06/3c/1b + cheat + description:Repulsiveness lasts longer + code:eaf3/3c/78 + cheat + description:Repulsiveness doesn't last as long + code:eaf3/3c/1b + cheat + description:Invisibility lasts longer + code:eb14/3c/78 + cheat + description:Invisibility doesn't last as long + code:eb14/3c/1b + cheat + description:Infinite health - P1 + code:0739/ff + cheat + description:Infinite health - P2 + code:073a/ff + cheat + description:Infinite health - P3 + code:073b/ff + cheat + description:Infinite health - P4 + code:073c/ff + cheat + description:Infinite Keys - P1 + code:0743/04 + cheat + description:Infinite Keys - P2 + code:0744/04 + cheat + description:Infinite Keys - P3 + code:0745/04 + cheat + description:Infinite Keys - P4 + code:0746/09 + cheat + description:Infinite Potions - P1 + code:0748/03 + cheat + description:Infinite Potions - P2 + code:0749/03 + cheat + description:Infinite Potions - P3 + code:074a/03 + cheat + description:Infinite Potions - P4 + code:074b/03 + cheat + description:Have Invulnerability - P1 + code:0707/ff + cheat + description:Have Invulnerability - P2 + code:0708/ff + cheat + description:Have Invulnerability - P3 + code:0709/ff + cheat + description:Have Invulnerability - P4 + code:070a/ff + cheat + description:Have Reflective Shot - P1 + code:0716/ff + cheat + description:Have Reflective Shot - P2 + code:0717/ff + cheat + description:Have Reflective Shot - P3 + code:0718/ff + cheat + description:Have Reflective Shot - P4 + code:0719/ff + cheat + description:Have Repulsiveness - P1 + code:0711/ff + cheat + description:Have Repulsiveness - P2 + code:0712/ff + cheat + description:Have Repulsiveness - P3 + code:0713/ff + cheat + description:Have Repulsiveness - P4 + code:0714/ff + cheat + description:Have Super Shot - P1 + code:071b/0a + cheat + description:Have Super Shot - P2 + code:071c/0a + cheat + description:Have Super Shot - P3 + code:071d/0a + cheat + description:Have Super Shot - P4 + code:071e/0a + cheat + description:Have Transportability - P1 + code:0720/ff + cheat + description:Have Transportability - P2 + code:0721/ff + cheat + description:Have Transportability - P3 + code:0722/ff + cheat + description:Have Transportability - P4 + code:0723/ff + +cartridge sha256:cf517940496d6085563bdbbe74f4a06d2c4eca48da8eb2b35d5cfe463df35ce4 + name:George Foreman's KO Boxing (USA) + cheat + description:Invincibility + code:fa9c/f0/10+faf5/49/a9 + cheat + description:Infinite health + code:036e/43 + cheat + description:Can always use super punches + code:e766/08/00 + cheat + description:Knock opponent down with 1 super punch + code:f8ed/b1/a9+f8ee/ae/41 + cheat + description:Knock opponent down with 1 punch + code:036f/01 + +cartridge sha256:43221ae8a386e8ddf68251d5870d6fe3d696be14a5e41d9a44c36227894044d8 + name:Ghostbusters (USA) + cheat + description:Infinite fuel + code:a2c0/c6/a5 + cheat + description:Infinite energy during Gozer fight + code:f360/8d/ad + cheat + description:Immune to ghosts on Zuul stairway + code:a99c/c6/a9 + cheat + description:Permanent ghost alarm + code:8c0a/29/09 + cheat + description:Permanent ghost vacuum + code:9153/29/09 + cheat + description:Self-emptying traps + code:8cdd/a5/a9 + cheat + description:Super sprinting up Zuul stairway + code:a881/01/00 + cheat + description:Stay Puft does not climb building during Gozer fight + code:f926/ee/ad + cheat + description:Gozer dies in one hit + code:f332/f0/d0 + cheat + description:No walk up Zuul stairway + code:a629/17/00 + cheat + description:Start with $1,000,000 + code:87ee/5e/60 + +cartridge sha256:1ea36ebd81692d3a3c1db217e0df832f060c1566c69a74fac299aaeb0d8eb82f + name:Ghostbusters II (USA) + cheat + description:Invincibility + code:9f71/f0/d0+9dec/f0/d0 + cheat + description:Infinite lives + code:f3c0/de/bd + cheat + description:Infinite continues + code:9a25/ce/ad + cheat + description:Triple continues + code:c006/02/06 + cheat + description:Rapid-firing proton rifle + code:9a89/1f/0a + cheat + description:All Ghostbusters can mega-jump + code:9a5c/fe/fc + cheat + description:Shield lasts longer - car scenes + code:a1a8/50/ff + cheat + description:Infinite shield - car scenes + code:a71b/ce/ad + cheat + description:Start with 1 life + code:e42c/03/00 + cheat + description:Start with 6 lives + code:e42c/03/05 + cheat + description:Start with 9 lives + code:e42c/03/08 + +cartridge sha256:eea66f7bcc90d1145454da487791be5926473bee4014313af12dfa0f7453ea81 + name:Ghosts'n Goblins (USA) + cheat + description:Invincibility + code:f5ec/01/00 + cheat + description:Infinite armor + code:e3d6/c5 + cheat + description:Infinite lives - both players + code:c907/ce/ad + cheat + description:Infinite time + code:d396/ce/ad + cheat + description:Hit anywhere + code:f607/90/38+f608/01/60+f5c1/99/b9+b6be/99/b9 + cheat + description:Enable stage select (disable after loading stage) + code:d062/0f/00 + cheat + description:Speed up game + code:d243/03/02 + cheat + description:Slow down game + code:d243/03/04 + cheat + description:Start with Axe + code:c5ff/40/36 + cheat + description:Start with Dagger + code:c5ff/40/42 + cheat + description:Start with Fireball + code:c5ff/40/44 + cheat + description:Start with Cross + code:c5ff/40/4f + cheat + description:Start with Blue Sphere + code:c5ff/40/ac + cheat + description:Start with 1 life - both players + code:c609/03/01 + cheat + description:Start with 6 lives - both players + code:c609/03/06 + cheat + description:Start with 9 lives - both players + code:c609/03/09 + cheat + description:Start with 4 lives - P1 + code:c60a/8d/8e + cheat + description:Enable stage select (disable after loading stage) + code:00a7/0f + cheat + description:Automatically complete level + code:00bf/01 + cheat + description:Game difficulty - normal + code:00aa/00 + cheat + description:Game difficulty - hard + code:00aa/01 + cheat + description:Game difficulty - harder + code:00aa/02 + cheat + description:Game difficulty - hardest + code:00aa/03 + cheat + description:Game difficulty - expert + code:00aa/04 + +cartridge sha256:48aaef58dee3ad370546db569306e40aeecd27b88b7faef3ccd9b8b818c9ea71 + name:Ghoul School (USA) + cheat + description:Invincibility + code:aa41/20/ad + cheat + description:Infinite health + code:abdd/8d/ad + cheat + description:Infinite lives + code:c68f/ce/ad + cheat + description:Infinite health (alt) + code:060a/ff + cheat + description:Infinitel lives (alt) + code:0467/09 + cheat + description:One hit kills on most enemies + code:060d/00+060e/00+060f/00+0610/00+0611/00+0612/00+0613/00 + +cartridge sha256:bf22e6aff97bb44210987f5631c1667d4fa75ef79522e8c46dbb3b0f4877896b + name:Goal! (USA) + cheat + description:CPU score adds to your score + code:c71b/f0/c9+c71f/f0/c9 + +cartridge sha256:7911375ab98da4ac5c628ba4dfffcba8ba4fc13a341901aed120ab967be5e26c + name:Goal! Two (USA) + cheat + description:Infinite time - Italy, P2 + code:f100/c6/a5 + cheat + description:P2 or computer can't score - Italy, P2 + code:87fb/8d/ad + cheat + description:Start with more KP - Italy, P2 + code:d740/09/20 + cheat + description:Start with a lot of KP - Italy, P2 + code:d740/09/50 + cheat + description:Start with mega KP - Italy, P2 + code:d740/09/99 + cheat + description:Start with more TP - Italy, P2 + code:d741/07/20 + cheat + description:Start with a lot of TP - Italy, P2 + code:d741/07/50 + cheat + description:Start with mega TP - Italy, P2 + code:d741/07/99 + +cartridge sha256:c2383e5cd8670c7107d59887026b9001f30045aa5f07be4b687b7a6bc290db1f + name:Godzilla - Monster of Monsters! (USA) + cheat + description:Infinite life (health) + code:018c/30 + cheat + description:Infinite power + code:0178/30 + +cartridge sha256:c41555b61617e52cae950e0a94d4d655646eed4e4ce4c1d26740ddee0a9ae090 + name:Golf (USA) + cheat + description:Ball goes in from anywhere + code:c265/03/00+d367/f0/10+d368/41/3d + +cartridge sha256:af24262bc78865b81b1a42d2842e222553fca27fb841a4eb8fbe26da7eba6163 + name:Golf Grand Slam (USA) + cheat + description:Strokes aren't recorded + code:a784/85/a5 + cheat + description:Some shots can be done more accurately + code:eea0/05/01 + cheat + description:Wind always at 9 + code:d411/25/a9+d412/28/09+a7d2/85/a5 + +cartridge sha256:9f559f83b9b5179137069bae0ca4b8eacf84378892b598044b88ef50681b58bb + name:Golgo 13 - Top Secret Episode (USA) + cheat + description:Infinite health + code:841e/85/a5+e8ca/c6/a9+f9cf/85/a5 + cheat + description:Health does not gradually decrease + code:e8ca/c6/a5 + cheat + description:Infinite bullets in horizontal mode + code:eeba/85/24 + cheat + description:Infinite damage in horizontal mode + code:f9cf/85/24 + cheat + description:Infinite damage in pan/zoom mode + code:841c/e5/24 + cheat + description:Infinite damage in maze + code:b442/e5/24 + cheat + description:Have a health and bullets boost + code:c06d/00/02 + +cartridge sha256:16c7de15b7dc72c567f58172bbf0cd1328d11625f6707814da030df15f95dc92 + name:Goonies II, The (USA) + cheat + description:Invincibility + code:80da/ad/8d + cheat + description:Infinite health + code:be5f/85/a5 + cheat + description:Infinite time + code:9a9b/d6/d5 + cheat + description:Infinite lives + code:cf33/c6/a5 + cheat + description:Infinite Bombs on pick-up + code:8db5/ce/ad + cheat + description:Infinite Molotov Bombs on pick-up + code:8d60/ce/ad + cheat + description:Infinite Sling Shots on pick-up + code:8e78/ce/ad + cheat + description:Super-jump + code:89b1/02/07 + cheat + description:Mega-jump + code:89b1/02/03 + cheat + description:Better Jumping Boots on pick-up + code:89bc/04/05 + cheat + description:Super-speed + code:80d1/01/02 + cheat + description:Walk through walls + code:86d7/c9/10+8752/f0/10+8770/8d/ad + cheat + description:Start with all items + code:d460/01/1f + cheat + description:Start with Boomerang + code:d460/01/05 + cheat + description:Start with 4 health cells + code:d432/02/04+d437/20/40 + cheat + description:Start with 8 health cells + code:d432/02/08+d437/20/80 + cheat + description:Start with 1 life + code:d42a/03/01 + cheat + description:Start with 6 lives + code:d42a/03/06 + cheat + description:Start with 9 lives + code:d42a/03/09 + cheat + description:Invincibility (alt) + code:0516/41 + cheat + description:Infinite health (alt) + code:0503/20 + cheat + description:Infinite lives (alt) + code:0022/09 + cheat + description:Have all weapons + code:050b/ff+050c/ff + cheat + description:Have all Implements + code:050a/ff + cheat + description:Infinite Keys + code:0500/08 + cheat + description:View ending (enable then disable) + code:0000/08+0001/00 + +cartridge sha256:15685dee8bc1c588dfa2649b7b5f715aa7b4136454ba09c046d1b17209749d76 + name:Gotcha! - The Sport! (USA) + cheat + description:Infinite time + code:b55e/01/00 + cheat + description:Increase timer to 59 seconds + code:9801/04/05+9806/05/09 + cheat + description:Decrease timer to 25 seconds + code:9801/04/02+9806/05/05 + cheat + description:Start with double rations of ammo + code:980c/01/02 + cheat + description:Enemies never shoot at you + code:05f1/63 + cheat + description:Infinite ammo + code:061a/09+061b/09 + cheat + description:Infinite time (alt) + code:061e/09+061f/09 + +cartridge sha256:6918d7cbb81bfcd20d95bb08bcf137c7ea80ae9f0c12b92bfdcc90a6cf9752a0 + name:Gradius (USA) + cheat + description:Infinite lives - both players + code:979f/d6/a5 + cheat + description:Keep power capsules + code:97ab/95/94 + cheat + description:Increase force field protection + code:899c/05/ff + cheat + description:Never lose weapons + code:9b3f/5a/4f+9b43/3d/47 + cheat + description:Hit anywhere + code:c01f/10/00+c02c/03/00 + cheat + description:Start with 1 life - both players + code:82fb/03/00 + cheat + description:Start with 6 lives - both players + code:82fb/03/05 + cheat + description:Start with 9 lives - both players + code:82fb/03/08 + +cartridge sha256:2974ad16b994cfdc9418310ced6c7f4ed64433063d12439a7b37a816f797dd0e + name:Gradius II (Japan) + cheat + description:Invincibility + code:f50c/20/60 + +cartridge sha256:fe3d2f94dadd3b2437e45ed9a38276b8b32af9e25d484de79c3cc7bf60eef386 + name:Grand Master (Japan) + cheat + description:Invincibility + code:0420/01 + cheat + description:Infinite HP + code:044f/20 + cheat + description:Infinite MP + code:0450/20 + cheat + description:Hit anywhere + code:83ba/1a/00+83cb/b0/a9 + cheat + description:Have Armor + code:0439/01 + cheat + description:Have Axe + code:0431/01 + cheat + description:Have Boots + code:0435/01 + cheat + description:Have Cross + code:043b/01 + cheat + description:Have Diamond + code:0437/01 + cheat + description:Have Exit Key + code:0436/01 + cheat + description:Have Harp + code:0434/01 + cheat + description:Have Hourglass + code:043c/01 + cheat + description:Have Mirror + code:043e/01 + cheat + description:Have Morning Star + code:0433/01 + cheat + description:Have Necklace + code:043d/01 + cheat + description:Have Potion + code:0438/01 + cheat + description:Have Red Sword + code:0430/01 + cheat + description:Have Rod + code:0432/01 + cheat + description:Have Shield + code:043a/01 + +cartridge sha256:60a7d102deac7491e08b7ed5a7b96e66e09758b8411f682a4df1a7e8b49e55c5 + name:Great Waldo Search, The (USA) + cheat + description:Only need to find Waldo to complete the level + code:de82/80/c0 + cheat + description:Only need to find the magic scroll + code:deaf/40/c0 + cheat + description:Faster timer + code:cec9/01/02 + cheat + description:Much faster timer + code:cec9/01/04 + cheat + description:Play the Super Waldo Challenge + code:d850/e9/a9+d851/03/04 + cheat + description:Extra clocks last forever + code:ced4/c6/a5 + cheat + description:Extra clocks worth nothing + code:df27/e6/a5 + +cartridge sha256:2b77da430b08e6a91a3453fde8ea82692415d44c3e953fdf281aa39352d5289d + name:Gremlins 2 - The New Batch (USA) + cheat + description:Invincibility + code:dd0b/d0/f0 + cheat + description:Infinite health + code:81ca/c6/a5 + cheat + description:Infinite lives + code:807e/ce/ad + cheat + description:Infinite balloons + code:8a2b/ce/ad + cheat + description:Start with 5 lives + code:c800/00/04 + cheat + description:Start with 10 lives + code:c800/00/09 + cheat + description:Start with 3 balloons + code:c805/01/03 + cheat + description:Start with 6 balloons + code:c805/01/06 + cheat + description:Start with only 1 heart + code:c80a/06/02+808b/06/02 + cheat + description:Start with 4 hearts + code:c80a/06/08+808b/06/08 + cheat + description:Invincibility after one hit + code:00a9/09 + cheat + description:Infinite health (alt) + code:00ad/06 + cheat + description:Infinite lives (alt) + code:057c/03 + cheat + description:Infinite Balloons (alt) + code:050c/05 + cheat + description:Infinite Crystals + code:056c/ff + cheat + description:One hit kills on bosses + code:0360/00 + +cartridge sha256:d18ad8b76f9d067858dc8012ee84119c90524cdc3f4d555dd5a752a6f469fe6b + name:Guardian Legend, The (USA) + cheat + description:Invincibility + code:d2cb/a5/60 + cheat + description:Infinite health + code:e325/ff/00 + cheat + description:Hit anywhere + code:d357/6f/00+d356/25/c0+d358/f0/d0+d359/05/09 + cheat + description:Use up minimum shots + code:8b94/e5/e9+8b95/10/01 + cheat + description:Never use up shots (To finish the game, save before opening the entrance to corridor 6. Restart with no codes and go through the enterance. Save again, then restart.) + code:8b94/e5/24 + cheat + description:Start with less health + code:80e5/40/20 + cheat + description:Start with more health + code:80e5/40/80 + cheat + description:Start on area 1 + code:eb48/00/01 + cheat + description:Start on area 3 + code:eb48/00/03 + cheat + description:Start on area 5 + code:eb48/00/05 + cheat + description:Start on area 7 + code:eb48/00/07 + cheat + description:Start on area 9 + code:eb48/00/09 + cheat + description:Fighter shape (Adventure and Space mode) + code:0030/50 + cheat + description:Fighter shape in TGL mode (Adventure and Space mode) + code:0030/52 + cheat + description:Max consecutive firing + code:003a/01 + cheat + description:Have 2-way shot + code:003a/01 + cheat + description:Have 3-way shot + code:003a/02 + cheat + description:Have 4-way shot + code:003a/03 + cheat + description:Max weapon power - Blue + code:003d/01 + cheat + description:Max weapon power - Green + code:003d/02 + cheat + description:Max weapon power - Red + code:003d/03 + cheat + description:Start on area 10 + code:0050/0a + cheat + description:Start on Corridor 01 + code:0051/01 + cheat + description:Start on Corridor 02 + code:0051/02 + cheat + description:Start on Corridor 03 + code:0051/03 + cheat + description:Start on Corridor 04 + code:0051/04 + cheat + description:Start on Corridor 05 + code:0051/05 + cheat + description:Start on Corridor 06 + code:0051/06 + cheat + description:Start on Corridor 07 + code:0051/07 + cheat + description:Start on Corridor 08 + code:0051/08 + cheat + description:Start on Corridor 09 + code:0051/09 + cheat + description:Start on Corridor 10 + code:0051/0a + cheat + description:Start on Corridor 11 + code:0051/0b + cheat + description:Start on Corridor 12 + code:0051/0c + cheat + description:Start on Corridor 13 + code:0051/0d + cheat + description:Start on Corridor 14 + code:0051/0e + cheat + description:Start on Corridor 15 + code:0051/0f + cheat + description:Start on Corridor 16 + code:0051/10 + cheat + description:Start on Corridor 17 + code:0051/11 + cheat + description:Start on Corridor 18 + code:0051/12 + cheat + description:Start on Corridor 19 + code:0051/13 + cheat + description:Start on Corridor 20 + code:0051/14 + cheat + description:Start on Corridor 21 + code:0051/15 + cheat + description:Start on Corridor 22 + code:0051/16 + +cartridge sha256:a2033c3b3d9f54b37fad8083604d37e2b2cb4ff77e0e183021141f55dfa9c4cd + name:Guerrilla War (USA) + cheat + description:Invincibility + code:e454/d0/f0+ec03/f0/d0 + cheat + description:Infinite lives - both players + code:ce69/bd + cheat + description:Infinite lives - both players (alt) + code:ce69/de/ad + cheat + description:Keep weapon after death + code:ebb0/9d/ad + cheat + description:Press Start to complete the level + code:c75f/11/0b + cheat + description:Start a new game to view the ending + code:a0a8/08/09 + cheat + description:Start with 1 life - both players + code:c9b6/00 + cheat + description:Start with 6 lives - both players + code:c9b6/05 + cheat + description:Start with 9 lives - both players + code:c9b6/09 + cheat + description:Invincibility - P1 + code:0680/02 + cheat + description:Invincibility - P2 + code:0681/02 + cheat + description:Infinite lives - P1 + code:0028/05 + cheat + description:Infinite lives - P2 + code:0029/04 + cheat + description:Infinite time for tank + code:04c2/fa + cheat + description:Start on stage 2 (disable after loading stage) + code:0039/01 + cheat + description:Start on stage 3 (disable after loading stage) + code:0039/02 + cheat + description:Start on stage 4 (disable after loading stage) + code:0039/03 + cheat + description:Start on stage 5 (disable after loading stage) + code:0039/04 + cheat + description:Start on stage 6 (disable after loading stage) + code:0039/05 + cheat + description:Start on stage 7 (disable after loading stage) + code:0039/06 + cheat + description:Start on stage 8 (disable after loading stage) + code:0039/07 + cheat + description:Start on stage 9 (disable after loading stage) + code:0039/08 + cheat + description:Start on stage 10 (disable after loading stage) + code:0039/09 + +cartridge sha256:4628f32db9b826d19fe5dd8e2c45a9f70e1041f15b7b44b06dee2f01731566e8 + name:Gumshoe (USA, Europe) + cheat + description:Gain 1 bullet on pick-up + code:8853/03/01 + cheat + description:Gain 6 bullets on pick-up + code:8853/03/06 + cheat + description:Timer set to 04:00 + code:874c/06/03 + cheat + description:Timer set to 10:00 + code:874c/06/09 + cheat + description:Different attack waves + code:8846/8c/8d + cheat + description:Start with 1 life + code:883f/03/01 + cheat + description:Start with 6 lives + code:883f/03/06 + cheat + description:Start with 9 lives + code:883f/03/09 + cheat + description:Start with 25 bullets + code:8858/50/25 + cheat + description:Start with 150 bullets + code:885c/00/01 + cheat + description:Start with 250 bullets + code:885c/00/02 + +cartridge sha256:d22a0c390dfc47c99226226c98158bf0ca3b4cd07dbd3d46cc50c2f1b9303c22 + name:Gun Nac (USA) + cheat + description:Invincibility + code:a001/50/40+a13c/50/40 + cheat + description:Infinite lives + code:a397/8d/ad + cheat + description:Infinite special weapons + code:a2e6/8d/ad + cheat + description:One hit kills + code:d707/90/d0 + cheat + description:Enemies die automatically + code:a133/18/00+d7d8/18/38+a136/ce/8d + cheat + description:Get items from anywhere + code:d7ed/bc/38+d7ee/18/60 + cheat + description:Invincibility (alt) + code:0400/02 + cheat + description:Infinite lives (alt) + code:018d/03 + cheat + description:Infinite Bombs + code:018f/04 + cheat + description:Weapon level 1 + code:0033/00 + cheat + description:Weapon level 2 + code:0033/01 + cheat + description:Weapon level 3 + code:0033/02 + cheat + description:Weapon level 4 + code:0033/03 + cheat + description:Weapon level 5 + code:0033/04 + cheat + description:Weapon level 6 + code:0033/05 + cheat + description:Weapon level 7 + code:0033/06 + cheat + description:Weapon level 8 + code:0033/07 + cheat + description:Weapon type 1 + code:0034/00 + cheat + description:Weapon type 2 + code:0034/01 + cheat + description:Weapon type 3 + code:0034/02 + cheat + description:Weapon type 4 + code:0034/03 + cheat + description:Weapon type 5 + code:0034/04 + cheat + description:Bomb power level 2 + code:003b/01 + cheat + description:Bomb power level 3 + code:003b/02 + cheat + description:Bomb power level 4 + code:003b/03 + cheat + description:Turbo power level 2 + code:003c/01 + cheat + description:Turbo power level 3 + code:003c/02 + cheat + description:Turbo power level 4 + code:003c/03 + cheat + description:Turbo power level 5 + code:003c/04 + cheat + description:Start on level 2 + code:0180/02 + cheat + description:Start on level 3 + code:0180/03 + cheat + description:Start on level 4 + code:0180/04 + cheat + description:Start on level 5 + code:0180/05 + cheat + description:Start on level 6 + code:0180/06 + cheat + description:Start on level 7 + code:0180/07 + cheat + description:Start on level 8 + code:0180/08 + +cartridge sha256:f39421a126f3b93caa37d6c3ed899840ddfd51b0587446ca459f72564aca1433 + name:Gun.Smoke (USA) + cheat + description:Infinite lives + code:f3b6/c6/a5 + cheat + description:Keep weapons after death + code:f3a8/00/01 + cheat + description:Start with all weapons and lots of ammo + code:e736/00/01 + cheat + description:Start with all weapons, lots of ammo, all 4 boots and all 4 rifle icons + code:e736/00/04 + cheat + description:Start with 9 lives + code:e72e/03/09 + cheat + description:Start with 25 lives + code:e72e/03/19 + +cartridge sha256:0d895a031dd38f2661ba2af4a1b3c7b9753632b1530ea28eec936cf3fda8bf54 + name:Gyromite (World) + cheat + description:Invincible against enemies + code:ae34/20/ad + cheat + description:Invincible against upward crushing + code:a91a/a9/60 + cheat + description:Infinite lives + code:85a0/b5 + cheat + description:Climb up through flooring + code:aad6/03/00 + cheat + description:Climb down through flooring + code:aa90/03/00 + cheat + description:Slow down timer + code:8d83/0a + cheat + description:Start with 1 life + code:83b4/05/01 + cheat + description:Start with 10 lives + code:83b4/05/0a + cheat + description:Start with 20 lives + code:83b4/05/14 + +cartridge sha256:c6e275929764f7950ee85806ef5fdab9dda36e27f9f29935101bfc0916bf90a6 + name:Gyruss (USA) + cheat + description:Invincibility + code:a0de/a5/a9 + cheat + description:Infinite lives + code:908d/0a/00 + cheat + description:Never lose twin shots + code:9085/02/04+9087/01/81 + cheat + description:Gain 2 phasers when you die with none + code:9087/01/02 + cheat + description:Gain 4 phasers when you die with none + code:9087/01/04 + cheat + description:Start with 1 ship + code:832c/04/01 + cheat + description:Start with 10 ships + code:832c/04/0a + cheat + description:Start with 4 phasers + code:8648/01/04 + cheat + description:Start with 8 phasers + code:8648/01/08 + cheat + description:Start with twin shots + 1 phaser + code:8648/01/81 + cheat + description:Start with twin shots + 4 phasers + code:8648/01/84 + cheat + description:Start with twin shots + 8 phasers + code:8648/01/88 + +cartridge sha256:bd5c7925e616da879ee63ac4ac2004af26e20ae36a494247e704d41440ac971a + name:Hammerin' Harry (Europe) + cheat + description:Infinite energy (except spikes) + code:bcb3/8d/ad + cheat + description:Infinite lives + code:a944/ce/ad + cheat + description:Invincibility + code:f6d9/f0/d0+f6d6/ad/8d + +cartridge sha256:6e2b0e222eb8dba29c0ca363f1d7d59ed1fa307bafc150b5c8e1dd13638555a6 + name:Happy Pairs (Asia) (PAL) (Unl) + cheat + description:Infinite tries + code:b04a/c6/a5 + cheat + description:Infinite time + code:beaf/c6/a5 + cheat + description:Infinite autos + code:b175/c6/a5 + +cartridge sha256:07bfd5bf6d3e5cea26d0a521e7d599d67a4b794c5efa66e4189877c1361aad47 + name:Harlem Globetrotters (USA) + cheat + description:Slower timer + code:c935/2d/55 + cheat + description:Faster timer + code:c935/2d/1c + cheat + description:Slower shot clock + code:c964/2d/55 + cheat + description:Faster shot clock + code:c964/2d/1c + +cartridge sha256:fd3c19b0339bf2b326d8a0526216b5143f035f68dabb3b3392689c92d6c140d9 + name:Heavy Barrel (USA) + cheat + description:Invincibility + code:bbe8/09/60 + cheat + description:Invincibility and invisibility on second life + code:e81e/ca/ea + cheat + description:Infinite lives + code:ee12/c6/a5 + cheat + description:Infinite Bombs + code:ebee/d6/a5 + cheat + description:Infinite Keys + code:b5ca/95/b5 + cheat + description:Infinite Mace + code:b7fe/69/a9 + cheat + description:Infinite hand weapons on pick-up - both players + code:ebec/d0/f0 + cheat + description:Infinite hand weapons and firearms on pick-up - both players + code:ebee/d6/a9 + cheat + description:Hand weapons last 4x longer + code:ebca/55/00 + cheat + description:Only 1 hand weapon + code:e918/00/02 + cheat + description:Autofire - P1 + code:e6d1/fd/f8 + cheat + description:Autofire - P2 + code:e77d/fd/f8 + cheat + description:Enemies don't fire handguns + code:a8c6/ca/ea + +cartridge sha256:0a23312c8e07b9af753b25c1307f07f8061d6ac4f8427f4660382d925e7a84e2 + name:Heavy Shreddin' (USA) + cheat + description:Infinite penalties + code:95df/c6/a5+9391/c6/a5+93ba/c6/a5 + cheat + description:Select any level + code:83bf/00/ff + cheat + description:Slow timer + code:ae8f/18/38 + cheat + description:Faster left and right movement + code:8bdc/01/02+8bec/01/02 + cheat + description:1 penalty + code:83c1/04/01 + cheat + description:8 penalties + code:83c1/04/08 + cheat + description:16 penalties + code:83c1/04/10 + +cartridge sha256:429c833eb61c0728b0d9335c61f4bd8d3fb19c3bf8a18564917bf75526f104af + name:Heisei Tensai Bakabon (Japan) + cheat + description:Invincibility + code:c5c3/f0/d0 + cheat + description:Infinite health + code:c117/c6/c5 + cheat + description:Infinite time + code:8ac9/85/a5 + +cartridge sha256:1c8e9b6c4c57850d4ab1dea011e0226970034a46fa29fab1d370c01fac90538d + name:Hell Fighter (Asia) (PAL) (Unl) + cheat + description:Infinite lives + code:ad5f/ce/ad+ad62/ce/ad + +cartridge sha256:680a56e038176c7b8deca9fb910b26b097cadd58fa553ea29f3c9836c9a4e11b + name:Hello Kitty no Ohanabatake (Japan) + cheat + description:Invincibility + code:d7db/8d/ad + cheat + description:Infinite lives + code:fc1f/9d/bd + +cartridge sha256:72fa562dfb319bfe982a68053128126e2ed5d579ff1a36f7345bd3fe624e8e92 + name:Heracles no Eikou - Toujin Makyou Den (Japan) + cheat + description:No random battles + code:e2de/20/60 + +cartridge sha256:8e4a04076b6a728a7e65a09737776dcb9defed7922bf0437d9a89bbe8c724b55 + name:Hogan's Alley (World) + cheat + description:Hit anywhere - Game B + code:d01d/f5/00+d429/80/00 + cheat + description:5 misses allowed - Game A + code:cd09/10/05 + cheat + description:20 misses allowed - Game A + code:cd09/10/20 + cheat + description:Infinite misses allowed - all games + code:ce10/01/00 + cheat + description:Each miss counts as 2 - all games + code:ce10/01/02 + cheat + description:Infinite misses allowed - all games (alt) + code:00b3/00 + +cartridge sha256:1c1ad2992f728c7fb6a8f3980b1a0f8e01e5b24a0c43c713300846d87be5987a + name:Holy Diver (Japan) + cheat + description:Invincibility + code:f8f7/8d/60 + cheat + description:Infinite health + code:f8f7/8d/ad + cheat + description:Infinite lives + code:e1ce/ce/ad + +cartridge sha256:3f761f529d40cf42aed60fabc0e60ecfecf528f4165948e6157b552e3bbb4f89 + name:Home Alone 2 - Lost in New York (USA) + cheat + description:Infinite power units/life points + code:fd75/ce/ad + cheat + description:Become almost invincible after losing 1 life point (against most enemies, vacuum cleaner can still kill you) + code:e65b/ce/ad + cheat + description:Infinite lives + code:fe04/ce/ad + cheat + description:Infinite slides on pick-up + code:841b/ce/ad + cheat + description:Infinite darts on pick-up + code:846e/ce/ad + cheat + description:Infinite flying fists on pick-up + code:8450/ce/ad + cheat + description:Every 4 cookies count as 8 + code:fcf6/04/08 + cheat + description:Every 4 cookies count as 12 + code:fcf6/04/0c + cheat + description:Every 4 cookies count as 16 + code:fcf6/04/10 + cheat + description:Every 4 cookies count as 20 (extra life point) + code:fcf6/04/14 + cheat + description:Extra life with 5 pizza slices instead of 6 + code:ec1b/06/05 + cheat + description:Extra life with 4 pizza slices + code:ec1b/06/04 + cheat + description:Extra life with 3 pizza slices + code:ec1b/06/03 + cheat + description:Extra life with 2 pizza slices + code:ec1b/06/02 + cheat + description:Extra life with every pizza slice + code:ec1b/06/01 + cheat + description:Start with 1 life instead of 3 + code:9385/03/01 + cheat + description:Start with 5 lives + code:9385/03/05 + cheat + description:Start with 7 lives + code:9385/03/07 + cheat + description:Start with 9 lives + code:9385/03/09 + cheat + description:Start with 25 lives + code:9385/03/19 + cheat + description:Start with 50 lives + code:9385/03/32 + cheat + description:Start with 75 lives + code:9385/03/4b + cheat + description:Start with 99 lives + code:9385/03/63 + +cartridge sha256:f3ff0c50c05aa5d461c293e306e553152e63564cd09e80ae0b6dcfa97b07d073 + name:Hook (USA) + cheat + description:Infinite health - P1 + code:dd64/e5/24 + cheat + description:Infinite health - P2 + code:dd7f/e5/24 + cheat + description:Infinite lives - P1 + code:f01d/ce/ad + cheat + description:Max health from food - P1 + code:ddf1/05/00 + cheat + description:Max health from food - P2 + code:de07/05/00 + cheat + description:No health from food + code:dde2/2c/60 + cheat + description:Start with 1 life + code:eeaf/02/00 + cheat + description:Start with 6 lives + code:eeaf/02/05 + cheat + description:Start with 9 lives + code:eeaf/02/08 + cheat + description:Infinite health - P1 (alt) + code:0365/6f + cheat + description:Infinite lives - P1 (alt) + code:0367/09 + cheat + description:Max Green Balls + code:0363/63 + cheat + description:Infinite Cakes + code:0487/63 + cheat + description:Max Green Thimbles + code:0364/63 + +cartridge sha256:3991a761116131dc412fd7cfe8e70bf414d11fa4778e9dfb049ffcc9a8586cac + name:Hudson Hawk (USA) + cheat + description:Infinite health + code:e784/85/a5 + cheat + description:Infinite lives + code:c75f/c3/a9+c762/f0/a9 + cheat + description:Infinite continues + code:c848/30/a9+c846/c6/a9 + cheat + description:Start with very little health - first life only + code:c6ea/ff/01 + cheat + description:Start with 1/4 health - first life only + code:c6ea/ff/40 + cheat + description:Start with 1/2 health - first life only + code:c6ea/ff/70 + cheat + description:Start with 3/4 health - first life only + code:c6ea/ff/b0 + cheat + description:Start with 1 continue + code:c6d9/03/01 + cheat + description:Start with 5 continues + code:c6d9/03/05 + cheat + description:Start with 9 continues + code:c6d9/03/09 + cheat + description:Start with 1 life + code:c6e6/05/01 + cheat + description:Start with 3 lives + code:c6e6/05/03 + cheat + description:Start with 9 lives + code:c6e6/05/09 + +cartridge sha256:53bfc94fce46a25188f84f102810406f686a7fb13fb5e4ae8f13760106acb969 + name:Hudson's Adventure Island (USA) + cheat + description:Invincibility + code:c05a/a4/60 + cheat + description:Infinite health + code:c0cd/c6/a5 + cheat + description:Immune to rocks + code:c0f3/84/24 + cheat + description:Keep weapons + code:8128/85/24 + cheat + description:Hit anywhere + code:c146/dc/00+c14f/07/00+c152/99/b9 + cheat + description:Multi-jump + code:84e4/d0/24+84e9/d0/24 + cheat + description:Get fruits from anywhere + code:8b39/b0/d0 + cheat + description:Collectable items never disappear + code:8b40/de/60 + cheat + description:Can mega-jump while at rest + code:850d/c0/95 + cheat + description:Can mega-jump while running + code:850e/a9/95 + cheat + description:Multi-mega-maxi-moon jumps + code:8507/01/00+84ea/21/00 + cheat + description:Skateboard doesn't automatically move forward + code:8555/d0/30 + cheat + description:Hudson can moonwalk + code:85c1/01/00+858a/00/01 + cheat + description:Start with infinite lives + code:811c/c6/a5 + cheat + description:Start with 1 life + code:8089/03/01 + cheat + description:Start with 6 lives + code:8089/03/06 + cheat + description:Start with 9 lives + code:8089/03/09 + +cartridge sha256:bafe68d5e6bbebb0d71432d09bed0a482215d4534778a76d471150a3bdd01b08 + name:Hunt for Red October, The (USA) (Rev A) + cheat + description:Infinite lives + code:aa82/c6/a5 + cheat + description:Infinite time + code:b389/ce/ad + cheat + description:Infinite horizontal torpedoes + code:a5bf/ce/ad + cheat + description:Infinite vertical torpedoes + code:a631/ce/ad + cheat + description:Maximum power horizontal torpedoes on pick-up + code:bc08/c9/a9+bc0e/01/00 + cheat + description:Maximum power vertical torpedoes on pick-up + code:bc57/c9/a9+bc5d/01/00 + cheat + description:Start with 10 horizontal torpedoes + code:bc76/19/0a + cheat + description:Start with 50 horizontal torpedoes + code:bc76/19/32 + cheat + description:Start with 99 horizontal torpedoes + code:bc76/19/63 + cheat + description:Start with 5 vertical torpedoes + code:bc7b/0f/05 + cheat + description:Start with 50 vertical torpedoes + code:bc7b/0f/32 + cheat + description:Start with 99 vertical torpedoes + code:bc7b/0f/63 + cheat + description:Start with 5 caterpillars + code:bc85/0a/05 + cheat + description:Start with 50 caterpillars + code:bc85/0a/32 + cheat + description:Start with 99 caterpillars + code:bc85/0a/63 + cheat + description:Start with 5 ECM's + code:bc8a/0a/05 + cheat + description:Start with 50 ECM's + code:bc8a/0a/32 + cheat + description:Start with 99 ECM's + code:bc8a/0a/63 + cheat + description:Start with 1 life + code:b0e7/05/01 + cheat + description:Start with 10 lives + code:b0e7/05/0a + +cartridge sha256:770abf58074764db12aade941ab1a389a818b8ff94d95f4b4b4913912b1f40b5 + name:Hydlide (USA) + cheat + description:Boost strength, life, magic + code:8640/0a/28 + cheat + description:Super boost strength, life, magic + code:8640/0a/64 + cheat + description:Don't take damage from most enemies + code:c7d7/85/a5 + cheat + description:Rapid healing + code:8ebc/0d/00 + cheat + description:Rapid magic healing + code:9a7e/02/00 + cheat + description:Infinite life + code:0038/64 + cheat + description:Max STR + code:0039/64 + cheat + description:Max EXP + code:003a/64 + cheat + description:Max Magic + code:003b/64 + cheat + description:Have the Sword + code:0059/ff + cheat + description:Have the Shield + code:005a/ff + cheat + description:Have the Lamp + code:005b/ff + cheat + description:Have the Cross + code:005c/ff + cheat + description:Have the Pot + code:005d/ff + cheat + description:Have the Medicine + code:005e/ff + cheat + description:Have the Key + code:005f/ff + cheat + description:Have the Ruby + code:0060/ff + cheat + description:Have the Ring + code:0061/ff + cheat + description:Have the Jewel + code:0062/ff + cheat + description:Have 3 Fairies + code:0063/ff+0064/ff+0065/ff + +cartridge sha256:002bb62441c1625051555109bce93ff2e2a2badb534a350b6d17ad0d7e7ef023 + name:Ice Climber (USA, Europe) + cheat + description:Invincibility + code:d348/20/60 + cheat + description:Infinite lives + code:d481/d6/c9 + cheat + description:Super-jump + code:c839/22/1c + cheat + description:Enemies bump you instead of killing you + code:d346/f0/b0 + cheat + description:Double speed + code:cbda/ff/fe+cbdb/01/02 + cheat + description:Triple speed + code:cbda/ff/fd+cbdb/01/03 + cheat + description:Start with 1 life + code:c4ae/03/00 + cheat + description:Start with 6 lives + code:c4ae/03/05 + cheat + description:Start with 9 lives + code:c4ae/03/08 + +cartridge sha256:3775c1184419c0786841c5b4f2694b2a15e181678f92e75fb9b71bfb5668c7b3 + name:Ikari Warriors (USA) (Rev A) + cheat + description:Invincibility + code:f3e0/4c/ad + cheat + description:Invincibility (except against bombs) + code:b7e2/f0/d0 + cheat + description:Invincibility (blinking) + code:e023/80/84 + cheat + description:Infinite lives + code:f6da/d6/a5 + cheat + description:Infinite Missiles for Tank + code:fbae/de/ad + cheat + description:Infinite Bullets + code:f51a/de/ad + cheat + description:Infinite Grenades + code:f582/de/ad + cheat + description:Enemies die automatically + code:b740/73/00+9117/1c/00+b9bd/b0/50+8698/90/24 + cheat + description:Hit anywhere (except tanks and helicopters) + code:b9a9/01/00+b9ab/13/3b+b9a8/29/c9 + cheat + description:Walk and shoot through walls + code:eb20/02/00 + cheat + description:Start with 1 life + code:f631/03/01 + cheat + description:Start with 6 lives + code:f631/03/06 + cheat + description:Start with 9 lives + code:f631/03/09 + cheat + description:Start with 50 Bullets + code:f2fb/63/32 + cheat + description:Start with 99 Grenades + code:f300/32/63 + cheat + description:Start with 25 Grenades + code:f300/32/19 + cheat + description:Infinite lives - P1 + code:00e4/09 + cheat + description:Infinite lives - P2 + code:00e5/09 + cheat + description:Infinite Bullets - P1 + code:067f/63 + cheat + description:Infinite Bullets - P2 + code:0682/63 + cheat + description:Infinite Grenades - P2 + code:0680/63 + cheat + description:Infinite Grenades - P1 + code:0681/63 + cheat + description:Infinite Fuel for tank - P1 + code:0683/ff + cheat + description:Infinite Fuel for tank - P2 + code:0684/ff + cheat + description:Have 3-Way Shot, B Grenades, Super Speed, Knife - P1 + code:0674/df + cheat + description:Have F Shot, Long Range, Rapid Fire, B Grenades, Super Speed, Knife - P1 + code:0674/ef + cheat + description:Have 3-Way Shot, B Grenades, Super Speed, Knife - P2 + code:0675/df + cheat + description:Have F Shot, Long Range, Rapid Fire, B Grenades, Super Speed, Knife - P2 + code:0675/ef + +cartridge sha256:294f70829b72f3d1b6c81be92b542e96fec1a243d16dfd338a4226b97ad09732 + name:Ikari Warriors (USA) + cheat + description:Invincibility + code:f3e0/4c/ad + cheat + description:Invincibility (except against bombs) + code:b7e2/f0/d0 + cheat + description:Invincibility (blinking) + code:e023/80/84 + cheat + description:Infinite lives + code:f6da/d6/a5 + cheat + description:Infinite Missiles for Tank + code:fbae/de/ad + cheat + description:Infinite Bullets + code:f51a/de/ad + cheat + description:Infinite Grenades + code:f582/de/ad + cheat + description:Enemies die automatically + code:b740/73/00+9117/1c/00+b9bd/b0/50+8698/90/24 + cheat + description:Hit anywhere (except tanks and helicopters) + code:b9a9/01/00+b9ab/13/3b+b9a8/29/c9 + cheat + description:Start with 1 life + code:f631/03/01 + cheat + description:Start with 6 lives + code:f631/03/06 + cheat + description:Start with 9 lives + code:f631/03/09 + cheat + description:Start with 50 Bullets + code:f2fb/63/32 + cheat + description:Start with 99 Grenades + code:f300/32/63 + cheat + description:Start with 25 Grenades + code:f300/32/19 + cheat + description:Infinite lives - P1 + code:00e4/09 + cheat + description:Infinite lives - P2 + code:00e5/09 + cheat + description:Infinite Bullets - P1 + code:067f/63 + cheat + description:Infinite Bullets - P2 + code:0682/63 + cheat + description:Infinite Grenades - P2 + code:0680/63 + cheat + description:Infinite Grenades - P1 + code:0681/63 + cheat + description:Infinite Fuel for tank - P1 + code:0683/ff + cheat + description:Infinite Fuel for tank - P2 + code:0684/ff + cheat + description:Have 3-Way Shot, B Grenades, Super Speed, Knife - P1 + code:0674/df + cheat + description:Have F Shot, Long Range, Rapid Fire, B Grenades, Super Speed, Knife - P1 + code:0674/ef + cheat + description:Have 3-Way Shot, B Grenades, Super Speed, Knife - P2 + code:0675/df + cheat + description:Have F Shot, Long Range, Rapid Fire, B Grenades, Super Speed, Knife - P2 + code:0675/ef + +cartridge sha256:119f865684be58f37101b431975c827b2ad9340c0f2d3d9fc3153ee1213ee55e + name:Ikari Warriors II - Victory Road (USA) + cheat + description:Infinite health + code:b39d/99/b9 + cheat + description:Don't take damage from most enemies + code:b397/e5/24 + cheat + description:Start with half normal health + code:f7f5/60/30 + cheat + description:Maximum weapon power on pick-up + code:a83e/69/a9+a83f/01/04 + cheat + description:Infinite health (alt) + code:06d1/32 + cheat + description:Infinite hearts + code:00f8/80 + cheat + description:Have Machine Gun + code:06c3/04 + cheat + description:Start with and keep Arrow + code:00f2/01 + cheat + description:Start with and keep Bazooka + code:06c5/04 + cheat + description:Start with and keep Boomerang + code:06c7/04 + cheat + description:Start with and keep Earthquake + code:00ec/01 + cheat + description:Start with and keep Elixir + code:00f6/01 + cheat + description:Start with and keep Grenades + code:06cb/04 + cheat + description:Start with and keep Land Mines + code:06cd/04 + cheat + description:Start with and keep Lightning + code:00ea/01 + cheat + description:Start with and keep Shield + code:00f0/01 + cheat + description:Start with and keep Sword + code:06c9/04 + cheat + description:Start with and keep Time Stopper + code:00f4/01 + cheat + description:Start with and keep Wings + code:00ee/01 + +cartridge sha256:181163b590a581b6d04baaedb815429a2342ded27b3fb7f2514661d1fd47c1cc + name:Ikari III - The Rescue (USA) + cheat + description:Invincibility + code:ba43/20/ad + cheat + description:Infinite health + code:b85f/9d/bd + cheat + description:Infinite lives + code:cfb7/01/00 + cheat + description:Infinite lives (alt) + code:cfbc/9d/bd + cheat + description:Immune to most kicks and punches + code:b859/e5/24 + cheat + description:3-way firing, instead of punching + code:ccde/01/07 + cheat + description:Always throw grenades instead of punches + code:ccde/01/09 + cheat + description:1 life after continue + code:c3aa/03/01 + cheat + description:6 lives after continue + code:c3aa/03/06 + cheat + description:9 lives after continue + code:c3aa/03/09 + cheat + description:Start with 1 life + code:c89b/03/01 + cheat + description:Start with 6 lives + code:c89b/03/06 + cheat + description:Start with 9 lives + code:c89b/03/09 + +cartridge sha256:7032a94d140339f9d6603accc9fed2846f5bbb781659cdff869d4b5f137d4e4a + name:Image Fight (USA) + cheat + description:Invincibility + code:a4cf/d0/f0+9193/d0/f0 + cheat + description:Infinite lives - both players + code:a1d6/c6/a5 + cheat + description:Never lose Pods + code:b456/a9/60 + cheat + description:Start with V Cannon + code:b404/00/01 + cheat + description:Start with Reflecting Ball + code:b404/00/02 + cheat + description:Start with Drilling Laser + code:b404/00/03 + cheat + description:Start with Seeking Missile + code:b404/00/04 + cheat + description:Start with Seeking Laser + code:b404/00/05 + cheat + description:Start with 1 life - both players + code:a16b/03/01 + cheat + description:Start with 6 lives - both players + code:a16b/03/06 + cheat + description:Start with 9 lives - both players + code:a16b/03/09 + cheat + description:Start at Combat Simulation Stage 2 + code:a163/00/01 + cheat + description:Start at Combat Simulation Stage 3 + code:a163/00/02 + cheat + description:Start at Combat Simulation Stage 4 + code:a163/00/03 + cheat + description:Start at Combat Simulation Stage 5 + code:a163/00/04 + cheat + description:Start at Real Combat - 1st Target + code:a163/00/05 + cheat + description:Start at Real Combat - 2nd Target + code:a163/00/06 + +cartridge sha256:8bc6a252778c2909a97b3fff185c5ff2a1786afe5e8237098f15fe3eaf23adab + name:Immortal, The (USA) + cheat + description:Enemy's fatigue level doesn't go down + code:b215/ce/2c + cheat + description:Your fatigue level doesn't go down + code:b21d/ce/2c + cheat + description:Your fatigue level goes down faster + code:b20d/7f/3f + cheat + description:Your fatigue level goes down slower + code:b20d/7f/ff + cheat + description:Don't lose energy from fighting + code:b256/ce/ad + cheat + description:Your fatigue level never rises + code:b271/ee/ad + cheat + description:More damage from fireballs + code:d74d/01/02 + cheat + description:Instant kills on enemies + code:0362/00 + cheat + description:Infinite health in battle sequences + code:0363/0f + cheat + description:Infinite Gold + code:042c/ff + +cartridge sha256:c42fc592821b474b486ae32d1d63e8938f1735a6d45db026f7b78b2ec51427ac + name:Incredible Crash Dummies, The (USA) + cheat + description:Invincibility + code:a73f/f0/d0 + cheat + description:Infinite health + code:c764/8c/ac + cheat + description:Infinite lives + code:c778/8c/ac + cheat + description:Invincibility (blinking) + code:053c/01 + +cartridge sha256:79c03fec3f459ac6e762c27d8f08debe6589b01df21919ef69645870a16723b3 + name:Indiana Jones and the Last Crusade (USA) (UBI Soft) + cheat + description:Infinite health (you can get trapped in certain areas) + code:fa1c/04/fe + cheat + description:Infinite time + code:968f/01/00 + cheat + description:Infinite credits + code:a0ad/ce/ad + cheat + description:Infinite lives + code:ec50/04/fc + cheat + description:Infinite lives on bike section + code:8d38/c6/a5 + cheat + description:More lives on ship section + code:8764/05/09 + cheat + description:Fewer lives on ship section + code:8764/05/01 + cheat + description:More lives on tank section + code:9505/06/09 + cheat + description:Fewer lives on tank section + code:9505/06/01 + cheat + description:More lives on castle section + code:90a6/03/09 + cheat + description:Fewer lives on castle section + code:90a6/03/01 + cheat + description:Heart does nothing (may goof up energy bar) + code:9bc2/01/00 + cheat + description:Super-jump + code:e864/01/05 + cheat + description:Mega-jump + code:e864/01/09 + cheat + description:Continue with 1 life + code:a0b1/03/01 + cheat + description:Continue with 5 lives + code:a0b1/03/05 + cheat + description:Continue with 7 lives + code:a0b1/03/07 + cheat + description:Continue with 9 lives + code:a0b1/03/09 + cheat + description:Start with 1 life + code:c06c/03/01 + cheat + description:Start with 5 lives + code:c06c/03/05 + cheat + description:Start with 7 lives + code:c06c/03/07 + cheat + description:Start with 9 lives + code:c06c/03/09 + cheat + description:Start on level 2 (after completing the level you'll go back to level 1) + code:c071/00/01 + cheat + description:Start on level 3 (after completing the level you'll go back to level 1) + code:c071/00/02 + cheat + description:Start on level 4 (after completing the level you'll go back to level 1) + code:c071/00/03 + cheat + description:Start on level 5 (after completing the level you'll go back to level 1) + code:c071/00/04 + cheat + description:Start on level 6 (after completing the level you'll go back to level 1) + code:c071/00/05 + +cartridge sha256:5348f7f88695867de428b38eb6a7f724f5f97110c383567d7e4d1f5a2d8b612f + name:Indiana Jones and the Last Crusade (USA) (Taito) + cheat + description:Infinite health + code:911b/0d/8d + +cartridge sha256:884765e5df86042211191f7e7e4653255425e3da70a9dec6f4a9336c07b5f258 + name:Indiana Jones and the Temple of Doom (USA) (Rev A) + cheat + description:Infinite lives + code:ac09/ce/ad + cheat + description:Infinite time + code:a020/ce/ad + cheat + description:Always keep Sword + code:a354/ce/ad + cheat + description:Always keep Gun + code:a63a/ce/ad + cheat + description:Start with less time + code:bc4a/63/3c+ab8b/3c/63+ac1e/3c/63 + cheat + description:Start with 1 life + code:bbc3/04/00 + cheat + description:Start with 10 lives + code:bbc3/04/09 + cheat + description:Start with 15 lives + code:bbc3/04/0e + cheat + description:Start on level 2 + code:bc40/0f/11 + cheat + description:Start on level 4 + code:bc40/0f/15 + cheat + description:Start on level 6 + code:bc40/0f/19 + cheat + description:Start on level 8 + code:bc40/0f/1d + cheat + description:0 Maps left + code:012f/00 + cheat + description:Have all 3 Keys + code:011d/b0 + +cartridge sha256:8125d69b66dd7784246156bb669542924f1c2b7f53b8d325ffcbaa74746d14ff + name:Indiana Jones and the Temple of Doom (USA) + cheat + description:Infinite lives + code:ac09/ce/ad + cheat + description:Infinite time + code:a020/ce/ad + cheat + description:Always keep Sword + code:a354/ce/ad + cheat + description:Always keep Gun + code:a63a/ce/ad + cheat + description:Start with less time + code:bc4a/63/3c+ab8b/3c/63+ac1e/3c/63 + cheat + description:Start with 1 life + code:bbc3/04/00 + cheat + description:Start with 10 lives + code:bbc3/04/09 + cheat + description:Start with 15 lives + code:bbc3/04/0e + cheat + description:Start on level 2 + code:bc40/0f/11 + cheat + description:Start on level 4 + code:bc40/0f/15 + cheat + description:Start on level 6 + code:bc40/0f/19 + cheat + description:Start on level 8 + code:bc40/0f/1d + cheat + description:0 Maps left + code:012f/00 + cheat + description:Have all 3 Keys + code:011d/b0 + +cartridge sha256:0bb401bbd0cae2758b2bd355cd3cac3cc26a01950859c830b3b122bd379f2463 + name:Infiltrator (USA) + cheat + description:Infinite time + code:b445/ce/ad + cheat + description:Never lose Grenades outside buildings + code:adca/c6/a5 + cheat + description:Never lose Grenades inside buildings + code:c568/c6/a5 + cheat + description:Never lose Spray outside buildings + code:adbc/c6/a5 + cheat + description:Never lose Spray inside buildings + code:c53f/c6/a5 + cheat + description:Start with less time + code:b21b/39/35 + cheat + description:Start with more Grenades + code:b251/0a/12 + cheat + description:Start with fewer Grenades + code:b251/0a/05 + cheat + description:Start with no Grenades + code:b251/0a/00 + cheat + description:Start with less Spray + code:b24d/26/13 + cheat + description:Start with no Spray + code:b24d/26/00 + +cartridge sha256:0f406a7c853b919ed880868420808b945855146db9817ebc3102f08da13fa703 + name:Insector X (Japan) + cheat + description:Invincibility + code:00ca/00 + cheat + description:Infinite lives + code:00d8/03 + cheat + description:Max shot power-up + code:00cc/06 + +cartridge sha256:6fac8ea87f7eea5e9bf7b838ff92c2fa3369908c866631340ec489beacdcbf3b + name:Iron Tank - The Invasion of Normandy (USA) + cheat + description:Infinite health + code:e83c/9d/bd + cheat + description:Infinite lives + code:c515/01/d1+c4be/ce/ad + cheat + description:Start with 1 life + code:c515/01/d1+c43c/02/00 + cheat + description:Start with 6 lives + code:c515/01/d1+c43c/02/05 + cheat + description:Start with 9 lives + code:c515/01/d1+c43c/02/08 + cheat + description:Infinite health (alt) + code:0306/ff + cheat + description:Infinite lives (alt) + code:01d1/09 + +cartridge sha256:aab5e0ecc46e575b1b396bd63d8fa4f3bd740061f3157a1d4afdf9f7f2dabd88 + name:IronSword - Wizards & Warriors II (USA) + cheat + description:Infinite lives + code:88a7/c6/a9 + cheat + description:Infinite continues + code:8932/c6/a9 + cheat + description:Infinite spells + code:dcaf/de/2c + cheat + description:Infinite money + code:dc98/00/02 + cheat + description:Infinite keys once one is obtained + code:959e/a5/85 + cheat + description:Super-jump + code:d334/e5/e9+d335/86/09 + cheat + description:Food gives full health + code:9888/02/00 + cheat + description:Drink gives full health + code:9917/02/00 + cheat + description:Fleet foot jumping + code:d157/03/00 + cheat + description:Fleet foot running + code:d3cf/29/a9 + cheat + description:Start with Axe and Helmet + code:8aea/00/03 + cheat + description:Start with Shield + code:8ae6/ff/02 + cheat + description:Start with Ironsword + code:8314/0c/00 + cheat + description:Start on wind level + code:8289/00/0b + cheat + description:Start on tree level + code:8289/00/14 + cheat + description:Start on water level + code:8289/00/16 + cheat + description:Start on outer fire level + code:8289/00/15 + cheat + description:Start on lower earth level + code:8289/00/33 + cheat + description:Start on lower icefire mountain + code:8289/00/31 + cheat + description:Start a new game with full magic + code:8b06/00/ff + cheat + description:Start with 1 life + code:8af0/03/01+89da/03/01 + cheat + description:Start with 6 lives + code:8af0/03/06+89da/03/06 + cheat + description:Infinite health (disable at end of stage) + code:006a/ff + cheat + description:Infinite magic once obtained (disable at end of stage) + code:006b/ff + cheat + description:Infinite Keys + code:006c/08 + cheat + description:Infinite money (alt) + code:0096/0a+008b/64 + cheat + description:Have the Sindarin Treasures + code:00f7/0f + cheat + description:Have the Dagger + code:0067/00 + cheat + description:Have the Sword + code:0067/01 + cheat + description:Have the Long Sword + code:0067/02 + cheat + description:Have the Axe + code:0067/03 + cheat + description:Have the Large Sword + code:0067/04 + cheat + description:Have the Ironsword + code:0067/05 + cheat + description:Have the Diamond Sword + code:0067/06 + cheat + description:Have the Helmet + code:0068/01 + cheat + description:Have the Horned Helmet + code:0068/02 + cheat + description:Have the Diamond Helmet + code:0068/03 + cheat + description:Have the Large Shield + code:0069/01 + cheat + description:Have the Diamond Shield + code:0069/02 + +cartridge sha256:81311ff2507c6522172b203534f91f99749f465c8b765ac584f0e851a8bf96b2 + name:Isolated Warrior (USA) + cheat + description:Invincibility + code:9a94/30/a9+9a96/a5/85+e7c0/a2/e3 + cheat + description:Infinite health + code:d46c/26/ea + cheat + description:Infinite lives + code:e039/c6/a5 + cheat + description:Infinite Bombs + code:9d2a/ce/ad + cheat + description:More health restored on pick-up + code:8790/02/06 + cheat + description:Less health restored on pick-up + code:8790/02/01 + cheat + description:Start with maximum health and Bombs + code:e25e/09/00 + cheat + description:Start with 1 life + code:e225/03/01 + cheat + description:Start with 6 lives + code:e225/03/06 + cheat + description:Start with 9 lives + code:e225/03/09 + cheat + description:Start on Scene 2 + code:807c/00/01+807f/8d/8e+8082/8d/8e + cheat + description:Start on Scene 3 + code:807c/00/02+807f/8d/8e+8082/8d/8e + cheat + description:Start on Scene 4 + code:807c/00/03+807f/8d/8e+8082/8d/8e + cheat + description:Start on Scene 5 + code:807c/00/04+807f/8d/8e+8082/8d/8e + cheat + description:Start on Scene 6 + code:807c/00/05+807f/8d/8e+8082/8d/8e + cheat + description:Invincibility (alt) + code:00e3/00 + cheat + description:Full Power Gun #1 + code:00a4/0c + cheat + description:Full Power Gun #2 + code:00a5/0c + cheat + description:Full Power Bombs + code:06a8/04 + cheat + description:Full speed + code:00da/04 + +cartridge sha256:acc3b89bcbe3ccc2ee29d0b2eb3fb9cec143236f48d88680b462c3dfab0784bf + name:Ivan 'Ironman' Stewart's Super Off Road (USA) + cheat + description:Infinite money + code:e434/b1/4c+e435/60/4c+e436/38/e4 + cheat + description:Infinite nitro boosts + code:d9c5/01/00 + cheat + description:Lots of money and full equipment + code:e4c7/00/06 + cheat + description:Computer starts with no nitro boosts + code:803d/19/00 + cheat + description:Computer starts with double nitro boosts + code:803d/19/32 + cheat + description:Start with double nitro boosts + code:e50a/19/32 + cheat + description:Start with 1 life + code:e4f7/03/01 + cheat + description:Infinite lives - P1 + code:075d/03 + cheat + description:Infinite money - P1 + code:0305/09+0306/09+0307/09+0308/09 + cheat + description:Infinite nitro boosts - P1 + code:0310/63 + +cartridge sha256:6928e8c589d6d9cc199a7b0841877531ef53dce479e36f90ec1d9cdcbf54372d + name:Jackal (USA) + cheat + description:Invincibility - both players + code:e5ba/d0/50 + cheat + description:Infinite lives - both players + code:ed15/a5 + cheat + description:Keep weapons after death + code:eca5/24 + cheat + description:Full weapons after death + code:eca4/03 + cheat + description:Start with 1 life - both players + code:ca1a/01 + cheat + description:Start with 9 lives - both players + code:ca1a/09 + cheat + description:Invincibility - P1 + code:0053/01 + cheat + description:Invincibility - P2 + code:0531/01 + cheat + description:Infinite lives + code:0031/09 + cheat + description:Max Score + code:07e4/99+07e5/99+07e6/99 + cheat + description:Start on level 2 + code:0030/01 + cheat + description:Start on level 3 + code:0030/02 + cheat + description:Start on level 4 + code:0030/03 + cheat + description:Start on level 5 + code:0030/04 + cheat + description:Start on level 6 + code:0030/05 + +cartridge sha256:628d6696c7ac84c3ae5ab86d04b28b2fd1742076ca9478fdd5708e3bbb9f13c1 + name:Jackie Chan's Action Kung Fu (USA) + cheat + description:Invincibility + code:dbd7/f0/d0 + cheat + description:Infinite health + code:ca82/8d/ae + cheat + description:Infinite special attacks + code:cad8/ce/ad + cheat + description:Take less damage + code:dc78/69 + cheat + description:Hit anywhere + code:82c8/c5/4c+82c9/09/e1+82ca/90/82 + cheat + description:Multi-jump + code:e596/04/00 + cheat + description:9 Tornado Attacks on pick-up + code:dfd4/07/09 + cheat + description:9 360o Spin Kicks on pick-up + code:dfd6/07/09 + cheat + description:9 Sky Attacks on pick-up + code:dfd7/07/09 + cheat + description:0 Tornado Attacks on pick-up + code:dfd4/07/00 + cheat + description:0 180o Spin Kicks on pick-up + code:dfd5/09/00 + cheat + description:0 360o Spin Kicks on pick-up + code:dfd6/07/00 + cheat + description:0 Sky Attacks on pick-up + code:dfd7/07/00 + cheat + description:Max health from Energy Bowl + code:ca62/02/06 + cheat + description:Less health from Energy Bowl + code:ca62/02/01 + cheat + description:Infinite health (alt) + code:0702/07 + cheat + description:Infinite first special move + code:0703/05 + cheat + description:Infinite second special move + code:0705/09 + cheat + description:One hit kills on bosses + code:0039/00 + +cartridge sha256:e0d4463066d9985d51f80f8a51b1b9c5945e481ef19df48056d7648337d59095 + name:James Bond Jr (USA) + cheat + description:Invincibility + code:b177/f0/d0+b17f/d0/f0 + cheat + description:Infinite health + code:f570/9d/ad + cheat + description:Infinite weapons (Bombs, Flares, Nukes, Bullets) + code:fb7d/01/00 + cheat + description:Immune to most damage + code:f561/e5/24 + cheat + description:Infinite lives + code:c98d/ce/ad + cheat + description:Slow down rate of air loss (scuba mode) + code:9fd8/1f/3f + cheat + description:Speed up rate of air loss + code:9fd8/1f/0f + cheat + description:Shield doesn't take damage from bullets + code:f532/e5/24 + cheat + description:Start with some weapons + code:e090/8a/ea + cheat + description:Start with 2 lives + code:e076/06/01 + cheat + description:Start with 15 lives + code:e076/06/0e + cheat + description:Infinite Pistol ammo + code:040f/63 + cheat + description:Infinite lives + code:042c/09 + cheat + description:Infinite time (minute ten's digit) + code:01f9/09 + cheat + description:Infinite time (minute one's digit) + code:01fa/09 + cheat + description:Infinite time (second ten's digit) + code:01fb/09 + cheat + description:Infinite time (second one's digit) + code:01fc/09 + +cartridge sha256:8db2cb94dc9caec681b13b66f26590e88229245fa592e5292d097e8599ee79e0 + name:Jaws (USA) + cheat + description:Infinite lives + code:8556/ce/ad + cheat + description:Infinite shells + code:876f/8d/ad + cheat + description:Jaws has no health + code:85c9/14/00+82dc/14/00+854d/8d/ad + cheat + description:Hit anywhere + code:9918/15/00 + cheat + description:Hit anywhere - bonus stages + code:d3a3/90/50+d3c6/b0/24+d3c2/d0/24 + cheat + description:Don't lose shells on dying + code:855b/4e/ad + cheat + description:Don't lose power on dying + code:855e/ce/ad + cheat + description:Collect Crabs from anywhere + code:a5fb/1e/00 + cheat + description:Collect Shells from anywhere + code:a671/26/00 + cheat + description:Collect Stars from anywhere + code:a6e6/2a/00 + cheat + description:99 Shells on pick-up + code:a685/05/00 + cheat + description:Start with 1 life + code:8294/03/01 + cheat + description:Start with double lives + code:8294/03/06 + cheat + description:Invincibility (disable to collect items) + code:9966/07 + cheat + description:Infinite lives (alt) + code:0387/09 + cheat + description:Infinite Strobes + code:0393/09 + cheat + description:Exit stage when hit instead of dying + code:8515/3a + cheat + description:Jaws has very little health + code:0389/00 + cheat + description:Jaws is attacked without actually shooting him + code:993d/10 + +cartridge sha256:c9a3c9873a859fcbb5b7442b3decfdcab3a1457e028ae444b050a377fc92afa2 + name:Jetsons, The - Cogswell's Caper (USA) + cheat + description:Infinite lives + code:be52/ce/ad + cheat + description:Infinite hearts + code:830b/ce/ad + cheat + description:Better start (more lives and hearts) + code:9581/03/05 + cheat + description:Don't lose extra hearts on dying + code:bee0/ce/2c + cheat + description:2 power packs on pick-up + code:83ea/01/02 + cheat + description:5 power packs on pick-up + code:83ea/01/05 + cheat + description:Small hearts gives full health + code:8445/06/00 + cheat + description:Defenses don't use up powerpacks + code:88bf/8d/2c + cheat + description:Shield uses fewer powerpacks + code:8834/20/05 + cheat + description:Flashlight uses fewer powerpacks + code:87fd/10/02 + cheat + description:Start with 30 powerpacks + code:958c/10/30 + cheat + description:Start with 50 powerpacks + code:958c/10/50 + cheat + description:Invincibility + code:0126/00 + cheat + description:Invincibility (blinking) + code:0127/02 + cheat + description:Infinite health + code:0141/03 + cheat + description:Infinite lives + code:0142/0a + +cartridge sha256:69cf1773c23606cdbd8b5e556f39c7c317100914779115a8c5c8b5dbf3fe0fcc + name:Jimmy Connors Tennis (USA) + cheat + description:Only need 15 points to win game + code:e1e5/03/00 + cheat + description:Only need 30 points to win game + code:e1e5/03/01 + cheat + description:Only need 40 points to win game + code:e1e5/03/02 + cheat + description:Only need 1 game to win set instead of 6 + code:e288/06/00 + cheat + description:Only need 2 games to win set + code:e288/06/01 + cheat + description:Only need 3 games to win set + code:e288/06/02 + cheat + description:Only need 4 games to win set + code:e288/06/04 + cheat + description:Only need 5 games to win set + code:e288/06/05 + cheat + description:Must get 2 points after 40 to win and no deuces (always shows advantage after 40) + code:e1ed/d0/80 + cheat + description:Don't need to win by 2 to win tiebreaker + code:e1cc/02/01 + cheat + description:2 points needed to win tiebreaker instead of 7 + code:e1bd/07/02 + cheat + description:3 points needed to win tiebreaker + code:e1bd/07/03 + cheat + description:4 points needed to win tiebreaker + code:e1bd/07/04 + cheat + description:5 points needed to win tiebreaker + code:e1bd/07/05 + cheat + description:6 points needed to win tiebreaker + code:e1bd/07/06 + cheat + description:10 points needed to win tiebreaker + code:e1bd/07/0a + +cartridge sha256:509f04b745d11b8d83afb42f084179a6f2ebc87f647927432a647f0e7ee51bb5 + name:Joe & Mac (USA) + cheat + description:Invincibility + code:d6a2/f0/d0+d6ac/d0/f0 + cheat + description:Infinite health + code:ec49/ce/ad + cheat + description:Infinite lives - both players + code:a07e/ce/ad + cheat + description:Protection from most enemy hits + code:ec49/ce/ad + cheat + description:Protection from water + code:e6bf/ce/ad + cheat + description:Stone axe and flint do more damage to bosses + code:b848/01/08 + cheat + description:Stone axe and flint do a lot more damage to bosses + code:b848/01/0f + cheat + description:Stone wheel and boomerang do more damage to bosses + code:b851/02/08 + cheat + description:Stone wheel and boomerang do a lot more damage to bosses + code:b851/02/10 + cheat + description:Fire does more damage to bosses + code:b856/04/10 + cheat + description:Fire does a lot more damage to bosses + code:b856/04/20 + cheat + description:Apple and hamburger worth nothing + code:eb64/8d/ad + cheat + description:Apple and hamburger restore health to 1/2 + code:eb63/10/08 + cheat + description:Start with 1/2 health (die when bar is 1/2 empty) + code:a3a4/10/08 + cheat + description:Start with stone wheel instead of stone axe - P1 + code:a0ba/e0/e1 + cheat + description:Start with flint instead of stone axe - P1 + code:a0ba/e0/e2 + cheat + description:Start with fire instead of stone axe - P1 + code:a0ba/e0/e3 + cheat + description:Start with boomerang instead of stone axe - P1 + code:a0ba/e0/e4 + cheat + description:Start with 1 life instead of 3 - P1 + code:a0bf/03/01 + cheat + description:Start with 5 lives - P1 + code:a0bf/03/05 + cheat + description:Start with 7 lives - P1 + code:a0bf/03/07 + cheat + description:Start with 9 lives - P1 + code:a0bf/03/09 + cheat + description:Start somewhere in level 2 + code:a0c4/00/02 + cheat + description:Infinite health (alt) + code:0499/0f + cheat + description:One hit kills on bosses + code:064d/00 + +cartridge sha256:ec54ed32302aaeb2fa6e0d7e2ca3ea2d8df888e77859e158298ecb2fa322178e + name:Joshua & the Battle of Jericho (USA) (v6.0) (Unl) + cheat + description:Exit always open + code:075f/05+003f/ff + cheat + description:Infinite Bombs + code:003e/01 + cheat + description:Immune to explosions (disable at end of level) + code:004b/c2 + +cartridge sha256:5b7afe0ff1fcf538fec60d085aa759522a2ab1cce511a6f210b672a256a87a8a + name:Joshua & the Battle of Jericho (USA) (v5.0) (Unl) + cheat + description:Exit always open + code:075f/05+003f/ff + cheat + description:Infinite Bombs + code:003e/01 + cheat + description:Immune to explosions (disable at end of level) + code:004b/c2 + +cartridge sha256:0417d7caec593852823b94f5520caea3745a28c9dac68e30d2c5e6f5545a9757 + name:Journey to Silius (USA) + cheat + description:Invincibility + code:e825/20/ad+e8b4/20/ad + cheat + description:Invincibility after first hit (blinking) + code:8011/c6/a5 + cheat + description:Infinite health + code:ea3b/85/a5 + cheat + description:Infinite weapon power + code:8e33/85/a5 + cheat + description:Infinite lives + code:c3f7/c6/a5 + cheat + description:Protection against most aliens + code:ea39/e5/e9 + cheat + description:Hit anywhere + code:ad58/b0/a9+e761/b0/a9+e782/9d/ad+ad70/9d/ad + cheat + description:Multi-jump + code:818d/04/00+81c9/cc/ac + cheat + description:Some aliens are tougher + code:e824/02/08 + cheat + description:Some aliens are weaker + code:e824/02/01 + cheat + description:Mega-jump + code:819e/0b/16 + cheat + description:Speed jump + code:8163/01/20+80ff/ff/e0 + cheat + description:Super speed + code:815f/04/13+80fb/fc/ec + cheat + description:1 life after continue + code:dbe3/03/01 + cheat + description:6 lives after continue + code:dbe3/03/06 + cheat + description:9 lives after continue + code:dbe3/03/09 + cheat + description:Start with all six weapons + code:dcc9/02/1f + cheat + description:Start with Machine Gun + code:dcc9/02/01 + cheat + description:Start with Laser Gun + code:dcc9/02/04 + cheat + description:Start with Homing Missiles + code:dcc9/02/08 + cheat + description:Start with Grenade Launcher + code:dcc9/02/10 + cheat + description:Start with Machine Gun and Laser Gun + code:dcc9/02/05 + cheat + description:Start with 1 life + code:de19/03/01 + cheat + description:Start with 6 lives + code:de19/03/06 + cheat + description:Start with 9 lives + code:de19/03/09 + cheat + description:Infinite health (alt) + code:00b0/0f + cheat + description:Infinite lives (alt) + code:0053/09 + cheat + description:Infinite weapon power (alt) + code:00b1/3f + cheat + description:Have Machine Gun + code:00b8/01 + cheat + description:Have Shot Gun + code:00b8/02 + cheat + description:Have Laser Gun + code:00b8/03 + cheat + description:Have Homing Missile + code:00b8/04 + cheat + description:Have Grenade Launcher + code:00b8/05 + cheat + description:One hit kills on bosses + code:040f/00+04ff/00 + cheat + description:Start on stage 2 + code:0170/01 + cheat + description:Start on stage 3 + code:0170/02 + cheat + description:Start on stage 4 + code:0170/03 + cheat + description:Start on stage 5 (final stage) + code:0170/04 + +cartridge sha256:4b00fa0ae20030af3406e95eb08f42ec473ec03d9063798ccd6c249648409af3 + name:Journey to the West (Asia) (Unl) + cheat + description:Hit anywhere + code:b445/4c/00+b42c/65/00 + cheat + description:Climb anywhere (except in boss fights) + code:a55c/29/a9+a552/60/ea + +cartridge sha256:8471a6b7c7c7d6c7be0ee278778e2d25dc91462db22643395787eaaeb6e320c1 + name:Joust (USA) + cheat + description:Infinite lives + code:caac/d6/a5 + cheat + description:Turbo flying + code:cc54/00/01 + cheat + description:Heavens above? + code:cae9/95/24 + cheat + description:Start with 1 life + code:c093/05/01 + cheat + description:Start with 9 lives + code:c093/05/0a + cheat + description:Start on last level reached + code:c0de/85/24+c0dc/85/24+c0e4/85/24 + +cartridge sha256:8d36c0923103f370eb9fab5caeb2a8307cd1c7a30030db69bd5bc4f5ca46b1d2 + name:Jovial Race (Asia) (PAL) (Unl) + cheat + description:Infinite lives + code:9c7b/ce/ad + cheat + description:Start with 5 lives + code:836a/03/05 + cheat + description:Start with 10 lives + code:836a/03/0a + cheat + description:Sart with 100 lives + code:836a/03/64 + +cartridge sha256:a7bf6adcd838f055405963741dd3368730b0f9dc125ae7071832a9305a4c7292 + name:Jovial Race (Unknown) (Unl) + cheat + description:Infinite lives + code:9c7b/ce/ad + cheat + description:Start with 5 lives + code:836a/03/05 + cheat + description:Start with 10 lives + code:836a/03/0a + cheat + description:Sart with 100 lives + code:836a/03/64 + +cartridge sha256:e5bcb8838f567f485c6f872e9695d2e3ef676f4bcda1c32d51d56008efb96e7a + name:Jungle Book, The (USA) + cheat + description:Infinite lives + code:8d69/8d/2c + cheat + description:Infinite time + code:8f68/01/00 + cheat + description:Infinite weapons + code:8df8/00/01 + cheat + description:Need 2 gems to finish levels 1, 3, 4, 7, 9 + code:cbcb/10/02+f4ab/b9/ad + cheat + description:Need 4 gems to finish levels 1, 3, 4, 7, 9 + code:cbcb/10/04+f4ab/b9/ad + cheat + description:Need 8 gems to finish levels 1, 3, 4, 7, 9 + code:cbcb/10/08+f4ab/b9/ad + cheat + description:Start practice level with 1 life + code:cc06/06/01 + cheat + description:Start practice level with 3 lives + code:cc06/06/03 + cheat + description:Start practice level with 9 lives + code:cc06/06/09 + cheat + description:Start normal level with 1 life + code:cc07/05/01 + cheat + description:Start normal level with 3 lives + code:cc07/05/03 + cheat + description:Start normal level with 9 lives + code:cc07/05/09 + cheat + description:Start with 5 of each weapon + code:f362/00/05 + cheat + description:Start with 10 of each weapon + code:f362/00/10 + cheat + description:Start with 20 of each weapon + code:f362/00/20 + cheat + description:Start with 30 of each weapon + code:f362/00/30 + cheat + description:Start with 90 of each weapon + code:f362/00/90 + +cartridge sha256:49fe0c49cd0a2841ae9c8ae5aa19f710d187ee6931a1e531d3bff19772ca4af0 + name:Jurassic Park (USA) + cheat + description:Invincibility + code:a833/f0/d0 + cheat + description:Infinite health + code:c162/8d/ad + cheat + description:Immune to most attacks + code:c162/8d/60 + cheat + description:Infinite lives (first two levels only) + code:b10b/ce/2c + cheat + description:Infinite ammo on pick-up + code:ac3a/de/2c + cheat + description:More bullets picked up from small dinosaurs + code:9460/02/09 + cheat + description:Fewer bullets picked up from small dinosaurs + code:9460/02/01 + cheat + description:3-ball bolas picked up (from small dinosaurs instead of normal bullets) + code:88a5/85/86+88b2/85/86 + cheat + description:Explosive multi-shots (from small dinosaurs instead of normal bullets) + code:88a5/85/87+88b2/85/87 + +cartridge sha256:f40341cf7e76480465ba8ab2d09e44644c3e3af7d647dc04c8b38357b26e014a + name:Just Breed (Japan) + cheat + description:No health - all enemies + code:69da/00+69db/00+69dc/00+69dd/00+69de/00+69df/00+69e0/00+69e1/00+69e2/00+69e3/00+69e4/00+69e5/00+69e6/00 + cheat + description:Lots of EXP after battle + code:6f6e/ff + cheat + description:Max EXP after battle + code:6f6e/ff+6f6f/ff + cheat + description:Max gold after battle + code:6f6c/ff+6f6d/ff + cheat + description:Max Health (Swordsman/Archer, Etc. 1) + code:69c4/ff + cheat + description:Max Magic (Swordsman/Archer, Etc. 1) + code:6a04/ff + cheat + description:Max Health (Swordsman/Archer, Etc. 2) + code:69c6/ff + cheat + description:Max Magic (Swordsman/Archer, Etc. 2) + code:6a06/ff + cheat + description:Max Health (Swordsman/Archer, Etc. 3) + code:69c5/ff + cheat + description:Max Magic (Swordsman/Archer, Etc. 3) + code:6a05/ff + cheat + description:Max Health (Swordsman/Archer, Etc. 4) + code:69c3/ff + cheat + description:Max Magic (Swordsman/Archer, Etc. 4) + code:6a03/ff + +cartridge sha256:2ae0a99b457a6d00ff0b241aa08f98d40c5c5ed45e634a7ed934b386bbd17a12 + name:Kabuki - Quantum Fighter (USA) + cheat + description:Invincibility + code:b1ba/a5/60+a0b4/f0/d0 + cheat + description:Infinite health + code:cf77/8d/ae + cheat + description:Infinite chip power + code:b088/bd/ad + cheat + description:Infinite lives + code:cf65/8d/ad + cheat + description:Don't lose a life from health loss + code:cf64/01/00 + cheat + description:Don't lose a life from timer + code:d058/01/00 + cheat + description:1 continue + code:bbfa/02/01 + cheat + description:6 continues + code:bbfa/02/05 + cheat + description:9 continues + code:bbfa/02/08 + cheat + description:Slower timer + code:d022/3f/ff + cheat + description:Faster timer + code:d022/3f/2f + cheat + description:Special weapons use minimum chip power + code:b088/bd/ad+b089/0f/10 + cheat + description:Start with maximum health + code:bbff/0a/0f+b3a3/0a/0f + cheat + description:Start with less health + code:bbff/0a/05+b3a3/0a/05 + cheat + description:Start with 1 life + code:bbf5/02/00 + cheat + description:Start with 6 lives + code:bbf5/02/05 + cheat + description:Start with 9 lives + code:bbf5/02/08 + cheat + description:Invincibility (blinking) + code:0089/03 + cheat + description:Infinite health (alt) + code:068c/0a + cheat + description:Infinite lives (alt) + code:06c0/09 + cheat + description:Infinite time + code:0691/09 + +cartridge sha256:67123fe28cf5fbadeafc77400a0812f0135ab36706ec7d1267f84931d044e71d + name:Kai no Bouken - The Quest of Ki (Japan) + cheat + description:Exit always open + code:0053/01 + +cartridge sha256:204b5eb443dc8f599d54e242352ba299c05015e5571f74307d78748af3d5f960 + name:Kame no Ongaeshi - Urashima Densetsu (Japan) + cheat + description:Invincibility + code:c3f7/f0/a9+c3f9/ce/8d + +cartridge sha256:d67817e44f3a421a78ce4217a0660ee375ea162f1465a28da77659dfa46f8f7c + name:Karate Champ (USA) (Rev A) + cheat + description:One hit wins round + code:0069/20 + cheat + description:One hit wins stage + code:005d/02 + +cartridge sha256:54c366ec62c0faec3d5619f62bad73092996a26e674f58819e9b76433cc04e15 + name:Karate Champ (USA) + cheat + description:One hit wins round + code:0069/20 + cheat + description:One hit wins stage + code:005d/02 + +cartridge sha256:8aa5c70100080adf0f6d8945ea10382f3986b99d41e010c356991dfe061eaa8d + name:Karate Kid, The (USA) + cheat + description:Infinite health + code:b25f/85/a5 + cheat + description:Infinite chances (lives) + code:881c/c6/a5 + cheat + description:Infinite Crane Kicks + code:a78b/c6/a5 + cheat + description:Infinite Drum Punches on pick-up + code:a778/c6/a5 + cheat + description:Hit anywhere + code:98ec/b0/50+98ed/03/24 + cheat + description:Prevent girl from moving in final stage + code:ac39/01/00 + cheat + description:Win tournament rounds automatically + code:8895/d7/00 + cheat + description:Start with 1 chance + code:86fa/03/01 + cheat + description:Start with 6 chances + code:86fa/03/06 + cheat + description:Start with 9 chances + code:86fa/03/09 + cheat + description:Start with 8 Crane Kicks - 1P game + code:ec4b/04/08 + cheat + description:Start with 8 Crane Kicks - 2P game + code:ec4c/04/08 + cheat + description:Start with 5 Crane Kicks - P1, one on one game + code:ec4d/00/05 + cheat + description:Start on stage 2 - 1P game + code:ec4e/01/02 + cheat + description:Start on stage 2 - 2P game + code:ec4f/01/02 + cheat + description:Start on stage 3 - 1P game + code:ec4e/01/03 + cheat + description:Start on stage 3 - 2P game + code:ec4f/01/03 + cheat + description:Start on stage 4 - 1P game + code:ec4e/01/04 + cheat + description:Start on stage 4 - 2P game + code:ec4f/01/04 + cheat + description:Infinite health (alt) + code:0085/0f + cheat + description:Infinite Drum Punches (alt) + code:0089/63 + cheat + description:Infinite Crane Kicks (alt) + code:008a/63 + cheat + description:Enemy has no health + code:008b/00 + +cartridge sha256:4ece74fde0b86ecef96d1909c517f55f2da71fd00e29102b8f2780606606e777 + name:Karnov (USA) + cheat + description:Invincibility after one hit + code:f28f/d0/50 + cheat + description:Invincibility + code:cb6f/85/a5+cb82/85/a5+cb73/85/a5 + cheat + description:Infinite lives + code:dac5/ce/ad + cheat + description:Infinite time + code:ad67/c6/24 + cheat + description:Hit anywhere + code:ccdb/09/00+ccd1/b0/a9+cd4f/95/a5 + cheat + description:Jump higher + code:f5be/2a + cheat + description:Gain 3 of most items + code:cf81/01/03 + cheat + description:Gain 97 of most items + code:cf81/01/97 + cheat + description:Never lose most items + code:cf9d/01/00 + cheat + description:Start with 1 life + code:d01d/02/00+ded6/02/00 + cheat + description:Start with 6 lives + code:d01d/02/05+ded6/02/05 + cheat + description:Start with 9 lives + code:d01d/02/08+ded6/02/08 + cheat + description:Start on stage 2 + code:d038/00/01 + cheat + description:Start on stage 3 + code:d038/00/02 + cheat + description:Start on stage 4 + code:d038/00/03 + cheat + description:Start on stage 5 + code:d038/00/04 + cheat + description:Start on stage 6 + code:d038/00/05 + cheat + description:Start on stage 7 + code:d038/00/06 + cheat + description:Start on stage 8 + code:d038/00/07 + cheat + description:Start on stage 9 + code:d038/00/08 + cheat + description:Invincibility after one hit (blinking) (alt) + code:0069/fa + cheat + description:Infinite lives (alt) + code:040b/09 + cheat + description:Infinite time (alt) + code:0094/a7 + cheat + description:Have 99 Ks + code:00ba/99 + cheat + description:Have Double Flame Shot + code:0065/01 + cheat + description:Have Triple Flame Shot + code:0065/02 + +cartridge sha256:7a406a58cf781b9ceb87f4266dca812a271bfe1f42aa392864e8bc404b2575e1 + name:Kekkyoku Nankyoku Daibouken (Japan) + cheat + description:Infinite time + code:f348/e6/a5 + +cartridge sha256:07e1b14777f8f04d4bd7c85c74a6f9e0f5c43b8c31aa7b3214e53a659fd5a2d9 + name:Kero Kero Keroppi no Daibouken 2 - Donuts Ike wa Oosawagi! (Japan) + cheat + description:Multi-jump + code:8899/3b/00 + +cartridge sha256:23bf669afb3125d72f352848628e201607b4cece974cce86f2558a1812056ece + name:Kick Master (USA) + cheat + description:Invincibility + code:de1a/85/10+de11/8d/ad+de1b/d2/06 + cheat + description:Invincibility after one hit + code:ab61/f0/a9 + cheat + description:Infinite health + code:de11/8d/ad + cheat + description:Infinite magic points + code:bd81/95/b5 + cheat + description:Infinite lives + code:b3b7/ce/ad+d3ba/f0/a9 + cheat + description:Hit anywhere + code:a1bf/90/d0 + cheat + description:Quick level up + code:a6e7/03/00 + cheat + description:Don't flash at all after getting hit + code:de19/3c/00 + cheat + description:Barely flash at all after getting hit + code:de19/3c/05 + cheat + description:Don't flash as long after getting hit + code:de19/3c/15 + cheat + description:Start with more EXP and magic points + code:d33b/60/65 + cheat + description:Start with twice as much health + code:fde0/40/80 + cheat + description:Start with half health + code:fde0/40/20 + cheat + description:Start with very little health + code:fde0/40/03 + cheat + description:Start with 1 life + code:d32c/03/01 + cheat + description:Start with 5 lives + code:d32c/03/05 + cheat + description:Start with 9 lives + code:d32c/03/09 + +cartridge sha256:4a9544bb41869e88ec0610a799b5ce9c7d89bf9a48198923ea7ba22f385ea349 + name:Kickle Cubicle (USA) + cheat + description:Invincibility + code:a089/b1/85+a178/b1/85 + cheat + description:Infinite lives + code:8680/c6/a5 + cheat + description:Infinite time + code:cef5/ce/ad + cheat + description:Infinite time (alt) + code:ceee/70 + cheat + description:Faster timer + code:cefa/0a/07 + cheat + description:Slower timer + code:cefa/0a/0f + cheat + description:Win level now + code:83d6/f0/d0 + cheat + description:Start on land 2 + code:8246/8d/2c+d935/8d/2c+d931/00/01 + cheat + description:Start on land 3 + code:8246/8d/2c+d935/8d/2c+d931/00/02 + cheat + description:Start on land 4 + code:8246/8d/2c+d935/8d/2c+d931/00/03 + +cartridge sha256:56f1fe3a7881b2e9d69cd33a0971b2f26247e964c3c7dd4a6019715425ff2256 + name:Kid Icarus (USA, Europe) + cheat + description:Invincibility + code:db2e/f1/e9 + cheat + description:No ordinary damage + code:db34/85/a5 + cheat + description:No damage from floor hazards + code:cfa3/c6/c5 + cheat + description:No damage from Medusa + code:b150/85/a5 + cheat + description:Lava restores health + code:cfa3/c6/e6 + cheat + description:Immune to becoming an eggplant + code:883e/01/00 + cheat + description:Hit anywhere + code:d971/11/00+d980/02/18+d97f/b0/ea + cheat + description:99 Hammers on pick-up + code:ead0/a9/90+ead1/01/f4 + cheat + description:Small hearts worth 2 + code:de4a/01/02 + cheat + description:Small hearts worth 5 + code:de4a/01/05 + cheat + description:Small hearts worth 135 + code:de4a/01/87 + cheat + description:Big hearts worth 20 + code:de4d/0a/14 + cheat + description:Big hearts worth 255 + code:de4d/0a/f7 + cheat + description:Get best ending with 8uuuuu uuuuuu uuuuuu uuuuuu code + code:818a/00/01 + +cartridge sha256:a11eec5762a029c95a5d496c0671b73e663225be50a5b1e89f16f380637b6665 + name:Kid Klown in Night Mayor World (USA) + cheat + description:Invincibility + code:af76/d0/f0 + cheat + description:Infinite health + code:8849/8d/ad + cheat + description:Infinite lives + code:8873/01/00 + cheat + description:Full health from hearts + code:8c03/03/00 + cheat + description:Less health from hearts + code:8bf7/05/02 + cheat + description:More health from hearts + code:8bf7/05/0a + cheat + description:Mega-jump (don't hold jump down too long or you might get stuck) + code:a687/ee/2c + cheat + description:Infinite chances in sub-game (press Start to re-enter the main game) + code:875d/c6/24 + cheat + description:Infinite health (alt) + code:043f/19 + cheat + description:Infinite Chips + code:0117/63 + cheat + description:Infinite lives (alt) + code:043e/09 + +cartridge sha256:f85a689b4ff7a5e51703e5fabc73ca1af43e6519754c4a59c11a960baa323b47 + name:Kid Kool and the Quest for the Seven Wonder Herbs (USA) + cheat + description:Invincibility + code:d1e3/a5/85 + cheat + description:Infinite time + code:8c19/e6/a6 + cheat + description:Infinite lives + code:cd4a/c6/a5 + cheat + description:Press Start to complete the level + code:c8a3/33/0c+c8a5/33/0b+c8a2/45/a9 + cheat + description:Hit anywhere - throwing + code:c82c/ad/b0+c82d/07/56 + cheat + description:Multi-jump when falling + code:92a2/f0/d0+92a3/d4/9c+929f/a1/c9+92a1/cd/01+92a0/d0/29 + cheat + description:One life after continue + code:cd59/03/01 + cheat + description:Start with one life + code:c065/03/01 + cheat + description:Start with double lives + code:c065/03/06 + cheat + description:Start with triple lives + code:c065/03/09 + cheat + description:Invincibility (alt) + code:0031/09 + cheat + description:Infinite lives (alt) + code:0015/09 + +cartridge sha256:81a77623adf819f10548052075555998c1ec1ef5f4dc4bf6ff6b6c3fa3541c1b + name:Kid Niki - Radical Ninja (USA) (Rev A) + cheat + description:Invincibility (glitchy) + code:8e0d/85/a5+8deb/85/a5 + cheat + description:Infinite lives + code:9ddc/c6/24 + cheat + description:Infinite time + code:bcd8/01/00 + cheat + description:Hit anywhere + code:8db0/8a/18+c21e/fd/60+8db1/48/60 + cheat + description:Higher jump + code:893a/e8/ff + cheat + description:Multi-jump + code:9a7e/10/00+9a84/0a/00+9a9b/2d/00+ff02/ff/10+ff0b/ff/60+ff08/ff/20+ff03/ff/04+ff00/ff/24+ff09/ff/2d+ff05/ff/ec+9a9c/89/ff+ff0a/ff/89+ff04/ff/a9+ff07/ff/19+ff06/ff/85+ff01/ff/57 + cheat + description:Less time + code:823b/06/04+9e81/06/04 + cheat + description:Start with 1 life + code:8216/03/01 + cheat + description:Start with 6 lives + code:8216/03/06 + cheat + description:Start on round 2 + code:81e7/00/01+81be/00/01 + cheat + description:Start on round 3 + code:81e7/00/02+81be/00/02 + cheat + description:Start on round 4 + code:81e7/00/03+81be/00/03 + cheat + description:Start on round 5 + code:81e7/00/04+81be/00/04 + cheat + description:Start on round 6 + code:81e7/00/05+81be/00/05 + cheat + description:Invincibility (glitchy) (alt) + code:0088/00+00f4/00 + cheat + description:Infinite lives + code:00cc/03 + cheat + description:Infinite time + code:0621/3b + +cartridge sha256:81e527e9c282f5078a3d08470ad3c032fea9a72f1559ee9d2702ea6b07fab45c + name:Kid Niki - Radical Ninja (USA) + cheat + description:Invincibility + code:81c9/00/80 + cheat + description:Hit anywhere + code:8d9f/8a/18+c23b/fd/60+8da0/48/60 + cheat + description:Multi-jump + code:9a72/1b/00+ff02/ff/10+ff0b/ff/60+ff08/ff/20+ff03/ff/04+ff00/ff/24+9a5a/f0/24+9a54/f0/24+ff05/ff/ec+ff09/ff/1b+9a73/89/ff+ff0a/ff/89+ff04/ff/a9+ff07/ff/19+ff06/ff/85+ff01/ff/57 + cheat + description:Invincibility (glitchy) + code:0088/00+00f4/00 + cheat + description:Infinite lives + code:00cc/03 + cheat + description:Infinite time + code:0621/3b + +cartridge sha256:a8f2987d83253adb573aa760c1bb926e951f2c2d72daff4e2d2e125ec1a181c4 + name:King Kong 2 - Ikari no Megaton Punch (Japan) + cheat + description:Infinite health and lives + code:f156/95/b5 + cheat + description:Infinite Rocks + code:8569/8d/ad + cheat + description:Start with max health + code:e0d8/01/09+e0d7/00/99 + cheat + description:Start with 9 lives + code:e929/02/09 + +cartridge sha256:6cc3a973288a4c3c96a967bdf1be74eee909d3f5eb16ce0b405f20ce565c66cc + name:King Neptune's Adventure (USA) (Unl) + cheat + description:Infinite health + code:d6ae/ce/ad+d4b3/ce/ad+d675/8d/ad + cheat + description:Infinite lives + code:ce5e/ce/ad + cheat + description:Infinite Bubble Bombs + code:f9a5/c6/a5 + cheat + description:Start with all treasures (removes all items from level) + code:c4b3/f8/00 + cheat + description:Start with 99 Bubble Bombs and Money + code:c4bc/00/63 + cheat + description:Start with 99 Seahorses and Keys + code:cd3d/00/63 + +cartridge sha256:3249d267ca17098077bb94eee437f354066971bc03c0d06eada05efd92b0fa52 + name:King of Kings, The (USA) (v5.0) (Unl) + cheat + description:Infinite health + code:0512/06 + +cartridge sha256:dc6859332ca69a8361bb3eb8ba1ff638f4bbbc7837a3a9f8a474e05f6bc379ea + name:King of Kings, The (USA) (v1.3) (Unl) + cheat + description:Infinite health + code:0512/06 + +cartridge sha256:9ae715b6f2400d21f5d1ec426ecf310aa68ca46f3b37b37d5ae115f34049676b + name:King of Kings, The (USA) (v1.2) (Unl) + cheat + description:Infinite health + code:0512/06 + +cartridge sha256:d1002d407b544d70b4ddf4515665f6e18ac9c8ee2efd4be184e5240119fd6f70 + name:King of Kings, The (USA) (v1.1) (Unl) + cheat + description:Infinite health + code:0512/06 + +cartridge sha256:be97bca71e1bf099ef0f6ff91aed506df7b0506433c76e5deccea7b130e3a20f + name:King's Knight (USA) + cheat + description:Infinite health + code:a16e/85/24 + cheat + description:Only lose 1 HP when hit + code:a168/e5/e9+a169/10/01 + cheat + description:Start with double usual health + code:b1d8/0c/18 + cheat + description:Start with half usual health + code:b1d8/0c/06 + cheat + description:Start with a better character + code:b1de/00/01 + cheat + description:Start with the best character normally possible + code:b1de/00/02 + cheat + description:Start with a super character, better than normally Possible + code:b1de/00/05 + cheat + description:Infinite health (alt) + code:009a/0c + +cartridge sha256:1250a80faf865aa5ee5585ad7639e5ef2b3fa541554effda5fad2cc5dc2acef5 + name:Kirby's Adventure (USA) (Rev A) + cheat + description:Invincibility + code:847b/f0/d0 + cheat + description:Infinite health + code:9e05/8d/ad + cheat + description:Infinite lives + code:e4c1/ce/a5 + cheat + description:Hit anywhere (spitting) + code:819d/e9/18+819e/07/18+807a/60/80+8078/fd/4c+81cd/b0/24+8079/74/c6 + cheat + description:Inhale from anywhere + code:825b/42/00+827f/90/50+827c/ed/ad + cheat + description:Less health from 'pep drinks' + code:b243/08/02 + cheat + description:More health from 'pep drinks' + code:b243/08/10 + cheat + description:Full health from 'pep drinks' + code:b243/08/2f + cheat + description:Start with less health + code:a7f2/2f/1f + cheat + description:Start with more health + code:a7f2/2f/4f + cheat + description:Start with 2 lives + code:a7ed/04/01 + cheat + description:Start with 9 lives + code:a7ed/04/08 + cheat + description:Start with 17 lives + code:a7ed/04/10 + cheat + description:Invincibility (alt) + code:05f9/02 + cheat + description:Infinite health (alt) + code:0597/2f + cheat + description:Infinite lives (alt) + code:0599/09 + +cartridge sha256:a6b81fec11c24a33fd763db5c28005e760a1614e70c1bb5ccde0bd4242431000 + name:Kirby's Adventure (USA) + cheat + description:Invincibility + code:847b/f0/d0 + cheat + description:Infinite health + code:9e05/8d/ad + cheat + description:Infinite lives + code:e4c1/ce/a5 + cheat + description:Hit anywhere (spitting) + code:80c5/0d/00+81a5/36/00+8094/e9/18+8095/07/18+81cd/b0/24 + cheat + description:Inhale from anywhere + code:825b/42/00+8284/b0/24 + cheat + description:Less health from 'pep drinks' + code:b243/08/02 + cheat + description:More health from 'pep drinks' + code:b243/08/10 + cheat + description:Full health from 'pep drinks' + code:b243/08/2f + cheat + description:Start with less health + code:a7f2/2f/1f + cheat + description:Start with more health + code:a7f2/2f/4f + cheat + description:Start with 2 lives + code:a7ed/04/01 + cheat + description:Start with 9 lives + code:a7ed/04/08 + cheat + description:Start with 17 lives + code:a7ed/04/10 + cheat + description:Invincibility (alt) + code:05f9/02 + cheat + description:Infinite health (alt) + code:0597/2f + cheat + description:Infinite lives (alt) + code:0599/09 + +cartridge sha256:9caa01a2b81ce1f98b17520aee09d415da7192382c1e47316998b6c1be6168eb + name:Kiwi Kraze - A Bird-Brained Adventure! (USA) + cheat + description:Invincibility + code:c53c/f0/d0 + cheat + description:Super-jump + code:e545/fc/fa + cheat + description:Infinite lives + code:c7db/d6/b5 + cheat + description:Infinite time + code:a015/c6/a5 + cheat + description:Infinite time underwater + code:c640/c6/a5 + cheat + description:Infinite continues + code:c90a/d6/2c + cheat + description:1 life after continue + code:c907/02/00 + cheat + description:6 lives after continue + code:c907/02/05 + cheat + description:9 lives after continue + code:c907/02/08 + cheat + description:Start with 1 life (and 1 continue) + code:c373/02/00 + cheat + description:Start with 6 lives (and 6 continues) + code:c373/02/05 + cheat + description:Start with 9 lives (and 9 continues) + code:c373/02/08 + cheat + description:Start on level 2 + code:c368/8d/2c+c367/00/04 + cheat + description:Start on level 3 + code:c368/8d/2c+c367/00/08 + cheat + description:Start on level 4 + code:c368/8d/2c+c367/00/0c + cheat + description:Start on level 5 + code:c368/8d/2c+c367/00/11 + +cartridge sha256:ef63df6bcbc7e13dace53f106a247485a09409799b99c8415e934ba532cdaa53 + name:KlashBall (USA) + cheat + description:Very little team stamina - select the middle team + code:b939/28/05 + cheat + description:More team stamina - select the middle team + code:b939/28/40 + cheat + description:Mega team stamina - select the middle team + code:b939/28/99 + cheat + description:Power is doubled for the whole team - select the middle team + code:b93c/02/04 + cheat + description:Power is tripled for the whole team - select the middle team + code:b93c/02/06 + cheat + description:Mega power for the whole team - select the middle team + code:b93c/02/09 + cheat + description:Never lose stamina - select the middle team + code:a680/9d/2c + cheat + description:Computer can't score - select the middle team + code:845a/e6/a5 + cheat + description:Everyone including computer has 255 skill - select the middle team + code:a05e/38/2c+a05e/fd/2c + +cartridge sha256:28b3f1dde1488dd83422da47300d2e31ffce811bf2be37bf6d510019c2289f40 + name:Klax (USA) (Unl) + cheat + description:Infinite drops + code:bca3/e6/a5 + cheat + description:When starting on level 6, 0 drops allowed + code:8c7f/04/01 + cheat + description:When starting on level 6, 5 drops allowed + code:8c7f/04/05 + cheat + description:When starting on level 11, 0 drops allowed + code:8c92/05/01 + cheat + description:When starting on level 11, 3 drops allowed + code:8c92/05/03 + cheat + description:Start with 0 drops allowed + code:8c6d/03/01 + cheat + description:Start with 5 drops allowed + code:8c6d/03/05 + cheat + description:Level select + code:0000/00 + +cartridge sha256:b66538543d3c4c74448e896130081c39112b14898beffbe95137a410394e5dc9 + name:Knight Rider (USA) + cheat + description:Infinite shield + code:d62f/85/a5 + cheat + description:Infinite missiles + code:af0b/ce/ad + cheat + description:Infinite laser + code:aea5/ce/2c + cheat + description:Infinite lives + code:80ac/ce/ad+80cd/ce/ad + cheat + description:Start with 1 life after continue + code:80e3/02/00 + cheat + description:Start with 6 lives after continue + code:80e3/02/05 + cheat + description:Start with 9 lives after continue + code:80e3/02/08 + cheat + description:Start with 1 life + code:c879/02/00+c87d/8d/ee + cheat + description:Start with 6 lives + code:c879/02/05+c87d/8d/ee + cheat + description:Start with 99 missiles + code:a147/bd/ad+a148/6e/73 + cheat + description:Start with 99 lasers + code:a153/bd/ad+a154/74/79 + cheat + description:Start with full gasoline + code:a130/bd/ad+a131/66/68 + cheat + description:Start with full shield + code:a13c/bd/ad+a13d/6a/6d + +cartridge sha256:e5673075301b0c84137d24aff0ffbfa0565d33c960968d9843d7bc57f1107417 + name:Krion Conquest, The (USA) + cheat + description:Infinite health + code:dbf6/85/a5 + cheat + description:Infinite lives + code:bde1/c6/a5 + cheat + description:Float spell + code:c69f/16/00 + cheat + description:Quicker supershot + code:cde1/04/01 + cheat + description:Less energy used for fire spell + code:f0a3/08/04+f096/09/05 + cheat + description:Start with 1 life + code:8140/02/00 + cheat + description:Start with 6 lives + code:8140/02/05 + cheat + description:Start with 9 lives + code:8140/02/08 + cheat + description:Start on stage 2 + code:812a/00/01+8129/a9/a0+812d/85/84 + cheat + description:Start on stage 3 + code:812a/00/02+8129/a9/a0+812d/85/84 + cheat + description:Start on stage 4 + code:812a/00/03+8129/a9/a0+812d/85/84 + cheat + description:Invincibility + code:03de/02+03e0/3a + cheat + description:Infinite health (alt) + code:004c/28 + cheat + description:Infinite lives (alt) + code:0043/02 + cheat + description:Infinite oxygen in underwater stage + code:0318/05 + cheat + description:Moon-jump (disable in underwater stage) + code:0057/1f + +cartridge sha256:5f981ab1988614a96fd029c6fe3f103465dbf3219265bd8274bf8cd537adee34 + name:Krusty's Fun House (USA) + cheat + description:Infinite health + code:a038/0a/00 + cheat + description:Infinite pies - first life only + code:a4c1/ce/2c + cheat + description:Pick-up Super Balls instead of Custard Pies + code:ab9d/01/00 + cheat + description:Start with 1 life + code:8046/03/01 + cheat + description:Start with 6 lives + code:8046/03/06 + cheat + description:Start with 9 lives + code:8046/03/09 + cheat + description:Start with 6 pies + code:804b/09/06 + cheat + description:Start with 18 pies + code:804b/09/12 + +cartridge sha256:0ba5e69962f6576d3729aa967092a7e8c98d00213cd98026dee343bff67b4177 + name:Kung Fu (Japan, USA) + cheat + description:Infinite health + code:ace0/06/30+ace1/ad/8e + cheat + description:Infinite health and one hit kills + code:c466/14+c47e/eb + cheat + description:Infinite time + code:8831/20/ad + cheat + description:Infinite lives - both players + code:8882/b5 + cheat + description:Invincibility against knives + code:bfd6/d0/24 + cheat + description:Don't die when time runs out + code:c76d/85/24+c76f/4c/60 + cheat + description:Hit anywhere + code:c257/c9/00 + cheat + description:Enemies die when trying to grab you + code:a5c6/d0/24+a5c9/4d/ec+a5ca/a6/a5+a793/4c/60 + cheat + description:Enemies easier to shrug off + code:a5eb/69/00 + cheat + description:Enemies harder to shrug off + code:a5e9/04/0a + cheat + description:Give P2 an advantage + code:84ac/85 + cheat + description:Knife thrower harder to beat + code:ab38/4a/fa + cheat + description:Normal enemies do more damage + code:af8d/01/03 + cheat + description:Walk 2X faster + code:9b7f/ff/fe+9b7e/01/02 + cheat + description:Walk 4X faster + code:9b7e/01/04+9b7f/ff/fc + cheat + description:Start at last level reached - P1 + code:8436/24 + cheat + description:Start at last level reached - P2 + code:8439/24 + cheat + description:Start with 1 life - both players + code:84ab/01 + cheat + description:Start with 9 lives - both players + code:84ab/09 + cheat + description:Infinite health (disable at end of level) + code:04a6/1e + cheat + description:Infinite lives (alt) + code:005c/09 + cheat + description:Knife Thrower doesn't throw knives + code:03e8/00+03e9/00+03ea/00+03eb/00 + cheat + description:Max score + code:0536/09+0535/09+0534/09+0533/09+0532/09+0531/09 + cheat + description:Start on floor 2 + code:005f/01 + cheat + description:Start on floor 3 + code:005f/02 + cheat + description:Start on floor 4 + code:005f/03 + cheat + description:Start on floor 5 + code:005f/04 + +cartridge sha256:323d330cb50e0a4cd7855a3eedb0e97a08b31d9f7c638e4fa53ab58c1263154e + name:Kung-Fu Heroes (USA) + cheat + description:Invincibility + code:c127/0a/00+d6b9/bd/60 + cheat + description:Infinite lives + code:b3d2/01/00 + cheat + description:Infinite Miracle Kicks + code:d0e9/01/00 + cheat + description:Hit anywhere (most enemies) + code:d3f0/20/ad + cheat + description:2 E-balls for an extra life + code:bc28/05/02 + cheat + description:Use with warp to start with 1 life + code:a957/03/01 + cheat + description:Use with warp to start with 6 lives + code:a957/03/06 + cheat + description:Use with warp to start with 9 lives + code:a957/03/09 + cheat + description:Mega-jumps left and right + code:cc19/01/04+cc21/ff/fc + cheat + description:Start with 20 Miracle Kicks + code:a962/00/14 + cheat + description:Start with 1 life + code:a95d/05/01 + cheat + description:Start with 9 lives + code:a95d/05/09 + cheat + description:Start on Castle 2 + code:a952/a5/a9+a953/cd/04 + cheat + description:Start on Castle 3 + code:a952/a5/a9+a953/cd/08 + cheat + description:Start on Castle 4 + code:a952/a5/a9+a953/cd/0c + cheat + description:Start on Castle 5 + code:a952/a5/a9+a953/cd/10 + cheat + description:Start on Castle 6 + code:a952/a5/a9+a953/cd/14 + cheat + description:Start on Castle 7 + code:a952/a5/a9+a953/cd/18 + cheat + description:Start on Castle 8 + code:a952/a5/a9+a953/cd/1c + +cartridge sha256:f4b7d8d31c5bbfee69c117332fa3878d04dc3b6e693d1a343d3ef2f20b10a85e + name:Last Action Hero (USA) + cheat + description:Infinite health + code:bc95/46/a5 + cheat + description:One hit kills on bosses + code:a0a3/f0/d0 + cheat + description:Infinite lives + code:bca1/c6/a5 + cheat + description:Infinite continues + code:e50a/c6/a5 + cheat + description:Red hearts worth nothing + code:8f50/e6/a6 + cheat + description:Continue with 1 life + code:e550/03/00 + cheat + description:Continue with 2 lives + code:e550/03/01 + cheat + description:Continue with 3 lives + code:e550/03/02 + cheat + description:Start with 1 life + code:ee3d/03/00 + cheat + description:Start with 7 lives + code:ee3d/03/06 + cheat + description:Start with 10 lives + code:ee3d/03/09 + cheat + description:Start with 0 continues + code:ee41/02/00 + cheat + description:Start with 5 continues + code:ee41/02/05 + cheat + description:Start with 9 continues + code:ee41/02/09 + cheat + description:Start on stage 2 - Hamlet + code:e0f0/00/02 + cheat + description:Start on stage 3 - The House + code:e0f0/00/04 + cheat + description:Start on stage 4 - The Freeway + code:e0f0/00/05 + cheat + description:Start on stage 5 - The Office block + code:e0f0/00/06 + cheat + description:Start on stage 6 - The Helicopter + code:e0f0/00/07 + cheat + description:Start on stage 7 - The Film Premiere + code:e0f0/00/08 + cheat + description:Start on Stage 8 - The Cinema + code:e0f0/00/09 + cheat + description:Start on the end-of-level bad guy + code:e0f0/00/0a + cheat + description:Invincibility (blinking) + code:008c/19 + cheat + description:Infinite health (alt) + code:002e/2f + cheat + description:Infinite lives (alt) + code:0092/09 + +cartridge sha256:333d9de968973202f641714d746012237dc9d65fb592aac10c6146ed1f2fdaeb + name:Last Armageddon (Japan) + cheat + description:No random battles + code:fe93/c9/a9 + cheat + description:Walk anywhere + code:9a57/80/00 + +cartridge sha256:f15382be46e474c596566c5a726ae39dadfa18289722bac2da44b6493bbabfec + name:Last Ninja, The (USA) + cheat + description:Infinite health + code:8ad8/85/a5 + cheat + description:Press Select on controller 2 to skip to next level, A for next screen, B for previous screen + code:e507/d0/f0 + cheat + description:Infinite lives + code:007d/09 + cheat + description:Infinite time (seconds) + code:0369/00 + +cartridge sha256:54dd62754f48e39af39c3e8d645897af25aaba31523267bc41d4c95f2b0348d5 + name:Last Starfighter, The (USA) + cheat + description:Infinite lives - both players + code:9660/c6/a5 + cheat + description:Stop irritating shake + code:94b3/85/24 + cheat + description:Start with 1 life - both players + code:8b7f/05/01 + cheat + description:Start with 6 lives - both players + code:8b7f/05/06 + cheat + description:Start with 9 lives - both players + code:8b7f/05/09 + cheat + description:Start with 1 life - P2 + code:8b86/85/84 + cheat + description:Start on level 5 - P1 + code:8b6c/00/04+8b6f/85/24+8b71/85/24 + cheat + description:Start on level 10 - P1 + code:8b6c/00/09+8b6f/85/24+8b71/85/24 + cheat + description:Start on level 14 - P1 + code:8b6c/00/0d+8b6f/85/24+8b71/85/24 + +cartridge sha256:53923dcb59afac40fbfed4aa2298be156b5b9763ec43956757ec44092ba799c5 + name:Layla (Japan) + cheat + description:Infinite energy + code:e1d6/c6/a5 + cheat + description:Infinite Machine Gun ammo + code:d4e1/c6/a5 + cheat + description:Infinite Dynamite Sticks + code:d5e9/c6/a5 + cheat + description:Infinite Grenades + code:d51f/c6/a5 + +cartridge sha256:203dc9486ba58e65f9a4289da476dc15ff34d6fd39d355b438ae4db2d182746d + name:Legacy of the Wizard (USA) + cheat + description:Infinitel ife + code:e7e2/85/24 + cheat + description:Infinite magic + code:e7f7/c6/24 + cheat + description:Never lose items + code:e4db/d6/24 + cheat + description:Shopkeeper forgets to charge + code:e84b/85/24 + cheat + description:No enemies + code:e99f/91/b1 + cheat + description:Walk through walls + code:dd99/4c + cheat + description:Lyll's strength tripled + code:ffb4/01/03 + cheat + description:Lyll's jumping improved + code:ffb3/1a/30 + cheat + description:Roas' strength tripled + code:ffb0/01/03 + cheat + description:Roas' jumping improved + code:ffaf/14/2a + cheat + description:Xemn's strength tripled + code:ffa8/03/09 + cheat + description:Xemn's jumping improved + code:ffa7/12/20 + cheat + description:Menya's strength tripled + code:ffac/02/06 + cheat + description:Menya's jumping improved + code:ffab/14/20 + +cartridge sha256:d2a585ff6febf59447f9bd9fbb387ae4985385d6f6f61a70e145a5ee69523018 + name:Legendary Wings (USA) + cheat + description:Almost infinite health + code:830c/01/00+8586/01/00 + cheat + description:Hit anywhere + code:8b88/f2/00+8358/ef/00+843a/ec/00+8b98/e2/00+8b90/ea/00+8382/99/ad+839a/99/ad + cheat + description:Gain double powers on pick-up + code:8275/01/02+85e1/01/02 + cheat + description:Gain triple powers on pick-up + code:8275/01/03+82e1/01/02 + cheat + description:Start with 1 life - P1 + code:8783/03/01 + cheat + description:Start with 6 lives - P1 + code:8783/03/06 + cheat + description:Start with 9 lives - P1 + code:8783/03/09 + cheat + description:Start with 1 life - both players + code:8778/03/01 + cheat + description:Start with 6 lives - both players + code:8778/03/06 + cheat + description:Start with 9 lives - both players + code:8778/03/09 + cheat + description:Infinite health - P1 + code:0520/63 + cheat + description:Infinite lives - P1 + code:0058/09 + cheat + description:Have Double shot + code:007a/01 + cheat + description:Have Rapid Fire shot + code:007a/02 + cheat + description:Have Crazy Ball shot + code:007a/03 + cheat + description:Have Firebird ability + code:007a/04 + cheat + description:One hit kills on bosses + code:04b0/00 + +cartridge sha256:3b5627bc1ebaa7a84953d7337c7684a93beaf973f4a8b3a42b513dc1e0ab0a09 + name:Legends of the Diamond - The Baseball Championship Game (USA) + cheat + description:Balls are considered strikes + code:b53a/29/a9 + cheat + description:1 ball and you walk + code:b5c0/04/01 + cheat + description:2 balls and you walk + code:b5c0/04/02 + cheat + description:6 balls to walk + code:b5c0/04/06 + cheat + description:1 strike and you're out (fouls don't count as strikes) + code:b55c/03/01 + cheat + description:2 strikes and you're out (fouls don't count as strikes) + code:b55c/03/02 + cheat + description:5 strikes and you're out (fouls don't count as strikes) + code:b55c/03/05 + +cartridge sha256:9d83796d8feba9713fa5a1354fd9253cda5cb33ab5bc6f1c6f97d5eb90aef6c3 + name:Legend of Kage, The (USA) + cheat + description:Invincibility + code:9b76/85/a5 + cheat + description:Infinite lives - both players + code:82e3/c6/a5 + cheat + description:Hit anywhere with Shurikens + code:acdf/0a/00+acd3/16/00+acaf/6b/00 + cheat + description:Hit anywhere with Sword + code:ad06/14/00+ad12/08/00+acaf/6b/00 + cheat + description:Kill the white boss (you do not need to kill the butterfly) + code:acaf/6b/00 + cheat + description:Super-ninja-power running ability + code:8b51/02/04 + cheat + description:Super-ninja-power jumping ability + code:a14f/04/0f+a150/04/0f+a151/04/0f + cheat + description:Start with 28 lives - both players + code:8096/86/84 + cheat + description:Infinite lives - P1 + code:002b/63 + +cartridge sha256:1849bb687d038a43971651b13392481768ea0bc15f3d04b6898f052bbfa356e5 + name:Legend of the Ghost Lion (USA) + cheat + description:Infinite Courage points + code:9f37/8d/ad + cheat + description:Infinite Dream points + code:c5ae/8d/ad + cheat + description:Buy items for free in most shops (must have enough rubies to purchase item) + code:c4db/8d/ad + cheat + description:Infinite health - main character + code:04a1/ff + cheat + description:Max Dream - main character + code:04a3/ff+04a4/ff + cheat + description:Max Dream total - main character + code:04a5/ff + cheat + description:Max Hope - main character + code:04a0/ff + cheat + description:Max Rubies + code:041a/ff + cheat + description:Have #2 Whip + code:0562/2a + cheat + description:Have F-Sword + code:0562/2b + +cartridge sha256:ec0d4ebf6d2fcecd1d95fef7329954efe79676959bc281ea908b226459bc6dc2 + name:Legend of Zelda, The (USA) (Rev A) + cheat + description:Invincibility (blinking) + code:ec7d/b9 + cheat + description:Infinite life + code:b3e0/ad/60 + cheat + description:Have the Pink Ring (infinite life) + code:9e55/15/62 + cheat + description:Have Blue Ring effect + code:b3cd/06/d0 + cheat + description:Have Red Ring effect + code:b3cd/06/d1 + cheat + description:All items are free + code:a568/ce/ad+88ee/43/00 + cheat + description:Fewer enemies + code:8897/c0/00 + cheat + description:No dark rooms + code:b68f/f0/10 + cheat + description:No Zolas + code:86e6/08/00 + cheat + description:Reset counter to zero + code:a532/01 + cheat + description:Speed writing + code:8818/91 + cheat + description:Skip text + code:8873/05/00+885d/1b/00 + cheat + description:Walk faster + code:b387/a5/a9+b388/00/b0 + cheat + description:Walk through walls in dungeons + code:91a9/85/a5+914b/f0/60 + cheat + description:Create character with 8 life hearts + code:9f41/22/77 + cheat + description:Create character with 16 life hearts + code:9f41/22/ff + cheat + description:Invincibility + code:7b3a/60 + cheat + description:Invincibility (blinking) (alt) + code:04f0/09 + cheat + description:Infinite life (alt) + code:0670/ff + cheat + description:Hit anywhere + code:7bf2/24+7c28/ad + cheat + description:Get items from anywhere + code:7353/24+735f/24 + cheat + description:Infinite Keys + code:066e/03 + cheat + description:Infinite Rupies + code:066d/ff + cheat + description:Enemies don't shoot anything + code:034c/ff + cheat + description:Turbo Sword + code:03dd/01 + cheat + description:Have all Tri-Force pieces + code:0671/ff + cheat + description:Have Maps for Dungeons 1-8 and Compass for Dungeon 9 + code:0668/ff+0669/ff + cheat + description:Have Map for Dungeon 9 + code:066a/ff + cheat + description:Have Arrows + code:0659/01 + cheat + description:Have Blue Candle + code:065b/01 + cheat + description:Have Bombs + code:0658/10 + cheat + description:Have Bow + code:065a/01 + cheat + description:Have Enemy Bait + code:065d/01 + cheat + description:Have Flute + code:065c/01 + cheat + description:Have Ladder + code:0663/01 + cheat + description:Have Magic Book + code:0661/01 + cheat + description:Have Magic Boomerang + code:0675/01 + cheat + description:Have Magic Wand + code:065f/01 + cheat + description:Have Magical Key + code:0664/01 + cheat + description:Have Magical Shield + code:0676/01 + cheat + description:Have Magical Sword + code:0657/03 + cheat + description:Have Power Bracelet + code:0665/01 + cheat + description:Have Raft + code:0660/01 + cheat + description:Have Red Candle + code:065b/02 + cheat + description:Have Silver Arrows + code:0659/02 + cheat + description:Have White Sword + code:0657/02 + cheat + description:Have Wooden Sword + code:0657/01 + +cartridge sha256:085e5397a3487357c263dfa159fb0fe20a5f3ea8ef82d7af6a7e848d3b9364e8 + name:Legend of Zelda, The (USA) + cheat + description:Invincibility (blinking) + code:ec7d/b9 + cheat + description:Infinite life + code:b3e0/ad/60 + cheat + description:Have the Pink Ring (infinite life) + code:9e59/15/62 + cheat + description:All items are free + code:a568/ce/ad+88ee/43/00 + cheat + description:Almost no enemies in Overworld + code:9325/04/00+9326/05/00+9327/06/00 + cheat + description:Fewer enemies + code:8897/c0/00 + cheat + description:No dark rooms + code:b68f/f0/10 + cheat + description:No Zolas + code:86e6/08/00 + cheat + description:Reset counter to zero + code:a532/01 + cheat + description:Speed writing + code:8818/91 + cheat + description:Skip text + code:8873/05/00+885d/1b/00 + cheat + description:Walk faster + code:b387/a5/a9+b388/00/b0 + cheat + description:Walk through walls in dungeons + code:919f/85/a5+9141/f0/60 + cheat + description:Create character with 8 life hearts + code:9f41/22/77 + cheat + description:Create character with 16 life hearts + code:9f41/22/ff + cheat + description:Invincibility + code:7b3a/60 + cheat + description:Invincibility (blinking) (alt) + code:04f0/09 + cheat + description:Infinite life (alt) + code:0670/ff + cheat + description:Hit anywhere + code:7bf2/24+7c28/ad + cheat + description:Get items from anywhere + code:7353/24+735f/24 + cheat + description:Infinite Keys + code:066e/03 + cheat + description:Infinite Rupies + code:066d/ff + cheat + description:Enemies don't shoot anything + code:034c/ff + cheat + description:Turbo Sword + code:03dd/01 + cheat + description:Have all Tri-Force pieces + code:0671/ff + cheat + description:Have Maps for Dungeons 1-8 and Compass for Dungeon 9 + code:0668/ff+0669/ff + cheat + description:Have Map for Dungeon 9 + code:066a/ff + cheat + description:Have Arrows + code:0659/01 + cheat + description:Have Blue Candle + code:065b/01 + cheat + description:Have Bombs + code:0658/10 + cheat + description:Have Bow + code:065a/01 + cheat + description:Have Enemy Bait + code:065d/01 + cheat + description:Have Flute + code:065c/01 + cheat + description:Have Ladder + code:0663/01 + cheat + description:Have Magic Book + code:0661/01 + cheat + description:Have Magic Boomerang + code:0675/01 + cheat + description:Have Magic Wand + code:065f/01 + cheat + description:Have Magical Key + code:0664/01 + cheat + description:Have Magical Shield + code:0676/01 + cheat + description:Have Magical Sword + code:0657/03 + cheat + description:Have Power Bracelet + code:0665/01 + cheat + description:Have Raft + code:0660/01 + cheat + description:Have Red Candle + code:065b/02 + cheat + description:Have Silver Arrows + code:0659/02 + cheat + description:Have White Sword + code:0657/02 + cheat + description:Have Wooden Sword + code:0657/01 + +cartridge sha256:494aa7d49d3f4d66f01cac0f31a9bc7bc9626faa575a635f43e7caf19a832a48 + name:Lemmings (USA) + cheat + description:Infinite time + code:e0b3/c6/a5 + cheat + description:Infinite climbers + code:e16e/c6/a5 + cheat + description:Infinite floaters + code:e198/c6/a5 + cheat + description:Infinite bombers + code:e1c7/c6/a5 + cheat + description:Infinite blockers + code:e211/c6/a5 + cheat + description:Infinite builders + code:e261/c6/a5 + cheat + description:Infinite bashers + code:e2ab/c6/a5 + cheat + description:Infinite miners + code:e304/c6/a5 + cheat + description:Infinite diggers + code:e357/c6/a5 + +cartridge sha256:97c67809c952bc25060a01dca224eedc5ed76cc770bac44452c92cd3a1d4a418 + name:Lethal Weapon (USA) + cheat + description:Infinite ammo when shooting on the ground + code:d55c/99/b9 + cheat + description:Infinite ammo when shooting in the air + code:d5dd/99/b9+d5a1/99/b9 + cheat + description:E restores health completely + code:d8e2/10/40 + cheat + description:E worth nothing + code:d8e2/10/00 + cheat + description:Extra ammo restores ammo completely + code:d8c8/10/40 + cheat + description:Extra ammo worth nothing (if you run out of ammo you can't use gun till next stage) + code:d8c8/10/00 + cheat + description:No health lost when falling off screen + code:f8b2/20/00 + cheat + description:Falling off screen is fatal + code:f8b2/20/40 + cheat + description:Bullet proof vest lasts longer + code:d8f5/30/ff + cheat + description:Bullet proof vest lasts until end of stage, except when you die from punches or falling off screen + code:c9b9/ca/ea + cheat + description:Bullet proof vest does not last as long + code:d8f5/30/0a+d8f5/30/10 + cheat + description:Start on Level 2 + code:c236/ca/ea + cheat + description:Start on Level 3 + code:c233/be/a2+c234/97/03+c235/c0/ea + cheat + description:Invincibility (blinking) - P1 + code:05ed/09 + cheat + description:Infinite health + code:05c0/3f + cheat + description:Infinite ammo + code:003f/3a + cheat + description:One hit kills on bosses + code:05c4/00 + +cartridge sha256:dbd530e6ca07cc4b255b1b885cd5b6b2e23b8d3cac4733c3e4d96acd7d751c28 + name:Life Force (USA) + cheat + description:Infinite lives + code:c345/d6/24 + cheat + description:Keep pods after death + code:c653/95/24 + cheat + description:Hit anywhere + code:d231/1e/00+d23e/0d/00+d273/a9/60+d24a/90/d0 + cheat + description:One hit kills most enemies + code:d299/e9/a9 + cheat + description:Press Start to finish the level + code:fd96/24/4e+fd94/01/02 + cheat + description:Start with Speed + code:c6c1/00/01 + cheat + description:Start with Missile + code:c6c1/00/02 + cheat + description:Start with Ripple + code:c6c1/00/03 + cheat + description:Start with Laser + code:c6c1/00/04 + cheat + description:Start with Option + code:c6c1/00/05 + cheat + description:Start with Force Field + code:c6c1/00/06 + cheat + description:Start at the volcanic stage + code:eeb5/00/01 + cheat + description:Start at the prominence stage + code:eeb5/00/02 + cheat + description:Start at cell stage 2 + code:eeb5/00/03 + cheat + description:Start at the temple stage + code:eeb5/00/04 + cheat + description:Start at the mechanical city stage + code:eeb5/00/05 + cheat + description:Start with 1 life + code:eecf/03/01 + cheat + description:Start with 6 lives + code:eecf/03/06 + cheat + description:Invincibility - P1 + code:0084/c0 + cheat + description:Invincibility - P2 + code:0085/c0 + cheat + description:Infinite lives (alt) + code:0034/63 + cheat + description:Complete the level + code:004e/02 + cheat + description:Progress through the level faster + code:003a/02 + cheat + description:Have 30 lives option + code:07ef/01 + cheat + description:Have upgraded Laser + code:0076/03 + cheat + description:Have double Speed + code:0080/02 + cheat + description:Have triple Speed + code:0080/03 + cheat + description:Have Shield + code:0082/09 + cheat + description:Have double Missile + code:0086/02 + cheat + description:Have Option + code:0091/01 + +cartridge sha256:36769f543b6cfb08c5ef8673a11a7b27264bdd60323a62e9083b3da47eb33a8c + name:Lightgun Game 2 in 1 - Cosmocop + Cyber Monster (Asia) (Unl) + cheat + description:Cosmo Cop - Infinite lives + code:cbaf/ce/ad + cheat + description:Cosmo Cop - Infinite ammo + code:cb22/8d/ad + cheat + description:Cosmo Cop - Infinite energy + code:cb68/ce/ad+cb6b/ce/ad + cheat + description:Cyber Monster - Infinite misses + code:9550/ce/60 + +cartridge sha256:745164dee8e4af6a7150d21e9ef082f56a51b01c5c32f28cdf4cd211bed3714d + name:Lightgun Game 2 in 1 - Tough Cop + Super Tough Cop (Asia) (Unl) + cheat + description:Infinite health + code:037a/06 + +cartridge sha256:cecc797ffc82c5764e89038262c00b325f44afc0d9fc4b5bef295ea227e1dd22 + name:Lion King, The (Europe) + cheat + description:Invincibility + code:837d/f0/d0+b467/f0/d0 + cheat + description:Infinite lives + code:84f8/ce/ad + +cartridge sha256:475c35c18b5e958122473bcca52d54438e1734b1b74dc295492eba6d29927193 + name:Little League Baseball - Championship Series (USA) + cheat + description:Balls are considered strikes + code:d336/f0/a9 + cheat + description:Always hit a homerun (press B while the ball is in play) + code:b311/df/40+b30f/c1/93 + +cartridge sha256:68e98b1b8dc5da610321f92718b4b4c2b2b71b6c752ff25ca6926e26cd91c57f + name:Little Mermaid, The (USA) + cheat + description:Invincibility + code:c9d5/f0/d0+818b/f0/d0 + cheat + description:Invincibility after one hit + code:c9d7/c6/a5 + cheat + description:Infinite lives + code:d359/c6/a5 + cheat + description:Keep red pearls after dying + code:d353/85/24 + cheat + description:Keep green pearls after dying + code:d355/85/24 + cheat + description:Get all pearls after dying + code:d352/00/03 + cheat + description:Start with all red pearls + code:c64c/00/03+c64e/e9/3d + cheat + description:Start with all green pearls + code:c64c/00/03+c64e/e9/3e + cheat + description:Start with 1 heart + code:c654/03/01+c720/03/01 + cheat + description:Start with 5 hearts + code:c654/03/05+c720/03/05 + cheat + description:Start with 1 life + code:c650/02/00 + cheat + description:Start with 6 lives + code:c650/02/05 + cheat + description:Start with 9 lives + code:c650/02/08 + cheat + description:Start on Ursula stage + code:c64c/00/05 + cheat + description:Start on stage 2 + code:c64c/00/01 + cheat + description:Start on stage 3 + code:c64c/00/02 + cheat + description:Start on stage 4 + code:c64c/00/03 + cheat + description:Start on stage 5 + code:c64c/00/04 + +cartridge sha256:e95d3557fa60bacabe7a0b65277cdf2f084b6f58b55784d3d631ab030def0a91 + name:Little Nemo - The Dream Master (USA) + cheat + description:Infinite life + code:e0c4/ce/ad + cheat + description:Infinite lives + code:cb1d/c6/a5 + cheat + description:Mega-jump + code:afc4/0a/16 + cheat + description:Speed jumps + code:b1d7/01/04+b13d/fe/fb + cheat + description:Super speed + code:b1a3/01/02+b109/fe/fd + cheat + description:Start with 1 life + code:cacd/03/01 + cheat + description:Start with 6 lives + code:cacd/03/06 + cheat + description:Start with 9 lives + code:cacd/03/09 + cheat + description:Start on stage 2 + code:cab9/00/01 + cheat + description:Start on stage 3 + code:cab9/00/02 + cheat + description:Start on stage 4 + code:cab9/00/03 + cheat + description:Start on stage 5 + code:cab9/00/04 + cheat + description:Start on stage 6 + code:cab9/00/05 + cheat + description:Start on stage 7 + code:cab9/00/06 + cheat + description:Start on stage 8 + code:cab9/00/07 + cheat + description:Invincibility (blinking) + code:0630/03 + cheat + description:Infinite life (alt) + code:05d0/05 + cheat + description:Infinite lives (alt) + code:008e/09 + cheat + description:Infinite Keys + code:008c/09 + cheat + description:Fly + code:0540/ff + +cartridge sha256:50badb618accf0ca28966c05ca4ff159aa9afa2fccd7f0354b8eff6af105a8f0 + name:Little Ninja Brothers (USA) + cheat + description:Invincibility + code:b132/d0/50 + cheat + description:Invincibility to water + code:afd2/5e/ad + cheat + description:Infinite Life + code:b148/99/b9 + cheat + description:Infinite Dragon Kicks + code:b4bf/0d/00 + cheat + description:Infinite money + code:d9d1/ad/60 + cheat + description:Mighty Ball always available + code:9a8c/01/00 + cheat + description:T-Star always available + code:9b3d/ad/60 + cheat + description:All T-Stars + code:9b2f/29/a9 + cheat + description:Max money after fights + code:d99c/02/00 + cheat + description:Quick level up + code:d926/1a/00 + cheat + description:Start with 255 Life + code:da3c/0a/ff + cheat + description:Start with 50 Attack + code:da3d/01/32 + cheat + description:Have Batteries + code:0449/02 + cheat + description:Have Marks + code:042a/06 + cheat + description:Have Meat Bun + code:044d/01 + cheat + description:Have Medicine + code:044b/01 + cheat + description:Have Prism Claw + code:0439/08 + cheat + description:Have Prism Sword + code:043b/05 + cheat + description:Have Prism Shield + code:043c/04 + cheat + description:Have Sacred Robe + code:043d/04 + cheat + description:Have Sweet Buns + code:044c/08 + cheat + description:Have T-Stars + code:042b/08 + cheat + description:Have Whirly Birds + code:044a/01 + +cartridge sha256:a5165565263eaf8bdc45a8e6a615704f9bf271cd6d547d22c098c80cbaffd879 + name:Little Samson (USA) + cheat + description:Invincibility against enemies + code:825b/d0/10 + cheat + description:Infinite health + code:8269/fd/2c + cheat + description:Infinite lives + code:e498/c6/24 + cheat + description:Hit anywhere + code:8435/b0/30 + cheat + description:Collectable items never disappear + code:aacd/de/60 + cheat + description:Increase health gauge - Little Samson + code:e5c1/08/18 + cheat + description:Increase health gauge - Kikira the Dragon + code:e5c2/08/18 + cheat + description:Increase health gauge - Gamm the Golem + code:e5c3/10/20 + cheat + description:Increase health gauge - K.O. the Mouse + code:e5c4/04/10 + cheat + description:Increase health - Little Samson + code:e5c5/08/18 + cheat + description:Increase health - Kikira the Dragon + code:e5c6/08/18 + cheat + description:Increase health - Gamm the Golem + code:e5c7/10/20 + cheat + description:Increase health - K.O. the Mouse + code:e5c8/04/10 + cheat + description:Crystal ball adds 4 units to health gauge + code:aa30/04/08 + cheat + description:Small hearts give 4 health units + code:a9de/02/08 + cheat + description:Infinite health - Little Samson + code:0097/08 + cheat + description:Infinite health - Kikira the Dragon + code:0098/08 + cheat + description:Infinite health - Gamm the Golem + code:0099/0f + cheat + description:Infinite health - K.O. the Mouse + code:009a/04 + +cartridge sha256:33c362ea3dbce2ac449e0d877d85904c26fcaf4b197e27b23efe9cbe67f20e15 + name:Locksmith (Asia) (PAL) (Unl) + cheat + description:Infinite health + code:0573/23 + cheat + description:Infinite time + code:056a/01 + cheat + description:Instantly beat puzzle + code:0043/ff + +cartridge sha256:6c17c7bf2f7466eb43718305a0d74bd75f31b65429bc1fe406c34565e792310c + name:Lode Runner (USA) + cheat + description:Invincibility + code:c49d/f0/24+c496/f0/24+c473/f0/24 + cheat + description:Infinite lives + code:c577/c6/24 + cheat + description:Moonwalk + code:d114/30/10 + cheat + description:Heavy gravity + code:cc36/07/04+cc40/04/00 + cheat + description:Start with 1 life + code:c65b/05/01 + cheat + description:Start with 10 lives + code:c65b/05/0a + +cartridge sha256:622ef597b328a204fafcef55c9aef0de08489a43898a6c9adaa9d39971e06f69 + name:Lone Ranger, The (USA) + cheat + description:Infinite health - side views only + code:c14f/85/24 + cheat + description:Infinite regular and silver bullets + code:a85b/01/00 + cheat + description:Items are free + code:a50f/e5/60 + cheat + description:Cheaper silver bullets + code:a7b6/0a/05 + cheat + description:Cheaper standard bullets + code:a7b5/05/02 + cheat + description:Don't lose money when shooting bystanders + code:a857/46/24+a859/66/24 + cheat + description:Walk anywhere - Overworld + code:a9d4/85/a5 + cheat + description:Start with 255 dollars + code:f5ce/64/ff + cheat + description:Start with 10 silver bullet rounds + code:f5d6/05/0a + cheat + description:Start with 15 silver bullet rounds + code:f5d6/05/0f + cheat + description:Start with 15 standard bullet rounds + code:f5d2/0a/0f + cheat + description:Start with 30 standard bullet rounds + code:f5d2/0a/1e + cheat + description:Infinite health + code:005f/0c + cheat + description:Infinite money + code:0050/ff+df30/ff + cheat + description:Infinite regular and silver bullets (alt) + code:0052/06 + cheat + description:Infinite T.N.T. + code:0055/63 + +cartridge sha256:fbf9426155adf3b8a57b9123760c88f2c61f33fb2f6c5b21c894d5d83dd19138 + name:Loopz (USA) + cheat + description:Infinite time to place blocks + code:0090/ff + cheat + description:Level modifier + code:0086/00 + +cartridge sha256:4fb6c5c8359dcbabcb4d05cf36192c790e68a509ef8666c20ebdb81541df3243 + name:Low G Man - The Low Gravity Man (USA) + cheat + description:Invincibility + code:a11e/f0/60+a45e/2a/27 + cheat + description:Infinite life (blinking) + code:880f/8d/ad + cheat + description:Infinite ammo - secondary weapon + code:8bbc/de/ad + cheat + description:Infinite vehicle fuel + code:d96c/ce/ad + cheat + description:Infinite time + code:d947/ce/2c + cheat + description:Infinite lives + code:d870/ce/ad + cheat + description:Hit anywhere + code:a0aa/1b/00+a0e3/20/ad + cheat + description:Get items from anywhere + code:a19b/0a/00 + cheat + description:Full life gained from capsules + code:a600/02/08 + cheat + description:Less life gained from capsules + code:a600/02/01 + cheat + description:Full EMDP on a new life + code:d86c/01/03 + cheat + description:Full AGM on a new life + code:d864/00/02 + cheat + description:10 Boomerangs on pick-up + code:a692/03/0a + cheat + description:10 Fireballs on pick-up + code:a66c/03/0a + cheat + description:10 Bombs on pick-up + code:a6b8/03/0a + cheat + description:10 Waves on pick-up + code:a6de/03/0a + cheat + description:1 life after continue + code:d89c/03/01 + cheat + description:6 lives after continue + code:d89c/03/06 + cheat + description:9 lives after continue + code:d89c/03/09 + cheat + description:Start with 1 life + code:d6a2/03/01 + cheat + description:Start with 6 lives + code:d6a2/03/06 + cheat + description:Start with 9 lives + code:d6a2/03/09 + cheat + description:Infinite life + code:0639/08 + cheat + description:Infinite lives (alt) + code:06d6/09 + cheat + description:Infinite time (alt) + code:0738/ff + cheat + description:Enemies die instantly + code:050a/00+050e/00 + cheat + description:Jump higher + code:0647/35 + cheat + description:Rank is 03/03 + code:0651/03 + cheat + description:Rank left is 99/99 + code:0656/63+0657/63 + +cartridge sha256:9cdcac614a14e0aefe34d6333bc23ef3e08986144d2dacd322835aad8ec62add + name:Lunar Pool (USA) + cheat + description:Infinite Balls + code:01c3/63 + +cartridge sha256:52812b55986f96fa77eb24a76e795dc8d79977eec7488c7b5b84ac3b47d60366 + name:M.C. Kids (USA) + cheat + description:Infinite lives + code:d9cb/8d/2c + cheat + description:Infinite hearts + code:e607/05/c0 + cheat + description:Don't lose Golden Arches when hit + code:e5ff/05/c0 + cheat + description:Multi-jump + code:812d/c0/3c+812c/ad/a9+812e/04/ea + cheat + description:Super-jump + code:86ec/04/18+86e9/03/00 + cheat + description:1 heart per life + code:d748/02/00+d9cf/02/00 + cheat + description:8 hearts per life + code:d748/02/07+d9cf/02/07 + cheat + description:Always find all cards in level + code:f66d/0c/00+f669/ad/a9+f66a/19/01+f66b/04/ea + cheat + description:Access any level on the map + code:84a3/01/00 + cheat + description:Start with 2 lives + code:d743/03/01 + cheat + description:Start with 7 lives + code:d743/03/06 + cheat + description:Start with 10 lives + code:d743/03/09 + +cartridge sha256:345fe1e466b3e8d7a8b7f01f545808793b120ad17ed8497ddc306e205b2589a3 + name:M.U.L.E. (USA) + cheat + description:4 'months' for beginner game + code:86c3/06/04 + cheat + description:9 'months' for beginner game + code:86c3/06/09 + cheat + description:6 'months' for standard game + code:86a5/0c/06 + cheat + description:20 'months' for standard game + code:86a5/0c/14 + cheat + description:Humanoids start with $400 + code:8719/58/90+871e/02/01 + cheat + description:Humanoids start with $800 + code:8719/58/20+871e/02/03 + cheat + description:Flappers start with $1300 + code:8730/40/14+8735/06/05 + cheat + description:Flappers start with $2000 + code:8730/40/d0+8735/06/07 + +cartridge sha256:d10e4280b6ca868142061ab731aeb378c983334b89a1727a524c57c241812d13 + name:M.U.S.C.L.E. - Tag Team Match (USA) + cheat + description:Invincibility - P1 team + code:8239/a5/a9+823a/4f/63 + cheat + description:Set bout length timer to 20 + code:81db/03/02 + cheat + description:Set bout length timer to 60 + code:81db/03/06 + cheat + description:Set bout length timer to 90 + code:81db/03/09 + cheat + description:Computer controlled players jump faster + code:99bb/01/02 + cheat + description:Computer controlled players speed up + code:a058/01/02 + +cartridge sha256:944105c6dcc57314968d53a2e0dcdfc0e2b60678a53839ba25925416a7ac0e8c + name:Mach Rider (Japan, USA) (Rev A) + cheat + description:Infinite energy + code:ac87/c4+bfea/83 + cheat + description:Infinite lives + code:d35a/a6 + cheat + description:Infinite time - solo and endurance courses + code:ac65/a5 + cheat + description:Infinite Shots + code:ca64/b6 + cheat + description:Bike Never Explode + code:bfc2/e4 + cheat + description:Never lose bike abilities (color) + code:bfc8/65 + cheat + description:Super Speed + code:83ad/a5+83b3/a5 + cheat + description:No winter + code:c677/ad + +cartridge sha256:ef238662a27934d6dbe1692e822786a74a9a2c8bc58c38aa0fd5cfb3e2f1abce + name:Mach Rider (Japan, USA) + cheat + description:Infinite energy + code:ac87/c4+bfea/83 + cheat + description:Infinite lives + code:d35a/a6 + cheat + description:Infinite time - solo and endurance courses + code:ac65/a5 + cheat + description:Infinite Shots + code:ca64/b6 + cheat + description:Bike Never Explode + code:bfc2/e4 + cheat + description:Never lose bike abilities (color) + code:bfc8/65 + cheat + description:Super Speed + code:83ad/a5+83b3/a5 + cheat + description:No winter + code:c677/ad + +cartridge sha256:80757aa85fe4001123cb839db0fc72fc7e06020ecba5c89abb049b8490fd3d0b + name:Mad Max (USA) + cheat + description:Infinite ammo + code:8ee0/ce/ad + cheat + description:No damage done to car + code:87f9/10/00 + cheat + description:Less damage done to car + code:87f9/10/04 + cheat + description:More damage done to car + code:87f9/10/20 + cheat + description:No damage done to you + code:8833/08/00 + cheat + description:Less damage done to you + code:8833/08/04 + cheat + description:More damage done to you + code:8833/08/10 + cheat + description:A better tune-up + code:e1cb/20/60 + cheat + description:Dynamite is free + code:8279/01/00 + cheat + description:Ammo is free + code:826c/01/00 + cheat + description:Cheaper arena pass + code:8286/07/04+824b/37/34 + cheat + description:Start with full food and water + code:ff06/20/ff + cheat + description:Start with less ammo + code:ff13/80/40 + +cartridge sha256:ab0a43bc7c33f0cdd8acf15c4da967ba2af56431de1a598b9767bd10e78cc8fa + name:Mafat Conspiracy, The (USA) + cheat + description:Infinite bullets + code:c292/c6/24 + cheat + description:Infinite time + code:da76/ca/ea + cheat + description:Immune to physical damage + code:ce71/f1/24 + cheat + description:Immune to weapon damage + code:cd1d/f9/2c + cheat + description:Immune to damage in maze + code:c1f1/fd/2c + cheat + description:Fewer bullets on pick-up + code:cd53/0a/05 + cheat + description:More bullets on pick-up + code:cd53/0a/14 + cheat + description:Faster timer + code:da70/3c/20 + cheat + description:Slower timer + code:da70/3c/70+da65/3c/70 + +cartridge sha256:2eee5b14a90458088ac18c36352ab605ae4fe452a59f2675937acee0d15e94b6 + name:Magic Carpet 1001 (Unl) + cheat + description:Invincibility + code:8487/38/60 + +cartridge sha256:9a5d7367891f4d929fe5e3be5fe2988e3e6c0b0d70b7cd401976f16b3b5f0a9d + name:Magic Jewelry (Asia) (Unl) + cheat + description:Bypass checksum check + code:e7b0/d0/24+e7a8/d0/24 + cheat + description:Speed never increases + code:ec87/6d/00+ec86/a6/a2 + cheat + description:Disable Game Over + code:e7bf/90/24 + +cartridge sha256:caae56599689d4297c3be1afdc77d5bfc510d47d6e668244c308b9732eb41dea + name:Magician (USA) + cheat + description:Start on area 2 - Wilderness + code:0051/01 + cheat + description:Start on area 3 - Lake + code:0051/02 + cheat + description:Start on area 4 - Forest + code:0051/03 + cheat + description:Start on area 5 - Caverns + code:0051/04 + cheat + description:Start on area 6 - Dungeons + code:0051/05 + cheat + description:Start on area 7 - Castle + code:0051/06 + cheat + description:Start on area 8 - Tower + code:0051/07 + cheat + description:Start on the Tower Top boss + code:0051/08 + +cartridge sha256:527faba646cd9e959a4df5d015cd14ac3fae461b06655be99d47c1a754384097 + name:Magic of Scheherazade, The (USA) + cheat + description:Invincibility + code:f4b2/29/a9 + cheat + description:Infinite HP + code:a45b/e5/e9 + cheat + description:Infinite lives + code:e389/c6/a5 + cheat + description:Hit anywhere + code:f487/03/00+f47d/90/30+f47b/c5/a5+f47e/09/26+f47c/09/cb + cheat + description:Never lose Mashroobs + code:8c00/ce/ad + cheat + description:Get coins from anywhere + code:8ba2/03/06 + cheat + description:Less energy gained from Bread + code:8ac1/32/19 + cheat + description:Less magic gained from Mashroobs + code:8c0a/05/02 + cheat + description:Start with only 20 Gold Coins + code:e230/05/02 + cheat + description:Start with 1 life + code:e240/03/01 + cheat + description:Start with 6 lives + code:e240/03/06 + cheat + description:Start with 9 lives + code:e240/03/09 + cheat + description:Infinite HP (alt) + code:0081/ff + cheat + description:Infinite MP + code:008d/18 + cheat + description:Infinite Bread + code:0306/25 + cheat + description:Infinite Carpets + code:0311/10 + cheat + description:Infinite Mashroob + code:0307/25 + cheat + description:Infinite R. Seeds + code:0310/05 + cheat + description:Infinite Troopers + code:03d7/08 + cheat + description:Gain 65280 EXP for each kill + code:0086/ff + +cartridge sha256:daa1c7263a804920b2ebeb5b2041da0a207a49b5bcddbfdf51f02ba7e3d89092 + name:Magmax (USA) + cheat + description:Infinite lives - 1P game + code:e66f/c6/a5 + cheat + description:Infinite lives - 2P game + code:e68d/01/00 + cheat + description:Start with 1 life - both players + code:cbc4/02/00 + cheat + description:Start with 6 lives - both players + code:cbc4/02/05 + cheat + description:Start with 9 lives - both players + code:cbc4/02/08 + cheat + description:Infinite lives - P1 + code:0058/02 + cheat + description:Infinite lives - P2 + code:0059/05 + cheat + description:Max upgrades - P1 + code:008b/05 + cheat + description:Max upgrades - P2 + code:008c/05 + +cartridge sha256:84f5377980d2fd44d71faec42f858b1e83540c2f55aba9236c3279d6dde8592a + name:Maniac Mansion (USA) + cheat + description:All codes start out as 0000 + code:c8a4/a5/85 + +cartridge sha256:6bc8f71a1d19cab1a1364c7e2988eaec25b2694aa29670360cab6c513f1c47ac + name:Mappy (Japan) + cheat + description:Invincibility + code:dada/d0/50+da81/f0/24 + cheat + description:Disable Hurry! timer + code:f30a/e6/24 + cheat + description:Infinite time - Bonus stages + code:ca0b/c6/24 + cheat + description:Press Start to complete stage + code:c22d/05/60+c228/45/a9+c22c/f0/01+c22a/85/8d+c22b/23/3e+c229/23/86 + cheat + description:Ropes don't change color when jumping on them + code:dc1f/de/ad+e21a/de/ad + cheat + description:Disable trap floors + code:f0c6/99/ad + cheat + description:Collect items from anywhere - normal stages + code:f1ce/d0/24+f1d9/b0/24 + cheat + description:Collect Red Balloons from anywhere - Bonus stages + code:f1ce/d0/24+f1d9/b0/24 + +cartridge sha256:7d07d335a873205964299b2735c14fe06170329523341a651f275cdf3ed96f18 + name:Mappy-Land (USA) + cheat + description:Infinite lives + code:a64d/c6/a5 + cheat + description:Start with 1 toy + code:a3d8/03/01 + cheat + description:Start with coins, not toys + code:a3d0/00/03 + cheat + description:Start with fish, not toys + code:a3d0/00/01 + cheat + description:Start with pots, not toys + code:a3d0/00/02 + cheat + description:Start with 1 life + code:a0ae/02/00 + cheat + description:Start with 6 lives + code:a0ae/02/05 + cheat + description:Start with 6 toys + code:a3d8/03/06 + +cartridge sha256:d77ed527cf081019dc8e1cad72872ef3bd640114221b89f030e0c03229c54ddc + name:Marble Madness (USA) + cheat + description:Infinite time + code:a2eb/d6/a9 + cheat + description:Don't break from falling + code:c370/d0/f0 + cheat + description:Cannot fall into bottomless pits + code:c147/a9+880b/a5+c201/a9/ad + cheat + description:Extra 20 seconds to complete beginner race + code:a391/00/14 + cheat + description:Extra 40 seconds to complete beginner race + code:a391/00/28 + cheat + description:Bonus time not added + code:a38e/b0/24 + cheat + description:Infinite time (alt) + code:0044/3c + cheat + description:Max score - P1 + code:004a/63+004b/63+004c/63 + +cartridge sha256:0cc334007d3eae698cdcd034d12ec9bab2b5266e85bc703cf24ccb4e2d63b654 + name:Mario Bros. (World) + cheat + description:Invincibility + code:dce0/d6/60 + cheat + description:Infinite time - bonus rounds + code:e371/ce/de + cheat + description:Infinite time - bonus rounds (alt) + code:e371/ce/ad + cheat + description:Infinite power blocks + code:d2f5/c6/a5 + cheat + description:Infinite lives + code:dce0/a5 + cheat + description:Stops green fireball from appearing + code:e795/ad/60 + cheat + description:Stops red fireball from appearing + code:ea82/01/00 + cheat + description:Move faster + code:c8f5/00/01 + cheat + description:Move much faster + code:c8f5/00/02 + cheat + description:Enemies move faster + code:c908/a4/a0+c909/c7/02 + cheat + description:Enemies move much faster + code:c908/a4/a0+c909/c7/03 + cheat + description:Mega-jump + code:f350/fc/f6+f351/fc/f6 + cheat + description:Coins kill you + code:dcb3/40/00 + cheat + description:Start with 1 life + code:d359/00 + cheat + description:Start with 6 lives + code:d359/05 + cheat + description:Start with 9 lives + code:d359/08 + cheat + description:Infinite lives - P1 + code:0048/04 + cheat + description:Infinite lives - P2 + code:004c/04 + +cartridge sha256:c9348c4e30ef0bc62c4fd119b5e38d85af493a1eb436c6c229b7a6a52af42681 + name:Mario's Time Machine (USA) + cheat + description:Get an item after killing one Koopa + code:b7bc/00/02 + +cartridge sha256:a385f0bed8d9afd110e649b73084191d80f41728139494f8fcb92d4815cd5197 + name:Master Chu and the Drunkard Hu (USA) (Unl) + cheat + description:Invinicibility + code:90ed/fe/bd + cheat + description:Infinite health + code:9730/de/bd + cheat + description:Infinite lives + code:972e/d6/b5 + cheat + description:Start on round 2 + code:8103/01/02 + cheat + description:Start on round 3 + code:8103/01/03 + cheat + description:Start on round 4 + code:8103/01/04 + cheat + description:Start on round 5 + code:8103/01/05 + cheat + description:Start on round 6 + code:8103/01/06 + cheat + description:Start on round 7 + code:8103/01/07 + +cartridge sha256:c8486cd1a35950007a3ba671a128097d780084182a854d6115ddec7dad56e806 + name:Mechanized Attack (USA) + cheat + description:Infinite lives + code:f0b9/ce/ad + cheat + description:Infinite grenades + code:f13e/ce/ad + cheat + description:Infinite bullets + code:f105/ce/ad + cheat + description:Reduce damage by half + code:91e8/03/00 + cheat + description:Magazine holds half normal amount of bullets after first magazine used + code:f118/28/14+f003/28/14 + cheat + description:Start with only 1 life + code:c01d/a2/a0+c01e/00/01+c079/8e/8c + cheat + description:Start with 6 lives + code:c01d/a2/a0+c01e/00/06+c079/8e/8c + cheat + description:Start with 9 lives + code:c01d/a2/a0+c01e/00/09+c079/8e/8c + cheat + description:Start with only 1 magazine + code:c01d/a2/a0+c01e/00/00+c07e/8e/8c + cheat + description:Start with 8 magazines + code:c01d/a2/a0+c01e/00/07+c07e/8e/8c + cheat + description:Start with only 1 grenade + code:c01d/a2/a0+c01e/00/01+c082/8e/8c + cheat + description:Start with 8 grenades + code:c01d/a2/a0+c01e/00/08+c082/8e/8c + +cartridge sha256:5314ad0c406161195b6bb100ee11304bab8af121bba85992be896d5cb26b109e + name:Mega Man (USA) + cheat + description:Infinite health + code:a244/85/a5 + cheat + description:Invincibility (except against bosses) + code:a1eb/a5/60 + cheat + description:Infinite weapons on pick-up + code:a8d2/fd/0d + cheat + description:Infinite weapons on pick-up (alt) + code:a8d5/95/b5 + cheat + description:Infinite lives + code:c259/c6/a9 + cheat + description:One hit kills + code:c915/0b/00+bedf/90/d0 + cheat + description:One hit kills on bosses + code:f3a4/30 + cheat + description:Have all weapons + code:b41b/29/00+b2b6/ee/00+b1a1/52/00+b2a1/f0/a9 + cheat + description:Collectable items never disappear + code:b6b6/fe/bd + cheat + description:Climb up ladders faster + code:97f8/00/01 + cheat + description:Climb down ladders faster + code:982a/ff/fe + cheat + description:Disable boss invulnerability after hit + code:c968/85/24 + cheat + description:Maximum points for shooting enemies + code:b8d0/69/a9+b8d1/28/30 + cheat + description:Mega-jump + code:961f/04/06 + cheat + description:Multi-jump + code:95be/18/14+9cc6/b0/24+9583/29/bd+9584/96/95 + cheat + description:Enemies always drop extra lives + code:bf19/3b/41+bf21/c8/ea + cheat + description:Enemies always drop large health refill + code:bf19/3b/40+bf21/c8/ea + cheat + description:Enemies always drop large weapon refill + code:bf21/c8/ea+bf19/3b/3f + cheat + description:Start with half energy + code:912d/1c/0e + cheat + description:Start with 1 life + code:9053/02/00 + cheat + description:Start with 6 lives + code:9053/02/05 + cheat + description:Start with 9 lives + code:9053/02/08 + cheat + description:Invincibility + code:0055/5a + cheat + description:Infinite health (alt) + code:006a/1c + cheat + description:Infinite lives (alt) + code:00a6/03 + cheat + description:Have all weapons and all stages cleared + code:005d/ff + cheat + description:Bosses have no invulnerability time + code:0056/00 + +cartridge sha256:1e588d435e75d80c5c0b578b4fa8d196f2cf4346c11c9a7b7e435d768828ad01 + name:Mega Man 2 (USA) + cheat + description:Invincibility + code:ce36/f0/d0 + cheat + description:Invincibility (alt) + code:ce36/f0/50+ce34/a5/85 + cheat + description:Infinite health + code:e5a1/8d/ad + cheat + description:Infinite lives + code:c1b6/c6/a5 + cheat + description:Infinite Heat Man + code:ddd9/85/a5 + cheat + description:Infinite Air Man + code:dadf/85/a5 + cheat + description:Infinite Wood Man + code:df63/85/a5 + cheat + description:Infinite Bubble Man + code:db34/c6/a5 + cheat + description:Infinite Quick Man + code:db6f/c6/a5 + cheat + description:Infinite Metal Man + code:dbc9/c6/a5 + cheat + description:Infinite Clash Man + code:db8c/c6/a5 + cheat + description:Infinite 1 + code:dc76/c6/a5 + cheat + description:Infinite 2 + code:e224/c6/a5 + cheat + description:Infinite 3 + code:e340/c6/a5 + cheat + description:Hit anywhere (except bosses) + code:e632/90/d0+e686/b0/24+e659/d0/24+e664/f0/24+e621/b0/24 + cheat + description:One hit kills + code:e686/b0/24+a634/b0/24 + cheat + description:Burst-fire from normal weapon + code:da6d/27/23 + cheat + description:Maximum weapon energy on pick-up + code:834f/30/24 + cheat + description:Collectable items never disappear + code:bcf7/de/dd + cheat + description:Have all weapons + code:925b/25/a9+926e/25/a9+93e4/99/ad+9434/90/a9+9493/90/a9 + cheat + description:Main weapon can destroy Crash Blocks and Turrets + code:e664/f0/a9 + cheat + description:Power-jumps + code:8a71/04/06 + cheat + description:Super power-jumps + code:8a71/04/08 + cheat + description:Mega power-jumps + code:8a71/04/10 + cheat + description:Multi-jump + code:8b83/ad/20+858f/27/23+8b85/04/85+8b84/a0/8e + cheat + description:Moonwalking + code:8904/29/49 + cheat + description:Enemies always drop extra lives + code:f2ba/90/50+f2bb/cc/dd + cheat + description:Enemies always drop large health refill + code:f2ba/90/50+f2bb/cc/d9 + cheat + description:Enemies always drop large weapon refill + code:f2ba/90/50+f2bb/cc/d5 + cheat + description:Special items re-appear after being collected + code:e5e8/99/b9 + cheat + description:Can access already defeated boss stages + code:80e2/dc/00 + cheat + description:Stop Quick Man's stage beams + code:da09/04/ff + cheat + description:Start with half health + code:80c5/1c/0e + cheat + description:Start with 1 life + code:8073/03/01 + cheat + description:Start with 6 lives + code:8073/03/06 + cheat + description:Start with 9 lives + code:8073/03/09 + cheat + description:Invincibility (blinking) + code:004b/02 + cheat + description:Infinite health (alt) + code:06c0/1e + cheat + description:Have all weapons and all stages cleared + code:009a/ff+009b/ff + cheat + description:Infinite Heat Man once obtained + code:009c/1e + cheat + description:Infinite Air Man once obtained + code:009d/1e + cheat + description:Infinite Wood Man once obtained + code:009e/1e + cheat + description:Infinite Bubble Man once obtained + code:009f/1e + cheat + description:Infinite Quick Man once obtained + code:00a0/1e + cheat + description:Infinite Flash Man once obtained + code:00a1/1e + cheat + description:Infinite Metal Man once obtained + code:00a2/1e + cheat + description:Infinite Crash Man once obtained + code:00a3/1e + cheat + description:Infinite 1 once obtained + code:00a4/1e + cheat + description:Infinite 2 once obtained + code:00a5/1e + cheat + description:Infinite 3 once obtained + code:00a6/1e + cheat + description:Infinite energy tanks + code:00a7/03 + cheat + description:Infinite lives (alt) + code:00a8/04 + cheat + description:Atomic Fire always fully charged + code:00ac/ff + cheat + description:Bosses have no invulnerability time + code:05a8/00 + +cartridge sha256:5b85c1ff632c6ac34742ac87b9c8ddee9a13827caf1212ecfa1d11f1f9dece50 + name:Mega Man 3 (USA) + cheat + description:Invincibility + code:80ae/d0/f0 + cheat + description:Infinite health + code:80e0/85/24 + cheat + description:Infinite health (alt) + code:80e0/85/a5 + cheat + description:Infinite lives + code:cb82/01/00 + cheat + description:Infinite weapons (except Top Man) + code:def6/99/b9 + cheat + description:Infinite Top Man + code:8292/85/a5 + cheat + description:Hit anywhere + code:fbd2/38/18+fbd3/bd/60 + cheat + description:One hit kills + code:81ca/02/00 + cheat + description:Mega-jump + code:ceb9/04/07 + cheat + description:Multi-jump + code:cd9b/07/36+cdb1/d0/ce+ce39/90/24 + cheat + description:Longer slides + code:d3ae/14/50 + cheat + description:Faster slides + code:d3c0/80/ff + cheat + description:Move faster + code:cd42/4c/ff + cheat + description:Move mega-fast + code:cd47/01/02 + cheat + description:Collectable items never disappear + code:be3f/de/dd + cheat + description:Enemies always drop extra lives + code:bf72/90/a0+bf73/09/05+bf76/f8/06 + cheat + description:Enemies always drop large health refill + code:bf72/90/a0+bf73/09/03+bf76/f8/06 + cheat + description:Enemies always drop large weapon refill + code:bf72/90/a0+bf73/09/01+bf76/f8/06 + cheat + description:Special items re-appear after being collected + code:9caa/d4/00 + cheat + description:Able to access already defeated boss stages + code:931c/d5/00 + cheat + description:Start with 1 life + code:c8fc/02/00 + cheat + description:Start with 6 lives + code:c8fc/02/05 + cheat + description:Start with 9 lives + code:c8fc/02/08 + cheat + description:Start with 1 life after continue + code:991f/02/01 + cheat + description:Start with 6 lives after continue + code:991f/02/05 + cheat + description:Start with 9 lives after continue + code:991f/02/08 + cheat + description:Invincibility (alt) + code:0039/39 + cheat + description:Infinite health (alt 2) + code:00a2/9c + cheat + description:Infinite lives + code:00ae/03 + cheat + description:Infinite slide time + code:0033/ff + cheat + description:Mega-jump (alt) + code:ceb9/09 + cheat + description:Infinite Gemini Man + code:00a3/9c + cheat + description:Infinite Needle Man + code:00a4/9c + cheat + description:Infinite Hard Man + code:00a5/9c + cheat + description:Infinite Magnet Man + code:00a6/9c + cheat + description:Infinite Top Man (alt) + code:00a7/9c + cheat + description:Infinite Snake Man + code:00a8/9c + cheat + description:Infinite Rush Coil + code:00a9/9c + cheat + description:Infinite Spark Man + code:00aa/9c + cheat + description:Infinite Rush Sub + code:00ab/9c + cheat + description:Infinite Shadow Man + code:00ac/9c + cheat + description:Infinite Rush Jet + code:00ad/9c + +cartridge sha256:ed8bc89c9cd44bf566666451779d7db2da3d9c211ff2a4824372c172b554e05b + name:Mega Man 4 (USA) (Rev A) + cheat + description:Infinite health + code:81ed/85/24 + cheat + description:Infinite health (alt) + code:81ed/85/a5 + cheat + description:Infinite weapons + code:fd88/99/b9 + cheat + description:Infinite weapon power + code:fd88/99/2c + cheat + description:Always have 10 E-Tanks + code:98f8/a5/86 + cheat + description:Infinite lives + code:c833/c6/a5 + cheat + description:Infinite energy pods on pick-up + code:96f2/c6/24 + cheat + description:Instant full Mega Buster + code:8095/09/00 + cheat + description:Instant full Mega Buster (alt) + code:8ccd/18/23 + cheat + description:Hit anywhere + code:fa44/b9/18+fa45/28/60 + cheat + description:Hit anywhere continually + code:fa44/b9/18+fa45/28/60+fa42/f0/24 + cheat + description:Longer slides + code:8185/1a/2f + cheat + description:Shorter slides + code:8185/1a/12 + cheat + description:Faster slides + code:8194/02/04 + cheat + description:Mega-jump + code:814f/05/08 + cheat + description:Multi-jump + code:80fb/c8/30+810f/82/81+8133/90/24 + cheat + description:Move faster + code:c679/01/02+83e3/01/02 + cheat + description:Cosack can't hurt you + code:8880/85/a5 + cheat + description:Collectable items never disappear + code:be3f/de/dd + cheat + description:Enemies always drop extra lives + code:bb97/06/00+bb9a/f8/03 + cheat + description:Enemies always drop large health refill + code:bb97/06/00+bb9a/f8/03+bb90/04/02 + cheat + description:Enemies always drop large weapon refill + code:bb97/06/00+bb9a/f8/03+bb90/04/05 + cheat + description:Special items re-appear after being collected + code:9caa/d4/00 + cheat + description:Start with 1 life + code:c53a/02/00 + cheat + description:Start with 6 lives + code:c53a/02/05 + cheat + description:Start with 79 lives + code:c53a/02/08 + cheat + description:Invincibility + code:003c/1f + cheat + description:Infinite health (alt 2) + code:00b0/9c + cheat + description:Infinite lives (alt) + code:00a1/03 + cheat + description:Infinite Bright Man + code:00bc/9c + cheat + description:Infinite Dive Man + code:00b7/9c + cheat + description:Infinite Drill Man + code:00b9/9c + cheat + description:Infinite Dust Man + code:00ba/9c + cheat + description:Infinite Pharaoh Man + code:00bb/9c + cheat + description:Infinite Ring Man + code:00b8/9c + cheat + description:Infinite Skull Man + code:00bd/9c + cheat + description:Infinite Toad Man + code:00b4/9c + cheat + description:Infinite Rush Coil + code:00b1/9c + cheat + description:Infinite Rush Jet + code:00b2/9c + cheat + description:Infinite Rush Marine + code:00b3/9c + cheat + description:Infinite Balloon + code:00b6/9c + cheat + description:Infinite Wire + code:00b5/9c + cheat + description:Infinite time for 1st Balloon + code:046b/fe + cheat + description:Infinite time for 2nd Balloon + code:046a/fe + cheat + description:Infinite time for 3rd Balloon + code:0469/fe + cheat + description:Instant full Mega Buster (alt 2) + code:0559/23 + cheat + description:Bosses have no invulnerability time + code:05cf/00 + +cartridge sha256:a1fda74d03a9dd0c168b1ecae66803d78723cf7ccd85a482dedf017b97e660e8 + name:Mega Man 4 (USA) + cheat + description:Infinite health + code:81ed/85/24 + cheat + description:Infinite health (alt) + code:81ed/85/a5 + cheat + description:Infinite weapons + code:fd88/99/b9 + cheat + description:Infinite weapon power + code:fd88/99/2c + cheat + description:Always have 10 E-Tanks + code:98f8/a5/86 + cheat + description:Infinite lives + code:c833/c6/a5 + cheat + description:Infinite energy pods on pick-up + code:96f2/c6/24 + cheat + description:Instant full Mega Buster + code:8095/09/00 + cheat + description:Instant full Mega Buster (alt) + code:8ccd/18/23 + cheat + description:Hit anywhere + code:fa44/b9/18+fa45/28/60 + cheat + description:Hit anywhere continually + code:fa44/b9/18+fa45/28/60+fa42/f0/24 + cheat + description:Longer slides + code:8185/1a/2f + cheat + description:Shorter slides + code:8185/1a/12 + cheat + description:Faster slides + code:8194/02/04 + cheat + description:Mega-jump + code:814f/05/08 + cheat + description:Multi-jump + code:80fb/c8/30+810f/82/81+8133/90/24 + cheat + description:Move faster + code:c679/01/02+83e3/01/02 + cheat + description:Collectable items never disappear + code:be3f/de/dd + cheat + description:Enemies always drop extra lives + code:bb97/06/00+bb9a/f8/03 + cheat + description:Enemies always drop large health refill + code:bb97/06/00+bb9a/f8/03+bb90/04/02 + cheat + description:Enemies always drop large weapon refill + code:bb97/06/00+bb9a/f8/03+bb90/04/05 + cheat + description:Special items re-appear after being collected + code:9caa/d4/00 + cheat + description:Start with 1 life + code:c53a/02/00 + cheat + description:Start with 6 lives + code:c53a/02/05 + cheat + description:Start with 9 lives + code:c53a/02/08 + cheat + description:Invincibility + code:003c/1f + cheat + description:Infinite health (alt 2) + code:00b0/9c + cheat + description:Infinite lives (alt) + code:00a1/03 + cheat + description:Infinite Bright Man + code:00bc/9c + cheat + description:Infinite Dive Man + code:00b7/9c + cheat + description:Infinite Drill Man + code:00b9/9c + cheat + description:Infinite Dust Man + code:00ba/9c + cheat + description:Infinite Pharaoh Man + code:00bb/9c + cheat + description:Infinite Ring Man + code:00b8/9c + cheat + description:Infinite Skull Man + code:00bd/9c + cheat + description:Infinite Toad Man + code:00b4/9c + cheat + description:Infinite Rush Coil + code:00b1/9c + cheat + description:Infinite Rush Jet + code:00b2/9c + cheat + description:Infinite Rush Marine + code:00b3/9c + cheat + description:Infinite Balloon + code:00b6/9c + cheat + description:Infinite Wire + code:00b5/9c + cheat + description:Infinite time for 1st Balloon + code:046b/fe + cheat + description:Infinite time for 2nd Balloon + code:046a/fe + cheat + description:Infinite time for 3rd Balloon + code:0469/fe + cheat + description:Instant full Mega Buster (alt 2) + code:0559/23 + cheat + description:Bosses have no invulnerability time + code:05cf/00 + +cartridge sha256:4ddb728c3a007f1aa7184b60a1355cfd376cae46edc007fd48e6bcf41207cdb7 + name:Mega Man 5 (USA) + cheat + description:Infinite health + code:82df/85/24 + cheat + description:Invincible against spikes + code:804a/05/85 + cheat + description:Infinite lives + code:85a0/c6/24 + cheat + description:Infinite weapons + code:954f/99/b9+b5fa/99/b9+8254/85/a5 + cheat + description:Infinite energy for most weapons + code:b5f2/e5/e9+9547/e5/e9 + cheat + description:Infinite mega-tanks on pick-up + code:82d9/c6/24 + cheat + description:Infinite energy tanks on pick-up + code:8156/c6/24 + cheat + description:Hit anywhere + code:f017/b9/18+f018/28/60 + cheat + description:Hit anywhere continually + code:f017/b9/18+f018/28/60+f015/f0/24 + cheat + description:One hit kills + code:81b2/2d/00 + cheat + description:Starting weapons use less energy + code:b1e3/04/01 + cheat + description:Super-jump + code:80ae/05/07+80bb/fb/f9 + cheat + description:Mega-jump + code:80ae/05/01+80bb/fb/f7 + cheat + description:Multi-jump + code:8046/15/8d+806a/82/80+8090/90/24 + cheat + description:Collectable items never disappear + code:ae49/de/60 + cheat + description:Enemies always drop extra lives + code:ae86/90/50+ae80/04/03 + cheat + description:Enemies always drop large health refill + code:ae86/90/50+ae80/04/01 + cheat + description:Enemies always drop large weapon refill + code:ae86/90/50 + cheat + description:Special items re-appear after being collected + code:99be/d5/00 + cheat + description:Start with at least 2 energy tanks + code:de4b/80/82 + cheat + description:Start with at least 6 energy tanks + code:de4b/80/86 + cheat + description:Start with at least 2 mega-tanks + code:de51/80/82 + cheat + description:Start with at least 6 mega-tanks + code:de51/80/86 + cheat + description:Invincibility + code:05b8/2d + cheat + description:Infinite health (alt) + code:00b0/9c + cheat + description:Infinite lives (alt) + code:00bf/03 + cheat + description:Infinite Beat + code:00bc/9c + cheat + description:Infinite Charge Kick + code:00b8/9c + cheat + description:Infinite Crystal Eye + code:00b3/9c + cheat + description:Infinite Gravity Hold + code:00b7/9c + cheat + description:Infinite Gyro Attack + code:00b2/9c + cheat + description:Infinite Napalm Bomb + code:00b4/9c + cheat + description:Infinite Power Stone + code:00b6/9c + cheat + description:Infinite Star Crash + code:00b9/9c + cheat + description:Infinite Super Arrow + code:00b5/9c + cheat + description:Infinite Water Wave + code:00b1/9c + cheat + description:Infinite Rush Coil + code:00ba/9c + cheat + description:Infinite Rush Jet + code:00bb/9c + cheat + description:Bosses have no invulnerability time + code:05c0/00 + +cartridge sha256:2037babe50fed7a13b6f6559914cb81497245c9477592e6f8da183df09a3609a + name:Mega Man 6 (USA) + cheat + description:Invincibility + code:8ea4/f0/d0 + cheat + description:Infinite health + code:8f86/8d/ad + cheat + description:Infinite health (except fires, falling into pits and spikes) + code:8f84/e5/24 + cheat + description:Infinite weapons + code:9ea2/99/b9 + cheat + description:Infinite Rush Jet + code:8265/c6/a5 + cheat + description:Infinite lives (can sometimes die and go to another part of the game) + code:8e8a/c6/a5 + cheat + description:Normal shots do more damage + code:8c9c/11/13 + cheat + description:Mega shots do more damage + code:8ccf/13/16 + cheat + description:Hit anywhere and shoot to pick-up items + code:ecef/05/03 + cheat + description:One hit kills + code:ebeb/0a/00+ebea/b1/a9 + cheat + description:Multi-jump + code:810f/0f/40+8111/c8/80+8112/05/d0+8110/ad/29+810e/d0/a5+8113/30/ca+8114/0a/ea + cheat + description:Collectable items never disappear + code:92ae/de/c3 + cheat + description:Enemies always drop extra lives + code:81f5/19/00+821c/49/37+821b/4a/37+8219/39/37+821a/38/37 + cheat + description:Enemies always drop large health refill + code:81f5/19/00+821c/49/39+821d/37/39+821b/4a/39+821a/38/39 + cheat + description:Enemies always drop large weapon refill + code:81f5/19/00+821c/49/4a+821d/37/4a+8219/39/4a+821a/38/4a + cheat + description:Start with 9 lives + code:cd3e/02/08 + cheat + description:Start with 6 lives + code:cd3e/02/05 + cheat + description:Start with 1 life + code:cd3e/02/00 + cheat + description:Invincibility (alt) + code:00a2/36 + cheat + description:Infinite health (alt) + code:03e5/1b + cheat + description:Infinite lives + code:00a9/03 + cheat + description:Super Moonwalk (enable during stages only) + code:05b1/00 + cheat + description:Infinite Beat + code:0689/1b + cheat + description:Infinite C Flash + code:0690/1b + cheat + description:Infinite Centaur + code:0691/1b + cheat + description:Infinite F Blast + code:068c/1b + cheat + description:Infinite Knight + code:068e/1b + cheat + description:Infinite Plant B + code:068d/1b + cheat + description:Infinite W Storm + code:068b/1b + cheat + description:Infinite Yamato + code:068a/1b + cheat + description:Have the Energy Balancer + code:0696/01 + cheat + description:Bosses have no invulnerability time + code:0640/00 + +cartridge sha256:741fbfeeec83073cc3d8b407c0ddc9f78a0dc5b52d8196c6222bffb459b73ed1 + name:Menace Beach (USA) (Unl) + cheat + description:Infinite health and one hit kills (levels 1-9, 11, 12 only) + code:e169/38/e0+e16b/11/f0+e16c/b0/06+e16d/02/ea+e16a/e5/00 + cheat + description:Infinite health and one hit kills (level 10 only) + code:e169/38/e0+e16b/11/f0+e16c/b0/06+e16d/02/ea+e16a/e5/01 + cheat + description:Multi-jump + code:f441/a5/a9+f442/62/82 + +cartridge sha256:1152961edf8d484f0e33294ae19fbcac8ab85099e6c8a59f1732c5f17b622885 + name:Mendel Palace (USA) + cheat + description:Infinite lives + code:da52/de/bd + cheat + description:More stars on pick-up + code:d5a0/01/05 + cheat + description:P1 gains P2's speed-ups + code:d931/bd/ad+d938/fe/ee + cheat + description:More lives - P1 + code:bca2/8d/8c + cheat + description:More lives - P2 + code:bca5/8d/8c + cheat + description:Start with 1 life + code:a163/02/00 + cheat + description:Start with 5 lives + code:a163/02/05 + cheat + description:Start with 9 lives + code:a163/02/08 + cheat + description:Automatically finish level + code:051b/00 + +cartridge sha256:25f5359a73cac2d16ed98940f0b537f0392f232554d457ed476e21a5979419ff + name:Metal Force (K) + cheat + description:Invincibility + code:e7a6/d0/f0+e772/d0/f0+e817/d0/f0 + cheat + description:Invincible against spikes + code:e851/d0/f0 + cheat + description:Infinite energy + code:97f6/00/10+97fb/02/1c + cheat + description:Infinite lives + code:e6e2/8d/ad + cheat + description:Keep whatever weapon you started the level with + code:d2b6/8d/ad + cheat + description:Start with max weapon power + code:8391/00/02 + cheat + description:Start on Mission 7 + code:8396/01/07 + +cartridge sha256:f6d29afbd7ddad33672852232791a396695de2e77dccb83088a8d6b139d8c9cb + name:Metal Gear (USA) + cheat + description:Infinite life + code:eae2/c6/a5+f231/c6/a5 + cheat + description:Invincible against Gas + code:b487/c6/a5 + cheat + description:Invincible against Electric Floors + code:ba5e/c6/a5 + cheat + description:Infinite Rations + code:aea8/c6/a5 + cheat + description:Infinite Handgun ammo + code:ef5e/c6/a5 + cheat + description:Infinite Mines + code:ee8b/84/a4 + cheat + description:Infinite Explosives + code:eea8/86/a6 + cheat + description:Infinite Missiles + code:eeec/86/a6 + cheat + description:Infinite Machine Gun ammo + code:ef4a/c6/a5 + cheat + description:Infinite Grenades + code:ef0a/84/a4 + cheat + description:Infinite Rockets + code:eecf/86/a6 + cheat + description:Have all weapons + code:ac5c/a2/a9+ac5d/00/ff+ac5e/a5/85 + cheat + description:Enemies never attack or chase you + code:dc73/95/b5 + cheat + description:Hit anywhere - Punch + code:e305/eb/00+e311/df/00+e319/d7/00+e2ef/90/50 + cheat + description:Hit anywhere - Weapons except Grenade Launcher + code:f25f/f0/50 + cheat + description:Start with a life boost + code:d768/a6/a2+d769/6e/01+d7ca/05/08 + cheat + description:Start with a super life boost + code:d768/a6/a2+d769/6e/01+d7ca/05/0c + cheat + description:Start at mystery location 1 + code:d753/01/02 + cheat + description:Start at mystery location 2 + code:d753/01/04 + cheat + description:Infinite health (alt) + code:006d/10 + cheat + description:Have all equipment + code:0075/ff+0076/ff+0077/ff+0078/0c + cheat + description:Have all weapons (alt) + code:0070/ff + cheat + description:Infinite Handgun ammo (alt) + code:0079/ff + cheat + description:Infinite Mines (alt) + code:007a/0e + cheat + description:Infinite Explosives (alt) + code:007b/0e + cheat + description:Infinite Missiles (alt) + code:007c/0e + cheat + description:Infinite Machine Gun ammo (alt) + code:007d/ff + cheat + description:Infinite Grenades (alt) + code:007e/3c + cheat + description:Infinite Rockets (alt) + code:007f/1e + cheat + description:Have Rank - 0 Stars + code:006e/00 + cheat + description:Have Rank - 1 Star + code:006e/01 + cheat + description:Have Rank - 2 Stars + code:006e/02 + cheat + description:Have Rank - 3 Stars + code:006e/03 + cheat + description:Have Rank - 4 Stars + code:006e/04 + +cartridge sha256:a00c77c3130316625403aeea9a0dbb02acf4a176740dac7b9e9a42452e574d4f + name:Metal Mech - Man & Machine (USA) + cheat + description:Invincibility + code:8f32/20/ad + cheat + description:Infinite health + code:97f7/8d/ad+9868/8d/ad + cheat + description:Infinite lives - Tony + code:f600/ce/ad + cheat + description:Infinite Smart Bombs + code:f565/ce/ad + cheat + description:Super-jumping Tony + code:a0fe/ff/fe + cheat + description:Super-speeding Tony + code:a08c/05/02 + cheat + description:Mega-speeding Tony + code:a08c/05/01 + cheat + description:Start with 1 life and 1 Smart Bomb + code:d3cd/03/01 + cheat + description:Start with 6 lives and 6 Smart Bombs + code:d3cd/03/06 + cheat + description:Start with 9 lives and 9 Smart Bombs + code:d3cd/03/09 + cheat + description:Start on level 2 + code:d3d8/ff/00 + cheat + description:Start on level 3 + code:d3d8/ff/01 + cheat + description:Start on level 4 + code:d3d8/ff/02 + cheat + description:Start on level 5 + code:d3d8/ff/03 + cheat + description:Start on level 6 + code:d3d8/ff/04 + cheat + description:Infinite health (alt) + code:05dd/1f + +cartridge sha256:2fbbc465fc239b483cb89582f75451b21276d97868d67f3d8d89c2269fec5e37 + name:Metal Storm (USA) + cheat + description:Invincibility + code:e674/85/a5+b71d/85/a5 + cheat + description:Infinite time + code:f5c8/c6/a5 + cheat + description:Infinite lives + code:975f/01/00 + cheat + description:Slower timer + code:f5c1/3c/60 + cheat + description:Faster timer + code:f5c1/3c/20 + cheat + description:Permanent Fireball + code:ead4/0c/00 + cheat + description:Permanent Shield + code:afda/7c/00 + cheat + description:Start with extra weapons + code:bbf1/00/ff + cheat + description:Start with 6 lives + code:bbaf/02/06 + cheat + description:Start with 9 lives + code:bbaf/02/09 + +cartridge sha256:649db8035018f2512ccea70aca6606c3b3a6988cd9ed43953b38dc5103dec7bb + name:Metroid (USA) + cheat + description:Invincibility + code:fc44/9c/10+9e03/ad/60+fec2/20/60+f295/bd/60+f2b6/20/60+f2ef/20/60+fc43/20/90+e27b/84/90+9987/c9/a9+e27c/72/29 + cheat + description:Infinite health and Missiles, have all items + code:c934/30 + cheat + description:Infinite health + code:cea2/03/00 + cheat + description:Minimum energy of 30 + code:ced7/8d/ad + cheat + description:Always have Screw Attack effect + code:cd9c/38/18+cda0/88/60 + cheat + description:Infinite Missiles on pick-up + code:d333/ce/ad + cheat + description:Hit anywhere + code:f343/03/00+f2ca/b0/24+f53f/20/ff+f2d2/20/ad + cheat + description:Enemies die automatically + code:f541/29/00 + cheat + description:Beam has longer range + code:d505/55 + cheat + description:Easier bomb jumping + code:d679/14/00+d164/32/00 + cheat + description:Get items from anywhere + code:dbaf/46/00+f488/f0/24 + cheat + description:Gain 10 Missiles on pick-up + code:dbfa/05/0a + cheat + description:Gain 15 Missiles on pick-up + code:dbfa/05/0f + cheat + description:Gain 255 Missiles on pick-up + code:dbfa/05/ff + cheat + description:High-jump without High Jump Boots + code:cff4/18/12 + cheat + description:Mega-jump without High Jump Boots + code:cff4/18/0c + cheat + description:Mega-jump with High Jump Boots + code:cffd/12/0c + cheat + description:Multi-jump + code:d030/f0/24+cd10/f0/24 + cheat + description:Break any block + code:d61e/25 + cheat + description:No enemies + code:eb61/88 + cheat + description:Fall through the floor + code:e4a3/30 + cheat + description:Roll through walls, but loses energy (glitchy) + code:8588/d5 + cheat + description:Start with 70 energy + code:c926/03/07 + cheat + description:Infinite health and Missiles, have all items (alt) + code:69b2/01 + cheat + description:Have all items + code:6878/ff + cheat + description:Have Bombs + code:6878/3f + cheat + description:Have Ice Beam + code:6878/80 + cheat + description:Have Maru Mari (Morphing Ball) + code:6878/10 + cheat + description:Have Long Beam + code:6878/14 + cheat + description:Have Wave Beam + code:6878/40 + +cartridge sha256:77c9100f4d3f291dd751098d3291b14e824cc367696c9167d01051041e08b5cb + name:Michael Andretti's World GP (USA) + cheat + description:Infinite time + code:0565/01 + +cartridge sha256:2d40d51736c2fa22f0cccf686e92efee3a7ebb8fa4eee5032206bab099a5aaf6 + name:Mickey Mania 7 (Unl) + cheat + description:Infinite health + code:9186/ce/ad + cheat + description:Infinite lives + code:9507/ce/ad + cheat + description:Infinite Apples + code:9641/ce/ad + +cartridge sha256:826ace604eb7a657acedd98cd3479dbe1d3ebb087dd7a1b2ad299ab854c0d519 + name:Mickey Mouse 3 - Yume Fuusen (Japan) + cheat + description:Invincibility + code:af79/d0/f0 + cheat + description:Infinite health (life) + code:8849/8d/ad + cheat + description:Infinite lives + code:8874/8d/ad + +cartridge sha256:989243c99d6e58c4fbcc6999473e48a389eba22cf1d3cb95dbe4c8b1f3ce15d7 + name:Mickey Mousecapade (USA) + cheat + description:Invincibility + code:9a84/f0/d0+9ae7/f0/d0 + cheat + description:Infinite health + code:9691/e5/e9 + cheat + description:Infinite lives + code:9259/c6/a5 + cheat + description:Mickey and Minnie can shoot on any level + code:de50/0c/1c+de6e/02/03 + cheat + description:Start with 2 lives + code:91dd/04/01 + cheat + description:Start with 6 lives + code:91dd/04/05 + cheat + description:Start with 9 lives + code:91dd/04/08 + +cartridge sha256:1df64e9554fb9997ceeab9954b2b7f8aa6206509a15e09298014ba765d87c094 + name:Micro Machines (USA) (Unl) + cheat + description:Infinite lives + code:a6d2/ce/2c + cheat + description:Qualify every race + code:fac5/02/04 + cheat + description:Play with 9 lives + code:f7c8/03/09 + cheat + description:Ruff Trux after every race + code:fab2/03/01 + cheat + description:Kid out of game after every race + code:f857/03/01 + cheat + description:Win Championship race + code:fad1/01/04 + cheat + description:Faster Boat acceleration + code:801d/05/00 + cheat + description:Faster Sports Car acceleration + code:801c/05/00 + cheat + description:Faster Formula 1 acceleration + code:801e/05/00 + cheat + description:Faster Turbo Wheels(tm) acceleration + code:801f/05/00 + cheat + description:Faster 4x4 acceleration + code:8020/05/00 + cheat + description:Faster Tank acceleration + code:8022/02/00 + cheat + description:Faster Chopper acceleration + code:8023/05/00 + cheat + description:Quicker Boat deceleration + code:8026/09/00 + cheat + description:Quicker Sports Car deceleration + code:8025/09/00 + cheat + description:Quicker Formula 1 deceleration + code:8027/09/00 + cheat + description:Quicker Turbo Wheels deceleration + code:8028/09/00 + cheat + description:Quicker 4x4 deceleration + code:8029/09/00 + cheat + description:Quicker Tank deceleration + code:802b/02/00 + cheat + description:Quicker Chopper deceleration + code:802c/0f/00 + cheat + description:Higher bounce for Boats + code:8002/01/07 + cheat + description:Higher bounce for Sports cars + code:8001/01/05 + cheat + description:Higher bounce for Formula 1's + code:8003/01/07 + cheat + description:Higher bounce for Turbo Wheels + code:8004/01/07 + cheat + description:Higher bounce for 4x4's + code:8005/01/07 + cheat + description:Higher bounce for Tanks + code:8007/01/07 + cheat + description:Drive through vehicles + code:8dbd/19 + cheat + description:Start on race 5 + code:f7cd/00/04 + cheat + description:Start on race 10 + code:f7cd/00/09 + cheat + description:Start on race 15 + code:f7cd/00/0e + cheat + description:Start on race 20 + code:f7cd/00/13 + cheat + description:Start on race 25 (Final Race) + code:f7cd/00/18 + +cartridge sha256:31b8afd6e571d3ce8ddea49b813ceda2d350df3c84ceb5d8dd2c7a3a6de5ba88 + name:Micro Machines (USA) (Aladdin Compact Cartridge) (Unl) + cheat + description:Infinite lives + code:a67c/ce/2c + cheat + description:Qualify every race + code:fa25/02/04 + cheat + description:Play with 9 lives + code:f728/03/09 + cheat + description:Ruff Trux after every race + code:fa12/03/01 + cheat + description:Kid out of game after every race + code:f7b7/03/01 + cheat + description:Win Championship race + code:fa31/01/04 + cheat + description:Faster Boat acceleration + code:801d/05/00 + cheat + description:Faster Sports Car acceleration + code:801c/05/00 + cheat + description:Faster Formula 1 acceleration + code:801e/05/00 + cheat + description:Faster Turbo Wheels(tm) acceleration + code:801f/05/00 + cheat + description:Faster 4x4 acceleration + code:8020/05/00 + cheat + description:Faster Tank acceleration + code:8022/02/00 + cheat + description:Faster Chopper acceleration + code:8023/05/00 + cheat + description:Quicker Boat deceleration + code:8026/09/00 + cheat + description:Quicker Sports Car deceleration + code:8025/09/00 + cheat + description:Quicker Formula 1 deceleration + code:8027/09/00 + cheat + description:Quicker Turbo Wheels deceleration + code:8028/09/00 + cheat + description:Quicker 4x4 deceleration + code:8029/09/00 + cheat + description:Quicker Tank deceleration + code:802b/02/00 + cheat + description:Quicker Chopper deceleration + code:802c/0f/00 + cheat + description:Higher bounce for Boats + code:8002/01/07 + cheat + description:Higher bounce for Sports cars + code:8001/01/05 + cheat + description:Higher bounce for Formula 1's + code:8003/01/07 + cheat + description:Higher bounce for Turbo Wheels + code:8004/01/07 + cheat + description:Higher bounce for 4x4's + code:8005/01/07 + cheat + description:Higher bounce for Tanks + code:8007/01/07 + cheat + description:Drive through vehicles + code:8dbd/19 + cheat + description:Start on race 5 + code:f72d/00/04 + cheat + description:Start on race 10 + code:f72d/00/09 + cheat + description:Start on race 15 + code:f72d/00/0e + cheat + description:Start on race 20 + code:f72d/00/13 + cheat + description:Start on race 25 (Final Race) + code:f72d/00/18 + +cartridge sha256:a2b4b0fd54028f1bbbdef152d8f2a172270b60162802d298accd0c698d258c3d + name:Mighty Bomb Jack (USA) + cheat + description:Invincibility + code:979f/29/a9 + cheat + description:Invincibility (alt) + code:97b1/8d/ad+9b0a/8d/ad + cheat + description:Infinite lives + code:873a/ce/ae + cheat + description:Infinite time + code:87a3/ce/ad + cheat + description:Less time in game + code:879c/60/40 + cheat + description:More time in game + code:879c/60/80 + cheat + description:Enemies don't return from coin transformation + code:889d/ce/ad + cheat + description:Power coins are not used up + code:8b0a/ce/ad + cheat + description:Disable torture room + code:9ed7/03/81 + cheat + description:Jump through walls + code:98bb/01/02 + cheat + description:Start with 1 life + code:821a/03/01 + cheat + description:Start with 6 lives + code:821a/03/06 + cheat + description:Start with 9 lives + code:821a/03/09 + cheat + description:Infinite lives (alt) + code:0295/09 + cheat + description:Infinite time (one's digit) + code:0229/09 + cheat + description:Infinite time (ten's digit) + code:022d/09 + cheat + description:Infinite M's + code:0235/09 + +cartridge sha256:02d86ba60b7f43f9d04131522263e7560d9ad1d4cc474b909d487cc0d470ccc3 + name:Mighty Bomb Jack (Japan) + cheat + description:Invincibility + code:9875/29/09 + cheat + description:Invincibility (alt) + code:9887/8d/ad+9be5/8d/ad + +cartridge sha256:ef8ccb38760604f5122e034ae0c4591362364632fe2dc2fa10f2660e15bd368f + name:Mighty Final Fight (USA) + cheat + description:Invincibility + code:cf2f/00/80 + cheat + description:Infinite lives + code:dd4f/c6/a5 + cheat + description:Infinite credits + code:941b/c6/a5 + cheat + description:Protection from most hazards + code:f92b/85/a5 + cheat + description:Cody is weaker + code:8638/b9/ad + cheat + description:Cody is stronger + code:85df/a4/a0+85e0/6b/05 + cheat + description:Cody is stronger and has a super-powerful normal punch + code:85df/a4/a0+85e0/6b/05+8885/0b/40 + cheat + description:Cody is much stronger + code:8638/b9/a9+8639/d6/40+863a/87/ea + cheat + description:Guy is weaker + code:8656/b9/ad + cheat + description:Guy is stronger + code:8607/a4/a0+8608/6b/05 + cheat + description:Guy is stronger and has a super-powerful normal punch + code:8607/a4/a0+8608/6b/05+8934/02/40 + cheat + description:Guy is much stronger + code:8656/b9/a9+8657/a8/40+8658/88/ea + cheat + description:Haggar is weaker + code:8674/b9/ad + cheat + description:Haggar is stronger + code:8627/a4/a0+8628/6b/03 + cheat + description:Haggar is stronger and has a super-powerful normal punch + code:8627/a4/a0+8628/6b/03+89cb/0d/40 + cheat + description:Haggar is much stronger + code:8674/b9/a9+8675/57/40+8676/89/ea + cheat + description:Gain EXP faster (10 pts at a time) (may be displayed incorrectly) + code:8ac2/a5/a9+8ac3/05/10 + cheat + description:Gain EXP much faster (20 pts at a time) (may be displayed incorrectly) + code:8ac2/a5/a9+8ac3/05/20 + cheat + description:Cody starts with 3/4 health (1st life only) + code:c841/40/30 + cheat + description:Cody starts with 1/2 health (1st life only) + code:c841/40/20 + cheat + description:Cody starts with 1/4 health (1st life only) + code:c841/40/10 + cheat + description:Cody starts with 3/4 health (after 1st life) + code:de4c/40/30 + cheat + description:Cody starts with 1/2 health (after 1st life) + code:de4c/40/20 + cheat + description:Cody starts with 1/4 health (after 1st life) + code:de4c/40/10 + cheat + description:Guy starts with 3/4 health (1st life only) + code:c842/30/24 + cheat + description:Guy starts with 1/2 health (1st life only) + code:c842/30/18 + cheat + description:Guy starts with 1/4 health (1st life only) + code:c842/30/0c + cheat + description:Guy starts with 3/4 health (after 1st life) + code:de52/30/24 + cheat + description:Guy starts with 1/2 health (after 1st life) + code:de52/30/18 + cheat + description:Guy starts with 1/4 health (after 1st life) + code:de52/30/0c + cheat + description:Haggar starts with 3/4 health (1st life only) + code:c843/50/3c + cheat + description:Haggar starts with 1/2 health (1st life only) + code:c843/50/28 + cheat + description:Haggar starts with 1/4 health (1st life only) + code:c843/50/14 + cheat + description:Haggar starts with 3/4 health (after 1st life) + code:de58/50/3c + cheat + description:Haggar starts with 1/2 health (after 1st life) + code:de58/50/28 + cheat + description:Haggar starts with 1/4 health (after 1st life) + code:de58/50/14 + cheat + description:Start with 2 lives (doesn't work on continues) + code:c7ee/05/01 + cheat + description:Start with 4 lives (doesn't work on continues) + code:c7ee/05/03 + cheat + description:Start with 8 lives (doesn't work on continues) + code:c7ee/05/07 + cheat + description:Start with 10 lives (doesn't work on continues) + code:c7ee/05/09 + cheat + description:Start with 1 credit + code:c7f2/03/01 + cheat + description:Start with 5 credits + code:c7f2/03/05 + cheat + description:Start with 7 credits + code:c7f2/03/07 + cheat + description:Start with 9 credits + code:c7f2/03/09 + cheat + description:Invincibility (alt) + code:003b/25 + cheat + description:Infinite health + code:003a/30 + cheat + description:Infinite lives (alt) + code:003e/09 + cheat + description:Max level + code:006b/05 + +cartridge sha256:5327792d8b5392cd5cec95ee254fc9f729777283c80f3d1f94d5147f3be73652 + name:MiG 29 - Soviet Fighter (USA) (Unl) + cheat + description:Keep weapon after death + code:db59/c6/a5 + cheat + description:Start with best weapon + code:c179/00/03 + cheat + description:More time to refuel + code:908a/00/ff + cheat + description:Less time to refuel + code:908a/00/03 + cheat + description:Start with 1 life + code:c174/03/00 + cheat + description:Start with 6 lives + code:c174/03/05 + cheat + description:Start with 9 lives + code:c174/03/08 + cheat + description:Start with 255 lives + code:c174/03/fe + cheat + description:Start on mission 2 + code:911f/a5/a9+9120/15/01+9122/51/da + cheat + description:Start on mission 3 + code:911f/a5/a9+9120/15/02+9122/51/da + cheat + description:Start on mission 4 + code:911f/a5/a9+9120/15/03+9122/51/da + cheat + description:Start on mission 5 + code:911f/a5/a9+9120/15/04+9122/51/da + cheat + description:Start on mission 6 + code:911f/a5/a9+9120/15/05+9122/51/da + +cartridge sha256:2ebab487204c42b0d9cf19c37bdc395e396226ca3eaa664907bf7f8216b3c4d3 + name:Mike Tyson's Punch-Out!! (Japan, USA) (Rev A) + cheat + description:Invincibility + code:8080/e5/00+82b5/f5/75 + cheat + description:Infinite health + code:8503/a2/60 + cheat + description:Infinite hearts + code:892b/00/09 + cheat + description:Infinite hearts (alt) + code:844e/e5/24 + cheat + description:Infinite stars + code:8168/1e/00 + cheat + description:Infinite stars once obtained + code:897e/f0/30 + cheat + description:Infinite time + code:87ab/8e/a2+87de/9d/bd + cheat + description:Infinite time (alt) + code:87de/9d/bd + cheat + description:Opponent cannot block punches + code:82b5/f5/75 + cheat + description:No health for opponent + code:881a/8d/60+84c7/8d/ad + cheat + description:No health replenishment for opponent + code:815b/20/ad + cheat + description:Take less damage + code:8160/6d/ad + cheat + description:Take even less damage + code:8163/20/ad + cheat + description:Normal punches do more damage + code:836e/04/00 + cheat + description:Instant win + code:9d3d/2f + cheat + description:Instant loss + code:9d3d/ab + cheat + description:First knockdown will be a TKO + code:9ddf/28 + cheat + description:Skip intro + code:a290/01/f8 + cheat + description:Start with and have infinite stars + code:8167/f0/30 + cheat + description:Start each round with 3 stars + code:8950/00/03 + cheat + description:Infinite health (alt) + code:0391/60 + cheat + description:Infinite hearts (alt 2) + code:0324/0a + cheat + description:Infinite time + code:0305/00+0306/00+0307/00 + cheat + description:No health for opponent (alt) + code:0398/00 + cheat + description:First knockdown will be a TKO + code:03ca/02+03d1/02 + cheat + description:Start with and infinite stars + code:0342/03 + cheat + description:Start on match 02 - Von Keiser + code:0001/01 + cheat + description:Start on match 03 - Piston Honda + code:0001/02 + cheat + description:Start on match 04 - Don Flamenco + code:0001/03 + cheat + description:Start on match 05 - King Hippo + code:0001/04 + cheat + description:Start on match 06 - Great Tiger + code:0001/05 + cheat + description:Start on match 07 - Bald Bull + code:0001/06 + cheat + description:Start on match 08 - Piston Honda (2nd match) + code:0001/07 + cheat + description:Start on match 09 - Soda Popinski + code:0001/08 + cheat + description:Start on match 10 - Bald Bull (2nd match) + code:0001/09 + cheat + description:Start on match 11 - Don Flamenco (2nd match) + code:0001/0a + cheat + description:Start on match 12 - Mr. Sandman + code:0001/0b + cheat + description:Start on match 13 - Super Macho Man + code:0001/0c + cheat + description:Start on match 14 - Mike Tyson + code:0001/0d + +cartridge sha256:752f9d07450e6ec075b109f5be1b1933e8385ad687ceaf24f70a590767bb5a27 + name:Mike Tyson's Punch-Out!! (Japan, USA) + cheat + description:Invincibility + code:8080/e5/00+82b5/f5/75 + cheat + description:Infinite health + code:8503/a2/60 + cheat + description:Infinite hearts + code:892b/00/09 + cheat + description:Infinite hearts (alt) + code:844e/e5/24 + cheat + description:Infinite stars + code:8168/1e/00 + cheat + description:Infinite stars once obtained + code:897e/f0/30 + cheat + description:Infinite time + code:87ab/8e/a2+87de/9d/bd + cheat + description:Infinite time (alt) + code:87de/9d/bd + cheat + description:Opponent cannot block punches + code:82b5/f5/75 + cheat + description:No health for opponent + code:881a/8d/60+84c7/8d/ad + cheat + description:No health replenishment for opponent + code:815b/20/ad + cheat + description:Take less damage + code:8160/6d/ad + cheat + description:Take even less damage + code:8163/20/ad + cheat + description:Normal punches do more damage + code:836e/04/00 + cheat + description:Skip intro + code:a290/01/f8 + cheat + description:Start with and have infinite stars + code:8167/f0/30 + cheat + description:Start each round with 3 stars + code:8950/00/03 + cheat + description:Infinite health (alt) + code:0391/60 + cheat + description:Infinite hearts (alt 2) + code:0324/0a + cheat + description:Infinite time + code:0305/00+0306/00+0307/00 + cheat + description:No health for opponent (alt) + code:0398/00 + cheat + description:First knockdown will be a TKO + code:03ca/02+03d1/02 + cheat + description:Start with and infinite stars + code:0342/03 + cheat + description:Start on match 02 - Von Keiser + code:0001/01 + cheat + description:Start on match 03 - Piston Honda + code:0001/02 + cheat + description:Start on match 04 - Don Flamenco + code:0001/03 + cheat + description:Start on match 05 - King Hippo + code:0001/04 + cheat + description:Start on match 06 - Great Tiger + code:0001/05 + cheat + description:Start on match 07 - Bald Bull + code:0001/06 + cheat + description:Start on match 08 - Piston Honda (2nd match) + code:0001/07 + cheat + description:Start on match 09 - Soda Popinski + code:0001/08 + cheat + description:Start on match 10 - Bald Bull (2nd match) + code:0001/09 + cheat + description:Start on match 11 - Don Flamenco (2nd match) + code:0001/0a + cheat + description:Start on match 12 - Mr. Sandman + code:0001/0b + cheat + description:Start on match 13 - Super Macho Man + code:0001/0c + cheat + description:Start on match 14 - Mike Tyson + code:0001/0d + +cartridge sha256:bd84b27f752aa568374e1c8a6df948340a1374478b754f2ddc32e37d75b4a2b9 + name:Millipede (USA) + cheat + description:Infinite lives - both players + code:cec0/d6/b5 + cheat + description:Increase territory to half screen + code:d58d/a0/50 + cheat + description:Increase territory to full screen + code:d58d/a0/20 + cheat + description:Shrink territory + code:d58d/a0/c7 + cheat + description:Player's bullets move faster + code:dfba/06/0a + cheat + description:Player's bullets move slower + code:dfba/06/03 + cheat + description:Start with 1 life - P1 + code:c96d/04/01 + cheat + description:Start with 10 lives - P1 + code:c96d/04/0a + cheat + description:Invincibility + code:0071/00 + +cartridge sha256:6eea421f6c0738ff3abfd6e059e91c3409eedd2150093d3e01d49dfaad4dbf80 + name:Milon's Secret Castle (USA) + cheat + description:Infinite health + code:d27b/85/a5 + cheat + description:More health on pick-up + code:cac7/08/18 + cheat + description:No health on pick-up + code:cac7/08/00 + cheat + description:Max power bubbles + code:a782/d0/50 + cheat + description:Hit anywhere + code:d1b4/c9/d0+d1b5/08/24 + cheat + description:Floating Milon + code:9af6/03/50 + cheat + description:Start with more health + code:8a58/20/40 + cheat + description:Start with a bigger health bar + code:8a51/38/50 + cheat + description:Infinite health (alt) + code:00b2/3f + cheat + description:Doors always unlocked + code:07bf/ff + cheat + description:Set money to $900 + code:00a1/09 + cheat + description:Have all Crystals + code:07b7/fa + cheat + description:Have Blimp Ship + code:07a6/fa + cheat + description:Have Feather + code:07a4/fa + cheat + description:Have Hammer + code:07a0/fa + cheat + description:Have Ice Bottle + code:07a8/fa + cheat + description:Have Jump Shoes + code:079a/fa + cheat + description:Have Lantern + code:079f/fa + cheat + description:Have Medicine + code:079d/fa + cheat + description:Have Roller Shoes + code:079b/fa + cheat + description:Have Saw + code:079c/fa + cheat + description:Have Sword + code:07a7/fa + cheat + description:Have Tube + code:07a5/fa + cheat + description:Have Vest + code:07a3/fa + +cartridge sha256:61e4e0a38f23eec3e931f21ad89cc901ca9f709dccfec952ed0e478172f04441 + name:Mission Cobra (USA) (Unl) + cheat + description:Infinite health + code:f17a/64/00+dd0e/64/00+db21/64/00 + cheat + description:Infinite health (alt) + code:009a/63 + +cartridge sha256:6b04b87ab30e885974844ad693cc39ba8c87e7e650e1f9cf22a054e0a385df4e + name:Mission Impossible (USA) + cheat + description:Infinite Type B weapons for all + code:9235/01/00 + cheat + description:Take less damage + code:86be/b9/ad + cheat + description:Take more damage + code:86fe/01/02 + cheat + description:2 Type B weapons for Nicholas + code:bcb2/05/02 + cheat + description:9 Type B weapons for Nicholas + code:bcb2/05/09 + cheat + description:5 Type B weapons for Max and Grant + code:bcaa/0a/05 + cheat + description:15 Type B weapons for Max and Grant + code:bcaa/0a/0f + cheat + description:Longer disguise time + code:8996/ad/ce+9309/01/04 + cheat + description:Start with less health + code:bc9f/0c/06 + cheat + description:Start with more health + code:bc9f/0c/10 + cheat + description:Infinite health + code:03ec/0d+03ed/0d+03ee/0d + cheat + description:Infinite weapons + code:03f5/0a+03f6/0a+03f7/09 + +cartridge sha256:0bd6257a4566c57c582421bfbf8e81a5491a94e13f4e7a9378c3332c70884532 + name:Mitsume ga Tooru (Japan) + cheat + description:Hit anywhere + code:bab2/03/00 + cheat + description:One hit kills + code:bad3/01/ff+bad2/e9/a9 + cheat + description:Collect money from anywhere + code:8423/b0/50+8d69/b0/30 + cheat + description:Increase projectile limit to 13 + code:d68e/03/0d + cheat + description:Start a new game for hidden debug TEST MODE menu + code:8341/04/03 + cheat + description:Start a new game to view the ending + code:8341/04/07 + +cartridge sha256:f997fe34edf1d998694aa979c81fe0063480274b4284498f230fffe694fe87ac + name:Monopoly (USA) + cheat + description:Collect $300 as you pass Go + code:db59/31/3f + cheat + description:Collect $100 as you pass Go + code:db59/31/1d + cheat + description:Pay $0 to get out of jail + code:a864/17/00 + cheat + description:Pay $100 to get out of jail + code:a864/17/1d + cheat + description:Pay $30 for luxury tax + code:8c96/1a/13 + cheat + description:Pay $100 for luxury tax + code:8c96/1a/1d + cheat + description:Pay $200 for luxury tax + code:8c96/1a/31 + cheat + description:Pay $0 for income tax + code:8cd6/31/00 + cheat + description:Pay $30 for income tax + code:8cd6/31/13 + cheat + description:Pay $100 for income tax + code:8cd6/31/1d + cheat + description:Pay $300 for income tax + code:8cd6/31/3f + cheat + description:$300 to buy Boardwalk + code:d41b/4b/3f + cheat + description:$600 to buy Boardwalk + code:d41b/4b/53 + cheat + description:$200 to buy Park Place + code:d412/45/31 + cheat + description:$400 to buy Park Place + code:d412/45/4b + cheat + description:$600 to buy Park Place + code:d412/45/53 + cheat + description:Houses on Park Place cost $100 + code:d41a/31/1d + cheat + description:Houses on Park Place cost $300 + code:d41a/31/3f + cheat + description:Houses on Boardwalk cost $100 + code:d423/31/1d + cheat + description:Houses on Boardwalk cost $300 + code:d423/31/3f + cheat + description:Go Back 7 spaces instead of 3 on Chance + code:8315/03/07 + cheat + description:Infinite money - P1 + code:03c5/09+03c6/09+03c7/09+03c8/09+03c9/09 + cheat + description:Infinite money - P2 + code:03ca/09+03cb/09+03cc/09+03cd/09+03ce/09 + cheat + description:Infinite money - P3 + code:03cf/09+03d0/09+03d1/09+03d2/09+03d3/09 + cheat + description:Infinite money - P4 + code:03d4/09+03d5/09+03d6/09+03d7/09+03d8/09 + cheat + description:Infinite money - P5 + code:03c9/09+03da/09+03db/09+03dc/09+03dd/09 + cheat + description:Infinite money - P6 + code:03de/09+03df/09+03e0/09+03e1/09+03e2/09 + cheat + description:Infinite money - P7 + code:03e3/09+03e4/09+03e5/09+03e6/09+03e7/09 + cheat + description:Infinite money - P8 + code:03e8/09+03e9/09+03ea/09+03eb/09+03ec/09 + +cartridge sha256:08615e9e339bd2df713cdb15f6426895ba643fbd8f383758f7f5c06ebf7ac10b + name:Monster in My Pocket (USA) + cheat + description:Invincibility after first hit + code:85c9/de/bd+86e1/90/91 + cheat + description:Infinite energy + code:86dd/de/bd + cheat + description:Infinite lives + code:8550/de/bd + +cartridge sha256:219c94a1f0801ee255f4c8df6d7d1120bdcfd882fcaecba2c858b1e4c66d060b + name:Monster Party (USA) + cheat + description:Invincibility + code:879a/a5/60 + cheat + description:Infinite life against normal enemies + code:87a7/c6/a5 + cheat + description:Infinite life against Guardians + code:87a5/c6/e6 + cheat + description:One hit kills normal enemies + code:850d/b0/f0 + cheat + description:One hit kills Guardians + code:8d3b/02/00 + cheat + description:Walk twice as fast + code:82ce/ff/fe+82b8/01/02 + cheat + description:Jump twice as far + code:84f2/ff/fe+84df/01/02 + cheat + description:Start with double life + code:9532/0c/18+94c6/0c/18 + cheat + description:Start with full life + code:9532/0c/2c+94c6/0c/2c + cheat + description:Start on level 2 + code:954a/00/01 + cheat + description:Start on level 3 + code:954a/00/02 + cheat + description:Start on level 4 + code:954a/00/03 + cheat + description:Start on level 5 + code:954a/00/04 + cheat + description:Start on level 6 + code:954a/00/05 + cheat + description:Start on level 7 + code:954a/00/06 + cheat + description:Start on level 8 + code:954a/00/07 + +cartridge sha256:ce493dcb4ba133d9a31e234a4c446a365bcf98c5f99c13968f1e1c777747ac29 + name:Moon Crystal (Japan) + cheat + description:Multi-jump + code:96dc/06/60+96d6/1c/04+96dd/98/97+977b/8d/ad + +cartridge sha256:66cb74efa264a285a541277b935d4b6cc9c49a18653bce90b65f0de98b05aec0 + name:Moon Ranger (USA) (Unl) + cheat + description:Infinite lives + code:d6bc/ce/ad + +cartridge sha256:aa0fe1b0b1e0c3a0a01695f1914fbb5e92649db33b74a9bdcb51be1481221f49 + name:Mother (Japan) + cheat + description:Start a new game with $1024 + code:be11/00/04 + cheat + description:Start a new game with $16,384 + code:be11/00/40 + +cartridge sha256:ed219a1b03be92e3ac4a2229e3e7663fd126eca6332f0564e5d3a12ec56f2142 + name:MotorCity Patrol (USA) + cheat + description:Don't take damage + code:a68c/01/00 + cheat + description:Slow down timer + code:819d/3c/70 + cheat + description:Speed up timer + code:819d/3c/1f + cheat + description:Free equipment + code:8cbd/ce/2c+8c33/d0/10 + cheat + description:Start with 5 merits + code:a31d/00/05 + +cartridge sha256:3264e4c57ffaf64df816cc97b1d6d278042545a4be248f5c195d82037f0a9bfd + name:Mr. Gimmick (Europe) + cheat + description:Invincibility + code:8410/f0/d0+8412/ce/ee + cheat + description:Infinite health + code:8c98/ce/cd + cheat + description:Infinite lives + code:e5e6/ce/cd + cheat + description:Start with 3 Bombs + code:e0e5/00/03 + cheat + description:Start with 3 Fireballs + code:e0e5/00/02 + cheat + description:Start with 3 Potions + code:e0e5/00/01 + cheat + description:Invincibility (alt) + code:038c/02 + cheat + description:Infinite health (alt) + code:0346/04 + cheat + description:Infinite lives (alt) + code:0104/09 + +cartridge sha256:f7cc35a736ffd7804056b92ab92bfef02ded95d999ac126b680e87b573f18182 + name:Ms. Pac-Man (USA) + cheat + description:Infinite lives - P1 + code:003f/06 + cheat + description:Infinite lives - P2 + code:004f/06 + cheat + description:Power pill effect always active + code:00cf/0f + cheat + description:Start on stage 02 + code:003e/02 + cheat + description:Start on stage 03 + code:003e/03 + cheat + description:Start on stage 04 + code:003e/04 + cheat + description:Start on stage 05 + code:003e/05 + cheat + description:Start on stage 06 + code:003e/06 + cheat + description:Start on stage 07 + code:003e/07 + cheat + description:Start on stage 08 + code:003e/08 + cheat + description:Start on stage 09 + code:003e/09 + cheat + description:Start on stage 10 + code:003e/0a + +cartridge sha256:3ec56ffa686a0e45dc5dfa02d3216b6c9302177b01a0bba506739a436c4ba730 + name:Ms. Pac-Man (USA) (Unl) + cheat + description:Infinite lives for both players in alternating type games + code:82fe/c6/a5 + cheat + description:Infinite lives for P2 only, in other type games + code:8303/ce/ad + cheat + description:Super fast turbo speed + code:f79d/4a/ea + cheat + description:Pinky out of game + code:863a/02/00 + cheat + description:Sue out of game + code:865a/02/00 + cheat + description:Start with 1 life - both players + code:86b7/02/00 + cheat + description:Start with 6 lives - both players + code:86b7/02/05 + cheat + description:Start with 9 lives - both players + code:86b7/02/08 + cheat + description:Start with 1 life for P2 in 2P cooperative and competitive games + code:86ba/8d/8c + cheat + description:Only pink ghost escapes from center + code:002a/1b+023d/0e+002c/0b + cheat + description:Max score - P1 + code:00d0/09+00d1/99+00d2/99 + cheat + description:Infinite lives + code:00d4/09 + cheat + description:Ghosts stay blue until eaten + code:00c5/01 + cheat + description:Start on level 2 + code:0127/01 + cheat + description:Start on level 3 + code:0127/02 + cheat + description:Start on level 4 + code:0127/03 + cheat + description:Start on level 5 + code:0127/04 + cheat + description:Start on level 6 + code:0127/05 + +cartridge sha256:80f6f2b9cb2669e876328cf47ad94fd5288adeddaf45dee93087142ff589b6d6 + name:Muppet Adventure - Chaos at the Carnival (USA) + cheat + description:Infinite power + code:8a47/c6/a5 + +cartridge sha256:ac2374bd4a5f7c87a7bd51e296f79800f84ea6c91a35e0c79dd9a3b2f923ef37 + name:Mutant Virus, The - Crisis in a Computer World (USA) + cheat + description:Invincibility + code:cc8a/c6/a5 + cheat + description:Infinite health + code:cb47/8d/ad + cheat + description:Infinite time + code:d486/8e/ae + cheat + description:Infinite lives + code:d486/8e/ea + cheat + description:Don't flash after getting hit + code:d48a/ff/00 + cheat + description:Flash 1/2 as long after getting hit + code:d48a/ff/63 + cheat + description:Start with 1 life + code:c096/05/00 + cheat + description:Start with 3 lives + code:c096/05/02 + cheat + description:Start with 7 lives + code:c096/05/85 + cheat + description:Start with 10 lives + code:c096/05/09 + cheat + description:Infinite health (alt) + code:0119/0c + cheat + description:Infinite lives (alt) + code:0110/06 + +cartridge sha256:61cb18d11771cffa08f79fd6973f634c8351703a2fe0f79858171d72a5a46582 + name:Mystery Quest (USA) + cheat + description:Invincibility + code:90f7/c6/24 + cheat + description:Infinite vitality + code:90f7/c6/a5 + cheat + description:Immune to monster attacks + code:90ac/f8/00 + cheat + description:Immune to shallow water + code:90b8/ff/00 + cheat + description:Never lose Key + code:9fe9/85/24 + cheat + description:Never lose Raft + code:96f9/00/01 + cheat + description:Start with more vitality + code:8f5b/40/60 + cheat + description:Start with less vitality + code:8f5b/40/20 + cheat + description:Start with Raft and Key + code:99bc/00/01 + +cartridge sha256:dc71dadc3f4eae03f26ac4afec8ef044e7874ad8fdee1567a9b9b9e2c112669e + name:NARC (USA) + cheat + description:Invincibility (blinking) - both players + code:a1f9/0e/00 + cheat + description:Infinite health - both players + code:e3ac/f6/ea + cheat + description:Infinite Bullets + code:d91b/01/00 + cheat + description:Infinite Missiles + code:d483/01/00 + cheat + description:Infinite lives + code:e3ce/d6/b5 + cheat + description:Enemies die automatically + code:dfbf/f0/50+dfc0/f3/51 + cheat + description:Hit anywhere - P1 + code:e150/03/00+dfc1/a4/50+dfc2/56/4f + cheat + description:More missiles + code:80e4/35/39 + cheat + description:1 Missile on pick-up + code:a2b1/05/01 + cheat + description:9 Missiles on pick-up + code:a2b1/05/09 + cheat + description:45 Bullets on pick-up + code:9356/02/04 + cheat + description:Start with 1 life + code:8132/02/00 + cheat + description:Start with 6 lives + code:8132/02/05 + cheat + description:Start with 9 lives + code:8132/02/08 + +cartridge sha256:55efed163edb02abc2a344aba79edc5ad873a77ed92378ad0c3e62f1e1816d3e + name:NES Open Tournament Golf (USA) + cheat + description:Always on first shot + code:86b4/9d/01 + cheat + description:No wind + code:da47/85/a5 + +cartridge sha256:4b382baa70cbc52977fd766f49a3c7c9a3239f0d9581cd961b8b26700c53247d + name:NES Play Action Football (USA) + cheat + description:30-minute quarters + code:f4c3/0f/1e + cheat + description:10-minute quarters + code:f4c3/0f/0a + cheat + description:No timeouts - P2 + code:bfc3/8d/8c + cheat + description:6 timeouts per half (ignore display) + code:bfbf/03/06 + cheat + description:1 timeout per half + code:bfbf/03/01 + +cartridge sha256:c03ffd0d5fb5439eb35f22f09df3cbd8f81f5cf3eb9b6718a4d7afb67c75c543 + name:Nigel Mansell's World Championship Challenge (USA) + cheat + description:Almost no tire wear + code:e053/ce/ad+f87a/ce/ad + cheat + description:Only need 1 lap on all tracks + code:ca7a/07/02+c8fd/bd/ad + cheat + description:Accelerate faster + code:f1dd/7d/6d + cheat + description:Accelerate a lot faster + code:f1dd/7d/6d+f348/04/08 + cheat + description:No extra time in the pits + code:b15b/ee/2c + cheat + description:Less tire wear + code:e053/ce/ad + cheat + description:Only need 3 laps in South Africa instead of 6 + code:ca7a/07/04 + cheat + description:Only need 3 laps in Mexico instead of 6 + code:ca7b/07/04 + cheat + description:Only need 3 laps in Brazil instead of 5 + code:ca7c/06/04 + cheat + description:Only need 3 laps in Spain instead of 4 + code:ca7d/05/04 + cheat + description:Only need 3 laps in San Marino instead of 6 + code:ca7e/07/04 + cheat + description:Only need 3 laps in Monaco instead of 5 + code:ca7f/06/04 + cheat + description:Only need 3 laps in Canada instead of 6 + code:ca80/07/04 + cheat + description:Only need 3 laps in France instead of 4 + code:ca81/05/04 + cheat + description:Only need 3 laps in Great Britian instead of 5 + code:ca82/06/04 + cheat + description:Only need 3 laps in Germany instead of 5 + code:ca83/06/04 + cheat + description:Only need 3 laps in Hungary instead of 5 + code:ca84/06/04 + cheat + description:Only need 3 laps in Belgium instead of 5 + code:ca85/06/04 + cheat + description:Only need 3 laps in Italy instead of 6 + code:ca86/07/04 + cheat + description:Only need 3 laps in Portugal instead of 4 + code:ca87/05/04 + cheat + description:Only need 3 laps in Japan instead of 5 + code:ca88/06/04 + cheat + description:Only need 3 laps in Australia instead of 5 + code:ca89/06/04 + cheat + description:Full season ends after South Africa + code:aa99/10/01 + cheat + description:Full season ends after Mexico + code:aa99/10/02 + cheat + description:Full season ends after Brazil + code:aa99/10/03 + cheat + description:Full season ends after Spain + code:aa99/10/04 + cheat + description:Full season ends after San Marino + code:aa99/10/05 + cheat + description:Full season ends after Monaco + code:aa99/10/06 + cheat + description:Full season ends after Canada + code:aa99/10/07 + cheat + description:Full season ends after France + code:aa99/10/08 + cheat + description:Full season ends after Great Britian + code:aa99/10/09 + cheat + description:Full season ends after Germany + code:aa99/10/0a + cheat + description:Full season ends after Hungary + code:aa99/10/0b + cheat + description:Full season ends after Belgium + code:aa99/10/0c + cheat + description:Full season ends after Italy + code:aa99/10/0d + cheat + description:Full season ends after Portugal + code:aa99/10/0e + cheat + description:Full season ends after Japan + code:aa99/10/0f + cheat + description:Start with 1/2 normal tire tread + code:c88a/10/08 + +cartridge sha256:58be6a811ee3370882160115253b610581e8b4af7228669eb3fbd56e7a13117c + name:Nightmare on Elm Street, A (USA) + cheat + description:Invincibility + code:b315/f0/d0 + cheat + description:Infinite health + code:bfbc/fe/bd + cheat + description:Infinite lives + code:bb85/de/bd + cheat + description:Infinite 'zzz' + code:9031/de/ad + cheat + description:Have all characters + code:b9e7/f0/d0+b9d9/d0/f0 + cheat + description:Hit anywhere + code:cf18/0d/00+cf20/f0/10+cefc/f0/50 + cheat + description:One hit kills + code:cf6c/f0/d0 + cheat + description:No enemies + code:a198/05/00+a197/ad/a9+a199/01/ea + cheat + description:Always able to switch characters + code:b9ce/f0/30 + cheat + description:Freddy will not show up in Nightmare World + code:e0f1/ce/ad + cheat + description:Mega-jumping teenagers + code:b4b5/03/05 + cheat + description:Don't lose 'zzz' when hit + code:d0db/80/00 + cheat + description:Don't lose 'zzz' when standing still + code:902b/01/00 + cheat + description:Lose 'zzz' quicker + code:902b/01/02 + cheat + description:Start with 1 continue + code:ea38/03/01 + cheat + description:Start with 6 continues + code:ea38/03/06 + cheat + description:Start with 9 continues + code:ea38/03/09 + +cartridge sha256:02caaf66cc43a4c5a8d54252fca7bcb929dad91c71f127eabe37f29ef9199105 + name:Nightshade (USA) + cheat + description:Invincible in fights + code:d6dc/46 + cheat + description:Invincible out of fights + code:d5d8/46 + +cartridge sha256:590e508b47eb6d6c0088dffd83fe2436edd0d75e74faba7a9da2008770fb1986 + name:Niji no Silk Road (Japan) + cheat + description:Walk anywhere + code:8187/36/89+8188/82/81 + +cartridge sha256:b1c2ae757c5ec76f488893f130f0f7f1aacf36a25467b9012ca3a11ab52204ce + name:Ninja Crusaders (USA) + cheat + description:Invincibility + code:c05f/d0/f0 + cheat + description:Infinite lives + code:c148/de/bd + cheat + description:Hit anywhere + code:ce7f/f0/4c+ce80/1b/d1+ce81/b9/ce + cheat + description:Collect items from anywhere + code:a61b/b0/24+a62e/b0/24 + cheat + description:Multi-jump + code:ae58/f0/24 + cheat + description:Mega-jump + code:ae7f/12/25 + cheat + description:Super speed + code:8b2d/fe/fd+8b2b/01/02 + cheat + description:Start with 1 life + code:a890/03/01 + cheat + description:Start with 6 lives + code:a890/03/06 + cheat + description:Start with 9 lives + code:a890/03/09 + cheat + description:Start on stage 1-2 + code:9406/00/01 + cheat + description:Start on stage 2-1 + code:9406/00/02 + cheat + description:Start on stage 2-2 + code:9406/00/03 + cheat + description:Start on stage 3-1 + code:9406/00/04 + cheat + description:Start on stage 3-2 + code:9406/00/05 + cheat + description:Start on stage 4-1 + code:9406/00/06 + cheat + description:Start on stage 4-2 + code:9406/00/07 + cheat + description:Start on stage 5-1 + code:9406/00/08 + +cartridge sha256:6799437d4122b81c86ae35cefe5b6ae6e10e6f9a9c7b3140dd569f717ba32b3d + name:Ninja Gaiden (USA) + cheat + description:Invincibility + code:e162/a9 + cheat + description:Invincibility (alt) + code:e177/a9/60 + cheat + description:Infinite health + code:e1af/85/a5 + cheat + description:Infinite lives + code:e401/c6/a5 + cheat + description:Hit anywhere + code:ded5/00+dee3/00+deeb/00+def3/10+def7/d0 + cheat + description:Enemies die instantly + code:ddf2/03/00+ded5/24/00+dee3/15/00+deeb/09/00+def3/90/10+def7/90/d0 + cheat + description:Multi-jump + code:eb8d/80/00+ed92/1d/00+eced/d0/24+ee35/d0/24+eef6/85/a5 + cheat + description:Use windmill throwing-star without losing spiritual strength + code:efae/05/00 + cheat + description:Use fire-wheel without losing spiritual strength + code:ef03/05/00 + cheat + description:Use shuriken without losing spiritual strength + code:ef67/03/00 + cheat + description:Maximum strength regained from restorer + code:dc04/06/10 + cheat + description:Sound Test - hold down and press Start at Tecmo Presents screen + code:805e/e6/04 + cheat + description:Start with 9 lives + code:e53b/02/08 + cheat + description:Start with 6 lives + code:e53b/02/05 + cheat + description:Start with 1 life + code:e53b/02/00 + cheat + description:Invincibility after first hit + code:0092/02+0093/80 + cheat + description:One hit kills bosses + code:0497/00 + cheat + description:Start on stage 1-2 + code:006d/01 + cheat + description:Start on stage 2-1 + code:006d/02 + cheat + description:Start on stage 2-2 + code:006d/03 + cheat + description:Start on stage 2-3 + code:006d/04 + cheat + description:Start on stage 3-1 + code:006d/05 + cheat + description:Start on stage 3-2 + code:006d/06 + cheat + description:Start on stage 3-3 + code:006d/07 + cheat + description:Start on stage 4-1 + code:006d/08 + cheat + description:Start on stage 4-2 + code:006d/09 + cheat + description:Start on stage 4-3 + code:006d/0a + cheat + description:Start on stage 4-4 + code:006d/0b + cheat + description:Start on stage 5-1 + code:006d/0c + cheat + description:Start on stage 5-2 + code:006d/0d + cheat + description:Start on stage 5-3 + code:006d/0e + cheat + description:Start on stage 5-4 + code:006d/0f + cheat + description:Start on stage 6-1 + code:006d/10 + cheat + description:Start on stage 6-2 + code:006d/11 + cheat + description:Start on stage 6-3 + code:006d/12 + cheat + description:Start on stage 6-4 (1st boss) + code:006d/13 + cheat + description:Start on stage 6-4 (2nd boss) + code:006d/14 + cheat + description:Start on stage 6-5 (final boss) + code:006d/15 + +cartridge sha256:21c51dc47a458a7de66544533d56eb9a69de0190d012b1645699e816d2cb5008 + name:Ninja Gaiden II - The Dark Sword of Chaos (USA) + cheat + description:Invincibility + code:cc34/50/a5 + cheat + description:Invincibility (alt) + code:ca1b/cb/91 + cheat + description:Infinite health + code:cc74/85/80 + cheat + description:Infinite health (alt) + code:cc74/85/a5 + cheat + description:Infinite Ninja power + code:9a8d/a6/a2+9a8e/7d/13+9a9d/4b/39 + cheat + description:Infinite time + code:c6eb/c6/a5 + cheat + description:Infinite lives + code:c8a2/c6/a5 + cheat + description:Hit anywhere + code:ca6a/d3/00+ca81/bc/00+ca92/0d/00+ca9c/b0/f0 + cheat + description:Multi-jump + code:c150/10/80+c157/d0/24+c14e/1f/13+c152/06/1b+d908/8d/ad+c14d/f0/a5+d97a/8d/ad+d7dd/86/a6 + cheat + description:Half-energy from medicine + code:98bd/06/03 + cheat + description:Double energy from medicine + code:98bd/06/0c + cheat + description:Never lose Ninja power item + code:cdcb/86/24 + cheat + description:Fast running Ryu + code:c0a7/01/02+c08f/fe/fd + cheat + description:Mega-fast running Ryu + code:c0a7/01/03+c08f/fe/fc + cheat + description:Half-energy from Blue Ninja power + code:983f/0a/05+9849/0a/05 + cheat + description:Double energy from Blue Ninja power + code:983f/0a/14+9849/0a/14 + cheat + description:Double maximum Ninja power from scroll + code:9881/0a/14+9898/01/02 + cheat + description:All powers use up only 5 points + code:9a92/fd/ed+9a9c/fd/ed+9aaa/fd/ed + cheat + description:Less enemies + code:e32f/00 + cheat + description:Start every life with two shadow ninjas + code:d117/09/0f + cheat + description:Start with 1 life + code:cec6/02/00 + cheat + description:Start with 6 lives + code:cec6/02/05+cecc/95/85 + cheat + description:Start with 9 lives + code:cec6/02/08+cecc/95/85 + cheat + description:Invincibility (alt) + code:0068/09 + cheat + description:Infinite health (alt) + code:0080/16 + cheat + description:Infinite lives (alt) + code:00a5/03 + cheat + description:Infinite time (alt) + code:00ab/04+00b1/f4 + +cartridge sha256:ba5968f14a02f1adf8a6144fcf9c4acde80bce8a3e01bae54b555f258540dd4b + name:Ninja Gaiden III - The Ancient Ship of Doom (USA) + cheat + description:Invincibility + code:9fe7/03/00 + cheat + description:Infinite lives + code:cb8e/c6/a5 + cheat + description:Infinite health + code:a30d/85/a5 + cheat + description:Infinite time (timer will still countdown) + code:a565/c6/a5 + cheat + description:Infinite continues + code:cba7/c6/a5 + cheat + description:Multi-jump and infinite time + code:a8f9/14/00+a55c/32/20+a55a/8b/90+93b2/b0/24+a55b/d0/03+a558/bf/13+a55e/cf/a9+a57d/c6/a5+a55d/c6/da+a559/05/0a + cheat + description:Less time + code:cc42/fa/96 + cheat + description:One hit kills + code:a0ce/0f/00 + cheat + description:Sword hits several areas of the screen at once (sword upgrade negates the effect) + code:cc28/10/7f+cc2c/07/7f + cheat + description:No power required for Windmill Throwing Star + code:9fd4/01/00+9fca/0a/00 + cheat + description:No power required for Fire Wheel Art + code:9fcb/08/00+9fd0/08/00 + cheat + description:No power required for Invincible Fire Wheel + code:9fce/14/00+9fd8/02/00 + cheat + description:No power required for Fire Dragon Balls + code:9fcc/08/00+9fd1/08/00 + cheat + description:No power required for Vacuum Wave Art + code:9fcd/0a/00+9fd7/01/00 + cheat + description:Start with upgraded sword + code:cc24/00/01+cc28/10/18+cc2c/07/10 + cheat + description:Start with 5 lives + code:cc06/02/04 + cheat + description:Invincibility (alt) + code:00ad/14 + cheat + description:Infinite health (alt) + code:00a7/0a + +cartridge sha256:648cf7ac553517573cc9b3955ab50566a91974b2348154910bfa53ef15d55b56 + name:Ninja Jajamaru - Ginga Daisakusen (Japan) + cheat + description:Invincibility + code:9674/20/ad + cheat + description:Infinite lives + code:946c/de/dd + +cartridge sha256:bf546b0ce7fc60d89020ff7c0fadc7369925ba68a84d25b03de4190a91c46a95 + name:Ninja Jajamaru-kun (Japan) + cheat + description:Infinite time + code:002a/78 + cheat + description:Hit anywhere + code:9a70/06/00+9a60/21/00+9aa2/8d/ad + +cartridge sha256:622c62d48aa244fb2427ce8d0cf45e5fc57d94ad82e47a3b5b45a0dd643c9cd7 + name:Ninja Kid (USA) + cheat + description:Infinite Feathers + code:a913/c6/a5 + cheat + description:Infinite Stars + code:a62d/c6/a5 + cheat + description:Infinite Boomerangs + code:94fc/c6/a5 + cheat + description:Infinite Fireflames + code:a7b2/c6/a5 + cheat + description:More Invincibility time + code:d703/0f/28 + cheat + description:Less Invincibility time + code:d703/0f/07 + cheat + description:1 Feather on pick-up + code:d82a/03/01 + cheat + description:6 Feathers on pick-up + code:d82a/03/06 + cheat + description:10 Stars on pick-up + code:d82b/14/0a + cheat + description:40 Stars on pick-up + code:d82b/14/28 + cheat + description:1 Boomerang on pick-up + code:d82c/04/02 + cheat + description:10 Fireflames on pick-up + code:d82d/14/0a + cheat + description:40 Fireflames on pick-up + code:d82d/14/28 + cheat + description:Start with 1 life + code:806a/02/00 + cheat + description:Start with 6 lives + code:806a/02/05 + cheat + description:Start with 9 lives + code:806a/02/08 + +cartridge sha256:b0e4d88db0b21db4a84e3c21d51898c686e9031dc138b2939877ecad20dd2350 + name:Nintendo World Cup (USA) + cheat + description:1 minute in tournament mode + code:ea3c/03/00 + cheat + description:6 minutes in tournament mode + code:ea3c/03/05 + cheat + description:9 minutes in tournament mode + code:ea3c/03/08 + cheat + description:6 minutes in match mode + code:ea42/09/05 + cheat + description:3 minutes in match mode + code:ea42/09/02 + cheat + description:1 minutes in match mode + code:ea42/09/00 + cheat + description:Faster players + code:bda3/00/01 + cheat + description:More powerful 'normal' shots + code:aa2f/38/70 + +cartridge sha256:6157c99fe7a214025c65fd3649e4afe9cd2d38c333e65af028b935e49fbeb500 + name:Noah's Ark (Europe) + cheat + description:Invincibility + code:b83f/20/ad + cheat + description:Invincible against spikes + code:cf8b/20/ad + cheat + description:Infinite lives + code:83fc/ce/cd+88d6/ce/cd + cheat + description:Infinite health + code:bc4b/85/a5 + cheat + description:Infinite time + code:e10a/ce/cd + +cartridge sha256:55c2d10ae1b034b39533f780f6205f736735df1954c0eca6d147cfc13a224f82 + name:North and South (USA) + cheat + description:Cannon has 5 shots + code:81b6/09/05 + cheat + description:Cannon has 15 shots + code:81b6/09/0f + cheat + description:Cannon has infinite shots + code:9327/de/ad + cheat + description:No cannons allowed + code:81a6/9d/2c + cheat + description:Only 2 daggers in the fortress + code:8134/04/02 + cheat + description:Infinite daggers in the fortress + code:94a3/de/2c + cheat + description:2 men in the fortress + code:813e/0a/02 + cheat + description:5 men in the fortress + code:813e/0a/05 + cheat + description:2 men on the train + code:8154/0a/02 + cheat + description:5 men on the train + code:8154/0a/05 + +cartridge sha256:106a9cd2acc3373bf2fae05158bdf7587d5f645402ba8073aaee65cb8b7b11cd + name:Operation Secret Storm (USA) (Unl) + cheat + description:Infinite lives + code:e33a/99/b9 + cheat + description:Infinite Gun ammo + code:e54f/99/bd + cheat + description:Infinite health + code:0520/17 + +cartridge sha256:36666e3314ee9e0a340b04ea8427aaefb6df8937425a016e78c26fb1fa77b017 + name:Operation Wolf (USA) (Rev 0A) + cheat + description:Infinite continues + code:bdef/09/05 + cheat + description:Never die + code:d2db/36/00 + cheat + description:Infinite magazines + code:d56d/01/00 + cheat + description:Infinite grenades + code:d600/01/00 + cheat + description:Double bullets in each magazine + code:d577/02/04 + cheat + description:Heal completely between levels + code:d08a/03/ff + cheat + description:Grenades inflict double damage + code:b27b/02/04 + cheat + description:Super power drinks + code:b104/05/0a + cheat + description:Increase magazines + code:cfee/07/09+d56d/05/09 + cheat + description:Increase grenades + code:cff2/05/09+d56d/03/09 + cheat + description:Start on mission 2 + code:a4d5/00/01 + cheat + description:Start on mission 3 + code:a4d5/00/02 + cheat + description:Start on mission 4 + code:a4d5/00/03 + cheat + description:Start on mission 5 + code:a4d5/00/04 + cheat + description:Start on mission 6 + code:a4d5/00/05 + +cartridge sha256:4d2b5339703d2300539348e3aad055fd00828afcbd9f3a97565e37725221fc0a + name:Orb 3D (USA) + cheat + description:Infinite fuel + code:03fd/50 + cheat + description:Start on level 10 + code:03e2/09 + cheat + description:Start on level 15 + code:03e2/13 + cheat + description:Start on level 30 + code:03e2/1d + +cartridge sha256:6d310d9f2249932c7187130ebd696c42ff05f678c3086ac727ee6a27fdad4f43 + name:Otaku no Seiza - An Adventure in the Otaku Galaxy (Japan) + cheat + description:No random battles + code:dc82/a9/60 + cheat + description:Walk anywhere + code:dd70/2d/00 + +cartridge sha256:d50327afa539f4a5ccfd6e10f685326eb0f01915ccf305f752deae2bf17385a6 + name:Over Horizon (Europe) + cheat + description:Invincibility (blinking) + code:def0/c6/a5 + cheat + description:Infinite lives + code:bdb0/ce/ad + cheat + description:Enable alternate graphics + code:d685/00/01 + +cartridge sha256:b3a798ab7f2f237c7bd3c3e8b36cc752d850d10a8597e43771c82dcd654d5dae + name:Overlord (USA) + cheat + description:Food not decreased + code:8101/0d/1c + cheat + description:Hover tanks never decrease in battle + code:beac/ce/ad + cheat + description:Ballistic Missiles never decrease in battle + code:9149/ce/ad + cheat + description:Homing Missiles never decrease in battle + code:9154/ce/ad + cheat + description:Enemy starts with 0 Missiles + code:bf6c/9f/a7 + cheat + description:Constantly get 9999999 cash on all planets with 1% or higher tax + code:81c3/b0/d0 + cheat + description:View a planet's stats for high food + code:b725/00/7f+b729/b9/99 + cheat + description:View a planet's stats for high people + code:b810/00/7f+b814/b9/99 + cheat + description:View a planet's stats for high energy + code:b7cf/00/7f+b7d3/b9/99 + cheat + description:View a planet's stats for high fuel + code:b78e/00/7f+b792/b9/99 + +cartridge sha256:ae2dddda1f90b8f8e3a990a2247ab4e373f69e6599f4e63f531d3a541b54bd85 + name:P.O.W. - Prisoners of War (USA) + cheat + description:Invincibility + code:ba6b/85/60 + cheat + description:Infinite lives + code:d1fb/01/00 + cheat + description:Infinite bullets + code:ce61/01/00 + cheat + description:One hit kills + code:b90d/bd/b9 + cheat + description:Hit anywhere + code:b8df/23/00+b8de/b0/4c+b8e0/c8/b9 + cheat + description:Take less damage when hit from behind + code:bb11/f9/ed + cheat + description:Keep weapons after dying + code:bb3f/8d/2c+bd51/8d/2c + cheat + description:Start with half health + code:c341/20/10+d20f/20/10 + cheat + description:Start with 1 life + code:82bd/02/00 + cheat + description:Start with 6 lives + code:82bd/02/05 + cheat + description:Start with 9 lives + code:82bd/02/08 + cheat + description:Start with 99 lives + code:82bd/02/63 + cheat + description:Have infinite Grenades, Brass Knuckles, Armor Vest + code:0438/f9 + cheat + description:Have infinite Knives, Brass Knuckles, Armor Vest + code:0438/e5 + cheat + description:Have infinite Gun, Brass Knuckles, Armor Vest + code:0438/db + cheat + description:Start on stage 2 (disable after stage begins) + code:0047/01 + cheat + description:Start on stage 3 (disable after stage begins) + code:0047/02 + cheat + description:Start on stage 4 (disable after stage begins) + code:0047/03 + cheat + description:Start on stage 5 (disable after stage begins) + code:0047/04 + cheat + description:Start on stage 6 (disable after stage begins) + code:0047/05 + +cartridge sha256:fa12a61eb787bf8346a81e5b6eaede75238a1735db24a6f4df51ac3a6b499f18 + name:Pac-Man (USA) (Namco) + cheat + description:Invincibility + code:d307/f0/24 + cheat + description:Get 8000+ points for eating ghosts + code:d31b/a4/a0+d31c/d9/06+d327/e6/a5 + cheat + description:Power Pill effect always active + code:0088/0f + cheat + description:Infinite lives + code:0067/03 + +cartridge sha256:1e60a181e1f89f2249a3e0d44a7765c2cdd9e0446f1671c63bf2c6f6df562d4c + name:Pac-Man (USA) (Tengen) + cheat + description:Invincibility + code:d2c6/f0/24 + cheat + description:Walk through walls + code:d36f/18/00+d43a/d0/50+d473/f0/50+d46a/f0/70 + cheat + description:Get 8000+ points for eating ghosts + code:d2da/a4/a0+d2db/d9/06+d2e6/e6/a5 + cheat + description:Ghosts are re-eatable until Power Pill wears off + code:d648/85/a5 + cheat + description:Power pills last longer + code:d166/3c/70 + cheat + description:Power pills last extra long + code:d166/3c/ff + cheat + description:Power pills don't last as long + code:d166/3c/20 + cheat + description:Power pills don't work + code:e022/a5/60 + cheat + description:Only 3 ghosts are edible + code:e02f/0f/0d + cheat + description:Only 2 ghosts are edible + code:e02f/0f/09 + cheat + description:Pac-Man moves manually + code:d35b/35/af + cheat + description:Power Pill effect always active + code:0088/15 + cheat + description:Infinite lives + code:0067/03 + +cartridge sha256:25506ac6d6413a73249d3ce6a4ecc40048982596e01d778eddb71baca084efa6 + name:Pac-Man (USA) (Tengen) (Unl) + cheat + description:Invincibility + code:d2c6/f0/24 + cheat + description:Get 8000+ points for eating ghosts + code:d2da/a4/a0+d2db/d9/06+d2e6/e6/a5 + cheat + description:Ghosts are re-eatable until Power Pill wears off + code:d648/85/a5 + cheat + description:Power pills last longer + code:d166/3c/70 + cheat + description:Power pills last extra long + code:d166/3c/ff + cheat + description:Power pills don't last as long + code:d166/3c/20 + cheat + description:Power pills don't work + code:e022/a5/60 + cheat + description:Only 3 ghosts are edible + code:e02f/0f/0d + cheat + description:Only 2 ghosts are edible + code:e02f/0f/09 + cheat + description:Power Pill effect always active + code:0088/15 + cheat + description:Infinite lives + code:0067/03 + +cartridge sha256:acc561f57cfd0490fdce649deb16fa9df309bba1695608213a0ff8066d662492 + name:Pac-Mania (USA) (Unl) + cheat + description:Infinite lives + code:d941/c6/a5 + cheat + description:Trapped ghosts + code:cfe3/78 + cheat + description:Go through ghosts + code:d8b6/95 + cheat + description:Ghosts worth 3200 points + code:d88f/01 + +cartridge sha256:6c47c73eb510fb0f71eeb2a3f5cca7c25eca8678ffe060aa17df6534dbd10ef1 + name:Panic Restaurant (USA) + cheat + description:Invincibility + code:90b1/d0/f0 + cheat + description:Infinite health - except when you fall on spikes + code:90e1/c6/a9 + cheat + description:Infinite health (alt) + code:90e1/c6/a5 + cheat + description:Infinite time + code:c26c/c6/a9 + cheat + description:Infinite time (alt) + code:c26c/c6/c5 + cheat + description:Infinite lives + code:d418/c6/85 + cheat + description:Infinite lives (alt) + code:d418/c6/a5 + cheat + description:Hit anywhere + code:92c7/be/00+92e4/a1/00 + cheat + description:Moon-jump + code:c303/29/00 + cheat + description:Start with 4 hearts + code:f452/02/04 + cheat + description:Start with 2 lives + code:ad17/02/01 + cheat + description:Start with 5 lives + code:ad17/02/05 + cheat + description:Start with 6 hearts (heart meter will be distorted) + code:f452/02/06 + cheat + description:Start with 10 hearts (heart meter will be distorted) + code:f452/02/0a + cheat + description:Start with 10 lives (meter will display 9) + code:ad17/02/0a + cheat + description:Start with 15 lives (meter will display 9) + code:ad17/02/0f + cheat + description:Start with 80 on timer (1st level only) + code:f464/63/50+cf6a/63/50 + cheat + description:Start with 70 on timer (1st level only) + code:f464/63/46+cf6a/63/46 + cheat + description:Start with 60 on timer (1st level only) + code:f464/63/3c+cf6a/63/3c + +cartridge sha256:73f0f7b9150fb080541426cedc87bf528c63393e6112812112e8c1339d9bfbf5 + name:Panda Prince, The (Shin-Shin) (Unl) + cheat + description:Infinite lives + code:979b/85/a5 + +cartridge sha256:f1c9c4723190d6be5f1f683ad5fd8cc123abd70d42f486c175a25f1237db6199 + name:Paperboy (USA) + cheat + description:Invincibility against moving objects + code:8a79/90/18+8a7a/04/60 + cheat + description:Invincibility against non-moving objects + code:9c45/06/00 + cheat + description:Infinite lives + code:8ade/c6/a5 + cheat + description:Infinite papers + code:987c/c6/a9 + cheat + description:Infinite time in training course + code:982b/8d/ad + cheat + description:Broken windows count as deliveries + code:9943/02/01 + cheat + description:Can deliver to houses with broken windows + code:9944/99/ad + cheat + description:Deliver from anywhere (must be within range of house) + code:98d9/f0/50+98da/50/77 + cheat + description:Hold down to stop moving + code:8fc3/3f/00+8fc1/06/0d + cheat + description:Gain 20 papers on pick-up + code:9b3f/0a/14 + cheat + description:Start with 1 life + code:9d38/04/01 + cheat + description:Start with 6 lives + code:9d38/04/06 + cheat + description:Start with 20 papers + code:89a3/0a/14 + +cartridge sha256:dec09033f68850bd25cf3e8bf0e05a44970301c4aaac2cbc27b8f9e96392b409 + name:Paperboy 2 (USA) + cheat + description:Infinite lives + code:834a/01/00 + cheat + description:Infinite papers + code:9be7/01/00 + cheat + description:5 papers on pick-up + code:8990/0a/05 + cheat + description:15 papers on pick-up + code:8990/0a/0f + cheat + description:20 papers on pick-up + code:8990/0a/14 + cheat + description:Start with 1 life - Paperboy only + code:b49f/05/01 + cheat + description:Start with 3 lives - Paperboy only + code:b49f/05/03 + cheat + description:Start with 10 lives - Paperboy only + code:b49f/05/0a + cheat + description:Start with 15 papers + code:b604/0a/0f + cheat + description:Start with 20 papers + code:b604/0a/14 + +cartridge sha256:25ae9f90412612715a254973006f0056016a840efc8af1fbdb6fc2eb7cd5eb7c + name:Parasol Stars - Rainbow Islands II (Europe) + cheat + description:Invincibility + code:005c/03 + cheat + description:Automatically finish levels + code:0320/00+0321/00+0322/00+0323/00+0324/00+0325/00+0326/00+0327/00 + cheat + description:Make the Miracle Icon appear (enable then disable) + code:04fb/01 + +cartridge sha256:f0d89b53126513e1df56b46bae3a43b4a4b87543d48974c9087ba94737249801 + name:Parodius (Europe) + cheat + description:Enemies die automatically + code:008b/02 + cheat + description:Infinite Shield on pick-up + code:64d0/0f + +cartridge sha256:f1762c9f40e6e45a123b73a035841768e0132fa82c92f9d066a8718a7f99b6cc + name:Pesterminator (USA) (Unl) + cheat + description:Infinite health + code:d799/ce/e6 + cheat + description:Infinite lives + code:d0f5/ce/ae + +cartridge sha256:1c598fe0b58811b1bedfc6f2cda05f0960b4a6e2770c8a2f73cd6da370ed2448 + name:Phantom Fighter (USA) + cheat + description:Infinite health + code:a3d3/8d/ad + cheat + description:Take less damage when attacked + code:a3d1/e5/e9+a3d2/00/01 + cheat + description:Start with Sacred Sword + code:cc68/85/e6+cc69/87/84 + cheat + description:Start with Bell + code:cc68/85/e6+cc69/87/85 + cheat + description:Start with Tonten + code:cc68/85/e6+cc69/87/83 + cheat + description:Start with Talisman + code:cc68/85/e6+cc69/87/82 + cheat + description:Start with 3 Scrolls + code:cc5f/00/03+cc69/87/86 + cheat + description:Start with 6 Scrolls + code:cc5f/00/06+cc69/87/86 + cheat + description:Infinite HP + code:0408/c8 + cheat + description:Max HP + code:040a/c8 + cheat + description:One hit kills + code:0448/01 + cheat + description:Have 99 Scrolls + code:0086/63 + cheat + description:Have 3 Crystal Balls + code:0087/03 + cheat + description:Have strongest punch + code:0076/03 + cheat + description:Have strongest kick + code:0077/03 + cheat + description:Have highest jump + code:0078/03 + cheat + description:Have best Tiger move + code:0079/03 + cheat + description:Have best Mirage move + code:007a/03 + cheat + description:Have Talisman + code:0082/01 + cheat + description:Have Tonten + code:0083/01 + cheat + description:Have Sacred Sword + code:0084/01 + cheat + description:Have Bell + code:0085/01 + +cartridge sha256:c701cffa5315b4375c0a71d2e7378137bcdeed0684f57bf7eb2fbed3b2c1b1da + name:Pictionary - The Game of Video Quick Draw (USA) + cheat + description:Infinite time + code:0084/20 + +cartridge sha256:f4ddb0f1a02f823ebed30b55547344de3c8fb9d87254ff993584373ecadd9141 + name:Pin Bot (USA) + cheat + description:Infinite balls + code:e26f/e6/a9 + cheat + description:Start with only 1 ball + code:e274/03/01 + cheat + description:Start with 6 balls + code:e274/03/06 + cheat + description:Start with 9 balls + code:e274/03/09 + +cartridge sha256:910ba4505b46a99b3779d84fd22ba8b18f3a649b0c1a11706c4609d06ce0bc18 + name:Pinball (World) + cheat + description:Infinite balls + code:c0ab/de/bd + cheat + description:Start with lots of balls + code:c051/03/2f + cheat + description:Start with 1 ball + code:c051/03/01 + cheat + description:Start with 6 balls + code:c051/03/06 + cheat + description:Start with 9 balls + code:c051/03/09 + +cartridge sha256:836a6df9f6885b2b09d9daf3cecd67a4e5f36ae0b278a32c296779f067c8694f + name:Pinball Quest (USA) + cheat + description:Infinite Balls - Mini Games - P1 + code:8000/00/00 + cheat + description:Infinite Balls - Mini Games - P2 + code:06f9/63 + cheat + description:Infinite Balls - Mini Games - P3 + code:06fa/63 + cheat + description:Infinite Balls - Mini Games - P4 + code:06fb/63 + cheat + description:Max Attack Power - RPG mode + code:00c0/0c + cheat + description:Infinite Gold - RPG mode (1 of 3) + code:0082/63 + cheat + description:Infinite Gold - RPG mode (2 of 3) + code:0083/63 + cheat + description:Infinite Gold - RPG mode (3 of 3) + code:0084/63 + +cartridge sha256:7dd47bac196af9874181e86f64402035e255814739828d5d00c03bac8689d40a + name:Pipe 5 (Asia) (Unl) + cheat + description:Infinite time (disable to finish round) + code:0080/09 + cheat + description:1 distance needed + code:008e/01 + cheat + description:Automatically finish round + code:008e/00 + +cartridge sha256:a57f873ccb2c8842e9ef1a8380c87026a8ef0c6649f1cc02ce0743fae61ea120 + name:Pipe Dream (USA) + cheat + description:Infinite wrenches + code:e341/ce/ad + cheat + description:One-way pipes from level 1 + code:c212/05/00 + cheat + description:One-way pipes from level 5 + code:c210/03/05 + cheat + description:One-way pipes from level 10 + code:c219/03/0a + cheat + description:Tunnels galore + code:8eb3/8d/8c + cheat + description:Pumps instead of reservoirs + code:dc40/12/14 + cheat + description:Pumps before reservoirs + code:dc40/12/14+dc47/14/12 + cheat + description:Start with 1 wrench + code:8113/03/01 + cheat + description:Start with 6 wrenches + code:8113/03/06 + cheat + description:Start with 9 wrenches + code:8113/03/09 + +cartridge sha256:ac1215af2a3315f8bbff01987f24a85e9c1fe984287c05fc21246b0a66fd5dfd + name:Platoon (USA) (Rev A) + cheat + description:Stage 1 - Infinite grenades + code:91ca/c6/a5 + cheat + description:Stage 1 - Start with double capacity magazine + code:9057/c6/a5 + cheat + description:Stage 1 - Double hits + code:8fcd/04/08 + cheat + description:Stage 1 - Don't take damage + code:8fc3/e6/a5 + cheat + description:Stage 2 - Don't take damage + code:8e62/e6/a5 + cheat + description:Stage 4 - Infinite time + code:8acb/c6/a5 + cheat + description:Stage 4 - Play with more time + code:89e9/03/05 + cheat + description:Stage 4 - Double hits + code:914d/05/09 + cheat + description:Stage 4 - Halve hits + code:914d/05/02 + cheat + description:Stage 4 - Start with double ammo + code:89ab/06/0c + cheat + description:Start on stage 2 + code:8148/05/04 + cheat + description:Start on stage 3 + code:c004/06/03 + +cartridge sha256:61ac77e84b4aa089115a682a2e8cfaa6811ba83b567ae1f13d8b644e0c42a2bf + name:Platoon (USA) + cheat + description:Stage 1 - Infinite grenades + code:91ca/c6/a5 + cheat + description:Stage 1 - Start with double capacity magazine + code:9057/c6/a5 + cheat + description:Stage 1 - Double hits + code:8fcd/04/08 + cheat + description:Stage 1 - Don't take damage + code:8fc3/e6/a5 + cheat + description:Stage 2 - Don't take damage + code:8e62/e6/a5 + cheat + description:Stage 4 - Infinite time + code:8acb/c6/a5 + cheat + description:Stage 4 - Play with more time + code:89e9/03/05 + cheat + description:Stage 4 - Double hits + code:914d/05/09 + cheat + description:Stage 4 - Halve hits + code:914d/05/02 + cheat + description:Stage 4 - Start with double ammo + code:89ab/06/0c + cheat + description:Start on stage 2 + code:8148/05/04 + cheat + description:Start on stage 3 + code:c004/06/03 + +cartridge sha256:97f56ee3bcb0542996401a65c63a0e91c1c9c71da07f0619975e910946f9540d + name:Popeye (World) (Rev A) + cheat + description:Invincibility against enemy + code:d147/60 + cheat + description:Invincibility against shots + code:d35e/60 + cheat + description:Start with 1 life + code:c81f/01 + cheat + description:Start with 6 lives + code:c81f/06 + cheat + description:Start with 9 lives + code:c81f/09 + +cartridge sha256:23e457d854d5ce2bb8b81cef9fbbff0164171505a4d2d9e28ecbc2d062c81517 + name:Popo Team (Asia) (Unl) + cheat + description:Invincibility + code:004f/01 + cheat + description:Infinite lives + code:003f/03 + cheat + description:Slower enemies + code:004d/01 + +cartridge sha256:4986c3862a04fcf5b22df58b1182ec2ad636e6083714ac7c069adc1639023ebf + name:Power Blade (USA) + cheat + description:Infinite health + code:8a4d/e5/e9 + cheat + description:Infinite lives + code:d050/c6/a5 + cheat + description:Hit anywhere + code:8c97/22/00+8c8b/90/f0 + cheat + description:Take minimum damage + code:8a44/b9/ad + cheat + description:Mega-jump + code:d628/38/28 + cheat + description:Don't lose boomerang strength when you die + code:d036/c6/24+d066/85/24 + cheat + description:Don't lose multi-boomerangs when you die + code:d03c/c6/24+d06a/85/24 + cheat + description:Press Start to finish the level (don't use on Protect level) + code:d181/01/08+d183/4d/18+d184/a9/60 + cheat + description:Start a new game to view the ending + code:f67b/02/07 + cheat + description:Start with 1 life + code:f722/02/00 + cheat + description:Start with 6 lives + code:f722/02/05 + cheat + description:Start with 9 lives + code:f722/02/08 + cheat + description:Infinite health (alt) + code:04ab/12 + cheat + description:Infinite lives (alt) + code:0027/09 + cheat + description:Infinite time + code:0095/09+0096/99 + cheat + description:Infinite Bombs + code:005a/09 + cheat + description:Infinite health refills + code:005b/09 + cheat + description:Powered up Boomerang + code:005e/03 + cheat + description:Triple Boomerangs + code:0099/02 + cheat + description:One hit kills on bosses + code:04ba/00 + cheat + description:Moon jump (Can cause you to die in areas with no ceiling) + code:051d/c0 + cheat + description:Have Suit + code:009c/03 + cheat + description:Start on last stage + code:0059/3f + +cartridge sha256:6c462c3fa07aab70759376fe6b59e9c91e808f79fae2960f869bafc9cf20dca2 + name:Power Blade 2 (USA) + cheat + description:Infinite health - except for spikes + code:b3d2/e5/e9 + cheat + description:Infinite lives + code:d053/c6/24 + cheat + description:Infinite time + code:ca4a/a5/60 + cheat + description:Infinite life tanks + code:ee8a/c6/24 + cheat + description:Infinite energy tanks + code:d301/c6/24 + cheat + description:Speed up timer + code:ca47/3f/1f + cheat + description:Slow down timer + code:ca47/3f/7f + cheat + description:Throw meter doesn't decrease when boomerang is thrown + code:d24a/a5/85 + cheat + description:Take minimal damage + code:b3d2/e5/e9+b3d3/00/01 + cheat + description:Maximum throwing ability on pick-up + code:b56b/c9/a9+b572/e6/85 + cheat + description:Start a new game to view the ending + code:ee27/03/07 + cheat + description:Start with 1 life + code:86c9/02/00 + cheat + description:Start with 6 lives + code:86c9/02/05 + cheat + description:Start with 9 lives + code:86c9/02/08 + cheat + description:Infinite health + code:049a/12 + cheat + description:Infinite lives (alt) + code:009f/99 + cheat + description:Have max POW + code:0054/0f + cheat + description:Have max energy + code:00a0/12 + cheat + description:Have Dual Power-Blades + code:0099/01 + cheat + description:Have Red Power-Blades + code:00a2/01 + cheat + description:View ending + code:0018/07 + +cartridge sha256:ae360d56679f179109ca7d07ad8b4da644ad53a39ffe1d47c8db00648af4bdb0 + name:Power Punch II (USA) + cheat + description:Infinite health + code:fc02/85/a5 + cheat + description:Infinite health (alt) + code:00ce/ff + cheat + description:Instant win + code:00cd/00 + cheat + description:Max Punch + code:00c3/ff + cheat + description:max Stamina + code:00c4/ff + +cartridge sha256:76cdd991b85e4a15c62275fe6b3ccd5132ee2d17e70fe4d2173b8ce5d1193ec0 + name:Predator (USA) + cheat + description:Invincibility (normal mode) + code:8851/85/86+cc4f/c6/c9 + cheat + description:Infinite health (big mode) + code:8be2/ce/ee + cheat + description:Infinite health in jungle mode + code:ccb6/85/60 + cheat + description:Infinite lives in jungle mode + code:c274/ce/ad + cheat + description:Infinite lives in big mode + code:c1a2/ce/ad + cheat + description:Hit anywhere + code:ed08/a5/60+ed60/a5/60+ed21/a5/60+ecf4/a5/60+ed9d/a5/60 + cheat + description:Mega-jumps in jungle mode + code:819e/09/08 + cheat + description:Don't die if you fall down holes + code:880f/0c/ef+8810/a9/60 + cheat + description:Start each life with Laser Rifle + code:8859/0b/03+885b/ae/ba + cheat + description:Start with double lives + code:c16c/04/08 + cheat + description:Invincibility + code:0010/02 + cheat + description:Infinite lives + code:0504/09 + +cartridge sha256:7b0899bfde9661d1af5c2d88c46a8a70f1623729bf52db654fb40cda4554820b + name:Prince of Persia (USA) + cheat + description:Infinite health + code:8725/9d/bd + cheat + description:Infinite time + code:b245/8d/ad + cheat + description:Infinite health (except for deep sword hit or a long fall) (alt) + code:06cf/03 + cheat + description:Infinite time (alt) + code:04ef/80 + +cartridge sha256:99f3ca1657ad48f9a4f128dce3e0e4efd2c4fee413a120a462055801c9581ebd + name:Princess Tomato in the Salad Kingdom (USA) + cheat + description:Infinite gold coins + code:03cb/09 + +cartridge sha256:3910ae7495a71e6a55f70ed31eb345d28d6e9d524fe88679719d831f8f2553ce + name:Pro Sport Hockey (USA) + cheat + description:P1 goals worth 2 + code:b7da/01/02 + cheat + description:P1 goals worth 3 + code:b7da/01/03 + cheat + description:P1 goals worth 4 + code:b7da/01/04 + cheat + description:P1 goals worth 5 + code:b7da/01/05 + cheat + description:P1 goals worth 6 + code:b7da/01/06 + cheat + description:P1 goals worth 7 + code:b7da/01/07 + cheat + description:P1 goals worth 8 + code:b7da/01/08 + cheat + description:P2 goals worth 2 + code:b7f2/01/02 + cheat + description:P2 goals worth 3 + code:b7f2/01/03 + cheat + description:P2 goals worth 4 + code:b7f2/01/04 + cheat + description:P2 goals worth 5 + code:b7f2/01/05 + cheat + description:P2 goals worth 6 + code:b7f2/01/06 + cheat + description:P2 goals worth 7 + code:b7f2/01/07 + cheat + description:P2 goals worth 8 + code:b7f2/01/08 + cheat + description:P1 starts with 1 point + code:91f6/8d/ee + cheat + description:P2 starts with 1 point + code:91f9/8d/ee + cheat + description:P1 starts with 2 points + code:91f5/00/02+91fa/e7/e6 + cheat + description:P1 starts with 4 points + code:91f5/00/04+91fa/e7/e6 + cheat + description:P1 starts with 6 points + code:91f5/00/06+91fa/e7/e6 + cheat + description:P1 starts with 8 points + code:91f5/00/08+91fa/e7/e6 + cheat + description:P1 starts with 10 points + code:91f5/00/0a+91fa/e7/e6 + cheat + description:P2 starts with 2 points + code:91f5/00/02+91f7/e6/e7 + cheat + description:P2 starts with 4 points + code:91f5/00/04+91f7/e6/e7 + cheat + description:P2 starts with 6 points + code:91f5/00/06+91f7/e6/e7 + cheat + description:P2 starts with 8 points + code:91f5/00/08+91f7/e6/e7 + cheat + description:P2 starts with 10 points + code:91f5/00/0a+91f7/e6/e7 + +cartridge sha256:e144020f37416f80f1a0da47aa9b3fbda338c61fcd175e8b2dc98df181e24b85 + name:Pro Wrestling (USA) (Rev A) + cheat + description:Infinite health and time + code:e655/0b/ef+e654/d6/a9+e656/f0/85+e657/0a/67 + cheat + description:Only have 5 seconds to get back into ring + code:e286/14/05 + cheat + description:Only have 10 seconds to get back into ring + code:e286/14/0a + cheat + description:Have 30 seconds to get back into ring + code:e286/14/1e + cheat + description:Rounds are only 1 minute + code:dfa4/05/01 + cheat + description:Rounds are only 3 minutes + code:dfa4/05/03 + cheat + description:Rounds are 8 minutes + code:dfa4/05/08 + cheat + description:Rounds are 10 minutes + code:dfa4/05/0a + cheat + description:2-second pin count + code:e46e/03/02 + cheat + description:5-second pin count + code:e46e/03/05 + cheat + description:7-second pin count + code:e46e/03/07 + cheat + description:Infinite time (minutes) + code:0087/09 + cheat + description:Infinite time (seconds) + code:0086/3b + cheat + description:Pin once to win match + code:0077/00 + +cartridge sha256:96dafa1208bda2eaa601d6855d86cf670556018c2859805cae51a88f83e66e9e + name:Pro Wrestling (USA) + cheat + description:Infinite health and time + code:e655/0b/ef+e654/d6/a9+e656/f0/85+e657/0a/67 + cheat + description:Only have 5 seconds to get back into ring + code:e286/14/05 + cheat + description:Only have 10 seconds to get back into ring + code:e286/14/0a + cheat + description:Have 30 seconds to get back into ring + code:e286/14/1e + cheat + description:Rounds are only 1 minute + code:dfa4/05/01 + cheat + description:Rounds are only 3 minutes + code:dfa4/05/03 + cheat + description:Rounds are 8 minutes + code:dfa4/05/08 + cheat + description:Rounds are 10 minutes + code:dfa4/05/0a + cheat + description:2-second pin count + code:e46e/03/02 + cheat + description:5-second pin count + code:e46e/03/05 + cheat + description:7-second pin count + code:e46e/03/07 + cheat + description:Infinite time (minutes) + code:0087/09 + cheat + description:Infinite time (seconds) + code:0086/3b + cheat + description:Pin once to win match + code:0077/00 + +cartridge sha256:635271fe654636ec37c882f76c5f8cd39b7b3a476c9aa75cefb548d82de8f896 + name:Punch-Out!! (USA) + cheat + description:Infinite health + code:0391/60 + cheat + description:Infinite hearts + code:0326/42 + cheat + description:Infinite Stars + code:0342/04 + cheat + description:One-hit knockdowns + code:0398/01 + +cartridge sha256:ea81de1a6d901d8d1ad229a6d8d88edcc8e1aeeae6146aa4cd01eb0310eb44d5 + name:Punisher, The (USA) + cheat + description:Invincibility (blinking) + code:e4c4/f0/d0+e4c6/ca/e8 + cheat + description:Infinite health + code:a974/8d/ad+a631/8d/ad+a947/8e/ae + cheat + description:Infinite Grenades + code:ef5d/ca/ea + cheat + description:Infinite bullets and Rockets + code:f1d0/01/00 + cheat + description:Never lose a life against normal enemy + code:e29c/ca/ea + cheat + description:Never lose a life against end of level enemy + code:899a/ca/ea + cheat + description:Hit anywhere + code:a274/28/00+a21f/0d/00+a428/09/00+a12a/32/00 + cheat + description:Faster Punisher + code:b5bf/02/04 + cheat + description:Stage scrolls 2x as fast + code:e47c/00/01 + cheat + description:Stage scrolls 3x as fast + code:e47c/00/02 + cheat + description:Stage scrolls 4x as fast + code:e47c/00/03 + cheat + description:150 Machine Gun bullets on pick-up + code:fbb7/00/01 + cheat + description:150 Assault Rifle bullets on pick-up + code:fbba/00/01 + cheat + description:Less energy on pick-up + code:b90b/10/08 + cheat + description:More energy on pick-up + code:b90b/10/18 + cheat + description:Start with 1 life + code:e697/05/01 + cheat + description:Start with 10 lives + code:e697/05/0a + +cartridge sha256:691ef0807cacd7032c52ff65ab1718c28be45c7220afcc13f20c645dfb40d4ed + name:Puss n Boots - Pero's Great Adventure (USA) + cheat + description:Infinite health + code:cd71/85/a5 + cheat + description:Infinite lives + code:c21a/c6/a5 + cheat + description:Auto-fire and auto-jump + code:e81f/ff/00 + cheat + description:Mega-jump + code:cb27/09/00 + cheat + description:Start with less health + code:ebd7/38/1c + cheat + description:Start with 1 life + code:c092/03/01 + cheat + description:Start with 6 lives + code:c092/03/06 + cheat + description:Start with 9 lives + code:c092/03/09 + cheat + description:Start on stage 1 + code:c500/00/04 + cheat + description:Start on stage 2 + code:c500/00/09 + cheat + description:Start on stage 3 + code:c500/00/0e + cheat + description:Infinite health (alt) + code:0092/38 + cheat + description:Infinite lives (alt) + code:000a/09 + +cartridge sha256:0cf2fc17a59a0932ce43e6b2e9ea4e2570f03139784b5c9df429a499e734b92e + name:Puzznic (USA) + cheat + description:Press A to destroy blocks (no need to match blocks) + code:a639/94/00+a63d/05/00 + cheat + description:Slower timer + code:d241/3c/65 + cheat + description:Faster timer + code:d241/3c/1e + cheat + description:Start on level 2-1 + code:81b5/00/0a + cheat + description:Start on level 3-1 + code:81b5/00/14 + cheat + description:Start on level 4-1 + code:81b5/00/1e + cheat + description:Start on level 5-1 + code:81b5/00/28 + cheat + description:Start on level 6-1 + code:81b5/00/32 + cheat + description:Start on level 7-1 + code:81b5/00/3c + cheat + description:Start on level 8-1 + code:81b5/00/46 + cheat + description:Start on level 9-1 + code:81b5/00/50 + +cartridge sha256:5fa346174b6b5a9dc2b5fe113ef8d8ac013a32b26dde6d5dfc9ed631d5e9af25 + name:Q-bert (USA) + cheat + description:Infinite lives + code:a1d4/c6/a5 + cheat + description:Clear level automatically + code:c142/a5/a9 + cheat + description:Start with 1 life + code:9cb9/05/01+a323/05/01 + cheat + description:Start with 10 lives + code:a323/05/0a+9cb9/05/0a + cheat + description:Start on level 3 + code:9cd6/00/08 + cheat + description:Start on level 6 + code:9cd6/00/14 + cheat + description:Start on level 9 + code:9cd6/00/20 + cheat + description:Infinite lives - P1 + code:004c/63 + cheat + description:Start on level 1 round 2 + code:0049/01 + cheat + description:Start on level 1 round 3 + code:0049/02 + cheat + description:Start on level 1 round 4 + code:0049/03 + cheat + description:Start on level 2 round 1 + code:0049/04 + cheat + description:Start on level 2 round 2 + code:0049/05 + cheat + description:Start on level 2 round 3 + code:0049/06 + cheat + description:Start on level 2 round 4 + code:0049/07 + cheat + description:Start on level 3 round 1 + code:0049/08 + cheat + description:Start on level 3 round 2 + code:0049/09 + cheat + description:Start on level 3 round 3 + code:0049/0a + cheat + description:Start on level 3 round 4 + code:0049/0b + cheat + description:Start on level 4 round 1 + code:0049/0c + cheat + description:Start on level 4 round 2 + code:0049/0d + cheat + description:Start on level 4 round 3 + code:0049/0e + cheat + description:Start on level 4 round 4 + code:0049/0f + cheat + description:Start on level 5 round 1 + code:0049/10 + cheat + description:Start on level 5 round 2 + code:0049/11 + cheat + description:Start on level 5 round 3 + code:0049/12 + cheat + description:Start on level 5 round 4 + code:0049/13 + cheat + description:Start on level 6 round 1 + code:0049/14 + cheat + description:Start on level 6 round 2 + code:0049/15 + cheat + description:Start on level 6 round 3 + code:0049/16 + cheat + description:Start on level 6 round 4 + code:0049/17 + cheat + description:Start on level 7 round 1 + code:0049/18 + cheat + description:Start on level 7 round 2 + code:0049/19 + cheat + description:Start on level 7 round 3 + code:0049/1a + cheat + description:Start on level 7 round 4 + code:0049/1b + cheat + description:Start on level 8 round 1 + code:0049/1c + cheat + description:Start on level 8 round 2 + code:0049/1d + cheat + description:Start on level 8 round 3 + code:0049/1e + cheat + description:Start on level 8 round 4 + code:0049/1f + cheat + description:Start on level 9 round 1 + code:0049/20 + cheat + description:Start on level 9 round 2 + code:0049/21 + cheat + description:Start on level 9 round 3 + code:0049/22 + cheat + description:Start on level 9 round 4 + code:0049/23 + +cartridge sha256:882a02c538cb097531da74d0ad685f6896dcfb7fa9b1a0cd540b4274968a7c13 + name:Q Boy (Asia) (Unl) + cheat + description:Infinite lives + code:8f54/ce/ad + cheat + description:Infinite life + code:a9f2/ce/ad + cheat + description:Invincibility after first hit + code:95a7/c6/60 + cheat + description:Infinite Breath Power + code:aa8e/ce/ad+aa91/ce/ad + cheat + description:Infinite Lift Power + code:ab22/ce/ad+ab25/ce/ad + +cartridge sha256:745050dec23a692e1e759eb3e291f58ad7739fadb3a1308ec8d60085fefaec69 + name:QIX (USA) + cheat + description:1 life - P1 + code:8281/04/01 + cheat + description:1 life - P2 + code:8288/04/01 + cheat + description:Start on Level 5 - 1P game + code:8272/01/05 + cheat + description:Start on Level 10 - 1P game + code:8272/01/0a + cheat + description:Start on Level 20 - 1P game + code:8272/01/14 + cheat + description:Start on Level 5 - 2P game + code:828c/01/05 + cheat + description:Start on Level 10 - 2P game + code:828c/01/0a + cheat + description:Start on Level 20 - 2P game + code:828c/01/14 + +cartridge sha256:5dcea6d649f5ab79cf43dde76b92fb53b056fe92c6b49fd41f5158d9af0e9c32 + name:Quattro Adventure (USA) (Unl) + cheat + description:Boomerang Kid - Infinite lives + code:ce12/ce/ad + cheat + description:Boomerang Kid - Start with 6 lives + code:c611/03/06 + cheat + description:Linus Spacehead - Increase oxygen + code:c749/18/20 + cheat + description:Linus Spacehead - Never lose oxygen + code:b5b2/01/00 + cheat + description:Linus Spacehead - Never lose life in the water + code:c783/c6/a5 + cheat + description:Linus Spacehead - Never lose life in the land + code:d325/c6/a5 + cheat + description:Linus Spacehead - Start with 9 lives + code:c3c4/03/09 + cheat + description:Super Robin Hood - Invincibility + code:f59d/49/60 + cheat + description:Super Robin Hood - Infinite lives + code:c5fa/c6/a5 + cheat + description:Super Robin Hood - 9 energy hearts, you may lose some hearts when you pick up new ones + code:c603/03/09 + cheat + description:Super Robin Hood - Start with 1 life + code:c365/03/01 + cheat + description:Super Robin Hood - Start with 6 lives + code:c365/03/06 + cheat + description:Super Robin Hood - Start with 9 lives + code:c365/03/09 + cheat + description:Treasure Island Dizzy - Invincible Dizzy Starts you in the Island In The Sky, walk left to arrive at the original starting point - + code:d7aa/00/01 + cheat + description:Treasure Island Dizzy - Walk backwards + code:e874/a5/a9 + cheat + description:Treasure Island Dizzy - Start with snorkel + code:d7bf/00/01 + cheat + description:Treasure Island Dizzy - Start with axe + code:d7bf/00/01+f2cd/12/01 + cheat + description:Treasure Island Dizzy - Start with dynamite + code:d7bf/00/01+f2cd/12/02 + cheat + description:Treasure Island Dizzy - Start with heavy weight + code:d7bf/00/01+f2cd/12/05 + +cartridge sha256:a537916d210a97e41e669c77f3ebcccb681dc44db4d8b758c2109baf8590d918 + name:Quattro Arcade (USA) (Unl) + cheat + description:Go! Dizzy Go! - Always kill monsters + code:dbe5/ea+dbe6/ea + cheat + description:Go! Dizzy Go! - Walk through walls + code:d3e3/ea + cheat + description:Go! Dizzy Go! - Start with 1 life + code:c562/03/01 + cheat + description:Go! Dizzy Go! - Start with 6 lives + code:c562/03/06 + cheat + description:Go! Dizzy Go! - Start with 9 lives + code:c562/03/09 + cheat + description:Go! Dizzy Go! - Start on world 1, stage 3 + code:c58c/01/02 + cheat + description:Go! Dizzy Go! - Start on world 1, stage 5 + code:c58c/01/04 + cheat + description:Go! Dizzy Go! - Start on world 2, stage 2 + code:c58c/01/06 + cheat + description:Go! Dizzy Go! - Start on world 2, stage 4 + code:c58c/01/08 + cheat + description:Go! Dizzy Go! - Start on world 4, stage 2 + code:c58c/01/10 + cheat + description:Go! Dizzy Go! - Start on world 4, stage 4 + code:c58c/01/12 + cheat + description:Go! Dizzy Go! - Start on world 5, stage 1 + code:c58c/01/14 + cheat + description:Go! Dizzy Go! - Start on world 5, stage 3 + code:c58c/01/16 + cheat + description:Go! Dizzy Go! - Start on world 5, stage 5 + code:c58c/01/18 + cheat + description:Sunt Buggies - Infinite lives + code:a09a/ce/ad + cheat + description:Sunt Buggies - Start with 1 life + code:ec4a/03/01 + cheat + description:Sunt Buggies - Start with 6 lives + code:ec4a/03/06 + cheat + description:Sunt Buggies - Start with 9 lives + code:ec4a/03/09 + cheat + description:F-16 Renegade - Start with 2 lives - 1P game + code:c8b0/03/01 + cheat + description:F-16 Renegade - Start with 7 lives - 1P game + code:c8b0/03/06 + cheat + description:F-16 Renegade - Start with 10 lives - 1P game + code:c8b0/03/09 + cheat + description:F-16 Renegade - Start on level 3 + code:c8b5/01/03+c8c2/00/01 + cheat + description:F-16 Renegade - Start on level 5 + code:c8b5/01/05+c8c2/00/02 + cheat + description:F-16 Renegade - Start on level 7 + code:c8b5/01/07+c8c2/00/03 + cheat + description:F-16 Renegade - Start on level 9 + code:c8b5/01/09+c8c2/00/04 + cheat + description:C.J.'s Elephant Antics - Infinite lives + code:e3c2/de/bd + cheat + description:C.J.'s Elephant Antics - Start in Switzerland + code:f801/00/01 + cheat + description:C.J.'s Elephant Antics - Start in Egypt + code:f801/00/02 + cheat + description:C.J.'s Elephant Antics - Start in Africa + code:f801/00/03 + cheat + description:C.J.'s Elephant Antics - Always run fast after losing all lives + code:f31d/00/01 + cheat + description:C.J.'s Elephant Antics - Super C.J. after losing all lives + code:f31d/00/0f + cheat + description:C.J.'s Elephant Antics - Start with 1 life + code:ee55/09/01 + cheat + description:C.J.'s Elephant Antics - Start with 5 lives + code:ee55/09/05 + cheat + description:C.J.'s Elephant Antics - Start with 15 lives + code:ee55/09/0f + cheat + description:C.J.'s Elephant Antics - Start with 20 lives + code:ee55/09/14 + +cartridge sha256:d4f1650059a011455577561ea607993a5046d452ba987b1c7381cad56550be0a + name:R.B.I. Baseball (USA) + cheat + description:Auto fielding + code:fada/09/00+fa1a/30/f0+fa1b/13/0f + cheat + description:Perfectly straight pitches - both players + code:bad3/36/80+bad2/71/a9 + cheat + description:Super slow pitches - both players + code:baac/36/00+baab/b1/a9 + cheat + description:Slow pitches - both players + code:baac/36/03+baab/b1/a9 + cheat + description:Fast pitches - both players + code:baab/b1/a9+baac/36/07 + cheat + description:Super fast pitches - both players + code:baab/b1/a9+baac/36/0f + cheat + description:All missed pitches are strikes - both players + code:bbe5/d0/10 + +cartridge sha256:0df01b1d7b6efe38c98f2f0b131707d833c87874938d5722bf0a9a488c2e41c0 + name:R.B.I. Baseball 2 (USA) (Unl) + cheat + description:Auto fielding + code:fac6/09/00+a703/30/f0+a704/13/0f + +cartridge sha256:3f9e3d3b48a897d94003df004ab4b332d749f85ea5d0e1a1b29b6d4f5634049a + name:R.C. Pro-Am (USA) (Rev A) + cheat + description:Infinite continues + code:d101/01/00 + cheat + description:Max turbo on first pick-up + code:c1b0/01/04 + cheat + description:Max tires on first pick-up + code:c1cc/01/04 + cheat + description:Max speed on first pick-up + code:c165/01/04 + cheat + description:Double turbo on first pick-up + code:c1b0/01/02 + cheat + description:Double tires on first pick-up + code:c1cc/01/02 + cheat + description:Double speed on first pick-up + code:c165/01/02 + cheat + description:Computer cars go crazy + code:b2e4/40/ad + cheat + description:Always win as 1st place + code:005c/00 + cheat + description:Auto race at 128 MPH (disable if you get stuck) + code:05dc/80 + cheat + description:Max Super Sticky Tires + code:0453/04 + cheat + description:Max Turbo Acceleration + code:0454/04 + cheat + description:Max higher top speed + code:0455/04 + cheat + description:Infinite ammo for weapons + code:0459/63 + cheat + description:Have Bombs + code:045a/01 + cheat + description:Have Missiles + code:045a/02 + cheat + description:Have pick-up truck as vehicle + code:03f9/00 + cheat + description:Have off-road vehicle as vehicle + code:03f9/01 + cheat + description:Have race car as vehicle + code:03f9/02 + cheat + description:NINTENDO already spelled out (enable then disable) + code:03f7/08 + cheat + description:Computer cars go crazy (alt) + code:b2e4/ad + +cartridge sha256:aec6beb5b7e4d291a2bef75cb6dc43dc4db34f0313d26a8582ddf61b5b6a67c5 + name:R.C. Pro-Am (USA) + cheat + description:Infinite continues + code:d853/01/00 + cheat + description:Max turbo on first pick-up + code:c811/01/04 + cheat + description:Max tires on first pick-up + code:c82d/01/04 + cheat + description:Max speed on first pick-up + code:c7c6/01/04 + cheat + description:Double turbo on first pick-up + code:c811/01/02 + cheat + description:Double tires on first pick-up + code:c82d/01/02 + cheat + description:Double speed on first pick-up + code:c7c6/01/02 + cheat + description:Computer cars go crazy + code:b941/40/ad + cheat + description:Always win as 1st place + code:005c/00 + cheat + description:Auto race at 128 MPH (disable if you get stuck) + code:05dc/80 + cheat + description:Max Super Sticky Tires + code:0453/04 + cheat + description:Max Turbo Acceleration + code:0454/04 + cheat + description:Max higher top speed + code:0455/04 + cheat + description:Infinite ammo for weapons + code:0459/63 + cheat + description:Have Bombs + code:045a/01 + cheat + description:Have Missiles + code:045a/02 + cheat + description:Have pick-up truck as vehicle + code:03f9/00 + cheat + description:Have off-road vehicle as vehicle + code:03f9/01 + cheat + description:Have race car as vehicle + code:03f9/02 + cheat + description:NINTENDO already spelled out (enable then disable) + code:03f7/08 + cheat + description:Computer cars go crazy (alt) + code:b2e4/ad + +cartridge sha256:730399227c1566636f2e3475c398924165b21d88fc3321f60b29f4e6321a3c9c + name:R.C. Pro-Am II (USA) + cheat + description:Infinite credits + code:828c/de/bd + cheat + description:Infinite Lazers on purchase + code:e6cb/de/ad + cheat + description:Infinite Bombs on purchase + code:e4d2/de/ad + cheat + description:Infinite Freezes on purchase + code:e69c/de/ad + cheat + description:Infinite Buckshot on purchase + code:e52c/de/ad + cheat + description:Infinite Missiles on purchase + code:e556/de/ad + cheat + description:Items in the Model Shop are free if you have enough money + code:a43f/a5/60 + cheat + description:Buckshot costs 10 instead of 2,000 + code:e980/c8/01 + cheat + description:Mega Pulse costs 2,080 instead of 20,000 + code:e98b/07/00 + cheat + description:Scoopers costs 2,200 instead of 15,000 + code:e975/05/00 + cheat + description:Dynafit tires costs 2,320 instead of 10,000 + code:e973/03/00 + cheat + description:Mega Motor costs 1,360 instead of 50,000 + code:e96b/13/00 + cheat + description:Hyper Motor costs 1,840 instead of 30,000 + code:e969/0b/00 + cheat + description:Freeze costs 2,200 instead of 15,000 + code:e989/05/00 + cheat + description:Lazer costs 1,200 instead of 14,000 + code:e987/05/00 + cheat + description:Bombs costs 1,760 instead of 12,000 + code:e985/04/00 + cheat + description:Nobbies costs 1,880 instead of 7,000 + code:e971/02/00 + cheat + description:Missile costs 2,320 instead of 10,000 + code:e983/03/00 + cheat + description:Nitro costs 10 instead of 1000 + code:e97c/64/01 + cheat + description:Oil slicks costs 10 instead of 500 + code:e97a/32/01 + cheat + description:Skinny tires costs 10 instead of 2,000 + code:e96e/c8/01 + cheat + description:Gold Motor costs 10 instead of 16,000 + code:e967/06/00+e966/40/01 + cheat + description:Start with 1 credit instead of 3 + code:90db/02/00 + cheat + description:Start with 5 credits + code:90db/02/04 + cheat + description:Start with 7 credits + code:90db/02/06 + cheat + description:Start with 9 credits + code:90db/02/08 + cheat + description:Start on Track 02 + code:ce97/00/01 + cheat + description:Start on Track 03 + code:ce97/00/02 + cheat + description:Start on Track 04 + code:ce97/00/03 + cheat + description:Start on Track 05 + code:ce97/00/04 + cheat + description:Start on Track 06 + code:ce97/00/05 + cheat + description:Start on Track 07 + code:ce97/00/06 + cheat + description:Start on Track 08 + code:ce97/00/07 + cheat + description:Start on Track 09 + code:ce97/00/09 + cheat + description:Start on Track 10 + code:ce97/00/0a + cheat + description:Start on Track 11 + code:ce97/00/0b + cheat + description:Start on Track 12 + code:ce97/00/0c + cheat + description:Start on Track 13 + code:ce97/00/0d + cheat + description:Start on Track 14 + code:ce97/00/0e + cheat + description:Start on Track 15 + code:ce97/00/0f + cheat + description:Start on Track 16 + code:ce97/00/10 + cheat + description:Start on Track 17 + code:ce97/00/12 + cheat + description:Start on Track 18 + code:ce97/00/13 + cheat + description:Start on Track 19 + code:ce97/00/14 + cheat + description:Start on Track 20 + code:ce97/00/15 + cheat + description:Start on Track 21 + code:ce97/00/16 + cheat + description:Start on Track 22 + code:ce97/00/17 + cheat + description:Start on Track 23 + code:ce97/00/18 + cheat + description:Start on Track 24 + code:ce97/00/19 + cheat + description:Start on Track 25 + code:ce97/00/1b + cheat + description:Start on Track 26 + code:ce97/00/1c + cheat + description:Start on Track 27 + code:ce97/00/1d + cheat + description:Start on Track 28 + code:ce97/00/1e + cheat + description:Start on Track 29 + code:ce97/00/1f + cheat + description:Start on first Tug-O-Truck Challenge + code:ce97/00/08 + cheat + description:Start on Drag Race + code:ce97/00/11 + cheat + description:Start on second Tug-O-Truck Challenge + code:ce97/00/1a + cheat + description:Infinite continues + code:0771/09 + cheat + description:Infinite time at continue screen + code:0431/63 + +cartridge sha256:5cb8d03a90732d01737a401e8dc87a3d594ab2f901970f309fe551c0013ac5da + name:Race America (USA) + cheat + description:Can't down shift + code:b35c/d6/c5 + cheat + description:Cars only have 4 gears + code:b36d/07/05+a548/07/05 + cheat + description:Go super fast in 6th gear + code:9078/f0/a9+9079/05/ff+9224/e6/85 + +cartridge sha256:2e14f4481b5b762ba1ff0e7a25b07f316f7bdef0574a1704856f92823874f4e6 + name:Rad Racer (USA) + cheat + description:Infinite time + code:de27/ff + cheat + description:Never crash from things outside of the road + code:d54f/01/00 + cheat + description:Less time to finish each stage + code:de23/2d/24 + cheat + description:More time to finish each stage + code:de23/2d/3c + cheat + description:Turbo acceleration + code:c520/00/30 + cheat + description:Super Turbo acceleration + code:c53c/30/7f + cheat + description:Ultra Turbo acceleration + code:c581/00/01 + cheat + description:Start on stage 2 + code:c029/00/01+cec4/85/24 + cheat + description:Start on stage 3 + code:c029/00/02+cec4/85/24 + cheat + description:Start on stage 4 + code:c029/00/03+cec4/85/24 + cheat + description:Start on stage 5 + code:c029/00/04+cec4/85/24 + cheat + description:Start on stage 6 + code:c029/00/05+cec4/85/24 + cheat + description:Start on stage 7 + code:c029/00/06+cec4/85/24 + cheat + description:Start on stage 8 + code:c029/00/07+cec4/85/24 + cheat + description:Start on stage 2 (alt) + code:00e5/01 + cheat + description:Start on stage 3 (alt) + code:00e5/02 + cheat + description:Start on stage 4 (alt) + code:00e5/03 + cheat + description:Start on stage 5 (alt) + code:00e5/04 + cheat + description:Start on stage 6 (alt) + code:00e5/05 + cheat + description:Start on stage 7 (alt) + code:00e5/06 + cheat + description:Start on stage 8 (alt) + code:00e5/07 + +cartridge sha256:bcc8a24ab99f85933ff2cd0787daab6093710ef04f95b4c7bec842961ee0e3ad + name:Rad Racer II (USA) + cheat + description:Instant Boost + code:005f/ff + cheat + description:Don't wipeout when you hit something + code:005b/00 + +cartridge sha256:879ada5f1aa0282d81f9f13e91de53e181ed1030242029fcce002dfb8847c0c9 + name:Radia Senki - Reimei Hen (Japan) + cheat + description:No random battles + code:fab5/85/a5 + +cartridge sha256:5d9f7deb09c9de8725c293366c943e6fef0a505a72bb1bc92be7a7a055cde464 + name:Raf World (Japan) + cheat + description:Invincibility + code:ea0a/29/09+ea18/29/09 + cheat + description:Infinite energy + code:ea3b/85/a5 + cheat + description:Infinite weapons + code:8e33/85/a5 + cheat + description:Infinite lives + code:c3f7/c6/c5 + cheat + description:Double-jump + code:81cd/a9/60 + +cartridge sha256:d79be89ff83550ba185d19fb586d2b5f988ad6743125b5233ab3bfe2cb814c94 + name:Raid 2020 (USA) (Unl) + cheat + description:Infinite health + code:ddd8/ce/ad+dd4e/ce/ad + cheat + description:Infinite lives + code:d6ed/ce/ad + +cartridge sha256:b7b5fdf2b31c4b8c5340f93f166fb56aecf598f7c43a24b4334502bb81065143 + name:Raid on Bungeling Bay (USA) + cheat + description:Infinite Damage + code:e5e9/20/ad + cheat + description:Infinite Bombs + code:d5d0/ce/ad + cheat + description:Can only carry 5 Bombs + code:d015/2c/28 + cheat + description:Start with 9 lives + code:c7f2/05/09 + cheat + description:Start with 1 life + code:c7f2/05/01 + cheat + description:Start on round 3 + code:c7ee/01/03 + cheat + description:Start on round 6 + code:c7ee/01/06 + cheat + description:Start on round 9 + code:c7ee/01/09 + cheat + description:Infinite Bombs (alt) + code:0254/2c + cheat + description:0 Damage + code:024d/23+024e/23 + +cartridge sha256:9866b51b16b503aa515967929060eb100ae4cbd851229a3125ecf3ee7c88346e + name:Rally Bike (USA) + cheat + description:Infinite gas + code:c33b/ee/dd + cheat + description:Infinite lives - 1P game + code:d406/ee/ad + cheat + description:Infinite lives - 2P game, both players + code:d41d/fe/ad + cheat + description:Start with 1 life - 1P game + code:de34/05/01 + cheat + description:Start with 10 lives - 1P game + code:de34/05/0a + cheat + description:Start with 1 life - 2P game, both players + code:dd34/06/01+d42e/06/02 + cheat + description:Start with 10 lives - 2P game, both players + code:de34/05/0a+d42e/05/0b + +cartridge sha256:2596cf1e1a9b09dac24aeffea708807173ec81fa7093b2a729f1539aec3b5764 + name:Rambo (USA) (Rev A) + cheat + description:Invincibility + code:dd1a/b5/60 + cheat + description:Infinite weapons + code:ec9a/de/ad + cheat + description:Gain double amount on pick-up + code:e2a2/0a/14 + cheat + description:Gain maximum amount on pick-up + code:e2a2/0a/74 + cheat + description:Hit anywhere + code:d9ef/3a/00 + cheat + description:Start with 2 Medicine Bottles + code:868d/05/02 + cheat + description:Start with 9 Medicine Bottles + code:868d/05/62 + cheat + description:Start with Hand Grenades + code:867d/11/15+8683/11/15 + cheat + description:Infinite health + code:010c/64 + cheat + description:Max EXP + code:010f/23 + cheat + description:Infinite Throwing Knives + code:011d/99 + cheat + description:Infinite Missiles type 1 + code:011e/99 + cheat + description:Infinite Missiles type 2 + code:011f/99 + cheat + description:Infinite Machine Gun + code:0120/99 + cheat + description:Infinite Grenades + code:0121/99 + cheat + description:Infinite Red Potions + code:0122/99 + +cartridge sha256:94e0d73bfaa7dca6d117d8d6f92637ace17816bb37807152baa8978396fe8d46 + name:Rambo (USA) + cheat + description:Invincibility + code:dd1a/b5/60 + cheat + description:Infinite weapons + code:ec9a/de/ad + cheat + description:Gain double amount on pick-up + code:e2a2/0a/14 + cheat + description:Gain maximum amount on pick-up + code:e2a2/0a/74 + cheat + description:Hit anywhere + code:d9ef/3a/00 + cheat + description:Start with 2 Medicine Bottles + code:868d/05/02 + cheat + description:Start with 9 Medicine Bottles + code:868d/05/62 + cheat + description:Start with hand grenades + code:867d/11/15+8683/11/15 + cheat + description:Infinite health + code:010c/64 + cheat + description:Max EXP + code:010f/23 + cheat + description:Infinite Throwing Knives + code:011d/99 + cheat + description:Infinite Missiles type 1 + code:011e/99 + cheat + description:Infinite Missiles type 2 + code:011f/99 + cheat + description:Infinite Machine Gun + code:0120/99 + cheat + description:Infinite Grenades + code:0121/99 + cheat + description:Infinite Red Potions + code:0122/99 + +cartridge sha256:bbe150f50bd11f5aa4e3edab47541261c58ab9899b6d9329450b3c77df172823 + name:Rampage (USA) + cheat + description:No harm from attacks or bad food + code:b3a0/91/24 + cheat + description:No harm from falling + code:b4a1/10/00 + cheat + description:No harm from water + code:b919/01/00+b955/01/00 + cheat + description:Buildings collapse automatically + code:e5b1/b0/50 + cheat + description:Buildings collapse faster + code:a6d4/f0/50+aa93/0d/15 + cheat + description:One hit destroys buildings + code:a1cf/05/80 + cheat + description:More health - P1 + code:c353/7f/ff + cheat + description:More health - P2 + code:c36e/7f/ff + cheat + description:Less health - P1 + code:c353/7f/3f + cheat + description:Less health - P2 + code:c36e/7f/3f + cheat + description:More health after continue - both players + code:cff4/7f/ff + cheat + description:Less health after continue - both players + code:cff4/7f/3f + cheat + description:More damage done from falling + code:b4a1/10/20 + cheat + description:Double health from food + code:b3b3/05/04 + cheat + description:Half health from food + code:b3b3/05/00+b3b6/0a/4a + +cartridge sha256:501e921616931e4796c44b1e80c7112c881eb1e9a3190d0e6a3b4b199ee368e3 + name:Ren & Stimpy Show, The - Buckeroo$! (USA) + cheat + description:Infinite health + code:fb12/07/ff + cheat + description:Infinite lives + code:ea39/06/ff + cheat + description:Infinite collectibles + code:8a82/99/b9 + cheat + description:Shorter invincibility after getting hit + code:fb01/3c/1f + cheat + description:Longer invincibility after getting hit + code:fb01/3c/65 + cheat + description:2 custard pies on pick-up + code:f229/05/02 + cheat + description:9 custard pies on pick-up + code:f229/05/09 + cheat + description:Start with $11 instead of 0 + code:85ab/9d/fe + cheat + description:Start with 2 lives + code:82b1/03/01 + cheat + description:Start with 6 lives + code:82b1/03/05 + cheat + description:Start with 8 lives + code:82b1/03/07 + cheat + description:Start with 10 lives + code:82b1/03/09 + cheat + description:Start on Rescue the Maiden level + code:8709/d0/a9+870a/22/01 + cheat + description:Start on Out West level + code:8709/d0/a9+870a/22/01+870b/ee/8d + cheat + description:Start on Robin Hoek level + code:8709/d0/a9+870a/22/02+870b/ee/8d + +cartridge sha256:b4856061c9310015101c461aef744e9dcf3b158bd13d5d9cb4a76d3ca18a6864 + name:Renegade (USA) + cheat + description:Infinite lives + code:deb1/c6/a5 + cheat + description:Timer runs faster + code:ead9/3e/1e + cheat + description:Timer runs slower + code:ead9/3e/a0 + cheat + description:Start with a super energy boost + code:933a/28/50 + cheat + description:Start with 1 life - both players + code:d79b/02/00 + cheat + description:Start with 6 lives - both players + code:d79b/02/05 + cheat + description:Start with 9 lives - both players + code:d79b/02/08 + cheat + description:Start on mission 2 + code:d7af/00/01 + cheat + description:Start on mission 3 + code:d7af/00/02 + cheat + description:Start on mission 4 + code:d7af/00/03 + cheat + description:Infinite time + code:0472/59 + cheat + description:Enemies have no health + code:007e/00+007f/00+0080/00 + +cartridge sha256:f17df83a3e714c9f839dcd428d31a0b8b3cdb5fe1a78f24f43f158cb379720c1 + name:Ring King (USA) + cheat + description:Infinite power points - 1P game + code:d601/ce/2c + cheat + description:Don't lose stamina from fighting + code:afc2/91/24 + cheat + description:Rounds are 30 seconds + code:d79b/06/03 + cheat + description:Rounds are 90 seconds + code:d79b/06/09 + cheat + description:Players can't hurt each other + code:ad91/91/24 + cheat + description:No health - P2 / CPU + code:0319/00 + cheat + description:Infinite power (ten's digit) - P1 + code:038d/09 + cheat + description:Infinite power (one's digit) - P1 + code:038e/09 + cheat + description:Infinite time (ten's digit) + code:06e4/09 + cheat + description:Infinite time (one's digit) + code:06e5/09 + cheat + description:Max punch (ten's digit) - P1 + code:038f/09 + cheat + description:Max punch (one's digit) - P1 + code:0390/09 + cheat + description:Max speed (ten's digit) - P1 + code:0391/09 + cheat + description:Max speed (one's digit) - P1 + code:0392/09 + cheat + description:Max stamina (ten's digit) - P1 + code:0393/09 + cheat + description:Max stamina (one's digit) - P1 + code:0394/09 + cheat + description:No hits (hundred's digit) - P1 + code:06ec/00 + cheat + description:No hits (ten's digit) - P1 + code:06ed/00 + cheat + description:No hits (one's digit) - P1 + code:06ee/00 + +cartridge sha256:54cdc8b6fab804339c44601663585c8e7a8b01ef35b49754eb13a767b57c7d07 + name:River City Ransom (USA) + cheat + description:Infinite lives + code:8cfb/9d/bd + cheat + description:Start with max stats + code:f6d8/0f/63 + cheat + description:Infinite money + code:9ac9/9d/bd+9ad0/9d/bd+9ad7/9d/bd + cheat + description:Coins worth max amount of money + code:ec22/13/23 + cheat + description:Infinite Stamina + code:bb86/b9/99+bbee/e9/a9 + cheat + description:Infinite Will Power + code:af1f/9d/bd + cheat + description:Max Punch + code:936d/3f/7f + cheat + description:Max Kick + code:936e/3f/7f + cheat + description:Max Weapon + code:936f/3f/7f + cheat + description:Max Throw + code:9370/3f/7f + cheat + description:Max Agility + code:9371/3f/7f + cheat + description:Max Defense + code:9372/3f/7f + cheat + description:Max Strength + code:9373/3f/7f + cheat + description:Max Will Power + code:9374/3f/7f + cheat + description:Max Stamina + code:9376/7f/ff + cheat + description:View the credits + code:f2e2/d0/f0 + cheat + description:Start with double every attribute + code:f6d8/0f/1e + cheat + description:Start with 127 of all stats + code:f6d8/0f/7f + cheat + description:Start with 99 Stamina + code:f6f5/3f/63 + cheat + description:Start with double money - P1 + code:f708/20/40 + cheat + description:Start with double money - P2 + code:f717/20/40 + cheat + description:Start with $100 extra - P1 + code:f70d/00/01 + cheat + description:Start with $100 extra - P2 + code:f71c/00/01 + +cartridge sha256:46361c5b4007e6ef855430934b5a205aa19c885857a7eb31072646753d06e321 + name:RoadBlasters (USA) + cheat + description:Infinite credits + code:d004/ce/ad + cheat + description:Double credits + code:be63/02/04 + cheat + description:Extend lifetime of UZ Cannon + code:8d80/05/09 + cheat + description:Extend lifetime of Nitro Injector + code:8dd9/80/ff + cheat + description:Reduce lifetime of Nitro Injector + code:8dd9/80/40 + cheat + description:Infinite Cruise missiles + code:8dec/ce/ad+8d1f/1e/e0 + cheat + description:Infinite UZ Cannon + code:8d78/a5/60+8d1f/1e/2b + cheat + description:Infinite Nitro Injectors + code:8ddc/ce/60+8d1f/1e/8d+8dc9/f0/24 + cheat + description:Infinite Electro Shield + code:8e5c/ce/ad+8d1f/1e/51+8d20/8d/8e + cheat + description:Infinite Fuel + code:0085/cf + cheat + description:Infinite Reserve Fuel + code:0086/6d + cheat + description:Max speed + code:009a/ff + +cartridge sha256:46a38baf9067869e8ecdf227c3cd33f14df20998d0d27e645e47f6c57fd9703d + name:Road Runner (USA) (Unl) + cheat + description:Infinite lives + code:eb1b/ce/ad + cheat + description:Never lose seed + code:c1b0/c8/ea+eba5/c8/ea + cheat + description:Start with 1 life + code:e40e/05/00 + cheat + description:Start with 12 lives + code:e40e/05/0b + cheat + description:Start with 18 lives + code:e40e/05/11 + cheat + description:Start on level 5 + code:e413/01/05 + cheat + description:Start on level 10 + code:e413/01/0a + cheat + description:Start on level 15 + code:e413/01/0f + cheat + description:Start on level 20 + code:e413/01/14 + cheat + description:Start on level 25 + code:e413/01/19 + cheat + description:Start on level 30 + code:e413/01/1e + +cartridge sha256:687e4129be3b8e224a9748cba9687b8c10e5feb234a727bdf2dcb8d3c8c47097 + name:Robin Hood - Prince of Thieves (USA) (Rev A) + cheat + description:Infinite HP for Robin in main combat + code:8b29/85/86 + cheat + description:Infinite HP for Robin in dueling combat + code:8921/30/f0 + cheat + description:Infinite Arrows + code:9255/01/00 + cheat + description:Bandages give more HP back + code:b7a3/08/14 + cheat + description:Food gives more HP back - Except the Leg of meat + code:b3b5/08/18 + cheat + description:Infinite Arrows (alt) + code:0179/ff + cheat + description:Max Exp points + code:0604/ff + cheat + description:Max Level + code:0176/ff + cheat + description:Max Attack + code:0170/ff+0171/ff + cheat + description:Max Agility + code:016e/ff+016f/ff + cheat + description:Max Defense + code:0172/ff + cheat + description:Max Gold + code:0177/ff + cheat + description:Load zero + code:016c/00 + +cartridge sha256:bb0ed60fd8e83b56f23de16018696817cf8030b4898db6abe9dfc343e646e753 + name:Robin Hood - Prince of Thieves (USA) + cheat + description:Infinite HP for Robin in main combat + code:8b29/85/86 + cheat + description:Infinite HP for Robin in dueling combat + code:8921/30/f0 + cheat + description:Infinite Arrows + code:9255/01/00 + cheat + description:Bandages give more HP back + code:b7a3/08/14 + cheat + description:Food gives more HP back - Except the Leg of meat + code:b3b5/08/18 + cheat + description:Infinite Arrows (alt) + code:0179/ff + cheat + description:Max Exp points + code:0604/ff + cheat + description:Max Level + code:0176/ff + cheat + description:Max Attack + code:0170/ff+0171/ff + cheat + description:Max Agility + code:016e/ff+016f/ff + cheat + description:Max Defense + code:0172/ff + cheat + description:Max Gold + code:0177/ff + cheat + description:Load zero + code:016c/00 + +cartridge sha256:5431ed49f22ee8188871be088da433c26b1ddeac972ef4b8f89df4eacd5e42c2 + name:Robo Warrior (USA) + cheat + description:No damage from bomb blast + code:f23f/4e/2c + cheat + description:No damage from monsters and no power drain + code:f27d/4e/2c + cheat + description:Infinite Barrier after pick-up + code:c924/e6/ea + cheat + description:Infinite Mega Bombs after pick-up + code:ddaf/d6/b5 + cheat + description:Infinite Super Bombs + code:e147/c6/a5 + cheat + description:Walk through walls + code:cbf0/10/90 + cheat + description:5 Super Bombs on pick-up + code:e561/0a/05 + cheat + description:20 Super Bombs on pick-up + code:e561/0a/14 + cheat + description:Set firing range to 5 + code:c170/01/05 + cheat + description:Set firing range to 10 + code:c170/01/0a + cheat + description:Start with 5 of everything + code:c1eb/00/05 + cheat + description:Start with 10 of everything + code:c1eb/00/0a + cheat + description:Start with defense level at 5 + code:c1e5/01/05 + cheat + description:Start with defense level at 8 + code:c1e5/01/08 + cheat + description:Always have 99 Medals + code:0058/63 + cheat + description:Always have 99 Super Boots + code:0061/63 + cheat + description:Always have 99 Clocks + code:0062/63 + cheat + description:Always have 99 Flash + code:0063/63 + cheat + description:Always have 99 CrossFires + code:0064/63 + cheat + description:Always have 99 Candles + code:0065/63 + cheat + description:Always have 99 Energy Capsule + code:0066/63 + cheat + description:Always have 99 Missles + code:0067/63 + cheat + description:Always have 99 Megaton Bombs + code:004d/63 + cheat + description:Always have 99 Life Vest + code:004e/63 + cheat + description:Always have 99 Lanterns + code:004f/63 + +cartridge sha256:100c394264b40c17f635a6356c884135558bf2aee1a7f60c9ce43441e48a06cb + name:Robocco Wars (Japan) + cheat + description:Start on level 5 + code:a831/00/3c + +cartridge sha256:d04b445ac57cccb3a31a3bf83d002dc9a9765f15313e96f67be077b6114d2411 + name:RoboCop (USA) + cheat + description:Invincibility + code:e276/35/3b+b62f/20/bd + cheat + description:Infinite time + code:a5cf/e6/a5 + cheat + description:Infinite ammunition + code:eb14/05/c5 + cheat + description:No damage from touching enemies + code:ee49/85/a5 + cheat + description:No damage from enemy bullets + code:ef6e/85/a5 + cheat + description:Bosses die automatically + code:a29d/3b/00 + cheat + description:Can't harm civilian at the end of level 1 + code:a7c3/bd/9d + cheat + description:Triple normal power on power food pick-up + code:fd17/03/09 + cheat + description:Triple normal time on battery pick-up + code:fd28/03/09 + cheat + description:Max time on battery pick-up + code:fd28/03/16 + cheat + description:Full power on power food pick-up + code:fd17/03/16 + cheat + description:Use with COP Code 2 to start with machine gun and Cobra gun + code:d128/01/0f + cheat + description:Press Start to finish the level (may cause graphical glitches in later levels) + code:d224/0e/0f + cheat + description:Start on level 2 + code:d10a/00/01+d10b/95/85+d10c/85/66 + cheat + description:Start on level 3 + code:d10a/00/02+d10b/95/85+d10c/85/66 + cheat + description:Start on level 4 + code:d10a/00/03+d10b/95/85+d10c/85/66 + cheat + description:Start on level 5 + code:d10a/00/04+d10b/95/85+d10c/85/66 + cheat + description:Start on level 6 + code:d10a/00/05+d10b/95/85+d10c/85/66 + cheat + description:Infinite health + code:006e/00 + cheat + description:Infinite time (alt) + code:0082/00 + +cartridge sha256:8ed3cb0046caecbefdc6c6b3ad8dae013442136f6a65c1a21b54586b0275e615 + name:RoboCop 2 (USA) (Rev A) + cheat + description:Invincibility + code:8feb/d0/f0 + cheat + description:Infinite health + code:e7c1/99/60 + cheat + description:Infinite lives + code:c17d/d6/d5 + cheat + description:Infinite time + code:e704/c6/c5+e6fc/c6/c5 + cheat + description:No enemies + code:8b72/f0/d0 + cheat + description:Each N (Nuke) is worth 10 + code:e80c/03/00 + cheat + description:Infinite health (alt) + code:0054/09+0055/09 + cheat + description:Infinite lives (alt) + code:0058/04 + cheat + description:Infinite time (alt) + code:0091/ff + cheat + description:Infinite N + code:0052/09+0053/09 + +cartridge sha256:b65361b45eef137a57152dd8f64531c26e34d728e72800d1bdf8e4be9bff49e7 + name:RoboCop 2 (USA) + cheat + description:Invincibility + code:8feb/d0/f0 + cheat + description:Infinite lives + code:c17d/d6/d5 + cheat + description:No enemies + code:8b72/f0/d0 + cheat + description:Infinite health + code:0054/09+0055/09 + cheat + description:Infinite lives (alt) + code:0058/04 + cheat + description:Infinite time + code:0091/ff + cheat + description:Infinite N + code:0052/09+0053/09 + +cartridge sha256:a0f18e729a7ee6be9035e9691f4bac32c1b202afcb44100479a431055b15eee6 + name:RoboCop 3 (USA) + cheat + description:Infinite efficiency + code:f19b/e5/a9+f19c/e2/19 + cheat + description:Infinite efficiency (alt) + code:f1a1/9d/b9 + cheat + description:One hit kills + code:f0b8/fc/7c + cheat + description:Hit anywhere + code:f088/eb/00 + cheat + description:Lots of repair icons + code:c0c3/06/ee + cheat + description:Start with 2x health + code:c265/19/32 + cheat + description:Start with 1/2 health + code:c265/19/0c + cheat + description:Infinite P + code:06a4/09 + cheat + description:Have main weapon - regular + code:001c/00 + cheat + description:Have main weapon - Rapid + code:001c/01 + cheat + description:have main weapon - 3-Way + code:001c/02 + cheat + description:have secondary weapon - Missiles + code:001d/00 + cheat + description:Have secondary weapon - Homing Missiles + code:001d/01 + cheat + description:Have secondary weapon - Bang + code:001d/02 + +cartridge sha256:92b1bde12ac860a385416b92529c15d149db54e53a56bd2a82ab97f517e67f86 + name:RoboCop versus The Terminator (USA) (Proto) + cheat + description:Infinite lives + code:d442/8d/ad + cheat + description:Infinite health + code:e10c/8d/ad + cheat + description:Infinite health (alt) + code:04ee/0a + +cartridge sha256:d0e5899cf6b756d697be9ad6700d1f612b1604496374da9606478d5cdbceebf1 + name:Robodemons (USA) (Unl) + cheat + description:Infinite health + code:051b/14 + +cartridge sha256:e1a3d949b9bf258b4d2c92104cedd7957a311f142dc2cb32eb92ce559837377f + name:Rocketeer, The (USA) + cheat + description:Infinite health + code:d75d/ed/2c + cheat + description:Have all weapons with infinite ammo + code:bd64/05/00 + cheat + description:1/2 normal bullets on pick-up + code:a212/0a/05 + cheat + description:2x normal bullets on pick-up + code:a212/0a/14 + cheat + description:3x normal bullets on pick-up + code:a212/0a/1e + cheat + description:1/2 silver bullets on pick-up + code:a204/14/0a + cheat + description:2x silver bullets on pick-up + code:a204/14/28 + cheat + description:3x silver bullets on pick-up + code:a204/14/3c + cheat + description:Start with 1/2 health + code:bcd7/08/04 + cheat + description:Start with 2x health + code:bcd7/08/10 + cheat + description:Start with 3x health + code:bcd7/08/18 + cheat + description:Infinite health (alt) + code:05c5/0a + cheat + description:Infinite Rocket power + code:05b0/27 + cheat + description:Have all weapons with infinite ammo (alt) + code:05bf/63 + +cartridge sha256:a0d60fe16b09d2018e32c277f8a297adc71acdd9e851591625b2d460e96266c8 + name:Rocket Ranger (USA) + cheat + description:Double amount of Lunarium in storage + code:cf95/01/02 + cheat + description:Triple amount of Lunarium in storage + code:cf95/01/03 + cheat + description:Lunarium level in backpack at 99 + code:cf9a/3c/63 + cheat + description:Never lose Lunarium in backpack + code:c351/8d/ad + cheat + description:Half amount of Lunarium in storage + code:cf95/01/00+cf9f/00/32 + +cartridge sha256:683c49e4ea3f4b179065deccecd3e4a86a4e355e13924872571e7b7c79205d0c + name:Rockin' Kats (USA) + cheat + description:Invincibility + code:e628/f0/d0 + cheat + description:Infinite health + code:e6ca/8d/ad + cheat + description:Infinite lives + code:cd99/ce/cd + cheat + description:Hit anywhere + code:e6f6/16/00 + cheat + description:Can select any item (you will not be able to see it) + code:829f/d1/00 + cheat + description:Can always select channel 5 + code:8ba8/10/00 + cheat + description:Can always buy items + code:8f89/a5/a9 + cheat + description:Infinite health (alt) + code:0423/0a + cheat + description:Infinite lives (alt) + code:041f/09 + cheat + description:Have all items + code:0105/0f + cheat + description:Infinite high cash + code:0104/0e + cheat + description:Channels 1-4 completed + code:0102/ff + +cartridge sha256:2bd31df34f925d030ceceb944c1ac973ccf892358de75c35fd77d61372d23a3b + name:Rock 'n' Ball (USA) + cheat + description:Infinite balls + code:a07f/de/bd + +cartridge sha256:9fdbaa2877363948b466a6e3e11a1bce02d2a6490cb90808be4d788fe4630eba + name:Rod Land (Europe) + cheat + description:Infinite lives + code:9911/5e/bd + cheat + description:Infinite time in extra game + code:e490/c6/a5 + cheat + description:Start with invincibility + code:dbe8/f0/d0 + cheat + description:Start on scene 31 + code:c5df/00/1e + +cartridge sha256:1a35607e218d68106367e7b87735aa9f10bf330c3a71f607a21de2d7fc763ef8 + name:Roger Clemens' MVP Baseball (USA) + cheat + description:Infinite balls (balls are not called) + code:d3f0/00/91 + cheat + description:Infinite balls and strikes + code:8173/f6/b5 + cheat + description:Strikes are not called when batter doesn't swing + code:d3eb/01/91 + cheat + description:Strikes are not called when batter swings + code:8170/02/04 + cheat + description:2 strikes and you're out + code:8178/03/02+b19f/03/02+c1ec/03/02 + cheat + description:1 strike and you're out + code:8178/03/01+b19f/03/01+c1ec/03/01 + cheat + description:1 ball for a walk + code:c1fb/04/01 + cheat + description:2 balls for a walk + code:c1fb/04/02 + cheat + description:3 balls for walk + code:c1fb/04/03 + +cartridge sha256:942c802c34627c969c49dae94fb8b48c7b1e873a65803caad559324e2a54b4c8 + name:Rollerblade Racer (USA) + cheat + description:Infinite lives + code:d7e8/c6/a9 + cheat + description:1 fall and you're dead + code:d7e1/04/01 + cheat + description:6 falls and you're dead + code:d7e1/04/06 + cheat + description:8 falls and you're dead + code:d7e1/04/08 + cheat + description:Start on the City Street + code:ca3f/00/02 + cheat + description:Start with 1 life + code:ca3b/03/01 + cheat + description:Start with 6 lives + code:ca3b/03/06 + cheat + description:Start with 9 lives + code:ca3b/03/09 + cheat + description:Start on Hit the Beach + code:ca3f/00/04 + cheat + description:Start on Panic Park + code:ca3f/00/06 + +cartridge sha256:7ddc56bf2b8d8f3f980837bbc48284fd7241e111a9f51599c6e358518d3469dc + name:Rollergames (USA) + cheat + description:Infinite lives + code:f788/c6/a5 + cheat + description:Infinite special moves + code:92e0/c6/24 + cheat + description:9 special moves + code:8052/03/09 + cheat + description:6 special moves + code:8052/03/06 + cheat + description:Mega-jump + code:8440/00/09 + cheat + description:Infinite time + code:8d1f/85/24 + cheat + description:Faster timer + code:8d13/3f/1f + cheat + description:Slower timer + code:8d13/3f/7f + cheat + description:Start with less energy + code:8056/0c/06 + cheat + description:Start with more energy + code:8056/0c/18 + cheat + description:Infinite health + code:04ce/0c + cheat + description:Infinite lives (alt) + code:0082/10 + cheat + description:Infinite time (alt) + code:0032/03 + +cartridge sha256:e91bb35c7a95388c06f978c6cee73b1169fa7ec66b1808de5f504dcfefafbaab + name:Rolling Thunder (USA) (Unl) + cheat + description:Infinite health + code:a654/8d/ad + cheat + description:Infinite lives + code:eb73/c6/a5+eb53/c6/a5 + cheat + description:Infinite time + code:e20f/c6/a5 + cheat + description:Hit anywhere + code:a7d0/b8/40+d733/d0/60+a7d1/a8/a9 + cheat + description:200 Machine Gun bullets on pick-up + code:e8d0/64/c8 + cheat + description:300 Machine Gun bullets and 300 bullets on pick-up + code:a291/de/bd + cheat + description:Gain fewer bullets on pick-up + code:e8cf/32/14 + cheat + description:Self-replenishing bullets + code:d766/01/32 + cheat + description:Start with 200 bullets + code:e0aa/32/c8 + cheat + description:Start with 200 bullets on each new life + code:eb4c/32/c8 + cheat + description:Start with loads of ammunition + code:e0a2/00/03+eb44/00/03 + cheat + description:Start with 1 life + code:e09b/03/01 + cheat + description:Start with 6 lives + code:e09b/03/06 + cheat + description:Start with 9 lives + code:e09b/03/09 + cheat + description:Start with 1 life after continue + code:9257/03/01 + cheat + description:Start with 6 lives after continue + code:9257/03/06 + cheat + description:Start with 9 lives after continue + code:9257/03/09 + cheat + description:Start with increased life meter + code:e88d/02/08 + cheat + description:Start on story 1 area 02 + code:8f6b/00/01+8f6d/b1/30 + cheat + description:Start on story 1 area 03 + code:8f6b/00/02+8f6d/b1/30 + cheat + description:Start on story 1 area 04 + code:8f6b/00/03+8f6d/b1/30 + cheat + description:Start on story 1 area 05 + code:8f6b/00/04+8f6d/b1/30 + cheat + description:Start on story 2 area 06 + code:8f6b/00/05+8f6d/b1/30 + cheat + description:Start on story 2 area 07 + code:8f6b/00/06+8f6d/b1/30 + cheat + description:Start on story 2 area 08 + code:8f6b/00/07+8f6d/b1/30 + cheat + description:Start on story 2 area 09 + code:8f6b/00/08+8f6d/b1/30 + cheat + description:Start on story 2 area 10 + code:8f6b/00/09+8f6d/b1/30 + cheat + description:Start on story 3 area 01 + code:8dca/00/01 + cheat + description:Infinite health (not versus bullets) + code:0089/02 + cheat + description:Infinite bullets + code:00a0/32 + cheat + description:Infinite time (alt) + code:059b/09+059c/09+059d/09 + cheat + description:Infinite lives (alt) + code:05bc/09 + +cartridge sha256:644291444ae16a02a128c613fa4e10559a45e4740e3614fb57b73b8c736bdbef + name:Roundball - 2-on-2 Challenge (USA) + cheat + description:Start with 1 ball - all players + code:c175/03/01 + cheat + description:Infinite balls - all players + code:c241/de/ad + +cartridge sha256:fade44d9c76173afe098fbe02d859735e06b2c509fd80da08b1cc85bfc01a556 + name:Rush'n Attack (USA) + cheat + description:Invincibility (star effect) + code:8724/05/84+872f/05/84 + cheat + description:Invincibility (except vs bullets) + code:8131/d0/50 + cheat + description:Infinite POW + code:8df5/01/00 + cheat + description:Always have 255 POW + code:df6f/ad/8d + cheat + description:Hit anywhere + code:82cb/b0/50+8520/b0/4c+82cc/6b/3b+8522/b9/85+8521/5c/37 + cheat + description:Infinite lives - P1 + code:8718/c6/24 + cheat + description:Infinite lives - P2 + code:871d/c6/24 + cheat + description:Multi-jump + code:af33/ff/08+af3c/ff/60+87d3/f1/30+af39/ff/20+af36/ff/20+af34/ff/f0+af37/ff/f8+af31/ff/04+af35/ff/03+87d4/8b/af+af38/ff/89+af3a/ff/f1+af32/ff/29+af30/ff/a5+af3b/ff/8b + cheat + description:Start with 1 life - P1 + code:d16e/05/01 + cheat + description:Start with 1 life - P2 + code:d176/05/01 + cheat + description:Start with 10 lives - P1 + code:d16e/05/0a + cheat + description:Start with 10 lives - P2 + code:d176/05/0a + cheat + description:Start on stage 2 (disable when stage begins) + code:0020/01 + cheat + description:Start on stage 3 (disable when stage begins) + code:0020/02 + cheat + description:Start on stage 4 (disable when stage begins) + code:0020/03 + cheat + description:Start on stage 5 (disable when stage begins) + code:0020/04 + cheat + description:Start on stage 6 (disable when stage begins) + code:0020/05 + +cartridge sha256:9bef1813dbcfa003b3b1978a66a8da3ff59c93dd74f1332801515aa4b633c51e + name:Rygar (USA) (Rev A) + cheat + description:Invincibility + code:ae01/84/60 + cheat + description:Infinite health + code:aeb2/85/a5 + cheat + description:Infinite Mind points + code:822a/00 + cheat + description:Have first three items after pressing B once + code:a3c1/25/05 + cheat + description:Hit anywhere + code:ad1c/b0/30+ad33/b0/30+ad22/b0/30+ad39/b0/f0 + cheat + description:One hit kills + code:afae/85/11 + cheat + description:Pits aren't fatal (side view) + code:a013/08/00 + cheat + description:Walk on water (side view) + code:9cdd/d0/50 + cheat + description:Enemies always drop a health potion + code:b557/b0/90+b57f/07/03+b57e/29/a9 + cheat + description:Enemies always drop a Mind unit + code:b557/b0/90+b57f/07/04+b57e/29/a9 + cheat + description:Don't be pushed after being hit + code:ae9e/05/60 + cheat + description:Jump higher + code:966b/04/03 + cheat + description:Multi-jump + code:ad4d/f0/10+a016/a9/60+ad4a/04/28+ad51/05/04+ad4b/29/25+ad4f/ad/8d+ad49/92/a5+ad50/32/c2+ad48/ad/ea+ad4c/20/2a + cheat + description:Grappling Hook continues until it finds something + code:9931/ce/ad+a22c/85/a5 + cheat + description:Start with 12 units of health + code:c0b1/06/18+c0b2/06/18 + cheat + description:Infinite Attack & Assail + code:00cd/ff + cheat + description:Have all equipment + code:00c0/ff+00c1/ff + cheat + description:Always have Power Up + code:00c0/10 + cheat + description:Lots of Tone + code:00c7/ff + cheat + description:Lots of Last + code:00c8/ff + +cartridge sha256:e3a7e0b559b18e8e2fd6f2bf0fdadbf9094be63a01bac50e5505413e1d7697a4 + name:Rygar (USA) + cheat + description:Invincibility + code:ae01/84/60 + cheat + description:Infinite health + code:aeb2/85/a5 + cheat + description:Infinite Mind points + code:822a/00 + cheat + description:Have first three items after pressing B once + code:a3c1/25/05 + cheat + description:Hit anywhere + code:ad1c/b0/30+ad33/b0/30+ad22/b0/30+ad39/b0/f0 + cheat + description:One hit kills + code:afae/85/11 + cheat + description:Pits aren't fatal (side view) + code:a013/08/00 + cheat + description:Walk on water (side view) + code:9cdd/d0/50 + cheat + description:Enemies always drop a health potion + code:b557/b0/90+b57f/07/03+b57e/29/a9 + cheat + description:Enemies always drop a Mind unit + code:b557/b0/90+b57f/07/04+b57e/29/a9 + cheat + description:Don't be pushed after being hit + code:ae9e/05/60 + cheat + description:Jump higher + code:966b/04/03 + cheat + description:Multi-jump + code:ad4d/f0/10+a016/a9/60+ad4a/04/28+ad51/05/04+ad4b/29/25+ad4f/ad/8d+ad49/92/a5+ad50/32/c2+ad48/ad/ea+ad4c/20/2a + cheat + description:Grappling Hook continues until it finds something + code:9931/ce/ad+a22c/85/a5 + cheat + description:Start with 12 units of health + code:c0b1/06/18+c0b2/06/18 + cheat + description:Infinite Attack & Assail + code:00cd/ff + cheat + description:Have all equipment + code:00c0/ff+00c1/ff + cheat + description:Always have Power Up + code:00c0/10 + cheat + description:Lots of Tone + code:00c7/ff + cheat + description:Lots of Last + code:00c8/ff + +cartridge sha256:9579a2b5a4083420d9bc3788cae39b068c0752ac68e7b7dc1be1d748cb2b7133 + name:S.C.A.T. - Special Cybernetic Attack Team (USA) + cheat + description:Infinite health + code:dc7b/01/00 + cheat + description:More energy on pick-up + code:ec7f/03/0a + cheat + description:Don't lose speed-ups when hit + code:dc8e/08/00 + cheat + description:Longer immunity + code:dc84/40/ff + cheat + description:Shorter immunity + code:dc48/40/10 + cheat + description:Faster maximum speed-up + code:de04/06/09+de05/fa/f7 + cheat + description:Faster normal speed-up + code:ddf4/04/06+ddf5/fc/fa + cheat + description:Start with more health + code:cea4/06/32 + cheat + description:Infinite health - P1 + code:001c/09 + +cartridge sha256:4d6e58f232dc1a592583889f858eac230b8e8921e715276e580073ab2dd18546 + name:Saint Seiya - Ougon Densetsu (Japan) + cheat + description:Fly + code:008b/c8 + cheat + description:Infinite health (damage) + code:0689/40+068a/40 + cheat + description:Infinite Cosmos + code:0685/40+0686/40 + +cartridge sha256:3ad57c83631233530bb421b14236fdba70d18f70ce46a8410ec7c2f156b559ab + name:Saint Seiya - Ougon Densetsu Kanketsu Hen (Japan) + cheat + description:Start with infinite health (life) + code:0063/40+0040/40 + cheat + description:Start with infinite Cosmos + code:0059/40+005a/40 + cheat + description:Infinite Seven Sense + code:05aa/40+05ab/40 + +cartridge sha256:9e8eb95ec2917597650131db254067ff59bc3669417563165518927357812c73 + name:Salamander (Japan) + cheat + description:Invincibility + code:0074/20 + cheat + description:Infinite lives + code:0034/09 + cheat + description:Option always on Speed + code:0068/01 + cheat + description:Option always on Missile + code:0068/02 + cheat + description:Option always on Ripple + code:0068/03 + cheat + description:Option always on Laser + code:0068/04 + cheat + description:Option always on Option + code:0068/05 + cheat + description:Option always on Force + code:0068/06 + cheat + description:Start with and keep Missiles + code:0076/02 + +cartridge sha256:7ee2b81ef8ab8e9c009ecd42ed5fa5a34e3e48896c3567fac1ca7520c1de870e + name:Secret Scout in the Temple of Demise (USA) (Unl) + cheat + description:Infinite lives + code:e4a7/99/b9 + cheat + description:View the ending + code:d5e7/00/58 + +cartridge sha256:c33611fb6b3ced6cf0ab4cd8e6795be44dc164efd453a69bad404c95837ec420 + name:Secret Ties (USA) (Proto) + cheat + description:Invincibility + code:c8fb/cc/cd + cheat + description:Infinite health + code:c960/85/a5 + cheat + description:Infinite lives + code:faec/c6/c5 + cheat + description:Infinite Gun + code:c763/c6/a5 + cheat + description:Infinite Shield + code:c91d/c6/a5 + cheat + description:Super-jump + code:c5f0/05/1f+c4e7/06/20 + cheat + description:Allways able to use Gun + code:ef22/d0/50 + cheat + description:Allways able to use Shield + code:ef1c/d0/50 + cheat + description:Start with 99 lives + code:e1e0/03/64 + cheat + description:Start with double health + code:e1f9/05/0a + cheat + description:Invincibility (alt) + code:03cc/00 + cheat + description:Infinite health (alt) + code:0009/07 + cheat + description:Infinite Gun (alt) + code:000a/63 + cheat + description:Infinite Shield (alt) + code:000b/63 + +cartridge sha256:a98e48a26c104375ae45e5c1bc4eb7b2a446e0e9ffa7ed3923c3cf5eec9a549a + name:Section-Z (USA) + cheat + description:Infinite lives + code:9d93/c6/a5 + cheat + description:Energy tube gives full energy boost + code:fa3b/00/0a + cheat + description:Autofiring capability + code:9efb/f5/f7 + cheat + description:Autofire without having to hold the button down + code:9efb/f5/ff + cheat + description:Press Start to complete current mission (do not use past sector 40) + code:d395/07/00+d391/49/a9+d394/fd/39+d392/01/02 + cheat + description:Start a new game to view the ending + code:8702/01/03 + cheat + description:Start with 1 life + code:d2ad/03/01 + cheat + description:Start with 6 lives + code:d2ad/03/06 + cheat + description:Start with 9 lives + code:d2ad/03/09 + cheat + description:Infinite energy + code:005b/09+005a/09 + +cartridge sha256:afc7ce7262cc03039481b9338a94db35a1f4e9e54ee3dd34f979a7921d4a5e29 + name:Seicross (USA) + cheat + description:Infinite lives + code:8ae8/bd + cheat + description:Slow motion + code:8ccb/01 + cheat + description:Start with 1 life + code:80b4/01 + cheat + description:Start with 6 lives + code:80b4/06 + cheat + description:Start with 9 lives + code:80b4/09 + cheat + description:Infinite health - P1 + code:0078/bd + cheat + description:Infinite lives - P1 + code:0615/99 + +cartridge sha256:2395a8a102bfc403bb2c474f77035483792ec15bce37695c9f2d96d62bc8fe10 + name:Shadow of the Ninja (USA) + cheat + description:Infinite continues + code:f55d/c6/a5 + cheat + description:Don't lose energy from enemy attacks + code:ac6d/9d/2c + cheat + description:Don't lose energy from falling + code:9564/04/00 + cheat + description:Maximum energy gained from potion + code:8c19/04/10 + cheat + description:Less energy gained from potion + code:8c19/04/01 + cheat + description:Mega-jump + code:96c0/fe/ea + cheat + description:40 Throwing Stars on pick-up + code:8c31/14/28 + cheat + description:20 Bombs on pick-up + code:8c46/05/14 + cheat + description:Some enemies can't move left or right + code:a12b/9d/ea + cheat + description:9 continues + code:e08a/05/09 + cheat + description:1 continue + code:e08a/05/01 + +cartridge sha256:fbc69cdaf7c1419906d8cf2a74ab70d11520b2f3877387b8fd70460b6e6dd542 + name:Shadowgate (USA) + cheat + description:Infinite torches + code:d78a/ce/ea + +cartridge sha256:c3f361c4a1441101d6a3eb42f5776073c712198e7ed45d6ab5350816ea15aee4 + name:Shatterhand (USA) + cheat + description:Hit anywhere + code:8519/b0/50+84f3/b0/24+84ff/90/24+84db/90/24 + cheat + description:Power-ups don't use up gold + code:c94d/01/00 + cheat + description:Big coins worth double + code:82a2/14/28 + cheat + description:Big coins worth half + code:82a2/14/0a + cheat + description:Small coins worth triple + code:8287/05/0f + cheat + description:Start with less health + code:f5fa/08/04 + cheat + description:Start with 1 life + code:f5e8/02/00 + cheat + description:Start with 6 lives + code:f5e8/02/05 + cheat + description:Start with 9 lives + code:f5e8/02/08 + cheat + description:Invincibility - Robot Suit + code:05c2/7e + cheat + description:Powered up - Red Vest + code:05c8/03 + +cartridge sha256:2b85e6411f42597ceab01f5eb3ba9fd362b07340c0665fd533a3c3d5f2b1e972 + name:Shinobi (USA) (Unl) + cheat + description:Infinite life + code:d771/ce/ad + cheat + description:Infinite lives + code:920b/ce/ad + cheat + description:Turbo running + code:9dcf/03/05 + cheat + description:Start with double life + code:902e/06/0c+91f4/06/0c + cheat + description:Start with 1 life + code:907b/02/00 + cheat + description:Start with 6 lives + code:907b/02/05 + cheat + description:Start with 9 lives + code:907b/02/08 + +cartridge sha256:0df6a7a16af6cffc9a54a3de1ab14225f2ce5d5a269a691f16a22d3fd42b942b + name:Shinsenden (Japan) + cheat + description:No random battles + code:b029/30/60 + +cartridge sha256:6c705f7980a08b7a7a5d74ddfd175155492168248f65c7d9e3cef1a6b14a2886 + name:Shooting Range (USA) + cheat + description:Double bonus time for hourglasses + code:9801/32/64 + cheat + description:Half bonus time for hourglasses + code:9801/32/19 + cheat + description:More time for level 1 + code:83c5/03/04+860e/03/04 + cheat + description:Less time for level 1 + code:83c5/03/02+860e/03/02 + cheat + description:More time for level 2 + code:8610/02/04+8611/32/00 + cheat + description:Less time for level 2 + code:8610/02/01+8611/32/32 + cheat + description:More time for level 3 + code:8612/02/04+8613/00/32 + cheat + description:Less time for level 3 + code:8612/02/01+8613/00/00 + cheat + description:Double usual shots per round + code:86b5/28/50+9aae/28/50+99ef/b9/ad + cheat + description:Triple usual shots per round + code:86b5/28/50+9aae/28/78+99ef/b9/ad + cheat + description:Quadruple usual shots per round + code:86b5/28/50+9aae/28/a0+99ef/b9/ad + +cartridge sha256:648f68ae58f3420096e052a68255d8e453ae1fc09a4214adbeaa66ff841aaa33 + name:Side Pocket (USA) + cheat + description:Infinite turns - P1 + code:abcf/85/a5 + +cartridge sha256:69399633df5ea1baf37d3e47087257e245fca1f260cac0f539e8e4437ddf2a28 + name:Silent Assault (USA) (Unl) + cheat + description:Infinite lives + code:002e/08 + cheat + description:Infinite Grenades + code:00d9/04 + +cartridge sha256:37a5cfb1aacd9bb42746f20923441b5f613971d4dc99de68c216b10a8d7bcbfc + name:Silent Service (USA) + cheat + description:Infinite deck gun shells + code:e929/c6/a5 + cheat + description:Infinite bow torpedoes + code:e95b/c6/a5 + cheat + description:Infinite aft torpedoes + code:e983/c6/a5 + cheat + description:Start with 50 deck gun shells + code:9d01/50/32 + cheat + description:Start with 99 deck gun shells + code:9d01/50/63 + +cartridge sha256:28f0444e178830edf654eb72e54c7920296156524295b5a4f4418fc4d33f42fd + name:Silk Worm (USA) + cheat + description:Infinite lives using helicopter + code:e2dd/c6/a5 + cheat + description:Infinite lives using jeep + code:e66c/c6/a5 + cheat + description:Keep firepower and speed-ups for helicopter + code:e302/85/a5 + cheat + description:Keep firepower and speed-ups for jeep + code:e691/85/a5 + cheat + description:Restrict movement area for helicopter + code:e39f/d8/80 + cheat + description:Restrict movement area for jeep + code:e79c/e0/88 + cheat + description:1 life using helicopter after continue + code:c985/03/01 + cheat + description:6 lives using helicopter after continue + code:c985/03/06 + cheat + description:9 lives using helicopter after continue + code:c985/03/09 + cheat + description:1 life using jeep after continue + code:c99f/03/01 + cheat + description:6 lives using jeep after continue + code:c99f/03/06 + cheat + description:9 lives using jeep after continue + code:c99f/03/09 + cheat + description:Start with 1 life + code:c822/03/01 + cheat + description:Start with 6 lives + code:c822/03/06 + cheat + description:Start with 9 lives + code:c822/03/09 + cheat + description:Start at stage 2 + code:c828/00/01 + cheat + description:Start at stage 3 + code:c828/00/02 + cheat + description:Start at stage 4 + code:c828/00/03 + cheat + description:Start at stage 5 + code:c828/00/04 + cheat + description:Start at stage 6 + code:c828/00/05 + cheat + description:Start at stage 7 + code:c828/00/06 + +cartridge sha256:718dce0398dba4f8968969fe3e078f55ea0a5b3cff91895fd9ac0225fe4c437e + name:Silver Surfer (USA) + cheat + description:Infinite lives - both players + code:cf8d/ce/ad + cheat + description:Infinite Smart Bombs - both players + code:e663/1c/ff + cheat + description:Keep cosmic weapons after losing a life + code:d586/8d/2c + cheat + description:Keep Orbs after losing a life + code:d583/8d/2c+dbc1/8d/2c + cheat + description:Have 5 Smart Bombs on a new life + code:d58d/01/05 + cheat + description:Start with 1 life - P1 + code:d513/05/01 + cheat + description:Start with 1 life - P2 + code:d54c/05/01 + cheat + description:Start with 5 Smart Bombs - P1 + code:d52c/01/05 + cheat + description:Start with 5 Smart Bombs - P2 + code:d565/01/05 + cheat + description:Infinite lives + code:05e6/09 + +cartridge sha256:ce1fd1fcf89d2d6334cc3d96101c7b995ff4959257ed04df92f0afad711d08da + name:Simpsons, The - Bartman Meets Radioactive Man (USA) + cheat + description:Invincibility + code:f3a9/20/ad + cheat + description:Infinite health + code:f731/04/00 + cheat + description:Infinite health (alt) + code:f732/8d/ad + cheat + description:Infinite Eyes on pick-up + code:f8fe/ce/cd + cheat + description:Infinite Eyes on pick-up (alt) + code:f8fe/ce/ad + cheat + description:Infinite Cold on pick-up + code:f944/01/00 + cheat + description:Infinite lives + code:f260/91/b1 + cheat + description:Infinite credits + code:f80f/ce/ad + cheat + description:Eyes worth more on pick-up + code:eae1/20/50 + cheat + description:Cold worth more on pick-up + code:eabd/05/20 + cheat + description:Start with 2 lives and 2 credits + code:8767/03/01 + cheat + description:Start with 6 lives and 6 credits + code:8767/03/05 + cheat + description:Start with 8 lives and 8 credits + code:8767/03/07 + cheat + description:Start with 10 lives and 10 credits + code:8767/03/09 + cheat + description:Start in chapter 1 level 2 + code:a730/00/02 + cheat + description:Start in chapter 1 level 3 + code:a730/00/05 + cheat + description:Infinite health (alt 2) + code:0787/20 + cheat + description:Infinite Eyes on pick-up (alt 2) + code:0788/99 + cheat + description:Infinite Cold on pick-up (alt) + code:0789/99 + +cartridge sha256:7e8a3accbd57c9fea4f86fb9f99d9adc579bacec52fc68d547125067f8e50816 + name:Simpsons, The - Bart vs. the Space Mutants (USA) (Rev A) + cheat + description:Infinite time + code:f293/ca/ea + cheat + description:Slow down time + code:f27d/3c/78 + cheat + description:Speed up time + code:f27d/3c/20 + cheat + description:Gain 2 coins for every 1 collected + code:f70c/00/01 + cheat + description:Only 10 coins needed to get an extra life + code:f712/0e/09 + cheat + description:Buy items for free + code:a29d/ce/2c+b0a5/ce/2c + cheat + description:Super-jump + code:fb36/0c/15 + cheat + description:Invincibility (blinking) + code:04bd/ff + cheat + description:Infinite health + code:04b2/01 + cheat + description:Infinite time (alt) + code:066c/09 + +cartridge sha256:346fd8061a0b09c057855536012b146256bfbe386e304ef950ad93603048933c + name:Simpsons, The - Bart vs. the Space Mutants (USA) + cheat + description:Invincibility + code:d997/f0/d0 + cheat + description:Infinite health + code:ed10/ce/ad + cheat + description:Infinite time + code:f29f/ca/ea + cheat + description:Slow down time + code:f289/3c/78 + cheat + description:Speed up time + code:f289/3c/20 + cheat + description:Gain 2 coins for every 1 collected + code:f718/00/01 + cheat + description:Only 10 coins needed to get an extra life + code:f71e/0e/09 + cheat + description:Buy items for free + code:a1a2/ce/2c+b0ab/ce/2c + cheat + description:Get all items by selecting them (be sure to get the Paint Can in level 1 and Gun in the Museum) + code:e043/bd/9d + cheat + description:Super-jump + code:fb42/0c/15 + cheat + description:Invincibility (blinking) + code:04bd/ff + cheat + description:Infinite health (alt) + code:04b2/01 + cheat + description:Infinite time (alt) + code:066c/09 + +cartridge sha256:678565338a9efa2d9d4bd399b314b62864d486a4e9f4c314bf11ae5a240cdab8 + name:Simpsons, The - Bart vs. the World (USA) + cheat + description:Invincibility + code:e3ac/05/1a + cheat + description:Infinite health + code:ec68/ce/ad + cheat + description:Infinite lives + code:f11d/e5/a5 + cheat + description:Infinite Firecracker Balls + code:f139/91/b1 + cheat + description:Infinite tries for the card match game + code:a071/ce/ad + cheat + description:Bart flies + code:b87c/b4 + cheat + description:Lose lives more easily + code:ec5f/f0/d0 + cheat + description:Start with 99 Firecracker Balls + code:a001/00/09 + cheat + description:Start with 9 lives + code:ac2e/03/09 + cheat + description:Infinite health (alt) + code:06bc/05 + cheat + description:Infinite lives (alt) + code:06c1/09 + cheat + description:Infinite Firecracker Balls (alt) + code:06bf/09 + +cartridge sha256:fe4043430276177b739137ee7ed8e6cb75e751732a3f796ce03708d3ef1755e8 + name:Skate or Die (USA) + cheat + description:Snowball Blast - More snowballs picked up + code:a6fe/01/02 + cheat + description:Snowball Blast - Start with more time + code:9886/60/99 + cheat + description:Snowball Blast - Start with less time + code:9886/60/40 + cheat + description:Snowball Blast - More time gained + code:a6cd/10/15 + cheat + description:Snowball Blast - Less time gained + code:a6cd/10/05 + cheat + description:Snowball Blast - Start with more ammo + code:9836/02/04 + cheat + description:Snowball Blast - Start with less ammo + code:9836/02/01 + cheat + description:Acro Aerials - More jumps allowed + code:ed6f/03/05+efd0/03/05 + +cartridge sha256:3626bb5ce3035b39d70ed5f2941b69801c1a95629609f1ebd90a5a6a9e16794f + name:Skate or Die 2 - The Search for Double Trouble (USA) + cheat + description:Adventure Game - Infinite health + code:a1ba/c6/a5 + cheat + description:Adventure Game - Infinite Paint Clips + code:96e6/ce/ad + cheat + description:Adventure Game - Infinite Eggs + code:9172/01/00+932a/01/00 + cheat + description:Adventure Game - Infinite M-80's + code:9366/01/00+9188/01/00 + cheat + description:Adventure Game - Skate at any speed + code:d088/41/00+8046/41/00 + cheat + description:Stunt Ramp - Only 1 skateboard + code:f333/03/01 + cheat + description:Stunt Ramp - 6 skateboards + code:f333/03/06 + cheat + description:Stunt Ramp - 9 skateboards + code:f333/03/09 + cheat + description:Stunt Ramp - More time + code:f31d/03/06 + cheat + description:Stunt Ramp - Less time + code:f31d/03/02 + cheat + description:Stunt Ramp - Infinite time + code:8a34/c6/a5 + cheat + description:Stunt Ramp - Super speed + code:9acc/05/06 + cheat + description:Stunt Ramp - Infinite skateboards + code:9fc6/c6/a5+a0b4/c6/a5 + +cartridge sha256:a29461c583ec03909c1dbc4e7d783de0aaf2f391ae8329b3d8bf06e06cfdd2fa + name:Ski or Die (USA) + cheat + description:Snowball Blast - More snowballs picked up + code:a6fe/01/02 + cheat + description:Snowball Blast - Start with more time + code:9886/60/99 + cheat + description:Snowball Blast - Start with less time + code:9886/60/40 + cheat + description:Snowball Blast - More time gained + code:a6cd/10/15 + cheat + description:Snowball Blast - Less time gained + code:a6cd/10/05 + cheat + description:Snowball Blast - Start with more ammo + code:9836/02/04 + cheat + description:Snowball Blast - Start with less ammo + code:9836/02/01 + cheat + description:Acro Aerials - More jumps allowed + code:efd0/03/05+ed6f/03/05 + +cartridge sha256:06fddd300a6d1cbe1be92e851e3d5d2defcc7e682903b569bc9fe71a26addd74 + name:Skull & Crossbones (USA) (Unl) + cheat + description:Infinite continues + code:977e/ce/ad + cheat + description:Infinite weapons + code:869d/de/bd + cheat + description:Infinite time + code:f21c/ce/ad + cheat + description:Faster timer + code:f218/3c/20 + cheat + description:Slower timer + code:f218/3c/70 + cheat + description:Half energy for Red Dog and One Eye + code:97e3/32/19+9782/32/19 + cheat + description:Double energy for Red Dog and One Eye + code:97e3/32/63+9782/32/19 + cheat + description:Better super-jump + code:87ef/c8/b8+87e4/c8/b8 + cheat + description:1 continue + code:97a6/05/01 + cheat + description:9 continues + code:97a6/05/09 + +cartridge sha256:51958d12a19e7c573fab26b85fe81d57330ff6668d630c6bc95c7c563c441e93 + name:Sky Kid (USA) + cheat + description:Infinite lives + code:c28c/d6/a5 + cheat + description:P1 has more lives than P2 + code:fa7e/85/86 + cheat + description:Shoot more bullets + code:c21d/01/00 + cheat + description:Start with 1 life - both players + code:fa77/03/01 + cheat + description:Start with 6 lives - both players + code:fa77/03/06 + cheat + description:Start with 9 lives - both players + code:fa77/03/09 + cheat + description:Start on level 5 + code:fa6f/01/05+fa6b/00/04 + cheat + description:Start on level 10 + code:fa6f/01/0a+fa6b/00/09 + cheat + description:Start on level 15 + code:fa6f/01/10+fa6b/00/0f + cheat + description:Start on level 20 + code:fa6f/01/14+fa6b/00/13 + cheat + description:Invincibility - P1 + code:00bb/00 + cheat + description:Invincibility - P2 + code:00cb/00 + +cartridge sha256:f845ee19cbe21f5b463073f3716659f9c82ef6342a20879165ed21f219f6653b + name:Sky Shark (USA) (Rev 0A) + cheat + description:Infinite lives + code:8078/d6/a9 + cheat + description:Infinite Bombs + code:83b8/d6/24 + cheat + description:Infinite credits + code:817d/de/2c + cheat + description:Autofire + code:810b/5c/00 + cheat + description:Double Bombs + code:9e65/03/06 + cheat + description:Double credits + code:8037/03/06 + cheat + description:1 life after continue - both players + code:817a/04/00 + cheat + description:9 lives after continue - both players + code:817a/04/08 + cheat + description:Start with maximum firepower + code:8121/a4/a0+8122/3d/06 + cheat + description:Start with 1 life - P1 + code:8026/a9/24 + cheat + description:Start with 1 life - P2 + code:8033/04/00 + cheat + description:Start with 9 lives - P1 + code:802a/a2/06+802b/ff/21 + cheat + description:Start with 9 lives - P2 + code:8033/04/08 + +cartridge sha256:f7f6d714c7758f679db8f0c7869ef19353fdcc49c267494bb41bfefda0f152d6 + name:Slalom (USA) + cheat + description:Ski super fast + code:b21b/00/01 + cheat + description:No track obstacles + code:9503/01/00 + cheat + description:Timer at 5 minutes for all tracks + code:9620/a6/a2+9621/79/09 + +cartridge sha256:6dde1137253e7e41972dd04e09dc736efee82cc7f41f8deac8d0dcb111301616 + name:Smash T.V. (USA) + cheat + description:Infinite lives + code:f264/de/db + cheat + description:Touch and kill most enemies + code:a211/f0/80 + cheat + description:Infinite Grenades + code:bfab/d6/a9 + cheat + description:Get a lot more Grenades + code:ae7e/06/99 + +cartridge sha256:8df9c1a7a3806873db908604bb99749673241ccd58e1b32a6d7bf2fafc97d9d4 + name:Smurfs, The (Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:8b00/f0/d0+a3f9/f0/d0 + cheat + description:Infinite health + code:96c3/ce/ad + cheat + description:Infinite lives + code:bb92/8d/ad + cheat + description:Infinite time + code:99c5/9d/bd + +cartridge sha256:c85ed147e6da0da5ef02c930cc52621ae38d66971a332d168bf31126a3a740ce + name:Snake's Revenge (USA) + cheat + description:Invincibility + code:e908/85/a5 + cheat + description:Infinite health + code:e8cc/85/a5 + cheat + description:Infinite ammo for all weapons + code:e672/88/ea + cheat + description:Infinite Beretta ammo + code:8b09/8d/ad + cheat + description:Infinite Shotgun ammo + code:8c95/8d/ad + cheat + description:Infinite Grenades + code:8c44/8d/ad + cheat + description:Infinite Missiles + code:8ce9/8d/ad + cheat + description:Reduce your injuries by up to 50% + code:e8b9/07/00 + cheat + description:Play with less health + code:f3b6/0a/ea+ac42/0a/ea + cheat + description:Infinite time for Metal Gear battle + code:a0d6/ce/ad + cheat + description:One hit defeats Metal Gear + code:83a3/f0/d0 + cheat + description:Start a new game to view the ending + code:c530/0e/11 + cheat + description:Start with half bullets for Beretta M92 + code:e7ac/40/20 + cheat + description:Start with double bullets for Beretta M92 + code:e7ac/40/80 + cheat + description:Start with Machine Gun instead of Beretta + code:e798/01/02+e7ae/c0/c2 + cheat + description:Start with Shotgun instead of Beretta + code:e798/01/04+e7ae/c0/c4 + cheat + description:Start with Grenades instead of Beretta + code:e798/01/20+e7ae/c0/c6 + cheat + description:Start with Missiles instead of Beretta + code:e798/01/80+e7ae/c0/c8 + +cartridge sha256:98691aea357072f901095e47db056a01887083fd81710d425b9171db1cd1ad1b + name:Snake Rattle n Roll (USA) + cheat + description:Infinite lives - both players + code:be1d/de/bd + cheat + description:Infinite time + code:fa81/c6/a5 + cheat + description:Faster timer + code:fa7e/6e/40 + cheat + description:Slower timer + code:fa7e/6e/90 + cheat + description:Super-jump + code:9c2d/01/02 + cheat + description:Mega-jump + code:9c2d/01/03 + cheat + description:1 life - both players + code:82a7/02/00 + cheat + description:6 lives - both players + code:82a7/02/05 + cheat + description:9 lives - both players + code:82a7/02/08 + cheat + description:1 life - both players, after continue + code:8eb0/02/00 + cheat + description:6 lives - both players, after continue + code:8eb0/02/05 + cheat + description:9 lives - both players, after continue + code:8eb0/02/08 + cheat + description:Start on level 2 + code:82bc/ff/01 + cheat + description:Start on level 3 + code:82bc/ff/02 + cheat + description:Start on level 4 + code:82bc/ff/03 + cheat + description:Start on level 5 + code:82bc/ff/04 + cheat + description:Start on level 6 + code:82bc/ff/05 + cheat + description:Start on level 7 + code:82bc/ff/06 + cheat + description:Invincibility (blinking) + code:040d/11 + cheat + description:Infinite health + code:059f/1c + cheat + description:Infinite lives + code:03df/03 + cheat + description:Infinite time (alt) + code:00cf/09 + cheat + description:Easy win + code:0062/09 + cheat + description:Max tongue height + code:0499/07 + +cartridge sha256:fbd7caadaf77c2b191e74328b9b836155f8498500f7e5af44edfc0ec53b15fee + name:Snow Brothers (USA) + cheat + description:Invincibility + code:8eb6/de/bd + cheat + description:Infinite number of chances + code:8ffb/d6/a5 + cheat + description:Always get 10 chances after a continue (count restarts at 9) + code:8317/02/09 + cheat + description:Always get 1 chance after a continue (count restarts at 0) + code:8317/02/00 + cheat + description:Don't lose super ability after you lose a chance + code:909c/99/b9 + cheat + description:Start with 10 chances instead of 3 (count starts at 9 instead of 2) + code:a329/02/09 + cheat + description:Start with 1 chance (count starts at 0) + code:a329/02/00 + cheat + description:Start with Speed Skates, Power Shots and super snow-throwing + code:800f/00/0f + cheat + description:Start with Speed Skates (don't use with other "start with" codes) + code:800f/00/01 + cheat + description:Start with Power Shots (don't use with other "start with" codes) + code:800f/00/02 + cheat + description:Start with super snow-throwing ability (don't use with other "start with" codes) + code:800f/00/04 + cheat + description:Start on 5th floor + code:a2e6/00/04 + cheat + description:Start on 10th floor + code:a2e6/00/09 + cheat + description:Start on 20th floor + code:a2e6/00/13 + cheat + description:Start on 30th floor + code:a2e6/00/1d + cheat + description:Start on 40th floor + code:a2e6/00/27 + cheat + description:Start on 50th floor + code:a2e6/00/31 + +cartridge sha256:6a0c8be0f6445d9d777080955c7aa8fbff7497633b878a36c8139ec13dabfb8b + name:Soccer (World) + cheat + description:Each half lasts only 10 minutes + code:9a1c/15/10 + cheat + description:Each half lasts for 50 minutes + code:9a1c/15/50 + cheat + description:Start 1 goal up + code:be56/00/01+be59/85/84+be5b/8d/8c + cheat + description:Start 3 goals up + code:be56/00/03+be59/85/84+be5b/8d/8c + +cartridge sha256:45a0fd35f3141c140fb8d1f652876011f28d772b987da123c597aa8c924437b2 + name:Solar Jetman - Hunt for the Golden Warpship (USA) + cheat + description:No damage taken from walls + code:a6a4/fd/00+a6a8/ff/00 + cheat + description:Minimum damage taken from walls + code:a6a8/ff/00 + cheat + description:Infinite lives + code:9d2f/c6/a5 + cheat + description:Weapons use up no energy + code:ce89/f9/ed + cheat + description:Items for free + code:dab1/0f/00+dac9/85/24 + cheat + description:Reversed gravity for planet 1 + code:95d3/0b/fb + cheat + description:Reversed gravity for planet 2 + code:965a/1e/ee + cheat + description:Reversed gravity for planet 3 + code:9690/14/e4 + cheat + description:Reversed gravity for planet 4 + code:95ee/0a/fa + cheat + description:Reversed gravity for planet 5 + code:9624/20/e0 + cheat + description:Reversed gravity for planet 6 + code:963f/29/e9 + cheat + description:Reversed gravity for planet 7 + code:9609/23/e3 + cheat + description:Normal gravity for planet 8 + code:96ab/e8/18 + cheat + description:Start with 1 ship and 1 life + code:d34a/04/01 + cheat + description:Start with 8 ships and 8 lives + code:d34a/04/08 + cheat + description:Start with more money + code:d35a/01/08 + cheat + description:Start on level 3 + code:d35e/00/02 + cheat + description:Start on level 6 + code:d35e/00/05 + cheat + description:Start on level 9 + code:d35e/00/08 + cheat + description:Start on level 11 + code:d35e/00/0a + +cartridge sha256:842478f0d9f01c6c547672a7e4dc4a33ed2c900f92e4b318f4d5941ba548b355 + name:Solomon's Key (USA) + cheat + description:Invincibility + code:8065/20/ad + cheat + description:Infinite life + code:a1a7/91/b1 + cheat + description:Infinite lives + code:c84c/ca/ea + cheat + description:Indestructible fireball + code:a01b/20/2c + cheat + description:Continuous fairies + code:a025/23/00 + cheat + description:Start with 40,000 life points + code:9829/8e/8c + cheat + description:Start on last level reached + code:9136/8d/2c + cheat + description:Start on next level + code:9136/8d/ee + cheat + description:Start on level 10 + code:9139/8d/ad+913b/04/93+9135/00/09 + cheat + description:Start on level 20 + code:9139/8d/ad+913b/04/93+9135/00/13 + cheat + description:Start on level 30 + code:9139/8d/ad+913b/04/93+9135/00/1d + cheat + description:Start on level 40 + code:9139/8d/ad+913b/04/93+9135/00/27 + cheat + description:Invincibility (alt) + code:0028/80 + cheat + description:Infinite life (alt) + code:0438/09 + cheat + description:Infinite fireballs + code:042f/80 + +cartridge sha256:e437dbafa7e20dd72412c869b9433901c3e9302cfa16b6e8379ecc56ae8dcc22 + name:Solstice - The Quest for the Staff of Demnos (USA) + cheat + description:Infinite lives + code:8a5d/ce/ad + cheat + description:Infinite Potions + code:92d5/de/bd + cheat + description:Multi-jump + code:a4bf/20/ad + cheat + description:1 life after continue + code:812b/03/01 + cheat + description:8 lives after continue + code:812b/03/08 + cheat + description:Start with full flasks of Potions + code:8d1b/02/04 + cheat + description:Start with no Potions + code:8d1b/02/00 + cheat + description:Start with 1 life + code:8d46/04/01 + cheat + description:Start with 8 lives + code:8d46/04/08 + cheat + description:Infinite lives (alt) + code:0789/09 + cheat + description:Infinite Green Potion + code:0784/04 + cheat + description:Infinite Yellow Potion + code:0785/04 + cheat + description:Infinite Light Purple Potion + code:0786/04 + cheat + description:Infinite Dark Purple Potion + code:0787/04 + +cartridge sha256:69569bebb916fcd78f904abd28aa4ed69fde0467c050c539c5359409305ca4ea + name:Space Invaders (Japan) + cheat + description:Infinite lives - P1 + code:0029/09 + cheat + description:Infinite lives - P2 + code:002a/09 + +cartridge sha256:cce92c9404d5dd48680b0b505acbbbce279a4f09606167f0aacfb6da991aac4c + name:Space Hunter (Japan) + cheat + description:Infinite energy + code:b714/ce/ad+b697/9d/ad + +cartridge sha256:dbd587ef5a12e03a336cda61cd120b4e8c585f45d82821e144ee8afdea9ee84e + name:Spartan X 2 (Japan) + cheat + description:Infinite health + code:dc82/ce/ad+dc3e/8d/ad + +cartridge sha256:6f58c6fb427cf18b4c28f07909db642abac09fac2d7ae7dc9c99f1cd79263d95 + name:Spelunker (USA) + cheat + description:Invincibility + code:9540/20/60+848f/ff/3e+8491/2d/2c + cheat + description:Infinite lives + code:9599/ce/2d + cheat + description:Invisibility + code:86a7/10/00 + cheat + description:Jump higher + code:8884/fe/fd+8878/00/80 + cheat + description:Start with 1 life + code:8176/02/00 + cheat + description:Start with 6 lives + code:8176/02/05 + cheat + description:Start with 9 lives + code:8176/02/08 + cheat + description:Infinite lives (alt) + code:0234/63 + cheat + description:Have a high score + code:022f/ff + cheat + description:Infinite Bombs + code:0237/09 + cheat + description:Infinite Flares + code:0238/09 + +cartridge sha256:1104d574711a103745aed2407997275e1ac43fd4d5c7ff96bde0af5bfa014c2d + name:Spider-Man - Return of the Sinister Six (USA) + cheat + description:Invincibility + code:b2fd/20/ad + cheat + description:Infinite health + code:ce9e/8d/ad + +cartridge sha256:3c74b191d7d4cb6c34e6b2d5f76d9c86be63f8ebb61581c49810f0dd58c538c1 + name:Spiritual Warfare (USA) (v6.1) (Unl) + cheat + description:Infinite energy + code:c4e3/85/a5 + cheat + description:Infinite Vial Of God's Wrath + code:cdc2/c6/a5 + cheat + description:Start with all armors, 7 of each fruit, all items, 99 Keys, 255 God's Wrath, 99 Birds + code:b50f/00/ff + cheat + description:Start with max energy + code:b542/06/18 + +cartridge sha256:5a82a1b0386407f1036c3d0ae750741c0835336f062d77480e1dd5b4da507386 + name:Spiritual Warfare (USA) (v6.0) (Unl) + cheat + description:Invincibility + code:ed9a/02/00 + cheat + description:Infinite energy + code:c4bb/85/a5 + cheat + description:Infinite Vial Of God's Wrath + code:b4df/00/ff + cheat + description:Infinite Vials + code:cd9a/c6/a5 + cheat + description:Hit anywhere with fruits + code:cc5c/06/24 + cheat + description:Items are free + code:9161/b0/50 + cheat + description:Any answer is correct + code:929e/4c/ad + cheat + description:Walk through walls (not diagonally) + code:e5d4/c9/60 + cheat + description:Start with all armors, 7 of each fruit, all items, 99 Keys, 255 God's Wrath, 99 Birds + code:b4df/00/ff + cheat + description:Start with max energy + code:b512/06/18 + +cartridge sha256:14a86d409cc9e6ae2428f301e4aaa77290fe38ec3e660d971af9abda772747e2 + name:Spiritual Warfare (USA) (v5.1) (Unl) + cheat + description:Infinite energy + code:c4f9/85/a5 + cheat + description:Infinite Vial Of God's Wrath + code:cdd8/c6/a5 + cheat + description:Start with all armors, 7 of each fruit, all items, 99 Keys, 255 God's Wrath, 99 Birds + code:b525/00/ff + cheat + description:Start with max energy + code:b558/06/18 + +cartridge sha256:387d82471ca5f54e70b3c4d445ae5c692640d99c47b30a6bf67f5a17b6236c85 + name:Splatter House - Wanpaku Graffiti (Japan) + cheat + description:Hit anywhere + code:a14c/03/00+a139/1b/00+a134/b0/24 + cheat + description:Moon-jump + code:c4ab/20/28+c3a5/05/80+c3a4/c9/29+c3a3/8f/67 + cheat + description:Start a new game to view ending + code:aeee/02/05 + +cartridge sha256:17da401495807145c9d4db275d429b7fe94be45dde00edc40aca885911cfd138 + name:Spy Hunter (USA) + cheat + description:Infinite health + code:9ae0/85/a5 + cheat + description:Infinite lives + code:81c7/ce/ad + cheat + description:Infinite lives (alt) + code:bc0d/c6/a5 + cheat + description:Infinite missiles + code:b748/ce/ad + cheat + description:Infinite smoke + code:b686/8d/ae + cheat + description:Hit anywhere + code:9dfc/15/00+9df8/0e/00+abd8/0f/00+9ded/24/00+9dff/85/a5 + cheat + description:Enemies die automatically + code:8538/0e/00+abd8/0f/00+abd2/60/ea + cheat + description:No enemies + code:9ad9/85/a5+9b3e/85/a5 + cheat + description:Double missiles on pick-up + code:a58b/03/06 + cheat + description:Slow down timer + code:ad07/07/0f + cheat + description:Keep special weapons + code:8bd4/8d/2c+8bd7/8d/2c + cheat + description:Start with 2 extra lives + code:ad8c/00/02 + cheat + description:Start with 6 extra lives + code:ad8c/00/06 + +cartridge sha256:91c61066a9b6b5ed169449b175190d75d38834e07da263f637af05801bc2f5ae + name:Spy vs Spy (USA) + cheat + description:Stop black spy's clock + code:8367/ce/ad + cheat + description:Stop white spy's clock + code:83bb/ce/ad + cheat + description:Black spy has 100 seconds in a minute + code:8381/35/39 + cheat + description:White spy has 100 seconds in a minute + code:83d5/35/39 + cheat + description:Black spy has deadly punches + code:a7e7/eb/f1 + cheat + description:White spy has deadly punches + code:a7e3/05/0d + +cartridge sha256:687963e7fd12834543da99c60a533fcdfedacd27f8a67c0c9c4007c1263a79b3 + name:Sqoon (USA) + cheat + description:Infinite lives + code:8580/01/00 + cheat + description:Never lose your special weapon + code:8d09/ce/ad + cheat + description:Never lose humans on dying + code:8c84/8d/2c+b2da/8d/2c + cheat + description:Gain main weapon on rescuing 9 humans + code:9f98/01/02 + cheat + description:Start with 1 life + code:8bbd/02/00 + cheat + description:Start with 6 lives + code:8bbd/02/05 + cheat + description:Start with 9 lives + code:8bbd/02/08 + cheat + description:Start at phase 3 + code:8b5a/01/03 + cheat + description:Start at phase 5 + code:8b5a/01/05 + cheat + description:Start at phase 8 + code:8b5a/01/08 + +cartridge sha256:b2e222df4d50fb75b108eac25e2beb671e37881bb357aa89bde7ef73d8d670f2 + name:Squashed (USA) (Proto) + cheat + description:Invincibility + code:969a/20/ad + cheat + description:Infinite lives + code:9476/de/dd + cheat + description:Infinite time + code:e665/ce/cd + +cartridge sha256:d9a666f7b122bff2db329d346e20d9708ad58471ea80fbd032aa4600e86ad8f1 + name:Stanley - The Search for Dr. Livingston (USA) + cheat + description:Infinite health + code:c307/8d/ad + cheat + description:Infinite time on continue screen + code:af5a/c6/ea + cheat + description:Start a new game with complete map + code:caa6/00/ff + cheat + description:Infinite health (alt) + code:057e/26 + cheat + description:Have all weapons + code:049e/5f+049d/5f+049c/5f+049b/5f+049a/5f+0499/5f+0498/01+0497/5f+0496/5f + +cartridge sha256:581851e22e8d499ada19e621c93571fba279fe9c8446ed2ee566b16128f13874 + name:Star Force (USA) + cheat + description:Infinite lives + code:8e4e/c6/a5 + cheat + description:Turbo speed + code:816c/ff/fe + cheat + description:Start with 1 life + code:8db3/02/00 + cheat + description:Start with 6 lives + code:8db3/02/05 + cheat + description:Start with 9 lives + code:8db3/02/08 + +cartridge sha256:7b7ccdcda705c2c3215c646b479c5d5868b72f3cd3eff97291d608756e5f3230 + name:Starship Hector (USA) + cheat + description:Take minimum damage + code:fcb0/e5/e9+fcb1/06/01 + cheat + description:Infinite lives + code:dc41/c6/a5 + cheat + description:Extra health from capsules + code:e5ec/01/04 + cheat + description:Start with 1 life + code:dc79/02/00 + cheat + description:Start with 6 lives + code:dc79/02/05 + cheat + description:Start with 9 lives + code:dc79/02/08 + cheat + description:Start at stage 2 + code:f5f4/00/01 + cheat + description:Start at stage 3 + code:f5f4/00/02 + cheat + description:Start at stage 4 + code:f5f4/00/03 + cheat + description:Start at stage 5 + code:f5f4/00/04 + cheat + description:Infinite health + code:00b0/10 + cheat + description:Play as Bomberking + code:005f/01 + +cartridge sha256:025abe5ae4e1610fac2507296184f64173fd960adfc79d456001adec29c546a5 + name:Star Soldier (USA) + cheat + description:Infinite lives + code:8118/c6/a5 + cheat + description:Infinite shield power + code:9ee2/c6/24 + cheat + description:Double shield power + code:9f19/05/0a+93fc/05/0a + cheat + description:Start with laser + code:8191/00/01 + +cartridge sha256:a3d132f118c0d95590579c6d6b89b6bbe448a93aab93b3a29490f985b821a42c + name:Star Trek - 25th Anniversary (USA) + cheat + description:Kirk has more energy + code:9c9e/07/0b + cheat + description:Kirk has less energy + code:9c9e/07/04 + cheat + description:McCoy has more energy + code:a03f/07/0b + cheat + description:McCoy has less energy + code:a03f/07/04 + cheat + description:Spock has more energy + code:a036/07/0b + cheat + description:Spock has less energy + code:a036/07/04 + cheat + description:Security has more energy + code:a063/07/0b + cheat + description:Geologist has more energy + code:a048/07/0b + cheat + description:Geologist has less energy + code:a048/07/04 + cheat + description:Biologist has more energy + code:a05a/07/0b + cheat + description:Biologist has less energy + code:a05a/07/04 + cheat + description:Historian has more energy + code:a051/07/0b + cheat + description:Historian has less energy + code:a051/07/04 + cheat + description:McCoy gives full energy to injured party + code:b1cf/04/07 + +cartridge sha256:8271542561a71830886e88ac74e6eda309440920b3607e950d5f2cd1a7edd5ca + name:Star Trek - The Next Generation (USA) + cheat + description:All systems are immune to damage - shields down + code:e7a1/91/b1 + cheat + description:Shields are immune to damage - shields up + code:e7be/8d/ad + cheat + description:Quicker damage repair + code:e64e/90/40 + cheat + description:Very quick damage repair + code:e64e/90/10 + cheat + description:Slower damage repair + code:e64e/90/c0 + cheat + description:Enemy does less damage + code:e0fb/0a/4a + cheat + description:Stop game time ticking over + code:e505/ee/60 + cheat + description:Photon Torpedoes always work + code:a031/74/00 + cheat + description:Phasers always work + code:a10e/f7/00 + cheat + description:Phasers fire for longer + code:a119/ec/00 + cheat + description:Damage is repaired immediately + code:e662/3d/00 + cheat + description:Transporter power does not decrease most of the time + code:beed/c6/a5 + cheat + description:Less transporter power required most of the time + code:be7a/20/05 + cheat + description:Stardate does not advance + code:aaf1/65/64 + +cartridge sha256:2e366cb5ebcce2cd7be431b84bbbb401104e2717322b15e5368707b4eddeb11a + name:Star Trek V - The Final Frontier (Unknown) (Proto) + cheat + description:Invincibility (blinking) + code:9a7f/f0/d0 + cheat + description:Infinite health + code:9507/8d/ad+8972/8d/ad + cheat + description:Infinite Phasers + code:9d96/8d/ad + cheat + description:Infinite Bombs + code:a2fb/ce/ad + +cartridge sha256:69de2c7552fa81ca5921da0e457abf1be35f18ffbad159788a76141be59c9f6b + name:StarTropics (USA) + cheat + description:Infinite health + code:a163/ed/ae + cheat + description:Infinite lives + code:e480/ce/ad + cheat + description:Infinite weapons + code:a5a9/de/bd + cheat + description:Hit anywhere + code:b2fc/29/50+b2fd/07/58+b3a0/c9/4c+b3a1/02/ef+b3a2/90/b3 + cheat + description:Enemies can't move + code:d39e/9f + cheat + description:1 star needed to restore health + code:a6af/05/01+a6b3/05/01 + cheat + description:9 stars needed to restore health + code:a6af/05/09+a6b3/05/09 + cheat + description:1 life with a new character + code:e257/03/01 + cheat + description:6 lives with a new character + code:e257/03/06 + cheat + description:1 life after continue + code:e534/03/01 + cheat + description:6 lives after continue + code:e534/03/06 + cheat + description:Gain 50 fire weapons on pick-up + code:b0e2/19/32 + cheat + description:Gain 50 bat weapons on pick-up + code:b0df/1e/32 + cheat + description:Only 3 hearts needed to use shooting-star + code:a7b2/0c/05 + cheat + description:Only 8 hearts needed to use super-nova + code:a791/16/08 + cheat + description:Invincibility after one hit + code:077b/2e + cheat + description:Infinite health (alt) + code:0112/17 + cheat + description:Infinite Blue Stars + code:011c/09 + cheat + description:Permanent Anklet (can jump 2 spaces) + code:005b/02+0180/01 + +cartridge sha256:c4c139d2c349a513d4ccc724daee3fd37099c3c0d2742fad777a0edbe3d042ce + name:Star Voyager (USA) + cheat + description:Infinite life support pods + code:ae55/c6/24 + cheat + description:Start with double life support pods + code:d540/0a/14 + cheat + description:Start with triple life support pods + code:d540/0a/1e + cheat + description:Barrier won't take damage + code:bb55/03/00 + cheat + description:Radar won't take damage + code:bbc6/d0/10 + cheat + description:Cannon won't take damage + code:bba2/d0/f0 + cheat + description:Engine won't take damage + code:bb2a/03/00 + +cartridge sha256:b9116f11828e39d3e201c878a874f0d88fa0eae9dece0469bf94a7e9c8616775 + name:Star Wars (USA) + cheat + description:Infinite lives + code:8207/ce/ad + cheat + description:Immune to spikes, you can get stuck on them + code:f553/9d/2c + cheat + description:Immune to most bullets + code:b76f/9d/bd + cheat + description:Immune to most collisions + code:b5fa/e5/24+b647/9d/bd + cheat + description:Full energy on big energy pick-ups + code:bc47/02/00 + cheat + description:Less energy on big energy pick-ups + code:bc43/20/08 + cheat + description:More energy on big energy pick-ups + code:bc43/20/40 + cheat + description:Always running + code:cd99/01/02+cdca/01/02 + cheat + description:Start with 1 life + code:8024/02/00 + cheat + description:Start with 6 lives + code:8024/02/05 + cheat + description:Start with 9 lives + code:8024/02/08 + +cartridge sha256:01b1bc93f72286a10ac62869ebe1bf2493ca24b3386e01447b0ccac50acdee94 + name:Star Wars - The Empire Strikes Back (USA) + cheat + description:Don't take damage from most enemies + code:a766/99/2c + cheat + description:9 harpoons - scene 2 + code:a1d7/05/09 + cheat + description:1 harpoons - scene 2 + code:a1d7/05/01 + cheat + description:Infinite harpoons - scene 2 + code:ac66/ce/2c + cheat + description:Infinite energy for ship - scene 2 + code:b5d5/85/24 + cheat + description:Always have Lightsaber + code:9ea8/37/00 + cheat + description:Start with 14 continues + code:b5f4/07/0e + cheat + description:Start on scene 2 + code:cb02/00/01 + cheat + description:Start on scene 3 + code:cb02/00/02 + cheat + description:Start on scene 4 + code:cb02/00/03 + cheat + description:Start on scene 5 + code:cb02/00/04 + cheat + description:Start on scene 6 + code:cb02/00/05 + cheat + description:Start on scene 7 + code:cb02/00/06 + +cartridge sha256:8093144834f1153e95076a76dbc720cec37a31412b422c8adf9f5bcea1b642e8 + name:Stealth ATF (USA) + cheat + description:Infinite missiles + code:ad65/ce/ad + cheat + description:Start with double missiles + code:a8ba/08/10 + cheat + description:No damage taken from enemy's bullets + code:9f62/ee/ad + cheat + description:Start with less fuel + code:a8bf/96/60 + cheat + description:More enemy planes on the screen + code:a3c2/02/08 + +cartridge sha256:5ca7cb3c4168bb021a67b50fa071afe7679f4e79c5c46e229fbe7b88004bf51a + name:Stinger (USA) + cheat + description:Keep weapons after death + code:cb77/95/24 + cheat + description:Infinite lives + code:cb6c/d6/a9 + cheat + description:Skip intro + code:c3db/00/05 + cheat + description:Start with 1 life + code:c429/03/01 + cheat + description:Start with 6 lives + code:c429/03/06 + cheat + description:Start with 9 lives + code:c429/03/09 + cheat + description:Start with Dual Cannons + code:c470/3e/47+c46e/10/01 + cheat + description:Start with Laser + code:c470/3e/47+c46e/10/02 + cheat + description:Start with Shoot Right + code:c470/3e/47+c46e/10/04 + cheat + description:Start with Shoot Left + code:c470/3e/47+c46e/10/08 + cheat + description:Start with Five Direction Firing + code:c470/3e/47+c46e/10/10 + cheat + description:Start with Three Direction Firing + code:c470/3e/47+c46e/10/20 + cheat + description:Start with Force field + code:c470/3e/47+c46e/10/40 + cheat + description:Start at stage 2 (wait for demo game then press start) + code:c415/85/24+c301/01/01 + cheat + description:Start at stage 3 + code:c415/85/24+c301/01/02 + cheat + description:Start at stage 4 + code:c415/85/24+c301/01/03 + cheat + description:Start at stage 5 + code:c415/85/24+c301/01/04 + cheat + description:Start at stage 6 + code:c415/85/24+c301/01/05 + cheat + description:Invincibility + code:0056/50 + cheat + description:Infinite lives (alt) + code:0038/09 + +cartridge sha256:d8a12772ddcb35d66a6518096c8415961cb43ceb9ffb96e5c7f83fe3a8e7f2c1 + name:Street Cop (USA) + cheat + description:Infinite health + code:d28e/e5/24 + cheat + description:Take minimum damage + code:d28e/e5/e9+d28f/10/01 + cheat + description:Infinite time + code:f05e/c6/a5 + cheat + description:Have less time + code:e21e/09/06 + cheat + description:Have more time + code:e21e/09/12 + cheat + description:Start with less health + code:c8f7/30/18 + cheat + description:Start with more health + code:c8f7/30/60 + cheat + description:Start at level 2 + code:e121/00/01 + cheat + description:Start at level 3 + code:e121/00/02 + cheat + description:Start at level 4 + code:e121/00/03 + +cartridge sha256:885cfd4396e0ade5f3abbbdb5055bc48ef166f86207db631bac83c51c0844f08 + name:Street Fighter 2010 - The Final Fight (USA) + cheat + description:Invincibility + code:d45b/d0/f0 + cheat + description:Infinite health + code:d4b1/02/00 + cheat + description:Infinite lives + code:8136/c6/a5 + cheat + description:Infinite time + code:c238/95/b5 + cheat + description:Hit anywhere + code:d57f/11/20+d57e/b0/d0+d57b/d9/ad + cheat + description:Take less damage + code:d4b1/02/01 + cheat + description:Take more damage + code:d4b1/02/03 + cheat + description:Keep power-ups after losing a life + code:8112/85/24 + cheat + description:Keep power-ups when hit + code:d4c7/02/00 + cheat + description:Faster Ken + code:89dd/01/02 + cheat + description:Portal always stays open + code:ebe6/ce/ad + cheat + description:Start with 1 life + code:800e/04/00 + cheat + description:Start with 9 lives + code:800e/04/09 + +cartridge sha256:07401bfb725c61711ce0a1d5eade14e09cd0f1b90991691339077a0b7dea5e58 + name:Street Heroes (Asia) (Unl) + cheat + description:Infinite health + code:00d6/59 + cheat + description:One hit kills + code:00d7/00 + cheat + description:Only one win needed to advance + code:0059/02 + +cartridge sha256:d4fc5610f1355c545d1ecf21502c31a9d21a31e0d4f0043c7c8d8f199bea2a73 + name:Strider (USA) + cheat + description:Infinite health + code:8cf3/29/a9+8cf6/35/69 + cheat + description:Hit anywhere + code:ea7d/26/00+ea8a/19/00 + cheat + description:More energy from small capsules (10) + code:af38/01/0a + cheat + description:More energy from big capsules (20) + code:af3a/0a/14 + cheat + description:Health from small capsules (10) + code:af3c/01/0a + cheat + description:Health from big capsules (20) + code:af3e/0a/14 + cheat + description:Double health and energy from all capsules + code:af0e/18/0a + cheat + description:Have all Keys and start on Red Dragon level + code:048c/ff + cheat + description:Have all Data Files + code:048e/ff + cheat + description:Max stats, all tricks, Slide In, Plasma Arrow + code:048b/09+048d/01 + cheat + description:Infinite power + code:056b/63 + cheat + description:High-jump + code:0538/0a + cheat + description:Plasma Sword is instantly charged + code:055d/89 + +cartridge sha256:9aa6ced81adbfb09730591efa9aea369ec7bf57d8a1504dfd5f77ff5696b0427 + name:Strike Wolf (MGC-014) + cheat + description:Infinite energy + code:bd4f/85/a5 + cheat + description:Infinite ammo + code:985f/ce/ad + cheat + description:Infinite Bombs + code:97a3/ce/ad + +cartridge sha256:f3a140c16012c4e4fb0deda64cbee7d9ebe78d2fb717b80b12a9f938d57b78bb + name:Stunt Kids (USA) (Unl) + cheat + description:Infinite time - P1 + code:927f/de/bd + cheat + description:Infinite time - P2 + code:932f/de/bd + cheat + description:Infinite lives + code:ac55/ce/ad + cheat + description:Always have 9 coins after a race + code:d673/8c/8e + cheat + description:Coins worth nothing on pick-up + code:9948/ee/ad + cheat + description:Start with 1 life instead of 3 + code:cad7/02/00 + cheat + description:Start with 6 lives + code:cad7/02/05 + cheat + description:Start with 9 lives + code:cad7/02/09 + cheat + description:Start with 0 turbos instead of 3 + code:d089/03/00 + cheat + description:Start with 6 turbos + code:d089/03/06 + cheat + description:Start with 9 turbos + code:d089/03/09 + +cartridge sha256:4d16627301ff5def67247039b3a4b1cce4d20fbb867f4c5b7bcab43a8575f59f + name:Sunday Funday - The Ride (USA) (Unl) + cheat + description:Enable level skip (press B then Select) + code:fafb/f0/d0 + +cartridge sha256:a387a17294bb440eb821fa096bfe476f772c7f9f79c5fb251f6b0a50bdeda53d + name:Super Arabian (Japan) + cheat + description:Invincibility + code:a930/ad + cheat + description:Hit anywhere + code:9c8d/07/00+9cba/95/cc + +cartridge sha256:3edd803db1cc88155720625ed8f3e362a5e3c660e7faf3285bbe3a2c6571511c + name:Super C (USA) + cheat + description:Invincibility - both players + code:a13a/3b + cheat + description:Infinite continues + code:ea1a/c6/a5 + cheat + description:Activates 10 lives code + code:e5a8/02/00 + cheat + description:10 lives code give you 30 + code:e5aa/09/1d + cheat + description:Extra life for each enemy killed + code:e6f6/02/00 + cheat + description:Hit anywhere + code:a1ad/0d/11 + cheat + description:One hit kills + code:a201/00 + cheat + description:Enemies die automatically (causes graphical glitches in some levels) + code:bb7d/38/18+a19d/1d/6b+f6ad/a5/a9+84ff/85/86+84fe/eb/1a + cheat + description:Multi-jump - both players + code:86e0/d0/24+86e9/6d/3a + cheat + description:Keep equipped weapon after dying + code:8662/95/24 + cheat + description:Keep weapon after dying + code:e5a0/95/a5+8662/95/a5 + cheat + description:Run faster to the right + code:8870/f0 + cheat + description:Press Start to complete current level + code:ea9f/39/38+ea9d/01/04 + cheat + description:Start a new game to view the ending + code:e4c3/00/08 + cheat + description:Stage select after title screen + code:e4af/d0/f0 + cheat + description:Start with Spray Gun + code:e5b4/57/b8+e5a1/b8/57+e5b2/00/02 + cheat + description:Start with Fireball Gun + code:e5b4/57/b8+e5a1/b8/57+e5b2/00/04 + cheat + description:Start with 1 life - both players + code:e5a3/02/00 + cheat + description:Start with 6 lives - both players + code:e5a3/02/05 + cheat + description:Start with 9 lives - both players + code:e5a3/02/08 + cheat + description:Start with 255 lives - both players + code:e5a3/02/ff + cheat + description:Start with 9 continues + code:e58d/02/06 + cheat + description:Start at area 2 + code:e583/00/01 + cheat + description:Start at area 3 + code:e583/00/02 + cheat + description:Start at area 4 + code:e583/00/03 + cheat + description:Start at area 5 + code:e583/00/04 + cheat + description:Start at area 6 + code:e583/00/05 + cheat + description:Start at area 7 + code:e583/00/06 + cheat + description:Invincibility (blinking) + code:00d4/55 + cheat + description:Infinite lives + code:0053/03 + cheat + description:Have the Machine Gun + code:00b8/81 + cheat + description:Have the Spread Gun + code:00b8/82 + cheat + description:Have the Laser Gun + code:00b8/83 + cheat + description:Have the Fireball Gun + code:00b8/84 + cheat + description:Have the Single Shot MG + code:00b8/85 + cheat + description:Have the Super Fireball Gun + code:00b8/86 + +cartridge sha256:fcb6a0ef3a20c19b356005fbb21dc8009563b1cb5a9aaebc8e9386b4a8c5912e + name:Super Mario Bros. (World) + cheat + description:Invincibility + code:eee9/ad/8d+eeec/f0/d0 + cheat + description:Invincibility (Starman effect) + code:d88d/d5 + cheat + description:Infinite time + code:b766/ae + cheat + description:Infinite time (alt) + code:b766/ad + cheat + description:Infinite lives - both players + code:91d9/ad + cheat + description:Infinite lives + code:91d9/ce/cd + cheat + description:Always Big Mario + code:b263/a9+b264/00+d936/ad + cheat + description:Always Fiery Mario + code:b626/22 + cheat + description:Always get 3 fireworks at end of stage + code:d305/1c + cheat + description:Always get 6 fireworks at end of stage + code:d2f6/07/86 + cheat + description:After falling down a hole, you drop from above + code:bff3/95/a9 + cheat + description:Fireballs hit anywhere + code:d721/90/24 + cheat + description:Gain a 1-up when an enemy is killed or power-up is gained + code:84e5/07/00 + cheat + description:Goombas don't walk off ledges + code:e0e6/0b + cheat + description:Mega-jump from a standing start only + code:b424/10 + cheat + description:Mega-jump from running only + code:b426/10 + cheat + description:Mega-jump from turbo running only + code:b428/04 + cheat + description:Moon Gravity from a standing start + code:b42b/07 + cheat + description:Moon Gravity from a running start + code:b42d/07 + cheat + description:Moon Gravity from turbo running only + code:b42f/07 + cheat + description:Multi-jump + code:b48d/10 + cheat + description:Super-jump from a standing start only + code:b424/18 + cheat + description:Super-jump from running only + code:b426/16 + cheat + description:Super-jump from turbo running only + code:b428/14 + cheat + description:Turn all enemies into Toad + code:e8b4/b7 + cheat + description:Can control Mario in demo and title screen + code:82bc/00/01+82be/fc/70+82bf/06/07 + cheat + description:Can control Mario in entrances that lead to underground + code:b08b/f5 + cheat + description:Can move left or right while crouched + code:b123/f0/10 + cheat + description:Can walk through pipes and blocks + code:df56/54 + cheat + description:Small Mario can break bricks + code:bd18/01/00+bcf7/02/00+bd17/d0/a0 + cheat + description:Fireballs can kill Bowser's Fire + code:d794/2e/00 + cheat + description:Fireballs can kill Bullet Bill + code:d78c/36/00 + cheat + description:Fireballs can kill Buzzy Beetle + code:d757/6b/00 + cheat + description:Fireballs can kill Podoboo + code:e02a/04/00+d790/32/00 + cheat + description:World 8-4, wrong pipe will lead to next area + code:9e33/e1/ec+9e23/e1/e7+9e42/65/02 + cheat + description:Enable level select + code:8270/00 + cheat + description:Press Start to finish current world + code:81ba/80/70+81b5/84/24+81b7/49/a9+81b9/09/8d+81bc/05/ea+81bb/d0/07+81b8/01/02 + cheat + description:Start with 1 life - both players + code:906a/00 + cheat + description:Start with 6 lives - both players + code:906a/05 + cheat + description:Start with 9 lives - both players + code:906a/08 + cheat + description:Start P1 with 8 lives and P2 with 3 lives + code:906b/8e + cheat + description:Start on World 2 + code:9089/5f+908a/07+9087/01 + cheat + description:Start on World 3 + code:9089/5f+908a/07+9087/02 + cheat + description:Start on World 4 + code:9089/5f+908a/07+9087/03 + cheat + description:Start on World 5 + code:9089/5f+908a/07+9087/04 + cheat + description:Start on World 6 + code:9089/5f+908a/07+9087/05 + cheat + description:Start on World 7 + code:9089/5f+908a/07+9087/06 + cheat + description:Start on World 8 + code:9089/5f+908a/07+9087/07 + cheat + description:Invincibility (blinking) + code:079e/06 + cheat + description:Invincibility (Starman effect) (alt) + code:079f/18 + cheat + description:Infinite lives (alt) + code:075a/09 + cheat + description:Infinite time (alt 2) + code:0787/0c + cheat + description:Always Big Mario (alt) + code:0754/00+0756/01 + cheat + description:Always Fiery Mario (alt) + code:0754/00+0756/02 + +cartridge sha256:5dde385041aa7364c78205f2ba49615f416c701b6025e38aa1d7b9c4f99a62db + name:Super Mario Bros. + Duck Hunt (USA) + cheat + description:DH - Infinite ammo + code:d171/c6/a5 + cheat + description:DH - Infinite ammo (alt) + code:00ba/03 + cheat + description:DH - Hit anywhere + code:d22c/f5/00 + cheat + description:DH - Always get the perfect bonus + code:d350/0a/00+d351/d0/30 + cheat + description:DH - Ducks never fly away - Game A + code:ca6c/c6/05 + cheat + description:DH - Enable game "D" (press Select three times) + code:c19e/03/04 + cheat + description:SMB - Invincibility + code:eee9/ad/8d+eeec/f0/d0 + cheat + description:SMB - Invincibility (Starman effect) + code:d88d/d5 + cheat + description:SMB - Infinite time + code:b766/ae + cheat + description:SMB - Infinite time (alt) + code:b766/ad + cheat + description:SMB - Infinite lives - both players + code:91d9/ad + cheat + description:SMB - Infinite lives + code:91d9/ce/cd + cheat + description:SMB - Always Big Mario + code:b263/a9+b264/00+d936/ad + cheat + description:SMB - Always Fiery Mario + code:b626/22 + cheat + description:SMB - Always get 3 fireworks at end of stage + code:d305/1c + cheat + description:SMB - Always get 6 fireworks at end of stage + code:d2f6/07/86 + cheat + description:SMB - After falling down a hole, you drop from above + code:bff3/95/a9 + cheat + description:SMB - Fireballs hit anywhere + code:d721/90/24 + cheat + description:SMB - Gain a 1-up when an enemy is killed or power-up is gained + code:84e5/07/00 + cheat + description:SMB - Goombas don't walk off ledges + code:e0e6/0b + cheat + description:SMB - Mega-jump from a standing start only + code:b424/10 + cheat + description:SMB - Mega-jump from running only + code:b426/10 + cheat + description:SMB - Mega-jump from turbo running only + code:b428/04 + cheat + description:SMB - Moon Gravity from a standing start + code:b42b/07 + cheat + description:SMB - Moon Gravity from a running start + code:b42d/07 + cheat + description:SMB - Moon Gravity from turbo running only + code:b42f/07 + cheat + description:SMB - Multi-jump + code:b48d/10 + cheat + description:SMB - Super-jump from a standing start only + code:b424/18 + cheat + description:SMB - Super-jump from running only + code:b426/16 + cheat + description:SMB - Super-jump from turbo running only + code:b428/14 + cheat + description:SMB - Turn all enemies into Toad + code:e8b4/b7 + cheat + description:SMB - Can control Mario in demo and title screen + code:82bc/00/01+82be/fc/70+82bf/06/07 + cheat + description:SMB - Can control Mario in entrances that lead to underground + code:b08b/f5 + cheat + description:SMB - Can move left or right while crouched + code:b123/f0/10 + cheat + description:SMB - Can walk through pipes and blocks + code:df56/54 + cheat + description:SMB - Small Mario can break bricks + code:bd18/01/00+bcf7/02/00+bd17/d0/a0 + cheat + description:SMB - Fireballs can kill Bowser's Fire + code:d794/2e/00 + cheat + description:SMB - Fireballs can kill Bullet Bill + code:d78c/36/00 + cheat + description:SMB - Fireballs can kill Buzzy Beetle + code:d757/6b/00 + cheat + description:SMB - Fireballs can kill Podoboo + code:e02a/04/00+d790/32/00 + cheat + description:SMB - Enable level select + code:8270/00 + cheat + description:SMB - Press Start to finish current world + code:81ba/80/70+81b5/84/24+81b7/49/a9+81b9/09/8d+81bc/05/ea+81bb/d0/07+81b8/01/02 + cheat + description:SMB - Start with 1 life - both players + code:906a/00 + cheat + description:SMB - Start with 6 lives - both players + code:906a/05 + cheat + description:SMB - Start with 9 lives - both players + code:906a/08 + cheat + description:SMB - Start P1 with 8 lives and P2 with 3 lives + code:906b/8e + cheat + description:SMB - Start on World 2 + code:9089/5f+908a/07+9087/01 + cheat + description:SMB - Start on World 3 + code:9089/5f+908a/07+9087/02 + cheat + description:SMB - Start on World 4 + code:9089/5f+908a/07+9087/03 + cheat + description:SMB - Start on World 5 + code:9089/5f+908a/07+9087/04 + cheat + description:SMB - Start on World 6 + code:9089/5f+908a/07+9087/05 + cheat + description:SMB - Start on World 7 + code:9089/5f+908a/07+9087/06 + cheat + description:SMB - Start on World 8 + code:9089/5f+908a/07+9087/07 + cheat + description:SMB - Invincibility (blinking) + code:079e/06 + cheat + description:SMB - Invincibility (Starman effect) (alt) + code:079f/18 + cheat + description:SMB - Infinite lives (alt) + code:075a/09 + cheat + description:SMB - Infinite time (alt 2) + code:0787/0c + cheat + description:SMB - Always Big Mario (alt) + code:0754/00+0756/01 + cheat + description:SMB - Always Fiery Mario (alt) + code:0754/00+0756/02 + +cartridge sha256:26977a6c51a6f1e1af895b8863e8e7d57c5321621f29cf58ebfbf85163a999dd + name:Super Mario Bros. + Duck Hunt + World Class Track Meet (USA) (Rev A) + cheat + description:DH - Infinite ammo + code:d171/c6/a5 + cheat + description:DH - Infinite ammo (alt) + code:00ba/03 + cheat + description:DH - Hit anywhere + code:d22c/f5/00 + cheat + description:DH - Always get the perfect bonus + code:d350/0a/00+d351/d0/30 + cheat + description:DH - Ducks never fly away - Game A + code:ca6c/c6/05 + cheat + description:DH - Enable game "D" (press Select three times) + code:c19e/03/04 + cheat + description:SMB - Invincibility + code:eee9/ad/8d+eeec/f0/d0 + cheat + description:SMB - Invincibility (Starman effect) + code:d88d/d5 + cheat + description:SMB - Infinite time + code:b766/ae + cheat + description:SMB - Infinite time (alt) + code:b766/ad + cheat + description:SMB - Infinite lives - both players + code:91d9/ad + cheat + description:SMB - Infinite lives + code:91d9/ce/cd + cheat + description:SMB - Always Big Mario + code:b263/a9+b264/00+d936/ad + cheat + description:SMB - Always Fiery Mario + code:b626/22 + cheat + description:SMB - Always get 3 fireworks at end of stage + code:d305/1c + cheat + description:SMB - Always get 6 fireworks at end of stage + code:d2f6/07/86 + cheat + description:SMB - After falling down a hole, you drop from above + code:bff3/95/a9 + cheat + description:SMB - Fireballs hit anywhere + code:d721/90/24 + cheat + description:SMB - Gain a 1-up when an enemy is killed or power-up is gained + code:84e5/07/00 + cheat + description:SMB - Goombas don't walk off ledges + code:e0e6/0b + cheat + description:SMB - Mega-jump from a standing start only + code:b424/10 + cheat + description:SMB - Mega-jump from running only + code:b426/10 + cheat + description:SMB - Mega-jump from turbo running only + code:b428/04 + cheat + description:SMB - Moon Gravity from a standing start + code:b42b/07 + cheat + description:SMB - Moon Gravity from a running start + code:b42d/07 + cheat + description:SMB - Moon Gravity from turbo running only + code:b42f/07 + cheat + description:SMB - Multi-jump + code:b48d/10 + cheat + description:SMB - Super-jump from a standing start only + code:b424/18 + cheat + description:SMB - Super-jump from running only + code:b426/16 + cheat + description:SMB - Super-jump from turbo running only + code:b428/14 + cheat + description:SMB - Turn all enemies into Toad + code:e8b4/b7 + cheat + description:SMB - Can control Mario in demo and title screen + code:82bc/00/01+82be/fc/70+82bf/06/07 + cheat + description:SMB - Can control Mario in entrances that lead to underground + code:b08b/f5 + cheat + description:SMB - Can move left or right while crouched + code:b123/f0/10 + cheat + description:SMB - Can walk through pipes and blocks + code:df56/54 + cheat + description:SMB - Small Mario can break bricks + code:bd18/01/00+bcf7/02/00+bd17/d0/a0 + cheat + description:SMB - Fireballs can kill Bowser's Fire + code:d794/2e/00 + cheat + description:SMB - Fireballs can kill Bullet Bill + code:d78c/36/00 + cheat + description:SMB - Fireballs can kill Buzzy Beetle + code:d757/6b/00 + cheat + description:SMB - Fireballs can kill Podoboo + code:e02a/04/00+d790/32/00 + cheat + description:SMB - Enable level select + code:8270/00 + cheat + description:SMB - Press Start to finish current world + code:81ba/80/70+81b5/84/24+81b7/49/a9+81b9/09/8d+81bc/05/ea+81bb/d0/07+81b8/01/02 + cheat + description:SMB - Start with 1 life - both players + code:906a/00 + cheat + description:SMB - Start with 6 lives - both players + code:906a/05 + cheat + description:SMB - Start with 9 lives - both players + code:906a/08 + cheat + description:SMB - Start P1 with 8 lives and P2 with 3 lives + code:906b/8e + cheat + description:SMB - Start on World 2 + code:9089/5f+908a/07+9087/01 + cheat + description:SMB - Start on World 3 + code:9089/5f+908a/07+9087/02 + cheat + description:SMB - Start on World 4 + code:9089/5f+908a/07+9087/03 + cheat + description:SMB - Start on World 5 + code:9089/5f+908a/07+9087/04 + cheat + description:SMB - Start on World 6 + code:9089/5f+908a/07+9087/05 + cheat + description:SMB - Start on World 7 + code:9089/5f+908a/07+9087/06 + cheat + description:SMB - Start on World 8 + code:9089/5f+908a/07+9087/07 + cheat + description:SMB - Invincibility (blinking) + code:079e/06 + cheat + description:SMB - Invincibility (Starman effect) (alt) + code:079f/18 + cheat + description:SMB - Infinite lives (alt) + code:075a/09 + cheat + description:SMB - Infinite time (alt 2) + code:0787/0c + cheat + description:SMB - Always Big Mario (alt) + code:0754/00+0756/01 + cheat + description:SMB - Always Fiery Mario (alt) + code:0754/00+0756/02 + +cartridge sha256:968cf4ae63fddf6a0d379bb12add5563f468e57ddddb69e00e1379a839234f95 + name:Super Mario Bros. + Duck Hunt + World Class Track Meet (USA) + cheat + description:DH - Infinite ammo + code:d171/c6/a5 + cheat + description:DH - Infinite ammo (alt) + code:00ba/03 + cheat + description:DH - Hit anywhere + code:d22c/f5/00 + cheat + description:DH - Always get the perfect bonus + code:d350/0a/00+d351/d0/30 + cheat + description:DH - Ducks never fly away - Game A + code:ca6c/c6/05 + cheat + description:DH - Enable game "D" (press Select three times) + code:c19e/03/04 + cheat + description:SMB - Invincibility + code:eee9/ad/8d+eeec/f0/d0 + cheat + description:SMB - Invincibility (Starman effect) + code:d88d/d5 + cheat + description:SMB - Infinite time + code:b766/ae + cheat + description:SMB - Infinite time (alt) + code:b766/ad + cheat + description:SMB - Infinite lives - both players + code:91d9/ad + cheat + description:SMB - Infinite lives + code:91d9/ce/cd + cheat + description:SMB - Always Big Mario + code:b263/a9+b264/00+d936/ad + cheat + description:SMB - Always Fiery Mario + code:b626/22 + cheat + description:SMB - Always get 3 fireworks at end of stage + code:d305/1c + cheat + description:SMB - Always get 6 fireworks at end of stage + code:d2f6/07/86 + cheat + description:SMB - After falling down a hole, you drop from above + code:bff3/95/a9 + cheat + description:SMB - Fireballs hit anywhere + code:d721/90/24 + cheat + description:SMB - Gain a 1-up when an enemy is killed or power-up is gained + code:84e5/07/00 + cheat + description:SMB - Goombas don't walk off ledges + code:e0e6/0b + cheat + description:SMB - Mega-jump from a standing start only + code:b424/10 + cheat + description:SMB - Mega-jump from running only + code:b426/10 + cheat + description:SMB - Mega-jump from turbo running only + code:b428/04 + cheat + description:SMB - Moon Gravity from a standing start + code:b42b/07 + cheat + description:SMB - Moon Gravity from a running start + code:b42d/07 + cheat + description:SMB - Moon Gravity from turbo running only + code:b42f/07 + cheat + description:SMB - Multi-jump + code:b48d/10 + cheat + description:SMB - Super-jump from a standing start only + code:b424/18 + cheat + description:SMB - Super-jump from running only + code:b426/16 + cheat + description:SMB - Super-jump from turbo running only + code:b428/14 + cheat + description:SMB - Turn all enemies into Toad + code:e8b4/b7 + cheat + description:SMB - Can control Mario in demo and title screen + code:82bc/00/01+82be/fc/70+82bf/06/07 + cheat + description:SMB - Can control Mario in entrances that lead to underground + code:b08b/f5 + cheat + description:SMB - Can move left or right while crouched + code:b123/f0/10 + cheat + description:SMB - Can walk through pipes and blocks + code:df56/54 + cheat + description:SMB - Small Mario can break bricks + code:bd18/01/00+bcf7/02/00+bd17/d0/a0 + cheat + description:SMB - Fireballs can kill Bowser's Fire + code:d794/2e/00 + cheat + description:SMB - Fireballs can kill Bullet Bill + code:d78c/36/00 + cheat + description:SMB - Fireballs can kill Buzzy Beetle + code:d757/6b/00 + cheat + description:SMB - Fireballs can kill Podoboo + code:e02a/04/00+d790/32/00 + cheat + description:SMB - Enable level select + code:8270/00 + cheat + description:SMB - Press Start to finish current world + code:81ba/80/70+81b5/84/24+81b7/49/a9+81b9/09/8d+81bc/05/ea+81bb/d0/07+81b8/01/02 + cheat + description:SMB - Start with 1 life - both players + code:906a/00 + cheat + description:SMB - Start with 6 lives - both players + code:906a/05 + cheat + description:SMB - Start with 9 lives - both players + code:906a/08 + cheat + description:SMB - Start P1 with 8 lives and P2 with 3 lives + code:906b/8e + cheat + description:SMB - Start on World 2 + code:9089/5f+908a/07+9087/01 + cheat + description:SMB - Start on World 3 + code:9089/5f+908a/07+9087/02 + cheat + description:SMB - Start on World 4 + code:9089/5f+908a/07+9087/03 + cheat + description:SMB - Start on World 5 + code:9089/5f+908a/07+9087/04 + cheat + description:SMB - Start on World 6 + code:9089/5f+908a/07+9087/05 + cheat + description:SMB - Start on World 7 + code:9089/5f+908a/07+9087/06 + cheat + description:SMB - Start on World 8 + code:9089/5f+908a/07+9087/07 + cheat + description:SMB - Invincibility (blinking) + code:079e/06 + cheat + description:SMB - Invincibility (Starman effect) (alt) + code:079f/18 + cheat + description:SMB - Infinite lives (alt) + code:075a/09 + cheat + description:SMB - Infinite time (alt 2) + code:0787/0c + cheat + description:SMB - Always Big Mario (alt) + code:0754/00+0756/01 + cheat + description:SMB - Always Fiery Mario (alt) + code:0754/00+0756/02 + +cartridge sha256:728d0ca6751b0c039fc3e34f2e7f27a870afcab30f5e270244ac40979c5f69ca + name:Super Mario Bros. 2 (USA) (Rev A) + cheat + description:Invincibility + code:f324/d0/a9+f326/a5/85 + cheat + description:Infinite health (except if you hit a spike) + code:ba06/8d/2c + cheat + description:Infinite health (alt) + code:ba06/8d/ad + cheat + description:Infinite lives + code:8a7d/ce/ad + cheat + description:Hit anywhere + code:b6a0/04/00+b69f/29/e0+b6a2/4d/44 + cheat + description:All characters can float + code:8cf8/f0/70 + cheat + description:More sub-space time + code:972e/1f + cheat + description:Quick pick-up + code:8ab5/b9/ad + cheat + description:Twice as much time in sub-space + code:95a2/60/ff + cheat + description:Infinite magic carpet time + code:a372/d6/b5 + cheat + description:Jump as high as a squat jump + code:8cbc/3c/00 + cheat + description:Princess has mega-float + code:8d21/00/11 + cheat + description:Princess has mega-float and lunar descent + code:8d21/00/01 + cheat + description:Super moon-jumps - Mario + code:83dc/04/01 + cheat + description:Mega moon-jumps - Luigi + code:840a/01/00 + cheat + description:Super moon-jumps - Toad + code:83f3/04/01 + cheat + description:Super moon-jumps - Princess + code:8421/04/01 + cheat + description:Speed up enemies + code:84a3/02/00 + cheat + description:Super speed enemies + code:85f2/08/20+85f3/f8/e0 + cheat + description:Walk backwards + code:8c87/18/1c+8c88/8c/d3 + cheat + description:Super turbo running + code:8de7/4a/ea+8dfa/6a/ea + cheat + description:Permanent turbo running + code:8de6/05/00+8df8/06/00 + cheat + description:Fast run - Toad + code:83f5/18/28+83f8/e8/d8 + cheat + description:Super fast run - Mario + code:83de/18/28+83e1/e8/d8 + cheat + description:Super fast run - Luigi + code:840c/18/28+840f/e8/d8 + cheat + description:Super fast run - Princess + code:8423/18/28+8426/e8/d8 + cheat + description:Weak Birdo + code:8f6f/02/00 + cheat + description:Strong Birdo + code:8f6f/02/0d + cheat + description:Strong Wart + code:b1d8/06/0f + cheat + description:Birdo spits eggs instead of fireballs (in late levels of the game) + code:9003/20/1e + cheat + description:Start on World 2 + code:9a83/40/01+9a85/00/35+9a86/01/06 + cheat + description:Start on World 3 + code:9a83/40/02+9a85/00/35+9a86/01/06 + cheat + description:Start on World 4 + code:9a83/40/03+9a85/00/35+9a86/01/06 + cheat + description:Start on World 5 + code:9a83/40/04+9a85/00/35+9a86/01/06 + cheat + description:Start on World 6 + code:9a83/40/05+9a85/00/35+9a86/01/06 + cheat + description:Start on World 7 + code:9a83/40/06+9a85/00/35+9a86/01/06 + cheat + description:Invincibility (alt) + code:0085/fa + cheat + description:Infinite coins + code:062b/09 + cheat + description:Infinite sub-space time + code:04b7/fa + cheat + description:Infinite magic carpet time (alt) + code:00b9/fa + cheat + description:All characters can float (alt) + code:04c9/fa + cheat + description:Multi-jump + code:0099/00 + cheat + description:One hit kills on bosses + code:0468/00 + cheat + description:Only 1 Cherry needed for Starman + code:062a/04 + cheat + description:Only 1 big Radish needed for Stopwatch + code:062c/04 + cheat + description:Receive small heart for every enemy defeated + code:04ad/09 + cheat + description:Stopwatch always active + code:04ff/fa + cheat + description:Start on World 2 (alt) + code:0635/01 + cheat + description:Start on World 3 (alt) + code:0635/02 + cheat + description:Start on World 4 (alt) + code:0635/03 + cheat + description:Start on World 5 (alt) + code:0635/04 + cheat + description:Start on World 6 (alt) + code:0635/05 + cheat + description:Start on World 7 (alt) + code:0635/06 + +cartridge sha256:cba920f9394733c82253685d7783f26a3033ba58a94623e9abf7892329b969b9 + name:Super Mario Bros. 2 (USA) + cheat + description:Invincibility + code:f324/d0/a9+f326/a5/85 + cheat + description:Infinite health (except if you hit a spike) + code:ba06/8d/2c + cheat + description:Infinite health (alt) + code:ba06/8d/ad + cheat + description:Infinite lives + code:8a7d/ce/ad + cheat + description:Hit anywhere + code:b6a0/04/00+b69f/29/e0+b6a2/4d/44 + cheat + description:Quick pick-up + code:8ab5/b9/ad + cheat + description:Twice as much time in sub-space + code:95a2/60/ff + cheat + description:Jump as high as a squat jump + code:8cbc/3c/00 + cheat + description:Princess has mega-float + code:8d21/00/11 + cheat + description:Princess has mega-float and lunar descent + code:8d21/00/01 + cheat + description:Super moon-jumps - Mario + code:83dc/04/01 + cheat + description:Mega moon-jumps - Luigi + code:840a/01/00 + cheat + description:Super moon-jumps - Toad + code:83f3/04/01 + cheat + description:Super moon-jumps - Princess + code:8421/04/01 + cheat + description:Speed up enemies + code:84a3/02/00 + cheat + description:Super speed enemies + code:85f2/08/20+85f3/f8/e0 + cheat + description:Walk backwards + code:8c87/18/1c+8c88/8c/d3 + cheat + description:Super turbo running + code:8de7/4a/ea+8dfa/6a/ea + cheat + description:Permanent turbo running + code:8de6/05/00+8df8/06/00 + cheat + description:Fast run - Toad + code:83f5/18/28+83f8/e8/d8 + cheat + description:Super fast run - Mario + code:83de/18/28+83e1/e8/d8 + cheat + description:Super fast run - Luigi + code:840c/18/28+840f/e8/d8 + cheat + description:Super fast run - Princess + code:8423/18/28+8426/e8/d8 + cheat + description:Hawkeye at end of level always open + code:8dbd/f0/24 + cheat + description:Start on World 2 + code:9a83/40/01+9a85/00/35+9a86/01/06 + cheat + description:Start on World 3 + code:9a83/40/02+9a85/00/35+9a86/01/06 + cheat + description:Start on World 4 + code:9a83/40/03+9a85/00/35+9a86/01/06 + cheat + description:Start on World 5 + code:9a83/40/04+9a85/00/35+9a86/01/06 + cheat + description:Start on World 6 + code:9a83/40/05+9a85/00/35+9a86/01/06 + cheat + description:Start on World 7 + code:9a83/40/06+9a85/00/35+9a86/01/06 + cheat + description:Invincibility (alt) + code:0085/fa + cheat + description:Infinite coins + code:062b/09 + cheat + description:Infinite sub-space time + code:04b7/fa + cheat + description:Infinite magic carpet time (alt) + code:00b9/fa + cheat + description:All characters can float (alt) + code:04c9/fa + cheat + description:Multi-jump + code:0099/00 + cheat + description:One hit kills on bosses + code:0468/00 + cheat + description:Only 1 Cherry needed for Starman + code:062a/04 + cheat + description:Only 1 big Radish needed for Stopwatch + code:062c/04 + cheat + description:Receive small heart for every enemy defeated + code:04ad/09 + cheat + description:Stopwatch always active + code:04ff/fa + cheat + description:Start on World 2 (alt) + code:0635/01 + cheat + description:Start on World 3 (alt) + code:0635/02 + cheat + description:Start on World 4 (alt) + code:0635/03 + cheat + description:Start on World 5 (alt) + code:0635/04 + cheat + description:Start on World 6 (alt) + code:0635/05 + cheat + description:Start on World 7 (alt) + code:0635/06 + +cartridge sha256:ff8afb9ae6b705b4e51dbcb193dcebadf4c049800a71003d3a45052648e52eda + name:Super Mario Brothers 2 (Japan) (FDS) + cheat + description:Start with 50 lives + code:c5e4/31 + cheat + description:Start with 9 lives + code:c5e4/08 + cheat + description:Invincibility (Starman effect) + code:079f/09 + cheat + description:Infinite lives + code:701b/ad + +cartridge sha256:959fdd32c71735d6fb2bd16a646d39f4ee65623273dd035e6a968e991bd13ef8 + name:Super Mario Bros. 3 (USA) (Rev A) + cheat + description:Invincibility (Starman effect) + code:cee0/2a/00 + cheat + description:Invincibility after changing up from Super Mario (Raccoon, Frog, ect.) + code:da44/8d/ad + cheat + description:Invincibility as miniture stone Mario + code:a3cc/05/a0 + cheat + description:Invincibility as Super Mario + code:a3cc/05/ba + cheat + description:Invincibility as Fire Mario + code:a3cc/05/a3 + cheat + description:Invincibility as Raccoon Mario + code:a3cc/05/af + cheat + description:Invincibility as Frog Mario + code:a3cc/05/b9 + cheat + description:Invincibility as Sledgehammer Mario + code:a3cc/05/fa + cheat + description:Infinite lives - both players + code:9123/de/bd + cheat + description:Infinite time + code:afb0/ce/ad + cheat + description:Infinite items - Mario + code:a62b/0c/1f + cheat + description:Infinite tries at card match game + code:d86d/ce/2c + cheat + description:Always win at line up the pictures game (prize is based on the top picture) + code:d1df/20/00 + cheat + description:Fireballs hit anywhere + code:a6a0/cb/00+a6af/4d/00 + cheat + description:Fireballs turn most solid objects into coins + code:a54e/17/00+a560/05/00 + cheat + description:Tail hits anywhere + code:db59/90/24 + cheat + description:1-up for each enemy you stomp + code:c460/52 + cheat + description:1-up for each coin + code:b08b/64/01+b090/64/01 + cheat + description:1-up for each 10 coins + code:b08b/64/0a+b090/64/0a + cheat + description:Change to Super Mario if you fall off screen and die + code:da9d/01/00+a416/00/01 + cheat + description:Change to Fire Mario if you fall off screen and die + code:da9d/01/00+a416/00/02 + cheat + description:Change to Raccoon Mario if you fall off screen and die + code:da9d/01/00+a416/00/03 + cheat + description:Change to Frog Mario if you fall off screen and die + code:da9d/01/00+a416/00/04 + cheat + description:Change to Tanooki Mario if you fall off screen and die + code:da9d/01/00+a416/00/05 + cheat + description:Change to Sledgehammer Mario if you fall off screen and die + code:da9d/01/00+a416/00/06 + cheat + description:Move anywhere on the map + code:d2c1/d1/a9+d348/20/10 + cheat + description:Multi-jump + code:ac85/a9/a5 + cheat + description:Multi-jump (alt) + code:ac85/a9/ad + cheat + description:Multi-jump (alt 2) + code:ac3f/d0/24 + cheat + description:Power-jumps + code:a647/c8/b8 + cheat + description:Super power-jumps + code:a647/c8/a8 + cheat + description:Mega power-jumps + code:a647/c8/88 + cheat + description:Super speed running + code:abc0/a5/a9 + cheat + description:Turbo-charged running + code:abbf/88/ea + cheat + description:Raise P meter while standing still (hold B) + code:ab74/03/00 + cheat + description:Restore powers after playing an action scene + code:8f3a/9d/ad + cheat + description:Card match game always appears after a level + code:ac92/f0/24 + cheat + description:Small white ship level always appears after a level + code:accd/4f/0c+ac92/f0/24+accc/bd/a9+acce/ac/ea + cheat + description:White money ship always appears after a level + code:ac92/f0/24+accd/4f/0b+accc/bd/a9+acce/ac/ea + cheat + description:White toad house always appears after a level + code:ac92/f0/24+accc/bd/a9+acce/ac/ea+accd/4f/0a + cheat + description:Press Start to complete current level (do not use on final ship/castle levels for each map) + code:8e71/03/00+8e70/76/14 + cheat + description:1 life after continue - both players + code:92c6/04/00 + cheat + description:9 lives after continue - both players + code:92c6/04/08 + cheat + description:Start a new game as Fire Mario + code:acbc/00/02 + cheat + description:Start a new game as Raccoon Mario + code:acbc/00/03 + cheat + description:Start a new game as Frog Mario + code:acbc/00/04 + cheat + description:Start a new game as Tanooki Mario + code:acbc/00/05 + cheat + description:Start a new game as Sledgehammer Mario + code:acbc/00/06 + cheat + description:Start a new game to see the ending + code:a9c5/cf + cheat + description:Start on World 2 + code:acb3/00/01 + cheat + description:Start on World 3 + code:acb3/00/02 + cheat + description:Start on World 4 + code:acb3/00/03 + cheat + description:Start on World 5 + code:acb3/00/04 + cheat + description:Start on World 6 + code:acb3/00/05 + cheat + description:Start on World 7 + code:acb3/00/06 + cheat + description:Start on World 8 + code:acb3/00/07 + cheat + description:Unused level - Plains 1 + code:b47c/82/4c+b47d/bb/a7 + cheat + description:Unused level - Plains 2 + code:b47c/82/ac+b47d/bb/a1 + cheat + description:Unused level - Dungeon + code:b428/21/22+b47c/82/54+b47d/bb/b7 + cheat + description:Unused level - Underground 2 + code:b428/21/23+b47c/82/42+b47d/bb/b4 + cheat + description:Unused level - Sky 1 + code:b428/21/24+b47c/82/cd+b47d/bb/ad + cheat + description:Unused level - Sky 3 (level cannot be completed) + code:b428/21/24+b47c/82/c4+b47d/bb/b0 + cheat + description:Unused level - Cloudy 1 + code:b428/21/2d+b47c/82/a9+b47d/bb/ac + cheat + description:Unused level - Pipe level + code:b428/21/28+b47c/82/18+b47d/bb/af + cheat + description:Unused level - Hilly level + code:b428/21/23+b47c/82/dd+b47d/bb/b0 + cheat + description:Unused level - Ice/Water + code:b428/21/2c+b47c/82/ba+b47d/bb/b7 + cheat + description:Unused level - Cloudy (level cannot be completed) + code:b428/21/2d+b47c/82/ab+b47d/bb/ad + cheat + description:P meter always full + code:03dd/7f + cheat + description:Invincibility as Super Mario (alt) + code:00ed/01 + cheat + description:Invincibility as Fire Mario (alt) + code:00ed/02 + cheat + description:Invincibility as Raccoon Mario (alt) + code:00ed/03 + cheat + description:Invincibility as Frog Mario (alt) + code:00ed/04 + cheat + description:Invincibility as Tanooki + code:00ed/05 + cheat + description:Invincibility as Sledgehammer Mario (alt) + code:00ed/06 + +cartridge sha256:d77d17d34af24871d7ce1160ccd3330555835c8e940b7100e095ac38973d927a + name:Super Mario Bros. 3 (USA) + cheat + description:Invincibility (Starman effect) + code:cee0/2a/00 + cheat + description:Invincibility after changing up from Super Mario (Raccoon, Frog, ect.) + code:da44/8d/ad + cheat + description:Invincibility as miniture stone Mario + code:a3cc/05/a0 + cheat + description:Never die from being hit while little (changes music) + code:daaa/1c + cheat + description:Invincibility as Super Mario + code:a3cc/05/ba + cheat + description:Invincibility as Fire Mario + code:a3cc/05/a3 + cheat + description:Invincibility as Raccoon Mario + code:a3cc/05/af + cheat + description:Invincibility as Frog Mario + code:a3cc/05/b9 + cheat + description:Invincibility as Sledgehammer Mario + code:a3cc/05/fa + cheat + description:Infinite lives - both players + code:9123/de/bd + cheat + description:Infinite time + code:afb0/ce/ad + cheat + description:Infinite items - Mario + code:a62b/0c/1f + cheat + description:Infinite tries at card match game + code:d86d/ce/2c + cheat + description:Always win at line up the pictures game (prize is based on the top picture) + code:d1df/20/00 + cheat + description:Fireballs hit anywhere + code:a6a0/cb/00+a6af/4d/00 + cheat + description:Fireballs turn most solid objects into coins + code:a54e/17/00+a560/05/00 + cheat + description:Tail hits anywhere + code:db59/90/24 + cheat + description:1-up for each enemy you stomp + code:c460/52 + cheat + description:1-up for each coin + code:b08b/64/01+b090/64/01 + cheat + description:1-up for each 10 coins + code:b08b/64/0a+b090/64/0a + cheat + description:Change to Super Mario if you fall off screen and die + code:da9d/01/00+a416/00/01 + cheat + description:Change to Fire Mario if you fall off screen and die + code:da9d/01/00+a416/00/02 + cheat + description:Change to Raccoon Mario if you fall off screen and die + code:da9d/01/00+a416/00/03 + cheat + description:Change to Frog Mario if you fall off screen and die + code:da9d/01/00+a416/00/04 + cheat + description:Change to Tanooki Mario if you fall off screen and die + code:da9d/01/00+a416/00/05 + cheat + description:Change to Sledgehammer Mario if you fall off screen and die + code:da9d/01/00+a416/00/06 + cheat + description:Move anywhere on the map + code:d2c1/d1/a9+d348/20/10 + cheat + description:Multi-jump + code:ac85/a9/a5 + cheat + description:Multi-jump (alt) + code:ac85/a9/ad + cheat + description:Multi-jump (alt 2) + code:ac3f/d0/24 + cheat + description:Power-jumps + code:a647/c8/b8 + cheat + description:Super power-jumps + code:a647/c8/a8 + cheat + description:Mega power-jumps + code:a647/c8/88 + cheat + description:Super speed running + code:abc0/a5/a9 + cheat + description:Turbo-charged running + code:abbf/88/ea + cheat + description:Raise P meter while standing still (hold B) + code:ab74/03/00 + cheat + description:Restore powers after playing an action scene + code:8f3a/9d/ad + cheat + description:Card match game always appears after a level + code:ac92/f0/24 + cheat + description:Small white ship level always appears after a level + code:accd/4f/0c+ac92/f0/24+accc/bd/a9+acce/ac/ea + cheat + description:White money ship always appears after a level + code:ac92/f0/24+accd/4f/0b+accc/bd/a9+acce/ac/ea + cheat + description:White toad house always appears after a level + code:ac92/f0/24+accc/bd/a9+acce/ac/ea+accd/4f/0a + cheat + description:Press Start to complete current level (do not use on final ship/castle levels for each map) + code:8e71/03/00+8e70/76/14 + cheat + description:1 life after continue - both players + code:92c6/04/00 + cheat + description:9 lives after continue - both players + code:92c6/04/08 + cheat + description:Start a new game as Fire Mario + code:acbc/00/02 + cheat + description:Start a new game as Raccoon Mario + code:acbc/00/03 + cheat + description:Start a new game as Frog Mario + code:acbc/00/04 + cheat + description:Start a new game as Tanooki Mario + code:acbc/00/05 + cheat + description:Start a new game as Sledgehammer Mario + code:acbc/00/06 + cheat + description:Start a new game to see the ending + code:a9c5/cf + cheat + description:Start on World 2 + code:acb3/00/01 + cheat + description:Start on World 3 + code:acb3/00/02 + cheat + description:Start on World 4 + code:acb3/00/03 + cheat + description:Start on World 5 + code:acb3/00/04 + cheat + description:Start on World 6 + code:acb3/00/05 + cheat + description:Start on World 7 + code:acb3/00/06 + cheat + description:Start on World 8 + code:acb3/00/07 + cheat + description:Unused level - Plains 1 + code:b47c/82/4c+b47d/bb/a7 + cheat + description:Unused level - Plains 2 + code:b47c/82/ac+b47d/bb/a1 + cheat + description:Unused level - Dungeon + code:b428/21/22+b47c/82/54+b47d/bb/b7 + cheat + description:Unused level - Underground 2 + code:b428/21/23+b47c/82/42+b47d/bb/b4 + cheat + description:Unused level - Sky 1 + code:b428/21/24+b47c/82/cd+b47d/bb/ad + cheat + description:Unused level - Sky 3 (level cannot be completed) + code:b428/21/24+b47c/82/c4+b47d/bb/b0 + cheat + description:Unused level - Cloudy 1 + code:b428/21/2d+b47c/82/a9+b47d/bb/ac + cheat + description:Unused level - Pipe level + code:b428/21/28+b47c/82/18+b47d/bb/af + cheat + description:Unused level - Hilly level + code:b428/21/23+b47c/82/dd+b47d/bb/b0 + cheat + description:Unused level - Ice/Water + code:b428/21/2c+b47c/82/ba+b47d/bb/b7 + cheat + description:Unused level - Cloudy (level cannot be completed) + code:b428/21/2d+b47c/82/ab+b47d/bb/ad + cheat + description:P meter always full + code:03dd/7f + cheat + description:Invincibility as Super Mario (alt) + code:00ed/01 + cheat + description:Invincibility as Fire Mario (alt) + code:00ed/02 + cheat + description:Invincibility as Raccoon Mario (alt) + code:00ed/03 + cheat + description:Invincibility as Frog Mario (alt) + code:00ed/04 + cheat + description:Invincibility as Tanooki + code:00ed/05 + cheat + description:Invincibility as Sledgehammer Mario (alt) + code:00ed/06 + +cartridge sha256:fe019a7da7fb7ecd2e6478bde546e6c5d6bba185d53e5c8692522ed8fdd617a2 + name:Super Pitfall (USA) + cheat + description:Infinite bullets + code:f395/01/00 + cheat + description:Infinite lives - 1P game + code:d548/ce/ad + cheat + description:Infinite lives - P1 + code:d58e/ce/ad + cheat + description:Infinite lives - P2 + code:d5aa/ce/ad + cheat + description:30 bullets gained on pick-up + code:bbf0/02/03 + cheat + description:10 bullets gained on pick-up + code:bbf0/02/01 + cheat + description:Start with 1 life - both players + code:d061/03/01 + cheat + description:Start with 6 lives - both players + code:d061/03/06 + cheat + description:Start with 9 lives - both players + code:d061/03/09 + cheat + description:Start with 30 bullets + code:cfaf/02/03 + cheat + description:Start with 10 bullets + code:cfaf/02/01 + cheat + description:Invincibility (blinking) - both players + code:00dc/ff + +cartridge sha256:7c14c7e39943e7247c92d907f3362eab09a7306fb606d4a899a918fc6afd356a + name:Super Shinobi, The (unl) + cheat + description:Infinite health + code:04f5/09 + cheat + description:Infinite magic + code:010d/09 + cheat + description:Infinite Shurikens + code:0109/09+010b/09 + cheat + description:Always have powered-up Shurikens + code:00af/01 + +cartridge sha256:d1defc7a6c6f96f89386c79ac887aa41a72fefa93ba22a8a08159ac891f73613 + name:Super Sprint (USA) (Unl) + cheat + description:Infinite continues + code:eb06/ce/ad + cheat + description:6 continues + code:d059/03/07 + cheat + description:No continues + code:d059/03/01 + cheat + description:More obstacles on tracks + code:cecf/00/05+ced3/8d/2c + cheat + description:Even more obstacles on tracks + code:cecf/00/0a+ced3/8d/2c + cheat + description:Lots and lots of obstacles on tracks + code:cecf/00/0f+ced3/8d/2c + +cartridge sha256:7806ee6afcdf88ef6364da23af8b28f359ef7d850fe55224e188b8a01d5ade67 + name:Super Spy Hunter (USA) + cheat + description:Infinite health + code:9ae0/85/a5 + cheat + description:Start with max health gauge + code:bda9/04/0c + cheat + description:Infinite lives + code:0074/05 + cheat + description:Infinite health (alt) + code:007b/40 + +cartridge sha256:639d5b9dad2f4eae48559dadc708d396f50f898a5912631c0a3c1715a5eab729 + name:Super Turrican (Europe) + cheat + description:Infinite health + code:038a/06 + cheat + description:Infinite lives + code:7051/09 + +cartridge sha256:9ffc36dfc772e1020a9648949aecebab687d6b386d6f02526916d1d49973a78a + name:Superman (USA) + cheat + description:Never die when out of super power + code:dd28/80/00 + cheat + description:Never lose super power + code:dcfd/8d/ad + cheat + description:Start with lots of super power + code:e2bf/05/e2 + cheat + description:Double max power of all items at start + code:9d8b/30/60 + cheat + description:Double usual item power on item power crystal pick-up + code:93b7/10/20 + cheat + description:Full item power on item power crystal pick-up + code:93b7/10/a0 + cheat + description:Start at mission 2 + code:9d64/a9/a0+9d65/00/01+9d72/8d/8c + cheat + description:Start at mission 3 + code:9d64/a9/a0+9d65/00/02+9d72/8d/8c + cheat + description:Start at mission 4 + code:9d64/a9/a0+9d65/00/03+9d72/8d/8c + cheat + description:Start at mission 5 + code:9d64/a9/a0+9d65/00/04+9d72/8d/8c + +cartridge sha256:d138aba5eb5c8cf1218abc7b57ad10709041fd68b6a6c47dd30432f8b33470e9 + name:Swamp Thing (USA) + cheat + description:Invincibility + code:94ee/29/09+94ea/f0/d0 + cheat + description:Infinite health + code:e67a/ce/ad + cheat + description:Infinite lives + code:e475/ce/ad + +cartridge sha256:553d6db3959c8ae3e3cfa598a33c57756b06653ce434fddd0de92bafb460cb05 + name:Sword Master (USA) + cheat + description:Invincibility + code:aa46/10/30 + cheat + description:Infinite health + code:cadf/8d/ad+ca57/8d/ad + cheat + description:Infinite continues + code:eb76/8d/ad + cheat + description:Gain a level for every EXP point gained + code:cc04/21/00 + cheat + description:Invincibility (alt) + code:042e/8f + cheat + description:Infinite health (alt) + code:042f/0f + +cartridge sha256:cdd148ebf43ed8918b4cd5d03e685fe0f38b434a59ffb38f0d9ceb2ee7ca9d89 + name:Swords and Serpents (USA) + cheat + description:All characters have Scale Armor + code:ce74/86/8e + cheat + description:Warriors start with a Great Sword + code:ce8d/81/8b + cheat + description:Warriors start with a Great Axe + code:ce8d/81/8c + cheat + description:Magicians start with a Wizard's Wand + code:ce80/85/8d + cheat + description:Magicians start with more spells + code:ce45/03/1f + cheat + description:Magicians have greater spells + code:ce4a/00/03 + cheat + description:Spells use up no magic points + code:f443/f1/24 + cheat + description:Thieves start with a Long Sword + code:ce96/82/8a + cheat + description:Thieves start with an Axe + code:ce96/82/84 + cheat + description:Start with 30 health points each + code:ce27/0a/1e+ce2d/0a/1e + cheat + description:Start with 50 health points each + code:ce27/0a/32+ce2d/0a/32 + +cartridge sha256:f3955370fe7ecc99afc27cdccf3482f75f06e0f431e42823c95982bb553ad6b9 + name:Town & Country Surf Designs - Wood & Water Rage (USA) + cheat + description:Infinite lives for skating + code:a2b2/c6/24 + cheat + description:Infinite lives for surfing + code:c3f8/c6/24 + cheat + description:When surfing lose only 1 symbol + code:c395/02/01 + cheat + description:When skating lose only 1 symbol if you fall into the ocean or a crack + code:a007/03/01 + cheat + description:Infinite time + code:b8c2/c6/24 + cheat + description:Increase time + code:92d4/01/03 + cheat + description:Infinite lives + code:0047/04 + cheat + description:Infinite time (alt) + code:0037/09 + +cartridge sha256:cfa1cc0f40cf139b1ba61794838d52c029b40ea12194b4248178d8ae59c69b7a + name:Town & Country Surf Designs - Thrilla's Surfari (USA) + cheat + description:Infinite lives + code:d752/c6/a9 + cheat + description:Can't collect Coconuts + code:e58d/e6/a9 + cheat + description:Start with 5 Coconuts plus what you've collected in sub-game + code:8133/00/05 + cheat + description:Start with 10 Coconuts plus what you've collected in sub-game + code:8133/00/0a + cheat + description:Start with 15 Coconuts plus what you've collected in sub-game + code:8133/00/0f + cheat + description:Start with less health + code:812d/02/01 + cheat + description:Start with a little more health + code:812d/02/03 + cheat + description:Start with 2x health + code:812d/02/04 + cheat + description:Start with a lot more health + code:812d/02/09 + cheat + description:Start with 1 life + code:8129/03/01 + cheat + description:Start with 5 lives + code:8129/03/05 + cheat + description:Start with 7 lives + code:8129/03/07 + cheat + description:Start with 9 lives + code:8129/03/09 + cheat + description:Start with mega lives + code:8129/03/99 + cheat + description:Start on level 1-3 (can't advance to next level) + code:b6f8/05/02+b6fa/b4/04 + cheat + description:Start on level 1-4 (can't advance to next level) + code:b6f8/05/03+b6fa/b4/04 + cheat + description:Watch the level 2 Cinema (can't advance to next level) + code:b6f8/05/04+b6fa/b4/04 + cheat + description:Start on level 2-2 (can't advance to next level) + code:b6f8/05/06+b6fa/b4/04 + cheat + description:Start on level 2-3 (can't advance to next level) + code:b6f8/05/07+b6fa/b4/04 + cheat + description:Start on level 2-4 (can't advance to next level) + code:b6f8/05/08+b6fa/b4/04 + cheat + description:Have all 8 health slots + code:0006/08 + +cartridge sha256:b002d1ebee16a5fd2bcae480df8ccc7b8dc7a6f96a80f5fac8b76e078e4f42f0 + name:Tag Team Wrestling (USA) + cheat + description:Infinite health (glitchy) + code:d2bb/95/99 + cheat + description:Never give up + code:cefa/d6/b5 + cheat + description:Infinite health - P1 + code:0048/18 + cheat + description:Infinite health - P2 + code:0058/18 + cheat + description:Infinite health - tag team partner + code:005d/18 + +cartridge sha256:65d11519c8bc1435a994e4f71362dbc734ca808ac3048b66e87c5a80475e3f5e + name:Takahashi Meijin no Bouken-jima IV (Japan) + cheat + description:Invincibility + code:a20f/f0/d0 + cheat + description:Infinite health + code:c2c7/85/a5 + +cartridge sha256:6d10e95fcbf4cd1179293106d526373ea43a0c2b8531e694288b147310d617c6 + name:TaleSpin (USA) + cheat + description:Infinite health + code:812c/06/00 + cheat + description:Infinite continues + code:cbfa/c6/a5 + cheat + description:Infinite lives from getting trapped by obstacles + code:cc47/ce/2c + cheat + description:Add $1,000,000 to end-of-level bonus + code:c863/70/71 + cheat + description:1 life after continue + code:cbf6/73/70 + cheat + description:7 lives after continue + code:cbf6/73/76 + cheat + description:10 lives after continue + code:cbf6/73/79 + cheat + description:1 continue + code:c605/73/71 + cheat + description:6 continues + code:c605/73/76 + cheat + description:9 continues + code:c605/73/79 + cheat + description:Start with 1 life + code:c76a/73/70 + cheat + description:Start with 7 lives + code:c76a/73/76 + cheat + description:Start with 10 lives + code:c76a/73/79 + cheat + description:Invincibility (blinking) + code:007c/5b + cheat + description:Infinite health (alt) + code:05b6/60 + cheat + description:Infinite lives (alt) + code:05db/79 + +cartridge sha256:f6e88113b5f64cf7ffd915dd60b49e55d7015aaeb8b232c87e9855d4b9759cbd + name:Target Renegade (USA) + cheat + description:Don't take most damage + code:aee6/85/a5 + cheat + description:Take half damage from bosses + code:9955/14/06 + cheat + description:Infinite time + code:8a01/c6/a5 + cheat + description:Set timer to 5:00 for all levels + code:8286/bd/ad + cheat + description:Hearts replenish health to maximum + code:8acd/02/00 + cheat + description:Set timer to 3:00 for all levels + code:8286/bd/ad+8288/80/cf + cheat + description:Start on level 2 + code:921f/00/01 + cheat + description:Start on level 3 + code:921f/00/02 + cheat + description:Start on level 4 + code:921f/00/03 + cheat + description:Start on level 5 + code:921f/00/04 + cheat + description:Start on level 6 + code:921f/00/05 + cheat + description:Start on level 7 + code:921f/00/06 + cheat + description:Infinite health + code:00da/40+00db/40 + cheat + description:Infinite time (alt) + code:00eb/09 + +cartridge sha256:efb93dcae29f1ff85b58ccb9450c23d528073a019493d88a9abcabe4ca9aca4f + name:Tatakae! Chou Robot Seimeitai Transformers - Convoy no Nazo (Japan) + cheat + description:Invincibility + code:c238/f0/50+c4a1/a5/60 + cheat + description:Hit anywhere (enemies and platforms) + code:c2c7/24/00+c2ea/90/50+c30b/9d/bd + cheat + description:Moon jump + code:910e/2e/00+9102/3a/00+90f8/27/00 + cheat + description:Solve level 9 maze using any path + code:8278/f0/70 + +cartridge sha256:d088f4b91a03dd6a618245fffb492bcda127c7faa6d880596aa5e751fdac0181 + name:Tecmo Bowl (USA) (Rev A) + cheat + description:Instant touchdowns - P1 + code:816b/03/00 + cheat + description:Instant touchdowns - P2 + code:8d0c/03/00 + cheat + description:Always kick with max power - P1 + code:9bac/02/65+9bab/69/a9 + cheat + description:Only 2 downs allowed + code:8527/04/02+912e/04/02 + cheat + description:6 downs allowed + code:8527/04/06+912e/04/06 + cheat + description:Infinite time (minutes) + code:008b/09 + cheat + description:Infinite time (seconds) + code:008a/99 + cheat + description:CPU/P2 has 0 points + code:0048/00 + +cartridge sha256:d2b56b27912cfc03756c94df6667fdf923c8a3746fa37e4632eeb4134ef4c200 + name:Tecmo Bowl (USA) + cheat + description:Instant touchdowns - P1 + code:816b/03/00 + cheat + description:Instant touchdowns - P2 + code:8d0c/03/00 + cheat + description:Always kick with max power - P1 + code:9bac/02/65+9bab/69/a9 + cheat + description:Only 2 downs allowed + code:8527/04/02+912e/04/02 + cheat + description:6 downs allowed + code:8527/04/06+912e/04/06 + cheat + description:Infinite time (minutes) + code:008b/09 + cheat + description:Infinite time (seconds) + code:008a/99 + cheat + description:CPU/P2 has 0 points + code:0048/00 + +cartridge sha256:54d809b38573248ff73e104505a57f71f8b4356c8a7983a363c2ee242f878205 + name:Tecmo NBA Basketball (USA) + cheat + description:Infinite timeouts + code:b369/de/bd + cheat + description:2-pt. shots worth 1, 3-pt. shots worth 2 + code:b996/01/00 + cheat + description:2-pt. shots worth 3, 3-pt. shots worth 4 + code:b996/01/02 + cheat + description:2-pt. shots worth 4, 3-pt. shots worth 5 + code:b996/01/03 + cheat + description:2-pt. shots worth 5, 3-pt. shots worth 6 + code:b996/01/04 + cheat + description:2-pt. shots worth 6, 3-pt. shots worth 7 + code:b996/01/05 + cheat + description:3-pt. shots worth 2 pts. + code:b9fe/ee/60 + cheat + description:5-second violations become 10-second violations + code:8a5f/07/ff + cheat + description:No 10-second violations + code:9716/0a/ff + cheat + description:Longer shot clock after getting ball on rebound + code:b895/18/58 + cheat + description:Shorter shot clock after getting ball on rebound + code:b895/18/08 + +cartridge sha256:cd5ad84e6bba35c19098c6f9783b568e4f1218582a12ec0513e5fafbdabb0303 + name:Tecmo Super Bowl (USA) + cheat + description:Infinite time (continuous play) + code:a2f9/c6/a5 + cheat + description:Almost every player has their skill level at 100 + code:dde5/2a + cheat + description:10 minutes per quarter instead of 5 + code:a23b/05/10 + cheat + description:20 minutes per quarter + code:a23b/05/20 + cheat + description:2 minutes per quarter + code:a23b/05/02 + cheat + description:Touchdown scores 0 instead of 6 - P1 + code:8616/06/00 + cheat + description:Touchdown scores 0 - P2 or computer + code:8d9e/06/00 + cheat + description:Touchdown scores 3 - P1 + code:8616/06/03 + cheat + description:Touchdown scores 3 - P2 or computer + code:8d9e/06/03 + cheat + description:Touchdown scores 9 - P1 + code:8616/06/09 + cheat + description:Touchdown scores 9 - P2 or computer + code:8d9e/06/09 + cheat + description:Touchdown scores 12 - P1 + code:8616/06/0c + cheat + description:Touchdown scores 12 - P2 or computer + code:8d9e/06/0c + cheat + description:Extra-point kick scores 0 instead of 1 - P1 + code:8703/01/00 + cheat + description:Extra-point kick scores 0 - P2 or computer + code:8e8b/01/00 + cheat + description:Extra-point kick scores 2 - P1 + code:8703/01/02 + cheat + description:Extra-point kick scores 2 - P2 or computer + code:8e8b/01/02 + cheat + description:Extra-point kick scores 3 - P1 + code:8703/01/03 + cheat + description:Extra-point kick scores 3 - P2 or computer + code:8e8b/01/03 + cheat + description:Extra-point kick scores 6 - P1 + code:8703/01/06 + cheat + description:Extra-point kick scores 6 - P2 or computer + code:8e8b/01/06 + cheat + description:Field goal scores 0 instead of 3 - P1 + code:84c4/03/00 + cheat + description:Field goal scores 0 - P2 or computer + code:8c4c/03/00 + cheat + description:Field goal scores 1 - P1 + code:84c4/03/01 + cheat + description:Field goal scores 1 - P2 or computer + code:8c4c/03/01 + cheat + description:Field goal scores 6 - P1 + code:84c4/03/06 + cheat + description:Field goal scores 6 - P2 or computer + code:8c4c/03/06 + cheat + description:Field goal scores 9 - P1 + code:84c4/03/09 + cheat + description:Field goal scores 9 - P2 or computer + code:8c4c/03/09 + cheat + description:Safety scores 0 instead of 2 - P1 + code:8d55/02/00 + cheat + description:Safety scores 0 - P2 or computer + code:85cd/02/00 + cheat + description:Safety scores 1 - P1 + code:8d55/02/01 + cheat + description:Safety scores 1 - P2 or computer + code:85cd/02/01 + cheat + description:Safety scores 4 - P1 + code:8d55/02/04 + cheat + description:Safety scores 4 - P2 or computer + code:85cd/02/04 + cheat + description:Safety scores 6 - P1 + code:8d55/02/06 + cheat + description:Safety scores 6 - P2 or computer + code:85cd/02/06 + +cartridge sha256:b6adca3680ba28efd41b2216cfcb9af66ed175e4359f0fbd5eda90e6cb6380e8 + name:Tecmo World Cup Soccer (Europe) + cheat + description:Never lose guts + code:86b9/91/a9 + cheat + description:Everyone has more guts + code:ddf0/20/50+ddf1/03/06 + +cartridge sha256:daf07341c80a866333d69c7560f8402123adbb345b15185480393f0db6822b16 + name:Tecmo World Wrestling (USA) + cheat + description:Infinite health - P1 + code:d7c5/85/a5 + cheat + description:Half training time allowed + code:d1be/0a/05 + cheat + description:Double training time allowed + code:d1be/0a/14 + cheat + description:Lose all energy after being on the receiving end of a move + code:d79f/91 + +cartridge sha256:892468d05a1097769d14e0ed4822267760d85dbfc79d83a0235878109f839dd1 + name:Teenage Mutant Ninja Turtles (USA) + cheat + description:Invincibility + code:9591/20/ad + cheat + description:Infinite health + code:98db/e5/10 + cheat + description:Infinite health (alt) + code:98e3/99/b9 + cheat + description:Infinite health (alt 2) + code:98db/e5/24 + cheat + description:10 weapons on pick-up + code:96f8/14/0a + cheat + description:50 weapons on pick-up + code:96f8/14/32 + cheat + description:99 weapons on pick-up + code:96f8/14/63 + cheat + description:20 missiles on pick-up + code:973b/0a/14 + cheat + description:99 missiles on pick-up + code:973b/0a/67 + cheat + description:Don't take damage from non-killing seaweed + code:a5e4/99/ad + cheat + description:Full health boost from pizza slices + code:969c/02/00 + cheat + description:Double rope on pick-up + code:9749/03/06 + cheat + description:Never lose rope + code:a3ee/c6/a5 + cheat + description:Reduce recovery time + code:a696/8d/ad + cheat + description:No sound + code:9150/55 + cheat + description:Start a new game to view the ending + code:c621/02/05 + cheat + description:Invincibility (alt) + code:0500/15 + cheat + description:Infinite health - Leonardo + code:0077/80 + cheat + description:Infinite health - Raphael + code:0078/80 + cheat + description:Infinite health - Michaelangelo + code:0079/80 + cheat + description:Infinite health - Donatello + code:007a/80 + cheat + description:Infinite Ropes + code:00a7/09 + cheat + description:Infinite Missiles + code:00bf/63 + cheat + description:Infinite time on water level + code:00bb/32 + cheat + description:Have Scrolls - Leonardo + code:0073/04 + cheat + description:Have Scrolls - Raphael + code:0074/04 + cheat + description:Have Scrolls - Michaelangelo + code:0075/04 + cheat + description:Have Scrolls - Donatello + code:0076/04 + cheat + description:99 weapons - Leonardo + code:00a8/63 + cheat + description:99 weapons - Raphael + code:00a9/63 + cheat + description:99 weapons - Michaelangelo + code:00aa/63 + cheat + description:99 weapons - Donatello + code:00ab/63 + cheat + description:Permanent rolling power-up (disable on water level) + code:0540/91 + +cartridge sha256:368d7ea3a066d4dc937473ca6cfc3e0d79d928b2308fff5ddd6ff199c7da153d + name:Teenage Mutant Ninja Turtles II - The Arcade Game (USA) + cheat + description:Invincibility (except grabs from behind) - both players + code:82b9/f0/d0 + cheat + description:Infinite health - both players + code:8ee5/9d/bd+ec01/9d/bd + cheat + description:Infinite lives - both players + code:8b03/01/00 + cheat + description:One hit kills - both players + code:eaaa/d0/10 + cheat + description:Stronger turtle weapon + code:eaa4/02/09 + cheat + description:Stronger jump + attack + code:ea9c/04/09 + cheat + description:Stronger jump + attack + code:ea9c/04/02 + cheat + description:Stronger kick + code:eaa0/03/09 + cheat + description:Weaker kick + code:eaa0/03/01 + cheat + description:In two-turtle mode, when one player is revived the other player's spare life won't get used + code:8281/c6/a5+8237/c6/a5 + cheat + description:Enable stage select and 10 lives code + code:caef/00/81 + cheat + description:Press Start to finish the level + code:d3dc/01/04+d3de/3d/3c + cheat + description:Start with 1 life + code:d190/02/01 + cheat + description:Start with 6 lives + code:d190/02/06 + cheat + description:Start with 9 lives + code:d190/02/09 + cheat + description:Invincibility - P1 + code:0093/2b + cheat + description:Invincibility - P2 + code:0094/2b + cheat + description:Infinite health - P1 + code:0568/37 + cheat + description:Infinite health - P2 + code:056a/37 + cheat + description:Infinite lives - P1 + code:004d/09 + cheat + description:Infinite lives - P2 + code:004e/09 + cheat + description:Infinite continues + code:03d3/03 + cheat + description:One hit kills - both players (alt) + code:eaaa/10 + cheat + description:Enable stage select after choosing your turtle + code:0025/81 + +cartridge sha256:9f671090ffd2bb1dc95b9d413c3627f7aa0d576435eeb5b868fa7ca9c29c1190 + name:Teenage Mutant Ninja Turtles III - The Manhattan Project (USA) + cheat + description:Invincibility (except grabs from behind) + code:cddc/d0/f0 + cheat + description:Infinite health + code:b22e/de/bd+a449/9d/bd + cheat + description:Infinite lives + code:c2fb/01/00 + cheat + description:Infinite continues + code:dcfc/ce/ad + cheat + description:No health loss from using turbo attack + code:d20f/08/00 + cheat + description:Hit anywhere - both players + code:a806/1e/00+aa7f/d7/00+a810/14/00+a822/ab/18+a820/d9/ea+a821/78/ea + cheat + description:High-jump + code:cf36/40/30 + cheat + description:Super-jump + code:cf36/40/28 + cheat + description:Mega-jump + code:cf36/40/20 + cheat + description:1 continue + code:ac31/03/01 + cheat + description:9 continues + code:ac31/03/09 + cheat + description:Start with 1 life instead of 4 + code:8390/03/00 + cheat + description:Start with 6 lives + code:8390/03/05 + cheat + description:Start with 9 lives + code:8390/03/08 + cheat + description:Infinite health - P1 + code:04f1/7f + cheat + description:Infinite health - P2 + code:04f2/7f + cheat + description:Infinite lives - P1 + code:006a/05 + cheat + description:Infinite lives - P2 + code:006b/05 + cheat + description:Infinite continues + code:07b0/05 + cheat + description:Enemies automatically die + code:0626/00+0627/00+0628/00 + cheat + description:Start on scene 02 - Ocean + code:0058/01 + cheat + description:Start on scene 03 - Battleship + code:0058/02 + cheat + description:Start on scene 04 - Bridge + code:0058/03 + cheat + description:Start on scene 05 - N.Y. + code:0058/04 + cheat + description:Start on scene 06 - Platform + code:0058/05 + cheat + description:Start on scene 07 - Sewer + code:0058/06 + cheat + description:Start on scene 08 - Sewer 2 + code:0058/07 + cheat + description:Start on scene 09 - Technodrome + code:0058/08 + cheat + description:Start on scene 10 - Technodrome 2 + code:0058/09 + cheat + description:Start on scene 11 - Building + code:0058/0a + cheat + description:Start on scene 12 - Roof + code:0058/0b + cheat + description:Start on scene 13 - Spaceship + code:0058/0c + cheat + description:Start on scene 14 - Spaceship 2 + code:0058/0d + cheat + description:Start on scene 15 - Spaceship 3 + code:0058/0e + +cartridge sha256:10e2091a1c5e3ff3f636944fb274cd61db09dc25d0c14868710675cf1f86fd0b + name:Teenage Mutant Ninja Turtles - Tournament Fighters (USA) + cheat + description:Infinite health + code:ee6e/90/a9+ee6f/1b/b0+ee71/bd/8d + cheat + description:Infinite time + code:eacc/ce/2c + cheat + description:Select ultra strength (ignore strength meter and keep pushing to the right) - both players + code:893d/07/ff + cheat + description:Select any character in story mode + code:8362/04/07 + cheat + description:Infinite continues + code:86ca/c6/c1 + cheat + description:First hit wins round + code:80a4/b0/01 + cheat + description:One round wins match + code:8a79/69/a9+8a7a/01/02 + cheat + description:Start with 1/3 health - both players + code:80a4/b0/30 + cheat + description:Start a new game to view the ending + code:f4a3/02/0b + cheat + description:Infinite health - P1 + code:0590/b0 + cheat + description:No health - P2 / CPU + code:0591/00 + cheat + description:Infinite time (one's digit) + code:0673/09 + cheat + description:Infinite time (ten's digit) + code:0672/09 + cheat + description:Turn off CPU's jumping, blocking and fighting routine + code:06c3/00+06c7/00+06c9/00+06cb/00 + +cartridge sha256:dd89b8e08738243d20740194ef814b011df138d820844ee4e53d3a6e536b1c83 + name:Terminator, The (USA, Europe) + cheat + description:Infinite health + code:b8f7/8d/ad + cheat + description:Infinite Grenades + code:f0e5/ce/ad + +cartridge sha256:6f66d14e5f17ca244444e74538afe31f8abda8376b5b0205afaeb86075407c45 + name:Terminator 2 - Judgment Day (USA) + cheat + description:Infinite health + code:eae2/20/2c + cheat + description:Take minimal damage + code:eafc/49/a9+eafd/ff/fe + cheat + description:Infinite lives + code:8196/ce/ad + cheat + description:Super-jump + code:99ed/fc/fa + cheat + description:Slower running + code:9a1e/02/01+9a3a/02/01 + cheat + description:Faster running + code:9a1e/02/03+9a3a/02/03 + cheat + description:Faster and longer jumping + code:9cd4/02/03+9ce0/02/03 + cheat + description:Start with 1 life + code:a379/04/01 + cheat + description:Start with 9 lives + code:a379/04/09 + +cartridge sha256:667bcf3ca1ebcf6f71fccd412ced546f4aba3b8cd2fc30d173cf6d3b4c15846a + name:Terra Cresta (USA) + cheat + description:Invincibility + code:d44b/20/e4 + cheat + description:Infinite lives + code:e649/c6/a5 + cheat + description:Infinite "ship formation" splits + code:ebd3/c6/a5 + cheat + description:9 "ship formation" splits + code:e890/03/09+cec0/03/09 + cheat + description:A secret mega-weapon + code:cfef/03/00 + cheat + description:Start with 1 life + code:d449/02/00 + cheat + description:Start with 6 lives + code:d449/02/05 + cheat + description:Start with 9 lives + code:d449/02/08 + +cartridge sha256:2ae5fb18a1bf841077e3872ba05060f030ea0bfc573994b2f8fe2fb570dc7853 + name:Tetris (USA) + cheat + description:Lines are cleared when a piece is dropped + code:9a94/37/00 + cheat + description:Disable Game Over (press start) + code:9d10/03/04+9a15/f0/4c+9a17/a5/9a+9a16/30/47 + cheat + description:999999 score with one piece dropped + code:9c8b/08/00 + cheat + description:Puzzle area doesn't disappear on pause + code:a3b7/16/1e + cheat + description:2P interactive game + code:8783/f7/f8 + cheat + description:Need only complete 10 lines in game B + code:875c/25/10 + cheat + description:Faster forced fall rate + code:8953/01/09 + cheat + description:Must complete 50 lines in game B + code:875c/25/50 + cheat + description:Must complete 80 lines in game B + code:875c/25/80 + cheat + description:Next piece is a T-block + code:00bf/02 + cheat + description:Next piece is a J-block + code:00bf/07 + cheat + description:Next piece is a Z-block + code:00bf/08 + cheat + description:Next piece is a square block + code:00bf/0a + cheat + description:Next piece is a S-block + code:00bf/0b + cheat + description:Next piece is a L-block + code:00bf/0e + cheat + description:Next piece is a straight line block + code:00bf/12 + +cartridge sha256:9daa4bec3013ae7ef498318432f438d70374af294d1dce28edd3c466aaf6b740 + name:Tetris (USA) (Unl) + cheat + description:Lines are cleared when a piece is dropped + code:87ab/2a/00+87af/26/00 + cheat + description:Always get straight pieces + code:9940/f0/a9+9941/f9/01 + cheat + description:Speed stays the same + code:9b24/24/a9+9b25/2f/21 + cheat + description:Press down to stop blocks from falling + code:8109/04 + cheat + description:Press down to rotate block very fast + code:8109/19 + cheat + description:Next piece is a straight line block - P1 + code:0066/01 + cheat + description:Next piece is a T-block - P1 + code:0066/02 + cheat + description:Next piece is a square block - P1 + code:0066/03 + cheat + description:Next piece is a J-block - P1 + code:0066/04 + cheat + description:Next piece is a L-block - P1 + code:0066/05 + cheat + description:Next piece is a S-block - P1 + code:0066/06 + cheat + description:Next piece is a Z-block - P1 + code:0066/07 + cheat + description:Next piece is a straight line block - P2 + code:0067/01 + cheat + description:Next piece is a T-block - P2 + code:0067/02 + cheat + description:Next piece is a square block - P2 + code:0067/03 + cheat + description:Next piece is a J-block - P2 + code:0067/04 + cheat + description:Next piece is a L-block - P2 + code:0067/05 + cheat + description:Next piece is a S-block - P2 + code:0067/06 + cheat + description:Next piece is a Z-block - P2 + code:0067/07 + cheat + description:Start at level 0 + code:042c/30+042d/30 + cheat + description:Start at level 1 + code:042c/30+042d/31 + cheat + description:Start at level 2 + code:042c/30+042d/32 + cheat + description:Start at level 3 + code:042c/30+042d/33 + cheat + description:Start at level 4 + code:042c/30+042d/34 + cheat + description:Start at level 5 + code:042c/30+042d/35 + cheat + description:Start at level 6 + code:042c/30+042d/36 + cheat + description:Start at level 7 + code:042c/30+042d/37 + cheat + description:Start at level 8 + code:042c/30+042d/38 + cheat + description:Start at level 9 + code:042c/30+042d/39 + cheat + description:Start at level 10 + code:042c/31+042d/30 + cheat + description:Start at level 11 + code:042c/31+042d/31 + cheat + description:Start at level 12 + code:042c/31+042d/32 + cheat + description:Start at level 13 + code:042c/31+042d/33 + cheat + description:Start at level 14 + code:042c/31+042d/34 + cheat + description:Start at level 15 + code:042c/31+042d/35 + cheat + description:Start at level 16 + code:042c/31+042d/36 + cheat + description:Start at level 17 + code:042c/31+042d/37 + cheat + description:Max score at 999,999 - P1 + code:0418/39+0419/39+041a/39+041b/39+041c/39+041d/39 + cheat + description:Max score at 999,999 - P2 + code:041e/39+041f/39+0420/39+0421/39+0422/39+0423/39 + +cartridge sha256:dd77dc88d380807990f55d0b1b55c151f78c480a0a0895e91d6edfb945ad71d7 + name:Tetris 2 (USA) + cheat + description:(1P game) Speed doesn't increase + code:8d3b/9d/08 + cheat + description:(1P game) Speed increases much faster + code:8dbb/9d/fe + cheat + description:(1P game) Start and stay at speed of 25 + code:8fa4/01/06 + cheat + description:(1P game) Max speed is 2 + code:8dcd/19/02+8dd1/18/01 + cheat + description:(1P game) Max speed is 10 + code:8dcd/19/0a+8dd1/18/09 + cheat + description:(1P game) Max speed is 15 + code:8dcd/19/0f+8dd1/18/0e + cheat + description:(1P game) Max speed is 20 + code:8dcd/19/14+8dd1/18/13 + cheat + description:(1P vs 2P or 1P vs Com) Every round starts with 4 fixed blocks + code:817e/b1/a9+817f/00/01 + cheat + description:(1P vs 2P or 1P vs Com) Every round starts with 10 fixed blocks + code:817e/b1/a9+817f/00/07 + cheat + description:(1P vs 2P or 1P vs Com) Every round starts with 15 fixed blocks + code:817e/b1/a9+817f/00/0c + cheat + description:(1P vs 2P or 1P vs Com) Every round starts with 20 fixed blocks + code:817e/b1/a9+817f/00/11 + cheat + description:(All game types) Cannot pause game + code:af66/80/00 + cheat + description:(All game types) Don't hide remaining pieces during pause + code:af89/a2/60 + +cartridge sha256:18d41a2dc65d8afce295eaf29c391539a69d7cfe6dd32503713ae13d4495a545 + name:Thexder (Japan) + cheat + description:Infinite health + code:9d85/85/a5 + cheat + description:Infinite shield + code:980c/c6/a5 + cheat + description:Start on last level + code:0074/63 + +cartridge sha256:e3be0290f198fceed633b037d9201aa4b95460617551b3a9fb5bb212b153a2d4 + name:Thunder & Lightning (USA) + cheat + description:Infinite lives - P1 + code:9371/d6/d5 + +cartridge sha256:c0c3d7c2682dd2e0dd2122682e2ae3a9ee7aa3d095bd22a36c759c29b5d05615 + name:Thunderbirds (USA) + cheat + description:Don't lose life points when colliding with enemy + code:eef1/ce/ad + cheat + description:Don't lose life points when hit + code:ef3b/ce/ad + cheat + description:Don't lose energy points when colliding with enemy + code:eefe/ce/ad + cheat + description:Don't lose energy points when hit + code:ef48/ce/ad + cheat + description:81 Days to defeat Hood + code:c68d/3c/51 + cheat + description:30 Days to defeat Hood + code:c68d/3c/1e + cheat + description:Limited forward movement + code:8728/08/60+872c/08/60 + cheat + description:Faster craft + code:86ae/02/04+86aa/02/04 + cheat + description:Full firepower on first pick-up + code:8e30/c0/a0+8e34/c8/ea + +cartridge sha256:c56af43761cb601a068cdc88c2fc36f715921dbae9a8a9d8c10479146c47ccb9 + name:Thundercade (USA) + cheat + description:Infinite lives + code:f2e1/d6/24 + cheat + description:Infinite Missiles + code:f53b/11/00 + cheat + description:Infinite Bombs + code:f622/d6/24 + cheat + description:Autofire + code:f574/0a/02 + cheat + description:Start with double Bombs + code:f2f9/03/06 + cheat + description:Start with triple Bombs + code:f2f9/03/09 + cheat + description:Start with 1 life + code:f515/03/01 + cheat + description:Start with 6 lives + code:f515/03/06 + cheat + description:Start with 9 lives + code:f515/03/09 + +cartridge sha256:e115dbf3de0a4e674ff3f9081d7f97b89f636d81ce524119c0af4ef799490695 + name:Thunder Warrior (Asia) (Unl) + cheat + description:Invincibility + code:b3be/f0/d0+b3c3/f0/d0 + cheat + description:Infinite health + code:93a4/ce/ad + cheat + description:Infinite magic + code:89c0/ce/ad + cheat + description:Infinite lives + code:807d/ce/ad + cheat + description:Keep weapon after losing a life + code:9bd1/8d/60 + cheat + description:Start with 9 lives + code:a438/03/09 + +cartridge sha256:403fe1c4454dc1e23fb272c88f70ba30dd5e860ab48ecff59420a09fc84e9a2d + name:Tiger-Heli (USA) + cheat + description:Invincibility + code:f050/4c/ad + cheat + description:Infinite lives - 1P game + code:b724/de/bd + cheat + description:Infinite lives - both players + code:b7c5/de/bd+b7eb/de/bd + cheat + description:Autofire capability + code:f2c8/0d/06 + cheat + description:Burstfire capability + code:f2c8/0d/02 + cheat + description:Turbo boost + code:f3ea/12/24 + cheat + description:Extra life every 5 bonus blocks + code:fe5e/0a/03 + cheat + description:Start with 2 lives - 1P game + code:b6bf/02/00 + cheat + description:Start with 9 lives - 1P game + code:b6bf/02/08 + cheat + description:Start with 6 lives - P1 in a 2P game + code:b75f/02/05 + cheat + description:Start with 9 lives - P1 in a 2P game + code:b75f/02/08 + cheat + description:Start with 6 lives - P2 + code:b772/02/05 + cheat + description:Start with 9 lives - P2 + code:b772/02/08 + cheat + description:Start with 2 little-helis after dying + code:b863/4a/ea + +cartridge sha256:13353e4e94633eba066e024ea7050b0801a8ccbe4c03bd97656852df4d2f3359 + name:Time Lord (USA) + cheat + description:Infinite health + code:d16b/8d/ad + cheat + description:Infinite lives + code:cc3d/ce/ad + cheat + description:Hit anywhere + code:d789/18/00+fb05/b0/90 + cheat + description:Moonwalking (don't combine with super speed) + code:ce2a/01/00+ce36/00/01 + cheat + description:Super speed (don't combine with moonwalking) + code:ced9/00/01+ce95/00/01 + cheat + description:Start with 1 life + code:c18f/03/01 + cheat + description:Start with 6 lives + code:c18f/03/06 + cheat + description:Start with 9 lives + code:c18f/03/09 + +cartridge sha256:c47a01c9b32642ad3145316804e64b0475a20863e42e81d17c664d03dcdde3c5 + name:Tiny Toon Adventures (USA) + cheat + description:Invincibility + code:814c/d0/f0 + cheat + description:Infinite health after collecting one heart + code:9e1d/ce/ad + cheat + description:Infinite health and one Carrot + code:829f/ac/8d + cheat + description:Infinite time + code:da47/de/dd + cheat + description:Infinite lives + code:9f7b/ce/ad + cheat + description:Slow down timer + code:da22/3b/7f + cheat + description:Speed up timer + code:da22/3b/1f + cheat + description:Multi-jump + code:9651/29/00 + cheat + description:Pick-up more hearts + code:9781/01/00 + cheat + description:Power decreases slower when using Dizzy Devil's spin attack + code:91ed/02/01 + cheat + description:Press Start to finish the level (don't use on 6-3) + code:d9f6/01/0c+d9f8/4d/4c + cheat + description:Start a new game to view the ending + code:cf9d/00/10 + cheat + description:1 life after continue + code:aaa7/02/00 + cheat + description:6 lives after continue + code:aaa7/02/05 + cheat + description:9 lives after continue + code:aaa7/02/08 + cheat + description:Start with 1 life + code:cf2b/02/00 + cheat + description:Start with 6 lives + code:cf2b/02/05 + cheat + description:Start with 9 lives + code:cf2b/02/08 + cheat + description:Start on level 2 + code:cf51/85/86+cf2f/a9/a2+cf30/01/05 + cheat + description:Start on level 3 + code:cf51/85/86+cf2f/a9/a2+cf30/01/0a + cheat + description:Start on level 4 + code:cf51/85/86+cf2f/a9/a2+cf30/01/0f + cheat + description:Start on level 5 + code:cf51/85/86+cf2f/a9/a2+cf30/01/14 + +cartridge sha256:d4a94fd07859485fc2aac73d627933b70e1977c93b744ec3d71b66d4365ab7f7 + name:Tiny Toon Adventures 2 - Trouble in Wackyland (USA) + cheat + description:Invincibility + code:8012/a5/85+8014/f0/d0 + cheat + description:Infinite time + code:f230/20/ad + cheat + description:Protection against hits on log ride + code:aabe/ce/ad + cheat + description:Protection against hits on train + code:8558/ce/ad + cheat + description:Protection against hits on bumper cars + code:9a1b/ce/ad + cheat + description:Protection against hits on roller coaster + code:83c7/ce/ad + cheat + description:Protection against hits in fun house + code:8153/ce/ad + cheat + description:Log ride costs nothing instead of 3 tickets + code:9177/03/00 + cheat + description:Log ride costs 5 tickets + code:9177/03/05 + cheat + description:Train costs nothing instead of 2 tickets + code:9175/02/00 + cheat + description:Train costs 5 tickets + code:9175/02/05 + cheat + description:Roller coaster costs nothing instead of 4 tickets + code:9171/04/00 + cheat + description:Roller coaster costs 6 tickets + code:9171/04/06 + cheat + description:Bumper cars cost nothing instead of 1 ticket + code:9173/01/00 + cheat + description:Bumper cars cost 4 tickets + code:9173/01/04 + cheat + description:Fun house costs nothing instead of 50 normal tickets + code:917a/05/00 + cheat + description:Fun house costs 10 normal tickets + code:917a/05/01 + cheat + description:Fun house costs 90 normal tickets + code:917a/05/09 + cheat + description:Start a new game to view the ending + code:f745/08/09 + cheat + description:Start with 20 tickets instead of 10 + code:f701/01/02 + cheat + description:Start with 50 tickets instead of 10 + code:f701/01/05 + cheat + description:Start with 90 tickets instead of 10 + code:f701/01/09 + cheat + description:Start with 110 tickets instead of 10 + code:f6e8/8d/ee + +cartridge sha256:f80e57788e32f73852d7d2aa4831edfe4c4bd5b8a02a322995263a13597c2f0c + name:Titan Warriors (USA) (Proto) + cheat + description:Invincibility against enemies + code:fc5d/85/a5 + cheat + description:Infinite lives + code:9453/ce/ad + +cartridge sha256:44569cef71a0b859bd0390e0155b19077ddef4a684f6fba6569a5f918910d4a2 + name:To the Earth (USA) + cheat + description:Shots use up no energy + code:be0a/04/00 + cheat + description:Shots use up less energy + code:be0a/04/02 + cheat + description:Shots use up more energy + code:be0a/04/08 + cheat + description:Enemy bombs do no damage + code:efb8/14/00 + cheat + description:Enemy bombs do half damage + code:efb8/14/08 + cheat + description:Enemy bombs do more damage + code:efb8/14/28 + cheat + description:Bonus energy for shooting enemy + code:be88/0a/14 + cheat + description:Less energy for shooting enemy + code:be88/0a/04 + cheat + description:No energy for shooting enemy + code:be88/0a/00 + +cartridge sha256:e580f51b06217b102e56ec98fff7c4ebad5b925fa3a28042d67433cffa8c5cdc + name:Toki (USA) + cheat + description:Infinite health + code:80df/ce/80 + cheat + description:Infinite weapons + code:937c/ee/ad+938b/ee/ad+939a/8d/ad + cheat + description:Infinite time + code:8f4e/01/00 + cheat + description:Infinite lives + code:f5f2/ce/ad + cheat + description:Hit anywhere - normal enemies + code:86de/9d/ad+8681/60/ea + cheat + description:When weapon runs out of ammo it's replaced with the double weapon + code:9396/00/01 + cheat + description:When weapon runs out of ammo it's replaced with the wave weapon + code:9396/00/02 + cheat + description:When weapon runs out of ammo it's replaced with the 3-way weapon + code:9396/00/03 + cheat + description:When weapon runs out of ammo it's replaced with the flame weapon + code:9396/00/04 + cheat + description:When weapon runs out of ammo it's replaced with the fireball weapon + code:9396/00/05 + cheat + description:Start with less time + code:d804/03/01+8044/03/01 + cheat + description:Start with more time + code:d804/03/05+8044/03/05 + cheat + description:Start with even more time + code:d804/03/09+8044/03/09 + cheat + description:Start with one heart - first life only + code:f509/02/01 + cheat + description:Start with one heart - after first life + code:f5f6/02/00 + cheat + description:Start with 1 life + code:ffc2/02/00 + cheat + description:Start with 2 lives + code:ffc2/02/01 + cheat + description:Start with 5 lives + code:ffc2/02/04 + cheat + description:Start with 9 lives + code:ffc2/02/08 + cheat + description:Infinite health - P1 + code:011c/02 + cheat + description:Infinite time (hundred's digit) + code:0576/09 + cheat + description:Infinite time (ten's digit) + code:0577/09 + cheat + description:Infinite time (one's digit) + code:0578/09 + cheat + description:Infinite lives - P1 + code:0114/09 + cheat + description:Infinite Coins (ten's digit) + code:0118/09 + cheat + description:Infinite Coins (one's digit) + code:0119/09 + cheat + description:Start on stage 2 - Lake Neptune + code:0116/01 + cheat + description:Start on stage 3 - Cavern Of Fire + code:0116/02 + cheat + description:Start on stage 4 - Ice Palace + code:0116/03 + cheat + description:Start on stage 5 - Dark Jungle + code:0116/04 + cheat + description:Start on stage 6 - Golden Palace + code:0116/05 + +cartridge sha256:b49e3b3c2a307e9c24715ea5863d6c80b805f9566eb1f468a4c701cf54605a5a + name:Tom & Jerry - The Ultimate Game of Cat and Mouse! (USA) + cheat + description:Infinite health + code:f0a1/01/00 + cheat + description:Infinite lives + code:f0df/ce/ad + cheat + description:Minimum health (one touch kills) + code:f0a1/01/03 + cheat + description:Start with 1 life + code:fa5e/03/01 + cheat + description:Start with 6 lives + code:fa5e/03/06 + cheat + description:Start with 9 lives + code:fa5e/03/09 + cheat + description:Start on world 2 + code:f9e4/00/08 + cheat + description:Start on world 3 + code:f9e4/00/10 + cheat + description:Start on world 4 + code:f9e4/00/18 + cheat + description:Start on world 5 + code:f9e4/00/20 + +cartridge sha256:fe052f7f6b4b41dcbc009860e0c997c31e2e236eb46d713137ee773cce96105e + name:Toobin' (USA) (Unl) + cheat + description:Infinite lives + code:e5b4/c6/a5 + cheat + description:Infinite cans + code:a502/c6/a5 + cheat + description:Turbo left and right movement + code:a04e/20/30+a06b/20/30 + cheat + description:Start with 2 lives + code:e612/03/01 + cheat + description:Start with 6 lives + code:e612/03/06 + cheat + description:Start with 9 lives + code:e612/03/09 + cheat + description:Start with 18 cans + code:e616/06/12 + cheat + description:Start with 12 cans + code:e616/06/0c + cheat + description:Start with 1 can + code:e616/06/01 + cheat + description:Start on level 2 + code:a810/00/01 + cheat + description:Start on level 4 + code:a810/00/03 + cheat + description:Start on level 6 + code:a810/00/05 + cheat + description:Start on level 8 + code:a810/00/07 + cheat + description:Invincibility (glitchy) + code:02d3/00 + cheat + description:Infinite patches + code:006e/09 + cheat + description:Infinite cans (alt) + code:004c/ff + cheat + description:Have all letters + code:006d/7f + cheat + description:Faster shots + code:003f/02 + cheat + description:Don't go into dying animation (use with invincibility) + code:004a/00+004b/00 + +cartridge sha256:e788ae1dff1b868795395e19357525b93ddd52ac86f6a505d14eac5fa323b023 + name:Top Gun (USA) (Rev A) + cheat + description:Immune to Bullets (not Missiles) + code:dbcf/03/00 + cheat + description:Infinite fuel + code:dcbf/c6/24 + cheat + description:Infinite Missiles + code:ddc4/c6/24 + cheat + description:Take off with double Hound Missiles + code:c18e/28/50 + cheat + description:Take off with double Wolf Missiles + code:c18f/14/28 + cheat + description:Take off with double Tiger Missiles + code:c190/0a/14 + cheat + description:Start with half fuel + code:c17b/0a/05 + cheat + description:Start on mission 2 + code:c103/01/02 + cheat + description:Start on mission 3 + code:c103/01/03 + cheat + description:Start on mission 4 + code:c103/01/04 + cheat + description:Infinite health + code:004e/0c + cheat + description:Infinite fuel (alt) + code:0036/0a + cheat + description:Infinite lives + code:0031/02 + cheat + description:Infinite Missiles + code:003c/3f + +cartridge sha256:aa43f3138d4f731e5e8df530dbf8fc1f6f45303b84589f7a0715e392887f3dff + name:Top Gun (USA) + cheat + description:Immune to Bullets (not Missiles) + code:dbcf/03/00 + cheat + description:Infinite fuel + code:dcbf/c6/24 + cheat + description:Infinite Missiles + code:ddc4/c6/24 + cheat + description:Always land safely on Aircraft Carrier + code:b725/04/00+b623/85/a5 + cheat + description:Take off with double Hound Missiles + code:c18e/28/50 + cheat + description:Take off with double Wolf Missiles + code:c18f/14/28 + cheat + description:Take off with double Tiger Missiles + code:c190/0a/14 + cheat + description:Start with half fuel + code:c17b/0a/05 + cheat + description:Start on mission 2 + code:c103/01/02 + cheat + description:Start on mission 3 + code:c103/01/03 + cheat + description:Start on mission 4 + code:c103/01/04 + cheat + description:Infinite health + code:004e/0c + cheat + description:Infinite fuel (alt) + code:0036/0a + cheat + description:Infinite lives + code:0031/02 + cheat + description:Infinite Missiles + code:003c/3f + +cartridge sha256:55375474cdebdb05eeec27494761b686a7df63b8f874516004f1739760665c87 + name:Top Gun - The Second Mission (USA) + cheat + description:Invincibility + code:8b86/f0/50 + cheat + description:Infinite lives + code:f563/c6/a5 + cheat + description:Infinite missiles - 1P game + code:8f4b/01/00 + cheat + description:Infinite missiles - 2P game + code:85f2/01/00 + cheat + description:60 Phoenix missiles - 1P game + code:a5e6/94/bc + cheat + description:20 Phoenix missiles - 2P game + code:a5ee/85/94 + cheat + description:Start with 1 life + code:f350/03/01 + cheat + description:Start with 6 lives + code:f350/03/06 + cheat + description:Start with 9 lives + code:f350/03/09 + +cartridge sha256:45067f85328eabb3b8cb2bceec72192bfa8d73494521660f171b9ed6d151fdea + name:Total Recall (USA) + cheat + description:Infinite health + code:e8f9/a4/60 + cheat + description:Most enemies easier to kill + code:d2b5/9d/2c + cheat + description:Take less damage + code:e8fc/0c/09 + cheat + description:Gain maximum health from canisters + code:eb3f/ea/f2 + cheat + description:Start with less health + code:c978/a5/a9+c979/2b/30 + cheat + description:Start with more health + code:c978/a5/a9+c979/2b/ff + cheat + description:Invincibility + code:007f/03 + cheat + description:Infinite health (alt) + code:02c0/fa + +cartridge sha256:0bd29c5b583570e195e05a4272e69b74257db1f4ff928d59c8eb1022bad871ce + name:Totally Rad (USA) + cheat + description:Infinite health + code:f4ee/f9/ed + cheat + description:Infinite magic + code:84a1/fd/2c + cheat + description:Immune to fire and water + code:8567/c6/a5 + cheat + description:Infinite lives + code:825f/ce/ad + cheat + description:Super-jump + code:8497/10/18 + cheat + description:Mega-jump + code:8497/10/1f + cheat + description:Half a life or half magic give full health or magic + code:988f/03/06 + cheat + description:Start with 1 life + code:aebd/02/00 + cheat + description:Start with 6 lives + code:aebd/02/05 + cheat + description:Start with 9 lives + code:aebd/02/08 + cheat + description:Infinite health (alt) + code:006e/0c + cheat + description:Infinite lives (alt) + code:05d4/63 + +cartridge sha256:5ec7c3e91bfd5800073286ee978b1d152c19f924837788eb72700c7c01261fa4 + name:Tower of Druaga, The (Japan) + cheat + description:Invincibility + code:b6f8/a5/a9+b403/a5/a9 + cheat + description:Infinite lives + code:00cb/03 + cheat + description:Infinite time + code:00b7/69 + cheat + description:Doors are always open + code:0099/40 + cheat + description:Treasure instantly appears + code:00e5/01 + +cartridge sha256:c3fec0650f1709911432e8953a6075cb5883601a209323ba0744cb19d82b7f80 + name:Toxic Crusaders (USA) + cheat + description:Infinite lives + code:b5c6/84/a4 + cheat + description:Infinite health + code:e4af/85/a5 + cheat + description:Never lose Mop + code:efa2/8d/ad+b850/00/01 + cheat + description:Invincibility + code:020f/00 + cheat + description:Infinite health (alt) + code:00de/08 + cheat + description:Infinite lives (alt) + code:00dd/09 + cheat + description:Never lose weapon + code:020b/01 + +cartridge sha256:a2812d80b3057aac9753f48247a7a46b29bea0b9aec04ca4c327180085c25b58 + name:Track & Field (USA) + cheat + description:Almost always qualify in Skeet Shooting and Archery + code:c72e/ec/e7 + cheat + description:You don't have to score any points to qualify for Skeet Shooting, Triple Jump and Archery + code:c4bd/c4/c3 + +cartridge sha256:58d2f6abe4445dadc332f37a34af54e78b6af47a8c0e6313ef898ef6db046f4f + name:Treasure Master (USA) + cheat + description:Invincibility + code:9af3/b8/e4+9af4/05/03 + cheat + description:Infinite health + code:ec45/c6/c5 + cheat + description:Infinite lives + code:808e/c6/a5 + cheat + description:Infinite oxygen + code:a1ef/ce/cd + cheat + description:Infinite health (alt) + code:00f6/07 + cheat + description:Infinite lives (alt) + code:00f5/07 + cheat + description:Infinite Oxygen (alt) + code:0435/ff + cheat + description:Infinite Fuse + code:04a2/80 + +cartridge sha256:6b2004f30e7de67dfb86db7446f2204695a3a9b9b367bacf401dbf14bb1a74f2 + name:Trog! (USA) + cheat + description:Infinite lives + code:8126/de/ea + +cartridge sha256:a5ae39359aa5b16961a98a7aaeeb278787382d5282ee80b5b3a2de954283ebb7 + name:Trojan (USA) + cheat + description:Infinite health - both players + code:d26a/ce/ad + cheat + description:Infinite health - both players (alt) + code:a4b4/3f/ff+fc68/3f/ff + cheat + description:Infinite time + code:9484/de/2c + cheat + description:One hit kills + code:d10b/ad/ee + cheat + description:Hit anywhere + code:884f/56/00+f47d/1b/00+a713/25/00+8862/43/00+f489/0f/00+dbf0/18/00+f3bd/db/00+f3b1/e7/00+dbe3/25/00+a71f/b0/24 + cheat + description:Keep High-jump Boots on pick-up + code:eacc/ce/ad + cheat + description:Always have High-jump Boots + code:d3f0/1f/00 + cheat + description:Multi-jump - both players + code:d338/1c/00+d3d2/d8/00+d3c5/f0/24 + cheat + description:Start with a health boost + code:cb53/08/0f + cheat + description:Start with a super health boost + code:cb53/08/1e + cheat + description:Start with half usual health + code:cb53/08/04 + cheat + description:Start with 1 life - P1 + code:c9fa/03/01 + cheat + description:Start with 1 life - P2 + code:ca1f/03/01 + cheat + description:Start with 6 lives - P1 + code:c9fa/03/06 + cheat + description:Start with 6 lives - P2 + code:ca1f/03/06 + cheat + description:Start with 9 lives - P1 + code:c9fa/03/09 + cheat + description:Start with 9 lives - P2 + code:ca1f/03/09 + cheat + description:Start with 187 lives - P1 + code:c9fa/03/f0 + cheat + description:Start with 196 lives - P2 + code:ca1f/03/f0 + cheat + description:Start with 100 seconds + code:cb58/02/01 + cheat + description:Start with 900 seconds + code:cb58/02/09 + cheat + description:Infinite health (alt) + code:0335/08 + cheat + description:Have Key + code:0386/02 + cheat + description:Have High-jump Boots + code:03cb/0e + cheat + description:Have Speed-Up + code:03cc/ff + cheat + description:Have Power-Up + code:03cd/ff + cheat + description:Start on level 2-1 + code:03d1/02 + cheat + description:Start on level 2-2 + code:03d1/03 + cheat + description:Start on level 3-1 + code:03d1/04 + cheat + description:Start on level 3-2 + code:03d1/05 + cheat + description:Start on level 4-1 + code:03d1/06 + cheat + description:Start on level 4-2 + code:03d1/07 + cheat + description:Start on level 5-1 + code:03d1/08 + cheat + description:Start on level 5-2 + code:03d1/09 + cheat + description:Start on level 6-1 + code:03d1/0a + cheat + description:Start on level 6-2 + code:03d1/0b + cheat + description:Start on level 7-1 + code:03d1/0c + +cartridge sha256:5699da9924f31e0f1b7d5cacd05111786881b7a87da38a99aee092fc855ab353 + name:Trolls in Crazyland, The (Europe) + cheat + description:Invincibility + code:92ee/f0/60 + cheat + description:One hit kills + code:a268/02/00 + cheat + description:Hit anywhere + code:9133/1c/00 + +cartridge sha256:0b5d1465b23e31f24e1caecf1490f97a60deb97ba873a36fa948adb016e9c0d2 + name:Trolls on Treasure Island (USA) (Unl) + cheat + description:Infinite time + code:ce13/86/dd + cheat + description:Only one jewel needed to clear stage + code:df77/d0/f0 + +cartridge sha256:e2b26560d326cc626736efa2addf1c66f5af77913968fcf5cde738188c4a0132 + name:Twin Cobra (USA) + cheat + description:Infinite lives + code:d26c/ce/ad + cheat + description:Infinite Bombs + code:f972/ce/ad + cheat + description:Infinite continues + code:c64f/01/00 + cheat + description:Autofire + code:f916/1b/00 + cheat + description:Keep weapon type after death + code:d276/85/24 + cheat + description:Keep super chargers after death + code:d278/85/24 + cheat + description:9 Bombs after dying + code:d270/03/0a + cheat + description:20 Bombs after dying + code:d270/03/14 + cheat + description:Start with 1 life + code:c5b2/02/00 + cheat + description:Start with 6 lives + code:c5b2/02/05 + cheat + description:Start with 9 lives + code:c5b2/02/08 + cheat + description:Start with 1 life after a continue + code:c67b/02/00 + cheat + description:Start with 6 lives after a continue + code:c67b/02/05 + cheat + description:Start with 9 lives after a continue + code:c67b/02/08 + cheat + description:Start with 9 continues + code:c59d/05/09 + cheat + description:Start with 9 Bombs + code:cd04/03/0a + cheat + description:Start with 20 Bombs + code:cd04/03/14 + +cartridge sha256:8eb6aa7818f1cac84af0f91350b167f2884dba45073c9f00510f47d0a38e4192 + name:Twin Eagle (USA) + cheat + description:Infinite lives - P1 + code:d99e/c6/a5 + cheat + description:Infinite Bombs on pick-up - P1 + code:ddfa/ce/ad + cheat + description:Infinite Bombs on pick-up - P2 + code:df52/ce/ad + cheat + description:Never lose weapons - P1 + code:eb4e/8d/f0+eb4f/a4/07 + cheat + description:Never lose weapons - P2 + code:ebac/8d/f0+ebad/a5/07 + cheat + description:1 life after a continue - P1 + code:ce0a/03/01 + cheat + description:4 lives after a continue - P1 + code:ce0a/03/04 + cheat + description:7 lives after a continue - P1 + code:ce0a/03/07 + cheat + description:Start with 7 lives - both players + code:e185/03/07 + cheat + description:Start with 4 lives - both players + code:e185/03/04 + cheat + description:Start with 1 life - both players + code:e185/03/01 + +cartridge sha256:4b9c46714fa085d61ad1177b72bdaa9428d104a171eb6335a03bf06ad9782389 + name:TwinBee (Japan) + cheat + description:Invincibility + code:0093/10 + +cartridge sha256:ef818c90f326383d13087b6e0131bf36563d76c3c1a3c13821c79368e377cf8d + name:Ufouria - The Saga (Europe) + cheat + description:Invincibility + code:806e/f0/d0+874b/f0/d0 + cheat + description:Start with all characters + code:e7df/1f/01+e7e1/00/07 + +cartridge sha256:af5ac55d6283b709bcd96889708a6e7ad3c77e3bdd377aae796fd87b4b90dc4b + name:Ultima - Exodus (USA) + cheat + description:Take no damage from most monsters + code:cc39/e5/24 + cheat + description:No limit on stat points + code:8e94/08/00 + cheat + description:Never lose tools + code:d120/01/00 + cheat + description:Never lose magic + code:da6b/91/94 + cheat + description:Never miss with the Fight command + code:d0f9/80/48 + cheat + description:Can always attack with the Fight command + code:d0dc/1e/00 + cheat + description:One hit kills + code:b92b/90/d0 + cheat + description:Rapid magic recovery + code:8739/01/00+8734/d1/b1 + cheat + description:Start with 5 of each item + code:9196/01/05 + cheat + description:Start with 10 of each item + code:9196/01/0a + cheat + description:Start with 40 of each item + code:9196/01/f0 + cheat + description:Start with 35,328 gold + code:9188/64/8a+9186/30/31 + cheat + description:Start with 512 gold + code:9188/64/02+9186/30/31 + cheat + description:Start with 200 gold + code:9188/64/c8 + cheat + description:Start with 75 stat points + code:8e83/2e/47+8fb6/32/4b+9059/32/4b + cheat + description:Start with 5F stat points + code:8e83/2e/5b+8fb6/32/5f+9059/32/5f + +cartridge sha256:bb625b8df6ddbeb991bb1cbf9b818a5352dcd4856d84640612b2df66148c442f + name:Ultima - Quest of the Avatar (USA) + cheat + description:Infinite MP + code:a032/99/b9 + cheat + description:Infinite Herbs + code:ec9f/de/bd + cheat + description:Infinite Oil + code:bc74/ce/ad + cheat + description:Infinite Torches + code:b28d/de/bd + cheat + description:Infinite Gems + code:b5ec/ce/ad + cheat + description:No random battles + code:e952/85/a5 + cheat + description:Heal costs nothing instead of 70 + code:d5c6/46/00 + cheat + description:Cure poison costs nothing + code:d563/0a/00 + cheat + description:Axe costs 1 instead of 225 + code:8f0f/e1/01 + cheat + description:Staff costs 1 instead of 20 + code:8f0b/14/01 + cheat + description:Sword costs 144 instead of 400 + code:8f12/01/00 + cheat + description:Bow costs 168 instead of 680 + code:8f04/02/00 + cheat + description:Leather costs 1 instead of 200 + code:8f21/c8/01 + cheat + description:Chain costs 88 instead of 600 + code:8f24/02/00 + cheat + description:Plate costs 196 instead of 2500 + code:8f2a/09/00 + cheat + description:Start with perfect virtues (worthy of Avatarhood) + code:9562/32/63 + cheat + description:Start with 8336 Gold Pieces + code:9546/01/20 + cheat + description:Start with 4240 Gold Pieces + code:9546/01/10 + cheat + description:Start with 144 Gold Pieces (for experts) + code:9546/01/00 + cheat + description:Start with 100 Ash instead of 8 + code:9625/08/64 + cheat + description:Start with 100 Ginseng instead of 8 + code:9626/08/64 + cheat + description:Start with 100 Garlic instead of 9 + code:9627/09/64 + cheat + description:Start with 100 Silkweb instead of 7 + code:9628/07/64 + cheat + description:Start with 100 Moss instead of 8 + code:9629/08/64 + cheat + description:Start with 100 Pearl instead of 4 + code:962a/04/64 + cheat + description:Start with 100 Fungus instead of none + code:962b/00/64 + cheat + description:Start with 100 Manroot instead of none + code:962c/00/64 + cheat + description:Mage starts with 712 HP + code:95e6/00/02 + cheat + description:Mage starts with 381 EXP + code:9616/00/01 + cheat + description:Mage starts with Strength of 32 + code:95fd/10/20 + cheat + description:Fighter starts with Strength of 48 + code:95ff/1b/30 + cheat + description:Fighter starts with 255 EXP + code:9619/cd/ff + cheat + description:Fighter starts with 812 HP + code:95ea/01/03 + cheat + description:Fighter starts with 75 MP + code:95f7/00/4b + +cartridge sha256:1e8966fd8c9baf57c514fbf4d67ddd8c1ffd184be164f99342ccdec62def8db2 + name:Ultima - Warriors of Destiny (USA) + cheat + description:Infinite consumable items such as food and torches - May not be able to discard some items + code:edd2/de/bd + cheat + description:A night at the Wayfarer Inn is free + code:a105/32/00 + cheat + description:At Healer's Herbs - Sulfurous ash is free instead of 1 GP + code:a0b1/01/00 + cheat + description:At Healer's Herbs - Ginseng is free instead of 2 GP + code:a0b4/02/00 + cheat + description:At Healer's Herbs - Garlic is free instead of 2 GP + code:a0b7/02/00 + cheat + description:At Healer's Herbs - An Tym Scroll is free instead of 100 GP + code:a0bd/64/00 + cheat + description:At Healer's Herbs - Spellbook is free instead of 150 GP + code:a0c0/96/00 + cheat + description:At Healer's Herbs - Spidersilk is free instead of 4 GP + code:a0ba/04/00 + cheat + description:From Pendra - Spidersilk is free instead of 4 GP + code:a08a/04/00 + cheat + description:From Pendra - Black Pearl is free instead of 3 GP + code:a087/03/00 + cheat + description:From Pendra - Garlic is free instead of 2 GP + code:a084/02/00 + cheat + description:From Pendra - Ginseng is free instead of 2 GP + code:a081/02/00 + cheat + description:From Pendra - Sant Talisman is free instead of 75 GP + code:a08d/4b/00 + cheat + description:At Iolo's Bows - Bow is free instead of 75 GP + code:a00d/4b/00 + cheat + description:At Iolo's Bows - Wooden shield is free instead of 25 GP + code:a00a/19/00 + cheat + description:At Iolo's Bows - Dagger is free instead of 3 GP + code:a004/03/00 + cheat + description:At Iolo's Bows - Short sword is free instead of 40 GP + code:a007/28/00 + cheat + description:At Iolo's Bows - Crossbow is free instead of 150 GP + code:a010/96/00 + cheat + description:At Iolo's Bows - Arrow is free instead of 1 GP + code:a016/01/00 + cheat + description:At Iolo's Bows - Bolt is free instead of 2 GP + code:a019/02/00 + cheat + description:At Iolo's Bows - Sell Dagger for 2,305 instead of 1 GP + code:a110/00/09 + cheat + description:At Iolo's Bows - Sell Short sword for 2,848 instead of 20 GP + code:a113/40/03 + cheat + description:At Iolo's Bows - Sell Wooden shield for 3,850 instead of 10 GP + code:a116/00/0f + cheat + description:At Iolo's Bows - Magic bow is free instead of 800 GP + code:a013/20/00+a014/03/00 + cheat + description:Start new game with 201 instead of 1,225 GP + code:aad8/04/00 + cheat + description:Start new game with 4,297 instead of 1,225 GP + code:aad8/04/10 + cheat + description:Start new game with 32,713 instead of 1,225 GP + code:aad8/04/7f + cheat + description:Infinite Health - Avatar + code:6a06/0f + cheat + description:Infinite Health - Shamino + code:6a07/0f + cheat + description:Infinite Health - Iolo + code:6a08/0f + +cartridge sha256:8dda0b6bcb5d66fd6983f71f9257225ce053822cbb5edda5d072feeddec9358e + name:Ultimate Air Combat (USA) + cheat + description:Infinite Chaff + code:a01d/ce/ad + cheat + description:Infinite Missiles + code:a5e2/ce/ad+a60c/ce/ad + +cartridge sha256:f4de2a91acb2eb3024fb75231859a30c130c0169be0e6ad24330805c8f766e03 + name:Ultimate Stuntman, The (USA) (Unl) + cheat + description:Infinite time + code:d2ff/ce/ad + cheat + description:Infinite 'Crez' weapon until end of stage + code:dbaf/ce/ad + cheat + description:Minimum damage taken + code:a9b4/e5/e9+a9b5/ff/01 + cheat + description:Don't lose a life on Ground Pursuit, Boat and Hang Glider stages + code:8cb1/ce/2c + cheat + description:9 seconds on clock pick-up + code:a8ad/06/09 + cheat + description:Full energy on pick-up + code:a992/02/00 + cheat + description:Shield lasts longer on Human Fly stages + code:ae2e/78/ff + cheat + description:Shield lasts a shorter time on Human Fly stages + code:ae2e/78/40 + cheat + description:Don't lose a life against end-of-stage bosses and on street combat stages + code:affc/ce/ad + cheat + description:Don't lose a life on Human Fly stages + code:bdaa/ce/ad + cheat + description:Start with 1 life (first credit only) + code:ecff/02/00 + cheat + description:Start with 6 lives (first credit only) + code:ecff/02/05 + cheat + description:Start with 9 lives (first credit only) + code:ecff/02/08 + +cartridge sha256:c7ad19e926809adc47c0b44c852e19be7a95e7235ee58cb753e68d7cdee9c89c + name:Uncanny X-Men, The (USA) + cheat + description:Infinite life + code:8d8a/e5/a5 + cheat + description:Half life - Wolverine + code:a1b1/c8/64 + cheat + description:Half life - Cyclops + code:a1b7/c8/64 + cheat + description:Half life - Nightcrawler + code:a1bd/82/41 + cheat + description:Half life - Iceman + code:a1c3/be/5f + cheat + description:Half life - Colossus + code:a1c9/ff/7f + cheat + description:Half life - Storm + code:a1cf/a0/50 + +cartridge sha256:018f8a4f35d15af7891070cbfe6232791d603e92cbd95a49527e80f3825e770d + name:Untouchables, The (USA) (Rev B) + cheat + description:Infinite energy + code:0092/40 + cheat + description:Infinite ammo + code:00c6/02+00c8/02 + cheat + description:Infinite time + code:009a/09 + +cartridge sha256:9048cc77abdfd688395b2f8d1889d3d295d378c649cccbdf79f364fc73217051 + name:Untouchables, The (USA) (Rev A) + cheat + description:Infinite energy on scenes 1 and 4 + code:8418/d6/b5 + cheat + description:Infinite energy on scene 2 + code:86c0/c6/a5 + cheat + description:Infinite time on scenes 1 and 4 + code:84b2/c6/a5 + cheat + description:More time on scene 1 + code:81ab/02/04 + cheat + description:Less time on scene 1 + code:81ab/02/01 + cheat + description:More time on scene 2 + code:802b/04/06 + cheat + description:Less time on scene 2 + code:802b/04/02 + cheat + description:More time on scene 3 + code:802f/04/06 + cheat + description:Less time on scene 3 + code:802f/04/02 + cheat + description:More time on scene 5 + code:8021/05/06 + cheat + description:Less time on scene 5 + code:8021/05/03 + cheat + description:More time on scene 7 + code:8018/01/02 + cheat + description:More ammo picked up on scene 2 + code:847e/10/20 + cheat + description:Less ammo picked up on scene 2 + code:847e/10/05 + cheat + description:More ammo picked up on scene 7 + code:801c/06/09 + cheat + description:Start on scene 2 + code:c02e/0c/00 + cheat + description:Start on scene 3 + code:c02e/0c/02 + cheat + description:Start on scene 4 + code:c02e/0c/04 + cheat + description:Start on scene 5 + code:c02e/0c/06 + cheat + description:Start on scene 7 + code:c02e/0c/0a + cheat + description:Infinite energy + code:0092/40 + cheat + description:Infinite ammo + code:00c6/02+00c8/02 + cheat + description:Infinite time + code:009a/09 + +cartridge sha256:43198592f96005c1492165d5af8d41859dc164a99e39e37eff264ae5e0c63b75 + name:Untouchables, The (USA) + cheat + description:Infinite energy on scenes 1 and 4 + code:8418/d6/b5 + cheat + description:Infinite energy on scene 2 + code:86c0/c6/a5 + cheat + description:Infinite time on scenes 1 and 4 + code:84b2/c6/a5 + cheat + description:More time on scene 1 + code:81ab/02/04 + cheat + description:Less time on scene 1 + code:81ab/02/01 + cheat + description:More time on scene 2 + code:802b/04/06 + cheat + description:Less time on scene 2 + code:802b/04/02 + cheat + description:More time on scene 3 + code:802f/04/06 + cheat + description:Less time on scene 3 + code:802f/04/02 + cheat + description:More time on scene 5 + code:8021/05/06 + cheat + description:Less time on scene 5 + code:8021/05/03 + cheat + description:More time on scene 7 + code:8018/01/02 + cheat + description:More ammo picked up on scene 2 + code:847e/10/20 + cheat + description:Less ammo picked up on scene 2 + code:847e/10/05 + cheat + description:More ammo picked up on scene 7 + code:801c/06/09 + cheat + description:Start on scene 2 + code:c02e/0c/00 + cheat + description:Start on scene 3 + code:c02e/0c/02 + cheat + description:Start on scene 4 + code:c02e/0c/04 + cheat + description:Start on scene 5 + code:c02e/0c/06 + cheat + description:Start on scene 7 + code:c02e/0c/0a + cheat + description:Infinite energy + code:0092/40 + cheat + description:Infinite ammo + code:00c6/02+00c8/02 + cheat + description:Infinite time + code:009a/09 + +cartridge sha256:7255ab27932f7c07fa61c230a51342b0441ea9b24ba094ae3129ec7453de2449 + name:Urban Champion (World) + cheat + description:Infinite time + code:e312/c6/24 + cheat + description:Powerful quick punches + code:d482/04/08 + cheat + description:Super powerful quick punch + code:d482/04/16 + cheat + description:Speed up the timer + code:e2fe/06/03 + cheat + description:Become a stronger fighter + code:d32b/01/00 + cheat + description:Become a weaker fighter + code:d32b/01/03 + cheat + description:Infinite stamina + code:00ca/99 + +cartridge sha256:433f6bcbd59a9d5916d2209ddeacd39d24810c1ed21a33366171b4991fc7e844 + name:Vice - Project Doom (USA) + cheat + description:Invincibility + code:dd78/17/00 + cheat + description:Infinite lives + code:c15d/ce/ad + cheat + description:Infinite time + code:fd7f/ce/ad + cheat + description:Infinite grenades + code:fc62/ce/ad + cheat + description:Infinite bullets + code:fc4a/ce/ad + cheat + description:Infinite power + code:fce6/8d/ad + cheat + description:Hit anywhere + code:f882/e8/00 + cheat + description:Multi-jump + code:c5ed/4a/ea + cheat + description:10 coins for an extra life + code:fc97/64/0a + cheat + description:25 coins for an extra life + code:fc97/64/19 + cheat + description:20 extra Grenades on pick-up + code:fb88/05/14 + cheat + description:25 extra Bullets on pick-up + code:fba2/0a/19 + cheat + description:Start timer for round 1 at 150 + code:8419/fa/96 + cheat + description:Start timer for round 2 at 150 + code:8432/fa/96 + cheat + description:Start with 99 grenades + code:fb7a/05/63 + +cartridge sha256:8104dc7acdaea42b027b2cc7b05dc6a1ffdba6e74b35581c2bb0250df89a28fa + name:Vindicators (USA) (Unl) + cheat + description:Infinite lives + code:8634/d6/b4 + cheat + description:Automatic fuel replenishment + code:cd38/d6/f6 + cheat + description:Never lose Stars + code:8a1e/f9/2c + cheat + description:Quicker shot re-load + code:c63f/12/02 + cheat + description:Turbo speed + code:c64b/0c/1b + cheat + description:Start with increased shot range + code:c647/08/20 + cheat + description:Start with 10 Stars + code:81e0/85/e6 + cheat + description:Start with 80 Shots + code:c63f/12/08+c641/d0/d6 + cheat + description:Start with 80 Bombs + code:c63f/12/08+c641/d0/d4 + cheat + description:Start with 1 life + code:c64f/02/00 + cheat + description:Start with 6 lives + code:c64f/02/05 + cheat + description:Start with 9 lives + code:c64f/02/08 + +cartridge sha256:2e312fc327c1e569eccf14eee5a00c41f676c1492035d99af0873681da0f034d + name:Volleyball (USA, Europe) + cheat + description:Computer doesn't get points for scoring + code:d6f0/0f + cheat + description:3 points - team 1 + code:0063/03 + +cartridge sha256:f38b9681b53008d32813880c2f28a8969a228a4b3b485ce09f7c0a4334f4abcc + name:VS. Castlevania (VS) + cheat + description:Invincibility (blinking) + code:e991/f0/d0 + cheat + description:Infinite health + code:e7fa/85/a5 + cheat + description:Infinite lives + code:c2ec/c6/a5 + +cartridge sha256:60098a93322a9e07a2b164a02e5517bc22664ca33f6323c2ae23a62941ad393b + name:VS. Super Mario Bros. (VS) + cheat + description:Invincibility + code:b1f9/89/9e+ee51/f0/d0 + cheat + description:Infinite lives + code:988b/ad + cheat + description:Go to minus world + code:9718/23+971a/5f+971b/07 + +cartridge sha256:8589b1dc55e04d23e56e864f1b001c6eecf18b7dcb7a0c4a9c4a40cbcc451601 + name:Wacky Races (USA) + cheat + description:Invincibility + code:d97b/f0/d0+d9b5/f0/d0+cd8d/f0/d0 + cheat + description:Infinite health + code:ced5/ce/cd+cdbb/ce/cd + cheat + description:Infinite health (alt) + code:ced5/ce/2c+ce7e/ce/2c+cdbb/ce/2c + cheat + description:Don't take most damage + code:ced5/ce/2c + cheat + description:Infinite lives + code:d05a/ce/8d+d0c7/ce/8d + cheat + description:Infinite lives (alt) + code:d054/ad/10+d055/5d/08 + cheat + description:Infinite Bones after obtaining one + code:d793/8d/ad + cheat + description:Go straight to level boss + code:edbc/c4/f2 + cheat + description:Start at race 1, end of stage 1 + code:edbc/c4/c8 + cheat + description:Start at race 1, end of stage 2 + code:edbc/c4/cf + cheat + description:Start at race 1, end of stage 3 + code:edbc/c4/d4 + cheat + description:Start at race 2, end of stage 1 + code:edbe/d6/d8 + cheat + description:Start at race 2, end of stage 2 + code:edbe/d6/dc + cheat + description:Start at race 2, end of stage 3 + code:edbe/d6/e0 + cheat + description:Start at race 3, end of stage 1 + code:edc0/e2/e4 + cheat + description:Start at race 3, end of stage 2 + code:edc0/e2/e8 + cheat + description:Start at race 3, end of stage 3 + code:edc0/e2/ec + cheat + description:Start at race 3, end of stage 4 + code:edc0/e2/f0 + cheat + description:Start with 1 life + code:ed48/02/00 + cheat + description:Start with 5 lives + code:ed48/02/04 + cheat + description:Start with 7 lives + code:ed48/02/06 + cheat + description:Start with 9 lives + code:ed48/02/08 + cheat + description:Start with 6 hearts + code:ed51/03/06 + cheat + description:Start with 8 hearts + code:ed51/03/08 + cheat + description:Invincibility (alt) + code:0453/01 + cheat + description:Invincibility (blinking) + code:0452/11 + cheat + description:Infinite health (alt 2) + code:0459/03 + cheat + description:Infinite time + code:00a4/59 + cheat + description:Infinite lives (alt 2) + code:045d/63 + cheat + description:Infinite Gems + code:042f/63 + +cartridge sha256:60667bc0ed1c0c6355f59b5716c678954c5f3915064bdbfbb8e0195f2643eda8 + name:Wall Street Kid (USA) + cheat + description:Infinite money + code:fbde/91/b1 + cheat + description:Sart a new game with $16,777,215 + code:810b/07/ff+810a/a1/ff+8109/20/ff + cheat + description:Infinite money (alt) + code:03e1/ff + +cartridge sha256:50b6f1f87fb14c8ff74a54e60b85139e11adcaecb62eb24174aeb58a20b7698f + name:Wally Bear and the No! Gang (USA) (Unl) + cheat + description:Invincibility + code:a7bf/d0/10 + cheat + description:Multi-jump + code:a57a/85/24 + cheat + description:Collect items from anywhere + code:b775/5c/00+b77b/56/00 + +cartridge sha256:c12771e8155b030eff0081bfabd98e57a162d6592899f29dd16f141f0e6e08a3 + name:Wario's Woods (USA) + cheat + description:Infinite time + code:a17b/ce/ea + cheat + description:Clear round A data to complete round A and B + code:9b41/00/63+9b46/42/41 + cheat + description:Each coin gives you a credit + code:9a68/1e/01 + cheat + description:Always get blue monsters + code:b85f/b1/a9+b860/b3/f0 + cheat + description:Always get 1 line of monsters + code:b850/8d/ee + cheat + description:Wario doesn't cause ceiling to fall, no enemies fall + code:87f6/8d/a9 + cheat + description:One bomb in Birdo time only + code:a24c/ce/ea + cheat + description:Invisible Toad + code:d891/85/a5 + cheat + description:Invisible coins + code:99a5/d0/f0 + cheat + description:Coins worth 5 + code:98a5/8d/ea + cheat + description:Infinite coins fall + code:98a8/ce/ea + cheat + description:Only 1 coin falls + code:97de/ce/ae + cheat + description:No Coins fall + code:97de/ce/80 + cheat + description:Diamonds don't form in lesson mode + code:ad53/99/ff + +cartridge sha256:059409954035963f1f13029dfa25468100a8e6a90d9388c4a225f235ade97a45 + name:Wayne's World (USA) + cheat + description:Infinite lives + code:8acd/ce/ae + cheat + description:Infinite time + code:81d3/ce/ad + cheat + description:Infinite Worthiness + code:8b5a/8d/ad + cheat + description:More time in level 1 + code:b7d7/b4/ff + cheat + description:More time in Donut shop in level 1 + code:b7f5/32/ff + cheat + description:Power-up restores all Worthiness + code:8b74/02/00 + cheat + description:Power-up worth nothing + code:8b77/8d/ad + cheat + description:Getting all donuts is worth no extra lives + code:9b1d/ee/ad + cheat + description:Faster timer + code:81ca/3b/1f + cheat + description:Slower timer + code:81ca/3b/60 + cheat + description:5 special moves on pick-up + code:a802/14/05 + cheat + description:40 special moves on pick-up + code:a802/14/28 + cheat + description:Start with less Worthiness + code:807a/b0/80 + cheat + description:Start with much less Worthiness + code:807a/b0/40 + cheat + description:Start with 2 lives + code:807f/04/01 + cheat + description:Start with 8 lives + code:807f/04/07 + cheat + description:Start with 10 lives + code:807f/04/09 + +cartridge sha256:a00db4c89bfd12704c53768b62b4f09d57d28891093447d81a0678b059629e59 + name:WCW World Championship Wrestling (USA) + cheat + description:Always win - P1 + code:a715/1d/c0+a716/09/01+a717/05/ea + +cartridge sha256:ab6f1bbcda6f0c0bbe1450b5f2ab2b21a5e01ec39143a455701862965cdbd7b4 + name:Werewolf - The Last Warrior (USA) + cheat + description:Infinite time + code:e326/c6/a5 + cheat + description:Only 1 anger point needed to become Super-Werewolf + code:f60c/05/01 + cheat + description:Blue "W" won't change you back to a man + code:f629/ce/ad + cheat + description:Gain maximum energy from small hearts + code:f5ce/d4/d0 + cheat + description:Hit anywhere + code:cf66/64/00+cf6c/5e/00+cfa2/28/00+cfa8/22/00 + cheat + description:Don't lose energy from blue "W" + code:f63c/0a/00+f639/08/00 + cheat + description:Infinite health - P1 + code:00bc/14 + cheat + description:Infinite time (alt) + code:00bf/f4 + cheat + description:Always Werewolf + code:044e/01+042e/01 + cheat + description:Always Super Werewolf + code:044e/02 + cheat + description:Have Gun in Werewolf form + code:044f/01+044d/01 + +cartridge sha256:84e3a018cbaaf2311d7e9414112cb05cf3b43608de0b9f8a2f77bc4da33ce8e6 + name:Wheel of Fortune - Junior Edition (USA) + cheat + description:Always spin $1000 - All players + code:0071/aa + +cartridge sha256:a66195e11e38bee9f602abd279b7c04367528380dfa5b915dce0fa6fd272c23c + name:Where's Waldo (USA) + cheat + description:Infinite time + code:e283/01/00 + cheat + description:Guesses cost nothing + code:e75f/06/ee + +cartridge sha256:700ebc3c2dd27420bbdcccb987ba60d3f0680469101353de15a1b2bd565ac701 + name:Who Framed Roger Rabbit (USA) + cheat + description:Invincibility + code:e145/d0/60+db64/d0/60+c921/d0/60+e598/d0/60 + cheat + description:Infinite continues + code:87cb/ce/ad + cheat + description:Never lose a life except in Punch lines + code:95ef/c6/a5 + cheat + description:Never lose a life in Punch lines + code:af52/c6/a5 + cheat + description:Harder to build strength + code:ce3a/04/01 + cheat + description:Strength to full instantly + code:ce3a/04/90 + cheat + description:Start with 1 life + code:dfdd/03/01 + cheat + description:Start with 6 lives + code:dfdd/03/06 + cheat + description:Start with 9 lives + code:dfdd/03/09 + +cartridge sha256:b9a4542417439619239cdb2cefd8c7eced2407ba2954f026c0ab1ea7d4def3d3 + name:Whomp 'Em (USA) + cheat + description:Invincibility + code:815b/f0/60 + cheat + description:Infinite health + code:8176/85/a5 + cheat + description:Don't lose a life from health loss + code:818a/c6/a5 + cheat + description:Creatures can't steal extra lives + code:99ab/c6/a5 + cheat + description:Keep Buffalo Headdress for present level + code:814c/c6/a5 + cheat + description:Always have Buffalo Headdress + code:814b/08/02 + cheat + description:Start with 1 life + code:c0cc/03/00 + cheat + description:Start with 5 lives + code:c06f/00/03 + cheat + description:Start with 10 lives + code:c06f/00/08 + +cartridge sha256:9d875583dbdf80a0631ce4ffb3099064454d80568b5e9fe748a5e850f8fa0161 + name:Widget (USA) + cheat + description:Invincibility + code:eaf8/d0/f0 + cheat + description:Infinite health (not against spikes) + code:bcd0/8d/ad + cheat + description:Infinite health (only against spikes) + code:e8b9/ce/ad + cheat + description:Infinite time + code:8ab6/ce/ad+8aa7/ce/ad + cheat + description:Infinite MP + code:96a1/8d/ad + cheat + description:Infinite lives + code:ca35/ce/ad + cheat + description:Invincibility (blinking) + code:00b9/01 + cheat + description:Infinite health + code:0581/06 + cheat + description:Infinite lives (alt) + code:04f5/02 + cheat + description:Infinite special + code:058b/06 + cheat + description:Have Mouse Widget + code:0331/01 + cheat + description:Have Rock-Man Widget + code:0332/01 + cheat + description:Have Bird-Man Widget + code:0333/01 + cheat + description:Have Dolphin Widget + code:0334/01 + cheat + description:Have powered-up Gun + code:0594/03+0595/03 + +cartridge sha256:adff304553b64384f86f6c2b63571f43972b9d087f92359a1b9b93b54d523542 + name:Wild Gunman (World) (Rev A) + cheat + description:Infinite lives in Gang Mode + code:cf16/c6/24 + cheat + description:Infinite ammo in Gang Mode + code:d071/c6/24 + cheat + description:Shoot 5 enemies to finish level + code:d9fb/0a/05+dbbd/0a/05 + cheat + description:Start with double normal ammo + code:d9e0/0f/20 + cheat + description:Start with triple normal ammo + code:d9e0/0f/30 + cheat + description:Start with half normal ammo + code:d9e0/0f/08 + cheat + description:Start with 1 life + code:d9b5/03/0f+c8f6/03/01 + cheat + description:Start with 10 lives + code:d9b5/03/0a+c8f6/03/0a + cheat + description:Start with 15 lives + code:d9b5/03/0f+c8f6/03/0f + +cartridge sha256:62aec65696ecf24a487b7cdd19bad5cbd19f4229a89a7888634d468c67da378a + name:Wild Gunman (Japan, USA) + cheat + description:Infinite lives in Gang Mode + code:cf07/d0 + cheat + description:Infinite ammo in Gang Mode + code:d062/f0 + cheat + description:Shoot 5 enemies to finish level + code:d9fb/0a/05+dbbd/0a/05 + cheat + description:Start with double normal ammo + code:d9e0/0f/20 + cheat + description:Start with triple normal ammo + code:d9e0/0f/30 + cheat + description:Start with half normal ammo + code:d9e0/0f/08 + cheat + description:Start with 1 life + code:d9b5/03/0f+c8f6/03/01 + cheat + description:Start with 10 lives + code:d9b5/03/0a+c8f6/03/0a + cheat + description:Start with 15 lives + code:d9b5/03/0f+c8f6/03/0f + +cartridge sha256:adb1a1a9e853c2390a702e40573d145d08ca6c649cc789e4c8b41fcb63503bb6 + name:Willow (USA) + cheat + description:Infinite magic + code:815c/db/02 + cheat + description:Don't take any hits + code:d473/85/46 + cheat + description:Start with all items + code:f345/94/a2+9dba/a9/60 + cheat + description:Start at EXP Level 5 + code:dec5/0a/04+dec7/b5/71 + cheat + description:Start at EXP Level 10 + code:dec5/0a/09+dec7/b5/71 + cheat + description:Start at EXP Level 15 + code:dec5/0a/0e+dec7/b5/71 + +cartridge sha256:e9539f088b4463e36c2a0d324d6a184fc1ecc3aa26ca4c5675ad9dc948bba5e5 + name:Wing of Madoola, The (Japan) (Sample) + cheat + description:Invincibility + code:cec2/85/a5 + cheat + description:Infinite hits and magic + code:bf3e/95/b5 + cheat + description:Hit anywhere + code:ce10/09/00+ce15/5a/00+ce14/f5/29 + cheat + description:One hit kills + code:ce28/e5/18+ce29/88/18 + cheat + description:Start with 9999 hits + code:a9c4/00/99+a9c8/10/99 + cheat + description:Start with 9999 max hits + code:a9cc/00/99+a9d0/10/99 + cheat + description:Start with 9999 magic + code:a9d8/10/99+a9d4/00/99 + +cartridge sha256:c3136379fc4e9401dec41be356fd6963e79dd46193c61cc03b59d9935835401f + name:Wizardry - Proving Grounds of the Mad Overlord (USA) + cheat + description:Annointed Mace costs nothing instead of 30 + code:81ed/30/00 + cheat + description:Long Sword costs nothing instead of 25 + code:816d/25/00 + cheat + description:Short Sword costs nothing instead of 15 + code:81ad/15/00 + cheat + description:Small Shield costs nothing instead of 20 + code:82ed/20/00 + cheat + description:Staff costs nothing instead of 10 + code:826d/10/00 + cheat + description:Dagger costs nothing instead of 15 + code:82ad/05/00 + cheat + description:Robes costs nothing instead of 15 + code:836d/15/00 + cheat + description:S of Pain costs nothing instead of 500 + code:87ec/05/00 + cheat + description:S of Fire costs nothing instead of 500 + code:882c/05/00 + cheat + description:Body Armor costs nothing instead of 1500 + code:87ac/15/00 + cheat + description:Large Shield costs nothing instead of 40 + code:832d/40/00 + cheat + description:Leather Armor costs nothing instead of 50 + code:83ad/50/00 + cheat + description:Chain Mail costs nothing instead of 90 + code:83ed/90/00 + cheat + description:Breast Plate costs nothing instead of 200 + code:842c/02/00 + cheat + description:Helm costs nothing instead of 100 + code:84ac/01/00 + cheat + description:S of Curing costs nothing instead of 500 + code:84ec/05/00 + cheat + description:Rod of Iron costs nothing instead of 3000 + code:862c/30/00 + cheat + description:Padded Leather costs nothing instead of 1500 + code:86ac/15/00 + cheat + description:Shiny Chain costs nothing instead of 1500 + code:86ec/15/00 + cheat + description:Sturdy Plate costs nothing instead of 1500 + code:872c/15/00 + cheat + description:Iron Shield costs nothing instead of 1500 + code:876c/15/00 + cheat + description:Gloves of Copper costs nothing instead of 6000 + code:8cec/60/00 + cheat + description:S of Glass costs nothing instead of 1500 + code:8b6c/15/00 + cheat + description:Studly Staff costs nothing instead of 2500 + code:892c/25/00 + cheat + description:S of Neutralizing costs nothing instead of 300 + code:852c/03/00 + cheat + description:Plate Mail costs nothing instead of 750 + code:846d/50/00+846c/07/00 + cheat + description:Blade of Biting costs nothing instead of 15000 + code:85ac/50/00+85ab/01/00 + +cartridge sha256:d30e480e7a99b5c3d8fe8faecf0bc0a14a9b163025eca9bf787f600fa927bb89 + name:Wizards & Warriors (USA) (Rev A) + cheat + description:Invincibility + code:e57e/f0/d0 + cheat + description:Invincibility (flashes) + code:e581/30 + cheat + description:Infinite lives + code:b4ea/c6/24 + cheat + description:Infinite lives (alt) + code:b4ea/c6/a5 + cheat + description:Infinite health + code:e37d/e5/24 + cheat + description:Infinite health (alt) + code:e698/d0/a9+e699/3c/0c+e69a/a5/85 + cheat + description:Potions last longer + code:df07/4f/ef + cheat + description:Meat gives half health + code:e488/02/01 + cheat + description:Meat gives double health + code:e488/02/04 + cheat + description:Enter doors without needing a key + code:f341/30 + cheat + description:Jump higher + code:d15e/fc + cheat + description:Jump to the top of the scren + code:d166/cc + cheat + description:Start with 6 lives + code:b83c/02/05+c024/02/05 + cheat + description:Start with 9 lives + code:b83c/02/08+c024/02/08 + cheat + description:Invincibility (alt) + code:00fc/02 + cheat + description:Infinite health (alt 2) + code:0076/0c + cheat + description:Super-jump (disable if you get stuck) + code:0148/40 + +cartridge sha256:3ba4f6fd63a74338e438df43ddd1195f8913d69c11f6668d3bbf23a2a3cea459 + name:Wizards & Warriors (USA) + cheat + description:Invincibility + code:e57e/f0/d0 + cheat + description:Invincibility (flashes) + code:e581/30 + cheat + description:Infinite lives + code:b4ea/c6/24 + cheat + description:Infinite lives (alt) + code:b4ea/c6/a5 + cheat + description:Infinite health + code:e37d/e5/24 + cheat + description:Infinite health (alt) + code:e698/d0/a9+e699/3c/0c+e69a/a5/85 + cheat + description:Potions last longer + code:df07/4f/ef + cheat + description:Meat gives half health + code:e488/02/01 + cheat + description:Meat gives double health + code:e488/02/04 + cheat + description:Enter doors without needing a key + code:f341/30 + cheat + description:Jump higher + code:d15e/fc + cheat + description:Jump to the top of the scren + code:d166/cc + cheat + description:Start with 6 lives + code:b83c/02/05+c024/02/05 + cheat + description:Start with 9 lives + code:b83c/02/08+c024/02/08 + cheat + description:Invincibility (alt) + code:00fc/02 + cheat + description:Infinite health (alt 2) + code:0076/0c + cheat + description:Super-jump (disable if you get stuck) + code:0148/40 + +cartridge sha256:2fa3ee5f9ef17dcd63f2f3936dc79b95a71f9e58521080250d4b4e7efbd471d2 + name:Wizards & Warriors III - Kuros...Visions of Power (USA) + cheat + description:Infinite keys + code:f6ad/c6/a5 + cheat + description:Infinite gold + code:f777/f0 + cheat + description:Shopkeeper sometimes forgets to charge + code:f772/8d/ad + cheat + description:Infinite lives + code:e3e4/c6/a5 + cheat + description:Infinite lives (except boss stages) + code:e3f1/c6/a5 + cheat + description:Coins worth 25 + code:84d4/32/19 + cheat + description:Coins worth 100 + code:84d4/32/64 + cheat + description:Coins worth 255 + code:84d4/32/ff + cheat + description:Bags worth 5 + code:84d2/0a/05 + cheat + description:Bags worth 50 + code:84d2/0a/32 + cheat + description:Bags worth 255 + code:84d2/0a/ff + cheat + description:Less health after death (except boss stages) + code:b203/80/40 + cheat + description:More health after death (except boss stages) + code:b203/80/b0 + cheat + description:Start with Less health + code:a744/80/40 + cheat + description:Start with More health + code:a744/80/b0 + cheat + description:Start with very little life force + code:a744/80/01 + cheat + description:Start with about half life force + code:a744/80/40 + cheat + description:Start with 2 lives + code:a729/03/01 + cheat + description:Start with 7 lives + code:a729/03/06 + cheat + description:Start with 10 lives + code:a729/03/09 + cheat + description:Invincibility + code:008b/2b + cheat + description:Infinite health + code:00eb/80 + cheat + description:Infinite Keys + code:0087/02 + cheat + description:Infinite money + code:0669/09 + cheat + description:One hit kills on most enemies/bosses + code:049d/01+049e/01+049f/01+04a0/01+04a1/01 + cheat + description:Have the Orb in slot 1 (enable then disable) + code:0657/01 + cheat + description:Have the Orb in slot 2 (enable then disable) + code:0658/01 + cheat + description:Have the Orb in slot 3 (enable then disable) + code:0659/01 + cheat + description:Have the Orb in slot 4 (enable then disable) + code:065a/01 + cheat + description:Have the Scepter in slot 1 (enable then disable) + code:0657/02 + cheat + description:Have the Scepter in slot 2 (enable then disable) + code:0658/02 + cheat + description:Have the Scepter in slot 3 (enable then disable) + code:0659/02 + cheat + description:Have the Scepter in slot 4 (enable then disable) + code:065a/02 + cheat + description:Have the Coin in slot 1 (enable then disable) + code:0657/03 + cheat + description:Have the Coin in slot 2 (enable then disable) + code:0658/03 + cheat + description:Have the Coin in slot 3 (enable then disable) + code:0659/03 + cheat + description:Have the Coin in slot 4 (enable then disable) + code:065a/03 + cheat + description:Have the Chalice in slot 1 (enable then disable) + code:0657/04 + cheat + description:Have the Chalice in slot 2 (enable then disable) + code:0658/04 + cheat + description:Have the Chalice in slot 3 (enable then disable) + code:0659/04 + cheat + description:Have the Chalice in slot 4 (enable then disable) + code:065a/04 + cheat + description:Have the Amulet in slot 1 (enable then disable) + code:0657/05 + cheat + description:Have the Amulet in slot 2 (enable then disable) + code:0658/05 + cheat + description:Have the Amulet in slot 3 (enable then disable) + code:0659/05 + cheat + description:Have the Amulet in slot 4 (enable then disable) + code:065a/05 + cheat + description:Have the Crown in slot 1 (enable then disable) + code:0657/06 + cheat + description:Have the Crown in slot 2 (enable then disable) + code:0658/06 + cheat + description:Have the Crown in slot 3 (enable then disable) + code:0659/06 + cheat + description:Have the Crown in slot 4 (enable then disable) + code:065a/06 + cheat + description:Have the Crown Jewel 1 in slot 1 (enable then disable) + code:0657/07 + cheat + description:Have the Crown Jewel 1 in slot 2 (enable then disable) + code:0658/07 + cheat + description:Have the Crown Jewel 1 in slot 3 (enable then disable) + code:0659/07 + cheat + description:Have the Crown Jewel 1 in slot 4 (enable then disable) + code:065a/07 + cheat + description:Have the Crown Jewel 2 in slot 1 (enable then disable) + code:0657/08 + cheat + description:Have the Crown Jewel 2 in slot 2 (enable then disable) + code:0658/08 + cheat + description:Have the Crown Jewel 2 in slot 3 (enable then disable) + code:0659/08 + cheat + description:Have the Crown Jewel 2 in slot 4 (enable then disable) + code:065a/08 + cheat + description:Have the Crown Jewel 3 in slot 1 (enable then disable) + code:0657/09 + cheat + description:Have the Crown Jewel 3 in slot 2 (enable then disable) + code:0658/09 + cheat + description:Have the Crown Jewel 3 in slot 3 (enable then disable) + code:0659/09 + cheat + description:Have the Crown Jewel 3 in slot 4 (enable then disable) + code:065a/09 + cheat + description:Have the Crown Jewel 4 in slot 1 (enable then disable) + code:0657/0a + cheat + description:Have the Crown Jewel 4 in slot 2 (enable then disable) + code:0658/0a + cheat + description:Have the Crown Jewel 4 in slot 3 (enable then disable) + code:0659/0a + cheat + description:Have the Crown Jewel 4 in slot 4 (enable then disable) + code:065a/0a + cheat + description:Have the Bronze Knight Statue in slot 1 (enable then disable) + code:0657/0b + cheat + description:Have the Bronze Knight Statue in slot 2 (enable then disable) + code:0658/0b + cheat + description:Have the Bronze Knight Statue in slot 3 (enable then disable) + code:0659/0b + cheat + description:Have the Bronze Knight Statue in slot 4 (enable then disable) + code:065a/0b + cheat + description:Have the Silver Knight Statue in slot 1 (enable then disable) + code:0657/0c + cheat + description:Have the Silver Knight Statue in slot 2 (enable then disable) + code:0658/0c + cheat + description:Have the Silver Knight Statue in slot 3 (enable then disable) + code:0659/0c + cheat + description:Have the Silver Knight Statue in slot 4 (enable then disable) + code:065a/0c + cheat + description:Have the Gold Knight Statue in slot 1 (enable then disable) + code:0657/0d + cheat + description:Have the Gold Knight Statue in slot 2 (enable then disable) + code:0658/0d + cheat + description:Have the Gold Knight Statue in slot 3 (enable then disable) + code:0659/0d + cheat + description:Have the Gold Knight Statue in slot 4 (enable then disable) + code:065a/0d + cheat + description:Have the Bronze Thief Statue in slot 1 (enable then disable) + code:0657/0e + cheat + description:Have the Bronze Thief Statue in slot 2 (enable then disable) + code:0658/0e + cheat + description:Have the Bronze Thief Statue in slot 3 (enable then disable) + code:0659/0e + cheat + description:Have the Bronze Thief Statue in slot 4 (enable then disable) + code:065a/0e + cheat + description:Have the Silver Thief Statue in slot 1 (enable then disable) + code:0657/0f + cheat + description:Have the Silver Thief Statue in slot 2 (enable then disable) + code:0658/0f + cheat + description:Have the Silver Thief Statue in slot 3 (enable then disable) + code:0659/0f + cheat + description:Have the Silver Thief Statue in slot 4 (enable then disable) + code:065a/0f + cheat + description:Have the Gold Thief Statue in slot 1 (enable then disable) + code:0657/10 + cheat + description:Have the Gold Thief Statue in slot 2 (enable then disable) + code:0658/10 + cheat + description:Have the Gold Thief Statue in slot 3 (enable then disable) + code:0659/10 + cheat + description:Have the Gold Thief Statue in slot 4 (enable then disable) + code:065a/10 + cheat + description:Have the Bronze Wizard Statue in slot 1 (enable then disable) + code:0657/11 + cheat + description:Have the Bronze Wizard Statue in slot 2 (enable then disable) + code:0658/11 + cheat + description:Have the Bronze Wizard Statue in slot 3 (enable then disable) + code:0659/11 + cheat + description:Have the Bronze Wizard Statue in slot 4 (enable then disable) + code:065a/11 + cheat + description:Have the Silver Wizard Statue in slot 1 (enable then disable) + code:0657/12 + cheat + description:Have the Silver Wizard Statue in slot 2 (enable then disable) + code:0658/12 + cheat + description:Have the Silver Wizard Statue in slot 3 (enable then disable) + code:0659/12 + cheat + description:Have the Silver Wizard Statue in slot 4 (enable then disable) + code:065a/12 + cheat + description:Have the Gold Wizard Statue in slot 1 (enable then disable) + code:0657/13 + cheat + description:Have the Gold Wizard Statue in slot 2 (enable then disable) + code:0658/13 + cheat + description:Have the Gold Wizard Statue in slot 3 (enable then disable) + code:0659/13 + cheat + description:Have the Gold Wizard Statue in slot 4 (enable then disable) + code:065a/13 + +cartridge sha256:2d62114f3f139e8dd01c3e6e56d83a848a236ebb0c146fac5d372ba40ae456d5 + name:Wolverine (USA) + cheat + description:No enemies + code:d3df/5d + cheat + description:Infinite lives - both players + code:a108/ce/2c + cheat + description:Mega-jump + code:bba7/0d/28 + cheat + description:Claws use up no health + code:c327/01/00 + cheat + description:Super speed + code:bb2e/fe/fc+bb38/02/04 + cheat + description:Take less damage from bullets + code:b525/08/02+c408/08/02 + cheat + description:Start each new life as a berserker + code:d072/00/40 + cheat + description:Start with 1 life - P1 + code:d0ba/03/01 + cheat + description:Start with 6 lives - P1 + code:d0ba/03/06 + cheat + description:Start with 9 lives - P1 + code:d0ba/03/09 + cheat + description:Start with 1 life - P2 + code:d0e7/03/01 + cheat + description:Start with 6 lives - P2 + code:d0e7/03/06 + cheat + description:Start with 9 lives - P2 + code:d0e7/03/09 + cheat + description:Start on stage 2 - P1 + code:d0a2/00/01 + cheat + description:Start on stage 4 - P1 + code:d0a2/00/03 + cheat + description:Start on stage 6 - P1 + code:d0a2/00/05 + cheat + description:Start on stage 8 - P1 + code:d0a2/00/07 + cheat + description:Start on stage 2 - P2 + code:d0cf/00/01 + cheat + description:Start on stage 4 - P2 + code:d0cf/00/03 + cheat + description:Start on stage 6 - P2 + code:d0cf/00/05 + cheat + description:Start on stage 8 - P2 + code:d0cf/00/07 + cheat + description:Infinite health + code:00cd/1e + cheat + description:Infinite lives + code:04da/03 + +cartridge sha256:3950d679fd6bbd5b59b720ef0284cb916f916a985103ccec60de2f256bcd8786 + name:Wrath of the Black Manta (USA) (Rev A) + cheat + description:Invincibility (blinking) + code:0589/fa + cheat + description:Start on stage 2 + code:054a/01 + cheat + description:Start on stage 3 + code:054a/03 + cheat + description:Start on stage 4 + code:054a/04 + cheat + description:Start on stage 5 + code:054a/05 + +cartridge sha256:545a5533481f4f7bd8f7e9d6c7ccad9195f870522d7d2a9d83c18958804da008 + name:Wrath of the Black Manta (USA) + cheat + description:Take no damage from most enemies + code:bbd2/ce/ad + cheat + description:Never die from falling off screen + code:986c/ce/ad + cheat + description:Mega-jump when stationary + code:ab35/9d/2c + cheat + description:Start with extra energy + code:8692/03/08 + cheat + description:Start with 1 life + code:8697/02/00 + cheat + description:Start with 6 lives + code:8697/02/05 + cheat + description:Start with 9 lives + code:8697/02/08 + cheat + description:Invincibility (blinking) + code:0589/fa + cheat + description:Start on stage 2 + code:054a/01 + cheat + description:Start on stage 3 + code:054a/03 + cheat + description:Start on stage 4 + code:054a/04 + cheat + description:Start on stage 5 + code:054a/05 + +cartridge sha256:f1eb29dd1c7b2b29f4932df853f32a7560bbfe64997281aa79f61ba9f131fb17 + name:Wrecking Crew (World) + cheat + description:Invincibility + code:c27f/20/60 + cheat + description:Infinite lives - P1 + code:a3cc/a5 + cheat + description:Infinite lives - P2 + code:a3da/a5 + cheat + description:Annoying guy doesn't bother you + code:d223/9d/ad+d1c3/9d/ad + cheat + description:Start with Golden Hammer + code:a1bc/85/e6 + cheat + description:Start with 1 life - both players + code:a1bf/01 + cheat + description:Start with 10 lives - both players + code:a1bf/09 + cheat + description:Start with 15 lives - both players + code:a1bf/0f + cheat + description:Start with 250 lives + code:a1bf/f8 + +cartridge sha256:a0354fb9c1c29e25b8bd2bd45735e8af2263cde66b56cc2e61eb5d9295a42de1 + name:Wurm - Journey to the Center of the Earth! (USA) + cheat + description:Infinite fuel + code:c757/8d/ad + cheat + description:Infinite shields and life + code:c6f2/85/a5 + cheat + description:Start on Act 2 - Dyna Crystal + code:d4a6/01/02 + cheat + description:Start on Act 3 - Magma Falls + code:d4a6/01/03 + cheat + description:Start on Act 4 - Ziggy + code:d4a6/01/04 + cheat + description:Start on Act 5 - Dual Duel + code:d4a6/01/05 + +cartridge sha256:e5de4656729ffa37f7f6afdccb7c207ca7b867768369cc1a2817626919bff8dc + name:WWF King of the Ring (USA) + cheat + description:Infinite health - both players + code:b63d/99/ae + cheat + description:Infinite health - P1 + code:0168/bf + cheat + description:No health - P2 + code:0194/00 + +cartridge sha256:a6f98e57ffb4544152138f109b00d1016ae957f7d842f29b41e118045fd54056 + name:WWF Wrestlemania (USA) + cheat + description:Infinite health - P1 + code:cf27/b0/a9+cf28/02/ca+cf29/e6/85 + cheat + description:One hit drains all health + code:cd96/90/f0 + cheat + description:Opponent is idle after a body slam + code:e9a5/ad + cheat + description:Countdown starts on 3 + code:e343/01/03 + cheat + description:1 minute tournament rounds + code:c922/03/01 + cheat + description:6 minute tournament rounds + code:c922/03/06 + cheat + description:9 minute tournament rounds + code:c922/03/09 + +cartridge sha256:89df74e7b275929c91a64580c5b1733bee26bcaf3a923dcca9fffdda835b2964 + name:WWF Wrestlemania Challenge (USA) + cheat + description:Pin count extended to 9 seconds + code:b483/04/0a + cheat + description:10-count reduced to 5 seconds + code:c1d7/0b/06 + cheat + description:All counts slower + code:c1fc/3c/65 + cheat + description:All counts faster + code:c1fc/3c/1f + +cartridge sha256:b0e4bcb63416c32fc247ff8afc28915ba15906a9b02aaed77a41e8109eab91fc + name:WWF Wrestlemania Steel Cage Challenge (USA) + cheat + description:P1 cannot lose (constant 1 count) + code:8bd5/ce/ae + cheat + description:Infinite energy refills (press select when energy is low) + code:dfa2/9d/bd + cheat + description:1 minute tournament rounds + code:c922/03/01 + cheat + description:6 minute tournament rounds + code:c922/03/06 + cheat + description:9 minute tournament rounds + code:c922/03/09 + +cartridge sha256:4b11689be770a7dd6ef560568ba1fd70d6c585babedd8c9088769a0d63d89cf1 + name:Xenophobe (USA) + cheat + description:Infinite health - both players + code:d747/eb/00 + cheat + description:Increase starting health - both players + code:d152/09/03 + cheat + description:More health - P1 + code:d163/ff/03+d165/5c/50 + cheat + description:No health pick-ups allowed + code:d6f6/99/ad + cheat + description:Start on level 2 + code:d148/07/06 + cheat + description:Start on level 3 + code:d148/07/05 + cheat + description:Start on level 4 + code:d148/07/04 + cheat + description:Start on level 5 + code:d148/07/03 + cheat + description:Infinite health - P1 (one's digit) + code:0753/09 + cheat + description:Infinite health - P1 (ten's digit) + code:0752/0a + cheat + description:Infinite health - P1 (hundred's digit) + code:0751/09 + cheat + description:Infinite health - P1 (thousand's digit) + code:0750/09 + cheat + description:Infinite health - P2 (one's digit) + code:0757/0b + cheat + description:Infinite health - P2 (ten's digit) + code:0756/0b + cheat + description:Infinite health - P2 (hundred's digit) + code:0755/09 + cheat + description:Infinite health - P2 (thousand's digit) + code:0754/09 + cheat + description:Character modifier - Dr. Kwack + code:0795/00 + cheat + description:Character modifier - Mr. Frogg + code:0795/01 + cheat + description:Character modifier - Dr. Zordirz + code:0795/02 + +cartridge sha256:9112f5b30c8a8d0dbd967973e84357860b5f0cf37ab3511b39128b5d37fa86ff + name:Xevious - The Avenger (USA) + cheat + description:Invincibility + code:fdc4/a5/85 + cheat + description:Infinite lives + code:f73a/a5 + cheat + description:Hit anywere + code:dd13/13/00+dd21/05/00+eb8e/bd/60 + cheat + description:Start with 1 life + code:fc21/01 + cheat + description:Start with 6 lives + code:fc21/06 + cheat + description:Start with 9 lives + code:fc21/09 + +cartridge sha256:2508e4eada73f233b2df86af2248a370b2d40ec2de590c8886a8750ddfb5b79c + name:Xexyz (USA) + cheat + description:Immune to enemy bullets + code:c774/e5/e9 + cheat + description:Immune to monsters + code:c674/e5/e9 + cheat + description:Infinite lives + code:a40e/ce/ad + cheat + description:Become a whirlwind on new life + code:a418/8d/ee + cheat + description:1 life after continue + code:a53b/03/01 + cheat + description:Start with 1 life + code:a236/03/01 + cheat + description:Start with 6 lives + code:a236/03/06 + cheat + description:Start with 9 lives + code:a236/03/09 + cheat + description:Start with and keep foot-wing + code:b711/08/00 + +cartridge sha256:1f349392d49c60c3e52a06be6ab4d914bf71ffd5b73857964ec9d604806b131b + name:Xybots (USA) (Proto) (Unl) + cheat + description:Infinite lives and second shots + code:f385/de/bd + cheat + description:Infinite Keys - both players + code:9004/de/ad + cheat + description:Infinite money - both players + code:8986/9d/bd + cheat + description:Infinite Slow Energy Drain and Zap power + code:e96b/9d/ad + cheat + description:Infinite Warning Arrows and Level Mappers + code:b6bb/9d/ad + cheat + description:Infinite Enemy Mappers and Guard Mapper + code:e950/99/b9 + cheat + description:Start with 6 lives and 6 second shots + code:e15c/12/66 + cheat + description:Start with 3 Slow Energy Drain and 4 Zap power - P1 + code:e152/02/24 + cheat + description:Start with 3 Slow Energy Drain and 4 Zap power - P2 + code:e157/12/24 + cheat + description:Start with 6 Warning Arrows and Level Mappers + code:e164/21/66 + cheat + description:Start with 6 Enemy Mappers and have Guard Mapper + code:e16c/01/16 + cheat + description:Start with 99 Keys, $99 and 2,544,300 points + code:e4ac/00/63 + cheat + description:Start with 4 extra Speed, extra Armor, extra Shot Speed, extra Shot Power and Wide Shot + code:e130/00/44 + cheat + description:Start at last level + code:e176/01/36 + cheat + description:Infinite health - P1 + code:0192/ff + cheat + description:Infinite health - P2 + code:0193/ff + cheat + description:Infinite Keys - P1 + code:0196/09 + cheat + description:Infinite Keys - P2 + code:0197/09 + cheat + description:Infinite Money - P1 + code:0194/ff + cheat + description:Infinite Money - P2 + code:0195/ff + +cartridge sha256:0624c93899a588232f9193db0d560291b15636727813a4cd6c3dab8b7f74badb + name:Yie Ar Kung-Fu (Japan) (Rev 1.4) + cheat + description:Infinite health + code:dd93/e6/b5 + cheat + description:Infinite health (alt) + code:00db/00 + cheat + description:One hit kills + code:de21/25/00 + cheat + description:Hit anywhere + code:dc49/d0/f0+dc39/d0/f0 + +cartridge sha256:dbe10104fc90c36ff7c95424cb192dfd9619fb7c1238bbae8da87e0bc9cc5a4e + name:Yie Ar Kung-Fu (Japan) (Rev 1.2) + cheat + description:Invincible against punches and kicks + code:dd32/85/a5 + cheat + description:Tao does not throw fireballs + code:e6fb/85/a5 + cheat + description:Chen does not hit you with his chain + code:e8f5/85/a5 + cheat + description:Lang does not throw shurikens + code:e668/c0/a9 + cheat + description:Bonus doesn't end when you're hit with a sword or fan + code:de99/a9/60 + cheat + description:Infinite health + code:00db/00 + +cartridge sha256:62a3551ce546fa7df5fd4970e725e36f1ca269be62b1e33f92546d6e649b8371 + name:Yo! Noid (USA) + cheat + description:Invincibility + code:baad/60 + cheat + description:Invincibility (alt) + code:b631/20/ad + cheat + description:Infinite time + code:b4a5/c6/a5 + cheat + description:Infinite lives + code:e3c6/ce/ad+e3c9/ce/ad + cheat + description:More magic from small scrolls + code:bc4e/01/05 + cheat + description:Multi-mega-jumps + code:ccb5/2e/00 + cheat + description:1 continue + code:da2f/03/01 + cheat + description:6 continues + code:da2f/03/06 + cheat + description:Start with 1 life + code:d9b6/32/30+d9b9/42/40 + cheat + description:Start with 6 lives + code:d9b6/32/35+d9b9/42/45 + cheat + description:Start with 9 lives + code:d9b6/32/39+d9b9/42/49 + cheat + description:Start on stage 2 + code:d9ec/01/02 + cheat + description:Start on stage 4 + code:d9ec/01/04 + cheat + description:Start on stage 6 + code:d9ec/01/06 + cheat + description:Start on stage 8 + code:d9ec/01/08 + cheat + description:Start on stage 10 + code:d9ec/01/0a + cheat + description:Start on stage 12 + code:d9ec/01/0c + +cartridge sha256:56a169bb3a6101057fb278f2febd58cb1dbf056e5aaeb709c51a55ce4cfac20d + name:Yoshi (USA) + cheat + description:Short wait for next characters + code:f0b1/28/14 + cheat + description:Really short wait for next characters + code:f0b1/28/02 + cheat + description:Really long wait for next characters + code:f0b1/28/ff + cheat + description:Freeze characters for a short time (press Down) + code:b7db/02/60 + cheat + description:Need only 1 Victory Egg to win + code:8160/03/01+e2d0/03/01+e3a2/03/01 + cheat + description:Need only 2 Victory Eggs to win + code:8160/03/02+e2d0/03/02+e3a2/03/02 + +cartridge sha256:fd4884c98d9412eb362c0654c8f5475e7f24266984f11e19961495c2d642d38a + name:Young Indiana Jones Chronicles, The (USA) + cheat + description:Infinite health + code:81dc/85/ea + cheat + description:Infinite lives + code:9c0b/c6/a5 + cheat + description:Start with 2 lives + code:dcce/03/01 + cheat + description:Start with 7 lives + code:dcce/03/06 + cheat + description:Start with 10 lives + code:dcce/03/09 + +cartridge sha256:c79202082042baeb3a45e747a1675c9530137f847c357c393270715efc32217e + name:Ys II - Ancient Ys Vanished - The Final Chapter (Japan) + cheat + description:Infinite HP + code:ed9a/85/a5 + cheat + description:Infinite gold + code:852b/85/a5+8532/85/a5 + cheat + description:Lots of EXP + code:dd9f/09/08+dda5/0a/08 + cheat + description:Start with all equipment + code:dd4c/01/7f + +cartridge sha256:ec1d85479d72847d3adbd76e2e79221143e6c9324d5647be2c4a11aa87123f75 + name:Ys III - Wanderers from Ys (Japan) + cheat + description:Hit anywhere + code:a84d/60/ea+a87b/60/ea+a864/60/ea+a892/60/ea + cheat + description:One hit kills + code:a707/04/00 + +cartridge sha256:91d281ee84a71483cd9b8e8021222ef509a8c0ea4be0a4fa675140a91b65c2da + name:Yume Koujou Doki Doki Panic (Japan) [b] (FDS) + cheat + description:Multi-jump + code:863d/d0/24 + cheat + description:Invincibility + code:0085/fa + cheat + description:Infinite coins + code:062b/09 + cheat + description:Infinite sub-space time + code:04b7/fa + cheat + description:Infinite magic carpet time + code:00b9/fa + cheat + description:All characters can float + code:04c9/fa + cheat + description:Multi-jump (alt) + code:0099/00 + cheat + description:One hit kills on bosses + code:0468/00 + cheat + description:Only 1 Cherry needed for Starman + code:062a/04 + cheat + description:Only 1 big Radish needed for Stopwatch + code:062c/04 + cheat + description:Receive small heart for every enemy defeated + code:04ad/09 + cheat + description:Stopwatch always active + code:04ff/fa + cheat + description:Start on World 2 + code:0635/01 + cheat + description:Start on World 3 + code:0635/02 + cheat + description:Start on World 4 + code:0635/03 + cheat + description:Start on World 5 + code:0635/04 + cheat + description:Start on World 6 + code:0635/05 + cheat + description:Start on World 7 + code:0635/06 + +cartridge sha256:bdc9dfed1b03db470a1453da0252b3e9fcd0869d02a48622476ddaa350e53374 + name:Zanac (USA) + cheat + description:Invincibility + Hit anywhere + code:825c/b0/38+825d/31/60+821b/99/ad + cheat + description:Infinite lives + code:8f8f/c6/a9 + cheat + description:Start with Straight Crusher + code:9490/00/01 + cheat + description:Start with Field Shutter + code:9490/00/02 + cheat + description:Start with the Circular + code:9490/00/03 + cheat + description:Start with the Vibrator + code:9490/00/04 + cheat + description:Start with the Rewinder + code:9490/00/05 + cheat + description:Start with the Plasma Flash + code:9490/00/06 + cheat + description:Start with rapid fire + code:9490/00/07 + cheat + description:Start with 1 life + code:cb89/03/01 + cheat + description:Start with 6 lives + code:cb89/03/06 + cheat + description:Start with 9 lives + code:cb89/03/09 + cheat + description:Invincibility + code:0764/00 + +cartridge sha256:4cfc55e1521e58039d502f2a5ff16c233b84c0a05b1048185c75c971f3814c16 + name:Zelda II - The Adventure of Link (USA) + cheat + description:Infinite health + code:e335/e5/ea+e336/0c/ea + cheat + description:Almost infinite health + code:e330/e2 + cheat + description:Infinite magic + code:8df0/f9/2c + cheat + description:Infinite magic (alt) + code:8df5/8d/ad + cheat + description:Infinite magic and health in battle + code:d3f8/08 + cheat + description:Infinite lives + code:ca44/ce/ad + cheat + description:Infinite Keys after obtaining one + code:d9e4/ce/ad + cheat + description:Keys not necessary to open doors + code:d9e3/ea+d9e2/e2 + cheat + description:Gain over 2048 EXP when you defeat an enemy most of the time + code:d465/00/08 + cheat + description:Gain 256 EXP when you defeat an enemy most of the time + code:d45e/8d/ea + cheat + description:Gain more than 256 EXP for every EXP + code:d465/00/01 + cheat + description:Don't lose EXP points while leveling up + code:9f6b/8d/ad+9f74/8d/ad + cheat + description:All sword levels do massive damage + code:e732/f9/ed + cheat + description:Hit anywhere (press up if you get stuck at a Palace entrance) + code:e6a4/b0/50 + cheat + description:Multi-jump + code:9530/f7/f5+9535/ad/a9+9536/7d/fb+9537/05/8d+9538/10/7d+9539/02/05 + cheat + description:Mega-jump + code:953b/30/20 + cheat + description:Link can fly (hold A) + code:953b/30/00 + cheat + description:Faster text (when talking to people) + code:b6be/df/00 + cheat + description:Walk through walls in Overworld + code:871e/02/00 + cheat + description:Swap Shield spell for Fire spell + code:8e48/8d/f1+8e49/8e/97 + cheat + description:Swap Shield spell for Spell spell + code:8e48/8d/73+8e49/8e/8e + cheat + description:Swap Shield spell for Fairy spell + code:8e48/8d/23+8e49/8e/91 + cheat + description:Swap Shield spell for Life spell + code:8e48/8d/5d+8e49/8e/8e + cheat + description:Swap Shield spell for Thunder spell + code:8e48/8d/e6+8e49/8e/91 + cheat + description:Start with all spells + code:a60d/bd/de + cheat + description:Start with 1 life + code:c359/03/01 + cheat + description:Start with 6 lives + code:c359/03/06 + cheat + description:Start with 9 lives + code:c359/03/09 + cheat + description:Invincibility (disable when fighting your shadow) + code:0518/03 + cheat + description:Infinite health (alt) + code:0774/ff + cheat + description:Infinite magic (alt 2) + code:0773/ff + cheat + description:Infinite lives (alt) + code:0700/04 + cheat + description:Infinite Keys + code:0793/09 + cheat + description:No enemies in overworld + code:0086/00+0087/00+0088/00+0089/00 + cheat + description:Jump spell always on + code:076f/02 + cheat + description:Max sword level + code:0777/ff + cheat + description:Max magic level + code:0778/ff + cheat + description:Max life level + code:0779/ff + cheat + description:Have up/down thrust + code:0796/ff + cheat + description:Have Shield spell + code:077b/01 + cheat + description:Have Jump spell + code:077c/01 + cheat + description:Have Life spell + code:077d/01 + cheat + description:Have Fairy spell + code:077e/01 + cheat + description:Have Fire spell + code:077f/01 + cheat + description:Have Reflect spell + code:0780/01 + cheat + description:Have Spell spell + code:0781/01 + cheat + description:Have Thunder spell + code:0782/01 + cheat + description:Max magic jars + code:0783/08 + cheat + description:Have Boots + code:0788/01 + cheat + description:Have Candle + code:0785/01 + cheat + description:Have Cross + code:078a/01 + cheat + description:Have Flute + code:0789/01 + cheat + description:Have Glove + code:0786/01 + cheat + description:Have Hammer + code:078b/01 + cheat + description:Have Key + code:078c/01 + cheat + description:Have Raft + code:0787/01 + cheat + description:Can enter final palace + code:0794/00 + cheat + description:One hit kill on final boss + code:00c2/01 + +cartridge sha256:939dcb88fce04f9c91e1ce49016b12e301afc4861684576ab5862eada5860db7 + name:Zen - Intergalactic Ninja (USA) + cheat + description:Invincibility + code:8849/11/00 + cheat + description:Hit anywhere + code:b281/2f/00+b297/19/00+b2ac/b0/a9 + cheat + description:One hit kills + code:b4c7/02/00 + cheat + description:Infinite health + code:b377/8d/2c + cheat + description:Infinite lives + code:9654/c6/a5+a617/c6/a5 + cheat + description:9 lives allowed in options menu + code:bc07/05/0a + cheat + description:Slower timer + code:ae7e/81/ff + cheat + description:Faster timer + code:ae7e/81/6f + cheat + description:Even faster timer + code:ae7e/81/5f + cheat + description:Zen does increased damage - isometric stages + code:8bb1/04/08 + cheat + description:Zen does mega damage - isometric stages + code:8bb1/04/14 + cheat + description:Jab attack does more damage - horizontal stages + code:ad4b/04/08 + cheat + description:Mega jab attack damage - horizontal stages + code:ad4b/04/14 + cheat + description:Fewer hits in shield + code:b40c/03/01+be2f/03/01 + cheat + description:Double hits in shield + code:b40c/03/06+be2f/03/06 + cheat + description:Triple hits in shield + code:b40c/03/09+be2f/03/09 + +cartridge sha256:d0850075065ecbd125a33accc952de5d012527be45aa14a1b8223a9adf1643ae + name:Zoda's Revenge - StarTropics II (USA) + cheat + description:Invincibility + code:a140/ed/ae + cheat + description:Infinite lives + code:e4c9/ce/ad + cheat + description:Infinite weapons + code:a536/de/bd + cheat + description:Hit anywhere + code:b40d/b9/4c+b40f/70/b4+b40e/b4/8b + cheat + description:Walk faster - battle mode + code:a83c/01/02 + cheat + description:Jump faster and further - battle mode + code:a83c/00/01 + cheat + description:Throw Tink's axe further + code:b0cb/40/60 + cheat + description:1 star gives energy + code:a651/05/01+a655/05/01 + cheat + description:Throw Tink's Axe faster (can't be combined with other Axe code) + code:b038/41/f1 + cheat + description:Tink's Axe splits into 3 little ones when thrown (can't be combined with other Axe code) + code:b038/41/43 + cheat + description:Throw Tink's splitting-Axe faster (can't be combined with other Axe code) + code:b038/f1/f3 + cheat + description:Start with 1 life (Only effective in battle mode on first life) + code:e266/03/01 + cheat + description:Start with 6 lives (Only effective in battle mode on first life) + code:e266/03/06 + cheat + description:Start with 9 lives (Only effective in battle mode on first life) + code:e266/03/09 + +cartridge sha256:a18476a3b06ec3d9767ed6b6cf528dd204440a64e7781a3b18c1250c3c18f2ec + name:Zombie Hunter (Japan) + cheat + description:Invincibility + code:dfaa/13/00 + cheat + description:One hit kills + code:dd8d/60/ea + cheat + description:Hit anywhere + code:dec1/10/00+deba/16/00+decb/b0/a9 + cheat + description:Walk on air, jump to fall down + code:e070/f3/00 + +cartridge sha256:91eae4e0e59dadd5de7cdbe71fe57e304d741ae5107928e29e0f6ff8813151a9 + name:Zombie Nation (USA) + cheat + description:Infinite health + code:eda0/a5/60 + cheat + description:Infinite continues + code:053b/05 + +cartridge sha256:061d1c3865ad62ae883bb30b9f0071e8f7aa572f15f61bfb91b3a755eeeb5eb0 + name:Zunou Senkan Galg (Japan) + cheat + description:Invincibility + code:860d/68/60+cf59/a5/60 + cheat + description:Infinite lives + code:80f8/c6/a9 + +cartridge sha256:8808783f789ca6413364a7abea240f6f7291b5906026f360ba8cfdd2791fc179 + name:2020 Super Baseball (USA) + cheat + description:Have lots of money - P1 + code:7f80ca/63+7f80cc/63+7f80cb/63 + cheat + description:Have 9 points - P1 + code:7fc13b/09 + cheat + description:Have no outs + code:7fc138/00 + cheat + description:Have no strikes + code:7fc136/00 + cheat + description:Have no balls + code:7fc137/00 + +cartridge sha256:2ffe8828480f943056fb1ab5c3c84d48a0bf8cbe3ed7c9960b349b59adb07f3b + name:3 Ninjas Kick Back (USA) + cheat + description:Invincibility + code:82f5c6/f0+809416/d0 + cheat + description:Infinite lives + code:82ee7e/ad + cheat + description:Infinite health + code:7e0a2a/06 + cheat + description:Infinite lives (alt) + code:7e1e51/14 + cheat + description:Infinite time + code:7e1e6b/14 + cheat + description:Infinite Bombs + code:7e1e63/14+7e1e65/14 + cheat + description:Max coins + code:7e1e5b/14+7e1e59/14 + cheat + description:Have throwing weapon + code:7e1e5b/14+7e1e59/14 + cheat + description:Less enemies to pass trials (disable then enable) + code:7e1fe0/02 + +cartridge sha256:4dd631433c867ba920997fd3add2c838b62e70e06e0ef55c53884b8b68b0dd27 + name:7th Saga, The (USA) + cheat + description:Enemies aren't generated + code:c01780/6b + cheat + description:Touching an enemy doesn't cause a battle + code:c01f36/6b + cheat + description:Sell an item for maximum gold + code:c0b139/80 + cheat + description:Walk anywhere + code:c41d90/00 + cheat + description:Human fighter has 50 HP + code:c0623f/32 + cheat + description:Human fighter has 100 HP + code:c0623f/64 + cheat + description:Human fighter has 200 HP + code:c0623f/c8 + cheat + description:Tetujin has 50 HP + code:c06287/32 + cheat + description:Tetujin has 100 HP + code:c06287/64 + cheat + description:Tetujin has 200 HP + code:c06287/c8 + cheat + description:Dwarf has 50 HP + code:c06251/32 + cheat + description:Dwarf has 100 HP + code:c06251/64 + cheat + description:Dwarf has 200 HP + code:c06251/c8 + cheat + description:Human mage has 50 HP + code:c06299/32 + cheat + description:Human mage has 100 HP + code:c06299/64 + cheat + description:Human mage has 200 HP + code:c06299/c8 + cheat + description:Elf has 50 HP + code:c06263/32 + cheat + description:Elf has 100 HP + code:c06263/64 + cheat + description:Elf has 200 HP + code:c06263/c8 + cheat + description:Demon has 50 HP + code:c062ab/32 + cheat + description:Demon has 100 HP + code:c062ab/64 + cheat + description:Demon has 200 HP + code:c062ab/c8 + cheat + description:Alien has 50 HP + code:c06275/32 + cheat + description:Alien has 100 HP + code:c06275/64 + cheat + description:Alien has 200 HP + code:c06275/c8 + cheat + description:Human fighter has 20 power + code:c06243/14 + cheat + description:Tetujin has 20 power + code:c0628b/14 + cheat + description:Dwarf has 20 power + code:c06255/14 + cheat + description:Human mage has 20 power + code:c0629d/14 + cheat + description:Elf has 20 power + code:c06267/14 + cheat + description:Demon has 20 power + code:c062af/14 + cheat + description:Alien has 20 power + code:c06279/14 + cheat + description:Human fighter has 30 MP + code:c06241/1e + cheat + description:Tetujin has 30 MP + code:c06289/1e + cheat + description:Dwarf has 30 MP + code:c06253/1e + cheat + description:Human mage has 30 MP + code:c0629b/1e + cheat + description:Elf has 30 MP + code:c06265/1e + cheat + description:Demon has 30 MP + code:c062ad/1e + cheat + description:Alien has 30 MP + code:c06277/1e + cheat + description:Human fighter has 20 speed + code:c06246/14 + cheat + description:Tetujin has 20 speed + code:c0628e/14 + cheat + description:Dwarf has 20 speed + code:c06258/14 + cheat + description:Human mage has 20 speed + code:c062a0/14 + cheat + description:Elf has 20 speed + code:c0626a/14 + cheat + description:Demon has 20 speed + code:c062b2/14 + cheat + description:Alien has 20 speed + code:c0627c/14 + cheat + description:Get 999 Max HP when you use a 'V Seed' + code:c4a066/00 + cheat + description:Get 999 Max MP when you use an 'M Seed' + code:c4a0d7/00 + cheat + description:Get 999 Power when you use a 'P Seed' + code:c4a148/00 + cheat + description:Get 999 Guard when you use a 'Pr Seed' + code:c4a1b9/00 + cheat + description:Get 255 Magic when you use an 'I Seed' + code:c4a226/00 + cheat + description:Get 255 Speed when you use an 'A Seed' + code:c4a292/00 + cheat + description:Human fighter starts with Sword of Anger + code:c0624d/69 + cheat + description:Human fighter starts with Sword of Courage + code:c0624d/6c + cheat + description:Human fighter starts with Sword of Fire + code:c0624d/6f + cheat + description:Dwarf starts with Sword of Nature + code:c0625f/6a + cheat + description:Dwarf starts with Sword of Courage + code:c0625f/6c + cheat + description:Dwarf starts with Sword of Fire + code:c0625f/6f + cheat + description:Human mage starts with petrified staff + code:c062a7/8e + cheat + description:Human mage starts with Rod of Tide + code:c062a7/8f + cheat + description:Elf starts with petrified staff + code:c06271/8e + cheat + description:Elf starts with Staff of Brilliance + code:c06271/91 + cheat + description:Demon starts with Sword of Anger + code:c062b9/69 + cheat + description:Demon starts with Sword of Despair + code:c062b9/6d + cheat + description:Demon starts with Sword of Fire + code:c062b9/6f + cheat + description:Start with 297 gold + code:c0920b/2c+c0920c/01 + cheat + description:Start with 62,708 gold + code:c0920b/f4+c0920c/01 + cheat + description:Start with 2000 gold + code:c0920b/d0+c0920c/07 + +cartridge sha256:69c5805ad0494703e7d636d3d40d615d33e79bebef9d2cdb4a23b73d44c7b6f9 + name:A.S.P. - Air Strike Patrol (USA) + cheat + description:No damage from enemy fire + code:81dac1/ad+81e220/a7 + cheat + description:Infinite fuel + code:819f6e/ad + cheat + description:Infinite flares + code:81ea37/ad + cheat + description:Infinite missles for F-15 Strike Eagle + code:8194b3/ad + cheat + description:Infinite missles for A-10 Thunderbolt II + code:819638/ad + +cartridge sha256:ce164872c4f5814bce04cf0565edcdb5b7969ae95a3b5cd515cfb626b5cde7b3 + name:Aaahh!!! Real Monsters (USA) + cheat + description:Invincibility + code:009dfe/8d + cheat + description:Infinite health + code:00bddb/ad + cheat + description:Infinite Fish + code:00bcf2/ad + cheat + description:Infinite Books + code:00c9c5/bd + cheat + description:Infinite Garbage + code:80bcf0/00 + cheat + description:Infinite Scares + code:80c9ca/00 + cheat + description:Infinite lives + code:80a744/00 + cheat + description:Get nothing for each Trash Bag + code:00a5b7/00 + cheat + description:Get 20 for each Trash Bag + code:00a5b7/20 + cheat + description:Get 100 for each Trash Bag + code:00a5b7/bb + cheat + description:1-ups worth nothing + code:00a2f6/00 + cheat + description:1-ups worth 3 + code:00a2f6/03 + cheat + description:1-ups worth 5 + code:00a2f6/05 + cheat + description:Monster books are worth nothing + code:00a3c5/00 + cheat + description:Monster books are worth 2 + code:00a3c5/02 + cheat + description:Monster books are worth 10 + code:00a3c5/10 + cheat + description:Most health power-ups worth nothing + code:00a39c/00 + cheat + description:Most health power-ups worth more + code:00a39c/02 + cheat + description:Start with 1 life + code:86a93c/01 + cheat + description:Start with 10 lives + code:86a93c/09 + cheat + description:Start with 50 lives + code:86a93c/49 + cheat + description:Start with 0 special scares + code:84875e/00 + cheat + description:Start with 10 special scares + code:84875e/10 + cheat + description:Start with 20 special scares + code:84875e/20 + cheat + description:Infinite health (alt) + code:7e0b7a/0d + cheat + description:Infinite lives (alt) + code:7e13c8/09 + +cartridge sha256:bb83f982961c33b81fefc1f545e18ab572d1c43cf6c241948544f05a1a71f2ba + name:ABC Monday Night Football (USA) + cheat + description:Always 1st down + code:7e119c/01 + cheat + description:1 yard to go for 1st down + code:7e119d/01 + cheat + description:Infinite time - minutes + code:7e11a6/09 + cheat + description:Infinite time - seconds + code:7e11a6/09 + cheat + description:Cannot be tackled (hold X) - diving tackles + code:01e7da/43+01e7d9/a5+01e7db/0a+01e7dc/10 + cheat + description:Cannot be tackled (hold X) - normal tackles + code:01e3d9/44+01e3dc/23+01e3db/30+01e3d8/a5+01e3da/0a + cheat + description:Have 0 points - Team 1 + code:7e1182/00 + cheat + description:Have 0 points - Team 2 + code:7e118c/00 + cheat + description:Have 7 points - Team 1 + code:7e1182/07 + cheat + description:Have 7 points - Team 2 + code:7e118c/07 + cheat + description:Have 14 points - Team 1 + code:7e1182/14 + cheat + description:Have 14 points - Team 2 + code:7e118c/14 + cheat + description:Have 21 points - Team 1 + code:7e1182/21 + cheat + description:Have 21 points - Team 2 + code:7e118c/21 + cheat + description:Have 99 points - Team 1 + code:7e1182/99 + cheat + description:Have 99 points - Team 2 + code:7e118c/99 + +cartridge sha256:d07e8802a6d9c777247874e05ec08fce7e0fa1bf122cc1ab9913f7d828e4072b + name:ACME Animation Factory (USA) + cheat + description:Infinite time - game mode + code:7e1ba4/3c + +cartridge sha256:555ff99acb1b02e67ae7da12b776cdbfa9a56b8ddf248258158ec58a151554ef + name:Acrobat Mission (Japan) + cheat + description:Invincibility + code:02a3de/ea + cheat + description:Infinite lives + code:02a6d8/bd + cheat + description:Invincibility (alt) + code:7e042a/30 + cheat + description:Infinite lives (alt) + code:7e0412/04 + cheat + description:Infinite lives (alt 2) + code:7e0412/0b + cheat + description:Most Powerful gun [00-10] (don't pick any weapon icons) + code:7e0424/00 + cheat + description:Score Modifier [00-99] + code:7e02b3/00+7e02b4/00 + +cartridge sha256:41af71166f509b0e615b00e7dc3cf2dc660d1701014ecadfd1629257b18471b9 + name:Action Pachio (Japan) + cheat + description:Invincibility + code:898546/f0 + cheat + description:Infinite health + code:908390/a5 + cheat + description:Infinite time + code:87dad4/a5 + cheat + description:Infinite lives + code:8780e1/a5 + cheat + description:Infinite health (alt) + code:7e00cc/0a + cheat + description:Infinite lives (alt) + code:7e00c8/09 + cheat + description:Infinite Coins + code:7e00c2/99 + cheat + description:Infinite time (alt) + code:7e00c0/63+7e00c1/63 + cheat + description:Infinite continue time + code:7e1e12/09 + cheat + description:Max score + code:7e00c4/99+7e00c5/99+7e00c6/99+7e00c7/99 + cheat + description:Enable round select + code:88dc1a/80 + +cartridge sha256:b8055844825653210d252d29a2229f9a3e7e512004e83940620173c57d8723f0 + name:ActRaiser (USA) + cheat + description:Invincibility after one hit + code:009c98/60 + cheat + description:Infinite health in action sequences + code:008a24/dd + cheat + description:Infinite MP (Magic Points) + code:009e0a/a5 + cheat + description:Infinite SP (Spell Points) + code:03ca73/af + cheat + description:Infinite time + code:02bc9a/a5 + cheat + description:Infinite time (alt) + code:02bc98/00 + cheat + description:Faster timer + code:02bc8b/10 + cheat + description:Slower timer + code:02bc8b/50 + cheat + description:Hit anywhere continually + code:008ad6/24+008ae1/24+008ae6/24+008aba/80+008ac8/80 + cheat + description:Monster lairs are always empty + code:03b99c/9e + cheat + description:Towns always able to grow + code:03854f/00 + cheat + description:Unlock professional mode + code:00803f/00 + cheat + description:Unlock action mode (press start at title screen) + code:008041/00 + cheat + description:Have Fire magic and 24 MP in professional mode + code:02ab26/85+02ab2c/8d+02ab2a/a9+02ab2b/01 + cheat + description:Have Stardust and 24 MP in professional mode + code:02ab26/85+02ab2c/8d+02ab2a/a9+02ab2b/02 + cheat + description:Have Aura magic and 24 MP in professional mode + code:02ab26/85+02ab2c/8d+02ab2a/a9+02ab2b/03 + cheat + description:Start with 1/2 health (first game only) + code:02be60/04 + cheat + description:Infinite health in action sequences (alt) + code:7e001d/08 + cheat + description:Infinite health in sim mode + code:7e0286/08 + cheat + description:Infinite magic in action sequences + code:7e0021/05 + cheat + description:Infinite time (alt 2) + code:02bc98/00 + cheat + description:Level 99 + code:7e0291/63 + cheat + description:One hit kills on bosses + code:7e0bcc/00 + cheat + description:Have Aura magic + code:7e02ac/03 + cheat + description:Have Fire magic + code:7e02ac/01 + cheat + description:Have Stardust magic + code:7e02ac/02 + cheat + description:Have Sword Shot + code:7e00e4/80 + cheat + description:Have Light magic + code:7e02ac/04 + cheat + description:Slot 1 - Source of Life + code:7e02a2/05 + cheat + description:Slot 1 - Source of Magic + code:7e02a2/06 + cheat + description:Slot 1 - Loaf of Bread + code:7e02a2/07 + cheat + description:Slot 1 - Wheat + code:7e02a2/08 + cheat + description:Slot 1 - Herb + code:7e02a2/09 + cheat + description:Slot 1 - Bridge + code:7e02a2/0a + cheat + description:Slot 1 - Harmonious Music + code:7e02a2/0b + cheat + description:Slot 1 - Ancient Tablet + code:7e02a2/0c + cheat + description:Slot 1 - Magic Skull + code:7e02a2/0e + cheat + description:Slot 1 - Sheep's Fleece + code:7e02a2/0f + cheat + description:Slot 1 - Bomb + code:7e02a2/10 + cheat + description:Slot 1 - Compass + code:7e02a2/13 + cheat + description:Slot 1 - Strength of Angel + code:7e02a2/14 + cheat + description:Slot 2 - Source of Life + code:7e02a3/05 + cheat + description:Slot 2 - Source of Magic + code:7e02a3/06 + cheat + description:Slot 2 - Loaf of Bread + code:7e02a3/07 + cheat + description:Slot 2 - Wheat + code:7e02a3/08 + cheat + description:Slot 2 - Herb + code:7e02a3/09 + cheat + description:Slot 2 - Bridge + code:7e02a3/0a + cheat + description:Slot 2 - Harmonious Music + code:7e02a3/0b + cheat + description:Slot 2 - Ancient Tablet + code:7e02a3/0c + cheat + description:Slot 2 - Magic Skull + code:7e02a3/0e + cheat + description:Slot 2 - Sheep's Fleece + code:7e02a3/0f + cheat + description:Slot 2 - Bomb + code:7e02a3/10 + cheat + description:Slot 2 - Compass + code:7e02a3/13 + cheat + description:Slot 2 - Strength of Angel + code:7e02a3/14 + cheat + description:Slot 3 - Source of Life + code:7e02a4/05 + cheat + description:Slot 3 - Source of Magic + code:7e02a4/06 + cheat + description:Slot 3 - Loaf of Bread + code:7e02a4/07 + cheat + description:Slot 3 - Wheat + code:7e02a4/08 + cheat + description:Slot 3 - Herb + code:7e02a4/09 + cheat + description:Slot 3 - Bridge + code:7e02a4/0a + cheat + description:Slot 3 - Harmonious Music + code:7e02a4/0b + cheat + description:Slot 3 - Ancient Tablet + code:7e02a4/0c + cheat + description:Slot 3 - Magic Skull + code:7e02a4/0e + cheat + description:Slot 3 - Sheep's Fleece + code:7e02a4/0f + cheat + description:Slot 3 - Bomb + code:7e02a4/10 + cheat + description:Slot 3 - Compass + code:7e02a4/13 + cheat + description:Slot 3 - Strength of Angel + code:7e02a4/14 + cheat + description:Slot 4 - Source of Life + code:7e02a5/05 + cheat + description:Slot 4 - Source of Magic + code:7e02a5/06 + cheat + description:Slot 4 - Loaf of Bread + code:7e02a5/07 + cheat + description:Slot 4 - Wheat + code:7e02a5/08 + cheat + description:Slot 4 - Herb + code:7e02a5/09 + cheat + description:Slot 4 - Bridge + code:7e02a5/0a + cheat + description:Slot 4 - Harmonious Music + code:7e02a5/0b + cheat + description:Slot 4 - Ancient Tablet + code:7e02a5/0c + cheat + description:Slot 4 - Magic Skull + code:7e02a5/0e + cheat + description:Slot 4 - Sheep's Fleece + code:7e02a5/0f + cheat + description:Slot 4 - Bomb + code:7e02a5/10 + cheat + description:Slot 4 - Compass + code:7e02a5/13 + cheat + description:Slot 4 - Strength of Angel + code:7e02a5/14 + cheat + description:Slot 5 - Source of Life + code:7e02a6/05 + cheat + description:Slot 5 - Source of Magic + code:7e02a6/06 + cheat + description:Slot 5 - Loaf of Bread + code:7e02a6/07 + cheat + description:Slot 5 - Wheat + code:7e02a6/08 + cheat + description:Slot 5 - Herb + code:7e02a6/09 + cheat + description:Slot 5 - Bridge + code:7e02a6/0a + cheat + description:Slot 5 - Harmonious Music + code:7e02a6/0b + cheat + description:Slot 5 - Ancient Tablet + code:7e02a6/0c + cheat + description:Slot 5 - Magic Skull + code:7e02a6/0e + cheat + description:Slot 5 - Sheep's Fleece + code:7e02a6/0f + cheat + description:Slot 5 - Bomb + code:7e02a6/10 + cheat + description:Slot 5 - Compass + code:7e02a6/13 + cheat + description:Slot 5 - Strength of Angel + code:7e02a6/14 + cheat + description:Slot 6 - Source of Life + code:7e02a7/05 + cheat + description:Slot 6 - Source of Magic + code:7e02a7/06 + cheat + description:Slot 6 - Loaf of Bread + code:7e02a7/07 + cheat + description:Slot 6 - Wheat + code:7e02a7/08 + cheat + description:Slot 6 - Herb + code:7e02a7/09 + cheat + description:Slot 6 - Bridge + code:7e02a7/0a + cheat + description:Slot 6 - Harmonious Music + code:7e02a7/0b + cheat + description:Slot 6 - Ancient Tablet + code:7e02a7/0c + cheat + description:Slot 6 - Magic Skull + code:7e02a7/0e + cheat + description:Slot 6 - Sheep's Fleece + code:7e02a7/0f + cheat + description:Slot 6 - Bomb + code:7e02a7/10 + cheat + description:Slot 6 - Compass + code:7e02a7/13 + cheat + description:Slot 6 - Strength of Angel + code:7e02a7/14 + cheat + description:Slot 7 - Source of Life + code:7e02a8/05 + cheat + description:Slot 7 - Source of Magic + code:7e02a8/06 + cheat + description:Slot 7 - Loaf of Bread + code:7e02a8/07 + cheat + description:Slot 7 - Wheat + code:7e02a8/08 + cheat + description:Slot 7 - Herb + code:7e02a8/09 + cheat + description:Slot 7 - Bridge + code:7e02a8/0a + cheat + description:Slot 7 - Harmonious Music + code:7e02a8/0b + cheat + description:Slot 7 - Ancient Tablet + code:7e02a8/0c + cheat + description:Slot 7 - Magic Skull + code:7e02a8/0e + cheat + description:Slot 7 - Sheep's Fleece + code:7e02a8/0f + cheat + description:Slot 7 - Bomb + code:7e02a8/10 + cheat + description:Slot 7 - Compass + code:7e02a8/13 + cheat + description:Slot 7 - Strength of Angel + code:7e02a8/14 + cheat + description:Slot 8 - Source of Life + code:7e02a9/05 + cheat + description:Slot 8 - Source of Magic + code:7e02a9/06 + cheat + description:Slot 8 - Loaf of Bread + code:7e02a9/07 + cheat + description:Slot 8 - Wheat + code:7e02a9/08 + cheat + description:Slot 8 - Herb + code:7e02a9/09 + cheat + description:Slot 8 - Bridge + code:7e02a9/0a + cheat + description:Slot 8 - Harmonious Music + code:7e02a9/0b + cheat + description:Slot 8 - Ancient Tablet + code:7e02a9/0c + cheat + description:Slot 8 - Magic Skull + code:7e02a9/0e + cheat + description:Slot 8 - Sheep's Fleece + code:7e02a9/0f + cheat + description:Slot 8 - Bomb + code:7e02a9/10 + cheat + description:Slot 8 - Compass + code:7e02a9/13 + cheat + description:Slot 8 - Strength of Angel + code:7e02a9/14 + +cartridge sha256:71bdd448a30b88725864e55594ebb67a118b1f197a3f9e5dd39dbf23399efa15 + name:ActRaiser 2 (USA) + cheat + description:Infinite health from most enemies + code:809e45/ad + cheat + description:Infinite health from some ground hazards + code:839adc/ad + cheat + description:Infinite time + code:80e4ee/00 + cheat + description:Infinite MP (must have one to cast) + code:828e77/ea + cheat + description:Infinite lives + code:828c3a/00 + cheat + description:Hit anywhere + code:80997f/24+80998b/24+80999c/24+8099a3/24 + cheat + description:One hit kills + code:809aee/00 + cheat + description:Small magic power-up adds 3 instead of 1 + code:80af4f/03 + cheat + description:Small magic power-up adds 5 + code:80af4f/05 + cheat + description:Small magic power-up adds 9 + code:80af4f/09 + cheat + description:Large magic power-up adds 1 instead of 3 + code:80af59/01 + cheat + description:Large magic power-up adds 5 + code:80af59/05 + cheat + description:Large magic power-up adds 9 + code:80af59/09 + cheat + description:Small health power-ups add 1 instead of 2 + code:80af32/01 + cheat + description:Small health power-ups add 4 + code:80af32/04 + cheat + description:Small health power-ups add 15 + code:80af32/15 + cheat + description:Small health power-ups heal completely + code:80af32/14 + cheat + description:Medium health power-ups add 2 instead of 5 + code:80af54/02 + cheat + description:Medium health power-ups add 8 + code:80af54/08 + cheat + description:Medium health power-ups add 15 + code:80af54/15 + cheat + description:Medium health power-ups heal completely + code:80af54/14 + cheat + description:Large health power-ups add 2 instead of 10 + code:80af37/02 + cheat + description:Large health power-ups add 5 + code:80af37/04 + cheat + description:Large health power-ups add 15 + code:80af37/15 + cheat + description:Large health power-ups heal completely + code:80af37/14 + cheat + description:Start with 3 lives on Easy + code:81d830/03 + cheat + description:Start with 10 lives on Easy + code:81d830/10 + cheat + description:Start with 50 lives on Easy + code:81d830/50 + cheat + description:Start with 1 life on Normal + code:81d832/01 + cheat + description:Start with 5 lives on Normal + code:81d832/05 + cheat + description:Start with 10 lives on Normal + code:81d832/10 + cheat + description:Start with 50 lives on Normal + code:81d832/50 + cheat + description:Start with 1 life on Hard + code:81d834/01 + cheat + description:Start with 5 lives on Hard + code:81d834/05 + cheat + description:Start with 10 lives on Hard + code:81d834/10 + cheat + description:Start with 50 lives on Hard + code:81d834/50 + cheat + description:Start with 2 MP on Easy + code:82b126/02 + cheat + description:Start with 7 MP on Easy + code:82b126/07 + cheat + description:Start with 9 MP on Easy + code:82b126/09 + cheat + description:Start with 1 MP on Normal or Hard + code:82b11e/01 + cheat + description:Start with 5 MP on Normal or Hard + code:82b11e/05 + cheat + description:Start with 7 MP on Normal or Hard + code:82b11e/07 + cheat + description:Start with 9 MP on Normal or Hard + code:82b11e/09 + cheat + description:Start with 1/2 health + code:82b115/0a + cheat + description:Start with 3/4 health + code:82b115/0f + cheat + description:Invincibility (blinking) + code:7f205e/18 + cheat + description:Infinite health (alt) + code:7e091d/16 + cheat + description:Infinite time (alt) (disable at end of level) + code:7e094d/63 + +cartridge sha256:e645310d2406ace85523ed91070ee7ff6aa245217267dacb158ae9fc75109692 + name:Addams Family, The (USA) + cheat + description:Invincibility + code:00c23d/d0 + cheat + description:Infinite health + code:00cf3a/ea + cheat + description:Infinite health (alt) + code:00cf3b/60 + cheat + description:Infinite health (alt 2) + code:00cf3b/a5 + cheat + description:Infinite lives + code:00cf6b/00 + cheat + description:Infinite lives (alt) + code:00cf6c/a5 + cheat + description:Double-jump + code:00bd37/00 + cheat + description:Each $ worth 5 + code:00a413/05 + cheat + description:Each $ worth 10 + code:00a413/10 + cheat + description:Each $ worth 25 + code:00a413/25 + cheat + description:Have Fezi-copter + code:00c2a4/80 + cheat + description:Start with and keep Fezi-copter (disable after defeating a boss, land before password screen) + code:00c30a/ea+009acd/84 + cheat + description:Start with 1 heart + code:008165/01+008166/01 + cheat + description:Start with 3 hearts + code:008165/03+008166/03 + cheat + description:Start with 4 hearts + code:008165/04+008166/04 + cheat + description:Start with 5 hearts + code:008165/05+008166/05 + cheat + description:Start with 1 life + code:009ab5/01 + cheat + description:Start with 3 lives + code:009ab5/03 + cheat + description:Start with 9 lives + code:009ab5/09 + cheat + description:Start with 20 lives + code:009ab5/20 + cheat + description:Start with 50 lives + code:009ab5/50 + cheat + description:Start with 99 lives + code:009ab5/99 + cheat + description:Infinite health and max hearts + code:7e00c3/05 + cheat + description:Always throw Balls + code:7e00ef/01 + cheat + description:Have Fezi-copter (alt) + code:7e0064/ff + cheat + description:Have Foil (Sword) + code:7e00ee/01 + +cartridge sha256:b6957bae7fd97ba681afbf8962fe2138e209649fd88ed9add2d5233178680aaa + name:Addams Family, The - Pugsley's Scavenger Hunt (USA) + cheat + description:Infinite health + code:80a0aa/ea + cheat + description:Infinite hearts + code:80a0aa/ea + cheat + description:Infinite lives + code:809d87/00 + cheat + description:Each $ worth 5 + code:80a05e/05 + cheat + description:Each $ worth 25 + code:80a05e/25 + cheat + description:Higher jump + code:80cb7c/e9+80cb7d/05 + cheat + description:Super-jump + code:80cb7c/e9+80cb7d/07 + cheat + description:Mega-jump + code:80cb7c/e9+80cb7d/09 + cheat + description:Longer invulnerability time after being hit + code:80a0b0/7f + cheat + description:Shorter invulnerability time after being hit + code:80a0b0/08 + cheat + description:Get 0 lives for each $100 and 1-Up + code:809e4e/00 + cheat + description:Get 2 lives for each $100 and 1-Up + code:809e4e/02 + cheat + description:Start with 1 heart (don't edit hearts in options menu) + code:00f00e/00 + cheat + description:Start with 2 hearts (don't edit hearts in options menu) + code:00f00e/01 + cheat + description:Start with 5 hearts (don't edit hearts in options menu) + code:00f00e/04 + cheat + description:Start with 4 lives (don't edit lives in options menu) + code:00f009/00 + cheat + description:Start with 16 lives (don't edit lives in options menu) + code:00f009/09 + cheat + description:Start with 64 lives (don't edit lives in options menu) + code:00f009/30 + cheat + description:Infinite health (alt) + code:7e0095/03 + cheat + description:Infinite lives (alt) + code:7e004d/09 + cheat + description:Infinite Cash + code:7e004e/99 + +cartridge sha256:f59a0a8ed11ea2ba6217b1640e74bab8d8d8161a4585f5ae4a02edd7958ad9a3 + name:Addams Family Values (USA) (En,Fr,De) + cheat + description:Infinite health against enemies + code:809e0e/11 + cheat + description:Infinite health against everything + code:80b219/ea + cheat + description:Infinite Small Rocks + code:80d721/00 + cheat + description:Infinite Blue Marbles + code:80d6af/00 + cheat + description:Infinite Magic Seeds + code:80d6d5/00 + cheat + description:Infinite Swamp Slime + code:80d6fb/00 + cheat + description:Infinite cookies + code:80d1c2/bf + cheat + description:Start with full skull meter + code:8083d5/1c + cheat + description:Start with all items + code:b083a5/ff + cheat + description:Have Amulet of True Sight + code:7ee9fc/ff + cheat + description:Have Big Book of Bisquits + code:7ee9f0/ff + cheat + description:Have Black Beetle Cookies + code:7ee9e0/ff+7ee9e4/ff + cheat + description:Have Black Egg + code:7eea05/ff + cheat + description:Have Black Rose + code:7ee9fa/ff + cheat + description:Have Bone Spoon + code:7ee9f7/ff + cheat + description:Have Book of Flying + code:7ee9f9/ff + cheat + description:Have Candle + code:7ee9f6/ff + cheat + description:Have Clyde's Cookie Compendium + code:7ee9ef/ff + cheat + description:Have Crumble Cookies + code:7ee9e2/ff+7ee9e6/ff + cheat + description:Have Crusty Cookies + code:7ee9e1/ff+7ee9e5/ff + cheat + description:Have Dragon Belch Cookies + code:7ee9df/ff+7ee9e3/ff + cheat + description:Have Firefly + code:7eea03/ff + cheat + description:Have Gold Coin + code:7eea06/ff + cheat + description:Have Green Key + code:7ee9d8/ff + cheat + description:Have Greenhouse Key + code:7ee9d7/ff + cheat + description:Have Headless Teddy + code:7ee9f4/ff + cheat + description:Have Iron Key + code:7ee9de/ff + cheat + description:Have Jewelled Key + code:7ee9db/ff + cheat + description:Have Journal + code:7ee9f2/ff + cheat + description:Have Large Vine + code:7eea02/ff + cheat + description:Have Lurch's Bowling Ball + code:7eea04/ff + cheat + description:Have Magnet + code:7ee9ff/ff + cheat + description:Have Max's Munch Manual + code:7ee9f1/ff + cheat + description:Have Money + code:7e004e/63 + cheat + description:Have Musical Box + code:7ee9fb/ff + cheat + description:Have Plant Food + code:7ee9ea/ff + cheat + description:Have Portal Potion + code:7ee9e8/ff + cheat + description:Have Pumpkin + code:7ee9f3/ff + cheat + description:Have Red Potion + code:7ee9e7/ff + cheat + description:Have Sack of Gold + code:7ee9f5/ff + cheat + description:Have Slimming Potion + code:7ee9e9/ff + cheat + description:Have Shockwave + code:7ee9fd/ff + cheat + description:Have Skull Rattle + code:7ee9f8/ff + cheat + description:Have Skull Key + code:7ee9d9/ff + cheat + description:Have Spider Key + code:7ee9dd/ff + cheat + description:Have Spider's Eye + code:7ee9fe/ff + cheat + description:Have Stone Button + code:7eea01/ff + cheat + description:Have Stone Key + code:7ee9dc/ff + cheat + description:Have Stone Twig Key + code:7ee9da/ff + cheat + description:Have Strange Black Cube + code:7eea00/ff + +cartridge sha256:0a8cd5101f849ccd4e40d55fdc4edce914b2825b69eb76ec31cf53b59719e79e + name:Advanced Dungeons & Dragons - Eye of the Beholder (USA) + cheat + description:Infinite HP + code:06ba73/bd+7e05f9/bd + cheat + description:No waiting to hit again + code:06bf0d/bd + cheat + description:One hit kills (works for enemies also) + code:06c3cf/a9+06c3d1/ea + cheat + description:Pick a lawful, human male fighter and he will be at Level 8 + code:0cbb98/08 + cheat + description:Pick a lawful, human male fighter and he will be at level 6 + code:0cbb98/06 + cheat + description:999,999 EXP 1st class + code:7e0533/3f+7e0534/42+7e0535/0f + +cartridge sha256:8083307f3f4b7df9e5bf53d5f25877c2e548f0f677540d4ee62d60ccca3098f8 + name:Adventures of Batman & Robin, The (USA) + cheat + description:Invincibility (except after being grabbed) + code:80a133/d0 + cheat + description:Infinite health + code:80b0d5/a5 + cheat + description:Infinite health (alt) + code:80b0c2/00 + cheat + description:Get full health from hearts + code:848899/28 + cheat + description:Infinite Stars + code:80c76b/a5 + cheat + description:Infinite Spray Gun ammo + code:80c778/a5 + cheat + description:Infinite Plastic Explosives + code:80c792/a5 + cheat + description:Infinite Smoke Bombs + code:80c785/a5 + cheat + description:Infinite Missiles + code:80c76b/00 + cheat + description:Infinite Bombs + code:80c792/00 + cheat + description:Infinite lives + code:80b3b9/a5 + cheat + description:Hit anywhere + code:8793b9/a5+879406/a5+87939a/00+80a48b/00+8793e7/00+83f451/00 + cheat + description:Moon-jump + code:80c518/20 + cheat + description:Super-jump + code:80a738/f8 + cheat + description:Move slower + code:81be0e/00+81be10/ff + cheat + description:Move faster + code:81be0e/04+81be10/fb + cheat + description:Move even faster + code:81be0e/07+81be10/f8 + cheat + description:Moon-walk + code:81be0e/fe+81be10/01 + cheat + description:Moon-walk faster + code:81be0e/fb+81be10/04 + cheat + description:Moon-walk even faster + code:81be0e/f8+81be10/f7 + cheat + description:No credits + code:89b481/00 + cheat + description:Don't start with any Explosives and Smoke Bomb ammo + code:8097f5/00 + cheat + description:Don't start with any Stars and Spray Gun ammo + code:8097ee/00 + cheat + description:Start with 25 Stars and Spray Gun ammo + code:8097ee/19 + cheat + description:Start with 50 Stars and Spray Gun ammo + code:8097ee/33 + cheat + description:Start with 25 Explosives and Smoke Bomb ammo + code:8097f5/19 + cheat + description:Start with 50 Explosives and Smoke Bomb ammo + code:8097f5/33 + cheat + description:Start with 9 lives - not on easy mode + code:89b486/09 + cheat + description:Start with 6 lives - not on easy mode + code:89b486/06 + cheat + description:Start with 1 life - not on easy mode + code:89b486/00 + cheat + description:Start with 9 credits + code:89b481/09 + cheat + description:Start with 6 credits + code:89b481/06 + cheat + description:Infinite health (alt 2) + code:7e0098/28 + cheat + description:Infinite item #3 + code:7e00a0/09 + cheat + description:Infinite item #4 + code:7e00a2/09 + cheat + description:Infinite item #5 + code:7e00a4/09 + cheat + description:Infinite item #6 + code:7e00a6/09 + +cartridge sha256:ecd964ae44e61203bc8759cfc6441365bf0c6e7bae6ad2a0fd553d4c7efab71e + name:Adventures of Dr. Franken, The (USA) + cheat + description:Invincibility + code:809e90/ea + cheat + description:Health power-ups give a full health bar + code:80c949/0e+80c97a/8d + cheat + description:Infinite health (glitchy) + code:809495/ad+809498/ad + cheat + description:Infinite time + code:80da4f/ad + cheat + description:Infinite lives + code:80925b/ad + cheat + description:Infinite Power Balls + code:80957b/ea + cheat + description:Infinite Freeze + code:809595/ea + cheat + description:Infinite Fire + code:809591/ea + cheat + description:Infinite Lightning + code:809577/ea + +cartridge sha256:670d898bdcf97d7ca3aab6c2dd1641f1270fcc2a070bbd3028ab413aef2b2ecc + name:Adventures of Kid Kleets, The (USA) (En,Fr,Es) + cheat + description:Invincibility + code:81c18b/60 + cheat + description:Infinite time + code:8187cd/ad + cheat + description:Infinite health + code:81c18d/ad + cheat + description:Infinite lives + code:81bbdb/ad + cheat + description:Hit anywhere + code:83c04e/00+83c056/00 + cheat + description:Moon jump + code:81b5b1/7a+81b5b3/30+81b5ef/00 + +cartridge sha256:b70099186d3774355ac5db370240e370c73f9ce5341f6c805cf9f771374b43ae + name:Adventures of Rocky and Bullwinkle and Friends, The (USA) + cheat + description:Invincibility + code:9ca9c7/d0+9ca9cd/f0 + cheat + description:Infinite chances + code:88b9a4/ad + cheat + description:Infinite lives + code:81aaf6/ad + cheat + description:Infinite ammo + code:81aa15/ad + cheat + description:Infinite health + code:9ca312/ad + cheat + description:Infinite continues + code:8af0ee/ad + cheat + description:Don't lose ammo when you die + code:9ca35f/ad + cheat + description:Don't lose collected flags when you die + code:9ca23a/ad + cheat + description:1-Up with every flag collected + code:81a9ce/01 + +cartridge sha256:8049175767eddbc3e21ca5b94ee23fc225f834ccfab4ded30d2e981b0ef73ab6 + name:Adventures of Yogi Bear (USA) + cheat + description:Infinite health + code:80a909/ad + cheat + description:Infinite lives + code:80805c/ad + +cartridge sha256:b737de81315eef8ded7cfd5df6b37aba01d9e6e14566486db7ec83eb0c1aa85e + name:Aero Fighters (USA) + cheat + description:Invincibility + code:80a8d2/bd + cheat + description:Infinite lives - both players + code:81d35f/bd + cheat + description:Infinite Bombs for American F-18 - P1 + code:81e83f/bd + cheat + description:Infinite Bombs for Japanese FSX - P1 + code:81e43f/bd + cheat + description:Infinite Bombs for Swedish AJ-37 - P1 + code:81e531/bd + cheat + description:Infinite Bombs for British AV-8 - P1 + code:81e53f/bd + cheat + description:Infinite Bombs for American F-15 - P2 + code:81e3f2/bd + cheat + description:Infinite Bombs for Japanese F-15 - P2 + code:81e4c1/bd + cheat + description:Infinite Bombs for Swedish JAS-39 - P2 + code:81e554/bd + cheat + description:Infinite Bombs for British IDS - P2 + code:81e60e/bd + cheat + description:Don't lose power-ups when you die - both players + code:81d35c/bd + cheat + description:Hit anywhere + one hit kills + code:80a1c8/24+80a1cf/24+80a1d4/24+80a1d8/24+80a1dc/24+80a175/80+80a193/80 + cheat + description:One hit kills + code:80a193/80 + cheat + description:Infinite lives (alt) + code:7fb78c/02 + cheat + description:Max Cannon power + code:7fb794/03 + cheat + description:Infinite Bombs / Specials + code:7fb790/02 + +cartridge sha256:18a553dafd4980cc2869180b05f9fdf6e980bf092cc683e498ec6373c9701c6e + name:Aero the Acro-Bat (USA) + cheat + description:Infinite health from most enemies + code:82fb00/ea + cheat + description:Start with more health + code:83d831/6c + cheat + description:Infinite time + code:83f1aa/00 + cheat + description:Infinite lives + code:80879f/00 + cheat + description:Start with 19 lives + code:8080b4/70 + cheat + description:Infinite continues + code:848bff/ad + cheat + description:Each star platform is worth 4 + code:80e22f/04 + +cartridge sha256:fc5df5db0a96d39d3df651f63993adf0f5cb5a6b92a36211f3a05d460d92c72d + name:Aero the Acro-Bat 2 (USA) + cheat + description:Invincibility + code:809042/d0 + cheat + description:Infinite health + code:83be37/cd + cheat + description:Almost infinite health + code:83be37/ad + cheat + description:Infinite lives + code:8084a1/ad + cheat + description:Infinite Stars + code:83dc30/ad + cheat + description:Infinite Shots + code:83dc2e/00 + cheat + description:Stars worth 3 + code:83a9bc/03 + cheat + description:Stars worth 5 + code:83a9bc/05 + cheat + description:Stars worth 7 + code:83a9bc/07 + cheat + description:Double Drill icon lasts 99 seconds + code:83aada/99 + cheat + description:Double Drill icon lets you drill 4 times instead of 2 + code:83aad1/04 + cheat + description:Double Drill icon lets you drill 9 times instead of 2 + code:83aad1/09 + cheat + description:Can drill 5 times in the air until you pick-up a drill icon + code:85e880/05 + cheat + description:Can drill 9 times in the air until you pick-up a drill icon + code:85e880/09 + cheat + description:Drill as many times as you want without hitting the ground + code:8388f5/ad + cheat + description:Move faster + code:8382b3/02+8382c1/fd + cheat + description:Move even faster + code:8382b3/03+8382c1/fc + cheat + description:Jump higher + code:838730/10 + cheat + description:Super-jump when standing still + code:8384f6/f8+83866e/f8 + cheat + description:Flying icon worth 99 seconds of flight time + code:83abe2/99 + cheat + description:Start each life with max health + code:85e958/05 + +cartridge sha256:d5f0fbeed3774bbccbd769698fc4051487a0a5eb699790a8a094451595600f60 + name:Aerobiz (USA) + cheat + description:In scenario 1, Tokyo starts with $649,280,000 + code:04c180/00 + cheat + description:In scenario 1, Tokyo starts with $7,202,880,000 + code:04c180/05 + cheat + description:In scenario 1, Beijing starts with $420,160,000 + code:04c183/52 + cheat + description:In scenario 1, Beijing starts with $7,393,600,000 + code:04c184/05 + cheat + description:In scenario 1, Hong Kong starts with $449,440,000 + code:04c187/57 + cheat + description:In scenario 1, Hong Kong starts with $7,453,600,000 + code:04c188/05 + cheat + description:In scenario 1, Singapore starts with $400,640,000 + code:04c18b/4e + cheat + description:In scenario 1, Singapore starts with $7,353,600,000 + code:04c18c/05 + cheat + description:In scenario 1, Sydney starts with $297,920,000 + code:04c18f/3a + cheat + description:In scenario 1, Sydney starts with $7,153,600,000 + code:04c190/05 + cheat + description:In scenario 1, Delhi starts with $317,440,000 + code:04c193/3e + cheat + description:In scenario 1, Delhi starts with $7,193,600,000 + code:04c194/05 + cheat + description:In scenario 1, Tehran starts with $239,360,000 + code:04c197/2e + cheat + description:In scenario 1, Tehran starts with $7,033,600,000 + code:04c198/05 + cheat + description:In scenario 1, Cairo starts with $249,120,000 + code:04c19b/30 + cheat + description:In scenario 1, Cairo starts with $7,053,600,000 + code:04c19c/05 + cheat + description:In scenario 1, Nairobi starts with $200,320,000 + code:04c19f/27 + cheat + description:In scenario 1, Nairobi starts with $6,953,600,000 + code:04c1a0/05 + cheat + description:In scenario 1, Lagos starts with $229,600,000 + code:04c1a3/2c + cheat + description:In scenario 1, Lagos starts with $7,013,600,000 + code:04c1a4/05 + cheat + description:In scenario 1, Moscow starts with $289,280,000 + code:04c1a8/00 + cheat + description:In scenario 1, Moscow starts with $6,842,880,000 + code:04c1a8/05 + cheat + description:In scenario 1, London starts with $949,280,000 + code:04c1ac/00 + cheat + description:In scenario 1, London starts with $7,502,880,000 + code:04c1ac/05 + cheat + description:In scenario 1, Paris starts with $289,280,000 + code:04c1b0/00 + cheat + description:In scenario 1, Paris starts with $6,842,880,000 + code:04c1b0/05 + cheat + description:In scenario 1, Rome starts with $371,360,000 + code:04c1b3/48 + cheat + description:In scenario 1, Rome starts with $7,293,600,000 + code:04c1b4/05 + cheat + description:In scenario 1, New York starts with $189,280,000 + code:04c1b8/00 + cheat + description:In scenario 1, New York starts with $6,742,880,000 + code:04c1b8/05 + cheat + description:In scenario 1, Vancouver starts with $258,880,000 + code:04c1bb/32 + cheat + description:In scenario 1, Vancouver starts with $7,073,600,000 + code:04c1bc/05 + cheat + description:In scenario 1, Los Angeles starts with $649,280,000 + code:04c1c0/00 + cheat + description:In scenario 1, Los Angeles starts with $7,202,880,000 + code:04c1c0/05 + cheat + description:In scenario 1, Honolulu starts with $268,640,000 + code:04c1c3/34 + cheat + description:In scenario 1, Honolulu starts with $7,093,600,000 + code:04c1c4/05 + cheat + description:In scenario 1, Mexico City starts with $258,880,000 + code:04c1c7/32 + cheat + description:In scenario 1, Mexico City starts with $7,073,600,000 + code:04c1c8/05 + cheat + description:In scenario 1, Lima starts with $180,800,000 + code:04c1cb/23 + cheat + description:In scenario 1, Lima starts with $6,913,600,000 + code:04c1cc/05 + cheat + description:In scenario 1, Rio de Janeiro starts with $317,440,000 + code:04c1cf/3e + cheat + description:In scenario 1, Rio de Janeiro starts with $7,193,600,000 + code:04c1d0/05 + cheat + description:In scenario 1, Buenos Aires starts with $210,080,000 + code:04c1d3/29 + cheat + description:In scenario 1, Buenos Aires starts with $6,973,600,000 + code:04c1d4/05 + cheat + description:In scenario 2, Tokyo starts with $1,149,280,000 + code:04c1d8/00 + cheat + description:In scenario 2, Tokyo starts with $7,702,880,000 + code:04c1d8/05 + cheat + description:In scenario 2, Beijing starts with $498,240,000 + code:04c1db/61 + cheat + description:In scenario 2, Beijing starts with $7,553,600,000 + code:04c1dc/05 + cheat + description:In scenario 2, Hong Kong starts with $649,760,000 + code:04c1df/7e + cheat + description:In scenario 2, Hong Kong starts with $7,853,600,000 + code:04c1e0/05 + cheat + description:In scenario 2, Singapore starts with $552,160,000 + code:04c1e3/6b + cheat + description:In scenario 2, Singapore starts with $7,653,600,000 + code:04c1e4/05 + cheat + description:In scenario 2, Sydney starts with $581,440,000 + code:04c1e7/71 + cheat + description:In scenario 2, Sydney starts with $7,713,600,000 + code:04c1e8/05 + cheat + description:In scenario 2, Delhi starts with $517,760,000 + code:04c1eb/65 + cheat + description:In scenario 2, Delhi starts with $7,593,600,000 + code:04c1ec/05 + cheat + description:In scenario 2, Tehran starts with $297,920,000 + code:04c1ef/3a + cheat + description:In scenario 2, Tehran starts with $7,153,600,000 + code:04c1f0/05 + cheat + description:In scenario 2, Cairo starts with $390,880,000 + code:04c1f3/4c + cheat + description:In scenario 2, Cairo starts with $7,333,600,000 + code:04c1f4/05 + cheat + description:In scenario 2, Nairobi starts with $249,120,000 + code:04c1f7/30 + cheat + description:In scenario 2, Nairobi starts with $7,053,600,000 + code:04c1f8/05 + cheat + description:In scenario 2, Lagos starts with $299,040,000 + code:04c1fb/3a + cheat + description:In scenario 2, Lagos starts with $7,149,600,000 + code:04c1fc/05 + cheat + description:In scenario 2, Moscow starts with $689,280,000 + code:04c200/00 + cheat + description:In scenario 2, Moscow starts with $7,242,880,000 + code:04c200/05 + cheat + description:In scenario 2, London starts with $38,560,000 + code:04c204/00 + cheat + description:In scenario 2, London starts with $6,592,160,000 + code:04c204/05 + cheat + description:In scenario 2, Paris starts with $909,280,000 + code:04c208/00 + cheat + description:In scenario 2, Paris starts with $7,462,880,000 + code:04c208/05 + cheat + description:In scenario 2, Rome starts with $571,680,000 + code:04c20b/6f + cheat + description:In scenario 2, Rome starts with $7,693,600,000 + code:04c20c/05 + cheat + description:In scenario 2, New York starts with $829,280,000 + code:04c210/00 + cheat + description:In scenario 2, New York starts with $7,382,880,000 + code:04c210/05 + cheat + description:In scenario 2, Vancouver starts with $420,160,000 + code:04c213/52 + cheat + description:In scenario 2, Vancouver starts with $7,393,600,000 + code:04c214/05 + cheat + description:In scenario 2, Los Angeles starts with $1,109,280,000 + code:04c218/00 + cheat + description:In scenario 2, Los Angeles starts with $7,662,880,000 + code:04c218/05 + cheat + description:In scenario 2, Honolulu starts with $381,120,000 + code:04c21b/4a + cheat + description:In scenario 2, Honolulu starts with $7,313,600,000 + code:04c21c/05 + cheat + description:In scenario 2, Mexico City starts with $468,960,000 + code:04c21f/5b + cheat + description:In scenario 2, Mexico City starts with $7,493,600,000 + code:04c220/05 + cheat + description:In scenario 2, Lima starts with $258,880,000 + code:04c223/32 + cheat + description:In scenario 2, Lima starts with $7,073,600,000 + code:04c224/05 + cheat + description:In scenario 2, Rio de Janeiro starts with $630,240,000 + code:04c227/7b + cheat + description:In scenario 2, Rio de Janeiro starts with $7,813,600,000 + code:04c228/05 + cheat + description:In scenario 2, Buenos Aires starts with $361,600,000 + code:04c22b/46 + cheat + description:In scenario 2, Buenos Aires starts with $7,273,600,000 + code:04c22c/05 + cheat + description:Key Code + code:03f8ea/90 + cheat + description:Set money to less than $655,350,000 (must have Key) - P1, saved game 1 + code:70001c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P1, saved game 1 + code:70001c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P1, saved game 1 + code:70001c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P1, saved game 1 + code:70001c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P1, saved game 1 + code:70001c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P1, saved game 1 + code:70001c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P2, saved game 1 + code:70005c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P2, saved game 1 + code:70005c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P2, saved game 1 + code:70005c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P2, saved game 1 + code:70005c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P2, saved game 1 + code:70005c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P2, saved game 1 + code:70005c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P3, saved game 1 + code:70009c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P3, saved game 1 + code:70009c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P3, saved game 1 + code:70009c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P3, saved game 1 + code:70009c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P3, saved game 1 + code:70009c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P3, saved game 1 + code:70009c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P4, saved game 1 + code:7000dc/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P4, saved game 1 + code:7000dc/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P4, saved game 1 + code:7000dc/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P4, saved game 1 + code:7000dc/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P4, saved game 1 + code:7000dc/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P4, saved game 1 + code:7000dc/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P1, saved game 2 + code:70101c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P1, saved game 2 + code:70101c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P1, saved game 2 + code:70101c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P1, saved game 2 + code:70101c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P1, saved game 2 + code:70101c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P1, saved game 2 + code:70101c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P2, saved game 2 + code:70105c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P2, saved game 2 + code:70105c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P2, saved game 2 + code:70105c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P2, saved game 2 + code:70105c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P2, saved game 2 + code:70105c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P2, saved game 2 + code:70105c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P3, saved game 2 + code:70109c/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P3, saved game 2 + code:70109c/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P3, saved game 2 + code:70109c/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P3, saved game 2 + code:70109c/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P3, saved game 2 + code:70109c/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P3, saved game 2 + code:70109c/40 + cheat + description:Set money to less than $655,350,000 (must have Key) - P4, saved game 2 + code:7010dc/00 + cheat + description:Set money to over $327,680,000 (must have Key) - P4, saved game 2 + code:7010dc/05 + cheat + description:Set money to over $5,242,880,000 (must have Key) - P4, saved game 2 + code:7010dc/08 + cheat + description:Set money to over $10,485,760,000 (must have Key) - P4, saved game 2 + code:7010dc/10 + cheat + description:Set money to over $20,971,520,000 (must have Key) - P4, saved game 2 + code:7010dc/20 + cheat + description:Set money to over $41,943,040,000 (must have Key) - P4, saved game 2 + code:7010dc/40 + +cartridge sha256:1f5738552c51de25ffe8aa44ff396c1ab238435296f1e8f99f8cf335483c03d5 + name:Air Cavalry (USA) + cheat + description:Infinite lives + code:00fbb2/e0 + cheat + description:Infinite 7.62mm rounds + code:009c3f/bd + cheat + description:Infinite 2.75 rockets + code:00f86c/b5+00f880/b5+009c75/bd + +cartridge sha256:aa768b8b00123717c8d49f2c6731cdbfd80ab6a54128bae7594e93f45e38a19e + name:Aladdin (USA) + cheat + description:Invincibility + code:81e8c1/d0 + cheat + description:Almost invincible + code:838031/ad + cheat + description:Infinite health + code:838031/cd + cheat + description:Infinite lives + code:81dc67/cd+81dc67/ad + cheat + description:Infinite Apples + code:81ce5c/ad+81ce5b/ea + cheat + description:Infinite continues + code:80b3ec/ad + cheat + description:Level select on main menu + code:809f7a/00+809fc7/00 + cheat + description:Emeralds worth 2 instead of 1 + code:83bc4b/1c + cheat + description:Emeralds worth 3 + code:83bc4b/19 + cheat + description:Rubies worth 1 instead of 3 + code:83bc65/ce + cheat + description:Rubies worth 2 + code:83bc65/ad + cheat + description:Bonus round played after every level + code:81cc30/00 + cheat + description:Only 10 gems needed for health increase/free life + code:83bc86/10 + cheat + description:Only 20 gems needed for health increase/free life + code:83bc86/20 + cheat + description:Only 30 gems needed for health increase/free life + code:83bc86/30 + cheat + description:Only 40 gems needed for health increase/free life + code:83bc86/40 + cheat + description:Only 50 gems needed for health increase/free life + code:83bc86/50 + cheat + description:Only 60 gems needed for health increase/free life + code:83bc86/60 + cheat + description:Only 90 gems needed for health increase/free life + code:83bc86/90 + cheat + description:Apple power-ups worth 20 instead of 10 + code:83b890/20 + cheat + description:Apple power-ups worth 50 + code:83b890/50 + cheat + description:Apple power-ups worth 90 + code:83b890/90 + cheat + description:Start with 5 Apples + code:818136/05 + cheat + description:Start with 20 Apples + code:818136/20 + cheat + description:Start with 2 health + code:81812b/02 + cheat + description:Start with 5 health + code:81812b/05 + cheat + description:Start with 7 health + code:81812b/07 + cheat + description:Start with 1 life + code:818120/01 + cheat + description:Start with 5 lives + code:818120/05 + cheat + description:Start with 20 lives + code:818120/14 + cheat + description:Start with 1 continue + code:809fb5/01 + cheat + description:Start with 5 continues + code:809fb5/05 + cheat + description:Start with 9 continues + code:809fb5/0a + cheat + description:Invincibility (alt) + code:7e0347/04 + cheat + description:Infinite Apples (alt) + code:7e0369/99 + cheat + description:Moon-jump + code:7e08fb/16 + +cartridge sha256:e637b8241d55ee334a3452888df5e30d72c520dbb55c498db1a984438bab3e55 + name:Alien 3 (USA) + cheat + description:Invincibility + code:818154/00 + cheat + description:Infinite energy + code:818122/80 + cheat + description:Take less damage + code:818122/02 + cheat + description:Most attacks do no damage + code:818122/00 + cheat + description:Longer invulnerability after being hit + code:818291/ff + cheat + description:Slower fuel consumption for flame thrower + code:80db8c/ff + cheat + description:Faster fuel consumption for flame thrower + code:80db8c/30 + cheat + description:Infinite oil for flame thrower + code:80db7d/ea + cheat + description:Infinite flame thrower + code:81d9cc/ad + cheat + description:Infinite machine-gun + code:80d8b9/b9 + cheat + description:Infinite missiles + code:80dbd3/b9 + cheat + description:Infinite ammo for pulse rifle + code:80d8b8/ea + cheat + description:Infinite ammo for grenade launcher + code:80dbd2/ea + cheat + description:Less ammo in rifle clips (works with extra clips only, not the ones you start with) + code:80d8cb/32 + cheat + description:More ammo in rifle clips (works with extra clips only, not the ones you start with) + code:80d8cb/a0 + cheat + description:Less ammo in grenade clips (works with extra clips only, not the ones you start with) + code:80dbe2/05 + cheat + description:More ammo in grenade clips (works with extra clips only, not the ones you start with) + code:80dbe2/14 + cheat + description:Maximum energy from medi-kits + code:81810d/00 + cheat + description:Less energy from medi-kits + code:818103/03 + cheat + description:Start with more rifle clips + code:81e888/10 + cheat + description:Start with even more rifle clips + code:81e888/20 + cheat + description:Start with fewer rifle clips + code:81e888/04 + cheat + description:Start with more grenade clips + code:81e895/10 + cheat + description:Start with even more grenade clips + code:81e895/20 + cheat + description:Start with fewer grenade clips + code:81e895/04 + cheat + description:Mission 1 completed + code:7e0fde/ff + cheat + description:Mission 2 completed + code:7e0ff0/ff + cheat + description:Mission 3 completed + code:7e0ff2/ff + cheat + description:Mission 4 completed + code:7e0ff4/ff + cheat + description:Mission 5 completed + code:7e0ff6/ff + cheat + description:Mission 6 completed + code:7e0ff8/ff + cheat + description:Mission 7 completed + code:7e0ffa/ff + cheat + description:Mission 8 completed + code:7e0ffc/ff + +cartridge sha256:05eb897d7696555790591c431c9d55a43ff9a1c12162443c17c5fcddfa5eb3c5 + name:Alien vs Predator (USA) + cheat + description:Invincibility + code:00e197/60+00dcd8/80 + cheat + description:Infinite health + code:00e1b4/ad+00e180/ad + cheat + description:No damage taken from punches + code:00e180/ad + cheat + description:No damage taken from jumping attacks, tail attacks, rushes + code:00e1b4/ad + cheat + description:Infinite lives + code:00b38d/ad + cheat + description:Infinite lives (alt) + code:00b38d/00 + cheat + description:Infinite continues + code:02fecc/ea + cheat + description:One hit kills + code:00df07/80+00e238/80+019fbe/80+00e452/80 + cheat + description:Hit anywhere + code:00de94/24+00dd91/06+00dd02/06+00e3c8/06 + cheat + description:Disc power-ups give 1 disc instead of 6 (handicap) + code:00b6eb/01 + cheat + description:Disc power-ups give 3 discs + code:00b6eb/03 + cheat + description:Disc power-ups give 10 discs + code:00b6eb/0a + cheat + description:Disc power-ups give 25 discs + code:00b6eb/19 + cheat + description:Spear power-ups give 1 spear instead of 6 + code:00b6f2/01 + cheat + description:Spear power-ups give 3 spears + code:00b6f2/03 + cheat + description:Spear power-ups give 10 spears + code:00b6f2/0a + cheat + description:Spear power-ups give 25 spears + code:00b6f2/19 + cheat + description:Spear and disc power-ups last until end of level (can't pick up other power-ups) + code:00a9c0/f0 + cheat + description:Rhynth meat doesn't add to your maximum health + code:00b6d4/ad + cheat + description:Rhynth meat adds 1/2 as much to maximum health (handicap) + code:00b6c6/04 + cheat + description:Rhynth meat adds 2x as much to maximum health + code:00b6c6/10 + cheat + description:Rhynth meat adds 4x as much to maximum health + code:00b6c6/20 + cheat + description:Rhynth meat adds nothing to your current health + code:00b6dc/00 + cheat + description:Rhynth meat adds half as much to current health + code:00b6dc/04 + cheat + description:Rhynth meat adds 2x as much to current health + code:00b6dc/10 + cheat + description:Rhynth meat adds 4x as much to current health + code:00b6dc/20 + cheat + description:Ptera meat doesn't heal + code:00b709/ad + cheat + description:Blue bottles don't heal at all + code:00b70f/60 + cheat + description:Blue bottles heal 1/2 of your health instead of 1/4 + code:00b71e/ea + cheat + description:Blue bottles heal completely + code:00b728/00 + cheat + description:Light laser can be fired instantly + code:009f68/01 + cheat + description:Medium laser is fired above 3rd line instead of 2nd + code:009f6d/18 + cheat + description:Medium laser can be fired above 1st line + code:009f70/05 + cheat + description:Medium laser can be fired below 1st line - eliminates light laser + code:009f6b/0a + cheat + description:No damage is taken from using heavy laser + code:009f75/18 + cheat + description:Heavy laser can be fired above 2nd line - eliminates medium laser + code:009f72/01 + cheat + description:Start with full health bar on Standard level + code:009a79/ff+009a7b/ff + cheat + description:Start with full health bar on Novice level + code:009a7d/ff+009a7f/ff + cheat + description:Start with full health bar on Advanced level + code:009a81/ff+009a83/ff + cheat + description:Start with full health bar on Expert level + code:009a85/ff+009a87/ff + cheat + description:Start with up to 9 lives on Options screen (selecting downward from 1 goes to 6) + code:04b311/09 + cheat + description:Start with up to 30 continues on Options screen (selecting downward from 0 goes to 3) + code:04b313/1e + cheat + description:Start on level 1-2 + code:02f3fe/02 + cheat + description:Start on level 2-1 + code:02f3fe/03 + cheat + description:Start on level 3-1 + code:02f3fe/04 + cheat + description:Start on level 4-1 + code:02f3fe/05 + cheat + description:Start on level 5-1 + code:02f3fe/06 + cheat + description:Start on level 5-2 + code:02f3fe/07 + cheat + description:Start on level 5-3 + code:02f3fe/08 + cheat + description:Start on level 6-1 + code:02f3fe/09 + cheat + description:Start on level 6-2 + code:02f3fe/0a + cheat + description:Infinite health (alt) + code:7e1024/64 + +cartridge sha256:5c4e283efc338958b8dd45ebd6daf133a9eb280420a98e2e1df358ae0242c366 + name:Amazing Spider-Man, The - Lethal Foes (Japan) + cheat + description:Infinite health + code:7e0e0c/40 + cheat + description:Infinite lives + code:7e1c23/09 + cheat + description:Infinite time + code:7e1c22/63 + +cartridge sha256:dc9cefb4dd50dce2e9d626ac71d4a06306516cba4bc784c90e4a30fe4e7ff4ef + name:American Gladiators (USA) + cheat + description:Infinite time + code:7e00b2/59 + cheat + description:Always have 9 points - P1 + code:7e0306/09 + cheat + description:Always have 9 points in ball game - P1 + code:7e0304/09 + +cartridge sha256:6931a3eacb7ab3c2f2fb57ba7d59c6da56fe6c7d60484cebec9332e6caca3ae9 + name:American Tail, An - Fievel Goes West (USA) + cheat + description:Invincibility + code:0c840b/d0 + cheat + description:Invincibility (alt) + code:0c8408/a9 + cheat + description:Infinite health + code:0c8442/d0 + cheat + description:Infinite lives + code:00a674/ad + cheat + description:Infinite time + code:00a728/ea + cheat + description:Walk left faster + code:0c8335/fb + cheat + description:Walk right faster + code:0c82f3/04 + cheat + description:Multi-jumps + code:0c8972/00 + +cartridge sha256:626f1fe52b0df0f8ede23f0062cd842321c8dabf14aefdca12e526876ecf383a + name:Animaniacs (USA) + cheat + description:Every coin gives 999 saved slot rotations + code:82abb1/01 + cheat + description:Every second coin gives 99 continues + code:82abff/02 + cheat + description:Every slot machine roll gives 99 continues + code:82abff/05 + cheat + description:Super-jump and float + code:83901c/a9+83901d/08+83901e/01 + cheat + description:Invincibility + code:0cfcc0/90 + cheat + description:99 Coins + code:7f0016/63 + cheat + description:Every coin gives 999 saved slot rotations (alt) + code:82abb1/01 + cheat + description:Every second coin gives 99 continues (alt) + code:82abff/02 + cheat + description:Every slot machine roll gives 99 continues (alt) + code:82abff/05 + cheat + description:Hold up or down against some walls to climb them + code:8390d1/ff + cheat + description:Higher jump + code:839011/ff + cheat + description:Super jump and float (alt) + code:83901c/a9+83901d/08+83901e/01 + cheat + description:Moon-jump (enable to rise slowly, disable to fall back down) + code:7e0415/ff + +cartridge sha256:31569bef662bc438194726967970bf19f504101060763cbd649350362fb6ef2f + name:Arcade's Greatest Hits - The Atari Collection 1 (USA) + cheat + description:Asteroids - Invincibility + code:838feb/60 + cheat + description:Asteroids - Infinite lives - both players + code:838ff2/b5 + cheat + description:Battlezone - Invincibility + code:8594e4/c0+8594e5/00+8594e6/d0+859c11/60 + cheat + description:Battlezone - Infinite lives + code:8594fe/a5 + cheat + description:Centipede - Infinite lives - both players + code:8286dc/bd + cheat + description:Super Breakout - Infinite serves - both players + code:81ca90/ad + cheat + description:Tempest - Infinite lives - both players + code:86c689/bd + +cartridge sha256:aac9d6f2b8408e4bbdc83ebbba755428caf8021fefbfac7220fb4c772abd9944 + name:Arcana (USA) + cheat + description:Infinite money for weapons + code:03d575/ad + cheat + description:Infinite money for items + code:03d5c9/ad + cheat + description:Infinite money for rooms + code:03de59/ad + cheat + description:Infinite money for elixir + code:03df1c/ad + cheat + description:Level and statistics for all characters in group are increased after each battle + code:07b434/9e + cheat + description:Magic points don't decrease + code:07bf97/bd + cheat + description:Start with 60,000 gold pieces + code:018354/60+018355/ea + cheat + description:Start with 250 gold pieces + code:018354/fa+018355/00 + +cartridge sha256:41084f83e269d46b9d589f11c802a15e84fede57d604c7986053f2858f757adc + name:Archer Maclean's Super Dropzone (Europe) + cheat + description:Infinite lives + code:7e0025/04 + cheat + description:Infinite bombs + code:7e0026/04 + +cartridge sha256:0f474dafe5a26f3dea491d18073dd490d2f1f91313a7e91086565510d38d9a09 + name:Ardy Lightfoot (USA) + cheat + description:Invincibility + code:80e01a/d0+80bf19/d0 + cheat + description:Infinite lives + code:8082b5/ad + cheat + description:Get Stars from anywhere + code:85b493/80+85b494/19 + +cartridge sha256:91f8c264f50051c5c9fadd4df09fbb6ca8b5b54a5ba6652ad133ba103b77317d + name:Aretha (Japan) + cheat + description:No random battles + code:0081a6/80 + cheat + description:Walk anywhere + code:00b6b4/80+00b6a6/00 + +cartridge sha256:d31ea0a6f9b3ee78a724ad500f09e5f534cacf57166ff55198fd703ca1ed6f48 + name:Aretha II - Ariel no Fushigi na Tabi (Japan) + cheat + description:No random battles + code:0083d1/80 + cheat + description:Walk anywhere + code:00b815/80+00b807/00 + +cartridge sha256:14d3ece30898587eda20c661a4a55ec595ba6352ca1f0bfc177542aa0eef0039 + name:Arkanoid - Doh It Again (USA) + cheat + description:Infinite lives + code:8099bd/bd + cheat + description:Paddle hits ball anywhere + code:8192fa/80+8192f4/00 + cheat + description:"S" capsule gives you the longest paddle + code:818dd8/03 + cheat + description:"S" capsule gives you the laser paddle + code:818dd8/04 + cheat + description:Force field lasts until end of level + code:819306/ad + cheat + description:Keep current paddle when you get force field + code:818e87/00 + +cartridge sha256:55e57c5e012583ff0fafd1aee16b3f8269ee2b34fe10f10b93ba0dde72f2b78d + name:Art of Fighting (USA) + cheat + description:Invincibility (except projectiles) + code:c0683a/e0+c0683b/00+c0683c/00 + cheat + description:Infinite health + code:c0e5af/a9+c0e5b0/ef+c0e5b1/8d + cheat + description:Infinite time + code:c0e973/ad + cheat + description:Hit anywhere - both players + code:c06820/80 + +cartridge sha256:59f217912f4dbfb3dd0844f46128e71d6ddd522d7e246eb687000adeaa38d13d + name:Ashita no Joe (Japan) + cheat + description:Hit anywhere - P1 + code:00b66b/00 + cheat + description:Hit anywhere - P2 + code:00b3ca/00 + cheat + description:Invincibility - P1 + code:00b2c0/80 + cheat + description:Invincibility - P2 + code:00b564/80 + +cartridge sha256:d54d2703e474d7f469766d2d095ffcbbcab893e3fe58bbbcc57e24082a44bb40 + name:Asterix (Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:0083b3/d0+0083b5/c5 + cheat + description:Infinite health + code:00fa56/bd + cheat + description:Infinite lives + code:00fa41/bd + cheat + description:Infinite health (alt) + code:7e05f0/03 + cheat + description:Infinite lives (alt) + code:7e05fc/09+7e05fd/09 + cheat + description:Infinite time + code:7e05f7/09+7e05f8/09+7e05f9/09 + cheat + description:Infinite coins + code:7e05ee/09+7e05ef/09 + +cartridge sha256:d9127808fb02c47dd74fd22f39582c69f19936a794a8efc153cc0e51a0d4d782 + name:Asterix & Obelix (Europe) (En,Fr,De,Es) + cheat + description:Infinite health + code:7e008c/28 + cheat + description:Infinite lives + code:7e101d/09 + cheat + description:Infinite time + code:7e1076/27 + cheat + description:Always Magic Chicken + code:7e008e/04 + cheat + description:Moon jump (disable to drop back down) + code:7e007d/c0 + +cartridge sha256:2431f8dc067ba27c6c3a846929f3deac6a45aa53a9a9ac20ede8ec5ca6854ea2 + name:Axelay (USA) + cheat + description:Invincibility + code:00bb31/d0 + cheat + description:Infinite lives + code:00c0f6/cd + cheat + description:Infinite lives (alt) + code:00c0f6/ad+00bd18/ad + cheat + description:Infinite credits + code:00a470/ad + cheat + description:Don't lose weapon when hit + code:00bf75/bd+00c2ce/bd + cheat + description:Hit anywhere + code:00e4a1/a5+029c09/a5+00e48d/00+00e495/00 + cheat + description:Start with 1 credit + code:008c8f/03 + cheat + description:Start with 2 credits + code:008c8f/04 + cheat + description:Start with 3 credits + code:008c8f/05 + cheat + description:Start with 4 credits + code:008c8f/06 + cheat + description:Start with 6 credits + code:008c8f/08 + cheat + description:Start with 7 credits + code:008c8f/09 + cheat + description:Start with 8 credits + code:008c8f/0a + cheat + description:Start with 9 credits + code:008c8f/0b + cheat + description:Start with 1 life + code:00db61/01 + cheat + description:Start with 2 lives + code:00db61/02 + cheat + description:Start with 5 lives + code:00db61/05 + cheat + description:Start with 7 lives + code:00db61/07 + cheat + description:Start with 9 lives + code:00db61/09 + cheat + description:Start with 15 lives + code:00db61/0f + cheat + description:Start with 25 lives + code:00db61/19 + cheat + description:Start with 50 lives + code:00db61/32 + cheat + description:Start with 75 lives + code:00db61/4b + cheat + description:Start with 99 lives + code:00db61/63 + cheat + description:Start on Stage 2 + code:009f37/a9+009f38/01+009f39/00 + cheat + description:Start on Stage 3 + code:009f37/a9+009f38/02+009f39/00 + cheat + description:Start on Stage 4 + code:009f37/a9+009f38/03+009f39/00 + cheat + description:Start on Stage 5 + code:009f37/a9+009f38/04+009f39/00 + cheat + description:Start on Stage 6 + code:009f37/a9+009f38/05+009f39/00 + cheat + description:Infinite lives (alt 2) + code:7e005e/02 + cheat + description:Have 1st weapon - Straight Laser + code:7e0330/02 + cheat + description:Have 1st weapon - Round Vulcan + code:7e0330/03 + cheat + description:Have 1st weapon - Wind Laser + code:7e0330/05 + cheat + description:Have 1st weapon - Explosion Bomb + code:7e0330/06 + cheat + description:Have 1st weapon - Macro Missiles + code:7e0330/07 + cheat + description:Have 1st weapon - Cluster Bomb + code:7e0330/09 + cheat + description:Have 1st weapon - Morning Star + code:7e0330/0a + cheat + description:Have 1st weapon - Needle Cracker + code:7e0330/0b + cheat + description:Have 2nd weapon - Straight Laser + code:7e0332/02 + cheat + description:Have 2nd weapon - Round Vulcan + code:7e0332/03 + cheat + description:Have 2nd weapon - Wind Laser + code:7e0332/05 + cheat + description:Have 2nd weapon - Explosion Bomb + code:7e0332/06 + cheat + description:Have 2nd weapon - Macro Missiles + code:7e0332/07 + cheat + description:Have 2nd weapon - Cluster Bomb + code:7e0332/09 + cheat + description:Have 2nd weapon - Morning Star + code:7e0332/0a + cheat + description:Have 2nd weapon - Needle Cracker + code:7e0332/0b + cheat + description:Have 3rd weapon - Straight Laser + code:7e0334/02 + cheat + description:Have 3rd weapon - Round Vulcan + code:7e0334/03 + cheat + description:Have 3rd weapon - Wind Laser + code:7e0334/05 + cheat + description:Have 3rd weapon - Explosion Bomb + code:7e0334/06 + cheat + description:Have 3rd weapon - Macro Missiles + code:7e0334/07 + cheat + description:Have 3rd weapon - Cluster Bomb + code:7e0334/09 + cheat + description:Have 3rd weapon - Morning Star + code:7e0334/0a + cheat + description:Have 3rd weapon - Needle Cracker + code:7e0334/0b + cheat + description:Start a new game to view ending + code:009f67/0c + +cartridge sha256:9e6ebebcf14609c2a38a5f4409d0c8c859949cded70c5b6fd16fd15d9983d9d3 + name:B.O.B. (USA) + cheat + description:Infinite health (P) + code:00d162/ad + cheat + description:Infinite lives + code:0081f5/bd + cheat + description:Infinite lives (alt) + code:0081f5/2c + cheat + description:Infinite time + code:908230/ad + cheat + description:Infinite weapons + code:00eb3d/b9 + cheat + description:Infinite Remotes + code:8daf37/b9 + cheat + description:Infinite Remotes (alt) + code:8daf36/ea + cheat + description:Infinite weapons (except for Flame) + code:00eb3c/ea + cheat + description:Hit anywhere + code:00fad1/00+00fb11/00 + cheat + description:Max weapons on pick-up + code:8da24c/00 + cheat + description:Slow down timer + code:008962/a0 + cheat + description:Speed up timer + code:008962/35 + cheat + description:Start with 20 3-way + code:8dc581/14 + cheat + description:Start with 20 Flame + code:8dc587/14 + cheat + description:Start with 20 Rocket + code:8dc58d/14 + cheat + description:Start with 20 Bolt + code:8dc593/14 + cheat + description:Start with 20 Wave + code:8dc599/14 + cheat + description:Start with 3 Flash Remotes + code:8dc5b6/00 + cheat + description:Start with 3 Shield Remotes + code:8dc5b6/01 + cheat + description:Start with 3 Umbrella Remotes + code:8dc5b6/02 + cheat + description:Start with 3 Helicopter Hat Remotes + code:8dc5b6/04 + cheat + description:Start with 3 Floating Bomb Remotes + code:8dc5b6/05 + cheat + description:Start with 6 of selected remote + code:8dc5b8/06 + cheat + description:Start with 15 of selected remote + code:8dc5b8/0f + cheat + description:Start with 1 life + code:008180/00 + cheat + description:Start with 9 lives + code:008180/08 + cheat + description:Start with 6 lives + code:008180/05 + cheat + description:Infinite health (P) (alt) + code:7e0221/30 + cheat + description:Infinite E + code:7e0222/30 + cheat + description:Infinite weapons (except for Flame) (alt) + code:00eb3c/ea + cheat + description:Infinite Remotes (alt 2) + code:8daf36/ea + cheat + description:Infinite time (alt) + code:7e0f42/3b + cheat + description:Infinite Flash Remotes + code:7e0209/63 + cheat + description:Infinite Shield Remotes + code:7e020a/63 + cheat + description:Infinite Umbrella Remotes + code:7e020b/63 + cheat + description:Infinite Spring Remotes + code:7e020c/63 + cheat + description:Infinite Helicopter Hat Remotes + code:7e020d/63 + cheat + description:Infinite Floating Bomb Remotes + code:7e020e/63 + cheat + description:Max weapons on pick-up (alt) + code:8da24c/00 + +cartridge sha256:e25d052d25264a14c4904aebc383482577bb5d2bb135f3ece88b1b7b0456a6bc + name:Ballz 3D - Fighting at Its Ballziest (USA) + cheat + description:Infinite time + code:c05b72/ad+c05b8c/ad + cheat + description:Always fight Kronk + code:c0b3d5/a9+c0b3d6/04+c0b3d7/00 + cheat + description:Always fight Boomer + code:c0b3d5/a9+c0b3d6/08+c0b3d7/00 + cheat + description:Always fight Bruiser + code:c0b3d5/a9+c0b3d6/0c+c0b3d7/00 + cheat + description:Always fight Turbo + code:c0b3d5/a9+c0b3d6/10+c0b3d7/00 + cheat + description:Always fight Tsunami + code:c0b3d5/a9+c0b3d6/14+c0b3d7/00 + cheat + description:Always fight Yoko + code:c0b3d5/a9+c0b3d6/18+c0b3d7/00 + cheat + description:Always fight Divine + code:c0b3d5/a9+c0b3d6/1c+c0b3d7/00 + cheat + description:Always fight Crusher + code:c0b3d5/a9+c0b3d6/20+c0b3d7/00 + cheat + description:Death match + code:c0f6bf/a0 + cheat + description:Start rounds with 10 seconds + code:c033bf/0a + cheat + description:Start rounds with 20 seconds + code:c033bf/14 + cheat + description:Start rounds with 30 seconds + code:c033bf/1e + cheat + description:Start rounds with 40 seconds + code:c033bf/28 + cheat + description:Start rounds with 50 seconds + code:c033bf/32 + cheat + description:Start rounds with 60 seconds + code:c033bf/3c + cheat + description:Start rounds with 70 seconds + code:c033bf/46 + cheat + description:Start with with 1/4 energy + code:c100ae/2f + cheat + description:Start with with 1/2 energy + code:c100ae/5f + cheat + description:Start with with 3/4 energy + code:c100ae/9f + +cartridge sha256:865919b25a9d241c907bcda18b380e3c704f33f4997ad44559046f0f08c4968b + name:Barbie Super Model (USA) + cheat + description:Infinite chances + code:00dc55/ad + +cartridge sha256:fe1ad128313b2b9a47f89cf0d95d4c0cc2cb35a817ac5d915ee6c4d98d47d675 + name:Barkley Shut Up and Jam! (USA) + cheat + description:Infinite time + code:7e0780/47 + +cartridge sha256:e2be173c77bd1957787be36d13334f655e14d32dad99cacb0fd5e5fc65d96fa1 + name:Bassin's Black Bass (USA) + cheat + description:Always catch a 60.32 pound fish + code:03abc8/a9 + cheat + description:Always catch a 75.68 pound fish + code:03abc8/a9+03abca/0e + cheat + description:Always catch a largemouth bass + code:03abb9/a9+03abba/00+03abbb/ea + cheat + description:Always have all lures (open the lure menu, close it, open it again to have all lures) + code:01f0c6/a9+01f0c7/01+01f0c8/9d+01f0cb/29 + +cartridge sha256:db1ac03cc8b7daaa812da239029bcf999b30b2afe1c03d51f7ae849a796617ea + name:Bass Masters Classic - Pro Edition (USA) + cheat + description:Start with $65,380 + code:7e2242/ff + cheat + description:Infinite money + code:7e2242/ff + +cartridge sha256:e36aaba64be016cabc33a2dcf88913341e2edacc722e2a1ebe04eccda2a5d6e7 + name:Batman Forever (USA) + cheat + description:Straight low punches are super strong + code:82d6dd/ff + cheat + description:Straight high punches are super strong + code:82d741/ff + cheat + description:Straight low kicks are super strong + code:82d455/ff + cheat + description:Straight high kicks are super strong + code:82d4ab/ff + cheat + description:Crouching low punches are super strong + code:82d98b/ff + cheat + description:Crouching high punches are super strong + code:82e347/ff + cheat + description:Crouching low kicks are super strong + code:82e311/ff + cheat + description:Crouching high kicks are super strong + code:82e2c5/ff + cheat + description:Straight low punches do no damage + code:82d6dd/00 + cheat + description:Straight high punches do no damage + code:82d741/00 + cheat + description:Straight low kicks do no damage + code:82d455/00 + cheat + description:Straight high kicks do no damage + code:82d4ab/00 + cheat + description:Crouching low punches do no damage + code:82d98b/00 + cheat + description:Crouching high punches do no damage + code:82e347/00 + cheat + description:Crouching low kicks do no damage + code:82e311/00 + cheat + description:Crouching high kicks do no damage + code:82e2c5/00 + cheat + description:Start with half energy after your first life + code:80dca1/20+81adfa/20 + cheat + description:Play as an Inmate + code:a9e3a5/12 + cheat + description:Play as a Clown + code:a9e3a5/14 + cheat + description:Play as Two-Face + code:a9e3a5/18 + cheat + description:Play as a Riddler Thug + code:a9e3a5/1a + cheat + description:Play as the Muscle Riddler + code:a9e3a5/1c + cheat + description:Start with 1 life + code:8098ec/00 + cheat + description:Start with 3 lives + code:8098ec/02 + cheat + description:Start with 10 lives + code:8098ec/09 + cheat + description:Infinite health - P1 + code:7e132c/ff + cheat + description:Infinite health - P2 + code:7e132e/ff + cheat + description:Infinite lives + code:7e0017/09 + cheat + description:One hit kills enemy #1 + code:7e1330/00 + +cartridge sha256:f8d5c51f74df33edc827fbf8df7aab70160770ab0a896db6e59438ad9208cc6e + name:Batman Returns (USA) + cheat + description:Invincibility + code:80c9c7/d0+80c035/24 + cheat + description:Infinite health + code:80ca3f/a5 + cheat + description:Infinite lives (3/4 view levels) + code:80c97e/a5 + cheat + description:Infinite special moves + code:80d004/a5 + cheat + description:Protection from some hazards + code:80ca39/a5 + cheat + description:Hit anywhere + code:80eff4/00+82c2ff/00+87f577/00+87f58d/00 + cheat + description:Cape sweep uses up no health + code:80cffd/00 + cheat + description:Spear gun uses up no health + code:80d017/00 + cheat + description:Cape sweep uses up more health + code:80cffd/10 + cheat + description:Spear gun uses up more health + code:80d017/10 + cheat + description:Maximum health from hearts + code:82d7f2/00 + cheat + description:Cape sweep does more damage + code:81ac15/15 + cheat + description:Normal punch does more damage + code:81ac0d/15 + cheat + description:Normal knee does more damage + code:81ac0e/15 + cheat + description:Jump kick does more damage + code:81ac11/15+81ac10/15 + cheat + description:Cape sweep does mega-damage + code:81ac15/30 + cheat + description:Normal punch does mega-damage + code:81ac0d/30 + cheat + description:Normal knee does mega-damage + code:81ac0e/30 + cheat + description:Jump kick does mega-damage + code:81ac11/30+81ac10/30 + cheat + description:Cape sweep does less damage + code:81ac15/02 + cheat + description:Normal punch does less damage + code:81ac0d/02 + cheat + description:Normal knee does less damage + code:81ac0e/02 + cheat + description:Jump kick does less damage + code:81ac11/02+81ac10/02 + cheat + description:Enable stage select + code:8085a4/13+8085a5/86+80a7be/af+9efdb0/ad + cheat + description:Start with 9 + code:8180b5/09 + cheat + description:Start with 6 test tubes + code:80881a/06+80ac40/06 + cheat + description:Start with 9 test tubes + code:80881a/09+80ac40/09 + cheat + description:Enemy 1 has 0 health + code:7e0567/00 + cheat + description:Enemy 2 has 0 health + code:7e0576/00 + cheat + description:Enemy 3 has 0 health + code:7e0666/00 + cheat + description:Enemy 4 has 0 health + code:7e0756/00 + +cartridge sha256:51cc42c58145f3e33b762e8ff36e9a9b7016ca831306d0d5f84830948a1a5967 + name:Batman - Revenge of the Joker (USA) (Proto) + cheat + description:Invincibility + code:81c03a/d0 + cheat + description:Infinite health + code:82fd17/ad + cheat + description:Infinite lives + code:8080e8/bd + cheat + description:Infinite health (alt) + code:7e0353/07+7e0355/07 + cheat + description:Infinite lives (alt) + code:7e0356/03+7e0358/03 + +cartridge sha256:983022203546e031773db0d1af7552c489187954882843f13ff123f09064c1d3 + name:Battle Blaze (USA) + cheat + description:Infinite continues + code:02b47b/ad + cheat + description:Infinite health (disable at end of round) - P1 + code:7e06dc/c0 + cheat + description:Infinite health (disable at end of round) - P2 + code:7e0704/c0 + cheat + description:No health - P1 + code:7e06dc/00 + cheat + description:No health - P2 + code:7e0704/00 + cheat + description:Hit anywhere - both players + code:00f4b9/42+00f4b8/80 + +cartridge sha256:32f42fda0667d9435a2de84c7ce7b067bcbab1164f8f6d837992ad6cfac4f8de + name:Battle Clash (USA) + cheat + description:Infinite health + code:83eb24/ad + cheat + description:Protection from most enemy attacks + code:83eb24/ad + cheat + description:Infinite time + code:818eb7/ad + cheat + description:Weapon charges faster + code:80cd53/05 + cheat + description:Weapon charges much faster + code:80cd53/10 + cheat + description:Once charged, weapon always stays charged + code:80c7c7/60 + cheat + description:Start in Cairo instead of New York + code:88f7f1/ee + cheat + description:Fight Garam at New York + code:81c293/a9+81c295/00+81c294/00 + cheat + description:Fight Scarab at Cairo + code:81c293/a9+81c295/00+81c294/01 + cheat + description:Fight Lorca at London + code:81c293/a9+81c295/00+81c294/02 + cheat + description:Fight Artemis at Andes + code:81c293/a9+81c295/00+81c294/03 + cheat + description:Fight Schneider at Kyoto + code:81c293/a9+81c295/00+81c294/04 + cheat + description:Fight Ivan at Oceania + code:81c293/a9+81c295/00+81c294/05 + cheat + description:Fight Valius at Babel + code:81c293/a9+81c295/00+81c294/06 + cheat + description:Fight Baron at Moonbase Luna + code:81c293/a9+81c295/00+81c294/07 + cheat + description:Fight Thanatos at last stage + code:81c293/a9+81c295/00+81c294/08 + cheat + description:Infinite health - P1 + code:7e15c0/80 + cheat + description:One hit kills + code:7e15a0/00 + +cartridge sha256:36cbc43a3ec85f235ecb6e0d5b134f069b619d3cc51e475427d3fcf8abb6ba44 + name:Battle Zeque Den (Japan) + cheat + description:Invincibility + code:7eb26a/03+81e7ab/1a + cheat + description:Invincibility (alt) + code:7eb26a/03 + cheat + description:Infinite lives + code:81e67f/af + cheat + description:Infinite Special + code:81a2dc/bd + cheat + description:One hit kills + code:818ef8/e0+818ef9/2e+818efa/b2+818efb/d0 + cheat + description:Infinite health + code:7eb246/4e + cheat + description:Infinite lives (alt) + code:7e0329/0a + cheat + description:Infinite Special (Red) + code:7eb24c/02 + cheat + description:Infinite Special (Blue) + code:7eb24c/04 + cheat + description:Infinite Special (Green) + code:7eb24c/06 + +cartridge sha256:c7f0269498d190e4fd0f6f880a148fbe3713cd3a632083bac1e5bd18f8172371 + name:Battletoads-Double Dragon (USA) + cheat + description:Infinite lives + code:0095bb/24 + cheat + description:Enemies have less health + code:8281fa/0f + cheat + description:Abobo has less health + code:829130/2f + cheat + description:Big Blag has less health + code:8296e8/2f + cheat + description:Roper has less health + code:829fc7/03 + cheat + description:Robo-Manus has less health + code:82a376/03 + cheat + description:Start with 2 lives + code:00804e/01 + cheat + description:Start with 10 lives + code:00804e/09 + cheat + description:Start on level 2 with 11 lives + code:008071/00+00808a/a9+00808b/01 + cheat + description:Start on level 3 with 11 lives + code:008071/00+00808a/a9+00808b/02 + cheat + description:Start on level 4 with 11 lives + code:008071/00+00808a/a9+00808b/03 + cheat + description:Start on level 5 with 11 lives + code:008071/00+00808a/a9+00808b/04 + cheat + description:Start on level 6 with 11 lives + code:008071/00+00808a/a9+00808b/05 + cheat + description:Invincibility (blinking) - P1 + code:7e1112/7f + cheat + description:Infinite health - P1 + code:7e003a/2f + cheat + description:Infinite lives - P1 + code:7e0026/05 + cheat + description:Stage select enabled + code:7e00fd/10 + +cartridge sha256:b0dbd4d7e5689c32234e80b0c5362ef67c425ab72d6ddb49d1cb1133ef630ef7 + name:Battletoads in Battlemaniacs (USA) + cheat + description:Invincibility + code:82df4b/d0 + cheat + description:Invincibility in motorcycle levels + code:829f26/ad + cheat + description:Infinite health + code:81b3fb/dd+81b440/dd + cheat + description:Infinite lives + code:81ba85/bd + cheat + description:Infinite lives - both players (except level 2, doesnï¾’t work on falling) + code:81ba85/b5 + cheat + description:Infinite continues - P1 + code:8087ca/a5 + cheat + description:Infinite continues - P2 + code:808798/a5 + cheat + description:Infinite lives when falling + code:82de81/b4 + cheat + description:Longer invincibility after getting hit + code:82df4b/80 + cheat + description:One hit kills + code:81b43b/e0+81b43c/00+81b43d/00+81b440/a9+81b441/ff+81b442/ff+81b443/9d + cheat + description:Take less damage from hits + code:81b440/bd + cheat + description:Protection against most strength level 1 hits + code:80c737/bd + cheat + description:Protection against most strength level 2 hazards + code:81bad4/b5 + cheat + description:Easy finish on motorcycle levels. The turtle will keep going on until the end of the level. + code:82da45/ad + cheat + description:Start with 2 lives + code:008101/01 + cheat + description:Start with 6 lives + code:008101/05 + cheat + description:Start with 10 lives + code:008101/09 + cheat + description:Start with 0 continues + code:00810b/00 + cheat + description:Start with 5 continues + code:00810b/05 + cheat + description:Start with 9 continues + code:00810b/09 + cheat + description:Infinite health - P1 + code:7e108e/0a + cheat + description:Infinite health - P2 + code:7e1090/0a + +cartridge sha256:0960f1de179f90e3d8488dacf09d5fe246fdb314913c370b3698dfdce58aa8ba + name:Bazooka Blitzkrieg (USA) + cheat + description:Immune to most damage + code:809773/2c + cheat + description:Fewer Missiles on pick-up + code:82c1ad/05 + cheat + description:More Missiles on pick-up + code:82c1ad/14 + cheat + description:Only 10 Missiles on pick-up (set Missiles to 10) + code:82c19b/0a+82c19f/0a + cheat + description:30 Missiles allowed + code:82c19b/1e+82c19f/1e + cheat + description:Less energy on pick-up from 'L' pods + code:82c119/02 + cheat + description:More energy on pick-up from 'L' pods + code:82c119/0a + cheat + description:A lot more energy on pick-up from 'L' pods + code:82c119/2f + cheat + description:Infinite health + code:7e0305/ff + cheat + description:Infinite Missiles + code:7e0304/14 + +cartridge sha256:d7271ca08400bbf5ae165b0aaa6e8a8a1b266f72e6e0ae10aae529732a472f7c + name:Beauty and the Beast (USA) + cheat + description:Invincibility (disable to pick up rocks, spikes still do damage) + code:83a34e/ea+83a34f/ea + cheat + description:Invincibility (but you can't pick up objects) + code:818013/d0 + cheat + description:Invincibility after one hit + code:818015/ea + cheat + description:Infinite health + code:83a3b1/ad + cheat + description:Infinite time + code:008e59/ad + cheat + description:Infinite flower time + code:008e79/ad + cheat + description:Infinite continues + code:00f445/ad + cheat + description:Hit anywhere + code:82816d/24+82817f/24+828174/24+828186/24 + cheat + description:Don't take damage from some enemies + code:83a3b1/ea + cheat + description:No loss of light when the candle runs off the screen + code:82acbf/2c + cheat + description:Death flash time is longer + code:838087/ff + +cartridge sha256:15d4fc90cb202a9391718cd40b9f0384165aef03018ed932540e8f7c18b397dd + name:Beavis and Butt-Head (USA) + cheat + description:Start with half health (1st life) + code:0081a1/06 + cheat + description:Start with half health (after 1st life) + code:008365/06 + cheat + description:Almost infinite health + code:02dfa5/ad + cheat + description:Gun power-ups worth 30 + code:82cabc/30 + cheat + description:Gun power-ups worth 5 + code:82cabc/05 + cheat + description:Infinite lives + code:00833d/ad + cheat + description:Start with 2 life + code:0081a9/01 + cheat + description:Start with 4 lives + code:0081a9/03 + cheat + description:Start with 10 lives + code:0081a9/09 + cheat + description:Invincibility after one hit + code:01fbc8/bd + cheat + description:Everyone is invincible, including enemies + code:01fbc7/00+02cd4b/00 + +cartridge sha256:4958eda26f2419f473449017c64121caee5e49c480ffa205422e7dd45cd23e31 + name:Bebe's Kids (USA) + cheat + description:Infinite health + code:7e047b/00 + cheat + description:Infinite time + code:7e0470/63 + cheat + description:Infinite lives + code:7e03c9/09 + +cartridge sha256:4d22279e534848012e0f1595468687742ae18cabc3fe44eeef938bc3a4dd08bf + name:Beethoven - The Ultimate Canine Caper! (USA) + cheat + description:Infinite health + code:81eb11/bd + cheat + description:Infinite time + code:81dd2d/bd + cheat + description:Infinite lives + code:80abba/bd + cheat + description:Infinite health (alt) + code:7e1628/04 + cheat + description:Infinite time (alt) + code:7e1654/63 + cheat + description:Infinite lives (alt) + code:7e15c6/09 + +cartridge sha256:e4e9beaeeb3e968af772d1c4c9e4c1b4dfdba4e47c0205b458e1ab3a62a96060 + name:Best of the Best - Championship Karate (USA) + cheat + description:Almost infinite health + code:01bf12/08 + cheat + description:Infinite special moves + code:01b409/bd + cheat + description:No special moves - P2 + code:01a6e6/9c + cheat + description:Can play with any boxer (can't use special moves or get password) - P1 + code:00a1e3/02 + cheat + description:Less strength + code:00a1e4/0a + cheat + description:Less resistance + code:00a1e5/0a + cheat + description:Less reflexes + code:00a1e6/0a + cheat + description:More strength + code:00a1e4/32 + cheat + description:More resistance + code:00a1e5/32 + cheat + description:More reflexes + code:00a1e6/32 + cheat + description:Start with 1 special move + code:01a6e2/01 + cheat + description:Start with 8 special moves + code:01a6e2/08 + cheat + description:Infinite time + code:7e1a39/09 + cheat + description:No health - P2 + code:7e0222/00 + cheat + description:Max Reflexes + code:7e0459/63 + cheat + description:Max Resistance + code:7e0455/63 + cheat + description:Max Strength + code:7e0457/63 + +cartridge sha256:4cb601168c91fa0608c16a8cf2f292d991c6a5615d51861dee2f9b91c8d6bb19 + name:Big Sky Trooper (USA) + cheat + description:Infinite HP + code:7e1e0a/20 + cheat + description:Infinite hearts + code:7e1e10/99 + cheat + description:Infinite Power Pack meter + code:7e1e0c/20 + +cartridge sha256:91ba5691dea3cdf103177ae5779110fc372fce8229cf91f263073667e7a8b5b7 + name:Biker Mice from Mars (USA) + cheat + description:Infinite ammo + code:8398b6/ea + cheat + description:Infinite cash + code:82b65c/bf + cheat + description:Infinite Shield/Armor + code:8092be/bd + cheat + description:Infinite Skull effect + code:8382e0/ad + cheat + description:Infinite Star effect + code:83b855/bd + cheat + description:Infinite Stopwatch effect + code:8384ac/ad + cheat + description:Infinite Money - P1 + code:7efe30/99+7efe31/99 + cheat + description:Infinite Ammo - P1 + code:7e17c6/12 + cheat + description:Infinite Armor - P1 + code:7e179e/03 + cheat + description:Infinite Money - P2 + code:7efe32/99+7efe33/99 + cheat + description:Infinite Ammo - P1 + code:7e1816/12 + cheat + description:Infinite Armor - P1 + code:7e17ee/03 + cheat + description:Always finish 1st + code:7e0928/00 + cheat + description:Max Engine upgrade - P1 + code:7efe38/05 + cheat + description:Max Tire upgrade - P1 + code:7efe3c/05 + cheat + description:Max Armor upgrade - P1 + code:7efe40/05 + cheat + description:Max Shot upgrade - P1 + code:7efe44/05 + cheat + description:Max Engine upgrade - P2 + code:7efe3a/05 + cheat + description:Max Tire upgrade - P2 + code:7efe3e/05 + cheat + description:Max Armor upgrade - P2 + code:7efe42/05 + cheat + description:Max Shot upgrade - P2 + code:7efe46/05 + cheat + description:Have Nitro item - P1 + code:7e17ce/01 + cheat + description:Have Star item - P1 + code:7e17ce/02 + cheat + description:Have Skull item - P1 + code:7e17ce/03 + cheat + description:Have Clock item - P1 + code:7e17ce/04 + cheat + description:Have Money Bag item - P1 + code:7e17ce/05 + cheat + description:Have Nitro item - P2 + code:7e181e/01 + cheat + description:Have Star item - P2 + code:7e181e/02 + cheat + description:Have Skull item - P2 + code:7e181e/03 + cheat + description:Have Clock item - P2 + code:7e181e/04 + cheat + description:Have Money Bag item - P2 + code:7e181e/05 + +cartridge sha256:6fa6b8a8804ff6544bdedf94339a86ba64ce0b6dbf059605abb1cd6f102d3483 + name:Bill Laimbeer's Combat Basketball (USA) + cheat + description:2-point shots worth 3, 3-point shots worth 4 + code:00971b/38 + cheat + description:All shots worth 1 point + code:00971c/69+00971d/01 + cheat + description:All shots worth 3 points + code:00971c/69+00971d/03 + cheat + description:All shots worth 4 points + code:00971c/69+00971d/04 + cheat + description:All shots worth 5 points + code:00971c/69+00971d/05 + cheat + description:All shots worth 6 points + code:00971c/69+00971d/06 + cheat + description:Each half is 0:30 instead of 1:30 + code:00962c/00 + cheat + description:Each half is 2:30 + code:00962c/02 + cheat + description:Each half is 3:30 + code:00962c/03 + cheat + description:Each half is 4:30 + code:00962c/04 + cheat + description:Start with $65,296 instead of $10,000 + code:0aa275/ff + cheat + description:Start with $8,398,608 + code:0aa27a/80 + cheat + description:Start with $16,721,680 + code:0aa27a/ff + cheat + description:No money is deducted from your total when you trade a player (but you must have enough money to make the trade) + code:0a96f0/ad+0a96f8/ad + cheat + description:Trade players for free + code:0a96f0/ad+0a96f8/ad+0a97f0/80 + cheat + description:Timer continues to count when it is normally stopped (time-out by pressing start) + code:00963c/00 + +cartridge sha256:ec2d91e238c26a5ddf7067d104b3b3e2eaee89255377e1eb6c4df8f301300e64 + name:Bill Walsh College Football (USA) + cheat + description:Cannot be tackled (hold X) + code:c005ea/73+c005ec/30+c005e9/a5+c005eb/0a+c005ed/f5 + +cartridge sha256:de1de85ad549a6aaf0431cceb47cbd07e1f6e81f9e16fd62575305e2c1f06240 + name:BioMetal (USA) + cheat + description:Invincibility (blinking) + code:038400/24 + cheat + description:Infinite lives + code:0386f1/ad + cheat + description:Infinite charge + code:0385d2/ad + cheat + description:Hit anywhere + code:00ddfe/28+00ddfd/80+00de34/a5 + cheat + description:Infinite lives (alt) + code:7e029d/0a + +cartridge sha256:3f030b6c6aa86bc4ab3d39568740d8c6b0ec3422a1964fe1b56e94de47dfa420 + name:Bishin Densetsu Zoku (Japan) + cheat + description:Infinite health + code:7e122c/50 + cheat + description:No car damage + code:7e0d9b/2f + cheat + description:Infinite time + code:7e0c96/00 + cheat + description:Infinite time (alt) + code:7e0c97/09 + +cartridge sha256:ff936a073032205daadfea3738526a381daf7e402e8216d08561ddca8ceaf526 + name:Bishoujo Senshi Sailor Moon (Japan) + cheat + description:One hit kills + code:c11204/24+c117b2/24+c1185b/24 + cheat + description:Invincibility + code:c14f0e/d0 + cheat + description:Infinite health + code:c11115/b9+c11a5c/a5 + cheat + description:Infinite lives + code:c15067/a5 + cheat + description:Hit anywhere + code:c11188/80 + +cartridge sha256:8860380ae0afa280619fdca8723aed1393485a22bec442880acc75249cab37f4 + name:Bishoujo Senshi Sailor Moon R (Japan) + cheat + description:Invincibility + code:c14f07/d0+c14f0b/d0 + cheat + description:Infinite health + code:c108a2/b9 + cheat + description:Infinite lives + code:c151da/a5 + cheat + description:Infinite Special + code:c14319/a5 + cheat + description:Hit anywhere + code:c1090a/80 + cheat + description:One hit kills + code:c109e7/24+c14c05/24+c11171/24 + +cartridge sha256:328c8f57e2ea371f6fd5b8a9834c56e35eb3bfe710502dd80f370739f9ccb7e1 + name:Blackthorne (USA) + cheat + description:Infinite items (enable after obtaining first item, disable before getting next item, repeat this process) + code:80a984/b5 + cheat + description:Infinite health + code:7e0fc5/18 + cheat + description:3rd slot item mod + code:7e187a/03 + cheat + description:Standard Shotgun + code:7e021c/00 + cheat + description:Unrestricted manual Shotgun without reload (more presses, more shots) + code:7e021c/01 + cheat + description:Very fast automatic Shotgun + code:7e021c/02 + cheat + description:Very fast automatic Shotgun with explosive shells + code:7e021c/03 + cheat + description:Normal automatic Shotgun + code:7e021c/04 + cheat + description:Infinite Iron Keys + code:7e1876/02 + cheat + description:Infinite Potions + code:7e1878/04 + cheat + description:Infinite Hover Bombs + code:7e187a/05 + cheat + description:Infinite Levitators + code:7e187c/06 + cheat + description:Infinite Bridge Keys + code:7e187e/07 + cheat + description:Infinite Remote Wasps + code:7e1880/08 + cheat + description:Infinite Fire Bombs + code:7e1882/0a + +cartridge sha256:0d4e0d134396bd1c7254cdc1da356eb944ca14910b6690f484a75a9c3a8106e7 + name:BlaZeon - The Bio-Cyborg Challenge (USA) + cheat + description:Invincibility + code:01830d/d0 + cheat + description:Infinite lives + code:009028/bd + cheat + description:Infinite lives (alt) + code:009028/ad+00920b/ad + cheat + description:Infinite Atomic Shields - Mars + code:00ac3f/ad + cheat + description:Infinite Hyper Bombs - Neptune + code:00ace6/ad + cheat + description:Hit anywhere + code:00b771/60+00b793/60+00b8cf/ad+00b770/38+00b792/38 + cheat + description:Start with 1 ship + code:008efd/00 + cheat + description:Start with 2 ships + code:008efd/01 + cheat + description:Start with 4 ships + code:008efd/03 + cheat + description:Start with 5 ships + code:008efd/04 + cheat + description:Start with 7 ships + code:008efd/06 + cheat + description:Start with 10 ships + code:008efd/09 + cheat + description:Start with 26 ships + code:008efd/19 + cheat + description:Start on Stage 2 + code:008e01/01 + cheat + description:Start on Stage 3 + code:008e01/02 + cheat + description:Start on Stage 4 + code:008e01/03 + cheat + description:Start on Stage 5 + code:008e01/04 + +cartridge sha256:99f40f06fa4dbeeea4fe67d2de5b4c1bf301bedac1958ba1c239dcaf39b0a998 + name:Blues Brothers, The (USA) + cheat + description:Invincibility + code:8095e8/60 + cheat + description:Infinite health (1P game) + code:80c3e5/bd + cheat + description:Infinite health (2P game) + code:80cdf8/bd + cheat + description:Infinite lives + code:80b718/bd + cheat + description:Infinite time + code:809bee/ad + cheat + description:Infinite Discs + code:80b654/bd + cheat + description:Multi-jump + code:80d667/80+80d652/80 + +cartridge sha256:d50ef11383d78544dbad4d350cfd1486fb28e459e208d1553acdecbd84a808b8 + name:Bobby's World (USA) (Proto) + cheat + description:Invincibility + code:829d30/d0 + cheat + description:Infinite health + code:829daa/bd + cheat + description:Infinite health (alt) + code:7e139b/03 + cheat + description:Infinite lives + code:80d50f/bd + cheat + description:Infinite lives (alt) + code:7e1395/09 + cheat + description:Multi-jump + code:8299ef/00 + +cartridge sha256:854d2492d1cb059749bb0904ca5f92a5eeec09167abf84f7cca4023b1819e4f0 + name:Bonkers (USA) + cheat + description:Invincibility + code:80aa09/d0 + cheat + description:Infinite health + code:80a520/b5 + cheat + description:Infinite bombs + code:80c294/a5 + cheat + description:Infinite lives + code:8086e1/a5 + cheat + description:Infinite dash + code:80b6a1/a5 + cheat + description:Hit anywhere + code:80f965/80+80f966/50 + +cartridge sha256:8f131182b286bd87f12cf4f00453336538ce690d0e1f0972ac0be98df4d48987 + name:Boogerman - A Pick and Flick Adventure (USA) + cheat + description:Infinite health + code:c0113f/a0 + cheat + description:Infinite lives + code:c01049/00 + cheat + description:Infinite Loogies + code:c174ab/00 + cheat + description:Infinite Boogers + code:c173ee/00 + cheat + description:Infinite Belches + code:c17575/00 + cheat + description:Infinite Super Belches + code:c17667/00 + cheat + description:Infinite Farts + code:c17a2c/00 + cheat + description:Infinite Super Farts + code:c17b22/00 + cheat + description:Infinite Chili Belches and Farts + code:c19db0/00 + cheat + description:Infinite Super Chili Belches and Farts + code:c19e9e/00 + cheat + description:Infinite Rocket Farts + code:c118f4/00 + cheat + description:Get chili when hit + code:c11cd1/01 + cheat + description:Get Milk when hit + code:c11ccb/01 + cheat + description:Infinite health (alt) + code:7e0ef8/02 + cheat + description:Infinite Boogers (alt) + code:7e0224/20 + cheat + description:Infinite Belches and Farts (both kinds) + code:7e0226/20 + +cartridge sha256:e67940a2106c1507f3a8d38790f263bbbf814578ebf3dbc4e3eb6007d310793c + name:Boxing Legends of the Ring (USA) + cheat + description:Invincibility - P1 + code:8186cb/80 + cheat + description:Invincibility - P2 + code:818f81/80 + cheat + description:Infinite super punches - P1 + code:818f05/ad + cheat + description:Infinite super punches - P2 or CPU + code:81864b/ad + cheat + description:Infinite strength beads + code:81d59c/00+81d658/ad + cheat + description:Infinite time per round + code:009fcf/ad + cheat + description:Hit anywhere - P1 + code:81900a/60+819009/18 + cheat + description:Hit anywhere - P2 + code:818754/60+818753/18 + cheat + description:Blocking disabled - P1 + code:8186d1/00 + cheat + description:Blocking disabled - P2 + code:818f87/00 + cheat + description:Each round is 1 minute + code:80be03/01 + cheat + description:Each round is 2 minutes + code:80be03/02 + cheat + description:Each round is 4 minutes + code:80be03/04 + cheat + description:Each round is 5 minutes + code:80be03/05 + cheat + description:Each round is 6 minutes + code:80be03/06 + cheat + description:Both fighters start with no super punches + code:80ba38/00 + cheat + description:Both fighters start with 2 super punches + code:80ba38/02 + cheat + description:Both fighters start with 3 super punches + code:80ba38/03 + cheat + description:Create a stronger left jab + code:8bfef4/80 + cheat + description:Create a stronger left hook body + code:8bfef6/80 + cheat + description:Create a stronger left hook head + code:8bfef8/80 + cheat + description:Create a stronger left uppercut + code:8bfefa/80 + cheat + description:Create a stronger right cross body + code:8bfefc/80 + cheat + description:Create a stronger right cross head + code:8bfefe/80 + cheat + description:Create a stronger right uppercut + code:8bff00/80 + cheat + description:Start on round 5 + code:80ba1f/ee + cheat + description:Start on round 12 + code:80ba1f/ce + cheat + description:Infinite full stanima + code:7e05af/0f + +cartridge sha256:f4666355e7fea434843dc6d5119673bd6c23e69b884aac0b382ff036997e52b5 + name:Brain Lord (USA) + cheat + description:9999 HP + code:7e08c2/0f+7e08c3/27 + cheat + description:9999 Max HP + code:7e08c4/0f+7e08c5/27 + cheat + description:255 Power + code:7e08ca/ff + cheat + description:Have the best status + code:7e08dd/00 + cheat + description:Move faster, same effect as wearing the Cloak + code:7e08d4/07 + cheat + description:Infinite G + code:7e0376/97 + cheat + description:Can access 13 spells + code:7e08d1/0d + cheat + description:Have Magic Shot spell + code:7e0910/02 + cheat + description:Have Magic Shield spell + code:7e0911/03 + cheat + description:Have Flame Ring spell + code:7e0912/04 + cheat + description:Have Fireball spell + code:7e0913/05 + cheat + description:Have Impulse spell + code:7e0914/06 + cheat + description:Have Lightning spell + code:7e0915/07 + cheat + description:Have Magic Missile spell + code:7e0916/08 + cheat + description:Have Bound spell + code:7e0917/09 + cheat + description:Have Ice spell + code:7e0918/0a + cheat + description:Have Phaser spell + code:7e0919/0b + cheat + description:Have Slow spell + code:7e091a/0e + cheat + description:Have Stop spell + code:7e091b/0f + cheat + description:Have Ghost spell + code:7e091c/10 + cheat + description:Quick spell charge + code:7e08c7/01 + cheat + description:Have the Iron Sword + code:7e0921/01+7e0920/02 + cheat + description:Have the Steel Buster + code:7e0921/01+7e0920/03 + cheat + description:Have the Platinum Sword + code:7e0921/01+7e0920/05 + cheat + description:Have the Battle Axe + code:7e0921/01+7e0920/06 + cheat + description:Have the Tomahawk + code:7e0921/01+7e0920/07 + cheat + description:Have the Rock Breaker + code:7e0921/01+7e0920/08 + cheat + description:Have the Great Axe + code:7e0921/01+7e0920/09 + cheat + description:Have the Boomerang + code:7e0921/01+7e0920/0a + cheat + description:Have the Chuckler + code:7e0921/01+7e0920/0b + cheat + description:Have the Mornin Star + code:7e0921/01+7e0920/0c + cheat + description:Have the Heavy Mall + code:7e0921/01+7e0920/0d + cheat + description:Have the Long Bow + code:7e0921/01+7e0920/0e + cheat + description:Have the Silver Bow + code:7e0921/01+7e0920/0f + cheat + description:Have the Lightning Bow + code:7e0921/01+7e0920/10 + cheat + description:Have the Fire Sword + code:7e0921/01+7e0920/12 + cheat + description:Have the Iron Helmet + code:7e0923/02+7e0922/02 + cheat + description:Have the Cross Helmet + code:7e0923/02+7e0922/03 + cheat + description:Have the Blackgold Helm + code:7e0923/02+7e0922/04 + cheat + description:Have the Warrior's Helm + code:7e0923/02+7e0922/05 + cheat + description:Have the Platinum Helm + code:7e0923/02+7e0922/06 + cheat + description:Have the Nameless Helm + code:7e0923/02+7e0922/07 + cheat + description:Have the Nameless Helm + code:7e0923/02+7e0922/08 + cheat + description:Have the Nameless Helm + code:7e0923/02+7e0922/09 + cheat + description:Have the Chain Mail + code:7e0925/03+7e0924/02 + cheat + description:Have the Banded Mail + code:7e0925/03+7e0924/03 + cheat + description:Have the Bone Mail + code:7e0925/03+7e0924/04 + cheat + description:Have the Plate Armor + code:7e0925/03+7e0924/05 + cheat + description:Have the Royal Armor + code:7e0925/03+7e0924/06 + cheat + description:Have the Cape + code:7e0925/03+7e0924/07 + cheat + description:Have the Nameless Armor + code:7e0925/03+7e0924/08 + cheat + description:Have the Nameless Armor + code:7e0925/03+7e0924/09 + cheat + description:Have the Round Shield + code:7e0927/04+7e0926/02 + cheat + description:Have the Kite Shield + code:7e0927/04+7e0926/03 + cheat + description:Have the Bone Shield + code:7e0927/04+7e0926/04 + cheat + description:Have the Warrior Shield + code:7e0927/04+7e0926/05 + cheat + description:Have the Battle Shield + code:7e0927/04+7e0926/06 + cheat + description:Have the Shield + code:7e0927/04+7e0926/07 + cheat + description:Have the Reviving Mirror + code:7e0929/05+7e0928/01 + cheat + description:Have the Debug Mirror (a debug item) + code:7e0929/05+7e0928/02 + cheat + description:Have the Wind Shoes + code:7e0929/05+7e0928/03 + cheat + description:Have the Spike Boots + code:7e0929/05+7e0928/04 + cheat + description:Have the Life Jade + code:7e092b/06+7e092a/01 + cheat + description:Have the Crimson Jade + code:7e092b/06+7e092a/02 + cheat + description:Have the Foundation Jade + code:7e092b/06+7e092a/03 + cheat + description:Have the Power Jade + code:7e092b/06+7e092a/04 + cheat + description:Have the Lightning Jade + code:7e092b/06+7e092a/05 + cheat + description:Have the Anger Jade + code:7e092b/06+7e092a/06 + cheat + description:Have the Water Jade + code:7e092b/06+7e092a/07 + cheat + description:Have the Deceased Jade + code:7e092b/06+7e092a/08 + cheat + description:Have the Light Jade + code:7e092b/06+7e092a/09 + cheat + description:Have the Key to the Seal + code:7e092d/07+7e092c/01 + cheat + description:Have the 3rd floor Key + code:7e092d/07+7e092c/02 + cheat + description:Have the 4th floor Key + code:7e092d/07+7e092c/03 + cheat + description:Have the Puzzle Key + code:7e092d/07+7e092c/04 + cheat + description:Have the Crossroads Key + code:7e092d/07+7e092c/05 + cheat + description:Have the Sky Room Key + code:7e092d/07+7e092c/06 + cheat + description:Have the Cave Room Key + code:7e092d/07+7e092c/07 + cheat + description:Have the Dark Room Key + code:7e092d/07+7e092c/08 + cheat + description:Have the Basement Key + code:7e092d/07+7e092c/09 + cheat + description:Have the Detour Key + code:7e092d/07+7e092c/0a + cheat + description:Have the Bottomless Key + code:7e092d/07+7e092c/0b + cheat + description:Have the Distance Key + code:7e092d/07+7e092c/0c + cheat + description:Have the Office Key + code:7e092d/07+7e092c/0d + cheat + description:Have the Flyer's Key + code:7e092d/07+7e092c/0e + cheat + description:Have the Steel Sky Key + code:7e092d/07+7e092c/0f + cheat + description:Have the Invisible Key + code:7e092d/07+7e092c/10 + cheat + description:Have the Underground Key + code:7e092d/07+7e092c/11 + cheat + description:Have the Control Key + code:7e092d/07+7e092c/12 + cheat + description:Have the Preparation Key + code:7e092d/07+7e092c/13 + cheat + description:Have the Laboratory Key + code:7e092d/07+7e092c/14 + cheat + description:Have the Power Room Key + code:7e092d/07+7e092c/15 + cheat + description:Have the Oblivion Key + code:7e092d/07+7e092c/16 + cheat + description:Have the Western Sky Key + code:7e092d/07+7e092c/1f + cheat + description:Have the Ocean Key + code:7e092d/07+7e092c/20 + cheat + description:Have the Under Ice Key + code:7e092d/07+7e092c/21 + cheat + description:Have the Waterfall Key + code:7e092d/07+7e092c/22 + cheat + description:Have the Flood Gate Key + code:7e092d/07+7e092c/23 + cheat + description:Have the Wave Key + code:7e092d/07+7e092c/24 + cheat + description:Have the Ice Key + code:7e092d/07+7e092c/25 + cheat + description:Have the Water-Air Key + code:7e092d/07+7e092c/26 + cheat + description:Have the Red Wing Key + code:7e092d/07+7e092c/27 + cheat + description:Have the 1st Gate Key + code:7e092d/07+7e092c/28 + cheat + description:Have the 2nd Gate Key + code:7e092d/07+7e092c/29 + cheat + description:Have the 3rd Gate Key + code:7e092d/07+7e092c/2a + cheat + description:Have the Sky Dragon Key + code:7e092d/07+7e092c/2b + cheat + description:Have the Land Dragon Key + code:7e092d/07+7e092c/2c + cheat + description:Have the Sea Dragon Key + code:7e092d/07+7e092c/2d + cheat + description:Have the Dead Dragon Key + code:7e092d/07+7e092c/2e + cheat + description:Have the Silence Key + code:7e092d/07+7e092c/33 + cheat + description:Have the Castle Key + code:7e092d/07+7e092c/34 + cheat + description:Have the Endless Key + code:7e092d/07+7e092c/35 + cheat + description:Have the Spirit Key + code:7e092d/07+7e092c/36 + cheat + description:Have the Destruction Key + code:7e092d/07+7e092c/37 + cheat + description:Have the Platinum Key + code:7e092d/07+7e092c/38 + cheat + description:Have the Night Key + code:7e092d/07+7e092c/39 + cheat + description:Have the Afterworld Key + code:7e092d/07+7e092c/3a + cheat + description:Have the Entropy Key + code:7e092d/07+7e092c/3b + cheat + description:Have the Fountain Key + code:7e092d/07+7e092c/3c + cheat + description:Have the Duplicate Key + code:7e092d/07+7e092c/3e + cheat + description:Have the Duplicate Key + code:7e092d/07+7e092c/3f + +cartridge sha256:5f1912fdac09cd60d3a8962cad3875c6221b38347f0e98abc5800c73214678a9 + name:Brainies, The (Europe) + cheat + description:Timer disable cheat to get score then re-enable + code:7e091c/17 + +cartridge sha256:9885ca148d32c4df6230642bcfa153f7e51b9559415042a831db14d07b3e6c3d + name:Brainies, The (USA) + cheat + description:Infinite time + code:0089d0/ad + cheat + description:Infinite continues + code:0086df/ad + cheat + description:Start with and always have 9 Jokers + code:00a2a6/09 + cheat + description:Start on level 25 + code:0083e6/1a + cheat + description:Start on level 50 + code:0083e6/33 + cheat + description:Start on level 75 + code:0083e6/4c + cheat + description:Start on level 100 + code:0083e6/65 + +cartridge sha256:bbde8b46c7262f9d4a5b3926a00850cb00b4f7711f6421f0adf4e2b0c847a5d6 + name:Bram Stoker's Dracula (USA) + cheat + description:Infinite energy + code:0485e7/ad + cheat + description:Infinite lives + code:0487b2/ad + cheat + description:Infinite pistol ammo + code:03d398/a5 + cheat + description:Infinite shotgun ammo + code:03d28b/a5 + cheat + description:Turbo walking + code:00a2d6/ea + cheat + description:Infinite missile weapon + code:03d43e/a5 + cheat + description:One hit kills all enemies, except bosses + code:0484b4/80 + cheat + description:Freeze most ground enemies + code:00cab8/2c + cheat + description:Freeze most aerial enemies + code:00ca96/2c + cheat + description:Start at the final battle + code:03f9a5/10 + +cartridge sha256:130a74e76369b0ec4d6378a014550921433f1ae1ac1dddffb51f77c9f21a818f + name:Brandish (USA) + cheat + description:Have over 10,000,000 gold + code:307fe8/10 + cheat + description:Sell an item for max gold + code:81bd29/02+81bd28/80 + cheat + description:Luck stays maxed out + code:83e494/80 + cheat + description:Map gets filled when entering a level + code:c244dd/80+c244de/ea + +cartridge sha256:044b61613ed66eae08abd5fa5dcd13b24aab11a942e3309cdff624d198c47440 + name:Brawl Brothers (USA) + cheat + description:Invincibility and infinite special attack + code:8589ed/80+8589ee/01 + cheat + description:Infinite health + code:858b62/c5 + cheat + description:One hit kills on most enemies + code:858a97/ff+858a98/ff+858a9a/24 + cheat + description:Bosses die immediately + code:8589f3/ff+8589f4/ff+8589f6/24 + cheat + description:Hit anywhere - both players + code:85a4da/24+85a4df/24+85a4a1/24+85a500/24+85a4fb/24 + cheat + description:Invincibility - P1 + code:7e0908/01 + cheat + description:Invincibility - P2 + code:7e09d8/01 + cheat + description:Infinite health - P1 + code:7e0924/50 + cheat + description:Infinite health - P2 + code:7e09f4/50 + cheat + description:Infinite lives - P1 + code:7e0946/09 + cheat + description:Infinite lives - P2 + code:7e0a16/09 + cheat + description:One hit kills on most enemies (alt) + code:7e0b94/00+7e0919/00+7e0d34/00+7e0c64/00+7e0ac4/00 + cheat + description:Have Lots of Kills - P1 + code:7e0c34/ff + cheat + description:Play as Dieter (glitchy) - P1 + code:7e0920/0a + cheat + description:Play as Dieter (glitchy) - P2 + code:7e09f0/0a + +cartridge sha256:aad8c9be1b7a9662256b0c3d76f5b7a273bcd497aa838232d307e9f2e80cf699 + name:BreakThru! (USA) + cheat + description:Infinite time + code:7e125b/ff + +cartridge sha256:cbc496a7879ba78f32c51c3df4ba1a1a42f17d78d48a39ea9c709d1ad18cb8df + name:Breath of Fire (USA) + cheat + description:9999 EXP after every battle + code:84811f/ee + cheat + description:Infinite usable items in menu + code:94faf2/0f + cheat + description:Infinite Gold + code:87fa6c/bf+87fa73/bf+87faf7/bf + cheat + description:Create a new character at level 5 + code:819612/05 + cheat + description:Create a new character with 153 max HP + code:819614/99 + cheat + description:Create a new character with 153 HP + code:819616/99 + cheat + description:Create a new character with 20 max AP + code:819618/14 + cheat + description:Create a new character with 20 AP + code:81961a/14 + cheat + description:Create a new character with INT at 22 + code:819621/16 + cheat + description:Create a new character with Agility at 22 + code:819622/16 + cheat + description:Create a new character with Fate at 40 + code:819624/28 + cheat + description:Create a new character with strength at 50 + code:81961f/32 + cheat + description:Create a new character with Vigor at 50 + code:819620/32 + cheat + description:Ryu starts with Tri-Rang + code:819630/5f + cheat + description:Ryu starts with EmporSD + code:819630/08 + cheat + description:Ryu starts with DragonSH + code:819632/54 + cheat + description:Ryu starts with LifeAR + code:819634/1d + cheat + description:Ryu starts with DragonHT + code:819636/8a + cheat + description:Nina starts with PowerRP + code:819690/1d + cheat + description:Nina starts with MaskSH + code:819692/53+819693/21 + cheat + description:Nina starts with ClearCL + code:819694/2e + cheat + description:Nina starts with LoveHT + code:819696/78+819697/21 + cheat + description:Bo starts with HeroBW + code:819660/5b + cheat + description:Bo starts with IcyAR + code:819662/11 + cheat + description:Bo starts with CursedHT + code:819664/6b + cheat + description:Ox starts with Mallet + code:8196c0/26 + cheat + description:Ox starts with StarSH + code:8196c2/84 + cheat + description:Ox starts with WorldAR + code:8196c4/25 + cheat + description:Ox starts with CursedHT + code:8196c6/6b + cheat + description:Gobi starts with Sleeper + code:8196f0/38 + cheat + description:Gobi starts with StarSH + code:8196f2/84+8196f3/21 + cheat + description:Gobi starts with SpineCL + code:8196f4/14 + cheat + description:Gobi starts with CursedHT + code:8196f6/6b + cheat + description:Karn starts with DarkDR + code:819720/4c + cheat + description:Karn starts with StarSH + code:819722/84+819723/21 + cheat + description:Karn starts with QuartzAR + code:819724/1f + cheat + description:Karn starts with CursedHT + code:819726/6b + cheat + description:Mogu starts with MystCW + code:819750/3f + cheat + description:Mogu starts with StarSH + code:819752/84+819753/21 + cheat + description:Mogu starts with FlameAR + code:819754/0e + cheat + description:Mogu starts with CursedHT + code:819756/6b+819757/21 + cheat + description:Bleu starts with GlowCN + code:819780/2f + cheat + description:Bleu starts with MaskSH + code:819782/53 + cheat + description:Bleu starts with ClearCL + code:819784/2e + cheat + description:Bleu starts with CursedHT + code:819786/6b + cheat + description:Character 1 - Max LEVEL + code:7e104a/ff + cheat + description:Character 1 - Infinite HP + code:7e104e/e7+7e104f/03 + cheat + description:Character 1 - Max HP + code:7e104c/e7+7e104d/03 + cheat + description:Character 1 - Infinite AP + code:7e1052/e7+7e1053/03 + cheat + description:Character 1 - Max AP + code:7e1050/e7+7e1051/03 + cheat + description:Character 1 - Max Str + code:7e1057/ff + cheat + description:Character 1 - Max Vigor + code:7e1058/ff + cheat + description:Character 1 - Max Wisdom + code:7e1059/ff + cheat + description:Character 1 - Max Agil + code:7e105a/ff + cheat + description:Character 1 - Max MAG + code:7e105b/ff + cheat + description:Character 1 - Max Luck + code:7e105c/ff + cheat + description:Character 1 - Max ATK + code:7e105d/e7+7e105e/03 + cheat + description:Character 1 - Max DEF + code:7e105f/e7+7e1060/03 + cheat + description:Character 1 - Max INT + code:7e1061/ff + cheat + description:Character 1 - Max ACT + code:7e1062/ff + cheat + description:Character 1 - Max FATE + code:7e1063/ff + cheat + description:Character 2 - Max LEVEL + code:7e10ea/ff + cheat + description:Character 2 - Infinite HP + code:7e10ee/e7+7e10ef/03 + cheat + description:Character 2 - Max HP + code:7e10ec/e7+7e10ed/03 + cheat + description:Character 2 - Infinite AP + code:7e10f2/e7+7e10f3/03 + cheat + description:Character 2 - Max AP + code:7e10f0/e7+7e10f1/03 + cheat + description:Character 2 - Max Str + code:7e10f7/ff + cheat + description:Character 2 - Max Vigor + code:7e10f8/ff + cheat + description:Character 2 - Max Wisdom + code:7e10f9/ff + cheat + description:Character 2 - Max Agil + code:7e10fa/ff + cheat + description:Character 2 - Max MAG + code:7e10fb/ff + cheat + description:Character 2 - Max Luck + code:7e10fc/ff + cheat + description:Character 2 - Max ATK + code:7e10fd/e7+7e10fe/03 + cheat + description:Character 2 - Max DEF + code:7e10ff/e7+7e1100/03 + cheat + description:Character 2 - Max INT + code:7e1101/ff + cheat + description:Character 2 - Max ACT + code:7e1102/ff + cheat + description:Character 2 - Max FATE + code:7e1103/ff + cheat + description:Character 3 - Max LEVEL + code:7e118a/ff + cheat + description:Character 3 - Infinite HP + code:7e118e/e7+7e118f/03 + cheat + description:Character 3 - Max HP + code:7e118c/e7+7e118d/03 + cheat + description:Character 3 - Infinite AP + code:7e1192/e7+7e1193/03 + cheat + description:Character 3 - Max AP + code:7e1190/e7+7e1191/03 + cheat + description:Character 3 - Max Str + code:7e1197/ff + cheat + description:Character 3 - Max Vigor + code:7e1198/ff + cheat + description:Character 3 - Max Wisdom + code:7e1199/ff + cheat + description:Character 3 - Max Agil + code:7e119a/ff + cheat + description:Character 3 - Max MAG + code:7e119b/ff + cheat + description:Character 3 - Max Luck + code:7e119c/ff + cheat + description:Character 3 - Max ATK + code:7e119d/e7+7e119e/03 + cheat + description:Character 3 - Max DEF + code:7e119f/e7+7e11a0/03 + cheat + description:Character 3 - Max INT + code:7e11a1/ff + cheat + description:Character 3 - Max ACT + code:7e11a2/ff + cheat + description:Character 3 - Max FATE + code:7e11a3/ff + cheat + description:Character 4 - Max LEVEL + code:7e122a/ff + cheat + description:Character 4 - Infinite HP + code:7e122e/e7+7e122f/03 + cheat + description:Character 4 - Max HP + code:7e122c/e7+7e122d/03 + cheat + description:Character 4 - Infinite AP + code:7e1232/e7+7e1233/03 + cheat + description:Character 4 - Max AP + code:7e1230/e7+7e1231/03 + cheat + description:Character 4 - Max Str + code:7e1237/ff + cheat + description:Character 4 - Max Vigor + code:7e1238/ff + cheat + description:Character 4 - Max Wisdom + code:7e1239/ff + cheat + description:Character 4 - Max Agil + code:7e123a/ff + cheat + description:Character 4 - Max MAG + code:7e123b/ff + cheat + description:Character 4 - Max Luck + code:7e123c/ff + cheat + description:Character 4 - Max ATK + code:7e123d/e7+7e123e/03 + cheat + description:Character 4 - Max DEF + code:7e123f/e7+7e1240/03 + cheat + description:Character 4 - Max INT + code:7e1241/ff + cheat + description:Character 4 - Max ACT + code:7e1242/ff + cheat + description:Character 4 - Max FATE + code:7e1243/ff + cheat + description:Character 5 - Max LEVEL + code:7e12ca/ff + cheat + description:Character 5 - Infinite HP + code:7e12ce/e7+7e12cf/03 + cheat + description:Character 5 - Max HP + code:7e12cc/e7+7e12cd/03 + cheat + description:Character 5 - Infinite AP + code:7e12d2/e7+7e12d3/03 + cheat + description:Character 5 - Max AP + code:7e12d0/e7+7e12d1/03 + cheat + description:Character 5 - Max Str + code:7e12d7/ff + cheat + description:Character 5 - Max Vigor + code:7e12d8/ff + cheat + description:Character 5 - Max Wisdom + code:7e12d9/ff + cheat + description:Character 5 - Max Agil + code:7e12da/ff + cheat + description:Character 5 - Max MAG + code:7e12db/ff + cheat + description:Character 5 - Max Luck + code:7e12dc/ff + cheat + description:Character 5 - Max ATK + code:7e12dd/e7+7e12de/03 + cheat + description:Character 5 - Max DEF + code:7e12df/e7+7e12e0/03 + cheat + description:Character 5 - Max INT + code:7e12e1/ff + cheat + description:Character 5 - Max ACT + code:7e12e2/ff + cheat + description:Character 5 - Max FATE + code:7e12e3/ff + cheat + description:Character 6 - Max LEVEL + code:7e136a/ff + cheat + description:Character 6 - Infinite HP + code:7e136e/e7+7e136f/03 + cheat + description:Character 6 - Max HP + code:7e136c/e7+7e136d/03 + cheat + description:Character 6 - Infinite AP + code:7e1372/e7+7e1373/03 + cheat + description:Character 6 - Max AP + code:7e1370/e7+7e1371/03 + cheat + description:Character 6 - Max Str + code:7e1377/ff + cheat + description:Character 6 - Max Vigor + code:7e1378/ff + cheat + description:Character 6 - Max Wisdom + code:7e1379/ff + cheat + description:Character 6 - Max Agil + code:7e137a/ff + cheat + description:Character 6 - Max MAG + code:7e137b/ff + cheat + description:Character 6 - Max Luck + code:7e137c/ff + cheat + description:Character 6 - Max ATK + code:7e137d/e7+7e137e/03 + cheat + description:Character 6 - Max DEF + code:7e137f/e7+7e1380/03 + cheat + description:Character 6 - Max INT + code:7e1381/ff + cheat + description:Character 6 - Max ACT + code:7e1382/ff + cheat + description:Character 6 - Max FATE + code:7e1383/ff + cheat + description:Character 7 - Max LEVEL + code:7e140a/ff + cheat + description:Character 7 - Infinite HP + code:7e140e/e7+7e140f/03 + cheat + description:Character 7 - Max HP + code:7e140c/e7+7e140d/03 + cheat + description:Character 7 - Infinite AP + code:7e1412/e7+7e1413/03 + cheat + description:Character 7 - Max AP + code:7e1410/e7+7e1411/03 + cheat + description:Character 7 - Max Str + code:7e1417/ff + cheat + description:Character 7 - Max Vigor + code:7e1418/ff + cheat + description:Character 7 - Max Wisdom + code:7e1419/ff + cheat + description:Character 7 - Max Agil + code:7e141a/ff + cheat + description:Character 7 - Max MAG + code:7e141b/ff + cheat + description:Character 7 - Max Luck + code:7e141c/ff + cheat + description:Character 7 - Max ATK + code:7e141d/e7+7e141e/03 + cheat + description:Character 7 - Max DEF + code:7e141f/e7+7e1420/03 + cheat + description:Character 7 - Max INT + code:7e1421/ff + cheat + description:Character 7 - Max ACT + code:7e1422/ff + cheat + description:Character 7 - Max FATE + code:7e1423/ff + cheat + description:Character 8 - Max LEVEL + code:7e14aa/ff + cheat + description:Character 8 - Infinite HP + code:7e14ae/e7+7e14af/03 + cheat + description:Character 8 - Max HP + code:7e14ac/e7+7e14ad/03 + cheat + description:Character 8 - Infinite AP + code:7e14b2/e7+7e14b3/03 + cheat + description:Character 8 - Max AP + code:7e14b0/e7+7e14b1/03 + cheat + description:Character 8 - Max Str + code:7e14b7/ff + cheat + description:Character 8 - Max Vigor + code:7e14b8/ff + cheat + description:Character 8 - Max Wisdom + code:7e14b9/ff + cheat + description:Character 8 - Max Agil + code:7e14ba/ff + cheat + description:Character 8 - Max MAG + code:7e14bb/ff + cheat + description:Character 8 - Max Luck + code:7e14bc/ff + cheat + description:Character 8 - Max ATK + code:7e14bd/e7+7e14be/03 + cheat + description:Character 8 - Max DEF + code:7e14bf/e7+7e14c0/03 + cheat + description:Character 8 - Max INT + code:7e14c1/ff + cheat + description:Character 8 - Max ACT + code:7e14c2/ff + cheat + description:Character 8 - Max FATE + code:7e14c3/ff + +cartridge sha256:fede9d4aec8c35ed11e2868c3c517bce53ee3e6af724085c92500e99e43e63de + name:Breath of Fire II (USA) + cheat + description:Infinite HP in battle + code:c213c7/a5 + cheat + description:Infinite AP In menu + code:c38323/bf + cheat + description:Infinite AP In battle + code:c20ac0/b9 + cheat + description:Main character is different + code:c00acc/28+c00acc/27+c00acc/10+c00acc/12+c00acc/14 + cheat + description:Start with 50 HP + code:c00ac6/32 + cheat + description:Start with 100 HP + code:c00ac6/64 + cheat + description:Start with 150 HP + code:c00ac6/96 + cheat + description:Start with 250 HP + code:c00ac6/fa + cheat + description:Start with 500 HP + code:c00ac7/01+c00ac6/f4 + cheat + description:Start with 750 HP + code:c00ac7/02+c00ac6/ee + cheat + description:Start with a lot of HP + code:c00ac7/1f + cheat + description:Start with 50 AP + code:c00aca/32 + cheat + description:Start with 100 AP + code:c00aca/64 + cheat + description:Start with 150 AP + code:c00aca/96 + cheat + description:Start with 250 AP + code:c00aca/fa + cheat + description:Start with 500 AP + code:c00acb/01+c00aca/f4 + cheat + description:Start with 750 AP + code:c00acb/02+c00aca/ee + cheat + description:Start with a lot of AP + code:c00acb/1f + cheat + description:Start with 0 strength + code:c00acd/00 + cheat + description:Start with Mega strength + code:c00acd/ff + cheat + description:Start with 0 stamina + code:c00ace/00 + cheat + description:Start with Mega stamina + code:c00ace/ff + cheat + description:Start with 0 agility + code:c00acf/00 + cheat + description:Start with Mega agility + code:c00acf/ff + cheat + description:Start with 0 wisdom + code:c00ae8/00 + cheat + description:Start with Mega wisdom + code:c00ae8/ff + cheat + description:Start with 0 luck + code:c00ae9/00 + cheat + description:Start with Mega luck + code:c00ae9/ff + cheat + description:Start with Mega EXP + code:c00aec/ff + cheat + description:No random battles + code:7e12dc/00 + cheat + description:Infinite Fishing Rod power + code:7e128c/60 + cheat + description:Have all warp points + code:7e5670/ff+7e5671/ff+7e5672/ff+7e5673/ff + cheat + description:Have all Shamans + code:7e5695/ff + cheat + description:Infinite Shaman use + code:7e5696/00+7e5697/00+7e5698/00+7e5699/00+7e569a/00+7e569b/00 + cheat + description:Have all non-shop tenants + code:7e55eb/de+7e55ec/7b+7e55ed/77+7e55ee/0b + cheat + description:Character 1 - No Status Effects + code:7e51e5/00 + cheat + description:Character 1 - Level 99 + code:7e51e7/63 + cheat + description:Character 1 - Infinite HP + code:7e51e8/0f+7e51e9/27 + cheat + description:Character 1 - Maximum HP + code:7e51ea/0f+7e51eb/27 + cheat + description:Character 1 - Infinite AP + code:7e51ec/0f+7e51ed/27 + cheat + description:Character 1 - Maximum AP + code:7e51ee/0f+7e51ef/27 + cheat + description:Character 1 - 255 Str + code:7e51f1/ff + cheat + description:Character 1 - 255 Stmna + code:7e51f2/ff + cheat + description:Character 1 - 255 Agil + code:7e51f3/ff + cheat + description:Character 1 - 9999 Off + code:7e5202/0f+7e5203/27 + cheat + description:Character 1 - 9999 Def + code:7e5204/0f+7e5205/27 + cheat + description:Character 1 - 9999 Vigor + code:7e5206/0f+7e5207/27 + cheat + description:Character 1 - 255 Temporary Wisdom + code:7e5208/ff + cheat + description:Character 1 - 255 Temporary Luck + code:7e5209/ff + cheat + description:Character 1 - 255 Permanant Wisdom (next time you change equipment) + code:7e520c/ff + cheat + description:Character 1 - 255 Permanant Luck (next time you change equipment) + code:7e520d/ff + cheat + description:Character 1 - Maximum Guts + code:7e520b/ff + cheat + description:Character 1 - 9999999 EXP + code:7e520e/7f+7e520f/96+7e5210/98 + cheat + description:Character 1 - Maximum Jewel color + code:7e520a/ff + cheat + description:Character 2 - No Status Effects + code:7e5225/00 + cheat + description:Character 2 - Level 99 + code:7e5227/63 + cheat + description:Character 2 - Infinite HP + code:7e5228/0f+7e5229/27 + cheat + description:Character 2 - Maximum HP + code:7e522a/0f+7e522b/27 + cheat + description:Character 2 - Infinite AP + code:7e522c/0f+7e522d/27 + cheat + description:Character 2 - Maximum AP + code:7e522e/0f+7e522f/27 + cheat + description:Character 2 - 255 Str + code:7e5231/ff + cheat + description:Character 2 - 255 Stmna + code:7e5232/ff + cheat + description:Character 2 - 255 Agil + code:7e5233/ff + cheat + description:Character 2 - 9999 Off + code:7e5242/0f+7e5243/27 + cheat + description:Character 2 - 9999 Def + code:7e5244/0f+7e5245/27 + cheat + description:Character 2 - 9999 Vigor + code:7e5246/0f+7e5247/27 + cheat + description:Character 2 - 255 Temporary Wisdom + code:7e5248/ff + cheat + description:Character 2 - 255 Temporary Luck + code:7e5249/ff + cheat + description:Character 2 - 255 Permanant Wisdom (next time you change equipment) + code:7e524c/ff + cheat + description:Character 2 - 255 Permanant Luck (next time you change equipment) + code:7e524d/ff + cheat + description:Character 2 - Maximum Guts + code:7e524b/ff + cheat + description:Character 2 - 9999999 EXP + code:7e524e/7f+7e524f/96+7e5250/98 + cheat + description:Character 2 - Maximum Jewel color + code:7e524a/ff + cheat + description:Character 3 - No Status Effects + code:7e5265/00 + cheat + description:Character 3 - Level 99 + code:7e5267/63 + cheat + description:Character 3 - Infinite HP + code:7e5268/0f+7e5269/27 + cheat + description:Character 3 - Maximum HP + code:7e526a/0f+7e526b/27 + cheat + description:Character 3 - Infinite AP + code:7e526c/0f+7e526d/27 + cheat + description:Character 3 - Maximum AP + code:7e526e/0f+7e526f/27 + cheat + description:Character 3 - 255 Str + code:7e5271/ff + cheat + description:Character 3 - 255 Stmna + code:7e5272/ff + cheat + description:Character 3 - 255 Agil + code:7e5273/ff + cheat + description:Character 3 - 9999 Off + code:7e5282/0f+7e5283/27 + cheat + description:Character 3 - 9999 Def + code:7e5284/0f+7e5285/27 + cheat + description:Character 3 - 9999 Vigor + code:7e5286/0f+7e5287/27 + cheat + description:Character 3 - 255 Temporary Wisdom + code:7e5288/ff + cheat + description:Character 3 - 255 Temporary Luck + code:7e5289/ff + cheat + description:Character 3 - 255 Permanant Wisdom (next time you change equipment) + code:7e528c/ff + cheat + description:Character 3 - 255 Permanant Luck (next time you change equipment) + code:7e528d/ff + cheat + description:Character 3 - Maximum Guts + code:7e528b/ff + cheat + description:Character 3 - 9999999 EXP + code:7e528e/7f+7e528f/96+7e5290/98 + cheat + description:Character 3 - Maximum Jewel color + code:7e528a/ff + cheat + description:Character 4 - No Status Effects + code:7e52a5/00 + cheat + description:Character 4 - Level 99 + code:7e52a7/63 + cheat + description:Character 4 - Infinite HP + code:7e52a8/0f+7e52a9/27 + cheat + description:Character 4 - Maximum HP + code:7e52aa/0f+7e52ab/27 + cheat + description:Character 4 - Infinite AP + code:7e52ac/0f+7e52ad/27 + cheat + description:Character 4 - Maximum AP + code:7e52ae/0f+7e52af/27 + cheat + description:Character 4 - 255 Str + code:7e52b1/ff + cheat + description:Character 4 - 255 Stmna + code:7e52b2/ff + cheat + description:Character 4 - 255 Agil + code:7e52b3/ff + cheat + description:Character 4 - 9999 Off + code:7e52c2/0f+7e52c3/27 + cheat + description:Character 4 - 9999 Def + code:7e52c4/0f+7e52c5/27 + cheat + description:Character 4 - 9999 Vigor + code:7e52c6/0f+7e52c7/27 + cheat + description:Character 4 - 255 Temporary Wisdom + code:7e52c8/ff + cheat + description:Character 4 - 255 Temporary Luck + code:7e52c9/ff + cheat + description:Character 4 - 255 Permanant Wisdom (next time you change equipment) + code:7e52cc/ff + cheat + description:Character 4 - 255 Permanant Luck (next time you change equipment) + code:7e52cd/ff + cheat + description:Character 4 - Maximum Guts + code:7e52cb/ff + cheat + description:Character 4 - 9999999 EXP + code:7e52ce/7f+7e52cf/96+7e52d0/98 + cheat + description:Character 4 - Maximum Jewel color + code:7e52ca/ff + +cartridge sha256:0a07808939e77d8c4a13a6ec7bbc008ee758cd209f8404411bf15d225453beee + name:BS Zelda no Densetsu - Dai-3-wa (Japan) (BS) + cheat + description:Disable the 57 minute time limit + code:cc0005/ea+cc0006/ea+cc0007/80 + +cartridge sha256:811cbc3287c0959e8eb242e817684d36de664ebebc5873a1fa9958693857c438 + name:Bubsy in - Claws Encounters of the Furred Kind (USA) + cheat + description:Infinite lives + code:8e996d/00 + cheat + description:Infinite time + code:809b29/00 + cheat + description:Numbered t-shirts worth one more + code:8281ae/38 + cheat + description:Bogus jump + code:8e8592/52 + cheat + description:Super-jump + code:8e8592/36 + cheat + description:Mega-jump + code:8e8592/2e + cheat + description:Each yarn ball worth 0 + code:828144/00 + cheat + description:Each yarn ball worth 5 + code:828144/05 + cheat + description:Each yarn ball worth 10 + code:828144/10 + cheat + description:Crate of yarn holds 0 instead of 25 + code:828856/00 + cheat + description:Crate of yarn holds 50 + code:828856/50 + cheat + description:Crate of yarn holds 75 + code:828856/75 + cheat + description:Crate of yarn holds 99 + code:828856/99 + cheat + description:Start with 1 life + code:80e022/00 + cheat + description:Start with 5 lives + code:80e022/04 + cheat + description:Start with 25 lives + code:80e022/24 + cheat + description:Start with 50 lives + code:80e022/50 + cheat + description:Start with 75 lives + code:80e022/75 + cheat + description:Start on chapter 2 + code:87800f/01 + cheat + description:Start on chapter 3 + code:87800f/02 + cheat + description:Start on chapter 4 + code:87800f/03 + cheat + description:Start on chapter 5 + code:87800f/04 + cheat + description:Start on chapter 6 + code:87800f/05 + cheat + description:Start on chapter 7 + code:87800f/06 + cheat + description:Start on chapter 8 + code:87800f/08 + cheat + description:Start on chapter 9 + code:87800f/0a + cheat + description:Start on chapter 10 + code:87800f/0c + cheat + description:Start on chapter 11 + code:87800f/0d + cheat + description:Start on chapter 12 + code:87800f/0e + cheat + description:Start on chapter 13 + code:87800f/0f + cheat + description:Start on chapter 14 + code:87800f/10 + cheat + description:Start on Chapter 15 + code:87800f/11 + cheat + description:Start on Chapter 16 + code:87800f/12 + +cartridge sha256:2357d344af77d25dda030520ce203045fd9060f83e3b9609a228dba859d9017b + name:Bubsy II (USA) + cheat + description:Invincibility + code:c0f575/8d + cheat + description:Infinite health + code:c00b70/b1 + cheat + description:Infinite lives + code:c004b3/ad + cheat + description:Infinite time in most main levels + code:c06e30/ad+c06e1f/ad + cheat + description:Infinite time in some bonus levels + code:c070a9/ad + cheat + description:Infinite Warp Holes + code:c101f8/ad + cheat + description:Infinite Diving Suits + code:c061df/ad + cheat + description:Infinite Smart Bombs + code:c13060/ad + cheat + description:Infinite ammo for Nerf Gun + code:c12d3a/ad + cheat + description:Infinite health (alt) + code:7e1188/04 + cheat + description:Infinite lives (alt) + code:7e3422/09 + +cartridge sha256:49020695a017acc3dfadea97a60e28609e583571f69c5abeb3c6b1c2db8113fa + name:Bugs Bunny - Rabbit Rampage (USA) + cheat + description:Invincibility + code:8085cf/d0 + cheat + description:Infinite energy + code:80b4a7/ad + cheat + description:Infinite lives + code:80cfe1/00 + cheat + description:Infinite lives (alt) + code:80cfe3/ad + cheat + description:Take minimal damage + code:80b4a7/ce + cheat + description:Full energy from carrots + code:80b4be/00 + cheat + description:Moon jumping Bugs + code:809929/14 + cheat + description:Super-jumping Bugs + code:809929/40+809930/f4 + cheat + description:Start and continue with 10 lives + code:808241/0a + cheat + description:Start and continue with 2 lives + code:808241/02 + +cartridge sha256:ba4f31353e0e1233b574391ad97a80901d7de212e2c55d7be2af11a9a57c8225 + name:Bulls vs Blazers and the NBA Playoffs (USA) + cheat + description:Never miss a shot + code:84828a/00 + +cartridge sha256:d6f6c30732dae8d00cd83628c3156acbdf26f99df701f779522e21de74dae5fe + name:Bust-A-Move (USA) + cheat + description:Infinite continues + code:0fb467/ad + cheat + description:Infinite time to shoot each ball + code:00ebbe/ea + cheat + description:Always get max bonus in shooting rounds + code:00bcea/ea + cheat + description:Shot guide is always on (new 1P game) + code:00b993/ee + cheat + description:Shot guide is always on (password game) + code:00b90f/ee + cheat + description:Shot guide is always on ("challenge record" mode) + code:05e8ff/ee + +cartridge sha256:9590110a990e90f525d5c8d70fc2a3da10879378003173b6761afb8bf042ee0d + name:Capcom's MVP Football (USA) + cheat + description:Cannot be tackled (hold B) + code:01c4e5/e0+01c4e4/30+01c4e1/ad+01c4e2/07+01c4e3/13 + +cartridge sha256:2a117951adcfbc4298763673a834d502c3f7a3964db1e59650f113c07bb831fb + name:Captain America and the Avengers (USA) + cheat + description:Invincibility - both players + code:81eab7/60+81c2c1/80+81c382/bd + cheat + description:Infinite lives - both players + code:81b3eb/ad + cheat + description:Invincibility - P1 + code:7e16a8/20 + cheat + description:Invincibility - P2 + code:7e16a9/63 + cheat + description:Infinite health - P1 + code:7e0226/63 + cheat + description:Infinite health - P2 + code:7e0227/63 + cheat + description:Infinite lives - P1 + code:7e0229/09 + cheat + description:Infinite lives - P2 + code:7e022a/09 + cheat + description:Hit anywhere + code:81b1f6/ad+81b1f8/0a+81b1f7/fa+81b1f9/f0 + +cartridge sha256:d9b7f9356be0780f0037093a86ef8450f15e569cbd3680073d1cd345dfadb709 + name:Captain Commando (USA) + cheat + description:Invincibility - p1 + code:c028f4/a9+c028f5/04+c028f6/9d + cheat + description:Hit anywhere (throws are disabled) + code:c0126a/80+c01458/80+c014c1/80+c01459/57 + cheat + description:One hit kills - Both players + code:c0152c/38+c0152d/e9+c0152e/80 + cheat + description:Invincibility - P1 (alt) + code:7e0404/03 + cheat + description:Infinite health - P1 + code:7e0895/32 + cheat + description:Infinite health - P2 + code:7e0893/32 + cheat + description:9 lives - P1 + code:7e0b15/09 + cheat + description:9 lives - P2 + code:7e0b13/09 + cheat + description:9 continues + code:7e1d5a/39 + +cartridge sha256:8784614896e2b3e8d98c8166613ca5d2329643795a4dc107791c58c6c51e1268 + name:Captain Novolin (USA) (En,Fr,Es) + cheat + description:Invincibility + code:7e0c02/29 + cheat + description:Infinite health + code:7e0bda/04 + cheat + description:Infinite time + code:7e16f2/00 + +cartridge sha256:be2bdb03549665136cc91173ac538b41b3085e0f1f6b02d6567d174b5b78e435 + name:Caravan Shooting Collection (Japan) + cheat + description:Hector 87 - Infinite health + code:7e00e5/10 + cheat + description:Hector 87 - Infinite lives + code:7e00e4/02 + cheat + description:Star Force - Invincibility + code:7e09ca/01 + cheat + description:Star Force - Always have powered-up weapon + code:7e099e/01 + cheat + description:Star Force - Infinite lives + code:7e094d/02 + cheat + description:Star Force - No enemies (disable before reaching the boss) + code:7e0963/05 + cheat + description:Star Soldier - Invincibility + code:7e0086/39 + cheat + description:Star Soldier - Infinite lives + code:7e062f/02 + cheat + description:Star Soldier - Rapid fire + code:7e0630/00 + cheat + description:Star Soldier - Ship is always blue + code:7e0087/00 + cheat + description:Star Soldier - No enemies except bosses + code:7e062e/00 + +cartridge sha256:ee5fc27dd19a2ecb3c3c7c73d558a18ffd5ff365710c18b88150e277f08d587e + name:Carrier Aces (USA) + cheat + description:Invincibility (works for dogfights and ship fire) + code:00f60d/00+00f2f8/80 + cheat + description:Infinite fuel + code:009ae6/ad + cheat + description:Infinite rockets + code:00a85e/ea + +cartridge sha256:b9b982cd8f91c51089d49b550f11882b1ee785ebddcb7355cfc465916d61a042 + name:Casper (USA) + cheat + description:Infinite lives + code:9dd970/ad + cheat + description:Infinite health + code:9dd966/ad + cheat + description:Infinite health (alt) + code:7e1ab7/06 + cheat + description:Have all items and 5 lives after you leave the first room + code:88caa0/d0 + cheat + description:Do not need the girl in the room to transform + code:7e1a47/00 + +cartridge sha256:367725a149a471411e4f72ad77603b61fb101c9cab4521be5647e13708cc97ba + name:Castlevania - Dracula X (USA) + cheat + description:Invincibility + code:848251/d0 + cheat + description:Invincibility after one hit + code:848253/a5 + cheat + description:Infinite health + code:84850c/a5 + cheat + description:Infinite lives + code:80cc1f/a5 + cheat + description:All hearts worth 99 + code:83d974/d0+83d975/00 + cheat + description:Keep sub-weapon after dying + code:80cc2c/a5 + cheat + description:Keep sub-weapon after continue + code:80b57c/a5 + cheat + description:Item Crash doesn't use hearts + code:84cb81/a5 + cheat + description:Hit anywhere + code:83db48/00+83db29/00 + cheat + description:Small hearts worth 0 + code:83d95e/00 + cheat + description:Small hearts worth 10 + code:83d95e/10 + cheat + description:Small hearts worth 25 + code:83d95e/25 + cheat + description:No Invincibility after getting hit + code:848616/00 + cheat + description:More invincibility after getting hit + code:848616/ff + cheat + description:Super jump + code:84b23e/f9 + cheat + description:Super-Duper jump + code:84b23e/f8 + cheat + description:Mega-jump + code:86ba3e/f7 + cheat + description:Have the Axe + code:7e00a4/01 + cheat + description:Have the Cross + code:7e00a4/02 + cheat + description:Have the Holy Water + code:7e00a4/03 + cheat + description:Have the Knife + code:7e00a4/04 + cheat + description:Have the Clock + code:7e00a4/05 + cheat + description:Have the Key + code:7e00a4/06 + cheat + description:Start with half energy + code:80dd6d/20 + cheat + description:Start with 1/4 energy + code:80dd6d/12 + cheat + description:Start with 3/4 energy + code:80dd6d/30 + cheat + description:Start with 99 hearts + code:80b56d/80 + cheat + description:Start with 50 hearts + code:80b56d/50 + cheat + description:Start with 25 hearts + code:80b56d/25 + cheat + description:Start with 1 life + code:80b572/00 + cheat + description:Start with 10 lives + code:80b572/09 + cheat + description:Start with 25 lives + code:80b572/24 + cheat + description:Start with 50 lives + code:80b572/49 + cheat + description:Start with 99 lives + code:80b572/99 + cheat + description:Start with 25 hearts after you die + code:80cc28/25 + cheat + description:Start with 50 hearts after you die + code:80cc28/50 + cheat + description:Start with 99 hearts after you die + code:80cc28/99 + cheat + description:Start on level 2 + code:7e0078/01 + cheat + description:Start on level 3 + code:7e0078/02 + cheat + description:Start on level 4 + code:7e0078/03 + cheat + description:Start on level 5 + code:7e0078/04 + cheat + description:Start on level 6 + code:7e0078/05 + cheat + description:Start on level 7 + code:7e0078/06 + +cartridge sha256:f6e308d437f89059986d779d1b5b7a30999b7a819108da91bd313f25e231c3a8 + name:Chaos Seed - Feng Shui Kairouki (Japan) + cheat + description:Invincibility + code:c35a85/af + cheat + description:Infinite time + code:c49da4/ad + +cartridge sha256:aa69d4e19c2eb206fe88eba65994c830256c220e5506f59824aefa0a75dd44d5 + name:Chavez (USA) + cheat + description:Infinite time + code:7e1f93/15 + +cartridge sha256:ee0e51d922d1cf8abe3dfc6b0d84a988a6635dc96b2a96962007c41aaa542774 + name:Chessmaster, The (USA) + cheat + description:White player's timer is stopped + code:00a43e/a5 + cheat + description:Black player's timer is stopped + code:00a454/a5 + cheat + description:Timers count 2x as slow + code:00a42a/78 + cheat + description:Timers count 3x times as slow + code:00a42a/b4 + cheat + description:Timers count 2x as fast + code:00a42a/1e + cheat + description:Timers count 3x times as fast + code:00a42a/14 + +cartridge sha256:c7e7df8932bf0056aa530f3dc3c913c1171a359af4c197094c2b972946dc6051 + name:Chester Cheetah - Too Cool to Fool (USA) + cheat + description:Invincibility (blinking) (you may freeze if you get the guitar and fall in water) + code:018548/ea + cheat + description:Infinite life points + code:019512/ea + cheat + description:Infinite credits + code:008918/cd + cheat + description:Badges worth 5 + code:02847c/05 + cheat + description:Badges worth 25 + code:02847c/25 + cheat + description:Badges worth 50 + code:02847c/50 + cheat + description:Start with 2 life points + code:018454/02 + cheat + description:Start with 0 life points + code:018454/00 + +cartridge sha256:21a2aa488cb8140ca318f7d1f513103d14e758181aa336a594097d32ba0a7587 + name:Chester Cheetah - Wild Wild Quest (USA) + cheat + description:Invincibility (once you eat a bag of Cheetos) + code:00aea1/ae + cheat + description:Infinite Cheetos bags (once you collect one) + code:00b8d4/ad + cheat + description:Infinite time + code:0093db/ad + cheat + description:Infinte lives + code:0094af/ad + +cartridge sha256:9a064b67f522b75b82d0857519c0e33b4dbbe494c2ef79a44fdc913d605d0b26 + name:Choplifter III - Rescue-Survive (USA) + cheat + description:Have all weapons and infinte ammo + code:808e33/00+808e46/00 + cheat + description:Infinite secondary weapons + code:808f48/ea + cheat + description:Infinite choppers + code:808d0e/ad + cheat + description:Chopper can carry 30 hostages + code:8fab31/1e+8fad65/1e + cheat + description:Invincibility + code:7e0ceb/5a + +cartridge sha256:224572832b988f31a81c907f751f0292f5702a3acea5866ce6742387c7c6239d + name:Choujikuu Yousai Macross - Scrambled Valkyrie (Japan) + cheat + description:Infinite health + code:8088b6/ad+80885f/ad + cheat + description:Infinite absorb charge + code:819ad8/ad + cheat + description:Hit anywhere + code:808f94/00+808f7a/00+808f88/00 + cheat + description:Invincibility + code:7e0a90/ff + cheat + description:Infinite continues + code:7e02aa/09 + +cartridge sha256:06d1c2b06b716052c5596aaa0c2e5632a027fee1a9a28439e509f813c30829a9 + name:Chrono Trigger (USA) + cheat + description:Party does not lose health from attacks (nor do some enemies) + code:c1eca0/ea + cheat + description:Use "organize" to get 90 of all items + code:c2ab8e/98+c2ab9c/00+c2ab9e/5a + cheat + description:Maxed out abilities for all characters + code:c1f79b/87 + cheat + description:Attacks cause 9999 damage (including enemy attacks) + code:c1dce9/9e + cheat + description:Can open sealed chests + code:c064ad/80 + cheat + description:Can open sealed doors + code:c0644c/80 + cheat + description:All portals open + code:7f00a6/07 + cheat + description:Have all cats + code:7f0053/ff + cheat + description:Have all clones + code:7f005e/ff + cheat + description:Have all factory dolls + code:7f013c/c7 + cheat + description:Have all PoYoZo's + code:7f005d/ff + cheat + description:Start with a higher max HP + code:cc0005/ff + cheat + description:Start with a higher max MP + code:cc0009/8e + cheat + description:Start with max power + code:cc000b/90 + cheat + description:Start with max stamina + code:cc000c/90 + cheat + description:Start with max speed + code:cc000d/90 + cheat + description:Start with max magic + code:cc000e/90 + cheat + description:Start with max hit ratio + code:cc000f/90 + cheat + description:Start with max evade + code:cc0010/90 + cheat + description:Start with max magic defense + code:cc0011/90 + cheat + description:Position 1 - Infinite health + code:7e5e30/e7+7e5e31/03 + cheat + description:Position 1 - Infinite Magic + code:7e5e34/63 + cheat + description:Position 1 - Attack bar always full + code:7eafab/00 + cheat + description:Position 2 - Infinite health + code:7e5eb0/e7+7e5eb1/03 + cheat + description:Position 2 - Infinite Magic + code:7e5eb4/63 + cheat + description:Position 2 - Attack bar always full + code:7eafac/00 + cheat + description:Position 3 - Infinite health + code:7e5f30/e7+7e5f31/03 + cheat + description:Position 3 - Infinite Magic + code:7e5f34/63 + cheat + description:Position 3 - Attack bar always full + code:7eafad/00 + cheat + description:Infinite Silver Points + code:7f0052/ff + cheat + description:Infinite Speed Boosts + code:7e009a/03 + cheat + description:Instantly enable next Speed Boost + code:7e00ba/00 + +cartridge sha256:63ab79e86ea13e2cf9bb67aec971febb68450db9865b00b5f412610653822393 + name:Chuck Rock (USA) + cheat + description:Infinite health + code:00c36d/a5 + cheat + description:Infinite lives + code:00c395/a5 + cheat + description:Hit anywhere + code:00c1a9/00+00c1fe/00 + cheat + description:Jump higher + code:00a35c/34 + cheat + description:Super-jump + code:00a35c/25 + cheat + description:Mega-jump + code:00a35c/17 + cheat + description:Invincibility + code:7e0baa/25 + +cartridge sha256:8b7525b2aa30cbea9e3deee601dd26e0100b8169c1948f19866be15cae0ac00d + name:Clay Fighter (USA) + cheat + description:Infinite health - P1 + code:da4095/ad+da738f/ad + cheat + description:Enable Blob's Bomb move (away, away + down, down, towards + down, towards, punch) + code:00b442/8d + cheat + description:Always fight Bad Mr. Frosty after 1st match + code:da2ecc/00+db5faf/00 + cheat + description:Always fight Taffy after 1st match + code:da2ecc/00+db5faf/01 + cheat + description:Always fight Tiny after 1st match + code:da2ecc/00+db5faf/02 + cheat + description:Always fight The Blob after 1st match + code:da2ecc/00+db5faf/03 + cheat + description:Always fight Blue Suede Goo after 1st match + code:da2ecc/00+db5faf/04 + cheat + description:Always fight Ickybod Clay after 1st match + code:da2ecc/00+db5faf/05 + cheat + description:Always fight Helga after 1st match + code:da2ecc/00+db5faf/06 + cheat + description:Always fight Bonker after 1st match + code:da2ecc/00+db5faf/07 + cheat + description:Always fight N. Boss after 1st match + code:da2ecc/00+db5faf/08 + cheat + description:Start with 1/6 health - 1st round + code:db1f3e/10 + cheat + description:Start with 1/3 health - 1st round + code:db1f3e/20 + cheat + description:Start with 1/2 health - 1st round + code:db1f3e/30 + cheat + description:Start with 2/3 health - 1st round + code:db1f3e/40 + cheat + description:Start with 5/6 health - 1st round + code:db1f3e/50 + cheat + description:Start with 1/6 health - 2nd and later rounds + code:da2bc1/10 + cheat + description:Start with 1/3 health - 2nd and later rounds + code:da2bc1/20 + cheat + description:Start with 1/2 health - 2nd and later rounds + code:da2bc1/30 + cheat + description:Start with 2/3 health - 2nd and later rounds + code:da2bc1/40 + cheat + description:Start with 5/6 health - 2nd and later rounds + code:da2bc1/50 + cheat + description:Bad Mr. Frosty's Brutal Punches do more damage + code:db278a/30+db278b/30+db278c/30+db278d/30+db278e/30 + cheat + description:Bad Mr. Frosty's Medium Punches do more damage + code:db278f/30+db2790/30+db2791/30+db2792/30+db2793/30 + cheat + description:Bad Mr. Frosty's Quick Punches do more damage + code:db2794/30+db2795/30+db2796/30+db2797/30+db2798/30 + cheat + description:Bad Mr. Frosty's Brutal Kicks do more damage + code:db2799/30+db279a/30+db279b/30+db279c/30+db279d/30 + cheat + description:Bad Mr. Frosty's Medium Kicks do more damage + code:db279e/30+db279f/30+db27a0/30+db27a1/30+db27a2/30 + cheat + description:Bad Mr. Frosty's Quick Kicks do more damage + code:db27a3/30+db27a4/30+db27a5/30+db27a6/30+db27a7/30 + cheat + description:Bad Mr. Frosty's Snow Ball (all punches) does more damage + code:db27a8/30 + cheat + description:Taffy's Brutal Punches do more damage + code:db27b2/30+db27b3/30+db27b4/30+db27b5/30+db27b6/30 + cheat + description:Taffy's Medium Punches do more damage + code:db27b7/30+db27b8/30+db27b9/30+db27ba/30+db27bb/30 + cheat + description:Taffy's Quick Punches do more damage + code:db27bc/30+db27bd/30+db27be/30+db27bf/30+db27c0/30 + cheat + description:Taffy's Brutal Kicks do more damage + code:db27c1/30+db27c2/30+db27c3/30+db27c4/30+db27c5/30 + cheat + description:Taffy's Medium kick does more damage + code:db27c6/30+db27c7/30+db27c8/30+db27c9/30+db27ca/30 + cheat + description:Taffy's Quick Kicks do more damage (not in crouch) + code:db27cb/30+db27cc/30+db28cd/30+db27ce/30+db27cf/30 + cheat + description:Taffy's Whack (all punches) does more damage + code:db27d5/30 + cheat + description:Taffy's Whack (all kicks) does more damage + code:db27d6/30 + cheat + description:Tiny's Brutal Punches do more damage + code:db27da/30+db27db/30+db27dc/30+db27dd/30+db27de/30 + cheat + description:Tiny's Medium Punches do more damage + code:db27df/30+db27e0/30+db27e1/30+db27e2/30+db27e3/30 + cheat + description:Tiny's Quick Punches do more damage + code:db27e4/30+db27e5/30+db27e6/30+db27e7/30+db27e8/30 + cheat + description:Tiny's Brutal Kicks do more damage + code:db27e9/30+db27ea/30+db27eb/30+db27ec/30+db27ed/30 + cheat + description:Tiny's Medium Kicks do more damage + code:db27ee/30+db27ef/30+db27f0/30+db27f1/30+db27f2/30 + cheat + description:Tiny's Quick Kicks do more damage + code:db27f3/30+db27f4/30+db27f5/30+db27f6/30+db27f7/30 + cheat + description:Tiny's Medicine Ball Does more damage + code:db27f8/30 + cheat + description:Tiny's Sucker Punch does more damage + code:db27fd/30 + cheat + description:Blob's Brutal Punches do more damage + code:db2802/30+db2803/30+db2804/30+db2805/30+db2806/30 + cheat + description:Blob's Medium Punches do more damage + code:db2807/30+db2808/30+db2809/30+db280a/30+db280b/30 + cheat + description:Blob's Quick Punches do more damage + code:db280c/30+db280d/30+db280e/30+db280f/30+db2810/30 + cheat + description:Blob's Brutal kick does more damage + code:db2811/30+db2812/30+db2813/30+db2814/30+db2815/30 + cheat + description:Blob's Medium Kicks do more damage + code:db2816/30+db2817/30+db2818/30+db2819/30+db281a/30 + cheat + description:Blob's Quick Kicks do more damage + code:db281b/30+db281c/30+db281d/30+db281e/30+db281f/30 + cheat + description:Blue Suede Goo's Brutal Punches do more damage + code:db282a/30+db282b/30+db282c/30+db282d/30+db282e/30 + cheat + description:Blue Suede Goo's Medium Punches do more damage + code:db282f/30+db2830/30+db2831/30+db2832/30+db2833/30 + cheat + description:Blue Suede Goo's Quick Punches do more damage + code:db2834/30+db2835/30+db2836/30+db2837/30+db2838/30 + cheat + description:Blue Suede Goo's Brutal Kicks do more damage + code:db2839/30+db283a/30+db283b/30+db283c/30+db283d/30 + cheat + description:Blue Suede Goo's Medium Kicks do more damage + code:db283e/30+db283f/30+db2840/30+db2841/30+db2842/30 + cheat + description:Blue Suede Goo's Quick Kicks do more damage + code:db2843/30+db2844/30+db2845/30+db2846/30+db2847/30 + cheat + description:Ickybod Clay's Brutal Punches do more damage + code:db2852/30+db2853/30+db2854/30+db2855/30+db2856/30 + cheat + description:Ickybod Clay's Medium Punches do more damage + code:db2857/30+db2858/30+db2859/30+db285a/30+db285b/30 + cheat + description:Ickybod Clay's Quick Punches do more damage + code:db285c/30+db285d/30+db285e/30+db285f/30+db2860/30 + cheat + description:Ickybod Clay's Brutal Kicks do more damage + code:db2861/30+db2862/30+db2863/30+db2864/30+db2865/30 + cheat + description:Ickybod Clay's Medium Kicks do more damage + code:db2866/30+db2867/30+db2868/30+db2869/30+db286a/30 + cheat + description:Ickybod Clay's Quick Kicks do more damage + code:db286b/30+db286c/30+db286d/30+db286e/30+db286f/30 + cheat + description:Ickybod Clay's Ecto Punch does more damage + code:db2871/30 + cheat + description:Helga's Brutal Punches do more damage + code:db287a/30+db287b/30+db287c/30+db287d/30+db287e/30 + cheat + description:Helga's Medium Punches do more damage + code:db287f/30+db2880/30+db2881/30+db2882/30+db2883/30 + cheat + description:Helga's Quick Punches do more damage + code:db2884/30+db2885/30+db2886/30+db2887/30+db2888/30 + cheat + description:Helga's Brutal Kicks do more damage + code:db2889/30+db288a/30+db288b/30+db288c/30+db288d/30 + cheat + description:Helga's Medium Kicks do more damage + code:db288e/30+db288f/30+db2890/30+db2891/30+db2892/30 + cheat + description:Helga's Quick Kicks do more damage (not far away) + code:db2983/30+db2894/30+db2895/30+db2896/30+db2897/30 + cheat + description:Helga's Viking Ram does more damage + code:db289a/30 + cheat + description:Bonker's Brutal Punches do more damage + code:db28a2/30+db28a3/30+db28a4/30+db28a5/30+db28a6/30 + cheat + description:Bonker's Medium Punches do more damage + code:db28a7/30+db28a8/30+db28a9/30+db28aa/30+db28ab/30 + cheat + description:Bonker's Quick Punches do more damage + code:db28ac/30+db28ad/30+db28ae/30+db28af/30+db28b0/30 + cheat + description:Bonker's Brutal Kicks do more damage + code:db28b1/30+db28b2/30+db28b3/30+db28b4/30+db28b5/30 + cheat + description:Bonker's Medium Kicks do more damage + code:db28b6/30+db28b7/30+db28b8/30+db28b9/30+db28ba/30 + cheat + description:Bonker's Quick Kicks do more damage + code:db28bb/30+db28bc/30+db28bd/30+db28be/30+db28bf/30 + cheat + description:Bonker's Cutting Cartwheel does more damage + code:db28c0/30 + +cartridge sha256:2d40c86bc19d85555bf2672acf515b04dbf56a6a59b29ad503e672310b0fae3b + name:Clay Fighter 2 - Judgment Clay (USA) + cheat + description:Select more speed in options + code:c14bbb/20 + cheat + description:Select more difficulty in options + code:c14b98/09 + cheat + description:Both players jump off the screen + code:c07f53/b1 + cheat + description:Infinite health and time + code:c07862/a9+c07865/8d+c07866/28+c07867/18 + cheat + description:Blob - Blob spit kills + code:cd44af/ff + cheat + description:Blob - Buzz saw kills + code:cd44f8/ff + cheat + description:Blob - Rocket-anvil attack kills + code:cd455e/ff + cheat + description:Hoppy - Spinning carrot kills + code:ce9940/ff + cheat + description:Hoppy - Spin kick towards (special move) kills + code:ce9996/ff + cheat + description:Octo - Brutal cartwheel kills (when close) + code:cd6dae/ff + cheat + description:Octo - Ground spin kills + code:cd6e73/ff + +cartridge sha256:1d19e7fbe32eb26181c95fcbb028a5d64797ab65b86568eb059c60b8acf0d702 + name:Claymates (USA) (Sample) + cheat + description:Invincibility + code:cd0225/ad + cheat + description:Infinite time + code:cd678c/ad + cheat + description:Multi-jump (tap jump button) + code:cd06cf/b5 + cheat + description:Infinite lives + code:cd66b8/ad + +cartridge sha256:e5980b990605a9c91fa89101c440b2ec9993329296ba09a9538042d724a080fb + name:Cliffhanger (USA) + cheat + description:Invincibility + code:81894e/f0 + cheat + description:Infinite health + code:81b4fb/ad + cheat + description:Infinite ammo + code:81af0b/ad + cheat + description:Infinite lives + code:81b592/ea + cheat + description:Hit anywhere + code:81b216/00 + cheat + description:One hit kills on normal enemies + code:8297a6/a9+8297a7/01 + cheat + description:Stop snow avalanche (run into it) + code:81b4d2/6b + +cartridge sha256:03f6c69aef92d36b5ea25a6023368da0e1da9fa160e8316ebd533d4f358ffacf + name:Clue (USA) + cheat + description:Always roll a 1 + code:009da1/a9+009da3/ea+009da2/00 + cheat + description:Always roll a 2 + code:009da1/a9+009da3/ea+009da2/01 + cheat + description:Always roll a 3 + code:009da1/a9+009da3/ea+009da2/02 + cheat + description:Always roll a 4 + code:009da1/a9+009da3/ea+009da2/03 + cheat + description:Always roll a 5 + code:009da1/a9+009da3/ea+009da2/04 + cheat + description:Always roll a 6 + code:009da1/a9+009da3/ea+009da2/05 + cheat + description:Allow no interrogations instead of 2 + code:0098ca/90 + cheat + description:Allow only 1 interrogation + code:0098c8/01 + cheat + description:Allow 3 interrogations + code:0098c8/03 + cheat + description:Allow 4 interrogations + code:0098c8/04 + cheat + description:Allow 5 interrogations + code:0098c8/05 + cheat + description:Infinite interrogations + code:00b5ed/b9 + +cartridge sha256:5536cea2da39f2572abe3b0fcf71f8fcd981376b470b174969772aae4a7a1845 + name:College Football USA 97 (USA) + cheat + description:Always 1st down + code:7e1836/05 + cheat + description:Infinite time + code:7e1828/ff + cheat + description:Have 50 points - P1 + code:7fb140/32+7fb726/32 + cheat + description:Have 50 time outs - P1 + code:7fb1c7/32 + +cartridge sha256:b0be35a0d5e500f4fffca5f2940e0ec52c81ce99dacd773c3ca9cf92f592d943 + name:College Slam (USA) + cheat + description:Infinite Shot Clock + code:7e0db1/03+7e0db3/05 + cheat + description:Unlock Extra Teams + code:7e2444/01 + cheat + description:Display Shot% Power-up + code:7e0b30/01 + cheat + description:Slippery Court Power-up + code:7e0b32/01 + cheat + description:Infinite Turbo - P1 + code:7e078a/20 + cheat + description:Infinite Turbo - P2 + code:7e088a/20 + cheat + description:Infinite Turbo - P3 + code:7e098a/20 + cheat + description:Infinite Turbo - P4 + code:7e0a8a/20 + cheat + description:Power Push Power-up - P1 + code:7e07ee/01 + cheat + description:Power Push Power-up - P2 + code:7e08ee/01 + cheat + description:Power Push Power-up - P3 + code:7e09ee/01 + cheat + description:Power Push Power-up - P4 + code:7e0aee/01 + cheat + description:3-Point Power-up - P1 + code:7e07ee/02 + cheat + description:3-Point Power-up - P2 + code:7e08ee/02 + cheat + description:3-Point Power-up - P3 + code:7e09ee/02 + cheat + description:3-Point Power-up - P4 + code:7e0aee/02 + cheat + description:Infinite Turbo Power-up - P1 + code:7e07ee/04 + cheat + description:Infinite Turbo Power-up - P2 + code:7e08ee/04 + cheat + description:Infinite Turbo Power-up - P3 + code:7e09ee/04 + cheat + description:Infinite Turbo Power-up - P4 + code:7e0aee/04 + cheat + description:On-Fire Power-up - P1 + code:7e07ee/08 + cheat + description:On-Fire Power-up - P2 + code:7e08ee/08 + cheat + description:On-Fire Power-up - P3 + code:7e09ee/08 + cheat + description:On-Fire Power-up - P4 + code:7e0aee/08 + cheat + description:Super Dunk Power-up - P1 + code:7e07ee/10 + cheat + description:Super Dunk Power-up - P2 + code:7e08ee/10 + cheat + description:Super Dunk Power-up - P3 + code:7e09ee/10 + cheat + description:Super Dunk Power-up - P4 + code:7e0aee/10 + cheat + description:Max Power Power-up - P1 + code:7e07ee/20 + cheat + description:Max Power Power-up - P2 + code:7e08ee/20 + cheat + description:Max Power Power-up - P3 + code:7e09ee/20 + cheat + description:Max Power Power-up - P4 + code:7e0aee/20 + cheat + description:Goaltending Power-up - P1 + code:7e07ee/40 + cheat + description:Goaltending Power-up - P2 + code:7e08ee/40 + cheat + description:Goaltending Power-up - P3 + code:7e09ee/40 + cheat + description:Goaltending Power-up - P4 + code:7e0aee/40 + cheat + description:Quick Hands Power-up - P1 + code:7e07ee/80 + cheat + description:Quick Hands Power-up - P2 + code:7e08ee/80 + cheat + description:Quick Hands Power-up - P3 + code:7e09ee/80 + cheat + description:Quick Hands Power-up - P4 + code:7e0aee/80 + cheat + description:Offense Power-up - P1 + code:7e07ef/01 + cheat + description:Offense Power-up - P2 + code:7e08ef/01 + cheat + description:Offense Power-up - P3 + code:7e09ef/01 + cheat + description:Offense Power-up - P4 + code:7e0aef/01 + cheat + description:Super Speed Power-up - P1 + code:7e07ef/02 + cheat + description:Super Speed Power-up - P2 + code:7e08ef/02 + cheat + description:Super Speed Power-up - P3 + code:7e09ef/02 + cheat + description:Super Speed Power-up - P4 + code:7e0aef/02 + cheat + description:Knockdown Both Opponents Power-up - P1 + code:7e07ef/04 + cheat + description:Knockdown Both Opponents Power-up - P2 + code:7e08ef/04 + cheat + description:Knockdown Both Opponents Power-up - P3 + code:7e09ef/04 + cheat + description:Knockdown Both Opponents Power-up - P4 + code:7e0aef/04 + cheat + description:Teleport Pass Power-up - P1 + code:7e07ef/08 + cheat + description:Teleport Pass Power-up - P2 + code:7e08ef/08 + cheat + description:Teleport Pass Power-up - P3 + code:7e09ef/08 + cheat + description:Teleport Pass Power-up - P4 + code:7e0aef/08 + cheat + description:Knockdown Opposite Opponent Power-up - P1 + code:7e07ef/10 + cheat + description:Knockdown Opposite Opponent Power-up - P2 + code:7e08ef/10 + cheat + description:Knockdown Opposite Opponent Power-up - P3 + code:7e09ef/10 + cheat + description:Knockdown Opposite Opponent Power-up - P4 + code:7e0aef/10 + cheat + description:High Shots Power-up - P1 + code:7e07ef/20 + cheat + description:High Shots Power-up - P2 + code:7e08ef/20 + cheat + description:High Shots Power-up - P3 + code:7e09ef/20 + cheat + description:High Shots Power-up - P4 + code:7e0aef/20 + cheat + description:Whirlwind Power-up - P1 + code:7e07ef/80 + cheat + description:Whirlwind Power-up - P2 + code:7e08ef/80 + cheat + description:Whirlwind Power-up - P3 + code:7e09ef/80 + cheat + description:Whirlwind Power-up - P4 + code:7e0aef/80 + cheat + description:All Power-ups except Power Push, On-Fire, Knockdown Both Opponents, Knockdown Opposite Opponent and Whirlwind - P1 + code:7e07ee/f6+7e07ef/2b + cheat + description:All Power-ups except Power Push, On-Fire, Knockdown Both Opponents, Knockdown Opposite Opponent and Whirlwind - P2 + code:7e08ee/f6+7e08ef/2b + cheat + description:All Power-ups except Power Push, On-Fire, Knockdown Both Opponents, Knockdown Opposite Opponent and Whirlwind - P3 + code:7e09ee/f6+7e09ef/2b + cheat + description:All Power-ups except Power Push, On-Fire, Knockdown Both Opponents, Knockdown Opposite Opponent and Whirlwind - P4 + code:7e0aee/f6+7e0aef/2b + cheat + description:All Power-ups - P1 + code:7e07ee/ff+7e07ef/bf + cheat + description:All Power-ups - P2 + code:7e08ee/ff+7e08ef/bf + cheat + description:All Power-ups - P3 + code:7e09ee/ff+7e09ef/bf + cheat + description:All Power-ups - P4 + code:7e0aee/ff+7e0aef/bf + +cartridge sha256:c88a882ad72dfa07a9b1eb8a2183aa10057d60877a02edf90cf2cd8c78abe65e + name:Combatribes, The (USA) + cheat + description:Invincibility - both players + code:009b6c/d0 + cheat + description:Infinite health - both players + code:009a76/ea+009a77/a9+009a78/c8+009a7a/8d + cheat + description:Infinite credits + code:009be9/cd + cheat + description:Hit anywhere - P1 + code:00919e/e0+0091a2/34+00919f/00+0091a0/00+0091a1/f0 + cheat + description:One hit kills - both players + code:00c6eb/e0+00c6ec/00+00c6ed/00+00c6f7/24 + cheat + description:Invincibility - P1 + code:7e1934/01 + cheat + description:Infinite health - P1 + code:7e1794/c8 + cheat + description:Infinite health - P2 + code:7e1796/c8 + cheat + description:Infinite credits (alt) + code:7e1564/09 + cheat + description:Unlock all characters in vs mode + code:7e1ee7/10 + +cartridge sha256:26e09f5bc2bde28d57aeca0bf5be7f7fb8e3b3887af975bcbf2e6f29b07df56f + name:Congo's Caper (USA) + cheat + description:Infinite lives + code:80f2a6/00 + cheat + description:Hit anywhere + code:008b93/00 + cheat + description:Multi-jump + code:00c4d0/00 + cheat + description:Stay as Super Congo (you may change if you walk on spikes) + code:808f58/a9 + cheat + description:1 life after continue + code:809848/00 + cheat + description:6 lives after continue + code:809848/05 + cheat + description:9 lives after continue + code:809848/08 + cheat + description:1 ruby turns you into Super Congo + code:8093d9/a9+8093da/02 + cheat + description:Start as Super Congo + code:809854/82 + cheat + description:Start with 1 life + code:81c4a5/00 + cheat + description:Start with 6 lives + code:81c4a5/05 + cheat + description:Start with 9 lives + code:81c4a5/08 + +cartridge sha256:a93ea87fc835c530b5135c5294433d15eef6dbf656144b387e89ac19cf864996 + name:Contra III - The Alien Wars (USA) + cheat + description:Invincibility (top-view levels) + code:028e65/b5 + cheat + description:Invincibility (side-view levels) - P1 + code:019ae5/b5+01a641/b5 + cheat + description:Invincibility (side-view levels) - P2 + code:01a674/b5+019b87/b5 + cheat + description:Infinite continues + code:00a9c5/ad + cheat + description:Infinite lives (side-view levels) + code:019b91/dd + cheat + description:Infinite lives (top-view levels) + code:029695/dd+029698/80 + cheat + description:Infinite bombs (side-view levels) + code:01802e/dd + cheat + description:Infinite bombs (top-view levels) + code:0291be/dd + cheat + description:Enable 30 and 99 lives in option menu (99 actually gives 35,081 lives) + code:00bb37/05 + cheat + description:Keep main weapon when you die (side-view levels) + code:019ac7/bd + cheat + description:Keep main weapon when you die (top-view levels) + code:0296aa/bd + cheat + description:Multi-jump + code:01856b/ff+01856c/95+01856d/1e+018562/a5+018563/28+018564/29+018565/00+018566/80+018567/f0+018568/05+018569/a9+01856a/fa + cheat + description:Enable stage select + code:00a6ac/24 + cheat + description:Start with 5 bombs on each life (side-view levels) + code:019b97/05+00a2f1/05 + cheat + description:Start with 9 bombs on each life (side-view levels) + code:019b97/09+00a2f1/09 + cheat + description:Start with 5 bombs on each life (top-view levels) + code:028eed/05+00a6f1/05 + cheat + description:Start with 9 bombs on each life (top-view levels) + code:028eed/09+00a6f1/09 + cheat + description:Always have Scatter Blaster for gun 1 (disable during bonus stages) + code:7e1f84/01 + cheat + description:Always have Missile Launcher for gun 1 (disable during bonus stages) + code:7e1f84/02 + cheat + description:Always have Homing Missile for gun 1 (disable during bonus stages) + code:7e1f84/03 + cheat + description:Always have Torch for gun 1 (disable during bonus stages) + code:7e1f84/04 + cheat + description:Always have Laser for gun 1 (disable during bonus stages) + code:7e1f84/05 + cheat + description:Always have Scatter Blaster for gun 2 (disable during bonus stages) + code:7e1f86/01 + cheat + description:Always have Missile Launcher for gun 2 (disable during bonus stages) + code:7e1f86/02 + cheat + description:Always have Homing Missile for gun 2 (disable during bonus stages) + code:7e1f86/03 + cheat + description:Always have Torch for gun 2 (disable during bonus stages) + code:7e1f86/04 + cheat + description:Always have Laser for gun 2 (disable during bonus stages) + code:7e1f86/05 + cheat + description:Enable stage select (alt) + code:7e1e60/01 + cheat + description:Start on stage 2 + code:7e0086/02 + cheat + description:Start on stage 3 + code:7e0086/03 + cheat + description:Start on stage 4 + code:7e0086/04 + cheat + description:Start on stage 5 + code:7e0086/05 + cheat + description:Start on stage 6 + code:7e0086/06 + +cartridge sha256:c7d622391f7699fb0dc6367e141c894e700cc9bd8abca69f36785e7bc2f42a49 + name:Cool Spot (USA) + cheat + description:Infinite health + code:7e00d0/07 + cheat + description:Infinite lives + code:01d8ac/24 + cheat + description:Infinite lives (alt) + code:7e00d4/09 + cheat + description:Infinite time (disable after completing stage) + code:7e00ce/68 + cheat + description:100% Coolness (disable after completing stage) + code:7e00d2/64 + cheat + description:Less invincibility time + code:01b456/1f + cheat + description:More invincibility time + code:01b456/ff + cheat + description:5 seconds picked up + code:01bda1/05 + cheat + description:1 minute picked up + code:01bda1/3c + cheat + description:16% picked up from '7up' + code:01bd5c/10 + cheat + description:Be able to free fellow spot right away + code:01d488/00 + cheat + description:Start with 1 life + code:00d8b9/01 + cheat + description:Start with 6 lives + code:00d8b9/06 + cheat + description:Start with 9 lives + code:00d8b9/09 + +cartridge sha256:9674cc269d89a52d1719a487b44acf004fb777cbd58d76b19a2cd25749728215 + name:Cool World (USA) + cheat + description:Infinite lives + code:029888/ad + cheat + description:Infinite continues + code:009cd6/ad + cheat + description:A Nickel for a life costs nothing (must have 1 Nickel) + code:00b50a/00+00b50b/00 + cheat + description:Bank deposits cost nothing (must have 5 Nickels) + code:00b5a6/00+00b5a7/00 + cheat + description:Opening a bank account costs nothing (must have 10 Nickels) + code:00c887/00+00c888/00 + cheat + description:High-Low game at the Gold Rush costs nothing (must have 5 Nickels) + code:01afb3/00+01afb4/00 + cheat + description:Most Nickels worth 2 on pick-up (must have 5 Nickels) + code:0199ff/02+019a2e/02 + cheat + description:Most Nickels worth 10 on pick-up (must have 5 Nickels) + code:0199ff/0a+019a2e/0a + cheat + description:Continue with 9 lives + code:00b213/09 + cheat + description:Start with 1 life + code:009cf1/01 + cheat + description:Start with 9 lives + code:009cf1/09 + cheat + description:Start with 10 Nickels + code:00b238/e6+00b239/ee + cheat + description:Start with 1 Nickel + code:00b238/e6 + cheat + description:Invincibility (blinking) + code:7e02bf/ff + cheat + description:Infinite Nickels + code:7e00ed/63 + +cartridge sha256:b9d2483ba547b22cb1173ca0895e4fb20b33d1c4cca62526b12d75280dd8501b + name:Cosmo Gang - The Puzzle (Japan) + cheat + description:Clear level automatically + code:01db9b/00 + +cartridge sha256:73533c37fcd3eddce4804eb4c016214d1741c348c349f00d8e6838d341a50df9 + name:Cosmo Gang - The Video (Japan) + cheat + description:Infinite lives + code:7e0200/0a + cheat + description:Weapon modifier + code:7e0d0b/00 + +cartridge sha256:2602f6e598c711aedb2e3a22414b7869a8490993aef32f53127c408e549afc6d + name:Cosmo Police Galivan II - Arrow of Justice (Japan) + cheat + description:Invincibility + code:009623/a9+009624/01+009625/8d+009626/77+009627/12 + cheat + description:Infinite health + code:00ee12/ad + cheat + description:Infinite lives + code:009e67/cd + cheat + description:One hit kills + code:00eacf/9e + cheat + description:Hit anywhere + code:00ea08/24+00e9ea/80+00ea07/80 + cheat + description:Invincibility (alt) + code:7e1277/df + cheat + description:Infinite health (alt) + code:7e126c/60 + cheat + description:Infinite health (alt 2) + code:7e126c/61 + cheat + description:Infinite lives (alt) + code:7e1485/03 + +cartridge sha256:0ac2b8d84a7cd1801d8fb6cb03c07273df4b02c0445e9d69a952bd7ac92eac64 + name:Crayon Shin-chan - Arashi o Yobu Enji (Japan) + cheat + description:Invincibility + code:7e00ba/09 + cheat + description:Infinite health + code:7e0461/04 + cheat + description:Infinite lives + code:7e00b2/09 + cheat + description:Infinite time + code:7e00ac/7f+7e00ad/7f+7e00ae/7f+7e00af/7f + cheat + description:Infinite Invincibility Cards + code:7e00b6/09 + cheat + description:Infinite Guard Dog Cards + code:7e00b7/09 + cheat + description:Infinite Elephant Dance Cards + code:7e00b8/09 + cheat + description:Infinite Health Restore Cards + code:7e00b9/09 + cheat + description:Always carry an item to throw + code:7e00b4/01 + cheat + description:Enemies are always stunned (Elephant Card effect) + code:7e00c0/7f + cheat + description:Guard Dog stay indefinitely + code:7e00c8/7f+7e00c9/7f + cheat + description:Golden Card exists + code:7e00cc/02 + cheat + description:Moon-jump + code:7e00cd/01 + cheat + description:Walk through most walls + code:7e00ce/ff + cheat + description:Always make a choice - Rock, Paper, Scissors minigame + code:7e1f00/01 + cheat + description:Infinite tries - Card Matching minigame + code:7e1943/03 + cheat + description:Infinite time - Jumbled Picture minigame + code:7e1920/7f+7e1921/7f+7e1922/7f + cheat + description:Infinite tries - Card Search minigame + code:7e191a/00 + cheat + description:No blur - Playground Fountain minigame + code:7e190f/01 + cheat + description:Losing still allows you to move forward + code:7e1f07/01 + cheat + description:Instant win - TV Flags minigame + code:7e191a/00 + cheat + description:Very easy wins + code:7e1925/01 + cheat + description:Only need 1 Star to win + code:7e1935/01 + cheat + description:Enemy can't win (0 Stars) + code:7e1937/00 + cheat + description:Enemy always raise both flags + code:7e1930/01+7e1931/01 + +cartridge sha256:7c722f9941957630467c1784d0eb3f92fbfc0a2a1da3c8f5c27f593eca2a5a04 + name:Cutthroat Island (USA) + cheat + description:Stage select menu after character select screen + code:878c9d/ea + cheat + description:Infinite health - P1 + code:7e09f4/28 + cheat + description:Infinite health - P2 + code:7e0a53/28 + cheat + description:Stage select menu after character select screen (alt) + code:878c9d/ea + cheat + description:9 lives - P1 + code:7e1ef7/09 + cheat + description:9 lives - P2 + code:7e1ef9/09 + +cartridge sha256:c4ae2797fac2586b8640064be6398f2b4f2b3158a07f26c66912b29f7fd197de + name:Cyber Spin (USA) + cheat + description:Infinite power + code:019b53/ad+019b75/ad+019b97/ad + cheat + description:Freeze CPU Racers (always first place) + code:01b418/a5+01b470/a5 + cheat + description:Drive anywhere + code:019a8a/ad+019757/ad+0198ab/64 + +cartridge sha256:ad31b94ce928ecff605e2b89082154671691509e95d38370ed381437f2c36698 + name:Cybernator (USA) + cheat + description:Infinite health + code:82a834/bd+82a85d/bd+8293eb/a5 + cheat + description:Protection against some hazards + code:82a85d/bd+82a834/bd + cheat + description:Infinite Vulcan + code:848723/ad+848720/ad + cheat + description:Never overheat + code:829372/ad + cheat + description:Infinite credits + code:80e024/ad + cheat + description:Only 2 P's needed for level 2 Vulcan + code:838462/02 + cheat + description:Only 4 P's needed for level 3 Vulcan + code:838464/04 + cheat + description:Only 3 P's needed for level 3 Laser + code:83846a/03 + cheat + description:Only 3 P's needed for level 3 Missile + code:838470/03 + cheat + description:Only 2 P's needed for level 2 Napalm + code:838474/02 + cheat + description:Only 4 P's needed for level 3 Napalm + code:838476/04 + cheat + description:Only 2 P's needed for level 2 Punch + code:83847a/02 + cheat + description:Only 3 P's needed for level 3 Punch + code:83847c/03 + cheat + description:Energy chip worth nothing + code:82e119/00 + cheat + description:Energy chip worth more + code:82e119/a0 + cheat + description:Weapons start at level 2 + code:809514/02 + cheat + description:Weapons start at level 3 + code:809514/03 + cheat + description:Start with Lasers + code:80951f/8d + cheat + description:Start with Homing Missiles + code:80951c/8d + cheat + description:Start with Napalm + code:809522/8d + cheat + description:Start with 2 credits + code:80956f/01 + cheat + description:Start with 6 credits + code:80956f/05 + cheat + description:Start with 10 credits + code:80956f/09 + cheat + description:Start on level 3.1 + code:80950e/02 + cheat + description:Start on level 3.2 + code:80950e/03 + cheat + description:Start on level 3.3 + code:80950e/04 + cheat + description:Start on level 4.1 + code:80950e/05 + cheat + description:Start on level 4.2 + code:80950e/06 + cheat + description:Start on level 5.1 + code:80950e/07 + cheat + description:Start on level 5.2 + code:80950e/08 + cheat + description:Start on level 6.1 + code:80950e/09 + cheat + description:Start on level 7.3 + code:80950e/10 + cheat + description:Start on level 7.4 + code:80950e/11 + cheat + description:View the failed ending + code:80950e/12 + cheat + description:View the successful ending + code:80950e/13 + +cartridge sha256:71e77fdbd9c865ae07e907549b02549ebe87fa8d436401c485e588c61797754a + name:Cyborg 009 (Japan) + cheat + description:Infinite health + code:7e0ae1/3c + cheat + description:Infinite lives + code:7e1a31/02 + cheat + description:Infinite Super Power + code:7e0ae3/3c + +cartridge sha256:4068add412571bd85adac32dff9835e4a4886077d752adb104fee3908e42b7ef + name:Daffy Duck - The Marvin Missions (USA) + cheat + description:Infinite health + code:80b7e2/ad + cheat + description:Infinite ammo (must have some ammo for the gun to be selectable) + code:80b17c/00 + cheat + description:Infinite lives + code:809be9/00 + cheat + description:Infinite continues + code:82cade/00 + cheat + description:Infinite Nutty attacks + code:80b33b/ad + cheat + description:Hit anywhere + code:80e5e0/00 + cheat + description:Get items from anywhere + code:80da4f/00+80d984/00+80de37/00+80e1a2/00 + cheat + description:One hit kills + code:80b58c/80 + cheat + description:Disable recoil + code:80b257/00 + cheat + description:Juice cans set health to 1/2 + code:80da62/06 + cheat + description:Juice cans set health to 3/4 + code:80da62/09 + cheat + description:Gem power-ups worth 0 + code:80e0aa/00 + cheat + description:Gem power-ups worth 5 (1 continue) + code:80e0aa/05 + cheat + description:Gems are free + code:82c0b8/00 + cheat + description:Freeze Gun ammo is free + code:82c0a9/00 + cheat + description:Freeze Gun ammo is $200 + code:82c0a9/20 + cheat + description:Electricity Gun ammo is free + code:82c0ab/00 + cheat + description:Electricity Gun ammo is $150 + code:82c0ab/15 + cheat + description:3-way Gun ammo is free + code:82c0ad/00 + cheat + description:3-way Gun ammo is $150 + code:82c0ad/15 + cheat + description:Bomb Gun ammo is free + code:82c0af/00 + cheat + description:Bomb Gun ammo is $150 + code:82c0af/15 + cheat + description:Antimatter Gun ammo is free + code:82c0b1/00 + cheat + description:Antimatter Gun ammo is $200 + code:82c0b1/20 + cheat + description:Freeze Gun ammo power-ups are worth 20 + code:80dcb7/20 + cheat + description:Electricity Gun ammo power-ups are worth 20 + code:80dd83/20 + cheat + description:Three-way Gun ammo power-ups are worth 20 + code:80de4f/20 + cheat + description:Bomb Gun ammo power-ups are worth 20 + code:80df1b/20 + cheat + description:Antimatter Gun ammo power-ups are worth 20 + code:80dfe7/20 + cheat + description:Nutty attacks are free + code:82c0b5/00 + cheat + description:Nutty attacks are $400 + code:82c0b5/40 + cheat + description:Jetpack fuel is free + code:82c0b3/00 + cheat + description:Fuel is consumed at 1/4 normal rate + code:80adbb/06 + cheat + description:Fuel is consumed at 1/2 normal rate + code:80adbb/0c + cheat + description:Fuel is consumed at 3/4 normal rate + code:80adbb/12 + cheat + description:Fuel power-ups are worth 1/2 as much + code:80d99c/06 + cheat + description:Fuel power-ups are worth 2x + code:80d99c/1a + cheat + description:Buy a life and get a ton of money + code:82c3be/80 + cheat + description:Bought Freeze Gun ammo is worth 20 + code:82c0f8/20 + cheat + description:Bought gems worth 0 + code:82c38b/00 + cheat + description:Bought gems worth 5 (1 continue) + code:82c38b/05 + cheat + description:Bought Electricity Gun ammo is worth 20 + code:82c159/20 + cheat + description:Bought Three-way Gun ammo is worth 20 + code:82c1ba/20 + cheat + description:Bought Bomb Gun ammo is worth 20 + code:82c21b/20 + cheat + description:Bought Anti matter Gun ammo is worth 20 + code:82c27c/20 + cheat + description:Bought fuel is worth 1/2 as much + code:82c2df/06 + cheat + description:Bought fuel is worth 2x as much + code:82c2df/1a + cheat + description:Extra lives cost $500 + code:82c0ba/00 + cheat + description:Extra lives cost $1,500 + code:82c0ba/01 + cheat + description:Extra life power-ups don't work + code:80dbe8/00 + cheat + description:Extra life power-ups worth 2 + code:80dbe8/02 + cheat + description:Extra life power-ups worth 5 + code:80dbe8/05 + cheat + description:Extra lives can't be bought + code:82c3e7/00 + cheat + description:2 extra lives for each one purchased + code:82c3e7/02 + cheat + description:5 extra lives for each one purchased + code:82c3e7/05 + cheat + description:Start with 1 life + code:809903/01 + cheat + description:Start with 9 lives (don't set lives in options menu) + code:809903/09 + cheat + description:Start with 25 lives (don't set lives in options menu) + code:809903/25 + cheat + description:Start with 51 lives (don't set lives in options menu) + code:809903/51 + cheat + description:Start with 1/2 health + code:809f20/06 + cheat + description:Start with 3/4 health + code:809f20/09 + cheat + description:Start with no nutty attacks + code:809a05/00 + cheat + description:Start with 3 nutty attacks + code:809a05/03 + cheat + description:Start with 5 nutty attacks + code:809a05/05 + cheat + description:Start with 7 nutty attacks + code:809a05/07 + cheat + description:Start with 0 gems + code:809a2e/00 + cheat + description:Start with 10 gems (2 continues) + code:809a2e/10 + cheat + description:Start with 25 gems (5 continues) + code:809a2e/25 + cheat + description:Start with 10 ammo for all Guns (except blaster) + code:809a16/10 + cheat + description:Start with 50 ammo for all Guns + code:809a16/50 + cheat + description:Start with 90 ammo for all Guns + code:809a16/90 + cheat + description:Start with almost no fuel + code:809a29/00 + cheat + description:Start with 2x fuel + code:809a29/1b + cheat + description:Start with 3x fuel + code:809a29/27 + cheat + description:Start with $2,500 + code:809a0c/02 + cheat + description:Start with $3,500 + code:809a0c/03 + cheat + description:Start with $9,500 + code:809a0c/09 + cheat + description:Start with $30,500 + code:809a0c/30 + cheat + description:Start on level 1-2 + code:809951/01 + cheat + description:Start on level 1-3 + code:809951/02 + cheat + description:Start on level 1-4 + code:809951/03 + cheat + description:Start on level 2-1 + code:809951/04 + cheat + description:Start on level 2-2 + code:809951/05 + cheat + description:Start on level 2-3 + code:809951/06 + cheat + description:Start on level 2-4 + code:809951/07 + cheat + description:Start on level 3-1 + code:809951/08 + cheat + description:Start on level 3-2 + code:809951/09 + cheat + description:Start on level 3-3 + code:809951/0a + cheat + description:Start on level 3-4 + code:809951/0b + cheat + description:Start on level 4-1 + code:809951/0c + cheat + description:Start on level 4-2 + code:809951/0d + cheat + description:Start on level 4-3 + code:809951/0e + cheat + description:Start on level 4-4 + code:809951/0f + cheat + description:Start on level 5-1 + code:809951/10 + cheat + description:Start on level 5-2 + code:809951/11 + cheat + description:Start on level 5-3 + code:809951/12 + cheat + description:Start on level 5-4 + code:809951/13 + cheat + description:Invincibility (blinking) + code:7e1f12/05 + cheat + description:Infinite health (alt) + code:7e1f0e/0c + cheat + description:Infinite lives (alt) + code:7e1f10/99 + cheat + description:Infinite continues (alt) + code:7e1f82/99 + cheat + description:Infinite Nutty attacks (alt) + code:7e1f16/07 + cheat + description:Infinite Fuel + code:7e1f45/10 + cheat + description:Infinite money + code:7e00f7/99+7e00f8/99 + cheat + description:Infinite ammo for Freeze Gun + code:7e1f2a/99 + cheat + description:Infinite ammo for Electricity Gun + code:7e1f2c/99 + cheat + description:Infinite ammo for 3-way Gun + code:7e1f2e/99 + cheat + description:Infinite ammo for Bomb Gun + code:7e1f30/99 + cheat + description:Infinite ammo for Antimatter Gun + code:7e1f32/99 + +cartridge sha256:f3527855afea87b29406700b9dab45ebbb48edcb5a01d59cc2b0986abd3b1dd7 + name:Darius Force (Japan) + cheat + description:Invincibility (can make the screen flash if you use both weapons) + code:7e1000/81 + cheat + description:Infinite lives + code:7e0111/03 + +cartridge sha256:ceb470157576eac3b8b8c16e8ab6b59672409681ffb4232e4ec39dd0cb37ef91 + name:Darius Twin (USA) + cheat + description:Invincibility - P1 + code:01d60c/ad + cheat + description:Invincibility - P2 + code:01e3a6/ad + cheat + description:Infinite lives - P1 + code:01ee77/00 + cheat + description:Infinite lives - P2 + code:01ee97/00 + cheat + description:Hit anywhere - both players + code:00dae7/80+00db0e/ad+00dabf/00+00daf1/00 + cheat + description:Start with the strongest main weapon and 8 lives - both players + code:00aee3/ea+00aeea/8d+00aeed/8d+00aee1/a9+00aee2/08 + cheat + description:Start with 1 Green Power Cube - P1 + code:00af06/8d+00aef8/2c + cheat + description:Start with 1 Green Power Cube - P2 + code:00af09/8d+00aef8/2c + cheat + description:Start with 10 lives - both players + code:00aee2/10+00aee1/a9+00aee3/ea + cheat + description:Start with 15 lives - both players + code:00aee2/15+00aee1/a9+00aee3/ea + cheat + description:Start with 20 lives - both players + code:00aee2/20+00aee1/a9+00aee3/ea + cheat + description:Start with 25 lives - both players + code:00aee2/25+00aee1/a9+00aee3/ea + cheat + description:Start on planet B + code:00934c/01+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet C + code:00934c/02+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet D + code:00934c/03+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet E + code:00934c/04+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet F + code:00934c/05+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet G + code:00934c/06+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet H + code:00934c/07+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet I + code:00934c/08+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet J + code:00934c/09+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet K + code:00934c/0a+00934b/a0+00934d/00+00934e/8c + cheat + description:Start on planet L + code:00934c/0b+00934b/a0+00934d/00+00934e/8c + cheat + description:Invincibility - P1 (alt) + code:01d60c/ad + cheat + description:Invincibility - P2 (alt) + code:01e3a6/ad + cheat + description:Start with 99 lives - both players + code:7e1067/99 + cheat + description:Infinite Shield - P1 + code:7e177b/ff + cheat + description:Infinite Shield - P2 + code:7e188b/ff + cheat + description:Max 1st Gun - P1 + code:7e17a4/08 + cheat + description:Max 1st Gun - P2 + code:7e1835/08 + cheat + description:Max 2nd Gun - P1 + code:7e17eb/08 + cheat + description:Max 2nd Gun - P2 + code:7e177c/08 + cheat + description:Start with 1 Green Power Cube - P1 (alt) + code:00aef8/2c+00af06/8d + cheat + description:Start with 1 Green Power Cube - P2 (alt) + code:00aef8/2c+00af09/8d + +cartridge sha256:6c1749b24124f74d3aceefa24297b836b6ee7598fc2094f4d065b3c762c898a4 + name:Dark Law - Meaning of Death (Japan) + cheat + description:Sell an item to get maximum cash + code:c27cea/80+c27ceb/08 + cheat + description:Fewer random battles + code:c338f3/80 + cheat + description:Any code will open locked doors + code:d124a5/00 + cheat + description:One hit kills + code:c9a261/80 + cheat + description:Infinite walking range in battle + code:c955b5/00 + +cartridge sha256:e6efb6361af04963f22c772f879a466543f56b3b6a084204fef2dcb4659d82d9 + name:David Crane's Amazing Tennis (USA) + cheat + description:Faster side-to-side movement + code:00b394/fc+00b37c/04 + cheat + description:Even faster side-to-side movement + code:00b394/fa+00b37c/06 + +cartridge sha256:6ce516e3d1a7068cc9732cd3517cfd1e92179f2340c63a244625a1ff49815085 + name:Daze Before Christmas (Europe) + cheat + description:Infinite health + code:7e06f9/05 + cheat + description:Infinite lives + code:7e1e68/04 + +cartridge sha256:300c1937e4b68108302e9b0f49974d1ec6b6c45dd8da69dddc19443f9562ecf4 + name:Death and Return of Superman, The (USA) + cheat + description:Invincibility + code:808296/d0+8082a7/f0 + cheat + description:Infinite health + code:80d20c/a5+80d20d/55+80d20e/8d+80d20f/d2+80d210/0e + cheat + description:Infinite lives + code:80d326/ee + cheat + description:Infinite special attacks + code:80d2ee/ee+80d2ef/0e + +cartridge sha256:a33af57e62a46282e3755824cc5fc39870a8eab8a28aaeb1c3817ba2c8e8655e + name:Death Brade (Japan) + cheat + description:Infinite heath - P1 + code:7e0a10/50 + +cartridge sha256:752d24fab240f4dd1dfbfea5ec83438998316806ad44488bf8c84430ca5a2cd0 + name:Demolition Man (USA) + cheat + description:Infinite health + code:80b75e/15 + cheat + description:Infinite health (alt) + code:7e9f30/7f + cheat + description:Infinite lives + code:80c1a4/ad + cheat + description:Infinite Grenades + code:81c8d3/bd + cheat + description:Infinite ammo - Shotgun and Magnum + code:80c5cf/bd + cheat + description:Infinite ammo - Shotgun + code:80c5c8/01 + cheat + description:Infinite ammo - Magnum + code:859114/02 + cheat + description:Jump 2x higher + code:00b64c/20 + cheat + description:Jump 4x higher + code:00b64c/10 + cheat + description:Jump 8x higher + code:00b64c/08 + +cartridge sha256:248217975279bbf9db8e74da11a906a6dd867a3ec88441b0b031ecf900466618 + name:Demon's Blazon - Makai Mura Monshou Hen (Japan) + cheat + description:Invincibility + code:7e103c/5a + cheat + description:Infinite health + code:7e1062/15 + cheat + description:Maximum health bar + code:7e1e50/15 + cheat + description:999 ZAM + code:7e1063/e7+7e1064/03 + +cartridge sha256:18d40a807d5f88c5b6a1ad849eec7e0f189225d9a1586037c850f6680b5844de + name:Demon's Crest (USA) + cheat + description:Invincibility after one hit + code:80dccb/a5 + cheat + description:Infinite health + code:80e599/a5 + cheat + description:Hit anywhere + code:82888c/00+8288a2/00+828b00/80+828b23/80 + cheat + description:Get GP from anywhere + code:82c97e/00 + cheat + description:Large health refills full health + code:82c9ae/a5 + cheat + description:Rapid fire + code:80ef5c/a5 + cheat + description:Enemies always drop the 20 coin + code:82c77d/a5 + cheat + description:First enemy takes longer to kill + code:838a3d/09 + cheat + description:First enemy take less time to kill + code:838a3d/02 + cheat + description:More flash time + code:80e5c3/ff + cheat + description:Die after one hit + code:80de33/85 + cheat + description:Super-jump + code:80e175/08 + cheat + description:Ginseng costs nothing + code:81e6b4/00 + cheat + description:20 coin worth 999 + code:82c9dc/a5 + cheat + description:1 coin worth 999 + code:82c9dd/a5 + cheat + description:Start a new game with all items + code:8488e8/ce+8488eb/ce+8488ee/ce + cheat + description:Disable anti-cheat (enable to use codes) + code:7e0eee/00+7e0eed/00 + cheat + description:Invincibility + code:7e103c/30 + cheat + description:Infinite health + code:7e1062/14 + cheat + description:Infinite GP + code:7e1063/e7+7e1064/03 + cheat + description:Infinite Hold spells + code:7e1e30/02 + cheat + description:Infinite Death spells + code:7e1e31/04 + cheat + description:Infinite Shock spells + code:7e1e32/06 + cheat + description:Infinite Imp spells + code:7e1e33/08 + cheat + description:Infinite Shadow spells + code:7e1e34/0a + cheat + description:Infinite Herb potions + code:7e1e35/0c + cheat + description:Infinite Ginseng potions + code:7e1e36/0e + cheat + description:Infinite Mercury potions + code:7e1e37/10 + cheat + description:Infinite Sulfer potions + code:7e1e38/12 + cheat + description:Infinite Elixer potions + code:7e1e39/14 + cheat + description:Have all Powers, Crests, Talismen, Jewels, can hold 5 Spells/Potions + code:7e1e51/ff+7e1e52/ff+7e1e53/ff + +cartridge sha256:a362033d0d7e754d79202b255679186ad799b9e784719614b913ec8c9857ae33 + name:Dennis the Menace (USA) + cheat + description:Infinite courage + code:809c34/a5+809c3b/a5 + cheat + description:Infinite time + code:87df11/a5 + cheat + description:Infinite lives + code:80a49b/a5 + +cartridge sha256:606abf536440173ae36466db360c7db6b474beb7a105c8a62bc74a54cbe1c38b + name:Desert Strike - Return to the Gulf (USA) + cheat + description:Infinite ammo + code:01e59c/dd + cheat + description:Infinite fuel + code:0187e9/00 + cheat + description:Infinite lives + code:0189bb/2c + cheat + description:2x fuel consumption + code:0187e9/04 + cheat + description:Faster gun auto-repeat speed + code:00e6ae/01 + cheat + description:Slower gun auto-repeat speed + code:00e6ae/18 + cheat + description:Missiles fly faster + code:00e6d2/04 + cheat + description:Hydras fly faster + code:00e6f0/04 + cheat + description:Guns do as much damage as missiles + code:00e6b2/64 + cheat + description:Hydras do as much damage as missiles + code:00e6d0/64 + cheat + description:Missiles do 250 points of damage + code:00e6ee/fa + cheat + description:AK47's do 1 point of damage + code:00e856/01 + cheat + description:AK47's do 1/2x damage + code:00e856/02 + cheat + description:AK47's do 2x damage + code:00e856/0a + cheat + description:APHIDs do 1 point of damage + code:00e7fc/01 + cheat + description:APHIDs do 1/2x damage + code:00e7fc/25 + cheat + description:APHIDs do 2x damage + code:00e7fc/96 + cheat + description:AAA's do 1 point of damage + code:00e70c/01 + cheat + description:AAA's do 1/2x damage + code:00e70c/0a + cheat + description:AAA's do 2x damage + code:00e70c/28 + cheat + description:Rapiers do 1 point of damage + code:00e7a2/01 + cheat + description:Rapiers do 1/2x damage + code:00e7a2/32 + cheat + description:Rapiers do 2x damage + code:00e7a2/c8 + cheat + description:VDA's do 1 point of damage + code:00e72a/01 + cheat + description:VDA's do 1/2x damage + code:00e72a/0c + cheat + description:VDA's do 2x damage + code:00e72a/32 + cheat + description:ZSU's do 1 point of damage + code:00e766/01 + cheat + description:ZSU's do 1/2x damage + code:00e766/14 + cheat + description:ZSU's do 2x damage + code:00e766/50 + cheat + description:Speedboats do 1 point of damage + code:00e81a/01 + cheat + description:Speedboats do 1/2x damage + code:00e81a/19 + cheat + description:Speedboats do 2x damage + code:00e81a/64 + cheat + description:Choppers do 1 point of damage + code:00e838/01 + cheat + description:Choppers do 1/2x damage + code:00e838/32 + cheat + description:Choppers do 2x damage + code:00e838/c8 + cheat + description:M48's do 1 point of damage + code:00e7de/01 + cheat + description:M48's do 1/2x damage + code:00e7de/32 + cheat + description:M48's do 2x damage + code:00e7de/c8 + cheat + description:Crotales do 1 point of damage + code:00e7c0/01 + cheat + description:Crotales do 1/2x damage + code:00e7c0/32 + cheat + description:Crotales do 2x damage + code:00e7c0/c8 + cheat + description:AK47's have 1 armor point + code:00d154/01 + cheat + description:AK47's have 1/2x armor points + code:00d154/05 + cheat + description:AK47's have 2x armor points + code:00d154/14 + cheat + description:APHIDs have 1 armor points + code:00c03e/01 + cheat + description:APHIDs have 1/2x armor points + code:00c03e/0c + cheat + description:APHIDs have 2x armor points + code:00c03e/32 + cheat + description:AAA's have 1 armor points + code:00bfe0/01 + cheat + description:AAA's have 1/2x armor points + code:00bfe0/19 + cheat + description:AAA's have 2x armor points + code:00bfe0/64 + cheat + description:Rapiers have 1 armor points + code:00c2f6/01 + cheat + description:Rapiers have 1/2x armor points + code:00c2f6/25 + cheat + description:Rapiers have 2x armor points + code:00c2f6/96 + cheat + description:VDA's have 1 armor points + code:00c354/01 + cheat + description:VDA's have 1/2x armor points + code:00c354/32 + cheat + description:VDA's have 2x armor points + code:00c354/c8 + cheat + description:ZSU's have 1 armor points + code:00c404/01 + cheat + description:ZSU's have 1/2x armor points + code:00c404/4b + cheat + description:ZSU's have 2x armor points + code:00c404/ff + cheat + description:Speedboats have 1 armor points + code:00c090/01 + cheat + description:Speedboats have 1/2x armor points + code:00c090/4b + cheat + description:Speedboats have 2x armor points + code:00c090/ff + cheat + description:Choppers have 1 armor points + code:00c130/01 + cheat + description:Choppers have 1/2x armor points + code:00c130/4b + cheat + description:Choppers have 2x armor points + code:00c130/ff + cheat + description:M48's have 1 armor points + code:00c24a/01 + cheat + description:M48's have 1/2x armor points + code:00c24a/64 + cheat + description:M48's have 2x armor points + code:00c24b/01 + cheat + description:Crotales have 1 armor points + code:00c1ec/01 + cheat + description:Crotales have 1/2x armor points + code:00c1ec/7d + cheat + description:Crotales have 2x armor points + code:00c1ed/01 + cheat + description:AK47 bullets fly slower + code:00e858/00 + cheat + description:APHID bullets fly slower + code:00e7fe/00 + cheat + description:AAA bullets fly slower + code:00e70e/00 + cheat + description:Rapier bullets fly slower + code:00e7a4/00 + cheat + description:VDA bullets fly slower + code:00e72c/00 + cheat + description:ZSU bullets fly slower + code:00e768/00 + cheat + description:Speedboat bullets fly slower + code:00e81c/00 + cheat + description:Chopper bullets fly slower + code:00e83a/00 + cheat + description:M48 bullets fly slower + code:00e7e0/00 + cheat + description:Armor starts at 344 + code:0196ab/01+018a28/01 + cheat + description:Armor starts at 856 + code:0196ab/03+018a28/03 + cheat + description:Armor starts at 1,112 + code:0196ab/04+018a28/04 + cheat + description:Armor starts at 2,136 + code:0196ab/08+018a28/08 + cheat + description:Armor starts at 5,208 + code:0196ab/14+018a28/14 + cheat + description:Fuel starts at 25 + code:02996c/19 + cheat + description:Fuel starts at 50 + code:02996c/32 + cheat + description:Fuel starts at 75 + code:02996c/4b + cheat + description:Fuel starts at 150 + code:02996c/96 + cheat + description:Fuel starts at 200 + code:02996c/c8 + cheat + description:Fuel starts at 868 + code:02996d/03 + cheat + description:Guns start at 154 rounds remaining + code:00e6b1/00 + cheat + description:Guns start at 666 rounds remaining + code:00e6b1/02 + cheat + description:Guns start at 2,458 rounds remaining + code:00e6b1/09 + cheat + description:Guns start at 5,018 rounds remaining + code:00e6b1/13 + cheat + description:Guns start at 9,882 rounds remaining + code:00e6b1/26 + cheat + description:Start with 10 hydras + code:00e6ce/0a + cheat + description:Start with 50 hydras + code:00e6ce/32 + cheat + description:Start with 100 hydras + code:00e6ce/64 + cheat + description:Start with 250 hydras + code:00e6ce/fa + cheat + description:Start with 1 missile + code:00e6ec/01 + cheat + description:Start with 20 missiles + code:00e6ec/14 + cheat + description:Start with 50 missiles + code:00e6ec/32 + cheat + description:Start with 100 missiles + code:00e6ec/64 + cheat + description:Start with 250 missiles + code:00e6ec/fa + cheat + description:Start with 1 life + code:029966/01 + cheat + description:Start with 5 lives + code:029966/05 + cheat + description:Start with 7 lives + code:029966/07 + cheat + description:Start with 10 lives + code:029966/0a + cheat + description:Start with 20 lives + code:029966/14 + cheat + description:Start with 50 lives + code:029966/32 + cheat + description:Start with 99 lives + code:029966/63 + cheat + description:Infinite lives (alt) + code:7e209e/09 + cheat + description:Infinite fuel (alt) + code:7e2098/64 + cheat + description:Infinite Load (carry unlimited number of passengers) + code:7e209c/01 + cheat + description:Landing with infinite load (use with Infinite Load code, only when landing, then disable) + code:7e209c/ff + cheat + description:Infinite Chaingun + code:7eb0c6/ff + cheat + description:Infinite Hydras + code:7eb0ea/ff + cheat + description:Infinite Hellfire Missiles + code:7eb10e/ff + cheat + description:Infinite Hellfire Missiles + code:7eb132/ff + cheat + description:Infinite Armor - Level 1 + code:7e5d00/ff + cheat + description:Infinite Armor - Level 2 + code:7e5da2/ff + cheat + description:Infinite Armor - Level 3 + code:7e5e44/ff + cheat + description:Infinite Armor - Level 4 + code:7e5d00/ff + cheat + description:Crotales do little or no damage in level 4 + code:00e7c0/01 + +cartridge sha256:337e643d3e63915de06429992f306e8d2b73aed6849b795f9c855c2d03c18180 + name:D-Force (USA) + cheat + description:Infinite lives + code:00a0c8/ea + cheat + description:Continue equipped with unguided missiles + code:0084a9/30+0084aa/da+0084ac/10 + cheat + description:Loss of a life does not decrease cannon power at normal difficulty (except on continues) + code:00a431/00 + cheat + description:Loss of a life does not decrease cannon power at hard difficulty (except on continues) + code:00a448/00 + cheat + description:Pink power-up increases missile power along with cannon power + code:00ea0a/0c + cheat + description:Continue with 10 lives + code:0084bd/36+0084be/a8 + cheat + description:Continue with 12 lives + code:0084bd/ab+0084be/a4 + cheat + description:Continue with 14 lives + code:0084bd/a1+0084be/f1 + cheat + description:Continue with 16 lives + code:0084bd/5f+0084be/a4 + cheat + description:Continue with cannon power at level 2 + code:0084b5/01+0084b2/0f + cheat + description:Continue with cannon power at level 3 + code:0084b5/02+0084b2/0f + cheat + description:Continue with cannon power at level 4 + code:0084b5/03+0084b2/0f + cheat + description:Continue with cannon power at level 6 + code:0084b5/05+0084b2/0f + cheat + description:Continue with cannon power at level 8 + code:0084b5/07+0084b2/0f + cheat + description:Continue with cannon power at level 10 + code:0084b5/09+0084b2/0f + cheat + description:Continue with cannon power at level 12 + code:0084b5/0b+0084b2/0f + cheat + description:Start with cannon power at level 2 + code:009086/01 + cheat + description:Start with cannon power at level 3 + code:009086/02 + cheat + description:Start with cannon power at level 4 + code:009086/03 + cheat + description:Start with cannon power at level 6 + code:009086/05 + cheat + description:Start with cannon power at level 8 + code:009086/07 + cheat + description:Start with cannon power at level 10 + code:009086/09 + cheat + description:Start with cannon power at level 12 + code:009086/0b + cheat + description:Start equipped with unguided missiles + code:00908e/0c+00908b/10 + cheat + description:Start with 10 lives + code:1680bc/36+1680bd/a8 + cheat + description:Start with 12 lives + code:1680bc/ab+1680bd/a4 + cheat + description:Start with 14 lives + code:1680bc/a1+1680bd/f1 + cheat + description:Start with 16 lives + code:1680bc/5f+1680bd/a4 + +cartridge sha256:7dbfc44d28a46e6d399628e43086aa9fd0b2abeda4c108751a5ad91c102c3aaf + name:Dino City (USA) + cheat + description:Infinite health + code:01c68f/b9 + cheat + description:No harm from most enemies + code:01c682/80 + cheat + description:No harm if swallowed by a monster + code:05e79c/ad+05eade/ad + cheat + description:Infinite plays - both players + code:0482f3/ad + cheat + description:Infinite time (disable in bonus stage) + code:058055/bd + cheat + description:Infinite credits - both players + code:048e4c/ad + cheat + description:Enable level select (pause and press select) + code:048873/0b+048250/00 + cheat + description:Hit and stomp anywhere + code:01c6fa/80+01c6fb/15 + cheat + description:Clock runs faster + code:05802b/3c + cheat + description:Clock runs slower + code:05802b/f0 + cheat + description:Clock runs much slower + code:05802b/f0+05802c/01 + cheat + description:Rex jumps higher + code:078c96/fa + cheat + description:Rex jumps much higher + code:078c96/f8 + cheat + description:Tops jumps higher + code:07b8cd/fa + cheat + description:Tops jumps much higher + code:07b8cd/f8 + cheat + description:Timmy and Jamie jump higher + code:07d4d7/fa + cheat + description:Timmy and Jamie jump much higher + code:07d4d7/f8 + cheat + description:Collect 2 eggs for extra play instead of 50 + code:04d233/02 + cheat + description:Collect 5 eggs for extra play + code:04d233/05 + cheat + description:Collect 10 eggs for extra play + code:04d233/10 + cheat + description:Collect 15 eggs for extra play + code:04d233/15 + cheat + description:Collect 25 eggs for extra play + code:04d233/25 + cheat + description:Collect 75 eggs for extra play + code:04d233/75 + cheat + description:Collect 99 eggs for extra play + code:04d233/99 + cheat + description:1 play per game instead of 3 - both players + code:04800e/01 + cheat + description:2 plays per game - both players + code:04800e/02 + cheat + description:4 plays per game - both players + code:04800e/04 + cheat + description:5 plays per game - both players + code:04800e/05 + cheat + description:7 plays per game - both players + code:04800e/07 + cheat + description:9 plays per game - both players + code:04800e/09 + cheat + description:Start with 1 credit instead of 3 - P1 + code:04abd9/01 + cheat + description:Start with 2 credits - P1 + code:04abd9/02 + cheat + description:Start with 5 credits - P1 + code:04abd9/05 + cheat + description:Start with 7 credits - P1 + code:04abd9/07 + cheat + description:Start with 9 credits - P1 + code:04abd9/09 + cheat + description:Start with No credits - P1 + code:04abd9/00 + cheat + description:Start with 1 credit instead of 3 - P2 + code:04ac14/01 + cheat + description:Start with 2 credits - P2 + code:04ac14/02 + cheat + description:Start with 5 credits - P2 + code:04ac14/05 + cheat + description:Start with 7 credits - P2 + code:04ac14/07 + cheat + description:Start with 9 credits - P2 + code:04ac14/09 + cheat + description:Start with No credits - P2 + code:04ac14/00 + cheat + description:Infinite health - P1 + code:7e16ed/03 + +cartridge sha256:10e07e9e094e77a2b71bab3bac1d79a62b7a7bfdb80111044b1f9c64645c622f + name:Donald in Maui Mallard (Europe) + cheat + description:Infinite health + code:7e0dd3/64 + cheat + description:Infinite lives + code:7e1f4a/03 + cheat + description:Infinite Zapps + code:7e0ddb/0a + cheat + description:Infinite Homers + code:7e0ddd/0a + +cartridge sha256:fa8cacf5bbfc39ee6bbaa557adf89133d60d42f6cf9e1db30d5a36a469f74d15 + name:Donkey Kong Country (USA) + cheat + description:Invincibility + code:bfc745/60+bfd31c/00 + cheat + description:Invincibility in Mine Cart Carnage stage + code:b6a6a1/00 + cheat + description:Kill enemies on contact + code:bfc746/82+bfd320/82+bfa79b/00+b686a2/ea + cheat + description:Can cartwheel and stomp enemies who are immune to it + code:bfa79b/00+b686a2/ea+be94c4/00 + cheat + description:Infinite lives + code:b6a861/ad + cheat + description:Infinite lives (alt) + code:b6a85f/ad+b6a861/ad + cheat + description:Get Life Balloons from anywhere + code:b6a732/80 + cheat + description:Get KONG letters from anywhere + code:bfd694/80 + cheat + description:Get Banana bunches from anywhere + code:bfd74d/80 + cheat + description:Get Midway Barrel from anywhere + code:b6f6ce/80 + cheat + description:Get most single Bananas from anywhere + code:b8bbb1/80+b8bb4f/00+b8bb56/00 + cheat + description:10 Bananas needed for extra life + code:80a362/09+80a36b/0a+80a359/09+80a362/0a + cheat + description:25 Bananas needed for extra life + code:80a362/18+80a36b/19+80a359/18+80a362/19 + cheat + description:50 Bananas needed for extra life + code:80a362/31+80a36b/32+80a359/31+80a362/32 + cheat + description:75 Bananas needed for extra life + code:80a362/4a+80a36b/4b+80a359/4a+80a362/4b + cheat + description:Easy level exit (press start and select) + code:809b50/00 + cheat + description:Easy level exit (press start and select) (alt) + code:809b50/00+809b4b/00 + cheat + description:Bad buddy code (In 2P team mode, the inactive player can press select to gain control) + code:bfb296/00 + cheat + description:Bad buddy code (In 2P team mode, the inactive player can press select to gain control) (alt) + code:bfb296/00+bfb2bd/00 + cheat + description:Both Kongs return (get both Kongs back on map screen after dying, doesn't work when you fall off the screen) + code:bf8f98/03 + cheat + description:Return of Kong (when your last Kong gets hit, the other one returns (reset if you get stuck). Must have had both Kongs at some point). + code:bf8e78/ff + cheat + description:Keep Animals between stages + code:808394/60+b883cb/65 + cheat + description:Keep Animals between stages (alt) + code:808394/03+b883cb/65 + cheat + description:Keep Animals between stages (alt) + code:808394/60+b883cb/65+808392/60+b883ce/68 + cheat + description:Multi-jump + code:bfb32b/80+bfb924/24+bfb929/80+bfb934/d0 + cheat + description:Multi-jump - Expresso (the Ostrich) + code:bfba48/ff + cheat + description:High-jump - Donkey Kong + code:bfb964/c4 + cheat + description:Super-jump - Donkey Kong + code:bfb964/d0 + cheat + description:Mega-jump - Donkey Kong + code:bfb964/e0 + cheat + description:Moon-jump - Donkey Kong + code:bfb964/ff + cheat + description:High-jump - Diddy Kong + code:bfb96c/b4 + cheat + description:Super-jump - Diddy Kong + code:bfb96c/c0 + cheat + description:Mega-jump - Diddy Kong + code:bfb96c/d0 + cheat + description:Moon-jump - Diddy Kong + code:bfb96c/ff + cheat + description:High-jump - Animals + code:bfba14/c4 + cheat + description:Super-jump - Animals + code:bfba14/d0 + cheat + description:Mega-jump - Animals + code:bfba14/e0 + cheat + description:Moon-jump - Animals + code:bfba14/ff + cheat + description:High-jump - Donkey Kong + code:bfb964/c4+bfb98b/c4 + cheat + description:Super-jump - Donkey Kong + code:bfb964/d0+bfb98b/d0 + cheat + description:Mega-Jump - Donkey Kong + code:bfb964/e0+bfb98b/e0 + cheat + description:High-jump - Diddy Kong + code:bfb96c/b4+bfb993/b4 + cheat + description:Super-jump - Diddy Kong + code:bfb96c/c0+bfb993/c0 + cheat + description:Mega-Jump - Diddy Kong + code:bfb96c/d0+bfb993/d0 + cheat + description:High-jump - all Animals + code:bfba14/c4+bfba3b/c4 + cheat + description:Super-jump - all Animals + code:bfba14/d0+bfba3b/d0 + cheat + description:Mega-jump - all Animals + code:bfba14/e0+bfba3b/e4 + cheat + description:See the ending + code:8083b4/a0+b883cb/dd + cheat + description:Start With 8 lives + code:b882b8/07+b882bb/07 + cheat + description:Start With 11 lives + code:b882b8/0a+b882bb/0a + cheat + description:Start With 16 lives + code:b882b8/0f+b882bb/0f + cheat + description:Start With 26 lives + code:b882b8/19+b882bb/19 + cheat + description:Start With 51 lives + code:b882b8/32+b882bb/32 + cheat + description:Start With 76 lives + code:b882b8/4b+b882bb/4b + cheat + description:Start With 100 lives + code:b882b8/63+b882bb/63 + cheat + description:Start with 255 lives + code:b882b8/ff + cheat + description:Return of Kong (alt) + code:7e0579/01 + +cartridge sha256:df2644d435330192a13768cc1f79c5aa3084a64217a5250c6dd4ffdbe2175be4 + name:Donkey Kong Country (USA) (Rev 1) + cheat + description:Invincibility + code:bfd345/00+bfc76c/60 + cheat + description:Invincibility in Mine Cart Carnage stage + code:b6a6a3/00 + cheat + description:Kill enemies on contact + code:bfc76d/82+bfd349/82+bfa7c2/00+b686a2/ea + cheat + description:Can cartwheel and stomp enemies who are immune to it + code:bfa7c2/00+b686a2/ea+be94c4/00 + cheat + description:Infinite lives + code:b6a863/ad + cheat + description:Get Life Balloons from anywhere + code:b6a734/80 + cheat + description:Get KONG letters from anywhere + code:bfd6bd/80 + cheat + description:Get Banana bunches from anywhere + code:bfd776/80 + cheat + description:Get Midway Barrel from anywhere + code:b6f6e2/80 + cheat + description:Get most single Bananas from anywhere + code:b8bb4c/80+b8bbb4/80+b8bb59/00 + cheat + description:Easy level exit (press start and select) + code:809b4b/00 + cheat + description:Bad buddy code (In 2P team mode, the inactive player can press select to gain control) + code:bfb2bd/00 + cheat + description:Both Kongs return (get both Kongs back on map screen after dying, doesn't work when you fall off the screen) + code:bf8fa4/03 + cheat + description:Return of Kong (when your last Kong gets hit, the other one returns (reset if you get stuck). Must have had both Kongs at some point). + code:bf8e84/ff + cheat + description:Keep Animals + code:808392/60+b883ce/68 + cheat + description:Multi-jump + code:bfb352/80+bfb94b/24+bfb950/80+bfb95b/d0 + cheat + description:Multi-jump - Expresso (the Ostrich) + code:bfba6f/ff + cheat + description:High-jump - Donkey Kong + code:bfb98b/c4 + cheat + description:Super-jump - Donkey Kong + code:bfb98b/d0 + cheat + description:Mega-jump - Donkey Kong + code:bfb98b/e0 + cheat + description:Moon-jump - Donkey Kong + code:bfb98b/ff + cheat + description:High-jump - Diddy Kong + code:bfb993/b4 + cheat + description:Super-jump - Diddy Kong + code:bfb993/c0 + cheat + description:Mega-jump - Diddy Kong + code:bfb993/d0 + cheat + description:Moon-jump - Diddy Kong + code:bfb993/ff + cheat + description:High-jump - Animals + code:bfba3b/c4 + cheat + description:Super-jump - Animals + code:bfba3b/d0 + cheat + description:Mega-jump - Animals + code:bfba3b/e4 + cheat + description:Moon-jump - Animals + code:bfba3b/ff + cheat + description:Land animals roll attack + code:bfc2d0/a2 + cheat + description:Start with 255 lives + code:b882bb/ff + cheat + description:Return of Kong (alt) + code:7e0579/01 + +cartridge sha256:628147468c3539283197f58f03b94df49758a332831857481ea9cc31645f0527 + name:Donkey Kong Country (USA) (Rev 2) + cheat + description:Invincibility + code:bfd395/00+bfc79e/60 + cheat + description:Invincibility in Mine Cart Carnage stage + code:b6a6ad/00 + cheat + description:Kill enemies on contact + code:bfc79f/82+bfd399/82+bfa7e4/00+b686a2/ea + cheat + description:Can cartwheel and stomp enemies who are immune to it + code:bfa7e4/00+b686a2/ea+be94c8/00 + cheat + description:Infinite lives + code:b6a873/ad + cheat + description:Get Life Balloons from anywhere + code:b6a744/80 + cheat + description:Get KONG letters from anywhere + code:bfd70d/80 + cheat + description:Get Banana bunches from anywhere + code:bfd7c6/80 + cheat + description:Get Midway Barrel from anywhere + code:b6f714/80 + cheat + description:Get most single Bananas from anywhere + code:b8bcdd/80+b8bc75/80+b8bc82/00 + cheat + description:Easy level exit (press start and select) + code:809b5e/00 + cheat + description:Bad buddy code (In 2P team mode, the inactive player can press select to gain control) + code:bfb2df/00 + cheat + description:Both Kongs return (get both Kongs back on map screen after dying, doesn't work when you fall off the screen) + code:bf8fa8/03 + cheat + description:Return of Kong (when your last Kong gets hit, the other one returns (reset if you get stuck). Must have had both Kongs at some point). + code:bf8e88/ff + cheat + description:Multi-jump + code:bfb374/80+bfb96d/24+bfb972/80+bfb97d/d0 + cheat + description:Multi-jump - Expresso (the Ostrich) + code:bfba91/ff + cheat + description:High-jump - Donkey Kong + code:bfb9ad/c4 + cheat + description:Super-jump - Donkey Kong + code:bfb9ad/d0 + cheat + description:Mega-jump - Donkey Kong + code:bfb9ad/e4 + cheat + description:Moon-jump - Donkey Kong + code:bfb9ad/ff + cheat + description:High-jump - Diddy Kong + code:bfb9b5/b4 + cheat + description:Super-jump - Diddy Kong + code:bfb9b5/c0 + cheat + description:Mega-jump - Diddy Kong + code:bfb9b5/d0 + cheat + description:Moon-jump - Diddy Kong + code:bfb9b5/ff + cheat + description:High-jump - Animals + code:bfba5d/c4 + cheat + description:Super-jump - Animals + code:bfba5d/d0 + cheat + description:Mega-jump - Animals + code:bfba5d/e4 + cheat + description:Moon-jump - Animals + code:bfba5d/ff + cheat + description:Land animals can roll attack + code:bfb394/c5 + cheat + description:Start with 255 lives + code:b883eb/ff + cheat + description:Return of Kong (alt) + code:7e0579/01 + +cartridge sha256:07ff03fa8c8e31d2f8277ef2a9785022edebf7f79b694c66a00c66d8e563bce5 + name:Donkey Kong Country (USA) (Competition Edition) + cheat + description:Kill enemies on contact + code:bfc783/82+bfd36f/82+bfa7d7/00+b686a2/ea + cheat + description:Can cartwheel and stomp enemies who are immune to it + code:bfa7d7/00+b686a2/ea+be94c4/00 + cheat + description:Multi-jump + code:bfb367/80+bfb961/00+bfb980/00+bfb965/80 + +cartridge sha256:b79c2bb86f6fc76e1fc61c62fc16d51c664c381e58bc2933be643bbc4d8b610c + name:Donkey Kong Country 2 - Diddy's Kong Quest (USA) (En,Fr) (Rev 1) + cheat + description:Master code - Must be entered + code:00fffc/f8+bec522/80+bbbe1b/80 + cheat + description:Invincibility + code:b8d1a0/a9+b8d1a1/10+b8d1a2/00 + cheat + description:Infinite lives + code:bec66d/ad+bec678/ad + cheat + description:Get 2 lives per 100 bananas collected + code:bec868/02+bec873/02 + cheat + description:Get 5 lives per 100 bananas collected + code:bec868/05+bec873/05 + cheat + description:Get 255 lives per 100 bananas collected + code:bec868/ff + cheat + description:When your last Kong is hit, the other returns + code:b8a1d1/ff+b8a2a0/ff + cheat + description:Easy level exit (press start and select) + code:808aac/00+808adb/00 + cheat + description:Kong family coins don't get used up + code:b49d5a/ad+b49d68/ad + cheat + description:Kremcoins don't get used up + code:b49d55/ad+b49d63/ad + cheat + description:Multi-jump + code:b89a00/00+b89b05/07+b89bd4/09+b8b1f5/00+b8ba3b/83 + cheat + description:Mega-jump for Diddy + code:ff0049/f0 + cheat + description:Super-jump - Diddy + code:ff0049/f3 + cheat + description:Jump higher - Diddy + code:ff0049/f6 + cheat + description:Jump lower - Diddy + code:ff0049/f9 + cheat + description:Jump much lower - Diddy + code:ff0049/fa + cheat + description:Mega-jump - Dixie + code:ff0133/f0 + cheat + description:Super-jump - Dixie + code:ff0133/f3 + cheat + description:Jump higher - Dixie + code:ff0133/f7 + cheat + description:Jump lower - Dixie + code:ff0133/f9 + cheat + description:Jump much lower - Dixie + code:ff0133/fa + cheat + description:Mega-jump - Rambi with Diddy riding + code:ff0109/f1 + cheat + description:Super-jump - Rambi with Diddy riding + code:ff0109/f3 + cheat + description:Rambi jumps higher with Diddy riding + code:ff0109/f7 + cheat + description:Rambi doesn't jump as high with Diddy riding + code:ff0109/fa + cheat + description:Start with more kong family coins + code:b4800e/8d + cheat + description:Start with more Kremcoins + code:b4800b/8d + cheat + description:Start with 3 lives + code:808f72/02+808fa1/02 + cheat + description:Start with 10 lives + code:808f72/09+808fa1/09 + cheat + description:Start with 25 lives + code:808f72/18+808fa1/18 + cheat + description:Start with 50 lives + code:808f72/31+808fa1/31 + cheat + description:Start with 99 lives + code:808f72/63+808fa1/63 + cheat + description:Start with 255 lives + code:808f72/ff + +cartridge sha256:35421a9af9dd011b40b91f792192af9f99c93201d8d394026bdfb42cbf2d8633 + name:Donkey Kong Country 2 - Diddy's Kong Quest (USA) (En,Fr) + cheat + description:Master code - Must be entered + code:00fffc/f8+bec517/80+bbbe0b/80 + cheat + description:Invincibility + code:b8d0b8/24 + cheat + description:Infinite lives + code:bec66d/ad+bec678/ad + cheat + description:When your last Kong is hit, the other returns + code:b8a1d1/ff+b8a2a0/ff + cheat + description:Easy level exit (press start and select) + code:808aac/00+808adb/00 + cheat + description:Kong family coins don't get used up + code:b49d5a/ad+b49d68/ad + cheat + description:Kremcoins don't get used up + code:b49d55/ad+b49d63/ad + cheat + description:Get single Bananas from almost anywhere + code:b5f7a8/80+b5f808/80+b5f7b6/00 + cheat + description:Get Banana bunches from anywhere + code:b3c33b/80 + cheat + description:Get DK and Banana Coins from anywhere + code:beb877/80 + cheat + description:Get KONG letters from anywhere + code:bebaba/80 + cheat + description:Get Krem Koins from anywhere + code:beb9e5/80 + cheat + description:Get Life balloons from anywhere + code:b3c3fa/80 + cheat + description:Get Midway Barrel from anywhere + code:b3e4c7/80 + cheat + description:Get 2 lives per 100 bananas collected + code:bec868/02+bec873/02 + cheat + description:Get 5 lives per 100 bananas collected + code:bec868/05+bec873/05 + cheat + description:Get 255 lives per 100 bananas collected + code:bec868/ff + cheat + description:Multi-jump + code:b8c515/20+b8c516/72+b8c517/c4+b8c518/60 + cheat + description:Mega-jump for Diddy + code:ff0049/f0 + cheat + description:Super-jump - Diddy + code:ff0049/f3 + cheat + description:Jump higher - Diddy + code:ff0049/f6 + cheat + description:Jump lower - Diddy + code:ff0049/f9 + cheat + description:Jump much lower - Diddy + code:ff0049/fa + cheat + description:Mega-jump - Dixie + code:ff0133/f0 + cheat + description:Super-jump - Dixie + code:ff0133/f3 + cheat + description:Jump higher - Dixie + code:ff0133/f7 + cheat + description:Jump lower - Dixie + code:ff0133/f9 + cheat + description:Jump much lower - Dixie + code:ff0133/fa + cheat + description:Mega-jump - Rambi with Diddy riding + code:ff0109/f1 + cheat + description:Super-jump - Rambi with Diddy riding + code:ff0109/f3 + cheat + description:Rambi jumps higher with Diddy riding + code:ff0109/f7 + cheat + description:Rambi doesn't jump as high with Diddy riding + code:ff0109/fa + cheat + description:Start with more kong family coins + code:b4800e/8d + cheat + description:Start with more Kremcoins + code:b4800b/8d + cheat + description:Start with 3 lives + code:808f72/02+808fa1/02 + cheat + description:Start with 10 lives + code:808f72/09+808fa1/09 + cheat + description:Start with 25 lives + code:808f72/18+808fa1/18 + cheat + description:Start with 50 lives + code:808f72/31+808fa1/31 + cheat + description:Start with 99 lives + code:808f72/63+808fa1/63 + cheat + description:Start with 255 lives + code:808f72/ff + +cartridge sha256:2277a2d8dddb01fe5cb0ae9a0fa225d42b3a11adccaeafa18e3c339b3794a32b + name:Donkey Kong Country 3 - Dixie Kong's Double Trouble! (USA) (En,Fr) + cheat + description:Invincibility + code:b882b8/93 + cheat + description:Invincibility (alt) + code:b8c64e/a9+b8c64f/09+b8c650/00+bee1ca/80 + cheat + description:Infinite lives + code:f880fa/a9 + cheat + description:Infinite bear coins + code:f490b5/09 + cheat + description:Infinite fuel - Rocket Rush level + code:f8b4e6/ad + cheat + description:Get Funky's Gyrocopter with no need for DK coins + code:f484ac/80+f484d7/80 + cheat + description:Get Single Bananas from almost anywhere + code:b7eba8/80+b7ec08/80+b7ebb6/00 + cheat + description:Get Banana Bunches from anywhere + code:bbd028/80 + cheat + description:Get Bear Coins from anywhere + code:bbd25a/80 + cheat + description:Get KONG letters from anywhere + code:bbcd17/80 + cheat + description:Get Midway Barrel from anywhere + code:bedc4a/80 + cheat + description:Get Bonus Coins from anywhere + code:bbd2fd/80 + cheat + description:Get Life Balloons from anywhere + code:bbd1d2/80 + cheat + description:Get DK Coins from anywhere + code:b6a74a/00 + cheat + description:Multi-jump + code:b8d79d/20+b8d79e/71+b8d79f/90+b8d7a0/60 + cheat + description:Exit unbeaten levels + code:808b96/24+808bad/24 + cheat + description:Normal controls in Poisonous Pipeline level + code:f8cd17/ca + cheat + description:No need to bash baddies in bonus round to get coin + code:bbd79b/24 + cheat + description:No need to get bananas in bonus round to get coin + code:fbd845/f0 + cheat + description:Skip intro screens + code:b287cb/80+b28cd6/80+b28f18/80+b28e7c/0f + +cartridge sha256:d45e26eb10c323ecd480e5f2326b223e29264c3adde67f48f0d2791128e519e8 + name:Doom (USA) + cheat + description:Infinite health + code:5c01fd/8f+5c01fe/ae+5c01ff/5a+5c0200/70+5c0201/80 + cheat + description:Start with mega health and mega armor + code:5ffac1/90+5ffac5/8d + cheat + description:Start with more ammo + code:5ffac9/fe + cheat + description:Heat vision/color blind mode + code:5c06e8/a9 + cheat + description:Select "The Shores of Hell" or "Inferno" in any skill level + code:5fa815/03 + +cartridge sha256:8d4ada4f98464d176ae7f0fb8a20032056680f3241637a0f903f23f31f41ff36 + name:Doom Troopers - Mutant Chronicles (USA) + cheat + description:Invincibility + code:7e0c99/01 + cheat + description:Infinite health + code:7e0c31/64 + cheat + description:Infinite lives + code:7e0cb3/03+7e0102/03 + cheat + description:Infinite ammo + code:7e00e6/63 + cheat + description:Infinite special weapon ammo + code:7e00ea/0a + cheat + description:Die to complete level (don't use with infinite lives code) + code:7e0102/01 + +cartridge sha256:bb915b286b33842e39e9022366169233a4041515c7ecc60ac428420b28e48dd5 + name:Doomsday Warrior (USA) + cheat + description:Infinite health and matches last forever + code:00a53a/bd + cheat + description:Always get 4 bonus points for improving abilities + code:0093d0/a9+0093d1/04+0093da/80 + cheat + description:On normal level, start with all stats at 2 bars instead of 0 + code:009258/05 + cheat + description:First 6 fights are against Sledge + code:009343/00+009344/80+009345/f5 + cheat + description:First 6 fights are against Layban + code:009343/01+009344/80+009345/f5 + cheat + description:First 6 fights are against Amon + code:009343/02+009344/80+009345/f5 + cheat + description:First 6 fights are against Daisy + code:009343/03+009344/80+009345/f5 + cheat + description:First 6 fights are against P-Lump + code:009343/04+009344/80+009345/f5 + cheat + description:First 6 fights are against Grimrock + code:009343/05+009344/80+009345/f5 + cheat + description:First 6 fights are against Nuform + code:009343/06+009344/80+009345/f5 + cheat + description:First 7 fights are against Shadow + code:009343/07+009344/80+009345/f5 + cheat + description:First 6 fights are against Ashura + code:009343/08+009344/80+009345/f5 + cheat + description:First 6 fights are against Main + code:009343/09+009344/80+009345/f5 + cheat + description:All fights are in order (you don't choose your opponent) + code:009337/00 + cheat + description:You can heal completely, not just to the top of each segment + code:00b4eb/00 + cheat + description:Don't heal at all + code:00b4f3/ea + cheat + description:Infinite health - P1 + code:7e02c6/64 + cheat + description:Infinite health - P2 + code:7e03c6/64 + cheat + description:No health - P1 + code:7e02c6/00 + cheat + description:No health - P2 + code:7e03c6/00 + +cartridge sha256:b32aa9cbf8f6baacc84f6418fa6fbc33b9ce71458fecc91275aafdbf6f743a99 + name:Double Dragon V - The Shadow Falls (USA) + cheat + description:Always win - P1 + code:83cf93/00 + cheat + description:Can't perform special moves - P2/CPU + code:84a6b6/9e+84a682/9e+84a756/9c + cheat + description:Pick up to 9 points of any attribute instead of 5 + code:849da7/09 + cheat + description:Harder to recover from dizziness + code:80be75/ea + cheat + description:Dizziness doesn't last long + code:80be79/08 + cheat + description:Start with 50% health - both characters + code:80a389/28 + cheat + description:Start with 25% health - both characters + code:80a389/14 + cheat + description:Infinite health - P1 + code:7e1b8d/50 + cheat + description:Infinite health - P2 + code:7e1c8a/50 + cheat + description:No health - P1 + code:7e1b8d/00 + cheat + description:No health - P2 + code:7e1c8a/00 + cheat + description:Bosses unlocked cheat enabled + code:7f0068/01 + cheat + description:Stuns disabled cheat enabled + code:7f006a/01 + cheat + description:Throwing disabled cheat enabled + code:7f006c/01 + cheat + description:P1 is Billy Lee + code:7e0632/00 + cheat + description:P1 is Jimmy Lee + code:7e0632/01 + cheat + description:P1 is Jawbreaker + code:7e0632/02 + cheat + description:P1 is Icepick + code:7e0632/03 + cheat + description:P1 is S Master + code:7e0632/04 + cheat + description:P1 is Bones + code:7e0632/05 + cheat + description:P1 is Sickle + code:7e0632/06 + cheat + description:P1 is Blade + code:7e0632/07 + cheat + description:P1 is T Happy + code:7e0632/08 + cheat + description:P1 is Countdown + code:7e0632/09 + cheat + description:P1 is Dominique + code:7e0632/0a + cheat + description:P1 is Sekka + code:7e0632/0b + cheat + description:P2 is Billy Lee + code:7e0633/00 + cheat + description:P2 is Jimmy Lee + code:7e0633/01 + cheat + description:P2 is Jawbreaker + code:7e0633/02 + cheat + description:P2 is Icepick + code:7e0633/03 + cheat + description:P2 is S Master + code:7e0633/04 + cheat + description:P2 is Bones + code:7e0633/05 + cheat + description:P2 is Sickle + code:7e0633/06 + cheat + description:P2 is Blade + code:7e0633/07 + cheat + description:P2 is T Happy + code:7e0633/08 + cheat + description:P2 is Countdown + code:7e0633/09 + cheat + description:P2 is Dominique + code:7e0633/0a + cheat + description:P2 is Sekka + code:7e0633/0b + +cartridge sha256:d98d7da1e7636e067563e2e480d7dfbc013b7e9bdf1329fd61c5cacac0293e1d + name:Dragon - The Bruce Lee Story (USA) + cheat + description:Infinite health (disable before stage ends) + code:7e00d9/ff + cheat + description:Infinite fighting power + code:7e00db/ff + cheat + description:0 HP - Enemy 1 + code:7e01d9/00 + cheat + description:0 HP - Enemy 2 + code:7e02d9/00 + cheat + description:Infinite time (turn on only in a timed fight and off after defeating your opponent) + code:7e2082/63 + cheat + description:Hyper Mode - P1 + code:7e003e/01 + cheat + description:Hyper Mode - P2/Enemy 1 + code:7e013e/01 + cheat + description:Hyper Mode - P3/Enemy 2 + code:7e023e/01 + cheat + description:P1 Knocks Out Easier + code:7e0093/02 + cheat + description:P2 Knocks Out Easier + code:7e0193/02 + cheat + description:P3 Knocks Out Easier + code:7e0293/02 + cheat + description:P1 Can't Be Hit + code:7e0095/44 + cheat + description:P2 Can't Be Hit + code:7e0195/44 + cheat + description:P3 Can't Be Hit + code:7e0295/44 + cheat + description:Start in Alley outside kitchen (version 2) + code:7e539e/01 + cheat + description:Start in Alley outside kitchen + code:7e539e/02 + cheat + description:Start in the Seattle Gym + code:7e539e/03 + cheat + description:Start in the George Wu Gym + code:7e539e/04 + cheat + description:Start in Film Set + code:7e539e/05 + cheat + description:Start in Bruce's Kwoon + code:7e539e/06 + cheat + description:Start in Virgin Gym + code:7e539e/07 + cheat + description:Start in the Big Boss Film set (version 2) + code:7e539e/08 + cheat + description:Start in the Big Boss Film set + code:7e539e/09 + cheat + description:Start in the Enter The Dragon set + code:7e539e/0a + cheat + description:Start in the Armored Boss Arena + code:7e539e/0b + cheat + description:Start in the Machine + code:7e539e/0c + +cartridge sha256:32226fb8b126261dfec279aea51b2fe01e0c7bfbf26699ddcceb750a0d3a9fc0 + name:Dragon Ball Z - Hyper Dimension (Japan) + cheat + description:One hit kills + code:00c591/a9+00c592/01+00c593/00+00c59b/8d+00c59c/60 + +cartridge sha256:b698dd6e1db1a3fb2026dbc78c2cfbfd834f7c64fccb76139d5075c8b5233f28 + name:Dragon Quest I & II (Japan) + cheat + description:DQ I & II - Infinite MP in battle + code:0baa44/bd + cheat + description:DQ I & II - Infinite MP ouside battle + code:00cc80/b9 + cheat + description:DQ I & II - Keep gold after deposit in the vault + code:00f044/22 + cheat + description:DQ I & II - Take no damage from poison swamps + code:1b8935/ea + cheat + description:DQ I & II - Take no damage from barriers + code:1b897a/bd + cheat + description:DQ I & II - Take no damage from monster hits or magic + code:0b8fc0/60 + cheat + description:DQ I & II - Take no damage from monster fire + code:0b9880/80+0b9881/0a + cheat + description:DQ I & II - Inns don't take your money + code:00f4e6/ad + cheat + description:DQ I & II - All equipment in shops is free + code:00c78f/80 + cheat + description:DQ I - Infinite medical herbs + code:09836e/ad + cheat + description:DQ I - Key shops don't take your money + code:00ca40/ad + cheat + description:DQ I - Fairy water shops don't take your money + code:00c9f7/ad + +cartridge sha256:a3b1cae3fe55fe52c035ab122e7f850640b0935524496d45b1915ca3c8a934f4 + name:Dragon View (USA) + cheat + description:Infinite health (may crash at the end of Ortah Temple if using an emulator) + code:9e807e/af + cheat + description:Infinite Jade + code:92e329/af + cheat + description:Infinite Bombs + code:7e0e23/a2 + cheat + description:Infinite Potions + code:93d88b/af + cheat + description:Infinite magic for rings + code:9ae039/ad + cheat + description:Max level after killing a Demon + code:80ed26/3b + cheat + description:Sell a fruit to get 254 fruit + code:92e536/80+92e623/37 + cheat + description:Infinite HP + code:7e6fca/b8 + cheat + description:Max HP + code:7e6fcb/be+7e6fcb/be + cheat + description:Max EXP + code:7e7095/e7+7e7096/03 + cheat + description:Max money (Jade) + code:7e2131/0f+7e2132/27 + cheat + description:Max attack power + code:7e98e9/ff + cheat + description:Max defense power + code:7e98ea/ff + +cartridge sha256:49a1f9f5e6084b3daa1b13ab5a37ebe8bd3cf20e1c7429fbf722298092893e81 + name:Dragon's Lair (USA) + cheat + description:Infinite health + code:00b9a7/ea + cheat + description:Infinite time + code:00ba28/2c + cheat + description:Infinite lives + code:0084dd/ea + cheat + description:Start with 1 life + code:00b959/00 + cheat + description:Start with 6 lives + code:00b959/05 + cheat + description:Start with 9 lives + code:00b959/08 + cheat + description:Start with the Dagger + code:00b980/01 + cheat + description:Start with the Shuriken + code:00b980/02 + cheat + description:Slow timer + code:00ba51/70 + cheat + description:Faster timer + code:00ba51/25 + cheat + description:1 coin gives 10 + code:00b9b6/01 + cheat + description:Infinite health (alt) + code:7e1036/04 + cheat + description:Infinite time (alt) + code:7e1033/09 + cheat + description:Infinite lives (alt) + code:7e1028/03 + cheat + description:Infinite Gold + code:7e1030/09 + +cartridge sha256:74910ce01d19d25cb97a243a51f21c3d522f02fb116682f60440da3292bb14f7 + name:Drakkhen (USA) + cheat + description:Protection from some attacks + code:10e206/bf+02ef49/bf+1bc9d9/bf + cheat + description:Magic points restored 50 points at a time while player is on screen + code:02eee4/32 + cheat + description:Magic points restored 10 points at a time while player is on screen + code:02eee4/0a + cheat + description:Magic points don't decrease except in battle + code:06de33/bf + +cartridge sha256:1a79d51a2ad7dd4848205a07ff8e5d873b155dc420de5e52158c9bab935e05c3 + name:Dream T.V. (USA) + cheat + description:Almost infinite health + code:82cf83/b1+82cfc7/b1 + cheat + description:Infinite lives + code:82aafc/00 + cheat + description:One hit kills, except skeletons + code:82dfee/b1 + cheat + description:Mega-jump (disable to land again) + code:82bd2c/b1 + cheat + description:Can't get hit - some characters are white + code:82ad30/00 + cheat + description:Start with 5 lives + code:8099b5/05 + cheat + description:Start with 1 life + code:8099b5/01 + cheat + description:Start with 8 lives + code:8099b5/08 + cheat + description:Start with 2/3 health - 1st life + code:809a05/20 + cheat + description:Start with 2/3 health - after 1st life + code:82aaf1/20 + cheat + description:Start with 1/3 health - 1st life + code:809a05/10 + cheat + description:Start with 1/3 health - after 1st life + code:82aaf1/10 + +cartridge sha256:c509e957873d6cff232bc360ae1795ea74e86bf4fa09c686f6cfc83bd8bac3d7 + name:Dual Orb II (Japan) + cheat + description:Gain 65,535 EXP from each battle + code:c41635/af+c41638/cb + cheat + description:Sell one item for maximum money + code:c02a14/00 + cheat + description:Can skip barrel puzzle + code:c220f4/72 + cheat + description:No random battles + code:c2309c/80 + cheat + description:Enemies start with 10 HP + code:c0d1a9/af+c0d1aa/39 + cheat + description:Enemies start with 100 HP + code:c0d1a9/af + +cartridge sha256:2dfc2e037679a62a960dab9682bca6d1b2737f603edd336c8b2fdf05db10cc07 + name:Dungeon Master (USA) + cheat + description:Almost no mana loss (must have enough to cast) + code:01957c/b7 + cheat + description:Food meter doesn't go down + code:05a517/b7 + cheat + description:Water meter doesn't go down + code:05a576/b7 + cheat + description:1st character has 250 maximum hit points + code:7004a6/fa + cheat + description:2nd character has 250 maximum hit points + code:7007c5/fa + cheat + description:3rd character has 250 maximum hit points + code:700ae4/fa + cheat + description:4th character has 250 maximum hit points + code:700e03/fa + cheat + description:1st character has 250 maximum stamina + code:7004aa/c4+7004ab/09 + cheat + description:2nd character has 250 maximum stamina + code:7007c9/c4+7007ca/09 + cheat + description:3rd character has 250 maximum stamina + code:700ae8/c4+700ae9/09 + cheat + description:4th character has 250 maximum stamina + code:700e07/c4+700e08/09 + cheat + description:1st character has 250 maximum mana + code:7004ae/fa + cheat + description:2nd character has 250 maximum mana + code:7007cd/fa + cheat + description:3rd character has 250 maximum mana + code:700aec/fa + cheat + description:4th character has 250 maximum mana + code:700e0b/fa + cheat + description:1st character has 99 current strength + code:7004ba/63 + cheat + description:2nd character has 99 current strength + code:7007d9/63 + cheat + description:3rd character has 99 current strength + code:700af8/63 + cheat + description:4th character has 99 current strength + code:700e17/63 + cheat + description:1st character has 99 maximum strength + code:7004b9/63 + cheat + description:2nd character has 99 maximum strength + code:7007d8/63 + cheat + description:3rd character has 99 maximum strength + code:700af7/63 + cheat + description:4th character has 99 maximum strength + code:700e16/63 + cheat + description:1st character has 99 current dexterity + code:7004bd/63 + cheat + description:2nd character has 99 current dexterity + code:7007dc/63 + cheat + description:3rd character has 99 current dexterity + code:700afb/63 + cheat + description:4th character has 99 current dexterity + code:700e1a/63 + cheat + description:1st character has 99 maximum dexterity + code:7004bc/63 + cheat + description:2nd character has 99 maximum dexterity + code:7007db/63 + cheat + description:3rd character has 99 maximum dexterity + code:700afa/63 + cheat + description:4th character has 99 maximum dexterity + code:700e19/63 + cheat + description:1st character has 99 current wisdom + code:7004c0/63 + cheat + description:2nd character has 99 current wisdom + code:7007df/63 + cheat + description:3rd character has 99 current wisdom + code:700afe/63 + cheat + description:4th character has 99 current wisdom + code:700e1d/63 + cheat + description:1st character has 99 maximum wisdom + code:7004bf/63 + cheat + description:2nd character has 99 maximum wisdom + code:7007de/63 + cheat + description:3rd character has 99 maximum wisdom + code:700afd/63 + cheat + description:4th character has 99 maximum wisdom + code:700e1c/63 + cheat + description:1st character has 99 current vitality + code:7004c3/63 + cheat + description:2nd character has 99 current vitality + code:7007e2/63 + cheat + description:3rd character has 99 current vitality + code:700b01/63 + cheat + description:4th character has 99 current vitality + code:700e20/63 + cheat + description:1st character has 99 maximum vitality + code:7004c2/63 + cheat + description:2nd character has 99 maximum vitality + code:7007e1/63 + cheat + description:3rd character has 99 maximum vitality + code:700b00/63 + cheat + description:4th character has 99 maximum vitality + code:700e1f/63 + cheat + description:1st character has 99 current anti-magic + code:7004c6/63 + cheat + description:2nd character has 99 current anti-magic + code:7007e5/63 + cheat + description:3rd character has 99 current anti-magic + code:700b04/63 + cheat + description:4th character has 99 current anti-magic + code:700e23/63 + cheat + description:1st character has 99 maximum anti-magic + code:7004c5/63 + cheat + description:2nd character has 99 maximum anti-magic + code:7007e4/63 + cheat + description:3rd character has 99 maximum anti-magic + code:700b03/63 + cheat + description:4th character has 99 maximum anti-magic + code:700e22/63 + cheat + description:1st character has 99 current anti-fire + code:7004c9/63 + cheat + description:2nd character has 99 current anti-fire + code:7007e8/63 + cheat + description:3rd character has 99 current anti-fire + code:700b07/63 + cheat + description:4th character has 99 current anti-fire + code:700e26/63 + cheat + description:1st character has 99 maximum anti-fire + code:7004c8/63 + cheat + description:2nd character has 99 maximum anti-fire + code:7007e7/63 + cheat + description:3rd character has 99 maximum anti-fire + code:700b06/63 + cheat + description:4th character has 99 maximum anti-fire + code:700e25/63 + cheat + description:1st character is a level 15 fighter + code:7004cf/7f + cheat + description:1st character is a level 15 ninja + code:7004d5/7f + cheat + description:1st character is a level 15 healer + code:7004db/7f + cheat + description:1st character is a level 15 wizard + code:7004e1/7f + cheat + description:2nd character is a level 15 fighter + code:7007ee/7f + cheat + description:2nd character is a level 15 ninja + code:7007f4/7f + cheat + description:2nd character is a level 15 healer + code:7007fa/7f + cheat + description:2nd character is a level 15 wizard + code:700800/7f + cheat + description:3rd character is a level 15 fighter + code:700b0d/7f + cheat + description:3rd character is a level 15 ninja + code:700b13/7f + cheat + description:3rd character is a level 15 healer + code:700b19/7f + cheat + description:3rd character is a level 15 wizard + code:700b1f/7f + cheat + description:4th character is a level 15 fighter + code:700e2c/7f + cheat + description:4th character is a level 15 ninja + code:700e32/7f + cheat + description:4th character is a level 15 healer + code:700e38/7f + cheat + description:4th character is a level 15 wizard + code:700e3e/7f + cheat + description:1st character has a nearly full food meter + code:7004b3/07 + cheat + description:1st character has a nearly full water meter + code:7004b5/07 + cheat + description:2nd character has a nearly full food meter + code:7007d2/07 + cheat + description:2nd character has a nearly full water meter + code:7007d4/07 + cheat + description:3rd character has a nearly full food meter + code:700af1/07 + cheat + description:3rd character has a nearly full water meter + code:700af3/07 + cheat + description:4th character has a nearly full food meter + code:700e10/07 + cheat + description:4th character has a nearly full water meter + code:700e12/07 + +cartridge sha256:8481e47381bd98c27b9782b5727a5d5f0976fbb3aa3df25c2c42aa37e0586815 + name:E.V.O. - Search for Eden (USA) + cheat + description:Invincibility + code:06858f/60 + cheat + description:Infinite EVO points + code:00d637/80 + cheat + description:Infinite EP + code:7e00d2/10+7e00d3/27 + cheat + description:Protection from most hazards + code:0685fc/a5 + cheat + description:Food replenishes hit points to full + code:1e844a/00 + cheat + description:Less damage from stronger creatures + code:068f8c/07 + cheat + description:Horn never breaks + code:06832f/a5 + cheat + description:Collect one health to max it out + code:1e8464/00 + cheat + description:One-hit kills + code:0787a4/00 + +cartridge sha256:0408e3d9f2259044344a3bfbd7a7ca3c3427f82108fbecd6e5c4c41e80cd303b + name:Earth Defense Force (USA) + cheat + description:Invincibility + code:0086ce/24 + cheat + description:Infinite shields + code:0086e7/ad + cheat + description:Infinite credits + code:058bb9/ad + cheat + description:Continually hit anywhere + code:138124/24+0086ce/24+138108/24+1380fa/24+138116/24 + cheat + description:Advancing experience levels is easier + code:00d665/20 + cheat + description:Advancing experience levels is much easier + code:00d665/0c + cheat + description:Keep current score when game is continued + code:00dfe4/ad+00dfe7/ad + cheat + description:1 credit + code:00dff6/00+00dff5/a9+00dff7/00 + cheat + description:2 credits + code:00dff6/01+00dff5/a9+00dff7/00 + cheat + description:3 credits + code:00dff6/02+00dff5/a9+00dff7/00 + cheat + description:6 credits + code:00dff6/05+00dff5/a9+00dff7/00 + cheat + description:8 credits + code:00dff6/07+00dff5/a9+00dff7/00 + cheat + description:10 credits + code:00dff6/09+00dff5/a9+00dff7/00 + cheat + description:Start with 4 shields + code:00dfeb/36+00dfec/e0 + cheat + description:Start with 5 shields + code:00dfeb/d9+00dfec/9b + cheat + description:Start at experience level 2 + code:00dfff/02 + cheat + description:Start at experience level 3 + code:00dfff/03 + cheat + description:Start at experience level 4 + code:00dfff/04 + cheat + description:Start at experience level 5 + code:00dfff/05 + cheat + description:Start at stage 2 + code:00e030/01+00e02f/a9+00e031/00 + cheat + description:Start at stage 3 + code:00e030/02+00e02f/a9+00e031/00 + cheat + description:Start at stage 4 + code:00e030/03+00e02f/a9+00e031/00 + cheat + description:Start at stage 5 + code:00e030/04+00e02f/a9+00e031/00 + cheat + description:Start at stage 6 + code:00e030/05+00e02f/a9+00e031/00 + cheat + description:Start a new game to view ending + code:008235/08 + +cartridge sha256:a8fe2226728002786d68c27ddddf0b90a894db52e4dfe268fdf72a68cae5f02e + name:EarthBound (USA) + cheat + description:Infinite health (all characters) + code:c2716c/bd + cheat + description:Get to level 99 after one battle (all characters) + code:c1d9fb/ff + cheat + description:Fast money (buy a bread with the code disabled, enable and sell it for $32,646) + code:d55fcc/ff + cheat + description:Dad never calls + code:c0527c/fe + cheat + description:Massive numbers of enemies (piracy check) + code:c0281d/80 + cheat + description:Start with a level 9 character + code:c1d8ec/09 + cheat + description:Start with a level 15 character + code:c1d8ec/0f + cheat + description:Start with a level 50 character + code:c1d8ec/32 + cheat + description:Start with a level 100 character + code:c1d8ec/63 + cheat + description:Start with a level 255 character + code:c1d8ec/ff + cheat + description:Start with a super strong character + code:c1d8f1/ff + cheat + description:Start with a lot of HP + code:c1d90a/99 + cheat + description:Start with a lot of PSI + code:c1d91b/99 + cheat + description:Infinite health + code:7e9a13/e7+7e9a14/03 + cheat + description:9999 current PP + code:7e9a1b/0f+7e9a1c/27 + +cartridge sha256:4579e437279f79eedd6b9cf648a814df2ab2c83d937a1bcec1578d28965fb9a0 + name:Earthworm Jim (USA) + cheat + description:Infinite health + code:c0681a/cd + cheat + description:Infinite Ammo + code:c06777/dd + cheat + description:Infinite lives + code:c00ecf/cd + cheat + description:Hit anywhere (Gun) + code:c0406e/80+c188e9/80+c0406f/15 + cheat + description:Die after one hit + code:c06836/30 + cheat + description:Start with 1 life + code:c066e4/30 + cheat + description:Start with 5 lives + code:c066e4/34 + cheat + description:Start with 10 lives + code:c066e4/39 + cheat + description:Start with 25 lives + code:c066e4/48 + cheat + description:Start with 50 lives + code:c066e4/61 + cheat + description:Start with 300% health + code:c06836/33 + cheat + description:Start with 500% health + code:c06836/35 + cheat + description:Start with 900% health + code:c06836/39 + cheat + description:Invincibility against enemies + code:7e682a/3d + cheat + description:Infinite health (alt) + code:7e6627/39 + cheat + description:Infinite shields + code:7e6b48/63 + cheat + description:Super shot always active + code:7e661c/ff+7e69a0/09 + cheat + description:Infinite time in Sub + code:7e6752/63 + cheat + description:Always win race in Andy Asteroids stages (glitchy graphics) + code:7e6b46/ff + cheat + description:Start on What The Heck? + code:7e512a/01 + cheat + description:Start on What The Heck? (Snowman Boss) + code:7e512a/02 + cheat + description:Start on What The Heck? (Boss Fight With Evil The Cat) + code:7e512a/03 + cheat + description:Start on Snot A Problem Round 1 + code:7e512a/04 + cheat + description:Start on Snot A Problem Round 2 + code:7e512a/05 + cheat + description:Start on Snot A Problem Round 3 + code:7e512a/06 + cheat + description:Start on For Pete's Sake + code:7e512a/07 + cheat + description:Start on Buttville, Part 2 + code:7e512a/08 + cheat + description:Start on Buttville, Part 1 + code:7e512a/09 + cheat + description:Start on Level 5, Part 1 + code:7e512a/0a + cheat + description:Start on Level 5 (Chicken Boss) + code:7e512a/0b + cheat + description:Start on Level 5, Part 2 + code:7e512a/0c + cheat + description:Start on Down The Tubes + code:7e512a/0d + cheat + description:Start on Tube Race + code:7e512a/0e + cheat + description:Start on Andy Asteroids?, Course 1 + code:7e512a/0f + cheat + description:Start on Andy Asteroids?, Course 2 + code:7e512a/10 + cheat + description:Start on Andy Asteroids?, Course 3 + code:7e512a/11 + cheat + description:Start on Andy Asteroids?, Course 4 + code:7e512a/12 + cheat + description:Start on Andy Asteroids?, Course 5 + code:7e512a/13 + cheat + description:Start on Andy Asteroids?, Course 6 + code:7e512a/14 + cheat + description:Start on Who Turned Out The Light?, Part 1 + code:7e512a/15 + cheat + description:Start on Who Turned Out The Light?, Part 2 + code:7e512a/16 + cheat + description:Start on Who Turned Out The Light?, Part 3 + code:7e512a/17 + cheat + description:Start on Who Turned Out The Light?, Part 4 + code:7e512a/18 + cheat + description:Start on Who Turned Out The Light?, Part 5 + code:7e512a/19 + cheat + description:Start on Psycrow + code:7e512a/1a + +cartridge sha256:10eadaab168707829418702386e1bcedd2619d9bbefc37cf31c4118313bcf6de + name:Earthworm Jim 2 (USA) + cheat + description:Infinite health + code:c27431/a9 + cheat + description:Infinite lives + code:c0184a/a9 + cheat + description:Hit anywhere (Gun) + code:c27fa5/80+c27fa6/15 + cheat + description:Infinite time - Lorenzen's Soil level + code:c21ac1/ad + cheat + description:Get 1000 bullets on pick-up + code:c45cb8/03+c45cb7/e9 + cheat + description:Get 2000 bullets on pick-up + code:c45cb8/07+c45cb7/e0 + cheat + description:Start with 200% health + code:c2744d/32 + cheat + description:Start with 300% health + code:c2744d/33 + cheat + description:Start with 400% health + code:c2744d/34 + cheat + description:Start with 500% health + code:c2744d/35 + cheat + description:Start with 700% health + code:c2744d/37 + cheat + description:Start with 900% health + code:c2744d/39 + cheat + description:Start with 1 life and no continues + code:c27175/30 + cheat + description:Start with 5 lives + code:c27175/34 + cheat + description:Start with 7 lives + code:c27175/36 + cheat + description:Start with 9 lives + code:c27175/38 + cheat + description:Start with 2000 bullets + code:c459fa/32 + cheat + description:Start with 3000 bullets + code:c459fa/33 + cheat + description:Start with 4000 bullets + code:c459fa/34 + cheat + description:Start with 5000 bullets + code:c459fa/35 + cheat + description:Start with 7000 bullets + code:c459fa/37 + cheat + description:Start with 9000 bullets + code:c459fa/39 + cheat + description:Invincibility + code:7e653c/10 + +cartridge sha256:5d658b63d35e2e0baf48ae3bb04ea5e1553855b34bb39fc2c7ca41fbd3894d52 + name:Eek! The Cat (USA) + cheat + description:Infinite health + code:7e004e/bf + cheat + description:Infinite lives + code:7e1fe5/09 + +cartridge sha256:a6eec3329d956e1ddc4acfe3c738387622c10fc95fb9ab63dd5f45be8bec0b16 + name:Emerald Dragon (Japan) + cheat + description:Max level after one battle + code:c00fcd/80 + cheat + description:Max Parus after one battle + code:c00f88/80 + cheat + description:No random battles + code:c1a14c/18 + +cartridge sha256:f14e30ee452ec930a6d08094094b287d0c40c8108f2017c418015242987649b3 + name:Emmitt Smith Football (USA) + cheat + description:Cannot be tackled (hold B) + code:80c919/ef+80c916/55+80c915/ad+80c917/01 + +cartridge sha256:cfd666f0bbabec59613d9fe189db7d0a060a78047bc084c0c365840769047bf2 + name:Equinox (USA) + cheat + description:Invincibility against most small monsters + code:08b314/ad + cheat + description:Infinite life + code:08cd42/ea + cheat + description:Infinite magic (must have enough MP for spell to work) + code:08cdf1/af + cheat + description:More life from Apples + code:81d6c8/a9 + cheat + description:Super-jump + code:81d135/21+81d144/24 + cheat + description:Mega-jump + code:81d135/1a+81d144/24 + cheat + description:Super speed + code:81d0a7/9e+81d0ad/a0 + cheat + description:Colored doors don't need keys + code:08b68c/00+08b68d/ea + cheat + description:Walk through objects (hold L) + code:08b27c/d0+08b27a/20+08b277/29+08b276/ad+08b26c/0c + cheat + description:Slow spell lasts 2x as long + code:08ceab/05 + cheat + description:Slow spell lasts 3x as long + code:08ceab/08 + cheat + description:Freeze spell lasts 2x as long + code:08ce96/05 + cheat + description:Freeze spell lasts 3x as long + code:08ce96/08 + +cartridge sha256:1576066e0cb771a91caf79e7d4f6dc00eb0daa47f0786f1604b32537429a7f45 + name:Extra Innings (USA) + cheat + description:Game lasts 1 inning + code:0093f3/01+009416/01+009524/01 + cheat + description:Game lasts 2 innings + code:0093f3/02+009416/02+009524/02 + cheat + description:Game lasts 3 innings + code:0093f3/03+009416/03+009524/03 + cheat + description:Game lasts 4 innings + code:0093f3/04+009416/04+009524/04 + cheat + description:Game lasts 5 innings + code:0093f3/05+009416/05+009524/05 + cheat + description:Game lasts 7 innings + code:0093f3/07+009416/07+009524/07 + cheat + description:1 strike and batter's out + code:008c35/01+008f48/00 + cheat + description:2 strikes and batter's out + code:008c35/02+008f48/01 + cheat + description:Batter never strikes out + code:008c2e/ad+008f4b/ad + cheat + description:1 ball and batter walks + code:008cc7/01 + cheat + description:2 balls and batter walks + code:008cc7/02 + cheat + description:3 balls and batter walks + code:008cc7/03 + cheat + description:Batter never walks + code:008cc0/ad + cheat + description:1 out per inning + code:008f32/01+008c6b/01 + cheat + description:2 outs per inning + code:008f32/02+008c6b/02 + +cartridge sha256:1d38e3af9e3a6409e93f4705b68c42558f558c68f3e83ef2a40e46cf560b26cc + name:F-1 ROC - Race of Champions (USA) + cheat + description:No damage when hitting walls + code:00c1bc/a5 + cheat + description:No damage when hitting other cars + code:00d1d4/a5 + cheat + description:Normal tires are free + code:05faf7/00 + cheat + description:Hi-grip tires are free + code:05faf9/00 + cheat + description:Rain tires are free + code:05faf5/00 + cheat + description:2L nitro is free + code:05fb09/00 + cheat + description:3L nitro is free + code:05fb0b/00 + cheat + description:4L nitro is free + code:05fb0d/00 + cheat + description:Ford V-8 engine is free + code:05faff/00+05fb00/00 + cheat + description:Ilmoa V-8 engine is free + code:05fb01/00+05fb02/00 + cheat + description:Remart V-10 engine is free + code:05fb03/00+05fb04/00 + cheat + description:Low DF rear wing is free + code:05faed/00 + cheat + description:High DF rear wing is free + code:05faf1/00+05faf2/00 + cheat + description:Low DF front wing is free + code:05fae3/00 + cheat + description:High DF front wing is free + code:05fae7/00+05fae8/00 + cheat + description:Special-L front wing is free + code:05fae9/00+05faea/00 + cheat + description:Small diffuser is free + code:05fadb/00 + cheat + description:Large diffuser is free + code:05fadf/00 + cheat + description:Special diffuser is free + code:05fae1/00+05fae2/00 + cheat + description:Hard suspension is free + code:05fad7/00 + cheat + description:Active suspension is free + code:05fad9/00+05fada/00 + cheat + description:Carbon brakes are free + code:05fad1/00 + cheat + description:Antilock brakes are free + code:05fad3/00+05fad4/00 + cheat + description:5-speed transmission is free + code:05fac9/00 + cheat + description:6-speed transmission is free + code:05facb/00+05facc/00 + cheat + description:7-speed transmission is free + code:05facd/00+05face/00 + cheat + description:Type 2 chassis is free + code:05fac3/00+05fac4/00 + cheat + description:Type 3 chassis is free + code:05fac5/00+05fac6/00 + cheat + description:Start with no money instead of $500 + code:08d788/9c + cheat + description:Start with $5,240 + code:08d784/ea+08d785/a9+08d787/02 + cheat + description:Start with $20,600 + code:08d784/ea+08d785/a9+08d787/08 + cheat + description:Start with $163,960 + code:08d784/ea+08d785/a9+08d787/40 + cheat + description:Start with $327,800 + code:08d784/ea+08d785/a9+08d787/80 + cheat + description:Start with $652,920 + code:08d784/ea+08d785/a9+08d787/ff + +cartridge sha256:d689392884df91c2bb84b1411a96f3919b6c9cc8a583dff901a98f0d86d31c30 + name:Faceball 2000 (USA) + cheat + description:Infinite lives + code:02cc9d/b5 + cheat + description:Only need 8 tags to win in arena mode instead of 10 (start with 2 instead of 0) + code:019a65/95 + cheat + description:Allow 98 seconds in zone 1 bonus level + code:0f8461/64 + cheat + description:Allow 98 seconds in zone 2 bonus level + code:0f865d/64 + cheat + description:Allow 98 seconds in zone 3 bonus level + code:0f88b3/64 + cheat + description:Allow 98 seconds in zone 4 bonus level + code:0f8b68/64 + cheat + description:Allow 198 seconds in zone 5 bonus level + code:0f8da8/c8 + cheat + description:Allow 198 seconds in zone 6 bonus level + code:0f9069/c8 + cheat + description:Allow 198 seconds in zone 7 bonus level + code:0f9344/c8 + cheat + description:Start with 1 life instead of 3 + code:019a8a/01 + cheat + description:Start with 5 lives + code:019a8a/05 + cheat + description:Start with 7 lives + code:019a8a/07 + cheat + description:Start with 9 lives + code:019a8a/09 + cheat + description:Start with 25 lives + code:019a8a/19 + cheat + description:Start with 50 lives + code:019a8a/32 + cheat + description:Start with 75 lives + code:019a8a/4b + cheat + description:Start with 99 lives + code:019a8a/63 + cheat + description:Start with 255 lives + code:019a8a/ff + cheat + description:Start each Cyberzone level with 1 tag required + code:029279/a9+02927a/01 + cheat + description:Start each Cyberzone level with 5 tags required + code:029279/a9+02927a/05 + cheat + description:Start each Cyberzone level with 20 tags required + code:029279/a9+02927a/14 + cheat + description:Start each Cyberzone level with 30 tags required + code:029279/a9+02927a/1e + cheat + description:Start each Cyberzone level with 60 tags required + code:029279/a9+02927a/3c + cheat + description:Start each Cyberzone level with 90 tags required + code:029279/a9+02927a/5a + cheat + description:Start Cyberzone mode on zone 1 level 2 + code:02b1dd/ad+02adfa/01 + cheat + description:Start Cyberzone mode on zone 1 level 3 + code:02b1dd/ad+02adfa/02 + cheat + description:Start Cyberzone mode on zone 1 level 4 + code:02b1dd/ad+02adfa/03 + cheat + description:Start Cyberzone mode on zone 1 level 5 + code:02b1dd/ad+02adfa/04 + cheat + description:Start Cyberzone mode on zone 1 bonus level + code:02b1dd/ad+02adfa/05 + cheat + description:Start Cyberzone mode on zone 2 level 6 + code:02b1dd/ad+02adfa/06 + cheat + description:Start Cyberzone mode on zone 2 level 7 + code:02b1dd/ad+02adfa/07 + cheat + description:Start Cyberzone mode on zone 2 level 8 + code:02b1dd/ad+02adfa/08 + cheat + description:Start Cyberzone mode on zone 2 level 9 + code:02b1dd/ad+02adfa/09 + cheat + description:Start Cyberzone mode on zone 2 level 10 + code:02b1dd/ad+02adfa/0a + cheat + description:Start Cyberzone mode on zone 2 bonus level + code:02b1dd/ad+02adfa/0b + cheat + description:Start Cyberzone mode on zone 3 level 11 + code:02b1dd/ad+02adfa/0c + cheat + description:Start Cyberzone mode on zone 3 level 12 + code:02b1dd/ad+02adfa/0d + cheat + description:Start Cyberzone mode on zone 3 level 13 + code:02b1dd/ad+02adfa/0e + cheat + description:Start Cyberzone mode on zone 3 level 14 + code:02b1dd/ad+02adfa/0f + cheat + description:Start Cyberzone mode on zone 3 level 15 + code:02b1dd/ad+02adfa/10 + cheat + description:Start Cyberzone mode on zone 3 bonus level + code:02b1dd/ad+02adfa/11 + cheat + description:Start Cyberzone mode on zone 4 level 16 + code:02b1dd/ad+02adfa/12 + cheat + description:Start Cyberzone mode on zone 4 level 17 + code:02b1dd/ad+02adfa/13 + cheat + description:Start Cyberzone mode on zone 4 level 18 + code:02b1dd/ad+02adfa/14 + cheat + description:Start Cyberzone mode on zone 4 level 19 + code:02b1dd/ad+02adfa/15 + cheat + description:Start Cyberzone mode on zone 4 level 20 + code:02b1dd/ad+02adfa/16 + cheat + description:Start Cyberzone mode on zone 4 bonus level + code:02b1dd/ad+02adfa/17 + cheat + description:Start Cyberzone mode on zone 5 level 21 + code:02b1dd/ad+02adfa/18 + cheat + description:Start Cyberzone mode on zone 5 level 22 + code:02b1dd/ad+02adfa/19 + cheat + description:Start Cyberzone mode on zone 5 level 23 + code:02b1dd/ad+02adfa/1a + cheat + description:Start Cyberzone mode on zone 5 level 24 + code:02b1dd/ad+02adfa/1b + cheat + description:Start Cyberzone mode on zone 5 level 25 + code:02b1dd/ad+02adfa/1c + cheat + description:Start Cyberzone mode on zone 5 bonus level + code:02b1dd/ad+02adfa/1d + cheat + description:Start Cyberzone mode on zone 6 level 26 + code:02b1dd/ad+02adfa/1e + cheat + description:Start Cyberzone mode on zone 6 level 27 + code:02b1dd/ad+02adfa/1f + cheat + description:Start Cyberzone mode on zone 6 level 28 + code:02b1dd/ad+02adfa/20 + cheat + description:Start Cyberzone mode on zone 6 level 29 + code:02b1dd/ad+02adfa/21 + cheat + description:Start Cyberzone mode on zone 6 level 30 + code:02b1dd/ad+02adfa/22 + cheat + description:Start Cyberzone mode on zone 6 bonus level + code:02b1dd/ad+02adfa/23 + cheat + description:Start Cyberzone mode on zone 7 level 31 + code:02b1dd/ad+02adfa/24 + cheat + description:Start Cyberzone mode on zone 7 level 32 + code:02b1dd/ad+02adfa/25 + cheat + description:Start Cyberzone mode on zone 7 level 33 + code:02b1dd/ad+02adfa/26 + cheat + description:Start Cyberzone mode on zone 7 level 34 + code:02b1dd/ad+02adfa/27 + cheat + description:Start Cyberzone mode on zone 7 level 35 + code:02b1dd/ad+02adfa/28 + cheat + description:Start Cyberzone mode on zone 7 bonus level + code:02b1dd/ad+02adfa/29 + cheat + description:Start Cyberzone mode on zone 8 level 36 + code:02b1dd/ad+02adfa/2a + cheat + description:Start Cyberzone mode on zone 8 level 37 + code:02b1dd/ad+02adfa/2b + cheat + description:Start Cyberzone mode on zone 8 level 38 + code:02b1dd/ad+02adfa/2c + cheat + description:Start Cyberzone mode on zone 8 level 39 + code:02b1dd/ad+02adfa/2d + cheat + description:Start Cyberzone mode on zone 8 level 40 + code:02b1dd/ad+02adfa/2e + cheat + description:Start Cyberzone mode on zone 8 level 41 + code:02b1dd/ad+02adfa/2f + +cartridge sha256:2891f1eab285133364ecc379a5c9e1d0026d60f425f1a458d149014f386cfa50 + name:Family Dog (USA) + cheat + description:Infinite health (except against vacuum or falls) + code:81af8c/bd + cheat + description:Infinite lives + code:81c6bc/ad + cheat + description:Infinite Super Barks + code:81c6f2/ad + cheat + description:Start with 90 Super Barks + code:80811f/09 + cheat + description:Cheese Treats worth 10 Super Barks + code:81c6d3/0a + cheat + description:Start in the Hallway + code:80ce46/50 + cheat + description:Start in the Living Room + code:80ce46/64 + cheat + description:Start in the Hallway to the Kitchen + code:80ce46/6e + cheat + description:Start in the Kitchen + code:80ce46/82 + cheat + description:Start in the Hallway to the Backdoor + code:80ce46/8c + cheat + description:Start outside the Yard + code:80ce46/96 + cheat + description:Start in the Kennel Interior + code:80ce46/be + cheat + description:Start in the Kennel Exterior + code:80ce46/e0+80ce47/01 + cheat + description:Start in the Woods and Trees + code:80ce46/f4+80ce47/01 + cheat + description:View the ending + code:80ce46/1c+80ce47/02 + +cartridge sha256:c92f389d25870aada3002775838ec9f69a988120c0238af885fd08d46bd94930 + name:Fatal Fury (USA) + cheat + description:Take minimum damage - P1 + code:00c459/ad + cheat + description:Take minimum damage - P2/CPU + code:00c4d6/ad + cheat + description:Win 1 bout to win the match instead of 2 out of 3 (disable on bonus rounds) + code:00c678/01 + cheat + description:10 seconds to complete bonus rounds + code:00a737/10 + cheat + description:30 seconds to complete bonus rounds + code:00a737/30 + cheat + description:45 seconds to complete bonus rounds + code:00a737/45 + cheat + description:60 seconds to complete bonus rounds + code:00a737/60 + cheat + description:90 seconds to complete bonus rounds + code:00a737/90 + cheat + description:Always fight Richard Myer on the West Subway + code:009223/9c+0093aa/03 + cheat + description:Always fight Michael Max on the West Subway + code:009223/9c+0093aa/04 + cheat + description:Always fight Duck King on the West Subway + code:009223/9c+0093aa/05 + cheat + description:Always fight Tung Fu Rue on the West Subway + code:009223/9c+0093aa/06 + cheat + description:Always fight Hwa Jai on the West Subway + code:009223/9c+0093aa/07 + cheat + description:Always fight Raiden on the West Subway + code:009223/9c+0093aa/08 + cheat + description:Always fight Billy Kane on the West Subway + code:009223/9c+0093aa/09 + cheat + description:Always fight Geese Howard on the West Subway + code:009223/9c+0093aa/0a + cheat + description:Start with 1/4 health - both players + code:00a70b/18 + cheat + description:Start with 1/2 health - both players + code:00a70b/30 + cheat + description:Start with 3/4 health - both players + code:00a70b/48 + +cartridge sha256:a0c554d46034caef231c36dd6849828ca39703678fb7fdd15a11f292b93bcd6b + name:Fatal Fury 2 (USA) + cheat + description:Infinite health - P1 + code:c0310b/80 + cheat + description:Infinite time + code:c030f4/00 + cheat + description:Timer is 2x fast + code:c030f4/02 + cheat + description:Timer is 3x fast + code:c030f4/03 + cheat + description:Computer can't win a round, except last round, game ends after 4 rounds + code:c07c47/ad + cheat + description:P1 is Billy Kane + code:c0b779/a9+c0b77a/08+c0b77b/00 + cheat + description:P1 is Axel Hawk + code:c0b77a/09+c0b779/a9+c0b77b/00 + cheat + description:P1 is Lawrence B + code:c0b779/a9+c0b77b/00+c0b77a/0a + cheat + description:P1 is Wolfgang Krauser + code:c0b77a/0b+c0b779/a9+c0b77b/00 + cheat + description:P2 is Billy Kane + code:c0b7d9/a9+c0b7da/08+c0b7db/00 + cheat + description:P2 is Axel Hawk + code:c0b7da/09+c0b7d9/a9+c0b7db/00 + cheat + description:P2 is Lawrence B + code:c0b7da/0a+c0b7d9/a9+c0b7db/00 + cheat + description:P2 is Wolfgang Krauser + code:c0b7da/0b+c0b7d9/a9+c0b7db/00 + cheat + description:Super vertical jump - P1 + code:ca0776/10 + cheat + description:Bogus vertical jump - P1 + code:ca0776/ff + cheat + description:Start with 1/2 health + code:c030bd/30 + +cartridge sha256:410e90db3d38507ccc85ad3bca6b27a080123fd5160e82b5de4d914d4b6d6e61 + name:Fatal Fury Special (USA) + cheat + description:Instant win - P1 + code:7ff9fd/00 + cheat + description:Almost infinite time + code:7ffcc1/63 + cheat + description:Win 1 round to win the match - P1 + code:7ffc49/02 + cheat + description:Play as Ryo Sakazaki + code:7ff703/0f + +cartridge sha256:b9594d588816ae570ea5fea14577ed47de4db9ac9a40a116c84e0ad7a2ce58f8 + name:Fighter's History (USA) (Rev 1) + cheat + description:Infinite health - P1 + code:7e0a56/c8 + cheat + description:Enable Clown and Karnov + code:7e09a4/01 + cheat + description:Enable sound test + code:c107fa/ea+c107f9/20+c107f8/a9 + +cartridge sha256:f71817f55febd32fd1dce617a326a77b6b062dd0d4058ecd289f64af1b7a1d05 + name:Final Fantasy - Mystic Quest (USA) (Rev 1) + cheat + description:Infinite cure potions + code:00c019/be + cheat + description:Use a cure, gain a cure + code:00c019/fe + cheat + description:Gain 198 cures after one is used + code:00c019/4e + cheat + description:Cure restores life points to maximum + code:00c029/00 + cheat + description:Infinite life points - can make enemies invincible + code:02869b/a5 + cheat + description:Infinite ninja stars + code:0290bb/a5 + cheat + description:Infinite bombs in battle + code:02904f/a5 + cheat + description:Quick level gain + code:0cd0c2/80 + cheat + description:Infinite Cure potions + code:7e0e9e/10+7e0e9f/62 + cheat + description:Infinite Heal potions + code:7e0ea0/10+7e0ea1/62 + cheat + description:Infinite Seeds + code:7e0ea2/10+7e0ea3/62 + cheat + description:Infinite GP + code:7e0e86/97 + cheat + description:Have most items + code:7e0ea6/fe+7e0ea7/7f + cheat + description:Have all weapons + code:7e1032/ff+7e1033/ff + cheat + description:Have all spells + code:7e1038/ff+7e1039/ff + cheat + description:Cure potions restore full health + code:00a040/44+15c049/d5 + cheat + description:99 items in row 1 slot 1 + code:7e0e9f/63 + cheat + description:99 items in row 1 slot 2 + code:7e0e91/63 + cheat + description:99 items in row 1 slot 3 + code:7e0e93/63 + cheat + description:Character 1 - 9999 HP + code:7e1014/0f+7e1015/27 + cheat + description:Character 1 - 9999 maximum HP + code:7e1016/0f+7e1017/27 + cheat + description:Character 1 - max level + code:7e1010/29 + cheat + description:Character 1 - max experience + code:7e1011/7f+7e1012/96+7e1013/98 + cheat + description:Character 1 - 99 White MP + code:7e1018/63 + cheat + description:Character 1 - 99 maximum White MP + code:7e101b/63 + cheat + description:Character 1 - 99 Black MP + code:7e1019/63 + cheat + description:Character 1 - 99 maximum Black MP + code:7e101c/63 + cheat + description:Character 1 - 99 Wizard MP + code:7e101a/63 + cheat + description:Character 1 - 99 maximum Wizard MP + code:7e101d/63 + cheat + description:Character 1 - Infinite Bombs + code:7e1030/63 + cheat + description:Character 1 - Have Sword level 3 + code:7e1031/22 + cheat + description:Character 1 - Have Axe level 3 + code:7e1031/25 + cheat + description:Character 1 - Have Claw level 3 + code:7e1031/28 + cheat + description:Character 1 - Have Bombs level 3 + code:7e1031/2b + cheat + description:Character 2 - 9999 HP + code:7e1096/0f+7e1097/27 + cheat + description:Character 2 - 99 White MP + code:7e1098/63 + cheat + description:Character 2 - 99 maximum White MP + code:7e109b/63 + cheat + description:Character 2 - 99 Black MP + code:7e1099/63 + cheat + description:Character 2 - 99 maximum Black MP + code:7e109c/63 + cheat + description:Character 2 - 99 Wizard MP + code:7e109a/63 + cheat + description:Character 2 - 99 maximum Wizard MP + code:7e109d/63 + cheat + description:Character 2 - Infinite weapon + code:7e10b0/62 + cheat + description:Character 2 - Have Sword level 3 + code:7e10b1/22 + cheat + description:Character 2 - Have Axe level 3 + code:7e10b1/25 + cheat + description:Character 2 - Have Claw level 3 + code:7e10b1/28 + cheat + description:Character 2 - Have Bombs level 3 + code:7e10b1/2b + cheat + description:Character 2 - Have Bow And Arrows + code:7e10b1/2d + cheat + description:Character 2 - Have Throwing Star + code:7e10b1/2e + +cartridge sha256:6151389f33ce2e53db3cd99592440c0020f5f4668f581ce3bd615bc92077f255 + name:Final Fantasy - Mystic Quest (USA) + cheat + description:Infinite life points (can make enemies invincible, disable to defeat them) + code:02869b/a5 + cheat + description:Infinite cure potions + code:00c019/be + cheat + description:Infinite ninja stars + code:0290bb/a5 + cheat + description:Infinite bombs in battle + code:02904f/a5 + cheat + description:Use a cure, gain a cure + code:00c019/fe + cheat + description:Gain 198 cures after one is used + code:00c019/4e + cheat + description:Cure restores life points to maximum + code:00c029/00 + cheat + description:Quick level gain + code:0cd0c2/80 + cheat + description:Infinite Cure potions + code:7e0e9e/10+7e0e9f/62 + cheat + description:Infinite Heal potions + code:7e0ea0/10+7e0ea1/62 + cheat + description:Infinite Seeds + code:7e0ea2/10+7e0ea3/62 + cheat + description:Infinite GP + code:7e0e86/97 + cheat + description:Have most items + code:7e0ea6/fe+7e0ea7/7f + cheat + description:Have all weapons + code:7e1032/ff+7e1033/ff + cheat + description:Have all spells + code:7e1038/ff+7e1039/ff + cheat + description:Cure potions restore full health + code:00a040/44+15c049/d5 + cheat + description:99 items in row 1 slot 1 + code:7e0e9f/63 + cheat + description:99 items in row 1 slot 2 + code:7e0e91/63 + cheat + description:99 items in row 1 slot 3 + code:7e0e93/63 + cheat + description:Character 1 - 9999 HP + code:7e1014/0f+7e1015/27 + cheat + description:Character 1 - 9999 maximum HP + code:7e1016/0f+7e1017/27 + cheat + description:Character 1 - max level + code:7e1010/29 + cheat + description:Character 1 - max experience + code:7e1011/7f+7e1012/96+7e1013/98 + cheat + description:Character 1 - 99 White MP + code:7e1018/63 + cheat + description:Character 1 - 99 maximum White MP + code:7e101b/63 + cheat + description:Character 1 - 99 Black MP + code:7e1019/63 + cheat + description:Character 1 - 99 maximum Black MP + code:7e101c/63 + cheat + description:Character 1 - 99 Wizard MP + code:7e101a/63 + cheat + description:Character 1 - 99 maximum Wizard MP + code:7e101d/63 + cheat + description:Character 1 - Infinite Bombs + code:7e1030/63 + cheat + description:Character 1 - Have Sword level 3 + code:7e1031/22 + cheat + description:Character 1 - Have Axe level 3 + code:7e1031/25 + cheat + description:Character 1 - Have Claw level 3 + code:7e1031/28 + cheat + description:Character 1 - Have Bombs level 3 + code:7e1031/2b + cheat + description:Character 2 - 9999 HP + code:7e1096/0f+7e1097/27 + cheat + description:Character 2 - 99 White MP + code:7e1098/63 + cheat + description:Character 2 - 99 maximum White MP + code:7e109b/63 + cheat + description:Character 2 - 99 Black MP + code:7e1099/63 + cheat + description:Character 2 - 99 maximum Black MP + code:7e109c/63 + cheat + description:Character 2 - 99 Wizard MP + code:7e109a/63 + cheat + description:Character 2 - 99 maximum Wizard MP + code:7e109d/63 + cheat + description:Character 2 - Infinite weapon + code:7e10b0/62 + cheat + description:Character 2 - Have Sword level 3 + code:7e10b1/22 + cheat + description:Character 2 - Have Axe level 3 + code:7e10b1/25 + cheat + description:Character 2 - Have Claw level 3 + code:7e10b1/28 + cheat + description:Character 2 - Have Bombs level 3 + code:7e10b1/2b + cheat + description:Character 2 - Have Bow And Arrows + code:7e10b1/2d + cheat + description:Character 2 - Have Throwing Star + code:7e10b1/2e + +cartridge sha256:414bacc05a18a6137c0de060b4094ab6d1b75105342b0bb36a42e45d945a0e4d + name:Final Fantasy II (USA) (Rev 1) + cheat + description:Almost infinite HP (can make big and sometimes normal monsters invincible, disable to defeat them) + code:03caf6/bd + cheat + description:Infinite MP during battles, doesn't work on twin attacks + code:038532/bd + cheat + description:Infinite items outside of battle except for the Whistle + code:01a6f5/ae + cheat + description:Infinite Whistles + code:01a328/ae + cheat + description:Money doesn't decrease if you run away from a battle + code:0388d5/ad+0388de/ad + cheat + description:Money doesn't decrease in shops + code:01c702/ad+01c707/ae + cheat + description:No random battles + code:7e0686/00 + cheat + description:No random battles (alt) + code:00894d/60 + cheat + description:Always fight the rarest enemy in that area + code:008af4/0c + cheat + description:Always get a treasure from each enemy defeated + code:03ecf1/80 + cheat + description:When treasures are awarded after battle, receive 5 instead of 1 + code:01d488/05 + cheat + description:When arrows are awarded after battle, receive 50 instead of 10 + code:01d47e/32 + cheat + description:When treasures are awarded after battle, receive the rarest + code:03ed35/03 + cheat + description:Sumon the Big Chocobo anywhere by using a Carrot instead of the Whistle + code:01a325/eb + cheat + description:The quantity of items don't decrease when selling them + code:01ca54/bd + cheat + description:No music while traveling or in a town + code:008b3f/60 + cheat + description:Gunslinger code + code:01a6f2/44 + cheat + description:Save anywhere + code:0099cf/a9 + cheat + description:131,070 exp points after each battle + code:13ff7b/01+13ff91/b1 + cheat + description:16,646,142 exp points after each battle + code:13ff7b/01+13ff91/b1+13ff8b/b3 + cheat + description:Get at least 150 GP after each battle + code:03ed72/69+03ed73/96+03ed74/ea + cheat + description:Get at least 255 GP after each battle + code:03ed7e/ee + cheat + description:Get at least 65,536 GP after each battle + code:03ed87/ee + cheat + description:Get 99 of items that you are given or find in a pot, treasure chest, etc. + code:009819/63 + cheat + description:Get 99 arrows when you find them in a pot or treasure chest + code:009828/63 + cheat + description:Cure2 is ultra strong + code:0f973b/c8 + cheat + description:Cure2 restores HP to all members in the party during battle + code:0f973a/40 + cheat + description:Cure2 restores all HP/MP during battle + code:0f973d/16 + cheat + description:Fire1 spell is ultra strong + code:0f984f/c8 + cheat + description:Fire1 spell hits every enemy + code:0f984e/c1 + cheat + description:Ice1 spell is ultra strong + code:0f9861/c8 + cheat + description:Ice1 spell hits every enemy + code:0f9860/c1 + cheat + description:Lit1 spell is ultra strong + code:0f9873/c8 + cheat + description:Lit1 spell hits every enemy + code:0f9872/c1 + cheat + description:Automatically win battles (no EXP or gold gained) + code:7e1801/02+7e1800/08 + cheat + description:65,000+ exp points after each battle + code:7e3592/ff+7e359e/ff + cheat + description:Character 1 - Max HP + code:7e1047/0f+7e1048/27+7e1049/0f+7e104a/27 + cheat + description:Character 1 - Max MP + code:7e104b/0f+7e104c/27+7e104d/0f+7e104e/27 + cheat + description:Character 1 - Max Agility + code:7e1050/63+7e1055/63 + cheat + description:Character 1 - Max Strength + code:7e104f/63+7e1054/63 + cheat + description:Character 1 - Max Vitality + code:7e1051/63+7e1056/63 + cheat + description:Character 1 - Max Will + code:7e1053/63+7e1058/63 + cheat + description:Character 1 - Max Wisdom + code:7e1052/63+7e1057/63 + cheat + description:Character 2 - Max HP + code:7e10c7/0f+7e10c8/27+7e10c9/0f+7e10ca/27 + cheat + description:Character 2 - Max MP + code:7e10cb/0f+7e10cc/27+7e10cd/0f+7e10ce/27 + cheat + description:Character 2 - Max Agility + code:7e10d0/63+7e10d5/63 + cheat + description:Character 2 - Max Strength + code:7e10cf/63+7e10d4/63 + cheat + description:Character 2 - Max Vitality + code:7e10d1/63+7e10d6/63 + cheat + description:Character 2 - Max Will + code:7e10d3/63+7e10d8/63 + cheat + description:Character 2 - Max Wisdom + code:7e10d2/63+7e10d7/63 + cheat + description:Character 3 - Max HP + code:7e1007/0f+7e1008/27+7e1009/0f+7e100a/27 + cheat + description:Character 3 - Max MP + code:7e100b/0f+7e100c/27+7e100d/0f+7e100e/27 + cheat + description:Character 3 - Max Agility + code:7e1010/63+7e1015/63 + cheat + description:Character 3 - Max Strength + code:7e100f/63+7e1014/63 + cheat + description:Character 3 - Max Vitality + code:7e1011/63+7e1016/63 + cheat + description:Character 3 - Max Will + code:7e1013/63+7e1018/63 + cheat + description:Character 3 - Max Wisdom + code:7e1012/63+7e1017/63 + cheat + description:Character 4 - Max HP + code:7e1107/0f+7e1108/27+7e1109/0f+7e110a/27 + cheat + description:Character 4 - Max MP + code:7e110b/0f+7e110c/27+7e110d/0f+7e110e/27 + cheat + description:Character 4 - Max Agility + code:7e1110/63+7e1115/63 + cheat + description:Character 4 - Max Strength + code:7e110f/63+7e1114/63 + cheat + description:Character 4 - Max Vitality + code:7e1111/63+7e1116/63 + cheat + description:Character 4 - Max Will + code:7e1113/63+7e1118/63 + cheat + description:Character 4 - Max Wisdom + code:7e1112/63+7e1117/63 + cheat + description:Character 5 - Max HP + code:7e1087/0f+7e1088/27+7e1089/0f+7e108a/27 + cheat + description:Character 5 - Max MP + code:7e108b/0f+7e108c/27+7e108d/0f+7e108e/27 + cheat + description:Character 5 - Max Agility + code:7e1090/63+7e1095/63 + cheat + description:Character 5 - Max Strength + code:7e108f/63+7e1094/63 + cheat + description:Character 5 - Max Vitality + code:7e1091/63+7e1096/63 + cheat + description:Character 5 - Max Will + code:7e1093/63+7e1098/63 + cheat + description:Character 5 - Max Wisdom + code:7e1092/63+7e1097/63 + cheat + description:Have 99 of slot 1 + code:7e1441/63 + cheat + description:Have 99 of slot 2 + code:7e1443/63 + cheat + description:Have 99 of slot 3 + code:7e1445/63 + cheat + description:Have 99 of slot 4 + code:7e1447/63 + cheat + description:Have 99 of slot 5 + code:7e1449/63 + cheat + description:Have 99 of slot 6 + code:7e144b/63 + cheat + description:Have 99 of slot 7 + code:7e144d/63 + cheat + description:Have 99 of slot 8 + code:7e144f/63 + cheat + description:Have 99 of slot 9 + code:7e1451/63 + cheat + description:Have 99 of slot 10 + code:7e1453/63 + cheat + description:Have Cure3 in slot 1 + code:7e1440/d0 + cheat + description:Have Cure3 in slot 2 + code:7e1442/d0 + cheat + description:Have Ether2 in slot 3 + code:7e1444/d2 + cheat + description:Have Elixer in slot 4 + code:7e1446/d3 + cheat + description:Have Life in slot 5 + code:7e1448/d4 + cheat + description:Have Cabin in slot 6 + code:7e144a/e3 + cheat + description:Have Spoon in slot 7 + code:7e144c/3e + cheat + description:Have Adamant Armor in slot 8 + code:7e144e/9a + +cartridge sha256:680535dc1c4196c53b40dc9c2c9bc159a77802ab8d4b474bef5dc0281c15ad06 + name:Final Fantasy II (USA) + cheat + description:Skip intro + code:128020/09+128021/04 + cheat + description:Almost infinite HP (can make big and sometimes normal monsters invincible, disable to defeat them) + code:03cae6/bd + cheat + description:Infinite MP during battles, doesn't work on twin attacks + code:038532/bd + cheat + description:Infinite items outside of battle except for the Whistle + code:01a6f5/ae + cheat + description:Infinite Whistles + code:01a328/ae + cheat + description:Money doesn't decrease if you run away from a battle + code:0388d5/ad+0388de/ad + cheat + description:Money doesn't decrease in shops + code:01c702/ad+01c707/ae + cheat + description:No random battles + code:7e0686/00 + cheat + description:No random battles (alt) + code:00894d/60 + cheat + description:Always fight the rarest enemy in that area + code:008af4/0c + cheat + description:Always get a treasure from each enemy defeated + code:03ecdc/80 + cheat + description:When treasures are awarded after battle, receive 5 instead of 1 + code:01d488/05 + cheat + description:When arrows are awarded after battle, receive 50 instead of 10 + code:01d47e/32 + cheat + description:When treasures are awarded after battle, receive the rarest + code:03ed20/03 + cheat + description:Sumon the Big Chocobo anywhere by using a Carrot instead of the Whistle + code:01a325/eb + cheat + description:The quantity of items don't decrease when selling them + code:01ca54/bd + cheat + description:No music while traveling or in a town + code:008b3f/60 + cheat + description:Gunslinger code + code:01a6f2/44 + cheat + description:Save anywhere + code:0099cf/a9 + cheat + description:131,070 exp points after each battle + code:13ff7b/01+13ff91/b1 + cheat + description:16,646,142 exp points after each battle + code:13ff7b/01+13ff91/b1+13ff8b/b3 + cheat + description:Get at least 150 GP after each battle + code:03ed5d/69+03ed5e/96+03ed5f/ea + cheat + description:Get at least 255 GP after each battle + code:03ed5d/69+03ed5e/ff+03ed5f/ea + cheat + description:Get at least 65,536 GP after each battle + code:03ed72/ee + cheat + description:Get 99 of items that you are given or find in a pot, treasure chest, etc. + code:009819/63 + cheat + description:Get 99 arrows when you find them in a pot or treasure chest + code:009828/63 + cheat + description:Cure2 is ultra strong + code:0f973b/c8 + cheat + description:Cure2 restores HP to all members in the party during battle + code:0f973a/40 + cheat + description:Cure2 restores all HP/MP during battle + code:0f973d/16 + cheat + description:Fire1 spell is ultra strong + code:0f984f/c8 + cheat + description:Fire1 spell hits every enemy + code:0f984e/c1 + cheat + description:Ice1 spell is ultra strong + code:0f9861/c8 + cheat + description:Ice1 spell hits every enemy + code:0f9860/c1 + cheat + description:Lit1 spell is ultra strong + code:0f9873/c8 + cheat + description:Lit1 spell hits every enemy + code:0f9872/c1 + cheat + description:Infinite HP + code:03cae6/bd + cheat + description:Automatically win battles (no EXP or gold gained) + code:7e1801/02+7e1800/08 + cheat + description:65,000+ exp points after each battle + code:7e3592/ff+7e359e/ff + cheat + description:Character 1 - Max HP + code:7e1047/0f+7e1048/27+7e1049/0f+7e104a/27 + cheat + description:Character 1 - Max MP + code:7e104b/0f+7e104c/27+7e104d/0f+7e104e/27 + cheat + description:Character 1 - Max Agility + code:7e1050/63+7e1055/63 + cheat + description:Character 1 - Max Strength + code:7e104f/63+7e1054/63 + cheat + description:Character 1 - Max Vitality + code:7e1051/63+7e1056/63 + cheat + description:Character 1 - Max Will + code:7e1053/63+7e1058/63 + cheat + description:Character 1 - Max Wisdom + code:7e1052/63+7e1057/63 + cheat + description:Character 2 - Max HP + code:7e10c7/0f+7e10c8/27+7e10c9/0f+7e10ca/27 + cheat + description:Character 2 - Max MP + code:7e10cb/0f+7e10cc/27+7e10cd/0f+7e10ce/27 + cheat + description:Character 2 - Max Agility + code:7e10d0/63+7e10d5/63 + cheat + description:Character 2 - Max Strength + code:7e10cf/63+7e10d4/63 + cheat + description:Character 2 - Max Vitality + code:7e10d1/63+7e10d6/63 + cheat + description:Character 2 - Max Will + code:7e10d3/63+7e10d8/63 + cheat + description:Character 2 - Max Wisdom + code:7e10d2/63+7e10d7/63 + cheat + description:Character 3 - Max HP + code:7e1007/0f+7e1008/27+7e1009/0f+7e100a/27 + cheat + description:Character 3 - Max MP + code:7e100b/0f+7e100c/27+7e100d/0f+7e100e/27 + cheat + description:Character 3 - Max Agility + code:7e1010/63+7e1015/63 + cheat + description:Character 3 - Max Strength + code:7e100f/63+7e1014/63 + cheat + description:Character 3 - Max Vitality + code:7e1011/63+7e1016/63 + cheat + description:Character 3 - Max Will + code:7e1013/63+7e1018/63 + cheat + description:Character 3 - Max Wisdom + code:7e1012/63+7e1017/63 + cheat + description:Character 4 - Max HP + code:7e1107/0f+7e1108/27+7e1109/0f+7e110a/27 + cheat + description:Character 4 - Max MP + code:7e110b/0f+7e110c/27+7e110d/0f+7e110e/27 + cheat + description:Character 4 - Max Agility + code:7e1110/63+7e1115/63 + cheat + description:Character 4 - Max Strength + code:7e110f/63+7e1114/63 + cheat + description:Character 4 - Max Vitality + code:7e1111/63+7e1116/63 + cheat + description:Character 4 - Max Will + code:7e1113/63+7e1118/63 + cheat + description:Character 4 - Max Wisdom + code:7e1112/63+7e1117/63 + cheat + description:Character 5 - Max HP + code:7e1087/0f+7e1088/27+7e1089/0f+7e108a/27 + cheat + description:Character 5 - Max MP + code:7e108b/0f+7e108c/27+7e108d/0f+7e108e/27 + cheat + description:Character 5 - Max Agility + code:7e1090/63+7e1095/63 + cheat + description:Character 5 - Max Strength + code:7e108f/63+7e1094/63 + cheat + description:Character 5 - Max Vitality + code:7e1091/63+7e1096/63 + cheat + description:Character 5 - Max Will + code:7e1093/63+7e1098/63 + cheat + description:Character 5 - Max Wisdom + code:7e1092/63+7e1097/63 + cheat + description:Have 99 of slot 1 + code:7e1441/63 + cheat + description:Have 99 of slot 2 + code:7e1443/63 + cheat + description:Have 99 of slot 3 + code:7e1445/63 + cheat + description:Have 99 of slot 4 + code:7e1447/63 + cheat + description:Have 99 of slot 5 + code:7e1449/63 + cheat + description:Have 99 of slot 6 + code:7e144b/63 + cheat + description:Have 99 of slot 7 + code:7e144d/63 + cheat + description:Have 99 of slot 8 + code:7e144f/63 + cheat + description:Have 99 of slot 9 + code:7e1451/63 + cheat + description:Have 99 of slot 10 + code:7e1453/63 + cheat + description:Have Cure3 in slot 1 + code:7e1440/d0 + cheat + description:Have Cure3 in slot 2 + code:7e1442/d0 + cheat + description:Have Ether2 in slot 3 + code:7e1444/d2 + cheat + description:Have Elixer in slot 4 + code:7e1446/d3 + cheat + description:Have Life in slot 5 + code:7e1448/d4 + cheat + description:Have Cabin in slot 6 + code:7e144a/e3 + cheat + description:Have Spoon in slot 7 + code:7e144c/3e + cheat + description:Have Adamant Armor in slot 8 + code:7e144e/9a + +cartridge sha256:10eccc5d2fab81346dd759f6be478dcb682eef981e8d3d662da176e1f9a996bc + name:Final Fantasy III (USA) (Rev 1) + cheat + description:Party has almost max HP and MP + code:c20f93/ff + cheat + description:Activate Terra's Morph command + code:7e1dd1/0c + cheat + description:Infinite Morph time out of battle + code:7e1cf6/ff + cheat + description:Infinite Morph time in battle + code:7e3f31/ff + cheat + description:All items in shops are free (disable to sell items) + code:c3bba5/64+c3bbab/64 + cheat + description:Infinite item use + code:c39db3/ea + cheat + description:Infinite item use (alt) + code:c39dae/ea + cheat + description:Protect from all status ailments + code:d86de8/e7+d86de9/f8 + cheat + description:Learn all spells after one battle + code:c2613b/b0 + cheat + description:Earn 65,000+ exp points after each battle + code:c25de8/43 + cheat + description:Earn tons of EXP after a battle (level 99 takes two battles) + code:c25de8/42 + cheat + description:Auto cast Float, Regen, Haste, Shell, Safe and Rflect + code:d86dea/eb + cheat + description:Remove curse from Cursed Shield after only 1 battle + code:c26002/00 + cheat + description:Steal command always gets the more rare item an enemy has + code:c239df/00 + cheat + description:Mog never stumbles when he dances + code:c217a1/00 + cheat + description:Party has Sprint Shoes and Moogle Charm effect + code:c20fa5/cc + cheat + description:Party has Sprint Shoes and Moogle Charm effect (alt) + code:c20fa3/cc + cheat + description:Party has Offering effect + code:c2293d/1a+c2293e/ea + cheat + description:Party has Merit Award effect + code:c39c5a/00 + cheat + description:Party has Economizer effect + code:c35134/00+c25744/00 + cheat + description:Offering gives character instant kill attacks + code:c21625/3f + cheat + description:Enable all characters (once you are able to switch) + code:7e1ede/ff+7e1edf/ff + cheat + description:Have 94 of all items when arrange is used + code:c326ba/a9+c326bc/8a+c3272f/af+c32732/de + cheat + description:Have all Blitz's + code:7e1d28/ff + cheat + description:Have all Dance's + code:7e1d4c/ff + cheat + description:Have all Lore's + code:7e1d29/ff+7e1d2a/ff+7e1d2b/ff + cheat + description:Have all SwdTech's + code:7e1cf7/ff + cheat + description:Have all Espers + code:7e1a69/ff+7e1a6a/ff+7e1a6b/ff+7e1a6c/ff + cheat + description:Enemy 1 has 0 HP + code:7e3bfc/00+7e3bfd/00 + cheat + description:Enemy 2 has 0 HP + code:7e3bfe/00+7e3bff/00 + cheat + description:Enemy 3 has 0 HP + code:7e3c00/00+7e3c01/00 + cheat + description:Enemy 4 has 0 HP + code:7e3c02/00+7e3c03/00 + cheat + description:Enemy 5 has 0 HP + code:7e3c04/00+7e3c05/00 + cheat + description:Enemy 6 has 0 HP + code:7e3c06/00+7e3c07/00 + cheat + description:Faster up/down movement on world map + code:ee1f96/20+ee1fe3/e0 + cheat + description:Faster left/right movement on world map + code:ee1efa/20+ee1f48/e0 + cheat + description:Save anywhere + code:7e0201/80 + cheat + description:Start Terra with Man-eater equipped + code:ed7caf/06 + cheat + description:Start Terra with Excalibur equipped + code:ed7caf/18 + cheat + description:Start Terra with Illumina equipped + code:ed7caf/1a + cheat + description:Start Terra with Atma equipped + code:ed7caf/1c + cheat + description:Start Terra with Tempest equipped + code:ed7caf/2e + cheat + description:Start Terra with Blizzard equipped + code:ed7caf/0e + cheat + description:Start Terra with Enhancer equipped + code:ed7caf/13 + cheat + description:Start Terra with Mithril shield equipped + code:ed7cb0/5c + cheat + description:Start Terra with Gold shield equipped + code:ed7cb0/5d + cheat + description:Start Terra with Ice shield equipped + code:ed7cb0/61 + cheat + description:Start Terra with Fire shield equipped + code:ed7cb0/60 + cheat + description:Start Terra with Hairband equipped + code:ed7cb1/6a + cheat + description:Start Terra with Leather hat equipped + code:ed7cb1/69 + cheat + description:Start Terra with Circlet equipped + code:ed7cb1/7a + cheat + description:Start Terra with Mystery veil equipped + code:ed7cb1/79 + cheat + description:Start Terra with Red cap equipped + code:ed7cb1/78 + cheat + description:Start Terra with Silk robe equipped + code:ed7cb2/88 + cheat + description:Start Terra with Mithril vest equipped + code:ed7cb2/89 + cheat + description:Start Terra with White dress equipped + code:ed7cb2/8b + cheat + description:Start Terra with Genji armor equipped + code:ed7cb2/9a + cheat + description:Start Terra with Force armor equipped + code:ed7cb2/94 + cheat + description:Party has Sprint Shoes and Moogle Charm effect (alt 2) + code:7e11df/22 + cheat + description:Have 99 Sprint Shoes in slot 10 + code:7e1872/e6+7e1972/63 + cheat + description:Enemy 1 has 0 HP (alt) + code:7e3bfc/00+7e3bfd/00 + cheat + description:Enemy 2 has 0 HP (alt) + code:7e3bfe/00+7e3bff/00 + cheat + description:Enemy 3 has 0 HP (alt) + code:7e3c00/00+7e3c01/00 + cheat + description:Enemy 4 has 0 HP (alt) + code:7e3c02/00+7e3c03/00 + cheat + description:Enemy 5 has 0 HP (alt) + code:7e3c04/00+7e3c05/00 + cheat + description:Enemy 6 has 0 HP (alt) + code:7e3c06/00+7e3c07/00 + cheat + description:Save anywhere (alt) + code:7e0201/80 + cheat + description:Have all Rage's + code:7e1d35/ff+7e1d36/ff+7e1d37/ff+7e1d3f/ff+7e1d38/ff+7e1d40/ff+7e1d39/ff+7e1d41/ff+7e1d3a/ff+7e1d49/ff+7e1d42/ff+7e1d3b/ff+7e1d4a/ff+7e1d43/ff+7e1d3c/ff+7e1d4b/ff+7e1d44/ff+7e1d3d/ff+7e1d45/ff+7e1d3e/ff+7e1d46/ff+7e1d47/ff+7e1d48/ff+7e1d2c/ff+7e1d2d/ff+7e1d2e/ff+7e1d2f/ff+7e1d30/ff+7e1d31/ff+7e1d32/ff+7e1d33/ff+7e1d34/ff + cheat + description:Celes - Level 99 + code:7e16e6/63 + cheat + description:Celes - 9999 HP + code:7e16e7/0f+7e16e8/27 + cheat + description:Celes - 9999 Max HP + code:7e16e9/0f+7e16ea/27 + cheat + description:Celes - 9999 MP + code:7e16eb/0f+7e16ec/27 + cheat + description:Celes - 9999 Max MP + code:7e16ed/0f+7e16ee/27 + cheat + description:Celes - No Ailments + code:7e16f2/00 + cheat + description:Celes - Float always on + code:7e16f3/ff + cheat + description:Celes - 255 Vigor + code:7e16f8/ff + cheat + description:Celes - 255 Speed + code:7e16f9/ff + cheat + description:Celes - 255 Stamina + code:7e16fa/ff + cheat + description:Celes - 255 Magic Power + code:7e16fb/ff + cheat + description:Cyan - Level 99 + code:7e1652/63 + cheat + description:Cyan - 9999 HP + code:7e1653/0f+7e1654/27 + cheat + description:Cyan - 9999 Max HP + code:7e1655/0f+7e1656/27 + cheat + description:Cyan - 9999 MP + code:7e1657/0f+7e1658/27 + cheat + description:Cyan - 9999 Max MP + code:7e1659/0f+7e165a/27 + cheat + description:Cyan - No Ailments + code:7e165e/00 + cheat + description:Cyan - Float always on + code:7e165f/ff + cheat + description:Cyan - 255 Vigor + code:7e1664/ff + cheat + description:Cyan - 255 Speed + code:7e1665/ff + cheat + description:Cyan - 255 Stamina + code:7e1666/ff + cheat + description:Cyan - 255 Magic Power + code:7e1667/ff + cheat + description:Edgar - Level 99 + code:7e169c/63 + cheat + description:Edgar - 9999 HP + code:7e169d/0f+7e169e/27 + cheat + description:Edgar - 9999 Max HP + code:7e169f/0f+7e16a0/27 + cheat + description:Edgar - 9999 MP + code:7e16a1/0f+7e16a2/27 + cheat + description:Edgar - 9999 Max MP + code:7e16a3/0f+7e16a4/27 + cheat + description:Edgar - No Ailments + code:7e16a8/00 + cheat + description:Edgar - Float always on + code:7e16a9/ff + cheat + description:Edgar - 255 Vigor + code:7e16ae/ff + cheat + description:Edgar - 255 Speed + code:7e16af/ff + cheat + description:Edgar - 255 Stamina + code:7e16b0/ff + cheat + description:Edgar - 255 Magic Power + code:7e16b1/ff + cheat + description:Gau - Level 99 + code:7e179f/63 + cheat + description:Gau - 9999 HP + code:7e17a0/0f+7e17a1/27 + cheat + description:Gau - 9999 Max HP + code:7e17a2/0f+7e17a3/27 + cheat + description:Gau - 9999 MP + code:7e17a4/0f+7e17a5/27 + cheat + description:Gau - 9999 Max MP + code:7e17a6/0f+7e17a7/27 + cheat + description:Gau - No Ailments + code:7e17ab/00 + cheat + description:Gau - Float always on + code:7e17ac/ff + cheat + description:Gau - 255 Vigor + code:7e17b1/ff + cheat + description:Gau - 255 Speed + code:7e17b2/ff + cheat + description:Gau - 255 Stamina + code:7e17b3/ff + cheat + description:Gau - 255 Magic Power + code:7e17b4/ff + cheat + description:Gogo - Level 99 + code:7e17c4/63 + cheat + description:Gogo - 9999 HP + code:7e17c5/0f+7e17c6/27 + cheat + description:Gogo - 9999 Max HP + code:7e17c7/0f+7e17c8/27 + cheat + description:Gogo - 9999 MP + code:7e17c9/0f+7e17ca/27 + cheat + description:Gogo - 9999 Max MP + code:7e17cb/0f+7e17cc/27 + cheat + description:Gogo - No Ailments + code:7e17d0/00 + cheat + description:Gogo - Float always on + code:7e17d1/ff + cheat + description:Gogo - 255 Vigor + code:7e17d6/ff + cheat + description:Gogo - 255 Speed + code:7e17d7/ff + cheat + description:Gogo - 255 Stamina + code:7e17d8/ff + cheat + description:Gogo - 255 Magic Power + code:7e17d9/ff + cheat + description:Locke - Level 99 + code:7e162d/63 + cheat + description:Locke - 9999 HP + code:7e162e/0f+7e162f/27 + cheat + description:Locke - 9999 Max HP + code:7e1630/0f+7e1631/27 + cheat + description:Locke - 9999 MP + code:7e1632/0f+7e1633/27 + cheat + description:Locke - 9999 Max MP + code:7e1634/0f+7e1635/27 + cheat + description:Locke - No Ailments + code:7e1639/00 + cheat + description:Locke - Float always on + code:7e163a/ff + cheat + description:Locke - 255 Vigor + code:7e163f/ff + cheat + description:Locke - 255 Speed + code:7e1640/ff + cheat + description:Locke - 255 Stamina + code:7e1641/ff + cheat + description:Locke - 255 Magic Power + code:7e1642/ff + cheat + description:Mog - Level 99 + code:7e177a/63 + cheat + description:Mog - 9999 HP + code:7e177b/0f+7e177c/27 + cheat + description:Mog - 9999 Max HP + code:7e177d/0f+7e177e/27 + cheat + description:Mog - 9999 MP + code:7e177f/0f+7e1780/27 + cheat + description:Mog - 9999 Max MP + code:7e1781/0f+7e1782/27 + cheat + description:Mog - No Ailments + code:7e1786/00 + cheat + description:Mog - Float always on + code:7e1787/ff + cheat + description:Mog - 255 Vigor + code:7e178c/ff + cheat + description:Mog - 255 Speed + code:7e178d/ff + cheat + description:Mog - 255 Stamina + code:7e178e/ff + cheat + description:Mog - 255 Magic Power + code:7e178f/ff + cheat + description:Relm - Level 99 + code:7e1730/63 + cheat + description:Relm - 9999 HP + code:7e1731/0f+7e1732/27 + cheat + description:Relm - 9999 Max HP + code:7e1733/0f+7e1734/27 + cheat + description:Relm - 9999 MP + code:7e1735/0f+7e1736/27 + cheat + description:Relm - 9999 Max MP + code:7e1737/0f+7e1738/27 + cheat + description:Relm - No Ailments + code:7e173c/00 + cheat + description:Relm - Float always on + code:7e173d/ff + cheat + description:Relm - 255 Vigor + code:7e1742/ff + cheat + description:Relm - 255 Speed + code:7e1743/ff + cheat + description:Relm - 255 Stamina + code:7e1744/ff + cheat + description:Relm - 255 Magic Power + code:7e1745/ff + cheat + description:Sabin - Level 99 + code:7e16c1/63 + cheat + description:Sabin - 9999 HP + code:7e16c2/0f+7e16c3/27 + cheat + description:Sabin - 9999 Max HP + code:7e16c4/0f+7e16c5/27 + cheat + description:Sabin - 9999 MP + code:7e16c6/0f+7e16c7/27 + cheat + description:Sabin - 9999 Max MP + code:7e16c8/0f+7e16c9/27 + cheat + description:Sabin - No Ailments + code:7e16cd/00 + cheat + description:Sabin - Float always on + code:7e16ce/ff + cheat + description:Sabin - 255 Vigor + code:7e16d3/ff + cheat + description:Sabin - 255 Speed + code:7e16d4/ff + cheat + description:Sabin - 255 Stamina + code:7e16d5/ff + cheat + description:Sabin - 255 Magic Power + code:7e16d6/ff + cheat + description:Setzer - Level 99 + code:7e1755/63 + cheat + description:Setzer - 9999 HP + code:7e1756/0f+7e1757/27 + cheat + description:Setzer - 9999 Max HP + code:7e1758/0f+7e1759/27 + cheat + description:Setzer - 9999 MP + code:7e175a/0f+7e175b/27 + cheat + description:Setzer - 9999 Max MP + code:7e175c/0f+7e175d/27 + cheat + description:Setzer - No Ailments + code:7e1761/00 + cheat + description:Setzer - Float always on + code:7e1762/ff + cheat + description:Setzer - 255 Vigor + code:7e1767/ff + cheat + description:Setzer - 255 Speed + code:7e1768/ff + cheat + description:Setzer - 255 Stamina + code:7e1769/ff + cheat + description:Setzer - 255 Magic Power + code:7e176a/ff + cheat + description:Shadow - Level 99 + code:7e1677/63 + cheat + description:Shadow - 9999 HP + code:7e1678/0f+7e1679/27 + cheat + description:Shadow - 9999 Max HP + code:7e167a/0f+7e167b/27 + cheat + description:Shadow - 9999 MP + code:7e167c/0f+7e167d/27 + cheat + description:Shadow - 9999 Max MP + code:7e167e/0f+7e167f/27 + cheat + description:Shadow - No Ailments + code:7e1683/00 + cheat + description:Shadow - Float always on + code:7e1684/ff + cheat + description:Shadow - 255 Vigor + code:7e1689/ff + cheat + description:Shadow - 255 Speed + code:7e168a/ff + cheat + description:Shadow - 255 Stamina + code:7e168b/ff + cheat + description:Shadow - 255 Magic Power + code:7e168c/ff + cheat + description:Strago - Level 99 + code:7e170b/63 + cheat + description:Strago - 9999 HP + code:7e170c/0f+7e170d/27 + cheat + description:Strago - 9999 Max HP + code:7e170e/0f+7e170f/27 + cheat + description:Strago - 9999 MP + code:7e1710/0f+7e1711/27 + cheat + description:Strago - 9999 Max MP + code:7e1712/0f+7e1713/27 + cheat + description:Strago - No Ailments + code:7e1717/00 + cheat + description:Strago - Float always on + code:7e1718/ff + cheat + description:Strago - 255 Vigor + code:7e171d/ff + cheat + description:Strago - 255 Speed + code:7e171e/ff + cheat + description:Strago - 255 Stamina + code:7e171f/ff + cheat + description:Strago - 255 Magic Power + code:7e1720/ff + cheat + description:Terra - Level 99 + code:7e1608/63 + cheat + description:Terra - 9999 HP + code:7e1609/0f+7e160a/27 + cheat + description:Terra - 9999 Max HP + code:7e160b/0f+7e160c/27 + cheat + description:Terra - 9999 MP + code:7e160d/0f+7e160e/27 + cheat + description:Terra - 9999 Max MP + code:7e160f/0f+7e1610/27 + cheat + description:Terra - No ailments + code:7e1614/00 + cheat + description:Terra - Float always on + code:7e1615/ff + cheat + description:Terra - 255 Vigor + code:7e161a/ff + cheat + description:Terra - 255 Speed + code:7e161b/ff + cheat + description:Terra - 255 Stamina + code:7e161c/ff + cheat + description:Terra - 255 Magic Power + code:7e161d/ff + cheat + description:Umaro - Level 99 + code:7e17e9/63 + cheat + description:Umaro - 9999 HP + code:7e17ea/0f+7e17eb/27 + cheat + description:Umaro - 9999 Max HP + code:7e17ec/0f+7e17ed/27 + cheat + description:Umaro - 9999 MP + code:7e17ee/0f+7e17ef/27 + cheat + description:Umaro - 9999 Max MP + code:7e17f0/0f+7e17f1/27 + cheat + description:Umaro - No Ailments + code:7e17f5/00 + cheat + description:Umaro - Float always on + code:7e17f6/ff + cheat + description:Umaro - 255 Vigor + code:7e17fb/ff + cheat + description:Umaro - 255 Speed + code:7e17fc/ff + cheat + description:Umaro - 255 Stamina + code:7e17fd/ff + cheat + description:Umaro - 255 Magic Power + code:7e17fe/ff + +cartridge sha256:0f51b4fca41b7fd509e4b8f9d543151f68efa5e97b08493e4b2a0c06f5d8d5e2 + name:Final Fantasy III (USA) + cheat + description:Party has almost max HP and MP + code:c20f93/ff + cheat + description:Activate Terra's Morph command + code:7e1dd1/0c + cheat + description:Infinite Morph time out of battle + code:7e1cf6/ff + cheat + description:Infinite Morph time in battle + code:7e3f31/ff + cheat + description:All items in shops are free (disable to sell items) + code:c3bba5/64+c3bbab/64 + cheat + description:Infinite item use + code:c39db3/ea + cheat + description:Protect from all status ailments + code:d86de8/e7+d86de9/f8 + cheat + description:Learn all spells after one battle + code:c2613b/b0 + cheat + description:Earn 65,000+ exp points after each battle + code:c25de8/43 + cheat + description:Earn tons of EXP after a battle (level 99 takes two battles) + code:c25de8/42 + cheat + description:Auto Cast Float, Regen, Haste, Shell, Safe and Rflect + code:d86dea/eb + cheat + description:Vigor/Speed/Stamina/MagPwr becomes 255 + code:c28fd6/03 + cheat + description:Remove curse from Cursed Shield after only 1 battle + code:c26002/00 + cheat + description:Steal command always gets the more rare item an enemy has + code:c239df/00 + cheat + description:Mog never stumbles when he dances + code:c217a1/00 + cheat + description:Party has Sprint Shoes and Moogle Charm effect + code:7e11df/22 + cheat + description:Party has Offering effect + code:c2293d/1a+c2293e/ea + cheat + description:Party has Merit Award effect + code:c39c5a/00 + cheat + description:Party has Economizer effect + code:c35134/00+c25744/00 + cheat + description:Offering gives character instant kill attacks + code:c21625/3f + cheat + description:Enemy 1 has 0 HP + code:7e3bfc/00+7e3bfd/00 + cheat + description:Enemy 2 has 0 HP + code:7e3bfe/00+7e3bff/00 + cheat + description:Enemy 3 has 0 HP + code:7e3c00/00+7e3c01/00 + cheat + description:Enemy 4 has 0 HP + code:7e3c02/00+7e3c03/00 + cheat + description:Enemy 5 has 0 HP + code:7e3c04/00+7e3c05/00 + cheat + description:Enemy 6 has 0 HP + code:7e3c06/00+7e3c07/00 + cheat + description:Have 94 of all items when arrange is used + code:c326ba/a9+c326bc/8a+c3272f/af+c32732/de + cheat + description:Have all Blitz's + code:7e1d28/ff + cheat + description:Have all Dance's + code:7e1d4c/ff + cheat + description:Have all Lore's + code:7e1d29/ff+7e1d2a/ff+7e1d2b/ff + cheat + description:Have all SwdTech's + code:7e1cf7/ff + cheat + description:Have all Espers + code:7e1a69/ff+7e1a6a/ff+7e1a6b/ff+7e1a6c/ff + cheat + description:Faster up/down movement on world map + code:ee1f96/20+ee1fe3/e0 + cheat + description:Faster left/right movement on world map + code:ee1efa/20+ee1f48/e0 + cheat + description:Enable all characters (once you are able to switch) + code:7e1ede/ff+7e1edf/ff + cheat + description:Save anywhere + code:7e0201/80 + cheat + description:Start Terra with Man-eater equipped + code:ed7caf/06 + cheat + description:Start Terra with Excalibur equipped + code:ed7caf/18 + cheat + description:Start Terra with Illumina equipped + code:ed7caf/1a + cheat + description:Start Terra with Atma equipped + code:ed7caf/1c + cheat + description:Start Terra with Tempest equipped + code:ed7caf/2e + cheat + description:Start Terra with Blizzard equipped + code:ed7caf/0e + cheat + description:Start Terra with Enhancer equipped + code:ed7caf/13 + cheat + description:Start Terra with Mithril shield equipped + code:ed7cb0/5c + cheat + description:Start Terra with Gold shield equipped + code:ed7cb0/5d + cheat + description:Start Terra with Ice shield equipped + code:ed7cb0/61 + cheat + description:Start Terra with Fire shield equipped + code:ed7cb0/60 + cheat + description:Start Terra with Hairband equipped + code:ed7cb1/6a + cheat + description:Start Terra with Leather hat equipped + code:ed7cb1/69 + cheat + description:Start Terra with Circlet equipped + code:ed7cb1/7a + cheat + description:Start Terra with Mystery veil equipped + code:ed7cb1/79 + cheat + description:Start Terra with Red cap equipped + code:ed7cb1/78 + cheat + description:Start Terra with Silk robe equipped + code:ed7cb2/88 + cheat + description:Start Terra with Mithril vest equipped + code:ed7cb2/89 + cheat + description:Start Terra with White dress equipped + code:ed7cb2/8b + cheat + description:Start Terra with Genji armor equipped + code:ed7cb2/9a + cheat + description:Start Terra with Force armor equipped + code:ed7cb2/94 + cheat + description:Party has Sprint Shoes and Moogle Charm effect (alt) + code:7e11df/22 + cheat + description:Have 99 Sprint Shoes in slot 10 + code:7e1872/e6+7e1972/63 + cheat + description:Enemy 1 has 0 HP (alt) + code:7e3bfc/00+7e3bfd/00 + cheat + description:Enemy 2 has 0 HP (alt) + code:7e3bfe/00+7e3bff/00 + cheat + description:Enemy 3 has 0 HP (alt) + code:7e3c00/00+7e3c01/00 + cheat + description:Enemy 4 has 0 HP (alt) + code:7e3c02/00+7e3c03/00 + cheat + description:Enemy 5 has 0 HP (alt) + code:7e3c04/00+7e3c05/00 + cheat + description:Enemy 6 has 0 HP (alt) + code:7e3c06/00+7e3c07/00 + cheat + description:Have all Rage's + code:7e1d35/ff+7e1d36/ff+7e1d37/ff+7e1d3f/ff+7e1d38/ff+7e1d40/ff+7e1d39/ff+7e1d41/ff+7e1d3a/ff+7e1d49/ff+7e1d42/ff+7e1d3b/ff+7e1d4a/ff+7e1d43/ff+7e1d3c/ff+7e1d4b/ff+7e1d44/ff+7e1d3d/ff+7e1d45/ff+7e1d3e/ff+7e1d46/ff+7e1d47/ff+7e1d48/ff+7e1d2c/ff+7e1d2d/ff+7e1d2e/ff+7e1d2f/ff+7e1d30/ff+7e1d31/ff+7e1d32/ff+7e1d33/ff+7e1d34/ff + cheat + description:Celes - Level 99 + code:7e16e6/63 + cheat + description:Celes - 9999 HP + code:7e16e7/0f+7e16e8/27 + cheat + description:Celes - 9999 Max HP + code:7e16e9/0f+7e16ea/27 + cheat + description:Celes - 9999 MP + code:7e16eb/0f+7e16ec/27 + cheat + description:Celes - 9999 Max MP + code:7e16ed/0f+7e16ee/27 + cheat + description:Celes - No Ailments + code:7e16f2/00 + cheat + description:Celes - Float always on + code:7e16f3/ff + cheat + description:Celes - 255 Vigor + code:7e16f8/ff + cheat + description:Celes - 255 Speed + code:7e16f9/ff + cheat + description:Celes - 255 Stamina + code:7e16fa/ff + cheat + description:Celes - 255 Magic Power + code:7e16fb/ff + cheat + description:Cyan - Level 99 + code:7e1652/63 + cheat + description:Cyan - 9999 HP + code:7e1653/0f+7e1654/27 + cheat + description:Cyan - 9999 Max HP + code:7e1655/0f+7e1656/27 + cheat + description:Cyan - 9999 MP + code:7e1657/0f+7e1658/27 + cheat + description:Cyan - 9999 Max MP + code:7e1659/0f+7e165a/27 + cheat + description:Cyan - No Ailments + code:7e165e/00 + cheat + description:Cyan - Float always on + code:7e165f/ff + cheat + description:Cyan - 255 Vigor + code:7e1664/ff + cheat + description:Cyan - 255 Speed + code:7e1665/ff + cheat + description:Cyan - 255 Stamina + code:7e1666/ff + cheat + description:Cyan - 255 Magic Power + code:7e1667/ff + cheat + description:Edgar - Level 99 + code:7e169c/63 + cheat + description:Edgar - 9999 HP + code:7e169d/0f+7e169e/27 + cheat + description:Edgar - 9999 Max HP + code:7e169f/0f+7e16a0/27 + cheat + description:Edgar - 9999 MP + code:7e16a1/0f+7e16a2/27 + cheat + description:Edgar - 9999 Max MP + code:7e16a3/0f+7e16a4/27 + cheat + description:Edgar - No Ailments + code:7e16a8/00 + cheat + description:Edgar - Float always on + code:7e16a9/ff + cheat + description:Edgar - 255 Vigor + code:7e16ae/ff + cheat + description:Edgar - 255 Speed + code:7e16af/ff + cheat + description:Edgar - 255 Stamina + code:7e16b0/ff + cheat + description:Edgar - 255 Magic Power + code:7e16b1/ff + cheat + description:Gau - Level 99 + code:7e179f/63 + cheat + description:Gau - 9999 HP + code:7e17a0/0f+7e17a1/27 + cheat + description:Gau - 9999 Max HP + code:7e17a2/0f+7e17a3/27 + cheat + description:Gau - 9999 MP + code:7e17a4/0f+7e17a5/27 + cheat + description:Gau - 9999 Max MP + code:7e17a6/0f+7e17a7/27 + cheat + description:Gau - No Ailments + code:7e17ab/00 + cheat + description:Gau - Float always on + code:7e17ac/ff + cheat + description:Gau - 255 Vigor + code:7e17b1/ff + cheat + description:Gau - 255 Speed + code:7e17b2/ff + cheat + description:Gau - 255 Stamina + code:7e17b3/ff + cheat + description:Gau - 255 Magic Power + code:7e17b4/ff + cheat + description:Gogo - Level 99 + code:7e17c4/63 + cheat + description:Gogo - 9999 HP + code:7e17c5/0f+7e17c6/27 + cheat + description:Gogo - 9999 Max HP + code:7e17c7/0f+7e17c8/27 + cheat + description:Gogo - 9999 MP + code:7e17c9/0f+7e17ca/27 + cheat + description:Gogo - 9999 Max MP + code:7e17cb/0f+7e17cc/27 + cheat + description:Gogo - No Ailments + code:7e17d0/00 + cheat + description:Gogo - Float always on + code:7e17d1/ff + cheat + description:Gogo - 255 Vigor + code:7e17d6/ff + cheat + description:Gogo - 255 Speed + code:7e17d7/ff + cheat + description:Gogo - 255 Stamina + code:7e17d8/ff + cheat + description:Gogo - 255 Magic Power + code:7e17d9/ff + cheat + description:Locke - Level 99 + code:7e162d/63 + cheat + description:Locke - 9999 HP + code:7e162e/0f+7e162f/27 + cheat + description:Locke - 9999 Max HP + code:7e1630/0f+7e1631/27 + cheat + description:Locke - 9999 MP + code:7e1632/0f+7e1633/27 + cheat + description:Locke - 9999 Max MP + code:7e1634/0f+7e1635/27 + cheat + description:Locke - No Ailments + code:7e1639/00 + cheat + description:Locke - Float always on + code:7e163a/ff + cheat + description:Locke - 255 Vigor + code:7e163f/ff + cheat + description:Locke - 255 Speed + code:7e1640/ff + cheat + description:Locke - 255 Stamina + code:7e1641/ff + cheat + description:Locke - 255 Magic Power + code:7e1642/ff + cheat + description:Mog - Level 99 + code:7e177a/63 + cheat + description:Mog - 9999 HP + code:7e177b/0f+7e177c/27 + cheat + description:Mog - 9999 Max HP + code:7e177d/0f+7e177e/27 + cheat + description:Mog - 9999 MP + code:7e177f/0f+7e1780/27 + cheat + description:Mog - 9999 Max MP + code:7e1781/0f+7e1782/27 + cheat + description:Mog - No Ailments + code:7e1786/00 + cheat + description:Mog - Float always on + code:7e1787/ff + cheat + description:Mog - 255 Vigor + code:7e178c/ff + cheat + description:Mog - 255 Speed + code:7e178d/ff + cheat + description:Mog - 255 Stamina + code:7e178e/ff + cheat + description:Mog - 255 Magic Power + code:7e178f/ff + cheat + description:Relm - Level 99 + code:7e1730/63 + cheat + description:Relm - 9999 HP + code:7e1731/0f+7e1732/27 + cheat + description:Relm - 9999 Max HP + code:7e1733/0f+7e1734/27 + cheat + description:Relm - 9999 MP + code:7e1735/0f+7e1736/27 + cheat + description:Relm - 9999 Max MP + code:7e1737/0f+7e1738/27 + cheat + description:Relm - No Ailments + code:7e173c/00 + cheat + description:Relm - Float always on + code:7e173d/ff + cheat + description:Relm - 255 Vigor + code:7e1742/ff + cheat + description:Relm - 255 Speed + code:7e1743/ff + cheat + description:Relm - 255 Stamina + code:7e1744/ff + cheat + description:Relm - 255 Magic Power + code:7e1745/ff + cheat + description:Sabin - Level 99 + code:7e16c1/63 + cheat + description:Sabin - 9999 HP + code:7e16c2/0f+7e16c3/27 + cheat + description:Sabin - 9999 Max HP + code:7e16c4/0f+7e16c5/27 + cheat + description:Sabin - 9999 MP + code:7e16c6/0f+7e16c7/27 + cheat + description:Sabin - 9999 Max MP + code:7e16c8/0f+7e16c9/27 + cheat + description:Sabin - No Ailments + code:7e16cd/00 + cheat + description:Sabin - Float always on + code:7e16ce/ff + cheat + description:Sabin - 255 Vigor + code:7e16d3/ff + cheat + description:Sabin - 255 Speed + code:7e16d4/ff + cheat + description:Sabin - 255 Stamina + code:7e16d5/ff + cheat + description:Sabin - 255 Magic Power + code:7e16d6/ff + cheat + description:Setzer - Level 99 + code:7e1755/63 + cheat + description:Setzer - 9999 HP + code:7e1756/0f+7e1757/27 + cheat + description:Setzer - 9999 Max HP + code:7e1758/0f+7e1759/27 + cheat + description:Setzer - 9999 MP + code:7e175a/0f+7e175b/27 + cheat + description:Setzer - 9999 Max MP + code:7e175c/0f+7e175d/27 + cheat + description:Setzer - No Ailments + code:7e1761/00 + cheat + description:Setzer - Float always on + code:7e1762/ff + cheat + description:Setzer - 255 Vigor + code:7e1767/ff + cheat + description:Setzer - 255 Speed + code:7e1768/ff + cheat + description:Setzer - 255 Stamina + code:7e1769/ff + cheat + description:Setzer - 255 Magic Power + code:7e176a/ff + cheat + description:Shadow - Level 99 + code:7e1677/63 + cheat + description:Shadow - 9999 HP + code:7e1678/0f+7e1679/27 + cheat + description:Shadow - 9999 Max HP + code:7e167a/0f+7e167b/27 + cheat + description:Shadow - 9999 MP + code:7e167c/0f+7e167d/27 + cheat + description:Shadow - 9999 Max MP + code:7e167e/0f+7e167f/27 + cheat + description:Shadow - No Ailments + code:7e1683/00 + cheat + description:Shadow - Float always on + code:7e1684/ff + cheat + description:Shadow - 255 Vigor + code:7e1689/ff + cheat + description:Shadow - 255 Speed + code:7e168a/ff + cheat + description:Shadow - 255 Stamina + code:7e168b/ff + cheat + description:Shadow - 255 Magic Power + code:7e168c/ff + cheat + description:Strago - Level 99 + code:7e170b/63 + cheat + description:Strago - 9999 HP + code:7e170c/0f+7e170d/27 + cheat + description:Strago - 9999 Max HP + code:7e170e/0f+7e170f/27 + cheat + description:Strago - 9999 MP + code:7e1710/0f+7e1711/27 + cheat + description:Strago - 9999 Max MP + code:7e1712/0f+7e1713/27 + cheat + description:Strago - No Ailments + code:7e1717/00 + cheat + description:Strago - Float always on + code:7e1718/ff + cheat + description:Strago - 255 Vigor + code:7e171d/ff + cheat + description:Strago - 255 Speed + code:7e171e/ff + cheat + description:Strago - 255 Stamina + code:7e171f/ff + cheat + description:Strago - 255 Magic Power + code:7e1720/ff + cheat + description:Terra - Level 99 + code:7e1608/63 + cheat + description:Terra - 9999 HP + code:7e1609/0f+7e160a/27 + cheat + description:Terra - 9999 Max HP + code:7e160b/0f+7e160c/27 + cheat + description:Terra - 9999 MP + code:7e160d/0f+7e160e/27 + cheat + description:Terra - 9999 Max MP + code:7e160f/0f+7e1610/27 + cheat + description:Terra - No ailments + code:7e1614/00 + cheat + description:Terra - Float always on + code:7e1615/ff + cheat + description:Terra - 255 Vigor + code:7e161a/ff + cheat + description:Terra - 255 Speed + code:7e161b/ff + cheat + description:Terra - 255 Stamina + code:7e161c/ff + cheat + description:Terra - 255 Magic Power + code:7e161d/ff + cheat + description:Umaro - Level 99 + code:7e17e9/63 + cheat + description:Umaro - 9999 HP + code:7e17ea/0f+7e17eb/27 + cheat + description:Umaro - 9999 Max HP + code:7e17ec/0f+7e17ed/27 + cheat + description:Umaro - 9999 MP + code:7e17ee/0f+7e17ef/27 + cheat + description:Umaro - 9999 Max MP + code:7e17f0/0f+7e17f1/27 + cheat + description:Umaro - No Ailments + code:7e17f5/00 + cheat + description:Umaro - Float always on + code:7e17f6/ff + cheat + description:Umaro - 255 Vigor + code:7e17fb/ff + cheat + description:Umaro - 255 Speed + code:7e17fc/ff + cheat + description:Umaro - 255 Stamina + code:7e17fd/ff + cheat + description:Umaro - 255 Magic Power + code:7e17fe/ff + +cartridge sha256:c6858d5c02894a6cc71f4dd452c7f288b319d1952ca56fdb185b4bf5e26244a2 + name:Final Fantasy V (Japan) + cheat + description:Max / infinite Gil + code:7e0947/7f+7e0948/96+7e0949/98 + cheat + description:No random battles (overworld) + code:7e16a9/00 + cheat + description:No random battles (dungeons) + code:7e0b4f/00 + cheat + description:Walk faster + code:7e0afa/7f + cheat + description:Walk through walls in overworld + code:c011b0/70 + cheat + description:Save anywhere + code:7e0a53/20 + +cartridge sha256:60cca2592d0756b8c4c7a0a254fafa5ac47aa752521fd1f77dcbf4b6ee1bee90 + name:Final Fight (USA) + cheat + description:Invincibility + code:02a706/d0 + cheat + description:Infinite health + code:01c963/b5+02ab22/a5 + cheat + description:Infinite health (alt) + code:7e0d14/50 + cheat + description:Infinite lives + code:02a2e6/c5+00e5e2/02 + cheat + description:Infinite lives (alt) + code:00e5ee/af + cheat + description:Infinite time + code:01a34c/cd + cheat + description:Hit anywhere + code:01c124/ea+01c10b/24+01c125/30+01c122/b5+01c123/15 + cheat + description:Slower timer + code:01a354/02 + cheat + description:Faster timer + code:01a354/00 + cheat + description:Any food restores all health + code:02b205/00 + cheat + description:Attack speed greatly increased + code:7e0d1e/01 + cheat + description:Start with 2 credits + code:01a8bb/01 + cheat + description:Start with 6 credits + code:01a8bb/05 + cheat + description:Start with 10 credits + code:01a8bb/09 + cheat + description:Start on stage 2 - Subway + code:7efffe/01 + cheat + description:Start on stage 3 - West Side + code:7efffe/02 + cheat + description:Start on stage 4 - Bay Area + code:7efffe/04 + cheat + description:Start on stage 5 - Uptown + code:7efffe/05 + cheat + description:Start on bonus stage - Car + code:7efffe/06 + cheat + description:Start on bonus stage - Glass + code:7efffe/07 + cheat + description:Enemies never get knocked down, attack until they die + code:7e0d70/00 + cheat + description:Enemy 1 has no health + code:7e1014/00 + cheat + description:Enemy 2 has no health + code:7e10b4/00 + cheat + description:Enemy 3 has no health + code:7e1154/00 + cheat + description:Bosses have no health + code:7e11f4/00+7e11f5/00 + cheat + description:Always get Knife + code:7e1c11/00 + cheat + description:Always get Sword + code:7e1c11/02 + cheat + description:Always get Pipe + code:7e1c11/04 + +cartridge sha256:744d1a16c3f99970283597ae8f43b7c3621c5f995c4566ef24b8d70b0692007b + name:Final Fight 2 (USA) + cheat + description:Invincibility + code:82837d/d0 + cheat + description:Infinite health + code:80f46a/a5+82a6b4/a5 + cheat + description:Infinite lives + code:82a5f3/a5 + cheat + description:Infinite lives (alt) + code:82a5f2/00 + cheat + description:Infinite time + code:82c945/ad + cheat + description:Infinite time (alt) + code:82c940/00 + cheat + description:One hit kills + code:80f4bf/a9+80f4c0/ff + cheat + description:Hit anywhere - both players + code:8281d3/24+8281d8/24+8281a3/24 + cheat + description:Faster timer + code:82c940/02 + cheat + description:Barbecue restores vitality 50% instead of 95% + code:82f903/40 + cheat + description:Barbecue worth nothing + code:82f903/00 + cheat + description:Soft drink restores vitality 95% + code:82f8fd/80 + cheat + description:Soft drink worth nothing + code:82f8fd/00 + cheat + description:Both players can select same character + code:80a979/ee + cheat + description:P1 and P2 can't harm each other in a 2P game + code:829c2d/00 + cheat + description:Slow motion (disable until play begins) + code:8085cb/02 + cheat + description:Hitting someone with your super move makes you invincible + code:82a6a8/01 + cheat + description:Hitting someone with your super move uses all your health + code:82a6a8/40 + cheat + description:Start with 1 life + code:82a21c/00 + cheat + description:Start with 3 lives + code:82a21c/02 + cheat + description:Start with 7 lives + code:82a21c/06 + cheat + description:Start with 10 lives + code:82a21c/09 + +cartridge sha256:f9dac709b2c2859f828103a0dd980716817e2bde3b9d7e2fdea36e9bb9bed7f2 + name:Final Fight 3 (USA) + cheat + description:Infinite time + code:c01658/ad + cheat + description:Instant super energy + code:c09d71/a9+c09d72/28+c09d73/00+c09d75/29 + cheat + description:Can always do super special + code:c067da/00+c06844/00 + cheat + description:Infinite lives + code:c086ab/ea + cheat + description:Hit anywhere - both players + code:c0c33e/e0+c0c340/07+c0c33f/00 + cheat + description:Invincibility (blinking) - P1 + code:7e0520/02 + cheat + description:Invincibility (blinking) - P2 + code:7e0620/02 + cheat + description:Infinite health - P1 + code:7e0558/47 + cheat + description:Infinite health - P2 + code:7e0658/47 + cheat + description:Infinite lives - P1 + code:7e0515/05 + cheat + description:Infinite lives - P2 + code:7e0615/05 + cheat + description:Infinite super energy - P1 + code:7e0516/63 + cheat + description:Infinite super energy - P2 + code:7e0616/63 + cheat + description:Infinite throw time - P1 + code:7e0580/10 + cheat + description:Infinite throw time - P2 + code:7e0680/10 + cheat + description:Have the Pipe - P1 + code:7e0514/01 + cheat + description:Have the Pipe - P2 + code:7e0614/01 + cheat + description:Have the Nunchaku - P1 + code:7e0514/02 + cheat + description:Have the Nunchaku - P2 + code:7e0614/02 + cheat + description:Have the Club - P1 + code:7e0514/03 + cheat + description:Have the Club - P2 + code:7e0614/03 + cheat + description:Have the Hammer - P1 + code:7e0514/04 + cheat + description:Have the Hammer - P2 + code:7e0614/04 + +cartridge sha256:8c47f9dc79748c0ae6c648f8480614d22eaefade065612ad1fe749fc3db4d1bc + name:Final Fight Guy (USA) + cheat + description:Infinite health + code:01c919/b5 + cheat + description:Infinite health (alt) + code:7e0d14/50 + cheat + description:Infinite time + code:01a6e9/60 + cheat + description:Infinite time (alt) + code:7e0cbc/09 + cheat + description:Hit anywhere + code:01c0e1/24+01c0c7/24 + cheat + description:Gain 9 lives every time you die + code:02a343/00 + cheat + description:No energy lost from spin kick + code:02ab91/b5 + cheat + description:Attack speed greatly increased + code:7e0d1e/01 + cheat + description:Any food restores all health + code:029205/00 + cheat + description:Enemies never get knocked down, hit them until they die + code:7e0d70/00 + cheat + description:Enemy 1 has no health + code:7e1014/00 + cheat + description:Enemy 2 has no health + code:7e10b4/00 + cheat + description:Enemy 3 has no health + code:7e1154/00 + cheat + description:Bosses have no health + code:7e11f4/00+7e11f5/00 + cheat + description:Always get Knife + code:7e1c11/00 + cheat + description:Always get Sword + code:7e1c11/02 + cheat + description:Always get Pipe + code:7e1c11/04 + cheat + description:Start on stage 2 - Subway + code:7efffe/01 + cheat + description:Start on stage 3 - West Side + code:7efffe/02 + cheat + description:Start on stage 4 - Bay Area + code:7efffe/04 + cheat + description:Start on stage 5 - Uptown + code:7efffe/05 + cheat + description:Start on bonus stage - Car + code:7efffe/06 + cheat + description:Start on bonus stage - Glass + code:7efffe/07 + +cartridge sha256:6f32355bef68d4ad58822f50074b46bcc9a68357cd2c6a5470c96bf5344f84d8 + name:FireStriker (USA) + cheat + description:Infinite health + code:7e1333/07 + cheat + description:Infinite Power + code:7e1335/03 + cheat + description:Infinite Rest + code:7e152d/03 + +cartridge sha256:a0106f9cff7abbf25e081e2531f6d4b4aedf6f0dc8d155a66506817bff267d12 + name:Firemen, The (Europe) (En,Fr,De) + cheat + description:Invincibility + code:7e08c9/01 + cheat + description:Infinite life + code:7e15c7/31 + cheat + description:Infinite time + code:7e1980/09 + cheat + description:Infinite Water Bombs + code:7e091a/03 + +cartridge sha256:003dba0193acc5336840307194643ca3b1f848dcfc77580b4e17c605105b27f5 + name:Firepower 2000 (USA) + cheat + description:Invincibility - Jeep + code:7e612a/c7 + cheat + description:Invincibility - Heli + code:7e612c/c7 + cheat + description:Infinite lives + code:8084e0/bd + cheat + description:Loss of vehicle does not reduce bullet strength + code:80853d/bd + cheat + description:Loss of vehicle does not reduce flame strength + code:8084fd/bd + cheat + description:Loss of vehicle does not reduce plasma strength + code:80850d/bd + cheat + description:Loss of vehicle does not reduce laser strength + code:80851d/bd + cheat + description:Loss of vehicle does not reduce ionic strength + code:80852d/bd + cheat + description:Bubble shield lasts for 4 seconds instead of 12 + code:80be91/01 + cheat + description:Bubble shield lasts for 8 seconds + code:80be91/02 + cheat + description:Bubble shield lasts for 16 seconds + code:80be91/04 + cheat + description:Bubble shield lasts for 32 seconds + code:80be91/08 + cheat + description:Bubble shield lasts for 64 seconds + code:80be91/10 + cheat + description:Bubble shield on jeep lasts until end of level + code:80ab94/ad + cheat + description:Bubble shield on helicopter lasts until end of level + code:80a91a/ad + cheat + description:Start with bullet strength at 3 instead of 1 + code:80857a/03 + cheat + description:Start with bullet strength at 6 + code:80857a/06 + cheat + description:Start with flame strength at 3 instead of 1 + code:808568/03 + cheat + description:Start with flame strength at 6 + code:808568/06 + cheat + description:Start with flame strength at 0 + code:808568/00 + cheat + description:Start with plasma strength at 3 instead of 1 + code:80856e/03 + cheat + description:Start with plasma strength at 6 + code:80856e/06 + cheat + description:Start with plasma strength at 0 + code:80856e/00 + cheat + description:Start with laser strength at 1 instead of 0 + code:808574/01 + cheat + description:Start with laser strength at 3 + code:808574/03 + cheat + description:Start with laser strength at 6 + code:808574/06 + cheat + description:Start with ionic strength at 1 instead of 0 + code:808580/01 + cheat + description:Start with ionic strength at 3 + code:808580/03 + cheat + description:Start with ionic strength at 6 + code:808580/06 + cheat + description:Start with 1 life instead of 4 + code:808553/01 + cheat + description:Start with 2 lives + code:808553/02 + cheat + description:Start with 3 lives + code:808553/03 + cheat + description:Start with 5 lives + code:808553/05 + cheat + description:Start with 7 lives + code:808553/07 + cheat + description:Start with 10 lives + code:808553/0a + cheat + description:Start with 15 lives + code:808553/0f + cheat + description:Start with 25 lives + code:808553/19 + cheat + description:Start with 50 lives + code:808553/32 + cheat + description:Start with 75 lives + code:808553/4b + cheat + description:Start with 100 lives + code:808553/64 + cheat + description:Start at level 2 + code:8099ee/02 + cheat + description:Start at level 3 + code:8099ee/03 + cheat + description:Start at level 4 + code:8099ee/04 + cheat + description:Start at level 5 + code:8099ee/05 + cheat + description:Start at level 6 + code:8099ee/06 + +cartridge sha256:4c1354337efa788169387458fa6bdbcf4be0c98369920af2bd876ad98d29070f + name:First Samurai (USA) + cheat + description:Infinite life and force + code:019818/a5 + cheat + description:Infinite lives + code:0188fa/24 + cheat + description:Infinite Axe, Dagger, Grendade (slot 2 item) + code:01928d/a5+0192f1/a5 + cheat + description:Infinite Warp Lanterns + code:018d0b/a5 + cheat + description:Collect items from anywhere + code:01b585/24 + cheat + description:Hit anywhere Sword/Punch/Kick + code:019351/24 + cheat + description:Hit anywhere Axe/Tri-blades + code:01b0be/24 + cheat + description:Hit anywhere Knife/Dual Knives + code:01b012/24 + cheat + description:Full weapon power for Dagger on pick-up + code:01b5e5/03 + cheat + description:Less force picked up from enemies + code:01af77/02 + cheat + description:More force picked up from enemies + code:01af77/08 + cheat + description:Lots more power picked up from enemies + code:01af77/15 + cheat + description:Less life force from food + code:01b757/03 + cheat + description:More life force from food + code:01b757/10 + cheat + description:Start with 9 lives + code:0086ce/09 + cheat + description:Start with 2 lives + code:0086ce/02 + cheat + description:Infinite life and force (alt) + code:7e006e/3f+7e006f/3f + cheat + description:Infinite lives (alt) + code:7e0072/09 + cheat + description:Infinite Axe, Dagger, Grendade (slot 2 item) (alt) + code:7e0073/99 + cheat + description:Infinite Warp Lanterns (alt) + code:7e0078/05 + cheat + description:Infinite Bells (slot 1 item) + code:7e0074/09 + cheat + description:Have all Rune Stones + code:7e0075/05 + +cartridge sha256:064a880a8dfcf576f74ae8a17c3ec7b0a27e8cb0300a5e5959452fcc30422f14 + name:Flashback - The Quest for Identity (USA) (En,Fr,De) + cheat + description:Invincibility against enemies + code:c20a33/ad + cheat + description:Infinite shield + code:7ec746/05 + cheat + description:Never lose a shield when shot (disable to kill enemies) + code:c26b13/ea + cheat + description:Don't die from most falls + code:c26b62/b7 + cheat + description:Start with 1 shield + code:ce0d24/02 + cheat + description:Start with 2 shields + code:ce0d24/03 + cheat + description:Start with 3 shields + code:ce0d24/04 + cheat + description:Start with 5 shields + code:ce0d24/06 + cheat + description:Start with 10 shields + code:ce0d24/0b + cheat + description:Start with 20 shields + code:ce0d24/15 + cheat + description:Start with 50 shields + code:ce0d24/33 + cheat + description:Start with 100 shields + code:ce0d24/65 + cheat + description:Start with 50 credits + code:ce1544/32 + cheat + description:Start with 100 credits + code:ce1544/64 + cheat + description:Start with 250 credits + code:ce1544/fa + cheat + description:Start with 512 credits + code:ce1543/02 + cheat + description:Start with 1024 credits + code:ce1543/04 + +cartridge sha256:ff09d72d6241b331dc429d1cf27c04c26546f23312a22c7a14e6a4bf41ed1069 + name:Flintstones, The (USA) (En,Fr,De,Es,It) + cheat + description:Invincibility + code:839752/d0+8396e1/d0 + cheat + description:Infinite health + code:839699/bd+83975c/a5 + cheat + description:Infinite lives + code:0083c0/dd + cheat + description:Infinite time + code:82f2f4/cd + cheat + description:Hit anywhere + code:83b7f0/26+83b7ef/80 + cheat + description:Get items from anywhere + code:8192e8/00+81912e/00+81a624/00 + cheat + description:Multi-jump + code:839d25/00 + cheat + description:Level skip enabled (Pause + X) + code:7e0622/01 + +cartridge sha256:3d5bbc06e7e9797d937c803610c40b262c14c3f0a39e8048dd6b0b052a040fc1 + name:Flintstones, The - The Treasure of Sierra Madrock (USA) + cheat + description:Invincibility + code:84ad12/00 + cheat + description:Infinite stamina + code:84b008/ad + cheat + description:Infinite time - 1P game + code:80cb52/ad + cheat + description:Infinite lives - 1P game + code:80a91f/ad + cheat + description:Hit anywhere + code:809e07/e0+809e0b/32+809e08/38+809e09/00+809e0a/f0 + cheat + description:Get items from anywhere + code:84f5ed/80+84f23e/80 + cheat + description:Multi-jump + code:84c65f/ad + +cartridge sha256:204ecb9b809408c23d5f5772026fc248c70612d9bf6952e6b952ed7a85640867 + name:Flying Hero - Bugyuru no Daibouken (Japan) + cheat + description:Invincibility + code:01a028/1a+01a029/8d+01a02a/3f+01a02b/10 + cheat + description:Hit anywhere + code:01862f/24+018628/24+018636/24+01863d/24+018668/80 + cheat + description:Hit anywhere continually + code:018628/24+018636/24+018668/80+018618/80 + cheat + description:One hit kills + code:018668/80+02f9e7/00 + +cartridge sha256:bc6b0344a434644c391ac69a53c7720c51e2d3c5c082b8d78598ae4df100c464 + name:Foreman for Real (USA) + cheat + description:Infinite stamina - P1 + code:7e11ae/64+7e1072/27+7e043a/78+7e045a/64 + +cartridge sha256:25b380f529f5a9295df7c0adcc5213d67f131f552d078a3d8f545f988047c90a + name:Frantic Flea (USA) + cheat + description:Invincibility + code:7e1e92/1e + +cartridge sha256:1ce72767795f41049a1f4d2829e837a8885eb91e1c14faf1ca62d05839ebe3c9 + name:Frogger (USA) + cheat + description:Invincibility + code:7e17f4/00 + cheat + description:Infinite lives + code:7e183d/04 + cheat + description:Infinite time + code:7e078c/95 + cheat + description:Cars don't move + code:7e1886/00+7e1887/00+7e1888/00+7e1889/00+7e188a/00 + cheat + description:River objects don't move + code:7e1880/04+7e1881/04+7e1882/04+7e1883/04+7e1884/04 + +cartridge sha256:dcceb5be536c9b91bf34f65e7fcec4b55a78af0192323cf86f3b9555072037ee + name:Fun 'n Games (USA) + cheat + description:Style mode - nude legs + code:7e0f80/fe + cheat + description:Style mode - nude top + code:7e0fa3/ff + cheat + description:Style mode - nude feet + code:7e0fc6/63 + cheat + description:Style mode - nude head + code:7e0f5d/05 + +cartridge sha256:37fe99a0da8c2ca2296c35e6a08e48b9195074b2aa1955c1eed715d12196001b + name:Fushigi no Dungeon 2 - Fuurai no Shiren (Japan) + cheat + description:Gain any EXP for maximum + code:c23555/00 + cheat + description:Enemies start with 1 HP (If enabled when starting a new game, die, you'll restart with 1 HP, when you gain a level it should correct itself) + code:c2380d/00+c2380e/af+c2380f/11 + cheat + description:Collect any Gitan for maximum + code:c25c17/00 + cheat + description:Never lose Satiation + code:c233d2/00 + cheat + description:One Arrow gains 99 + code:c33b74/00 + cheat + description:Smith a weapon to make it +99 + code:c30664/a9+c30665/62 + cheat + description:Items from bartender get +99 Refinement + code:c302b9/a9+c302ba/63 + +cartridge sha256:bf16c3c867c58e2ab061c70de9295b6930d63f29f81cc986f5ecae03e0ad18d2 + name:F-Zero (USA) + cheat + description:Always rank 1st + code:00e9a7/a9+00e9a8/01 + cheat + description:Infinite turbos + code:00b829/02 + cheat + description:Infinite spare machines + code:008bfb/c5 + cheat + description:Start with 1 spare machine + code:0381a5/01 + cheat + description:Start with 5 spare machines + code:0381a5/05 + cheat + description:Start with 9 spare machines + code:0381a5/09 + cheat + description:Infinite power + code:7e00c9/00+7e00ca/08 + cheat + description:Infinite turbos (alt) + code:7e0cf3/03 + cheat + description:Always rank 1st (alt) + code:7e1150/00 + cheat + description:Always boosted + code:7e0d51/08 + cheat + description:Low timer + code:7e00c1/00 + +cartridge sha256:17b24fbda9103cd8cb6f31bd6beccb4a7dfff87c8aef5e79bcc9c7d3a27623fc + name:Galaxy Wars (Japan) + cheat + description:Infinite lives + code:7e0630/05 + +cartridge sha256:ca3dd4620c692b2b8d3dd49b7dbdb1daa251ee0f7943050cc8a036e209cd7a07 + name:Ganpuru - Gunman's Proof (Japan) + cheat + description:Infinite health vs enemies/bullets + code:878386/ad + cheat + description:Infinite ammo for picked up guns + code:82b863/ad + cheat + description:Infinite ammo for picked up hand weapons + code:82b887/ad + cheat + description:Always have stronger attacks + code:87858a/00 + cheat + description:Always have super strong attacks + code:878586/a9+878588/3f+87858b/85 + cheat + description:Easily get max money + code:8784bb/00 + cheat + description:Easily get max score + code:878506/00 + cheat + description:Always have Starmine Bombs (if you have none, fire 3 off) + code:849374/00+88dd14/02 + cheat + description:Always get Rank S for dungeons, regardless of time taken + code:88db96/9c + +cartridge sha256:1735f790ebcfa1bed2430aecde3abaf24c88ff99aa0186736f8f36b674bc9350 + name:Garry Kitchen's Super Battletank - War in the Gulf (USA) (Rev 1) + cheat + description:Infinite health against most enemies and mines + code:00cda2/a5 + cheat + description:Infinite weapon ammo (except Smoke Screens and Machine Gun) + code:009803/2c + cheat + description:More Machine Gun ammo on stages 1-4 + code:00d8f8/ff + cheat + description:Less Machine Gun ammo on stages 1-4 + code:00d8f8/2b + cheat + description:More Cannon ammo on each mission + code:00d8dc/64 + cheat + description:Less Cannon ammo on each mission + code:00d8dc/19 + cheat + description:More Laser Shells on each mission + code:00d8e5/05 + cheat + description:No Laser Shells on each mission + code:00d8e5/00 + cheat + description:More Smoke Screens on each mission + code:00d8ef/05 + cheat + description:No Smoke Screens on each mission + code:00d8ef/00 + cheat + description:Infinite health against most enemies and mines (alt) + code:00cda2/a5 + cheat + description:Infinite Fuel + code:7e05c4/ff + cheat + description:Infinite 120mm Cannon + code:7e049e/42 + cheat + description:Infinite Laser Missiles + code:7e04a0/01 + cheat + description:Infinite Smoke Screens + code:7e04a1/01 + cheat + description:Infinite 7.62mm Machine Gun + code:7e04a2/96 + +cartridge sha256:94496e73fc7fdf2f72f16bf2becb0c3935db2ebd97555eac73b63400acbceec6 + name:Garry Kitchen's Super Battletank - War in the Gulf (USA) + cheat + description:Infinite health against most enemies and mines + code:00cda2/a5 + cheat + description:Infinite weapon ammo (except Smoke Screens and Machine Gun) + code:009803/2c + cheat + description:More Machine Gun ammo on stages 1-4 + code:00d8f8/ff + cheat + description:Less Machine Gun ammo on stages 1-4 + code:00d8f8/2b + cheat + description:More Cannon ammo on each mission + code:00d8dc/64 + cheat + description:Less Cannon ammo on each mission + code:00d8dc/19 + cheat + description:More Laser Shells on each mission + code:00d8e5/05 + cheat + description:No Laser Shells on each mission + code:00d8e5/00 + cheat + description:More Smoke Screens on each mission + code:00d8ef/05 + cheat + description:No Smoke Screens on each mission + code:00d8ef/00 + cheat + description:Infinite health against most enemies and mines (alt) + code:00cda2/a5 + cheat + description:Infinite Fuel + code:7e05c4/ff + cheat + description:Infinite 120mm Cannon + code:7e049e/42 + cheat + description:Infinite Laser Missiles + code:7e04a0/01 + cheat + description:Infinite Smoke Screens + code:7e04a1/01 + cheat + description:Infinite 7.62mm Machine Gun + code:7e04a2/96 + +cartridge sha256:b87874a2292fe045385a2888e33009d5d2eabf55e379059aa5ef6c73b0475ff2 + name:Gekitotsu Dangan Jidousha Kessen - Battle Mobile (Japan) + cheat + description:Invincibility + code:01b55b/95+01bf94/b5+01bfb7/b5 + cheat + description:Infinite health + code:01bf94/b5+01bfb7/b5 + cheat + description:Infinite lives + code:01bfd6/ad + cheat + description:Infinite Shields + code:019f1f/b9 + +cartridge sha256:fdafaa77f01a9a692411e27b3fb6045b247e5d625679b941d317a7b105f437d2 + name:George Foreman's KO Boxing (USA) (Rev 1) + cheat + description:Infinite time + code:0085d9/a9+0085da/78 + cheat + description:Infinite super punch after obtaining it + code:00db7a/80 + cheat + description:Time goes slower + code:00810c/78 + cheat + description:Time speeds up + code:00810c/0a + cheat + description:Damage inflicted by your opponent affects him (your health may slightly decrease) + code:00dbbe/ad+00dbbf/73+00dbc7/8d+00dbc8/73 + cheat + description:Start with 1/2x health - both players + code:0080ad/20 + +cartridge sha256:b248b2122a0caf99298ebd9a4f66ad8047dbfce1e4bbac8219ba3ea9fb7488b5 + name:Ghost Chaser Densei (Japan) + cheat + description:Invincibility + code:80b1eb/d0 + cheat + description:Infinite health + code:80c752/bd + cheat + description:Infinite time + code:81c82c/ad + cheat + description:Hit anywhere + code:80ba37/e0+80ba3a/30+80ba3b/30+80ba39/02 + cheat + description:99 hits in bonus round + code:7e0516/63 + +cartridge sha256:a4ceb31b82ea532e6eb640fa2eda61625758e72251efa5f0ae9a984f4a98a8a0 + name:Ghoul Patrol (USA) + cheat + description:Invincibility + code:81a94a/60+81a9a9/60 + cheat + description:Infinite lives + code:819700/ad + cheat + description:Super powered normal arrows + code:838a6b/ff + cheat + description:Infinite health + code:7e1d09/0a + cheat + description:Infinite lives (alt) + code:7e1da1/63 + cheat + description:Always have weapon + code:7e1cfe/01 + cheat + description:Infinite Keys + code:7e1d5d/63 + cheat + description:Infinite Shot 1 + code:7e1d21/63 + cheat + description:Infinite Shot 2 + code:7e1d29/63 + cheat + description:Infinite Shot 3 + code:7e1d23/63 + cheat + description:Infinite Shot 4 + code:7e1d1f/63 + cheat + description:Infinite Blue Potions + code:7e1d63/63 + cheat + description:Infinite Red Potions + code:7e1d61/63 + cheat + description:Infinite Green Potions + code:7e1d65/63 + cheat + description:Infinite Medipaks + code:7e1d71/63 + cheat + description:Infinite ? Potions + code:7e1d69/63 + cheat + description:Infinite Vials + code:7e1d67/63 + cheat + description:All victims already rescued + code:7e1e05/00 + +cartridge sha256:8796ca4de3aeffd3a494fe28e7d7e2aeb220ca652b43684f29e2cc94f02c20c4 + name:Gods (USA) + cheat + description:Invincibility + code:9e83bc/ad + cheat + description:Continually hit anywhere + code:9eccd7/24+9ecce6/24+9ecd1a/24+9ecd06/80 + cheat + description:Shields last until at least end of the world (disable if you get stuck) + code:9eff3b/60 + cheat + description:Infinite lives + code:9e865b/ad + cheat + description:Items you can afford in the shops are free + code:9ebb2f/cd + cheat + description:Start with 2 lives + code:9fe8a0/01 + cheat + description:Start with 6 lives + code:9fe8a0/05 + cheat + description:Start with 10 lives + code:9fe8a0/09 + +cartridge sha256:2bb368c47189ce813ad716eef16c01cd47685cb98e2c1cb35fa6f0173c97dd7c + name:Goof Troop (USA) + cheat + description:Infinite health + code:80dd17/85 + cheat + description:Infinite lives + code:828b16/a5 + cheat + description:Hit anywhere + code:80d7e4/00+80d51e/00 + cheat + description:Get fruits and gems from anywhere + code:82a205/00+82a211/00 + cheat + description:Walk through walls + code:82856a/80+828285/80 + cheat + description:4 hearts give you a life + code:82af47/04+82af50/9e + cheat + description:2 hearts give you a life + code:82af47/02+82af50/9e + cheat + description:2 hearts from cherries + code:83c4be/02 + cheat + description:4 hearts from bananas + code:83c4bf/04 + cheat + description:1 heart from bananas + code:83c4bf/01 + cheat + description:Goofy has quicker left-right movement + code:838e1d/02+838e2d/fd + cheat + description:Max has quicker left-right movement + code:838dfd/02+838e0d/fd + cheat + description:Start with 9 lives + code:80a10a/09 + cheat + description:Start with 6 lives + code:80a10a/06 + cheat + description:Start with 1 life + code:80a10a/01 + +cartridge sha256:93da752a0c76167d0907efa832367e5d14aab8e835b864f345c386071a9af718 + name:Gradius III (USA) + cheat + description:Invincibility + code:00d80a/80 + cheat + description:Infinite Konami code use (up, up, down, down, left, right, left, right, B, A) + code:00c150/ad + cheat + description:Infinite lives + code:00bcf0/ea+00bcf1/ea + cheat + description:Infinite credits + code:00d230/ad + cheat + description:Hit anywhere + code:00eb2d/24 + cheat + description:Makes Earwig Scorpion (Stage 1 mayor) much easier to defeat + code:02939e/01 + cheat + description:Makes Bubble Brain (Stage 2 mayor) easier to defeat + code:029a66/01 + cheat + description:Weapons status gauge remains at current level after a weapon is selected + code:00d95d/ea+00d95e/ea + cheat + description:Enemies shoot at you more + code:00c01f/a9+00c020/01 + cheat + description:Enables Arcade option in options menu + code:00b41b/03 + cheat + description:Start with 1 life + code:00ba93/00 + cheat + description:Start with 2 lives + code:00ba93/01 + cheat + description:Start with 4 lives + code:00ba93/03 + cheat + description:Start with 5 lives + code:00ba93/04 + cheat + description:Start with 9 lives + code:00ba93/08 + cheat + description:Start with 16 lives + code:00ba93/0f + cheat + description:Start with 31 lives + code:00ba93/1e + cheat + description:Start with 1 credit (1P game) + code:00a0e5/01 + cheat + description:Start with 2 credits + code:00a0e5/02 + cheat + description:Start with 6 credits + code:00a0e5/06 + cheat + description:Start with 7 credits + code:00a0e5/07 + cheat + description:Start with 8 credits + code:00a0e5/08 + cheat + description:Start with 9 credits + code:00a0e5/09 + cheat + description:Infinite credits (alt) + code:00d230/ad + cheat + description:Infinite continues + code:7e1e06/03 + cheat + description:Infinite Forcefield + code:7e0346/02+7e0350/02 + cheat + description:Weapons status gauge remains at current level after a weapon is selected (alt) + code:00d95d/ea+00d95e/ea + cheat + description:Enemies die automatically + code:7e00dc/0b + cheat + description:Have Mega Crush + code:7e00b0/07 + cheat + description:Have Max Speed + code:7e00b2/05 + cheat + description:Have support upgrade - Missile + code:7e00b4/0b + cheat + description:Have support upgrade - Spread Bomb + code:7e00b4/0c + cheat + description:Have support upgrade - 2-Way Missile + code:7e00b4/0d + cheat + description:Have gun - Double + code:7e00b6/02 + cheat + description:Have gun - Tailgun + code:7e00b6/03 + cheat + description:Have gun - Back Double + code:7e00b6/04 + cheat + description:Have gun - Verticle + code:7e00b6/05 + cheat + description:Have gun - Twin Laser + code:7e00b6/06 + cheat + description:Have gun - Laser + code:7e00b6/07 + cheat + description:Have gun - Charged Laser + code:7e00b6/09 + cheat + description:Have gun - Laser (2nd) + code:7e00b6/0a + cheat + description:Have 99 million points - P1 + code:7e1f47/99 + cheat + description:Have 99 million points - P2 + code:7e1f4b/99 + +cartridge sha256:f8c02a0b996d33c0a64c30fb76b80f8e441d67b8ecebb6940bb1171760aa444c + name:Great Battle II, The - Last Fighter Twin (Japan) + cheat + description:Invincibility + code:00e14f/a9+00e150/01+00e151/8d+00e152/5b+00e153/04 + cheat + description:Infinite health + code:009797/b5 + cheat + description:Infinite lives + code:00a2bd/d5 + cheat + description:One hit kills + code:00b5b8/80 + cheat + description:Invincibility (alt) + code:7e045b/01 + cheat + description:Infinite health (alt) + code:7e0454/60 + cheat + description:Infinite lives (alt) + code:7e00d4/03 + +cartridge sha256:10a8d4a4eeefb124693ea72d4613cfd210a332d8ec2fdfcd64695427bf2f65d0 + name:Great Battle III, The (Japan) + cheat + description:Invincibility + code:00b540/d0+00b545/d0 + cheat + description:Infinite health + code:00b07e/b5 + cheat + description:Infinite lives + code:00bd6b/d5 + cheat + description:One hit kills + code:00cca3/80 + cheat + description:Invincibility (alt) + code:7e00d4/03 + cheat + description:Infinite health (alt) + code:7e0464/48 + cheat + description:Infinite lives (alt) + code:7e00e4/03 + +cartridge sha256:b5492aea296ee4bfcd2c677fbec5153fd4c4db758c835b372ef750cf2399649b + name:Great Circus Mystery Starring Mickey & Minnie, The (USA) + cheat + description:Invincibility against enemies + code:c05b2e/80 + cheat + description:Invincibility against ground hazards + code:c111e7/80 + cheat + description:Infinite Vacuum + code:c1159e/a5 + cheat + description:Infinite Bullets + code:c11697/a5 + cheat + description:Collect one coin for 999 + code:c05d01/00 + +cartridge sha256:f921297c361f16ad3f1257e91829638fc795f9323172015d7237ed648c8f7515 + name:GunForce (USA) + cheat + description:Invincibility + code:019b0b/85+019b09/a9 + cheat + description:Infinite ammo + code:00f737/ad + cheat + description:Hit anywhere + code:009b34/ad+0095bd/00+0095b6/00+00959b/00+0095a1/00 + cheat + description:Invincibility (alt) + code:7e0055/b1 + cheat + description:Infinite time (enable during gameplay) + code:7e0028/09+7e0029/09 + cheat + description:Infinite lives - P1 + code:7e0051/09 + cheat + description:Infinite lives - P2 + code:7e0052/09 + cheat + description:Infinite continues - P1 + code:7e0053/09 + cheat + description:Infinite continues - P2 + code:7e0054/09 + cheat + description:Have Rapid Fire + code:7e0057/ff + cheat + description:Have regular gun + code:7e9015/01 + cheat + description:Have Laser gun + code:7e9015/04 + cheat + description:Have Bazooka + code:7e9015/07 + cheat + description:Have Flamethrower + code:7e9015/0e + +cartridge sha256:5a6deb5617e86a9f4b981031e939510e30c5c8ad047f5f012e40442113fd28c2 + name:Hagane - The Final Conflict (USA) + cheat + description:Invincibility + code:c0419e/60 + cheat + description:Infinite health + code:7f0000/00 + cheat + description:Infinite time + code:c08611/80 + cheat + description:Infinite Bombs + code:c09214/ea + cheat + description:Infinite Daggers + code:c09156/ea + cheat + description:Infinite special attacks + code:c08bb0/ea + cheat + description:Infinite lives + code:c085d9/ea + cheat + description:Hit anywhere + code:c03f89/00+c03f82/00+c03f90/00+c03f97/00 + cheat + description:One hit kills + code:c0400d/00 + cheat + description:Jump higher + code:c05a00/fd + cheat + description:Start with 9 lives + code:c081ec/09 + cheat + description:Start with 9 special attack points + code:c081f0/09 + cheat + description:Start with maximum health points + code:c081e4/05 + cheat + description:Start on stage 2 - Fortress Of Doom + code:c081c1/a9+c081c2/01 + cheat + description:Start on stage 3 - Violated Heavens + code:c081c1/a9+c081c2/02 + cheat + description:Start on stage 4 - Cry Of The Spirits + code:c081c1/a9+c081c2/03 + cheat + description:Start on stage 5 - Into The Darkness + code:c081c1/a9+c081c2/04 + +cartridge sha256:de1cf1512e48473b03adb87b7504f394e8b330b346bac24044f833d83609799a + name:HAL's Hole in One Golf (USA) + cheat + description:No penalty if you land in water or out of bounds + code:0186a2/2c + cheat + description:Always start hole with 1-shot penalty + code:018111/01 + cheat + description:Max 7 strokes per hole + code:018ba9/07 + cheat + description:Max 5 strokes per hole + code:018ba9/05 + +cartridge sha256:6e2a02a8944c19db3da76d2646f232fbe3ed039bc7d44cc03910814fa77a7acf + name:Harley's Humongous Adventure (USA) + cheat + description:Protection against some hazards + code:05ad42/ad + cheat + description:Infinite ammo + code:05b33a/00 + cheat + description:Infinite lives + code:05adbe/ad + cheat + description:Infinite Jet Fuel on pick-up + code:05ae00/00 + cheat + description:Infinite time on Vent level + code:00bbe3/ea + cheat + description:Any fuel power-up gives maximum amount + code:05ae29/00 + cheat + description:Press X on the title screen with the house to get level select menu + code:00e5fa/02 + cheat + description:Get only 5 ammo from a weapon power-up + code:05b402/05 + cheat + description:Get 20 ammo from a weapon power-up + code:05b402/20 + cheat + description:Get 30 ammo from a weapon power-up + code:05b402/30 + cheat + description:Get 40 ammo from a weapon power-up + code:05b402/40 + cheat + description:Get 50 ammo from a weapon power-up + code:05b402/50 + cheat + description:20 seconds to collect power-ups on level 1 + code:00bbad/14 + cheat + description:60 seconds to collect power-ups on level 1 + code:00bbad/3c + cheat + description:90 seconds to collect power-ups on level 1 + code:00bbad/5a + cheat + description:60 seconds to complete the Vent level + code:00bbbc/3c + cheat + description:Start with maximum fuel on every level + code:05a91a/80 + cheat + description:Start with 4 hearts + code:05ab12/08 + cheat + description:Start with 5 hearts + code:05ab12/0a + cheat + description:Start with 10 of every weapon + code:09ded9/10 + cheat + description:Start with 25 of every weapon + code:09ded9/25 + cheat + description:Start with 50 of every weapon + code:09ded9/50 + cheat + description:Start with 99 of every weapon + code:09ded9/99 + cheat + description:Start with 2 lives + code:05ab1c/01 + cheat + description:Start with 6 lives + code:05ab1c/05 + cheat + description:Start with 11 lives + code:05ab1c/10 + cheat + description:Start with 26 lives + code:05ab1c/25 + cheat + description:Start with 51 lives + code:05ab1c/50 + cheat + description:Start with 100 lives + code:05ab1c/99 + cheat + description:Infinite health against most enemies + code:7eab45/32 + cheat + description:Start with all weapons + code:09ded9/ff + cheat + description:Infinite weapons on pick-up + code:7eab54/9a + cheat + description:Infinite Air + code:7e24b2/ff + cheat + description:Infinite Fuel on pick-up (disable to complete level) + code:7e24bc/ff + cheat + description:Infinte Nuts + code:7e24ac/99 + cheat + description:Infinite Invincibility Spray + code:7eab44/84 + cheat + description:Infinite time + code:7e1c3b/64 + cheat + description:Moon-jump + code:7e0283/02 + +cartridge sha256:73a3aa87ddd5ce5df5ba51292316f42b6e128280179b0a1b11b4dcddc17d4163 + name:Harvest Moon (USA) + cheat + description:Can access all items temporarily + code:81b34a/a5 + cheat + description:Don't lose stamina + code:81d0f0/ad + cheat + description:Go to bed to get 200 stamina + code:8283bb/a9+8283bc/c8+8283bd/ea + cheat + description:With 1 or more wood, take some to get 999 + code:83b234/80 + cheat + description:With 0 wood, take some to get 999 + code:83b230/15 + cheat + description:Fencing doesn't break when it storms + code:82a773/80 + cheat + description:Go to sleep to put a bell plant next to the stable + code:82845c/10 + cheat + description:Go to sleep to enable the egg festival prize + code:828796/09+828797/00+828798/10 + cheat + description:Town always performs Flower Festival + code:83d30f/00+83d311/d2 + +cartridge sha256:7c34908526db2a634216fab0276c42a8e4e22d59c728cd586200142a12dd2c2c + name:Home Alone (USA) + cheat + description:Infinite power + code:00d84a/ad + cheat + description:Infinite lives + code:00d864/00 + cheat + description:Infinite Baseballs, Slingshot and Rifle ammo + code:00d7ce/00 + cheat + description:Power boost on jumps + code:019d6c/e0 + cheat + description:Super power boost on jumps + code:019d6c/c0 + cheat + description:Need 1 item (instead of 24) to complete level 1 + code:00dbee/01 + cheat + description:Need 5 items to complete level 1 + code:00dbee/05 + cheat + description:Need 10 items to complete level 1 + code:00dbee/10 + cheat + description:Need 15 items to complete level 1 + code:00dbee/15 + cheat + description:Need 20 items to complete level 1 + code:00dbee/20 + cheat + description:Need 1 item (instead of 30) to complete level 2 + code:00dbef/01 + cheat + description:Need 5 items to complete level 2 + code:00dbef/05 + cheat + description:Need 10 items to complete level 2 + code:00dbef/10 + cheat + description:Need 15 items to complete level 2 + code:00dbef/15 + cheat + description:Need 20 items to complete level 2 + code:00dbef/20 + cheat + description:Need 25 items to complete level 2 + code:00dbef/25 + cheat + description:Need 1 item (instead of 35) to complete level 3 + code:00dbf0/01 + cheat + description:Need 5 items to complete level 3 + code:00dbf0/05 + cheat + description:Need 10 items to complete level 3 + code:00dbf0/10 + cheat + description:Need 15 items to complete level 3 + code:00dbf0/15 + cheat + description:Need 20 items to complete level 3 + code:00dbf0/20 + cheat + description:Need 25 items to complete level 3 + code:00dbf0/25 + cheat + description:Need 1 item (instead of 35) to complete level 4 + code:00dbf1/01 + cheat + description:Need 5 items to complete level 4 + code:00dbf1/05 + cheat + description:Need 10 items to complete level 4 + code:00dbf1/10 + cheat + description:Need 15 items to complete level 4 + code:00dbf1/15 + cheat + description:Need 20 items to complete level 4 + code:00dbf1/20 + cheat + description:Need 25 items to complete level 4 + code:00dbf1/25 + cheat + description:Extra life with 1 pizza slice instead of 8 + code:008d8b/01 + cheat + description:Extra life with 2 pizza slices + code:008d8b/02 + cheat + description:Extra life with 3 pizza slices + code:008d8b/03 + cheat + description:Extra life with 4 pizza slices + code:008d8b/04 + cheat + description:Extra life with 5 pizza slices + code:008d8b/05 + cheat + description:Extra life with 6 pizza slices + code:008d8b/06 + cheat + description:Extra life with 7 pizza slices + code:008d8b/07 + cheat + description:Start with 1 life instead of 3 + code:00db94/01 + cheat + description:Start with 2 lives + code:00db94/02 + cheat + description:Start with 5 lives + code:00db94/05 + cheat + description:Start with 9 lives + code:00db94/09 + cheat + description:Start with 25 lives + code:00db94/25 + cheat + description:Start with 50 lives + code:00db94/50 + cheat + description:Start with 99 lives + code:00db94/99 + cheat + description:Start on level 2 + code:008057/01+008059/c9+00805a/03 + cheat + description:Start on level 3 + code:008057/02+008059/c9+00805a/03 + cheat + description:Start on level 4 + code:008057/03+008059/c9+00805a/03 + +cartridge sha256:27eaccb4eea93832639565a664bf3561ed5a11ac025d377a3f33262d851c1b2b + name:Home Alone 2 - Lost in New York (USA) + cheat + description:Infinite power (some things can still kill you) + code:04d3f5/ad + cheat + description:Infinite ammo + code:009a33/ea + cheat + description:Infinite lives + code:00882a/ad + cheat + description:Dart guns have 50 shots + code:04d737/32+04d751/32 + cheat + description:Extra life from 1 pizza slice instead of 6 + code:04d796/01 + cheat + description:Extra life from 2 pizza slices + code:04d796/02 + cheat + description:Extra life from 3 pizza slices + code:04d796/03 + cheat + description:Extra life from 4 pizza slices + code:04d796/04 + cheat + description:Extra life from 5 pizza slices + code:04d796/05 + cheat + description:Start with 1 life instead of 3 + code:009e77/01 + cheat + description:Start with 5 lives + code:009e77/05 + cheat + description:Start with 9 lives + code:009e77/09 + cheat + description:Start with 25 lives + code:009e77/19 + cheat + description:Start with 50 lives + code:009e77/32 + cheat + description:Start with 99 lives + code:009e77/63 + +cartridge sha256:48a3ac52e2c9128abc2dc60e07817a51898e8a93be0d51d6f541a8635263a089 + name:Home Improvement - Power Tool Pursuit! (USA) + cheat + description:Invincibility + code:af84d6/80+af815b/80 + cheat + description:Infinite lives + code:838d54/a9 + cheat + description:Infinite Nut Bolts + code:af9ba0/a5+afa822/a5+af8012/ad + +cartridge sha256:acad4c594f156e0f30dec2532b35fcb3bab800e08263377634e2d96dfd055f3e + name:Hook (USA) + cheat + description:Infinite power (disable if you get stuck) + code:00c47d/ea + cheat + description:Infinite time + code:038ab5/cd + cheat + description:Time starts at 7 min - stage 1 + code:038793/07 + cheat + description:Time starts at 3 min - stage 1 + code:038793/03 + cheat + description:Start with 3 power leaves + code:008184/04 + cheat + description:Start with 1 leaf (shows 2, but you can only fill 1) + code:008184/02 + cheat + description:Infinite power (alt) + code:7ef7c1/03 + cheat + description:Infinite lives + code:7e1f00/03 + cheat + description:Infinite flying + code:7e1f07/80+7e1f08/01 + cheat + description:Infinite time (alt) + code:7e1f14/59 + +cartridge sha256:ba6cb0d64cef410c5dd517ce0424fc0942a15b0df0274903939c043f3ac79d39 + name:Humans, The (Europe) + cheat + description:Infinite lives + code:7e010b/0c + cheat + description:Infinite time (disable at end of level) + code:7e0122/78+7e0123/00 + +cartridge sha256:0f6fc06bab813b9654de97fafd4f140368714c58e79130d15046a5a955fc3083 + name:Hungry Dinosaurs (Europe) + cheat + description:Walk anywhere on the grid + code:c06489/80 + cheat + description:Move faster + code:c00a45/00+c00a4d/00 + cheat + description:Change CPU's eggs to your own by walking over them + code:c00d13/00+c00d14/d0 + +cartridge sha256:a03528344d40bf800cdbde2dd240b30442cec7aea6026fbbe312a7c36bf0f74a + name:Hunt for Red October, The (USA) + cheat + description:Infinite Bombs + code:80c9f9/ad + cheat + description:Infinite ECMs + code:80cba8/ad + cheat + description:Infinite SAMs + code:80ca94/ad + cheat + description:Infinite SSMs + code:80cb32/ad + cheat + description:Infinite Torpedoes + code:80c942/ad + cheat + description:Start with 0 Bombs instead of 40 + code:81e82e/00 + cheat + description:Start with 99 Bombs + code:81e82e/63 + cheat + description:Start with 0 Torpedoes instead of 60 + code:81e81c/00 + cheat + description:Start with 99 Torpedoes + code:81e81c/63 + cheat + description:Start with 0 Surface-to-Air Missiles (SAMs) instead of 25 + code:81e828/00 + cheat + description:Start with 50 SAMs + code:81e828/32 + cheat + description:Start with 99 SAMs + code:81e828/63 + cheat + description:Start with 0 Surface-to-Surface Missiles (SSMs) instead of 25 + code:81e822/00 + cheat + description:Start with 50 SSMs + code:81e822/32 + cheat + description:Start with 99 SSMs + code:81e822/63 + cheat + description:Start with 0 Electronic Countermeasures (ECMs) instead of 2 + code:81e816/00 + cheat + description:Start with 50 ECMs + code:81e816/32 + cheat + description:Start with 99 ECMs + code:81e816/63 + cheat + description:Start in theatre I - Caribbean + code:8099c6/02 + cheat + description:Start in theatre II - North Pacifi + code:8099c6/06 + cheat + description:Start in theatre III - Mediterranean + code:8099c6/0c + cheat + description:Start on the final mission - Return to the USSR + code:8099c6/10 + +cartridge sha256:41cc900d2461a8dc4706640e493885ddf85db04d8dffceebf7a0ed89cc983d8d + name:Hurricanes (USA) + cheat + description:Invincibility + code:7e0ca2/ff + cheat + description:Infinite health + code:7e0d0e/2c + cheat + description:Infinite time + code:7e1252/09 + cheat + description:Infinite lives + code:7e0d16/09 + +cartridge sha256:f57c49cc3e4c5e34929e12658db0de8794265c517e42f3c518bb1466ba46f14a + name:HyperZone (USA) + cheat + description:Infinite power + code:01b8c4/2c + cheat + description:Restore energy more quickly + code:018ccc/03 + cheat + description:Restore energy more slowly + code:018ccc/00 + cheat + description:Start with 8 lives + code:01a824/07 + cheat + description:Start with 1 life + code:01a824/00 + +cartridge sha256:fa143784fd20721d61101920e6aae9b7f5012b8157b1ce0c7ea83ea6c875d84d + name:Ignition Factor, The (USA) + cheat + description:Infinite health + code:7e0669/f9 + cheat + description:Max health + code:7e069a/f9 + cheat + description:Always have full abilities regardless of how many items you carry + code:7e0698/00 + cheat + description:Infinite Air Tank + code:7e0690/b4 + cheat + description:Infinite CO2 Bombs + code:7e0695/b4 + cheat + description:Infinite Fire Trucks + code:7e0697/03 + cheat + description:Infinite Blue (electrical) Extinguisher + code:7e068f/b4 + cheat + description:Infinite Green (chemical) Extinguisher + code:7e068e/b4 + cheat + description:Infinite Red Extinguisher + code:7e068d/b4 + cheat + description:Infinite Plastic Explosives + code:7e0696/b4 + cheat + description:Infinite time - minutes + code:7e1cba/00 + cheat + description:Infinite time - seconds + code:7e1cb9/00 + cheat + description:Infinite time - milliseconds + code:7e1cb8/00 + cheat + description:Have Green (chemical) Extinguisher in slot 1 + code:7e14c2/02 + cheat + description:Have Blue (electrical) Extinguisher in slot 2 + code:7e14c6/04 + cheat + description:Have Oxygen Tank and Mask in slot 3 + code:7e14ca/06 + cheat + description:Have Chainsaw in slot 4 + code:7e14ce/08 + cheat + description:Have Rope in slot 4 + code:7e14ce/0a + cheat + description:Have Axe in slot 4 + code:7e14ce/0c + cheat + description:Have Pole in slot 4 + code:7e14ce/0e + cheat + description:Have CO2 Bombs in slot 4 + code:7e14ce/10 + cheat + description:Have Plastic Explosives in slot 4 + code:7e14ce/12 + cheat + description:Haev Fossile in slot 4 + code:7e14ce/14 + cheat + description:Have First Aid Kit in slot 4 + code:7e14ce/26 + +cartridge sha256:32adc048fd89228a4310c03df243e83de7d436cdb2460b4cc83ade20d359b2bd + name:Illusion of Gaia (USA) + cheat + description:Infinite HP + code:83c47b/ad + cheat + description:Less charge time for psycho dash + code:82b815/05 + cheat + description:Less charge time for dark friar + code:82b890/05 + cheat + description:Super run left/right only + code:82c5c5/05+82c57b/fb + cheat + description:Super run up/down only + code:82c532/fc+82c4ea/04 + cheat + description:Get 2x the energy from herbs + code:83889f/10 + cheat + description:Get 3x the energy from herbs + code:83889f/18 + cheat + description:Red Jewel 50 check passes + code:88cf43/00 + cheat + description:Red Jewel 30 check passes + code:88cf38/00 + cheat + description:Red Jewel 20 check passes + code:88cf27/00 + cheat + description:Red Jewel 12 check passes + code:88cf16/00 + cheat + description:Red Jewel 08 check passes + code:88cf05/00 + cheat + description:Red Jewel 05 check passes + code:88cef4/00 + cheat + description:Red Jewel 03 check passes + code:88cee3/00 + cheat + description:Start with max HP + code:808069/ff + cheat + description:Start with a lot more energy + code:808068/14 + cheat + description:Start with 20 strength points + code:808071/14 + cheat + description:Start with 50 strength points + code:808071/32 + cheat + description:Start with 80 strength points + code:808071/50 + cheat + description:Infinite HP + code:7e0acd/32+7e0ace/32 + cheat + description:Max HP + code:7e0aca/32+7e0acb/03 + cheat + description:Max Strength + code:7e0ade/63 + cheat + description:Max Defense + code:7e0adc/63 + cheat + description:Can always attack + code:7e09ae/00 + cheat + description:One hit kills + code:7e0ade/ff+7e0adf/ff + cheat + description:Play as Will + code:7e0ad4/00 + cheat + description:Play as Knight + code:7e0ad4/01 + cheat + description:Play as Shade + code:7e0ad4/02 + cheat + description:Walk through walls + code:82e301/af+82e304/9b + cheat + description:Can always attack + code:7e09ae/00 + cheat + description:Have all Statues + code:7e0a1f/bf + cheat + description:Have Red Jewel - slot 1 + code:7e0ab4/01 + cheat + description:Have Red Jewel - slot 16 + code:7e0ac3/01 + cheat + description:Have Prison Key - slot 1 + code:7e0ab4/02 + cheat + description:Have Prison Key - slot 16 + code:7e0ac3/02 + cheat + description:Have Incan Statue A - slot 1 + code:7e0ab4/03 + cheat + description:Have Incan Statue A - slot 16 + code:7e0ac3/03 + cheat + description:Have Incan Statue B - slot 1 + code:7e0ab4/04 + cheat + description:Have Incan Statue B - slot 16 + code:7e0ac3/04 + cheat + description:Have Incan Melody - slot 1 + code:7e0ab4/05 + cheat + description:Have Incan Melody - slot 16 + code:7e0ac3/05 + cheat + description:Have Herb - slot 1 + code:7e0ab4/06 + cheat + description:Have Herb - slot 16 + code:7e0ac3/06 + cheat + description:Have Blue Block - slot 1 + code:7e0ab4/07 + cheat + description:Have Blue Block - slot 16 + code:7e0ac3/07 + cheat + description:Have Wind Melody - slot 1 + code:7e0ab4/08 + cheat + description:Have Wind Melody - slot 16 + code:7e0ac3/08 + cheat + description:Have Lola's Melody - slot 1 + code:7e0ab4/09 + cheat + description:Have Lola's Melody - slot 16 + code:7e0ac3/09 + cheat + description:Have Meat - slot 1 + code:7e0ab4/0a + cheat + description:Have Meat - slot 16 + code:7e0ac3/0a + cheat + description:Have Mine Key A - slot 1 + code:7e0ab4/0b + cheat + description:Have Mine Key A - slot 16 + code:7e0ac3/0b + cheat + description:Have Mine Key B - slot 1 + code:7e0ab4/0c + cheat + description:Have Mine Key B - slot 16 + code:7e0ac3/0c + cheat + description:Have Memory Melody - slot 1 + code:7e0ab4/0d + cheat + description:Have Memory Melody - slot 16 + code:7e0ac3/0d + cheat + description:Have Crystal Ball - slot 1 + code:7e0ab4/0e + cheat + description:Have Crystal Ball - slot 16 + code:7e0ac3/0e + cheat + description:Have Elevator Key - slot 1 + code:7e0ab4/0f + cheat + description:Have Elevator Key - slot 16 + code:7e0ac3/0f + cheat + description:Have Palace Key - slot 1 + code:7e0ab4/10 + cheat + description:Have Palace Key - slot 16 + code:7e0ac3/10 + cheat + description:Have Purify Stone - slot 1 + code:7e0ab4/11 + cheat + description:Have Purify Stone - slot 16 + code:7e0ac3/11 + cheat + description:Have Statue of Hope - slot 1 + code:7e0ab4/12 + cheat + description:Have Statue of Hope - slot 16 + code:7e0ac3/12 + cheat + description:Have Rama Statue - slot 1 + code:7e0ab4/13 + cheat + description:Have Rama Statue - slot 16 + code:7e0ac3/13 + cheat + description:Have Magic Dust - slot 1 + code:7e0ab4/14 + cheat + description:Have Magic Dust - slot 16 + code:7e0ac3/14 + cheat + description:Have Blue Journal - slot 1 + code:7e0ab4/15 + cheat + description:Have Blue Journal - slot 16 + code:7e0ac3/15 + cheat + description:Have Lance's Leter - slot 1 + code:7e0ab4/16 + cheat + description:Have Lance's Leter - slot 16 + code:7e0ac3/16 + cheat + description:Have Necklace Stone - slot 1 + code:7e0ab4/17 + cheat + description:Have Necklace Stone - slot 16 + code:7e0ac3/17 + cheat + description:Have Will - slot 1 + code:7e0ab4/18 + cheat + description:Have Will - slot 16 + code:7e0ac3/18 + cheat + description:Have Tea Pot - slot 1 + code:7e0ab4/19 + cheat + description:Have Tea Pot - slot 16 + code:7e0ac3/19 + cheat + description:Have Mushroom Drop - slot 1 + code:7e0ab4/1a + cheat + description:Have Mushroom Drop - slot 16 + code:7e0ac3/1a + cheat + description:Have Bag of Gold - slot 1 + code:7e0ab4/1b + cheat + description:Have Bag of Gold - slot 16 + code:7e0ac3/1b + cheat + description:Have Black Glasses - slot 1 + code:7e0ab4/1c + cheat + description:Have Black Glasses - slot 16 + code:7e0ac3/1c + cheat + description:Have Gorgon Flower - slot 1 + code:7e0ab4/1d + cheat + description:Have Gorgon Flower - slot 16 + code:7e0ac3/1d + cheat + description:Have Heiroglyph 1 - slot 1 + code:7e0ab4/1e + cheat + description:Have Heiroglyph 1 - slot 16 + code:7e0ac3/1e + cheat + description:Have Heiroglyph 2 - slot 1 + code:7e0ab4/1f + cheat + description:Have Heiroglyph 2 - slot 16 + code:7e0ac3/1f + cheat + description:Have Heiroglyph 3 - slot 1 + code:7e0ab4/20 + cheat + description:Have Heiroglyph 3 - slot 16 + code:7e0ac3/20 + cheat + description:Have Heiroglyph 4 - slot 1 + code:7e0ab4/21 + cheat + description:Have Heiroglyph 4 - slot 16 + code:7e0ac3/21 + cheat + description:Have Heiroglyph 5 - slot 1 + code:7e0ab4/22 + cheat + description:Have Heiroglyph 5 - slot 16 + code:7e0ac3/22 + cheat + description:Have Heiroglyph 6 - slot 1 + code:7e0ab4/23 + cheat + description:Have Heiroglyph 6 - slot 16 + code:7e0ac3/23 + cheat + description:Have Aura - slot 1 + code:7e0ab4/24 + cheat + description:Have Aura - slot 16 + code:7e0ac3/24 + cheat + description:Have Lola's Letter - slot 1 + code:7e0ab4/25 + cheat + description:Have Lola's Letter - slot 16 + code:7e0ac3/25 + cheat + description:Have Father's Journal - slot 1 + code:7e0ab4/26 + cheat + description:Have Father's Journal - slot 16 + code:7e0ac3/26 + cheat + description:Have Crystal Ring - slot 1 + code:7e0ab4/27 + cheat + description:Have Crystal Ring - slot 16 + code:7e0ac3/27 + cheat + description:Have Red Apple - slot 1 + code:7e0ab4/28 + cheat + description:Have Red Apple - slot 16 + code:7e0ac3/28 + +cartridge sha256:4dc2b5de98e9109583d9b61b38d26a8216af4dba246ef71350122213630562d0 + name:Imperium (USA) + cheat + description:Invincibility + code:04aca3/80+01e7b7/00 + cheat + description:Hit anywhere + code:01e863/80+01e881/ad + cheat + description:Infinite bombs + code:00c45a/ad + cheat + description:Start with 1 life point + code:00c8db/01 + cheat + description:Start with 3 life points + code:00c8db/03 + cheat + description:Start with 5 bombs + code:009e08/05 + cheat + description:Start with 9 bombs + code:009e08/09 + +cartridge sha256:c41150c0e84055801377fb7cb273cc51ca442b269ca6287cadf514f553e34750 + name:Incantation (USA) + cheat + description:Infinite energy + code:80ee24/ad + cheat + description:Infinite lives + code:80cf44/ad + cheat + description:Invincibility (blinking) + code:7e07fc/5f + cheat + description:Infinite energy (alt) + code:7e1115/30 + cheat + description:Infinite lives (alt) + code:7e0846/64 + cheat + description:Super-jump with lunar descent + code:7e163d/00 + cheat + description:3 wheat for toll + code:7e0e69/03 + cheat + description:Max bonus + code:7e083c/5a+7e083e/63 + cheat + description:Have larger shot + code:7e07e8/d4+7e07ea/1a + +cartridge sha256:0415adfe80977485f84cdffaaa79f18c91c004c7dba202b4cf9a94eb11adeada + name:Incredible Crash Dummies, The (USA) + cheat + description:Invincibility (blinking) + code:7e1338/37 + cheat + description:Infinite health + code:7e03b6/05 + cheat + description:Infinite lives + code:7e03b5/05 + cheat + description:Infinite time (disable at end of level) + code:7e04a6/3b + cheat + description:Infinite spanners + code:7e04a0/0a + cheat + description:Infinite wrenches (disable at end of level) + code:7e04a0/05 + cheat + description:Infinite airbag once obtained + code:7e0492/c7 + cheat + description:Infinite lightning once obtained + code:7e0490/c7 + cheat + description:Start at Parking Level 1 + code:7e03b9/01 + cheat + description:Start at Crash Center + code:7e03b9/02 + cheat + description:Start at Crash Center Boss + code:7e03b9/03 + cheat + description:Start at Construction Site 1 + code:7e03b9/04 + cheat + description:Start at Construction Site 2 + code:7e03b9/05 + cheat + description:Start at Construction Site Boss + code:7e03b9/06 + cheat + description:Start at Artillery Range 1 + code:7e03b9/07 + cheat + description:Start at Military Complex + code:7e03b9/08 + cheat + description:Start at Military Complex Boss + code:7e03b9/09 + cheat + description:Start at Junk Kastle + code:7e03b9/0a + cheat + description:Start at Junk Kastle Boss + code:7e03b9/0b + cheat + description:Start at Title Screen + code:7e03b9/0c + cheat + description:Start at Credits + code:7e03b9/0d + cheat + description:Start at Parking Level 2 + code:7e03b9/0e + cheat + description:Start at Vehicle Crash Test 1 'car' + code:7e03b9/0f + cheat + description:Start at Vehicle Crash Test 2 'bulldozer' + code:7e03b9/10 + cheat + description:Start at Artillery Range 2 + code:7e03b9/11 + cheat + description:Start at Vehicle Crash Test 3 'tank' + code:7e03b9/12 + +cartridge sha256:8d170628d2d2fdf142bb82ad80e908bba54c45fa33241c779b8eafaf1b21171f + name:Incredible Hulk, The (USA) + cheat + description:Infinite health + code:818d4a/bd+80f458/ad + cheat + description:Infinite transformation capsules on pick-up + code:8a8202/a5 + cheat + description:Health doesn't decrease when Hulked-out + code:8a804c/ad + cheat + description:Hit anywhere + code:8190e1/4c+8190e0/d0+8190dd/e0+8190de/00+8190df/00 + cheat + description:One hit kills + code:81901c/00 + cheat + description:Get items from anywhere + code:8a951e/80 + cheat + description:Get 4 shots from gun + code:8a95af/04 + cheat + description:Get 9 shots from gun + code:8a95af/09 + cheat + description:Get 20 shots from gun + code:8a95af/14 + cheat + description:Get 20 seconds from time icon + code:8a9544/20 + cheat + description:Get 40 seconds from time icon + code:8a9544/40 + cheat + description:2x energy from gamma capsules + code:8a95f8/1e + cheat + description:Gamma capsules act as mega-gamma capsules + code:8a95bd/00 + cheat + description:Super-jump (sometimes) + code:80df7b/0c+80e02f/0c + cheat + description:Mega-jump (sometimes) + code:80df7b/19+80e02f/19 + cheat + description:Mega damage from Hulk's uppercut + code:819038/0a + cheat + description:Mega damage from Hulk's head butt + code:819064/0a + cheat + description:4x damage from Hulk's uppercut + code:819038/04 + cheat + description:4x damage from Hulk's head-butt + code:819064/04 + cheat + description:Start with 1 life + code:809602/01 + cheat + description:Start with 6 lives + code:809602/06 + cheat + description:Start with 9 lives + code:809602/09 + cheat + description:Start on level 2 + code:8095d5/00 + cheat + description:Start on level 3 + code:8095d5/20 + cheat + description:Start on level 4 + code:8095d5/40 + cheat + description:Start on level 5 + code:8095d5/80 + cheat + description:Infinite and max health + code:7e0718/63 + cheat + description:Infinite lives + code:7e00c0/09 + +cartridge sha256:cf611b40f9570e8fcfdc21db623965da62561e8ca82ded59e432ba6fb0bfb562 + name:Indiana Jones' Greatest Adventures (USA) + cheat + description:Invincibility + code:80c93e/8d+80b640/d0 + cheat + description:Infinite lives + code:80abdf/ad + cheat + description:Infinite Bombs + code:80978d/ad + cheat + description:Infinite Grenades + code:80978d/ad + cheat + description:Infinite continues + code:bfc69e/ea+8a95af/14 + cheat + description:Hearts don't restore health + code:809489/ad + cheat + description:Can't collect Grenades + code:80975c/ad + cheat + description:Start with very little health + code:80af6d/01 + cheat + description:Start with about 1/2 health + code:80af6d/03 + cheat + description:Start with more health (ignore health meter) + code:81ab6d/0f + cheat + description:Start with 5 Grenades + code:80a635/05 + cheat + description:Start with 9 Grenades + code:80a635/09 + cheat + description:Start with 15 Grenades + code:80a635/0f + cheat + description:Start with 2 lives + code:bfa9ae/01 + cheat + description:Start with 5 lives + code:bfa9ae/04 + cheat + description:Start with 10 lives + code:bfa9ae/09 + cheat + description:Start with no continues + code:bfa9bb/06 + cheat + description:Infinite health + code:7e0120/06 + +cartridge sha256:5e5cac64fdcf09a52a9c0ab1ebc8bd309dcb1256faf1405284443569b5284fe5 + name:Inindo - Way of the Ninja (USA) + cheat + description:Max defend + code:7ef0c8/ff + cheat + description:Max intelligence + code:7ef0c3/ff + cheat + description:Max luck + code:7ef0c5/ff + cheat + description:Max power + code:7ef0ca/ff + cheat + description:Max resist + code:7ef0c9/ff + cheat + description:Max speed + code:7ef0c4/ff + cheat + description:Start with 50,000 gold + code:01f00a/c4 + cheat + description:Start with 250 health after the first battle + code:01f0a4/fa + cheat + description:Start with 100 energy after the first level up + code:01f0a8/64 + cheat + description:Infinite HP in battle + code:7e9606/e7+7e9607/03 + cheat + description:Max HP + code:7ef0b6/e7+7ef0b7/03 + cheat + description:Infinite energy + code:7ef0bc/e7+7ef0bd/03 + cheat + description:Max energy + code:7ef0ba/e7+7ef0bb/03 + cheat + description:Infinite chips + code:7ef076/ff+7ef077/ff + +cartridge sha256:c7b1706a0ee96f3e0d65cd043c05966bfe3d5c57d08bbd2df3118817424adf82 + name:Inspector Gadget (USA) + cheat + description:Invincibility (keep coat in collisions) + code:c08151/ad + cheat + description:Infinite time + code:c05635/ad + cheat + description:Infinite lives + code:c06980/ad + cheat + description:Start with 3 plungers + code:c02f9c/03 + +cartridge sha256:6443fecebcdc2ff7061a40432f3ad1db6dfd354909a5f306972cf6afa122752c + name:International Superstar Soccer (USA) + cheat + description:Opponent's Goals don't count + code:7e1774/00 + cheat + description:Infinite time + code:7e1a46/55 + cheat + description:3 minute game instead of 5 (International Cup and World Series modes) + code:7e1fa2/00 + cheat + description:7 Minute game (International Cup and World Series modes) + code:7e1fa2/02 + cheat + description:No Fouls (International Cup and World Series modes) + code:7e1f96/01 + cheat + description:No Cards (International Cup and World Series modes) + code:7e1f98/01 + cheat + description:No Offside (International Cup and World Series modes) + code:7e1f90/01 + cheat + description:Always Sunny (International Cup and World Series modes) + code:7e1f92/00 + cheat + description:Always Rain (International Cup and World Series modes) + code:7e1f92/01 + cheat + description:Always Snow (International Cup and World Series modes) + code:7e1f92/02 + cheat + description:Stop Clock (Training mode) + code:7e1e38/30 + cheat + description:Stop Bonus Clock (Training mode) + code:7e1e3c/30 + cheat + description:Black Ball and Noob Saibot referee (Open Game mode) + code:7e1f9f/03 + +cartridge sha256:8304d8bc55aa9e64bdd144d384f4b185af2426e7d64888c6c23dd41366a53981 + name:Irem Skins Game, The (USA) + cheat + description:Ball goes in from anywhere + code:00c6de/80+00c687/80+00c5ba/80+00c6bb/80+00c9f7/00 + +cartridge sha256:8e0d620a307a225a757bbc9ef2a2a666792e5d533aa0279d3c0060a1b93ead82 + name:Iron Commando - Koutetsu no Senshi (Japan) + cheat + description:Invincibility - Bicycle stages + code:81fac3/6b + cheat + description:Infinite ammo + code:81c862/ad + cheat + description:One hit kills (most enemies) + code:81f81a/24+82a059/9e+82a05c/9c + +cartridge sha256:39bfe828571cdb23e7c85c23cf5b175979dcc2042c5841add58f5ae6492168a9 + name:Itchy & Scratchy Game, The (USA) + cheat + description:Infinite health + code:97fc63/ad + cheat + description:Infinite lives + code:809a90/ad + cheat + description:Infinite time + code:8dbec1/ad + cheat + description:Infinite Bones + code:80b7c0/ad + cheat + description:Infinite health - P1 + code:7e022b/46 + cheat + description:Infinite lives (alt) + code:7e023a/03 + cheat + description:Infinite Cheese speed boost + code:7e023b/03 + cheat + description:Infinite Boss weapons + code:7e023c/0f + +cartridge sha256:183af7d642b55d52cd594786ec2f031d033cc6c8c1a2a84a834e4ada04301b26 + name:Izzy's Quest for the Olympic Rings (USA) + cheat + description:Infinite health (disable then enable when bored in sub games) + code:7e9eb0/03 + cheat + description:Infinite lives + code:7e9e90/0a + cheat + description:Start on Greek Village I + code:7e0394/05+7e0398/05 + cheat + description:Start on Rocket Ride I + code:7e0394/06+7e0398/06 + cheat + description:Start on Greek Village II + code:7e0394/07+7e0398/07 + cheat + description:Start on Space Walk I + code:7e0394/08+7e0398/08 + cheat + description:Start on Greek Village III + code:7e0394/09+7e0398/09 + cheat + description:Start on Rocket Ride II + code:7e0394/0a+7e0398/0a + cheat + description:Start on Lava Dome I + code:7e0394/0b+7e0398/0b + cheat + description:Start on Space Walk II + code:7e0394/0c+7e0398/0c + cheat + description:Start on Lava Dome II + code:7e0394/0d+7e0398/0d + cheat + description:Start on Rocket Ride III + code:7e0394/0e+7e0398/0e + cheat + description:Start on Lava Dome III + code:7e0394/0f+7e0398/0f + cheat + description:Start on Space Walk III + code:7e0394/10+7e0398/10 + cheat + description:Start on Exit to Atlanta I + code:7e0394/11+7e0398/11 + cheat + description:Start on Exit to Atlanta II + code:7e0394/12+7e0398/12 + cheat + description:Start on Round Ends + code:7e0394/13+7e0398/13 + cheat + description:Start on Game Ending + code:7e0394/14+7e0398/14 + +cartridge sha256:62557ee2a3fc3b5a3f59431f966eb61bb380ba983ef6c7742cb55cf075f15f6c + name:J.R.R. Tolkien's The Lord of the Rings - Volume 1 (USA) + cheat + description:Invincibility - all characters + code:80c2d6/bd + cheat + description:Start with 908 HP + code:b1a2fa/09+81a2fb/09 + cheat + description:Start with 9908 HP + code:b1a2fa/99+81a2fb/99 + cheat + description:Start the game with more strength + code:81a308/8d + cheat + description:9999 HP - character 1 + code:7e0224/99+7e0225/99 + cheat + description:9999 max HP - character 1 + code:7e0236/99+7e0237/99 + cheat + description:9999 EXP - character 1 + code:7e0246/99+7e0247/99 + cheat + description:Level 98 - character 1 + code:7e0256/98 + cheat + description:9999 HP - character 2 + code:7e0226/99+7e0227/99 + cheat + description:9999 max HP - character 2 + code:7e0238/99+7e0239/99 + cheat + description:9999 EXP - character 2 + code:7e0248/99+7e0249/99 + cheat + description:Level 98 - character 2 + code:7e0258/98 + cheat + description:Have all items + code:7e02b3/ff+7e02b4/ff+7e02b5/01+7e02aa/ff+7e02ab/ff+7e02ac/ff+7e02ad/ff+7e02ae/ff+7e02af/ff+7e02b0/ff+7e02b1/ff+7e02b2/ff + cheat + description:Walk through walls + code:80e643/11 + +cartridge sha256:3ffbb6e0ccf8e9f5e4c72d9fe526a16371e562b71a91d6430e562bf358a5126b + name:Jack Nicklaus Golf (USA) + cheat + description:Ball goes in from anywhere + code:00cca9/4e+00cca8/80 + cheat + description:Infinite mulligans + code:009e1d/bd + cheat + description:Mulligan can be taken after any stroke + code:009dd1/80 + cheat + description:No mulligans allowed + code:009dca/00 + cheat + description:Each round ends after hole 1 + code:00e5ee/01+03f099/00 + cheat + description:Each round ends after hole 2 + code:00e5ee/02+03f099/01 + cheat + description:Each round ends after hole 3 + code:00e5ee/03+03f099/02 + cheat + description:Each round ends after hole 4 + code:00e5ee/04+03f099/03 + cheat + description:Each round ends after hole 5 + code:00e5ee/05+03f099/04 + cheat + description:Each round ends after hole 6 + code:00e5ee/06+03f099/05 + cheat + description:Each round ends after hole 7 + code:00e5ee/07+03f099/06 + cheat + description:Each round ends after hole 8 + code:00e5ee/08+03f099/07 + cheat + description:Each round ends after hole 9 + code:00e5ee/09+03f099/08 + cheat + description:Each round ends after hole 10 + code:00e5ee/0a+03f099/09 + cheat + description:Each round ends after hole 11 + code:00e5ee/0b+03f099/0a + cheat + description:Each round ends after hole 12 + code:00e5ee/0c+03f099/0b + cheat + description:Each round ends after hole 13 + code:00e5ee/0d+03f099/0c + cheat + description:Each round ends after hole 14 + code:00e5ee/0e+03f099/0d + cheat + description:Each round ends after hole 15 + code:00e5ee/0f+03f099/0e + cheat + description:Each round ends after hole 16 + code:00e5ee/10+03f099/0f + cheat + description:Each round ends after hole 17 + code:00e5ee/11+03f099/10 + +cartridge sha256:9cf82dd9a851cdc38bf2afc286c077ff18a0a5d3bb301eba606cc52db62f8965 + name:James Bond Jr (USA) + cheat + description:Infinite health (can still be hurt by some things) + code:06d09a/af + cheat + description:Infinite Grenades + code:06dac6/ad + cheat + description:Infinite Darts + code:06dc30/ad + cheat + description:Infinite lives on the ground + code:00f245/ad + cheat + description:Infinite lives in the air + code:028ea5/ad + cheat + description:Hearts worth 0 + code:06ea06/ad + cheat + description:Large red Grenade worth 0 instead of 5 + code:06ea2d/00 + cheat + description:Large red Grenade worth 10 + code:06ea2d/0a + cheat + description:Large red Grenade worth 20 + code:06ea2d/14 + cheat + description:Large red Grenade worth 30 + code:06ea2d/1e + cheat + description:Large red Grenade worth 40 + code:06ea2d/28 + cheat + description:Small silver Grenade worth 0 instead of 1 + code:06ebc0/ea + cheat + description:Start with 1 life on the ground instead of 5 + code:00c24d/01 + cheat + description:Start with 3 lives on the ground + code:00c24d/03 + cheat + description:Start with 7 lives on the ground + code:00c24d/07 + cheat + description:Start with 9 lives on the ground + code:00c24d/09 + cheat + description:Start with 1 life in the air instead of 5 + code:0080b3/01 + cheat + description:Start with 3 lives in the air + code:0080b3/03 + cheat + description:Start with 7 lives in the air + code:0080b3/07 + cheat + description:Start with 9 lives in the air + code:0080b3/09 + cheat + description:Start with 0 Grenades and Darts instead of 10 + code:00f236/00 + cheat + description:Start with 5 Grenades and Darts + code:00f236/05 + cheat + description:Start with 25 Grenades and Darts + code:00f236/19 + cheat + description:Start with 50 Grenades and Darts + code:00f236/32 + cheat + description:Start with 99 Grenades and Darts + code:00f236/63 + cheat + description:Start with 0 Darts instead of 10 + code:00c259/00+00f23b/af + cheat + description:Start with 5 Darts + code:00c259/05+00f23b/af + cheat + description:Start with 25 Darts + code:00c259/19+00f23b/af + cheat + description:Start with 50 Darts + code:00c259/32+00f23b/af + cheat + description:Start with 99 Darts + code:00c259/63+00f23b/af + cheat + description:Start on level 3 + code:00c2a1/a9+00c2a2/01 + cheat + description:Start on level 5 + code:00c2a1/a9+00c2a2/02 + cheat + description:Start on level 7 + code:00c2a1/a9+00c2a2/03 + cheat + description:Start on level 3, part 2 + code:00c29f/a9+00c2a0/04+00c2a1/80 + cheat + description:Start on level 3, part 3 + code:00c29f/a9+00c2a0/07+00c2a1/80 + cheat + description:Start on level 5, part 2 + code:00c29f/a9+00c2a0/05+00c2a1/80 + cheat + description:Start on level 5, part 3 + code:00c29f/a9+00c2a0/08+00c2a1/80 + cheat + description:Start on level 7, part 2 + code:00c29f/a9+00c2a0/06+00c2a1/80 + cheat + description:Start on level 7, part 3 + code:00c29f/a9+00c2a0/09+00c2a1/80 + +cartridge sha256:f5e74f09c485d58b444ef2b168d041a1d451056b5feb295901974ca73190dbdb + name:Jelly Boy (Europe) + cheat + description:Infinite lives + code:80dbb4/ad + cheat + description:Infinite time + code:81fde1/ad + cheat + description:Don't lose Music Notes when hit (can get stuck) + code:80dc87/ad + +cartridge sha256:bc09f97cb988f6e445fc92e438fff4bf97aa56cb7bbecaa234ffe93bb285d915 + name:Jelly Boy 2 (Japan) (Proto) + cheat + description:Invincibility + code:7e026b/03 + cheat + description:Infinite lives + code:7e0269/03 + +cartridge sha256:85e5f6fedc420925557092d728e1dc6b4e2042368fb78bf93c0df447f8c9c0c0 + name:Jeopardy! (USA) + cheat + description:Always get the correct answer + code:00aeb2/80+00aefb/80 + +cartridge sha256:ee7a29eb9c302ea2bb235ef990fd8344a6beb9817499941c40a8a94ad5f7c964 + name:Jetsons, The - Invasion of the Planet Pirates (USA) + cheat + description:Invincibility + code:8189de/ea + cheat + description:Infinite lives + code:808c0e/ad + cheat + description:Infinite time + code:80c402/ad + cheat + description:Maximum vacuum power + code:80919a/04 + +cartridge sha256:6a2f280ed1ef5166d95e3b0eb1a6665564f7ddcfd3feaf53344a1268b54b85c6 + name:Jikkyou Oshaberi Parodius (Japan) + cheat + description:Infinite lives + code:7e00ac/04 + +cartridge sha256:a314583b11d594b8245b5177aa64a4d3b7497d096edabbea7c1842c57aa2ad2b + name:Jim Lee's WildC.A.T.S - Covert-Action-Teams (USA) + cheat + description:Invincibility + code:8aa672/ad + cheat + description:Infinite health + code:8a82ae/bd + cheat + description:Infinite lives + code:8a9935/ea + cheat + description:Infinite health (alt) + code:7e401e/48 + cheat + description:Infinite lives (alt) + code:7e1f93/03 + cheat + description:Infinite bombs + code:7e1f95/09 + +cartridge sha256:6f0bec87ece503b0fbe108cd159ed6f5fa7711b1c4fe31e982af41ad5c638093 + name:Jim Power - The Lost Dimension in 3D (USA) + cheat + description:Invincibility + code:80c191/af + cheat + description:Infinite lives + code:80c205/a5 + cheat + description:Infinite time + code:81df47/a5 + cheat + description:Infinite SB + code:80e81e/a5 + cheat + description:Invincibility (alt) + code:7e074e/39 + cheat + description:Infinite lives (alt) + code:7e003f/09 + cheat + description:Infinite time (alt) + code:7e0043/ff + cheat + description:Infinite SB (alt) + code:7e0041/09 + cheat + description:Hit anywhere + code:81e63e/ff+81e63f/ff+81e736/ad + cheat + description:Jump as high as you want and jump through walls (disable to come back down) + code:7e077e/10 + +cartridge sha256:3b2b8b813b58049a4a86ce1c42d2a651f19fd9bbab2407a494e20cf343d3c1a4 + name:Joe & Mac (USA) + cheat + description:Invincibility after one hit + code:00daa8/b5 + cheat + description:Infinite health + code:009ec8/d9 + cheat + description:Infinite health (alt) + code:009ec8/b9 + cheat + description:Infinite lives + code:00e089/00 + cheat + description:Infinite lives (alt) + code:00e08a/b5 + cheat + description:Infinite Keys + code:02ec8d/a5 + cheat + description:All food fully restores health + code:00f546/00 + cheat + description:Hit anywhere + code:00a1e3/80+00f070/a5+00a12e/00 + cheat + description:One hit kills + code:00a1ac/24 + cheat + description:Start with 2 lives + code:00aab9/a9+00aaba/01 + cheat + description:Start with 6 lives + code:00aab9/a9+00aaba/05 + cheat + description:Start with 10 lives + code:00aab9/a9+00aaba/09 + cheat + description:Infinite health - P1 + code:7e081c/14 + cheat + description:Infinite health - P2 + code:7e085c/0f + cheat + description:Infinite lives - P1 + code:7e0822/05 + cheat + description:Infinite lives - P2 + code:7e0862/05 + cheat + description:Have no weapon - P1 + code:7e081a/b8 + cheat + description:Have no weapon - P2 + code:7e085a/b8 + cheat + description:Have Bone - P1 + code:7e081a/b9 + cheat + description:Have Bone - P2 + code:7e085a/b9 + cheat + description:Have Boomerang - P1 + code:7e081a/ba + cheat + description:Have Boomerang - P2 + code:7e085a/ba + cheat + description:Have Fire - P1 + code:7e081a/bb + cheat + description:Have Fire - P2 + code:7e085a/bb + cheat + description:Have Wheel - P1 + code:7e081a/bc + cheat + description:Have Wheel - P2 + code:7e085a/bc + +cartridge sha256:38451dcbbcd7069ba232e704dcb747a1438bab0a9508218611a027a7f8dfd547 + name:Joe & Mac 2 - Lost in the Tropics (USA) (Beta) + cheat + description:Infinite health + code:80b1de/95 + cheat + description:Infinite lives + code:80e307/b5 + cheat + description:Start with $2020 + code:80e39d/c3 + +cartridge sha256:c9889799a9ae8558f26d66ae546db930c99acb78d921b4395afbbc38da6272aa + name:Joe & Mac 2 - Lost in the Tropics (USA) + cheat + description:Infinite health + code:80b232/95 + cheat + description:Infinite lives + code:80af6a/95 + cheat + description:Hit anywhere (disable to enter stores and houses) + code:80eded/00+80ef23/00+828a8f/00 + cheat + description:Start with $2020 + code:80e41f/c3 + +cartridge sha256:5a76347672ea7d27bb334b1e30bbc73e06f92373883bed499245377327a8f0cf + name:John Madden Football (USA) + cheat + description:Always 1st down + code:00ca9b/ad + cheat + description:Infinite time-outs + code:00d32d/ea + cheat + description:Play clock is 20 seconds instead of 45 + code:00c3d8/14 + cheat + description:Play clock is 30 seconds + code:00c3d8/1e + cheat + description:Play clock is 60 seconds (CPU will run down the play clock) + code:00c3d8/3c + cheat + description:Play clock is 90 seconds (CPU will run down the play clock) + code:00c3d8/5a + cheat + description:Only have 3 plays to get a first down or TD (down counter starts at 2) + code:00cae1/02 + cheat + description:Only have 2 plays to get a first down or TD (down counter starts at 3) + code:00cae1/03 + cheat + description:Only have 1 play to get a first down or TD (down counter starts at 4) + code:00cae1/04 + cheat + description:No time-outs instead of 3 - P1 + code:008f59/00 + cheat + description:6 time-outs - P1 + code:008f59/06 + cheat + description:9 time-outs - P1 + code:008f59/09 + cheat + description:No time-outs - P2 + code:008f5a/00 + cheat + description:6 time-outs - P2 + code:008f5a/06 + cheat + description:9 time-outs - P2 + code:008f5a/09 + cheat + description:Safeties worth 1 point instead of 2 + code:00cb86/bd + cheat + description:Safeties worth 0 points + code:00cb86/bd+00cb89/bd + cheat + description:Touchdowns worth 0 points instead of 6 + code:00cd2e/00 + cheat + description:Touchdowns worth 1 point + code:00cd2e/01 + cheat + description:Touchdowns worth 2 points + code:00cd2e/02 + cheat + description:Touchdowns worth 3 points + code:00cd2e/03 + cheat + description:Touchdowns worth 4 points + code:00cd2e/04 + cheat + description:Touchdowns worth 5 points + code:00cd2e/05 + cheat + description:Touchdowns worth 7 points + code:00cd2e/07 + cheat + description:Touchdowns worth 8 points + code:00cd2e/08 + cheat + description:Touchdowns worth 9 points + code:00cd2e/09 + cheat + description:Extra points and field goals worth 0 + code:00cf3d/ea+00cf3e/ea + cheat + description:Extra point or field goal resets score to 0 + code:00cf3f/9e + cheat + description:Start with 3 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0+008ea2/03 + cheat + description:Start with 5 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0 + cheat + description:Start with 9 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0+008ea2/09 + cheat + description:Start with 12 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0+008ea2/0c + cheat + description:Start with 15 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0+008ea2/0f + cheat + description:Start with 20 points - P1 + code:008ea1/a9+008ea4/8d+008ea5/26+008eaa/f0+008ea2/14 + cheat + description:Start with 3 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0+008ea2/03 + cheat + description:Start with 5 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0 + cheat + description:Start with 9 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0+008ea2/09 + cheat + description:Start with 12 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0+008ea2/0c + cheat + description:Start with 15 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0+008ea2/0f + cheat + description:Start with 20 points - P2 + code:008ea1/a9+008ea4/8d+008ea5/2b+008eaa/f0+008ea2/14 + +cartridge sha256:3e62872bf69ea90dd7093608268f8defa2c6016adb1011745dab3c2af45d69b7 + name:John Madden Football '93 (USA) + cheat + description:Infinite timeouts - both players + code:00e1c7/ea + cheat + description:9 timeouts - P1 + code:0be04b/09 + cheat + description:6 timeouts - P1 + code:0be04b/06 + cheat + description:1 timeout - P1 + code:0be04b/01 + cheat + description:9 timeouts - P2 + code:0be04c/09 + cheat + description:6 timeouts - P2 + code:0be04c/06 + cheat + description:1 timeout - P2 + code:0be04c/01 + +cartridge sha256:67fa7115eb6bf292c024c3a8b06ce9bd457c4d46de182a06a573afff968cc0f1 + name:Judge Dredd (USA) + cheat + description:Invincible after first hit + code:a4d1a7/ad + cheat + description:Almost infinite health + code:a4cd53/ad + cheat + description:Almost infinite ammo + code:ba94f0/ad + cheat + description:Don't flash after getting hit + code:a4cd5a/00 + cheat + description:Don't flash as long after getting hit + code:a4cd5a/32 + cheat + description:Flash longer after getting hit + code:a4cd5a/ff + cheat + description:Start with all weapons and almost infinite ammo + code:ba8de9/ff + cheat + description:Start with very little energy on your first life + code:ba8e0b/0f + cheat + description:Start with half energy on your first life + code:ba8e0b/80 + cheat + description:Start with about 3/4 energy on your first life + code:ba8e0b/c6 + cheat + description:Start with very little energy after first life + code:a4ecce/0f + cheat + description:Start with half energy after first life + code:a4ecce/80 + cheat + description:Start with about 3/4 energy after first life + code:a4ecce/c6 + cheat + description:Start with 1 life + code:ba8dd3/01 + cheat + description:Start with 5 lives + code:ba8dd3/05 + cheat + description:Start with 9 lives + code:ba8dd3/09 + cheat + description:Invincibility + code:7e1a91/01 + cheat + description:Infinite health + code:7e1b11/ff + cheat + description:Infinite lives + code:7e1af7/09 + cheat + description:Infinte Grenades + code:7e1b01/99 + cheat + description:Infinite Boing + code:7e1b0d/99 + cheat + description:Infinite Richochet + code:7e1aff/99 + cheat + description:Infinite Seeker + code:7e1b09/99 + cheat + description:Infinite Double Whammie + code:7e1b0b/99 + cheat + description:Infinite Incindiary + code:7e1b05/99 + cheat + description:Infinte High Explosive + code:7e1b03/99 + cheat + description:Infinte Armor Piercing + code:7e1b07/99 + cheat + description:Infinite Flare + code:7e1b0f/99 + cheat + description:Infinite Hover Board and Hover Boots + code:7e1aa5/f9 + +cartridge sha256:02cb423199be3368fc2b40148f83b7a48900394983e04d43f94bb7d76ce44e94 + name:Judge Dredd (Europe) + cheat + description:Invincibility + code:7e1a91/01 + cheat + description:Infinite health + code:7e1b11/ff + cheat + description:Infinite lives + code:7e1af7/09 + cheat + description:Infinte Grenades + code:7e1b01/99 + cheat + description:Infinite Boing + code:7e1b0d/99 + cheat + description:Infinite Richochet + code:7e1aff/99 + cheat + description:Infinite Seeker + code:7e1b09/99 + cheat + description:Infinite Double Whammie + code:7e1b0b/99 + cheat + description:Infinite Incindiary + code:7e1b05/99 + cheat + description:Infinte High Explosive + code:7e1b03/99 + cheat + description:Infinte Armor Piercing + code:7e1b07/99 + cheat + description:Infinite Flare + code:7e1b0f/99 + cheat + description:Infinite Hover Board and Hover Boots + code:7e1aa5/f9 + +cartridge sha256:771a0322d9f5f8e13a52d01e80257a1f75cc693cf4abf74793520eb5f8b5580e + name:Jungle Book, The (USA) + cheat + description:Infinite weapons + code:808810/00 + cheat + description:Infinite lives + code:80a8ad/ad + cheat + description:Hearts from big jungle fruit restore all energy + code:80a316/00 + cheat + description:Super-jump - Mowgli + code:80abc3/fb + cheat + description:Mega-jump - Mowgli + code:80abc3/fa + cheat + description:20 seconds from hourglass + code:80a547/02 + cheat + description:30 seconds from hourglass + code:80a547/03 + cheat + description:Bonus gems worth 2 (don't collect over 100) + code:80a4c0/02 + cheat + description:Bonus gems worth 3 (don't collect over 100) + code:80a4c0/03 + cheat + description:Bonus gems worth 4 (don't collect over 100) + code:80a4c0/04 + cheat + description:Red gems worth 2 (don't collect over 100) + code:80a4d7/02 + cheat + description:Red gems worth 3 (don't collect over 100) + code:80a4d7/03 + cheat + description:Red gems worth 4 (don't collect over 100) + code:80a4d7/04 + cheat + description:The amazing rock (just for fun) + code:80807f/00 + cheat + description:Start with 9 hearts (normal game) + code:80fd16/09 + cheat + description:Start with 6 hearts (normal game) + code:80fd16/06 + cheat + description:Start with 1 heart (normal game) + code:80fd16/01 + cheat + description:Start with 10 lives (normal game) + code:80fd10/09 + cheat + description:Start with 2 lives (normal game) + code:80fd10/01 + cheat + description:Invincibility + code:7e068c/31 + cheat + description:Infinite health + code:7e010b/04 + cheat + description:Have 99 green gems + code:7e015d/99 + cheat + description:Have 99 red gems + code:7e015e/99 + +cartridge sha256:8d812ea4fa897274116f7f43bc689e110f1cfbd3f7eb3a1737c2a85d36369159 + name:Jungle Strike (USA) + cheat + description:Infinite ammo + code:80c47e/ad + cheat + description:Infinite armor + code:80cc57/ad + cheat + description:Infinite lives + code:809af8/af + cheat + description:Start with less fuel + code:81ba7c/32 + cheat + description:Start with more fuel + code:81ba7c/32 + cheat + description:Start with mega fuel + code:81ba7d/32 + cheat + description:Start with 0 hellfires + code:81ba8e/00 + cheat + description:Start with more hellfires + code:81ba8e/96 + cheat + description:Start with mega hellfires + code:81ba8f/96 + cheat + description:Start with less gun ammo + code:81ba9b/00 + cheat + description:Start with more gun ammo + code:81ba9b/16 + cheat + description:Start with mega gun ammo + code:81ba9b/32 + cheat + description:Start with less hydras + code:81ba94/19 + cheat + description:Start with more hydras + code:81ba94/ff + cheat + description:Start with mega hydras + code:81ba95/32 + +cartridge sha256:0a4e9d6fa2ac16aa51da5538d93280734de480e44c430173ed14826c84553c7d + name:Jurassic Park (USA) (Rev 1) + cheat + description:Infinite lives + code:8180cd/ad + cheat + description:Cattle Prod energy recharges to about 3/4 full when outside + code:80b2d7/18 + cheat + description:Cattle Prod energy recharges to about 1/2 full when outside + code:80b2d7/10 + cheat + description:Cattle Prod energy recharges to about 1/4 full when outside + code:80b2d7/08 + cheat + description:Infinite Cattle Prod energy when outside + code:80b27e/ad + cheat + description:Infinite 1st weapons when outside + code:80af99/ad + cheat + description:Infinite 2nd weapons when outside (except gas grenade) + code:80b053/bd + cheat + description:Cattle Prod energy recharges to 1/2 full when inside + code:80fcce/f0 + cheat + description:Infinite Cattle Prod energy when inside + code:a1bcd6/ad + cheat + description:Infinite 1st weapons when inside + code:a1af2a/ea+a1afc0/ea + cheat + description:Infinite 2nd weapons when inside (except gas grenade) + code:a1ab84/ad + cheat + description:Infinite continues with 4 lives + code:8192b8/ad + cheat + description:Continue 1st time with 5 lives + code:8192a3/04 + cheat + description:Continue with 5 lives after 1st continue + code:8192ac/04 + cheat + description:Start with 1 egg needed + code:81d7ea/01 + cheat + description:Start with 2 lives + code:81d7f0/01 + cheat + description:Start with 4 lives + code:81d7f0/03 + cheat + description:Infinite health + code:7e02eb/03 + cheat + description:Infinite lives (alt) + code:7e02a3/03 + cheat + description:Infinite ammo - all weapons + code:7e028b/20+7e0295/20+7e029f/20 + cheat + description:Generator on + code:7e00f0/ef + cheat + description:Have level 1 security card + code:7e0265/01 + cheat + description:Have level 2 security card + code:7e0267/01 + cheat + description:Have all 18 Eggs + code:7e0e0f/00+7e0e10/00 + cheat + description:Have John Hammond ID Card + code:7e0253/01 + cheat + description:Have Dr. Ellie Sattler ID Card + code:7e0255/01 + cheat + description:Have Robert Muldoon ID Card + code:7e0257/01 + cheat + description:Have Dr. Allen Grant ID Card + code:7e0259/01 + cheat + description:Have Donald Gennaro ID Card + code:7e025b/01 + cheat + description:Have Ray Arnold ID Card + code:7e025e/01 + cheat + description:Have Dennis Nedry ID Card + code:7e0260/01 + cheat + description:Have Dr. Henry Wu ID Card + code:7e0261/01 + cheat + description:Have Dr. Ian Malcolm ID Card + code:7e0263/01 + +cartridge sha256:fe91d45201753ae9655d5ce38838e352f478b26b2d933c1bcb5bd8330121f9ff + name:Jurassic Park (USA) + cheat + description:Infinite lives + code:8180cd/ad + cheat + description:Cattle Prod energy recharges to about 3/4 full when outside + code:80b2d7/18 + cheat + description:Cattle Prod energy recharges to about 1/2 full when outside + code:80b2d7/10 + cheat + description:Cattle Prod energy recharges to about 1/4 full when outside + code:80b2d7/08 + cheat + description:Infinite Cattle Prod energy when outside + code:80b27e/ad + cheat + description:Infinite 1st weapons when outside + code:80af99/ad + cheat + description:Infinite 2nd weapons when outside (except gas grenade) + code:80b053/bd + cheat + description:Cattle Prod energy recharges to 1/2 full when inside + code:80fcce/f0 + cheat + description:Infinite Cattle Prod energy when inside + code:a1bcd6/ad + cheat + description:Infinite 1st weapons when inside + code:a1af2a/ea+a1afc0/ea + cheat + description:Infinite 2nd weapons when inside (except gas grenade) + code:a1ab84/ad + cheat + description:Infinite continues with 4 lives + code:8192b8/ad + cheat + description:Continue 1st time with 5 lives + code:8192a3/04 + cheat + description:Continue with 5 lives after 1st continue + code:8192ac/04 + cheat + description:Start with 1 egg needed + code:81d7ea/01 + cheat + description:Start with 2 lives + code:81d7f0/01 + cheat + description:Start with 4 lives + code:81d7f0/03 + cheat + description:Infinite health + code:7e02eb/03 + cheat + description:Infinite lives (alt) + code:7e02a3/03 + cheat + description:Infinite ammo - all weapons + code:7e028b/20+7e0295/20+7e029f/20 + cheat + description:Generator on + code:7e00f0/ef + cheat + description:Have level 1 security card + code:7e0265/01 + cheat + description:Have level 2 security card + code:7e0267/01 + cheat + description:Have all 18 Eggs + code:7e0e0f/00+7e0e10/00 + cheat + description:Have John Hammond ID Card + code:7e0253/01 + cheat + description:Have Dr. Ellie Sattler ID Card + code:7e0255/01 + cheat + description:Have Robert Muldoon ID Card + code:7e0257/01 + cheat + description:Have Dr. Allen Grant ID Card + code:7e0259/01 + cheat + description:Have Donald Gennaro ID Card + code:7e025b/01 + cheat + description:Have Ray Arnold ID Card + code:7e025e/01 + cheat + description:Have Dennis Nedry ID Card + code:7e0260/01 + cheat + description:Have Dr. Henry Wu ID Card + code:7e0261/01 + cheat + description:Have Dr. Ian Malcolm ID Card + code:7e0263/01 + +cartridge sha256:5eff7c27f69b3ebc1ec1294ffcd1debf3512bc3e6c1c75fbdc5e778dcaaba1c9 + name:Jurassic Park Part 2 - The Chaos Continues (USA) (En,Fr,De,It) + cheat + description:Almost invincible + code:b4f297/b9+a08d7a/b9 + cheat + description:Invincibility after one hit until you enter a new screen + code:809a8d/bd + cheat + description:Infinite health against some larger dinosaurs + code:b4f301/80 + cheat + description:One hit kills on some dinosaurs + code:a080dc/02 + cheat + description:Regular Gun is super strong + code:938dc2/40 + cheat + description:Flash longer after getting hit + code:80e543/ff + cheat + description:Don't flash after getting hit + code:80e543/00 + cheat + description:Velociraptor takes more damage + code:aeaa70/20 + cheat + description:Start with less Machine Gun ammo + code:9ca344/0f + cheat + description:Start with more Shotgun ammo + code:9ca34b/64 + cheat + description:Start with less Tranquilizer Gun ammo + code:9ca359/10 + cheat + description:Start with more Tranquilizer Missiles + code:9ca360/64 + cheat + description:Invincibility - P1 + code:7eb04a/0e + cheat + description:Infinite health - P1 + code:7eb032/28 + cheat + description:Infinite Machine Gun ammo + code:7ea9b0/ff + cheat + description:Infinite Shotgun ammo + code:7ea9b2/ff + cheat + description:Infinite Grenade Launcher + code:7ea9b6/ff + cheat + description:Infinite Dino stock + code:7e0008/64 + cheat + description:Have Rifle + code:7eb040/00 + cheat + description:Have Machine Gun + code:7eb040/01 + cheat + description:Have Shotgun + code:7eb040/02 + cheat + description:Have Charge Gun + code:7eb040/03 + cheat + description:Have Tranquilizer Gun + code:7eb040/04 + cheat + description:Have Big Bomb Gun + code:7eb040/05 + cheat + description:Have Big Bomb Gun with Dinosaur icon + code:7eb040/07 + cheat + description:Have Needle Gun with clock icon + code:7eb040/08 + +cartridge sha256:7f05959f423bc656091ea3bddfbc89c877ae243dca346f63233e27973f34e0eb + name:Justice League Task Force (USA) + cheat + description:Infinite health - P1 + code:7e0cf7/60 + cheat + description:No health - P2 + code:7e0cf9/00 + cheat + description:Infinite time + code:7e0335/99 + cheat + description:Hit anywhere - Normal Attacks - P1 + code:80c7e1/80+80c7e2/1e + cheat + description:Hit anywhere - Normal Attacks - P2 + code:80c85c/80+80c85d/1e + cheat + description:Hit anywhere - Projectiles - both players + code:808685/80+808686/1e + cheat + description:Win match after one round + code:7e0547/02+7e0efb/02 + +cartridge sha256:05152bcf9bf086e7bcdbfa7dd8edfe2085f1339c4d7e193e0071c49a10471ef4 + name:Ka-blooey (USA) + cheat + description:Invincibility + code:00b292/80+00c251/80 + cheat + description:Infinite lives + code:008165/ad + cheat + description:Bonus timer doesn't count down + code:00d231/ea + cheat + description:Level is completed after only one bomb goes off + code:00a9bc/9c + cheat + description:Start with 1 life instead of 5 + code:00809e/01 + cheat + description:Start with 3 lives + code:00809e/03 + cheat + description:Start with 10 lives + code:00809e/0a + cheat + description:Start with 25 lives + code:00809e/19 + cheat + description:Start with 50 lives + code:00809e/32 + cheat + description:Start with 75 lives + code:00809e/4b + cheat + description:Start with 98 lives + code:00809e/62 + cheat + description:Start on level 2 + code:00dd7c/9c+00dd78/01 + cheat + description:Start on level 3 + code:00dd7c/9c+00dd78/02 + cheat + description:Start on level 4 + code:00dd7c/9c+00dd78/03 + cheat + description:Start on level 5 + code:00dd7c/9c+00dd78/04 + cheat + description:Start on level 6 + code:00dd7c/9c+00dd78/05 + cheat + description:Start on level 7 + code:00dd7c/9c+00dd78/06 + cheat + description:Start on level 8 + code:00dd7c/9c+00dd78/07 + cheat + description:Start on level 9 + code:00dd7c/9c+00dd78/08 + cheat + description:Start on level 10 + code:00dd7c/9c+00dd78/09 + cheat + description:Start on level 11 + code:00dd7c/9c+00dd78/0a + cheat + description:Start on level 12 + code:00dd7c/9c+00dd78/0b + cheat + description:Start on level 13 + code:00dd7c/9c+00dd78/0c + cheat + description:Start on level 14 + code:00dd7c/9c+00dd78/0d + cheat + description:Start on level 15 + code:00dd7c/9c+00dd78/0e + cheat + description:Start on level 16 + code:00dd7c/9c+00dd78/0f + cheat + description:Start on level 17 + code:00dd7c/9c+00dd78/10 + cheat + description:Start on level 18 + code:00dd7c/9c+00dd78/11 + cheat + description:Start on level 19 + code:00dd7c/9c+00dd78/12 + cheat + description:Start on level 20 + code:00dd7c/9c+00dd78/13 + cheat + description:Start on level 21 + code:00dd7c/9c+00dd78/14 + cheat + description:Start on level 22 + code:00dd7c/9c+00dd78/15 + cheat + description:Start on level 23 + code:00dd7c/9c+00dd78/16 + cheat + description:Start on level 24 + code:00dd7c/9c+00dd78/17 + cheat + description:Start on level 25 + code:00dd7c/9c+00dd78/18 + cheat + description:Start on level 26 + code:00dd7c/9c+00dd78/19 + cheat + description:Start on level 27 + code:00dd7c/9c+00dd78/1a + cheat + description:Start on level 28 + code:00dd7c/9c+00dd78/1b + cheat + description:Start on level 29 + code:00dd7c/9c+00dd78/1c + cheat + description:Start on level 30 + code:00dd7c/9c+00dd78/1d + cheat + description:Start on level 31 + code:00dd7c/9c+00dd78/1e + cheat + description:Start on level 32 + code:00dd7c/9c+00dd78/1f + cheat + description:Start on level 33 + code:00dd7c/9c+00dd78/20 + cheat + description:Start on level 34 + code:00dd7c/9c+00dd78/21 + cheat + description:Start on level 35 + code:00dd7c/9c+00dd78/22 + cheat + description:Start on level 36 + code:00dd7c/9c+00dd78/23 + cheat + description:Start on level 37 + code:00dd7c/9c+00dd78/24 + cheat + description:Start on level 38 + code:00dd7c/9c+00dd78/25 + cheat + description:Start on level 39 + code:00dd7c/9c+00dd78/26 + cheat + description:Start on level 40 + code:00dd7c/9c+00dd78/27 + cheat + description:Start on level 41 + code:00dd7c/9c+00dd78/28 + cheat + description:Start on level 42 + code:00dd7c/9c+00dd78/29 + cheat + description:Start on level 43 + code:00dd7c/9c+00dd78/2a + cheat + description:Start on level 44 + code:00dd7c/9c+00dd78/2b + cheat + description:Start on level 45 + code:00dd7c/9c+00dd78/2c + cheat + description:Start on level 46 + code:00dd7c/9c+00dd78/2d + cheat + description:Start on level 47 + code:00dd7c/9c+00dd78/2e + cheat + description:Start on level 48 + code:00dd7c/9c+00dd78/2f + cheat + description:Start on level 49 + code:00dd7c/9c+00dd78/30 + cheat + description:Start on level 50 + code:00dd7c/9c+00dd78/31 + cheat + description:Start on level 51 + code:00dd7c/9c+00dd78/32 + cheat + description:Start on level 52 + code:00dd7c/9c+00dd78/33 + cheat + description:Start on level 53 + code:00dd7c/9c+00dd78/34 + cheat + description:Start on level 54 + code:00dd7c/9c+00dd78/35 + cheat + description:Start on level 55 + code:00dd7c/9c+00dd78/36 + cheat + description:Start on level 56 + code:00dd7c/9c+00dd78/37 + cheat + description:Start on level 57 + code:00dd7c/9c+00dd78/38 + cheat + description:Start on level 58 + code:00dd7c/9c+00dd78/39 + cheat + description:Start on level 59 + code:00dd7c/9c+00dd78/3a + cheat + description:Start on level 60 + code:00dd7c/9c+00dd78/3b + cheat + description:Start on level 61 + code:00dd7c/9c+00dd78/3c + cheat + description:Start on level 62 + code:00dd7c/9c+00dd78/3d + cheat + description:Start on level 63 + code:00dd7c/9c+00dd78/3e + cheat + description:Start on level 64 + code:00dd7c/9c+00dd78/3f + cheat + description:Start on level 65 + code:00dd7c/9c+00dd78/40 + cheat + description:Start on level 66 + code:00dd7c/9c+00dd78/41 + cheat + description:Start on level 67 + code:00dd7c/9c+00dd78/42 + cheat + description:Start on level 68 + code:00dd7c/9c+00dd78/43 + cheat + description:Start on level 69 + code:00dd7c/9c+00dd78/44 + cheat + description:Start on level 70 + code:00dd7c/9c+00dd78/45 + cheat + description:Start on level 71 + code:00dd7c/9c+00dd78/46 + cheat + description:Start on level 72 + code:00dd7c/9c+00dd78/47 + cheat + description:Start on level 73 + code:00dd7c/9c+00dd78/48 + cheat + description:Start on level 74 + code:00dd7c/9c+00dd78/49 + cheat + description:Start on level 75 + code:00dd7c/9c+00dd78/4a + cheat + description:Start on level 76 + code:00dd7c/9c+00dd78/4b + cheat + description:Start on level 77 + code:00dd7c/9c+00dd78/4c + cheat + description:Start on level 78 + code:00dd7c/9c+00dd78/4d + cheat + description:Start on level 79 + code:00dd7c/9c+00dd78/4e + cheat + description:Start on level 80 + code:00dd7c/9c+00dd78/4f + cheat + description:Start on level 81 + code:00dd7c/9c+00dd78/50 + cheat + description:Start on level 82 + code:00dd7c/9c+00dd78/51 + cheat + description:Start on level 83 + code:00dd7c/9c+00dd78/52 + cheat + description:Start on level 84 + code:00dd7c/9c+00dd78/53 + cheat + description:Start on level 85 + code:00dd7c/9c+00dd78/54 + cheat + description:Start on level 86 + code:00dd7c/9c+00dd78/55 + cheat + description:Start on level 87 + code:00dd7c/9c+00dd78/56 + cheat + description:Start on level 88 + code:00dd7c/9c+00dd78/57 + cheat + description:Start on level 89 + code:00dd7c/9c+00dd78/58 + cheat + description:Start on level 90 + code:00dd7c/9c+00dd78/59 + cheat + description:Start on level 91 + code:00dd7c/9c+00dd78/5a + cheat + description:Start on level 92 + code:00dd7c/9c+00dd78/5b + cheat + description:Start on level 93 + code:00dd7c/9c+00dd78/5c + cheat + description:Start on level 94 + code:00dd7c/9c+00dd78/5d + cheat + description:Start on level 95 + code:00dd7c/9c+00dd78/5e + cheat + description:Start on level 96 + code:00dd7c/9c+00dd78/5f + cheat + description:Start on level 97 + code:00dd7c/9c+00dd78/60 + cheat + description:Start on level 98 + code:00dd7c/9c+00dd78/61 + cheat + description:Start on level 99 + code:00dd7c/9c+00dd78/62 + cheat + description:Start on level 100 + code:00dd7c/9c+00dd78/63 + cheat + description:Start on level 101 + code:00dd7c/9c+00dd78/64 + cheat + description:Start on level 102 + code:00dd7c/9c+00dd78/65 + cheat + description:Start on level 103 + code:00dd7c/9c+00dd78/66 + cheat + description:Start on level 104 + code:00dd7c/9c+00dd78/67 + cheat + description:Start on level 105 + code:00dd7c/9c+00dd78/68 + cheat + description:Start on level 106 + code:00dd7c/9c+00dd78/69 + cheat + description:Start on level 107 + code:00dd7c/9c+00dd78/6a + cheat + description:Start on level 108 + code:00dd7c/9c+00dd78/6b + cheat + description:Start on level 109 + code:00dd7c/9c+00dd78/6c + cheat + description:Start on level 110 + code:00dd7c/9c+00dd78/6d + cheat + description:Start on level 111 + code:00dd7c/9c+00dd78/6e + cheat + description:Start on level 112 + code:00dd7c/9c+00dd78/6f + cheat + description:Start on level 113 + code:00dd7c/9c+00dd78/70 + cheat + description:Start on level 114 + code:00dd7c/9c+00dd78/71 + cheat + description:Start on level 115 + code:00dd7c/9c+00dd78/72 + cheat + description:Start on level 116 + code:00dd7c/9c+00dd78/73 + cheat + description:Start on level 117 + code:00dd7c/9c+00dd78/74 + cheat + description:Start on level 118 + code:00dd7c/9c+00dd78/75 + cheat + description:Start on level 119 + code:00dd7c/9c+00dd78/76 + cheat + description:Start on level 120 + code:00dd7c/9c+00dd78/77 + cheat + description:Start on level 121 + code:00dd7c/9c+00dd78/78 + cheat + description:Start on level 122 + code:00dd7c/9c+00dd78/79 + cheat + description:Start on level 123 + code:00dd7c/9c+00dd78/7a + cheat + description:Start on level 124 + code:00dd7c/9c+00dd78/7b + cheat + description:Start on level 125 + code:00dd7c/9c+00dd78/7c + cheat + description:Start on level 126 + code:00dd7c/9c+00dd78/7d + cheat + description:Start on level 127 + code:00dd7c/9c+00dd78/7e + cheat + description:Start on level 128 + code:00dd7c/9c+00dd78/7f + cheat + description:Start on level 129 + code:00dd7c/9c+00dd78/80 + cheat + description:Start on level 130 + code:00dd7c/9c+00dd78/81 + +cartridge sha256:6f2dc2486d680fe557ed6e2e7082480aad6537c6a04845bb6a6b8ef5e3d698ef + name:Kamen Rider (Japan) + cheat + description:Invincibility + code:808bb0/ad + cheat + description:Infinite health + code:808bb8/40+808bba/8f+808bbb/6a+808bbc/0c+808bbd/7e + cheat + description:Infinite lives + code:81fd14/cd + cheat + description:Infinite health (alt) + code:7e0c6a/40 + cheat + description:Infinite lives (alt) + code:7e0038/02 + +cartridge sha256:f9ec39546e18b15b8f6a738204d0227c1542cd8157e3e0ea16934e76f39e288c + name:Karura Ou (Japan) + cheat + description:Invincibility + code:7e0065/9e + cheat + description:Infinite health + code:7ef801/04 + cheat + description:Infinite special power + code:7e1f0d/08 + cheat + description:Infinite Warrior Force + code:7e0089/ff + cheat + description:Have 99 gems + code:7e1f0e/63 + cheat + description:Have Aura Attack + code:7e1f0b/01 + cheat + description:Have Comet Flash + code:7e1f0b/02 + cheat + description:Have Lightning Strike + code:7e1f0b/03 + cheat + description:Have Time Stop + code:7e1f0b/04 + cheat + description:Have Star Fire + code:7e1f0b/05 + cheat + description:Have Warrior Force + code:7e1f0b/06 + cheat + description:Have Heal + code:7e1f0b/07 + cheat + description:Have Fiery Phoenix + code:7e1f0b/08 + cheat + description:All enemies frozen + code:7efa60/8d+7efa61/8d+7efa62/8d+7efa63/8d+7efa64/8d+7efa65/8d+7efa66/8d+7efa67/8d+7efa68/8d+7efa69/8d+7efa6a/8d+7efa6b/8d+7efa6c/8d+7efa6d/8d+7efa6e/8d+7efa6f/8d+7efa70/8d+7efa71/8d+7efa72/8d+7efa73/8d+7efa74/8d+7efa75/8d+7efa76/8d+7efa77/8d+7efa78/8d+7efa79/8d+7efa7a/8d+7efa7b/8d+7efa7c/8d+7efa7d/8d+7efa7e/8d+7efa7f/8d + +cartridge sha256:7cc3693cc5e1e834d57795f04b048fab27864a898a9507e7ca383771e2035414 + name:Kawasaki Caribbean Challenge (USA) + cheat + description:Only 1 lap required to qualify instead of 2 + code:00821b/01 + cheat + description:Races are 1 lap instead of 5 + code:00823e/01 + cheat + description:Races are 2 laps + code:00823e/02 + cheat + description:Races are 3 laps + code:00823e/03 + cheat + description:Races are 4 laps + code:00823e/04 + cheat + description:Coming in first is worth 9 points instead of 5 + code:00bdd0/09 + cheat + description:Coming in last is worth 5 points instead of 0 + code:00bdd4/05 + cheat + description:Coming in last is worth 9 points + code:00bdd4/09 + cheat + description:Always advance to the next island regardless of points + code:00b841/80 + cheat + description:Each island requires 3 points instead of 5 + code:00a9d5/03 + cheat + description:Each island requires 4 points + code:00a9d5/04 + cheat + description:Each island requires 6 points + code:00a9d5/06 + cheat + description:Each island requires 7 points + code:00a9d5/07 + cheat + description:Opponents drive erratically - player is guaranteed 1st place + code:00813f/85 + cheat + description:Start the Challenge with the 2nd motorcycle and jet ski + code:00813d/85 + +cartridge sha256:3104d6c06c8909c56f6adb2faecf1b4382f2490370798b605631da926c5306d8 + name:Ken Griffey Jr. Presents Major League Baseball (USA) + cheat + description:Can't strike out + code:8491fd/ad + cheat + description:No outs except strike outs + code:84c8d1/ad+84c8ce/ad + cheat + description:Can't walk a player + code:8491e3/a9 + cheat + description:Invisible baserunners + code:80da37/01 + cheat + description:2 outs and whole team is out + code:80a5ed/02 + cheat + description:1 ball and you walk + code:80a5ed/01 + cheat + description:2 balls and you walk + code:80a5ed/02 + cheat + description:1 strike and you're out + code:80a5f5/01 + cheat + description:2 strikes and you're out + code:80a5f5/02 + cheat + description:Computer can't score + code:80bfc7/ad + cheat + description:Computer can't score + code:849c4d/a9 + cheat + description:Computer can't score + code:80bfe8/ad + +cartridge sha256:b16661d5151d73cea5ac46d7c899531c7b2cdee2558092c23a5460c8092b80b8 + name:Kendo Rage (USA) + cheat + description:Invincibility + code:7e1476/03 + cheat + description:Infinite HP + code:7e148e/40 + cheat + description:Infinite lives + code:7e0ce2/03 + cheat + description:Infinite PSY power + code:7e148a/40 + cheat + description:Multi-jump + code:1f8cda/00 + cheat + description:Have 9 Yellow Balls + code:7e1494/09 + cheat + description:Have Triple Shot + code:7e1492/00 + cheat + description:Have Multi-Attack + code:7e1492/08 + cheat + description:Have Flame Shot + code:7e1492/10 + cheat + description:Start on round 1 - Cliff Hanger + code:7e0ce4/00 + cheat + description:Start on round 2 - Ice Queen + code:7e0ce4/01 + cheat + description:Start on round 3 - The Pond + code:7e0ce4/02 + cheat + description:Start on round 4 - Technodvne + code:7e0ce4/03 + cheat + description:Start on round 5 - The Commute + code:7e0ce4/04 + cheat + description:Start on round 6 - Triathalon + code:7e0ce4/05 + cheat + description:Start on round 7 - School Daze + code:7e0ce4/06 + +cartridge sha256:914652f72d6ceb83b8b43414d6c42581ec12e9b3f45259b8b2768d26b8d4f073 + name:Kid Klown in Crazy Chase (USA) + cheat + description:Infinite health + code:80dd52/ad + cheat + description:Infinite continues + code:84edb7/ad + +cartridge sha256:317e25d731bbfec30bfdc5fbe4ed825cd08613a4d62d98247bae5ec85783074c + name:Kidou Butouden G Gundam (Japan) + cheat + description:Infinite health + code:7e07d4/80 + +cartridge sha256:1b50f8aa5ae75c4b01e237b29b0a1ec1f1f809bdbe76a23d9c204541ccbf403d + name:Kidou Senshi V Gundam (Japan) + cheat + description:Infinite health + code:7e0522/69 + cheat + description:One hit kills + code:7e06a2/00+7e0822/00 + cheat + description:Infinite lives + code:7e0306/63 + +cartridge sha256:a1c04fc26c65a6ae3c3a496410290e7f437d19ac24a930286521ce04c887212a + name:Kidou Soukou Dion (Japan) + cheat + description:Invincibility (blinking) + code:7e0a50/4c + cheat + description:Infinite health + code:7e0b48/05 + cheat + description:Infinite bombs + code:7e0b14/09 + +cartridge sha256:2b27e9bceb646a300566248fcdcbd582435f50bd6132b0f0025cc146a9d62bd9 + name:Kikou Keisatsu Metal Jack (Japan) + cheat + description:Invincibility + code:00bfba/f0 + cheat + description:Infinite health + code:18b7e6/a5 + cheat + description:Infinite lives + code:00c33e/a5 + cheat + description:Infinite health (alt) + code:7e0060/31 + cheat + description:Infinite lives (alt) + code:7e0061/09 + cheat + description:Infinite time + code:7e0031/06+7e0032/00 + cheat + description:Infinite ammo + code:7e006b/63 + cheat + description:Moon-jump + code:7e005f/01 + cheat + description:Moon-jump when attacking + code:7e0072/20 + cheat + description:Can't walk + code:7e006c/03 + +cartridge sha256:7a5261f1a5e84b67483c79fb002ce1539f2360f88333bda60f12e617d86e0def + name:Killer Instinct (USA) (Rev 1) + cheat + description:Invincibility - P1 + code:809f95/e0+809f99/c3+809f96/00+809f98/f0 + cheat + description:Hit anywhere - P1 + code:809f82/4c+809f83/ac+809f84/a1+809f81/0d+809f80/f0 + cheat + description:Infinite health - P1 + code:7e0d24/78+7e0d26/78 + cheat + description:Infinite health - P2 + code:7e0d28/78+7e0d2a/78 + cheat + description:No health - P1 + code:7e0d24/00+7e0d26/00 + cheat + description:No health - P2 + code:7e0d28/00+7e0d2a/00 + cheat + description:One button finishes and humiliations + code:80b229/00 + cheat + description:Enable finishes during round + code:80b3ef/24+80b3f4/24+80b3fe/24+80b406/24+80b408/c9 + cheat + description:CPU cannot move from starting position + code:7e0e08/01 + cheat + description:CPU cannot perform special or danger moves + code:80d5cd/a9+80d5ce/00 + cheat + description:Play as Eyedol + code:7e024e/0a + +cartridge sha256:618a23636e07110e094277ec1d1e60c3620a6e9a5f386292808267593fa803ad + name:Killer Instinct (USA) + cheat + description:Master code - must be entered + code:008468/ea + cheat + description:Invincibility - P1 + code:809f8a/e0+809f8e/c3+809f8b/00+809f8d/f0 + cheat + description:Hit anywhere - P1 + code:809f77/4c+809f79/a1+809f78/a1+809f76/0d+809f75/f0 + cheat + description:One button finishes and humiliations + code:80b222/00 + cheat + description:Enable finishes during round + code:80b3e3/24+80b3e8/24+80b3f2/24+80b3fa/24+80b3fc/c9 + cheat + description:CPU cannot perform special or danger moves + code:80d624/a9+80d625/00 + cheat + description:P1 takes all damage + code:80a76b/ff + cheat + description:Always fight Jago + code:808d7a/ad+83f48c/84 + cheat + description:Always fight Combo + code:808d7a/ad+83f48c/8f + cheat + description:Always fight Thunder + code:808d7a/ad+83f48c/89 + cheat + description:Always fight Glacius + code:808d7a/ad+83f48c/81 + cheat + description:Always fight Cinder + code:808d7a/ad+83f48c/80 + cheat + description:Always fight Orchid + code:808d7a/ad+83f48c/82 + cheat + description:Always Fight Riptor + code:808d7a/ad+83f48c/94 + cheat + description:Always fight Sabrewulf + code:808d7a/ad+83f48d/a9 + cheat + description:Always fight Spinal + code:808d7a/ad+83f4ad/a9 + cheat + description:Always fight Fulgore + code:808d7a/ad+83f4b2/a9 + cheat + description:Always fight Eyedol + code:808d7a/ad+83f4b7/a9 + cheat + description:Infinite health - P1 + code:7e0d24/78+7e0d26/78 + cheat + description:Infinite health - P2 + code:7e0d28/78+7e0d2a/78 + cheat + description:No health - P1 + code:7e0d24/00+7e0d26/00 + cheat + description:No health - P2 + code:7e0d28/00+7e0d2a/00 + cheat + description:CPU cannot move from starting position + code:7e0e08/01 + cheat + description:Play as Eyedol + code:7e024e/0a + +cartridge sha256:1b58d0aed4510811c73d267244a7e915aa0b334c86e68f3fa5883f5cb534e4d7 + name:King Arthur & The Knights of Justice (USA) + cheat + description:Infinite health + code:848998/b9 + cheat + description:Infinite attack power + code:80950b/ee+80955e/ee + cheat + description:Infinite healing herbs + code:82b8c3/ad + cheat + description:Start with 99 healing herbs + code:80fb8c/62 + cheat + description:Start with 99 shield attacks + code:80fb9e/62 + +cartridge sha256:aca9eb59d6783e2cae3787c69053888fea98f5dfe4c8af8b5a6360e0afb3b5d7 + name:King Arthur's World (USA) + cheat + description:Infinite men - if you have at least one of that type + code:04c6bb/bf+04c6a7/bf + cheat + description:Infinite spells - must have at least one to use + code:0e9aa3/bf + cheat + description:Start with 4 of each type of spell + code:0df6f0/a2+0df6f1/30+0df6f2/02 + cheat + description:Start with many men + code:01fe99/a9+01fe9a/14+01fe9b/00 + cheat + description:Start on training level 2 + code:0e8062/17 + cheat + description:Start on training level 3 + code:0e8062/19 + cheat + description:Start on training level 4 + code:0e8062/16 + cheat + description:Start on training level 5 + code:0e8062/1d + cheat + description:Start on training level 6 + code:0e8062/1e + cheat + description:Start on training level 7 + code:0e8062/1f + cheat + description:Start on training level 8 + code:0e8062/20 + cheat + description:Start on training level 9 + code:0e8062/1a + cheat + description:Start on real world level 1 + code:0e8062/01 + cheat + description:Start on real world level 2 + code:0e8062/02 + cheat + description:Start on real world level 3 + code:0e8062/03 + cheat + description:Start on real world level 4 + code:0e8062/04 + cheat + description:Start on goblin underworld level 1 + code:0e8062/05 + cheat + description:Start on goblin underworld level 2 + code:0e8062/06 + cheat + description:Start on goblin underworld level 3 + code:0e8062/07 + cheat + description:Start on goblin underworld level 4 + code:0e8062/08 + cheat + description:Start on cloud world level 1 + code:0e8062/0c + cheat + description:Start on cloud world level 2 + code:0e8062/0d + cheat + description:Start on cloud world level 3 + code:0e8062/0e + cheat + description:Start on cloud world level 4 + code:0e8062/0f + cheat + description:Start on cloud world level 5 + code:0e8062/10 + cheat + description:Start on cloud world level 6 + code:0e8062/11 + cheat + description:Start on cloud world level 7 + code:0e8062/12 + +cartridge sha256:6638b5541059814d4c34574e5e277ef613aebf81c91d3def557a7642fb5840e1 + name:King of Dragons (USA) + cheat + description:Invincibility - both players + code:c0378b/f0 + cheat + description:Infinite health - both players + code:c09074/a5 + cheat + description:Infinite time + code:c043f5/00 + cheat + description:Infinite credits + code:c04275/af + cheat + description:One hit kills + code:c08b56/24+c08b58/24 + cheat + description:Hit anywhere + code:c08a63/80+c08a2f/80+c08a8f/80+c089f8/80+c089f1/80 + cheat + description:Enable 2-Player same character cheat + code:c12376/f0 + cheat + description:Start with level 6 Sword + code:c07369/8e+c07370/85 + cheat + description:Start with level 6 Shield + code:c0737f/8e+c07386/85 + cheat + description:Invincibility (blinking) - P1 + code:7e0bb4/ff + cheat + description:Invincibility (blinking) - P2 + code:7e0cb4/ff + cheat + description:Infinite health - P1 + code:7e0b9a/09 + cheat + description:Infinite health - P2 + code:7e0c9a/09 + cheat + description:Max attack - P1 + code:7e0bee/07 + cheat + description:Max attack - P2 + code:7e0cee/07 + cheat + description:Max defense - P1 + code:7e0bf0/07 + cheat + description:Max defense - P2 + code:7e0cf0/07 + cheat + description:Infinite lives - P1 + code:7e0bec/09 + cheat + description:Infinite lives - P2 + code:7e0cec/09 + cheat + description:Infinite time (alt) + code:7e1f94/98 + cheat + description:Infinite time for player select screen + code:7e5c24/0a + cheat + description:Start on stage 2 - Treasure In An Old Castle + code:7e0658/01 + cheat + description:Start on stage 3 - Battle On Mountain Peak + code:7e0658/02 + cheat + description:Start on stage 4 - Cave Of Hydra + code:7e0658/03 + cheat + description:Start on stage 5 - To The Norde Isle + code:7e0658/04 + cheat + description:Start on stage 6 - The Giant In The Shrine + code:7e0658/05 + cheat + description:Start on stage 7 - Trent Woods + code:7e0658/06 + cheat + description:Start on stage 8 - To The Castle + code:7e0658/07 + cheat + description:Start on stage 9 - In The Castle + code:7e0658/08 + cheat + description:Start on stage 10 - Underpass + code:7e0658/09 + cheat + description:Start on stage 11 - Battle In The Front + code:7e0658/0a + cheat + description:Start on stage 12 - Castle Garenos + code:7e0658/0b + cheat + description:Start on stage 13 - Dark Wizard + code:7e0658/0c + cheat + description:Start on stage 14 - A Cave In The Woods + code:7e0658/0d + cheat + description:Start on stage 15 - Underground Labyrinth + code:7e0658/0e + cheat + description:Start on stage 16 - Golden Limestone Cave + code:7e0658/0f + +cartridge sha256:1135858a1ce686a0a163bb0e6f3a4d7cd71c0cd56efbc79677372f2624cf2306 + name:King of the Monsters (USA) + cheat + description:Faster timer + code:11c81f/17 + cheat + description:Slower timer + code:01c817/60 + cheat + description:3 power points needed to get to next power level + code:01c963/03 + cheat + description:Start with less health - P1 + code:009fd6/80 + cheat + description:Start with less health - P2 + code:00a82e/80 + cheat + description:Infinite health - P1 + code:7e0a50/ff + cheat + description:No health - P2 + code:7e0b40/00 + cheat + description:Infinite time - minutes + code:7e29f3/09 + cheat + description:Infinite time - seconds + code:7e29f2/54 + +cartridge sha256:a9729d049ce580839bbfef1836a13dc16f2fc934d203ebf7390e0b1c47ea9a2d + name:King of the Monsters 2 (USA) + cheat + description:Infinite health + code:7e1a3a/18 + cheat + description:Infinite lives + code:7e09cc/03 + cheat + description:Infinite time + code:7e0942/69 + cheat + description:Always have 2 power-ups + code:7e1cb4/02 + +cartridge sha256:4e095fbbdec4a16b075d7140385ff68b259870ca9e3357f076dfff7f3d1c4a62 + name:Kirby Super Star (USA) + cheat + description:Infinite health + code:01fbd2/8d + cheat + description:Infinite lives + code:0387e5/ad + cheat + description:Always have invincibility + code:3035f1/0a + cheat + description:Infinite health (friend) + code:40137e/30 + +cartridge sha256:67937dd7a29a93b1aaabb6df89f0748369ff47f3f6c655a402c00d5657973140 + name:Kirby's Avalanche (USA) + cheat + description:Boulder warnings don't appear + code:88c2ba/b4 + cheat + description:CPU gets all the boulders + code:88c2d0/ce+88c2d2/07+88c2d1/52 + cheat + description:Only red blobs fall + code:888e4f/a9+888e50/00+888e51/00 + cheat + description:Only yellow blobs fall + code:888e4f/a9+888e50/01+888e51/01 + cheat + description:Only green blobs fall + code:888e4f/a9+888e50/03+888e51/03 + cheat + description:Only purple blobs fall + code:888e4f/a9+888e50/04+888e51/04 + cheat + description:Only blue blobs fall + code:888e4f/a9+888e50/05+888e51/05 + cheat + description:Only red and yellow blobs fall + code:888e4f/a9+888e50/00+888e51/01 + cheat + description:Only red and green blobs fall + code:888e4f/a9+888e50/00+888e51/03 + cheat + description:Only red and purple blobs fall + code:888e4f/a9+888e50/00+888e51/04 + cheat + description:Only red and blue blobs fall + code:888e4f/a9+888e50/00+888e51/05 + cheat + description:Only red blobs with a boulder fall + code:888e4f/a9+888e50/00+888e51/06 + cheat + description:Only yellow and red blobs fall + code:888e4f/a9+888e50/01+888e51/00 + cheat + description:Only yellow and green blobs fall + code:888e4f/a9+888e50/01+888e51/03 + cheat + description:Only yellow and purple blobs fall + code:888e4f/a9+888e50/01+888e51/04 + cheat + description:Only yellow and blue blobs fall + code:888e4f/a9+888e50/01+888e51/05 + cheat + description:Only yellow blobs with a boulder fall + code:888e4f/a9+888e50/01+888e51/06 + cheat + description:Only green and yellow blobs fall + code:888e4f/a9+888e50/03+888e51/01 + cheat + description:Only green and red blobs fall + code:888e4f/a9+888e50/03+888e51/00 + cheat + description:Only green and purple blobs fall + code:888e4f/a9+888e50/03+888e51/04 + cheat + description:Only green and blue blobs fall + code:888e4f/a9+888e50/03+888e51/05 + cheat + description:Only green blobs with a boulder fall + code:888e4f/a9+888e50/03+888e51/06 + cheat + description:Only purple and yellow blobs fall + code:888e4f/a9+888e50/04+888e51/01 + cheat + description:Only purple and green blobs fall + code:888e4f/a9+888e50/04+888e51/03 + cheat + description:Only purple and red blobs fall + code:888e4f/a9+888e50/04+888e51/00 + cheat + description:Only purple and blue blobs fall + code:888e4f/a9+888e50/04+888e51/05 + cheat + description:Only purple blobs with a boulder fall + code:888e4f/a9+888e50/04+888e51/06 + cheat + description:Only blue and yellow blobs fall + code:888e4f/a9+888e50/05+888e51/01 + cheat + description:Only blue and green blobs fall + code:888e4f/a9+888e50/05+888e51/03 + cheat + description:Only blue and purple blobs fall + code:888e4f/a9+888e50/05+888e51/04 + cheat + description:Only blue and red blobs fall + code:888e4f/a9+888e50/05+888e51/00 + cheat + description:Only blue blobs with a boulder fall + code:888e4f/a9+888e50/05+888e51/06 + cheat + description:Only a boulder and yellow blobs fall + code:888e4f/a9+888e50/06+888e51/01 + cheat + description:Only a boulder and green blobs fall + code:888e4f/a9+888e50/06+888e51/03 + cheat + description:Only a boulder and purple blobs fall + code:888e4f/a9+888e50/06+888e51/04 + cheat + description:Only a boulder and blue blobs fall + code:888e4f/a9+888e50/06+888e51/05 + cheat + description:Only a boulder and red blobs fall + code:888e4f/a9+888e50/06+888e51/00 + cheat + description:Only boulders fall + code:888e4f/a9+888e50/06+888e51/06 + cheat + description:Disable the next box + code:889030/a9+889032/ea+889035/a9+889037/ea + +cartridge sha256:0f984dc5fe8293f75e3b8fad98b0cb564706d9b1e3902b56415aa399c2d4df2b + name:Kirby's Dream Course (USA) + cheat + description:Infinite Strawberries + code:83ac12/bd + cheat + description:Don't lose a life from falling out of bounds + code:80f8d0/bd + cheat + description:Don't ever gain any Strawberries + code:83ac01/bd + cheat + description:Start with 5 lives + code:80c056/04 + cheat + description:Start with 7 lives + code:80c056/06 + cheat + description:Start with 9 lives + code:80c056/08 + cheat + description:Start with 1 Strawberry + code:80c105/01 + cheat + description:Start with 2 Strawberries + code:80c105/02 + cheat + description:Start with 3 Strawberries + code:80c105/03 + cheat + description:Infinite Tomatoes + code:83ac12/bd + +cartridge sha256:b50bf9d95485e8aeb7a6730e9f9f9c9c4ec23a85b336a4fb2e3b63034531e36f + name:Kirby's Dream Land 3 (USA) + cheat + description:Always have Invincibility - Kirby + code:4054b2/01 + cheat + description:Infinite life - Kirby + code:4039d1/0a + cheat + description:Infinite life - Partner + code:4039d3/08 + cheat + description:Infinite lives + code:4039cf/0a + cheat + description:Infinite Mouth Shot + code:4054ed/02 + cheat + description:Always have No Mouth power + code:4054a9/00 + cheat + description:Always have Fireball Mouth power + code:4054a9/01 + cheat + description:Always have Stone Mouth power + code:4054a9/02 + cheat + description:Always have Ice Mouth power + code:4054a9/03 + cheat + description:Always have Needle Mouth power + code:4054a9/04 + cheat + description:Always have Broom Mouth power + code:4054a9/05 + cheat + description:Always have Parasol Mouth power + code:4054a9/06 + cheat + description:Always have Spark Mouth power + code:4054a9/07 + cheat + description:Always have Boomerang Mouth power + code:4054a9/08 + cheat + description:Have all level 1 Stars + code:4053a7/01+4053a8/01+4053a9/01+4053aa/01+4053ab/01+4053ac/01 + cheat + description:Have all level 2 Stars + code:4053ae/01+4053af/01+4053b0/01+4053b1/01+4053b2/01+4053b3/01 + cheat + description:Have all level 3 Stars + code:4053b5/01+4053b6/01+4053b7/01+4053b8/01+4053b9/01+4053ba/01 + cheat + description:Have all level 4 Stars + code:4053bc/01+4053bd/01+4053be/01+4053bf/01+4053c0/01+4053c1/01 + cheat + description:Have all level 5 Stars + code:4053c3/01+4053c4/01+4053c5/01+4053c6/01+4053c7/01+4053c8/01 + cheat + description:Start a new game with 9 lives + code:00ba78/0a + cheat + description:Start a new game with 25 lives + code:00ba78/1a + cheat + description:Start a new game with 98 lives + code:00ba78/63 + +cartridge sha256:fb601ead645edce139b0483d3155b4e3d7ab245bf87a3a66cb88c0a617c0a526 + name:Knights of the Round (USA) + cheat + description:Invincibility + code:81d714/f0 + cheat + description:More invincibility time after successful block + code:82daac/ff + cheat + description:Infinite health + code:81dc52/b9 + cheat + description:Almost infinite health + code:81dc50/24+81ddd0/24 + cheat + description:Maximum health from most food + code:84c50e/00 + cheat + description:Infinite lives + code:82dc36/b9 + cheat + description:Infinite time + code:8084af/ad + cheat + description:One hit kills + code:81df3f/24+81e2be/24+81e0ee/24 + cheat + description:No health lost from special move + code:82d3c9/00 + cheat + description:No health lost from special move (alt) + code:82d3cb/b9 + cheat + description:Less health lost from special move + code:82d3c9/06 + cheat + description:More health lost from special move + code:82d3c9/14 + cheat + description:Super-jump - Arthur + code:82a550/0c + cheat + description:Super-jump - Lancelot + code:82a54c/0c + cheat + description:Super-jump - Percival + code:82a554/0c + cheat + description:Slower timer + code:80849f/60 + cheat + description:Faster timer + code:80849f/1e + cheat + description:Enable hidden options screen in the options menu + code:80c168/20+80c169/b2+80c16a/c9+80c9b8/60 + cheat + description:Start on stage 2 + code:81b86a/ea+81b86b/a9+81b86c/01 + cheat + description:Start on stage 3 + code:81b86a/ea+81b86b/a9+81b86c/02 + cheat + description:Start on stage 4 + code:81b86a/ea+81b86b/a9+81b86c/03 + cheat + description:Start on stage 5 + code:81b86a/ea+81b86b/a9+81b86c/04 + cheat + description:Start on stage 6 + code:81b86a/ea+81b86b/a9+81b86c/05 + cheat + description:Invincibility (blinking) - P1 + code:7e4136/02 + cheat + description:Invincibility (blinking) - P2 + code:7e4336/02 + cheat + description:Infinite health (alt) + code:7e4008/50 + cheat + description:Infinite time (alt) + code:7e0c4a/59 + cheat + description:Quick level gain - P1 + code:7e4149/00+7e414a/00+7e414b/00+7e414c/00 + cheat + description:Quick level gain - P2 + code:7e4349/00+7e434a/00+7e434b/00+7e434c/00 + +cartridge sha256:6a37a20a4880b9ec38b1b7e17e42ea93a1bf826630ccbe5f8257f0d928f13953 + name:Kouryuu no Mimi (Japan) + cheat + description:Infinite health + code:848907/a9+848908/40+848909/00+84890c/8d + cheat + description:Infinite health (alt) + code:7e09c0/40 + cheat + description:Infinite Ring power + code:7e008c/20 + +cartridge sha256:e36322697c48baae6492db91e6cbf3844a420f6e0cc8a75f3a73556026ddbbb8 + name:Krusty's Super Fun House (USA) (Rev 1) + cheat + description:Infinite lives + code:7e11a3/03 + cheat + description:Infinite weapons + code:7e032c/0a + +cartridge sha256:bed18c968aee0eb0c866c1964c28135364cd6d65fff7bcb5873342c04e63750d + name:Krusty's Super Fun House (USA) + cheat + description:Invincibility - Krusty + code:00d972/b3 + cheat + description:Infinite Custard Pies + code:00f06c/a6 + cheat + description:Infinite Superballs + code:00f0de/a6 + cheat + description:Infinite lives + code:008d77/ad + cheat + description:Custard Pie bonus worth 2 pies instead of 10 + code:00ee0c/02 + cheat + description:Custard Pie bonus worth 5 pies + code:00ee0c/05 + cheat + description:Custard Pie bonus same as Superball bonus (disable is game freezes) + code:00ee0e/04 + cheat + description:Superball bonus worth 2 balls instead of 5 (disable is game freezes) + code:00ee16/02 + cheat + description:Superball bonus worth 10 balls (disable is game freezes) + code:00ee16/0a + cheat + description:Superball bonus same as Custard Pie bonus (disable is game freezes) + code:00ee13/80+00ee14/f4 + cheat + description:Food bonuses restore less strength + code:00edf9/07 + cheat + description:Food bonuses restore more strength + code:00edf9/1e + cheat + description:Food bonuses restore Krusty to full strength + code:00edf9/63 + cheat + description:Food bonuses also get Custard Pie bonus + code:00ee04/04 + cheat + description:Food bonuses also get Superball bonus + code:00ee04/0e + cheat + description:Doll bonus same as Custard Pie bonus + code:00ee22/e6+00ee21/80 + cheat + description:Doll bonus same as Superball bonus + code:00ee22/f0+00ee21/80 + cheat + description:Doll bonus same as food bonus + code:00ee22/d1+00ee21/80 + cheat + description:Jump higher - Krusty + code:00e8ad/10 + cheat + description:Jump much higher - Krusty + code:00e8ad/08 + cheat + description:Start with section 1 finished + code:00867c/00+00867d/80+00867e/05 + cheat + description:Start with section 2 finished + code:00867c/01+00867d/80+00867e/05 + cheat + description:Start with section 3 finished + code:00867c/02+00867d/80+00867e/05 + cheat + description:Start with section 4 finished + code:00867c/03+00867d/80+00867e/05 + cheat + description:Start with access to all sections + code:00867c/04+00867d/80+00867e/05 + cheat + description:Start with 1 life instead of 3 + code:0088ad/01 + cheat + description:Start with 2 lives + code:0088ad/02 + cheat + description:Start with 5 lives + code:0088ad/05 + cheat + description:Start with 7 lives + code:0088ad/07 + cheat + description:Start with 9 lives + code:0088ad/09 + cheat + description:Start with 0 Custard Pies + code:00889e/00 + cheat + description:Start with 2 Custard Pies + code:00889e/02 + cheat + description:Start with 5 Custard Pies + code:00889e/05 + cheat + description:Start with 2 Superballs instead of 10 Custard Pies + code:00889e/02+0088a3/01 + cheat + description:Start with 5 Superballs + code:00889e/05+0088a3/01 + cheat + description:Start with 10 Superballs + code:0088a3/01 + +cartridge sha256:46c811f0cacffe8f20e1d63072d25d7c47e9bb3fd5124851fd05aca9884d21fb + name:Lagoon (USA) + cheat + description:HP always recovers instantly + code:019147/a9+019148/ff + cheat + description:MP always recovers instantly + code:01914f/a9+019150/ff + cheat + description:Save always available + code:02bec7/80+02bec8/13 + cheat + description:Pit death disabled + code:01c958/60 + cheat + description:Hit anywhere + code:01b628/00 + cheat + description:Get 1 gold for each creature killed + code:01947e/69+01947f/01+019480/ea + cheat + description:Get 100 gold for each creature killed + code:01947e/69+01947f/64+019480/ea + cheat + description:Get 200 gold for each creature killed + code:01947e/69+01947f/c8+019480/ea + cheat + description:Start with 0 STR + code:02d9ec/00 + cheat + description:Start with 100 STR + code:02d9ec/64 + cheat + description:Start with 255 STR + code:02d9ec/ff + cheat + description:Start with 0 DEF + code:02d9fb/00 + cheat + description:Start with 100 DEF + code:02d9fb/64 + cheat + description:Start with 255 DEF + code:02d9fb/ff + cheat + description:Start with 999 DEF + code:02d9fc/f6+02d9fb/17 + cheat + description:Start with 612 gold + code:02da02/02 + cheat + description:Start with 1,380 gold + code:02da02/05 + cheat + description:Start with 2,148 gold + code:02da02/08 + cheat + description:Start with 8,292 gold + code:02da02/20 + cheat + description:Start with 22,116 gold + code:02da02/56 + cheat + description:Start with 65,380 gold + code:02da02/ff + cheat + description:Start on level 2, MP = 8/8, HP = 17/17, EXP = 0/40 + code:02d9d9/02 + cheat + description:Start on level 3, MP = 10/10, HP = 23/23, EXP = 0/90 + code:02d9d9/03 + cheat + description:Start on level 4, MP = 12/12, HP = 28/28, EXP = 0/170 + code:02d9d9/04 + cheat + description:Start on level 5, MP = 19/19, HP =36/36, EXP = 0/280 + code:02d9d9/05 + cheat + description:Start on level 241, HP = 255, MP = 255, EXP = 22859, walk at a regular speed + code:02d9d9/f1 + cheat + description:Start on level 242, HP = 220, MP = 221, EXP = 30560, walk at a medium speed + code:02d9d9/f2 + cheat + description:Infinite HP + code:7e0520/ff + cheat + description:Infinite MP + code:7e0522/ff + cheat + description:Have all equipment and magic + code:7e04d0/ff+7e04d1/ff+7e04d2/ff+7e04d3/f8 + cheat + description:Have all items + code:7e04d4/ff+7e04d5/ff+7e04d6/ff+7e04d7/80 + cheat + description:Shop item 1 free + code:7e045c/00+7e045d/00 + cheat + description:Shop item 2 free + code:7e045e/00+7e045f/00 + cheat + description:Shop item 3 free + code:7e0460/00+7e0461/00 + cheat + description:Max EXP + code:7e052a/ff+7e052b/ff + cheat + description:Max level (level 35) + code:7e052c/23 + cheat + description:Max STR + code:7e0525/02 + cheat + description:Max DEF + code:7e0527/02 + cheat + description:Max Gold + code:7e0529/ff + +cartridge sha256:48cd9476fef1ed685b9c30dd1669b46048f7295cbbb2abcfa5b1a48699346ea3 + name:Lamborghini American Challenge (USA) + cheat + description:Always finish first + code:8afe82/00+8afe84/02+8a8a4e/fe+8afe89/16+8afe86/1a+8afe8a/60+8afe83/d0+8a8a4c/20+8afe88/7e+8afe85/7b+8a8a4d/80+8afe80/c0+8afe87/99+8afe81/00 + cheat + description:Don't take damage in races + code:80bf68/b9 + cheat + description:Free turbos + code:8cd3cc/ad + cheat + description:Repair 10% of car for $100 + code:8cd626/ad + cheat + description:Repair 10% of car for free + code:8cd629/ee + cheat + description:Turbos for $1000 + code:8cd3ba/0a+8cd3bb/00 + cheat + description:Turbos for $2000 + code:8cd3ba/14+8cd3bb/00 + cheat + description:Start with 6-speed transmission + code:8a845b/06 + cheat + description:Start with $128,000 + code:8080f9/00+8080fa/05 + cheat + description:Start with $88,000 + code:8080f9/70+8080fa/03 + cheat + description:Start with $12,800 + code:8080f9/80 + cheat + description:Always finish first (alt) + code:7e167e/01 + cheat + description:Infinite money + code:7e0d21/ff+7e0d22/ff + cheat + description:Infinite Boost + code:7e0ddd/09 + +cartridge sha256:314d53f409b66ba3f4426a6f1bb7c69f6779aeed277ce2e19535f94d7c8ca586 + name:Last Action Hero (USA) + cheat + description:Invincibility + code:80c119/8d + cheat + description:Infinite health + code:80c142/ad + cheat + description:Infinite time + code:809517/ad + cheat + description:Infinite lives + code:80a497/cd + cheat + description:Invincibility (blinking) + code:7e03b7/ff + cheat + description:Infinite health (alt) + code:7e031f/ff + cheat + description:Infinite time (alt) + code:7e0315/99 + cheat + description:Infinite lives (alt) + code:7e0316/04 + cheat + description:Hit anywhere continually + code:80d4d9/24+80d4ed/24 + cheat + description:One hit kills - enemy 1 + code:7e0822/00 + cheat + description:One hit kills - enemy 2 + code:7e0880/00 + cheat + description:One hit kills - enemy 3 + code:7e08de/00 + cheat + description:Start on stage 2 + code:7e030f/02 + cheat + description:Start on stage 3 + code:7e030f/03 + cheat + description:Start on stage 4 + code:7e030f/04 + cheat + description:Start on stage 5 + code:7e030f/05 + +cartridge sha256:a179a1188220b59787c49a78a0dde79b89380e3a8a8a0ab558f0102c5796f873 + name:Lawnmower Man, The (USA) + cheat + description:Invincible in Cyber Run level + code:8289bf/ad + cheat + description:Invincible in Cyber Tube level + code:828ac2/ad + cheat + description:Invincible in Cyber Jobe level + code:81dde0/ad + cheat + description:Invincible in Cyber Space level + code:86c8dd/ad + cheat + description:Infinite lives + code:8091f3/24 + cheat + description:After you die, your main weapon is fully powered up from then on + code:809273/04+809272/a9 + cheat + description:Super-jump + code:809c84/fa + cheat + description:Energize icon effect lasts 2x longer + code:80b77e/03 + cheat + description:Energize icon effect lasts 4x longer + code:80b77e/05 + cheat + description:Bitstream powers up instantly (don't shoot too many bitstreams at once) + code:809896/06 + cheat + description:Keep weapon power ups once gained + code:809273/00 + cheat + description:Never lose homing bullets once gained + code:809237/af + cheat + description:Never lose rear bullets once gained + code:809233/af + +cartridge sha256:c7814cee0fc95d6422cf19a3dc8c9a65b60f6f56da75f09cebea02cc5f99261b + name:Legend (USA) + cheat + description:Invincibility + code:80c387/8d+80c388/d5+80c389/13 + cheat + description:Infinite health + code:81f59d/ad + cheat + description:Infinite time + code:80e110/ad + cheat + description:Infinite lives + code:80bd50/ad + cheat + description:One hit kills + code:81a68a/24+81b566/24 + cheat + description:Hit anywhere + code:81f32f/24+81f30c/24+81f340/24+81f347/24+81f304/80+81f313/80 + cheat + description:Infinite health - P1 + code:7e130d/08 + cheat + description:Infinite magic - P1 + code:7e1315/09 + cheat + description:Infinite lives - P1 + code:7e1309/09 + cheat + description:Infinite time (alt) + code:7e15ef/09 + cheat + description:Infinite Keys - P1 + code:7e12f1/63 + +cartridge sha256:c865fb17e8c59a21d32b9a605319241fa74ec732e3f0ee58f5d7fcbd8ee57c6b + name:Legend of the Mystical Ninja, The (USA) + cheat + description:Invincibility + code:00b767/24 + cheat + description:Infinite health + code:05a51f/b5 + cheat + description:Infinite lives - top-view + code:00cb8e/ea + cheat + description:Hit anywhere - top view + code:03b581/24+03b20d/24 + cheat + description:Hit anywhere - side view + code:03b16d/24+03b552/24 + cheat + description:Collect items from anywhere - top view + code:03b505/24 + cheat + description:Don't lose most weapons when hit + code:05a548/24 + cheat + description:Pick-up more coins from enemies + code:03cc12/50 + cheat + description:No coins used up when thrown + code:00f808/00 + cheat + description:Faster timer + code:0593f7/14 + cheat + description:Slower timer + code:0593f7/60 + cheat + description:Die after one hit + code:05a51b/00 + cheat + description:Start with 6 lives + code:00db3a/05 + cheat + description:Start with 9 lives + code:00db3a/08 + cheat + description:Invincibility - P1 + code:7e0592/02 + cheat + description:Infinite health - P1 + code:7e1ab2/10 + cheat + description:Infinite money - P1 + code:7e1aac/99+7e1aad/99+7e1aae/09 + cheat + description:Infinite lives - P1 + code:7e1ab0/04 + cheat + description:Have Jutsu technique 1 + code:7e1ad6/01 + cheat + description:Have Jutsu technique 2 + code:7e1ad8/01 + cheat + description:Have Jutsu technique 3 + code:7e1ada/01 + cheat + description:Have Jutsu technique 4 + code:7e1adc/01 + cheat + description:Have 1st upgraded weapon + code:7e1ab6/01+7e1ab8/01 + cheat + description:Have 2nd upgraded weapon + code:7e1ab6/02+7e1ab8/02 + cheat + description:Infinite Bombs + code:7e1aba/30 + cheat + description:Have Gold Helmet + code:7e1ae0/08 + cheat + description:Have Iron Helmet + code:7e1ae2/06 + cheat + description:Have Straw Hat + code:7e1ae4/04 + cheat + description:Have Gold Armor + code:7e1af0/08 + cheat + description:Have Chain Armor + code:7e1af2/06 + cheat + description:Have Straw Coat + code:7e1af4/04 + cheat + description:Have whole Pizza + code:7e1b10/01 + cheat + description:Have slice of Pizza + code:7e1b12/01 + cheat + description:Have Burger + code:7e1b14/01 + cheat + description:Have Pass + code:7e1b20/01 + cheat + description:Have Text + code:7e1b22/01 + cheat + description:Max walking speed + code:7e1ac2/02+7e1b00/03 + +cartridge sha256:66871d66be19ad2c34c927d6b14cd8eb6fc3181965b6e517cb361f7316009cfb + name:Legend of Zelda, The - A Link to the Past (USA) + cheat + description:Invincibility + code:7e031f/6a + cheat + description:Infinite rupees + code:7ef360/e7 + cheat + description:Infinite health and all heart containers + code:7ef36d/a0 + cheat + description:Almost infinite health + code:0780f7/cf + cheat + description:Infinite magic + code:7ef36e/80 + cheat + description:Almost infinite magic + code:07b0c8/cf+07b101/cf + cheat + description:Max heart containers + code:04f4f2/a0 + cheat + description:Infinite Bombs + code:098133/cf + cheat + description:Infinite Bombs (alt) + code:7ef343/63 + cheat + description:Infinite Arrows + code:7ef377/63 + cheat + description:Hit anywhere (disable before fighting Ganon, use the Boomerang instead of Sword to hit switches) + code:06f2d1/24+06ebfc/80+06ec13/24+06f3a7/24+06ec2c/80+1e83b3/24 + cheat + description:Get items from anywhere + code:06d11e/24 + cheat + description:Regular sword is very strong (100 damage instead of 2) + code:0db8fa/64 + cheat + description:Blue Boomerang has much longer reach + code:089204/bd + cheat + description:Enemies frozen by Boomerang or Hookshot stay frozen + code:06e321/bd + cheat + description:Sword can destroy solid objects in Overworld + code:1bbe39/80 + cheat + description:Objects that you can pick up and throw never break away + code:06e234/10 + cheat + description:Dash without having the Pegasus Boots + code:7ef379/ff + cheat + description:Dash without charge up + code:0790b9/27 + cheat + description:Walk on deep water + code:0787cb/64+07da3b/de+07da3a/5b + cheat + description:Use the Magic Mirror to warp between the Light and Dark Worlds freely + code:07a953/80 + cheat + description:Some shops don't take your money + code:1ef3ae/cf + cheat + description:Spin attack needs nearly no time to charge + code:079d79/08 + cheat + description:Spin attack needs no time at all to charge + code:079d79/00 + cheat + description:100% enemy drop rate (from enemies that normally drop items) + code:86f9bb/00 + cheat + description:No enemies in dungeons + code:7e0d30/05+7e0d31/05+7e0d32/05 + cheat + description:Dark rooms are fully lit + code:7e045a/03 + cheat + description:Trigger doors are open (works with most dungeon doors, some that even look closed) + code:7e068d/ff + cheat + description:Hold button L to walk over pits + code:07dc8d/00+07dc8c/f2+07dc8f/20 + cheat + description:Hold button R to walk over pits + code:07dc8d/00+07dc8c/f2+07dc8f/10 + cheat + description:Prevent Zelda from saying 'Help me... I am in the dungeon of the castle' during the beginning of the game + code:099ff3/ad + cheat + description:Have Bombos Medallion + code:7ef347/01 + cheat + description:Have Book Of Mudora + code:7ef34e/01 + cheat + description:Have Bug-Catching Net + code:7ef34d/01 + cheat + description:Have Cane Of Byrna + code:7ef351/01 + cheat + description:Have Cane Of Somaria + code:7ef350/01 + cheat + description:Have Ether Medallion + code:7ef348/01 + cheat + description:Have Fire Rod + code:7ef345/01 + cheat + description:Have Flute + code:7ef34c/02 + cheat + description:Have Flute with Duck + code:7ef34c/03 + cheat + description:Have Golden Sword (level 4) + code:7ef359/04 + cheat + description:Have Hookshot + code:7ef342/01 + cheat + description:Have Ice Rod + code:7ef346/01 + cheat + description:Have Lamp + code:7ef34a/01 + cheat + description:Have Magic Boomerang + code:7ef341/02 + cheat + description:Have Magic Cape + code:7ef352/01 + cheat + description:Have Magic Hammer + code:7ef34b/01 + cheat + description:Have Magic Mirror + code:7ef353/02 + cheat + description:Have Magic Powder + code:7ef344/02 + cheat + description:Have Mirror Shield + code:7ef35a/03 + cheat + description:Have Moon Pearl + code:7ef357/01 + cheat + description:Have Pegasus Boots + code:7ef355/02 + cheat + description:Have Quake Medallion + code:7ef349/01 + cheat + description:Have Red Mail + code:7ef35b/02 + cheat + description:Have Shovel + code:7ef34c/01 + cheat + description:Have Titan's Mitten + code:7ef354/02 + cheat + description:Have Zora's Flippers + code:7ef356/01 + cheat + description:Have 1/2 Magic curse + code:7ef37b/01 + cheat + description:Have all abilities except Lift + code:7ef379/6f + cheat + description:Have all Maps, Compasses and Big Keys + code:7ef364/ff+7ef365/ff+7ef366/ff+7ef367/ff+7ef368/ff+7ef369/ff + cheat + description:Invincibility (alt) + code:7e031f/10 + cheat + description:Invincibility (alt 2) + code:7e031f/01 + cheat + description:Infinite rupees (alt) + code:7ef360/e7+7ef361/03 + cheat + description:Infinite Keys + code:7ef36f/09 + cheat + description:Bombs full + code:7ef375/01 + cheat + description:Play chest game for free and able to open all chests + code:7e04c4/01 + cheat + description:Infinite time for digging game in the Dark World + code:7e04b4/1e + cheat + description:Always get Faerie at the Pond Of Happiness (as if you threw in 100 rupees) + code:7ef36a/64 + cheat + description:Luck modifier - Great + code:7e0cf9/01 + cheat + description:Luck modifier - Big Trouble + code:7e0cf9/02 + cheat + description:Turn rain on + code:7e001d/01 + cheat + description:Turn rain off + code:7e001d/00 + cheat + description:Walk through walls + code:07cb9a/ea+07cb9b/ea+07c1fa/ea+07c1fb/ea + cheat + description:Walk faster + code:7e005e/16 + cheat + description:Walk much faster + code:7e005e/10 + cheat + description:Have 20 Heart Containers and infinite health + code:7ef36d/a0 + cheat + description:Have Blue Mail + code:7ef35b/02 + cheat + description:Have Boomerang + code:7ef341/01 + cheat + description:Have Bow + code:7ef340/01 + cheat + description:Have Bow with Arrows + code:7ef340/02 + cheat + description:Have Bow with Silver Arrows + code:7ef340/04 + cheat + description:Have all Lift abilities + code:7ef354/03 + cheat + description:Have all Crystals + code:7ef37a/7f + cheat + description:Have all Pendants + code:7ef374/47 + cheat + description:Have Small Key In dungeons + code:7ef36f/09 + cheat + description:Have Big Key in dungeons + code:7ef366/ff+7ef367/ff + cheat + description:Have Compass in dungeons + code:7ef365/ff + cheat + description:Have bottle 1 + code:7ef35c/02 + cheat + description:Have bottle 1 with infinite Mushrooms + code:7ef35c/01 + cheat + description:Have bottle 1 with infinite Red Medicine (life) + code:7ef35c/03 + cheat + description:Have bottle 1 with infinite Green Medicine (magic) + code:7ef35c/04 + cheat + description:Have bottle 1 with infinite Blue Medicine (cure all) + code:7ef35c/05 + cheat + description:Have bottle 1 with infinite Faeries + code:7ef35c/06 + cheat + description:Have bottle 1 with infinite Bees + code:7ef35c/07 + cheat + description:Have bottle 1 with infinite Good Bees + code:7ef35c/08 + cheat + description:Have bottle 2 + code:7ef35d/02 + cheat + description:Have bottle 2 with infinite Mushrooms + code:7ef35d/01 + cheat + description:Have bottle 2 with infinite Red Medicine (life) + code:7ef35d/03 + cheat + description:Have bottle 2 with infinite Green Medicine (magic) + code:7ef35d/04 + cheat + description:Have bottle 2 with infinite Blue Medicine (cure all) + code:7ef35d/05 + cheat + description:Have bottle 2 with infinite Faeries + code:7ef35d/06 + cheat + description:Have bottle 2 with infinite Bees + code:7ef35d/07 + cheat + description:Have bottle 2 with infinite Good Bees + code:7ef35d/08 + cheat + description:Have bottle 3 + code:7ef35e/02 + cheat + description:Have bottle 3 with infinite Mushrooms + code:7ef35e/01 + cheat + description:Have bottle 3 with infinite Red Medicine (life) + code:7ef35e/03 + cheat + description:Have bottle 3 with infinite Green Medicine (magic) + code:7ef35e/04 + cheat + description:Have bottle 3 with infinite Blue Medicine (cure all) + code:7ef35e/05 + cheat + description:Have bottle 3 with infinite Faeries + code:7ef35e/06 + cheat + description:Have bottle 3 with infinite Bees + code:7ef35e/07 + cheat + description:Have bottle 3 with infinite Good Bees + code:7ef35e/08 + cheat + description:Have bottle 4 + code:7ef35f/02 + cheat + description:Have bottle 4 with infinite Mushrooms + code:7ef35f/01 + cheat + description:Have bottle 4 with infinite Red Medicine (life) + code:7ef35f/03 + cheat + description:Have bottle 4 with infinite Green Medicine (magic) + code:7ef35f/04 + cheat + description:Have bottle 4 with infinite Blue Medicine (cure all) + code:7ef35f/05 + cheat + description:Have bottle 4 with infinite Faeries + code:7ef35f/06 + cheat + description:Have bottle 4 with infinite Bees + code:7ef35f/07 + cheat + description:Have bottle 4 with infinite Good Bees + code:7ef35f/08 + +cartridge sha256:cd016c41c7ef9f4f243d57c2b1564b4ceb3b4c38cc165cd02ab6c8e35c93aa2e + name:Lemmings (USA) (Rev 1) + cheat + description:Infinite climbers if you start with at least 1 + code:00bf2a/a5 + cheat + description:Infinite floaters if you start with at least 1 + code:00bf11/a5 + cheat + description:Infinite bombers if you start with at least 1 + code:00bf39/a5 + cheat + description:Infinite blockers if you start with at least 1 + code:00be23/a5 + cheat + description:Infinite builders if you start with at least 1 + code:00bef1/a5 + cheat + description:Infinite bashers if you start with at least 1 + code:00bed4/a5 + cheat + description:Infinite miners if you start with at least 1 + code:00be6c/a5 + cheat + description:Infinite diggers if you start with at least 1 + code:00be9b/a5 + cheat + description:Each saved lemming counts as two + code:009687/e6+009688/6b + cheat + description:Start on Level 2; rating: Fun + code:01aca1/a9+01aca2/01+01adb4/a5 + cheat + description:Start on Level 3; rating: Fun + code:01aca1/a9+01aca2/02+01adb4/a5 + cheat + description:Start on Level 4; rating: Fun + code:01aca1/a9+01aca2/03+01adb4/a5 + cheat + description:Start on Level 5; rating: Fun + code:01aca1/a9+01aca2/04+01adb4/a5 + cheat + description:Start on Level 6; rating: Fun + code:01aca1/a9+01aca2/05+01adb4/a5 + cheat + description:Start on Level 7; rating: Fun + code:01aca1/a9+01aca2/06+01adb4/a5 + cheat + description:Start on Level 8; rating: Fun + code:01aca1/a9+01aca2/07+01adb4/a5 + cheat + description:Start on Level 9; rating: Fun + code:01aca1/a9+01aca2/08+01adb4/a5 + cheat + description:Start on Level 10; rating: Fun + code:01aca1/a9+01aca2/09+01adb4/a5 + cheat + description:Start on Level 11; rating: Fun + code:01aca1/a9+01aca2/0a+01adb4/a5 + cheat + description:Start on Level 12; rating: Fun + code:01aca1/a9+01aca2/0b+01adb4/a5 + cheat + description:Start on Level 13; rating: Fun + code:01aca1/a9+01aca2/0c+01adb4/a5 + cheat + description:Start on Level 14; rating: Fun + code:01aca1/a9+01aca2/0d+01adb4/a5 + cheat + description:Start on Level 15; rating: Fun + code:01aca1/a9+01aca2/0e+01adb4/a5 + cheat + description:Start on Level 16; rating: Fun + code:01aca1/a9+01aca2/0f+01adb4/a5 + cheat + description:Start on Level 17; rating: Fun + code:01aca1/a9+01aca2/10+01adb4/a5 + cheat + description:Start on Level 18; rating: Fun + code:01aca1/a9+01aca2/11+01adb4/a5 + cheat + description:Start on Level 19; rating: Fun + code:01aca1/a9+01aca2/12+01adb4/a5 + cheat + description:Start on Level 20; rating: Fun + code:01aca1/a9+01aca2/13+01adb4/a5 + cheat + description:Start on Level 21; rating: Fun + code:01aca1/a9+01aca2/14+01adb4/a5 + cheat + description:Start on Level 22; rating: Fun + code:01aca1/a9+01aca2/15+01adb4/a5 + cheat + description:Start on Level 23; rating: Fun + code:01aca1/a9+01aca2/16+01adb4/a5 + cheat + description:Start on Level 24; rating: Fun + code:01aca1/a9+01aca2/17+01adb4/a5 + cheat + description:Start on Level 25; rating: Fun + code:01aca1/a9+01aca2/18+01adb4/a5 + cheat + description:Start on Level 26; rating: Fun + code:01aca1/a9+01aca2/19+01adb4/a5 + cheat + description:Start on Level 27; rating: Fun + code:01aca1/a9+01aca2/1a+01adb4/a5 + cheat + description:Start on Level 28; rating: Fun + code:01aca1/a9+01aca2/1b+01adb4/a5 + cheat + description:Start on Level 29; rating: Fun + code:01aca1/a9+01aca2/1c+01adb4/a5 + cheat + description:Start on Level 30; rating: Fun + code:01aca1/a9+01aca2/1d+01adb4/a5 + cheat + description:Start on Level 1; rating: Tricky + code:01aca1/a9+01aca2/1e+01adb4/a5 + cheat + description:Start on Level 2; rating: Tricky + code:01aca1/a9+01aca2/1f+01adb4/a5 + cheat + description:Start on Level 3; rating: Tricky + code:01aca1/a9+01aca2/20+01adb4/a5 + cheat + description:Start on Level 4; rating: Tricky + code:01aca1/a9+01aca2/21+01adb4/a5 + cheat + description:Start on Level 5; rating: Tricky + code:01aca1/a9+01aca2/22+01adb4/a5 + cheat + description:Start on Level 6; rating: Tricky + code:01aca1/a9+01aca2/23+01adb4/a5 + cheat + description:Start on Level 7; rating: Tricky + code:01aca1/a9+01aca2/24+01adb4/a5 + cheat + description:Start on Level 8; rating: Tricky + code:01aca1/a9+01aca2/25+01adb4/a5 + cheat + description:Start on Level 9; rating: Tricky + code:01aca1/a9+01aca2/26+01adb4/a5 + cheat + description:Start on Level 10; rating: Tricky + code:01aca1/a9+01aca2/27+01adb4/a5 + cheat + description:Start on Level 11; rating: Tricky + code:01aca1/a9+01aca2/28+01adb4/a5 + cheat + description:Start on Level 12; rating: Tricky + code:01aca1/a9+01aca2/29+01adb4/a5 + cheat + description:Start on Level 13; rating: Tricky + code:01aca1/a9+01aca2/2a+01adb4/a5 + cheat + description:Start on Level 14; rating: Tricky + code:01aca1/a9+01aca2/2b+01adb4/a5 + cheat + description:Start on Level 15; rating: Tricky + code:01aca1/a9+01aca2/2c+01adb4/a5 + cheat + description:Start on Level 16; rating: Tricky + code:01aca1/a9+01aca2/2d+01adb4/a5 + cheat + description:Start on Level 17; rating: Tricky + code:01aca1/a9+01aca2/2e+01adb4/a5 + cheat + description:Start on Level 18; rating: Tricky + code:01aca1/a9+01aca2/2f+01adb4/a5 + cheat + description:Start on Level 19; rating: Tricky + code:01aca1/a9+01aca2/30+01adb4/a5 + cheat + description:Start on Level 20; rating: Tricky + code:01aca1/a9+01aca2/31+01adb4/a5 + cheat + description:Start on Level 21; rating: Tricky + code:01aca1/a9+01aca2/32+01adb4/a5 + cheat + description:Start on Level 22; rating: Tricky + code:01aca1/a9+01aca2/33+01adb4/a5 + cheat + description:Start on Level 23; rating: Tricky + code:01aca1/a9+01aca2/34+01adb4/a5 + cheat + description:Start on Level 24; rating: Tricky + code:01aca1/a9+01aca2/35+01adb4/a5 + cheat + description:Start on Level 25; rating: Tricky + code:01aca1/a9+01aca2/36+01adb4/a5 + cheat + description:Start on Level 26; rating: Tricky + code:01aca1/a9+01aca2/37+01adb4/a5 + cheat + description:Start on Level 27; rating: Tricky + code:01aca1/a9+01aca2/38+01adb4/a5 + cheat + description:Start on Level 28; rating: Tricky + code:01aca1/a9+01aca2/39+01adb4/a5 + cheat + description:Start on Level 29; rating: Tricky + code:01aca1/a9+01aca2/3a+01adb4/a5 + cheat + description:Start on Level 30; rating: Tricky + code:01aca1/a9+01aca2/3b+01adb4/a5 + cheat + description:Start on Level 1; rating: Taxing + code:01aca1/a9+01aca2/3c+01adb4/a5 + cheat + description:Start on Level 2; rating: Taxing + code:01aca1/a9+01aca2/3d+01adb4/a5 + cheat + description:Start on Level 3; rating: Taxing + code:01aca1/a9+01aca2/3e+01adb4/a5 + cheat + description:Start on Level 4; rating: Taxing + code:01aca1/a9+01aca2/3f+01adb4/a5 + cheat + description:Start on Level 5; rating: Taxing + code:01aca1/a9+01aca2/40+01adb4/a5 + cheat + description:Start on Level 6; rating: Taxing + code:01aca1/a9+01aca2/41+01adb4/a5 + cheat + description:Start on Level 7; rating: Taxing + code:01aca1/a9+01aca2/42+01adb4/a5 + cheat + description:Start on Level 8; rating: Taxing + code:01aca1/a9+01aca2/43+01adb4/a5 + cheat + description:Start on Level 9; rating: Taxing + code:01aca1/a9+01aca2/44+01adb4/a5 + cheat + description:Start on Level 10; rating: Taxing + code:01aca1/a9+01aca2/45+01adb4/a5 + cheat + description:Start on Level 11; rating: Taxing + code:01aca1/a9+01aca2/46+01adb4/a5 + cheat + description:Start on Level 12; rating: Taxing + code:01aca1/a9+01aca2/47+01adb4/a5 + cheat + description:Start on Level 13; rating: Taxing + code:01aca1/a9+01aca2/48+01adb4/a5 + cheat + description:Start on Level 14; rating: Taxing + code:01aca1/a9+01aca2/49+01adb4/a5 + cheat + description:Start on Level 15; rating: Taxing + code:01aca1/a9+01aca2/4a+01adb4/a5 + cheat + description:Start on Level 16; rating: Taxing + code:01aca1/a9+01aca2/4b+01adb4/a5 + cheat + description:Start on Level 17; rating: Taxing + code:01aca1/a9+01aca2/4c+01adb4/a5 + cheat + description:Start on Level 18; rating: Taxing + code:01aca1/a9+01aca2/4d+01adb4/a5 + cheat + description:Start on Level 19; rating: Taxing + code:01aca1/a9+01aca2/4e+01adb4/a5 + cheat + description:Start on Level 20; rating: Taxing + code:01aca1/a9+01aca2/4f+01adb4/a5 + cheat + description:Start on Level 21; rating: Taxing + code:01aca1/a9+01aca2/50+01adb4/a5 + cheat + description:Start on Level 22; rating: Taxing + code:01aca1/a9+01aca2/51+01adb4/a5 + cheat + description:Start on Level 23; rating: Taxing + code:01aca1/a9+01aca2/52+01adb4/a5 + cheat + description:Start on Level 24; rating: Taxing + code:01aca1/a9+01aca2/53+01adb4/a5 + cheat + description:Start on Level 25; rating: Taxing + code:01aca1/a9+01aca2/54+01adb4/a5 + cheat + description:Start on Level 26; rating: Taxing + code:01aca1/a9+01aca2/55+01adb4/a5 + cheat + description:Start on Level 27; rating: Taxing + code:01aca1/a9+01aca2/56+01adb4/a5 + cheat + description:Start on Level 28; rating: Taxing + code:01aca1/a9+01aca2/57+01adb4/a5 + cheat + description:Start on Level 29; rating: Taxing + code:01aca1/a9+01aca2/58+01adb4/a5 + cheat + description:Start on Level 30; rating: Taxing + code:01aca1/a9+01aca2/59+01adb4/a5 + cheat + description:Start on Level 1; rating: Mayhem + code:01aca1/a9+01aca2/5a+01adb4/a5 + cheat + description:Start on Level 2; rating: Mayhem + code:01aca1/a9+01aca2/5b+01adb4/a5 + cheat + description:Start on Level 3; rating: Mayhem + code:01aca1/a9+01aca2/5c+01adb4/a5 + cheat + description:Start on Level 4; rating: Mayhem + code:01aca1/a9+01aca2/5d+01adb4/a5 + cheat + description:Start on Level 5; rating: Mayhem + code:01aca1/a9+01aca2/5e+01adb4/a5 + cheat + description:Start on Level 6; rating: Mayhem + code:01aca1/a9+01aca2/5f+01adb4/a5 + cheat + description:Start on Level 7; rating: Mayhem + code:01aca1/a9+01aca2/60+01adb4/a5 + cheat + description:Start on Level 8; rating: Mayhem + code:01aca1/a9+01aca2/61+01adb4/a5 + cheat + description:Start on Level 9; rating: Mayhem + code:01aca1/a9+01aca2/62+01adb4/a5 + cheat + description:Start on Level 10; rating: Mayhem + code:01aca1/a9+01aca2/63+01adb4/a5 + cheat + description:Start on Level 11; rating: Mayhem + code:01aca1/a9+01aca2/64+01adb4/a5 + cheat + description:Start on Level 12; rating: Mayhem + code:01aca1/a9+01aca2/65+01adb4/a5 + cheat + description:Start on Level 13; rating: Mayhem + code:01aca1/a9+01aca2/66+01adb4/a5 + cheat + description:Start on Level 14; rating: Mayhem + code:01aca1/a9+01aca2/67+01adb4/a5 + cheat + description:Start on Level 15; rating: Mayhem + code:01aca1/a9+01aca2/68+01adb4/a5 + cheat + description:Start on Level 16; rating: Mayhem + code:01aca1/a9+01aca2/69+01adb4/a5 + cheat + description:Start on Level 17; rating: Mayhem + code:01aca1/a9+01aca2/6a+01adb4/a5 + cheat + description:Start on Level 18; rating: Mayhem + code:01aca1/a9+01aca2/6b+01adb4/a5 + cheat + description:Start on Level 19; rating: Mayhem + code:01aca1/a9+01aca2/6c+01adb4/a5 + cheat + description:Start on Level 20; rating: Mayhem + code:01aca1/a9+01aca2/6d+01adb4/a5 + cheat + description:Start on Level 21; rating: Mayhem + code:01aca1/a9+01aca2/6e+01adb4/a5 + cheat + description:Start on Level 22; rating: Mayhem + code:01aca1/a9+01aca2/6f+01adb4/a5 + cheat + description:Start on Level 23; rating: Mayhem + code:01aca1/a9+01aca2/70+01adb4/a5 + cheat + description:Start on Level 24; rating: Mayhem + code:01aca1/a9+01aca2/71+01adb4/a5 + cheat + description:Start on Level 25; rating: Mayhem + code:01aca1/a9+01aca2/72+01adb4/a5 + cheat + description:Start on Level 26; rating: Mayhem + code:01aca1/a9+01aca2/73+01adb4/a5 + cheat + description:Start on Level 27; rating: Mayhem + code:01aca1/a9+01aca2/74+01adb4/a5 + cheat + description:Start on Level 28; rating: Mayhem + code:01aca1/a9+01aca2/75+01adb4/a5 + cheat + description:Start on Level 29; rating: Mayhem + code:01aca1/a9+01aca2/76+01adb4/a5 + cheat + description:Start on Level 30; rating: Mayhem + code:01aca1/a9+01aca2/77+01adb4/a5 + cheat + description:Start on Level 1; rating: Sunsoft + code:01aca1/a9+01aca2/78+01adb4/a5 + cheat + description:Start on Level 2; rating: Sunsoft + code:01aca1/a9+01aca2/79+01adb4/a5 + cheat + description:Start on Level 3; rating: Sunsoft + code:01aca1/a9+01aca2/7a+01adb4/a5 + cheat + description:Start on Level 4; rating: Sunsoft + code:01aca1/a9+01aca2/7b+01adb4/a5 + cheat + description:Start on Level 5; rating: Sunsoft + code:01aca1/a9+01aca2/7c+01adb4/a5 + cheat + description:Have a lot of time + code:7e0094/ff + cheat + description:Open all 'Fun' levels + code:7fffc0/1e + cheat + description:Open all 'Tricky' levels + code:7fffc1/1e + cheat + description:Open all 'Taxing' levels + code:7fffc2/1e + cheat + description:Open all 'Mayhem' levels + code:7fffc3/1e + cheat + description:Open all 'SUNSOFT' levels + code:7fffc4/05 + cheat + description:Instantly win levels + code:7e0091/00 + cheat + description:0% Lemmings needed + code:7e0092/00 + cheat + description:Have 99 Climbers left + code:7e0095/63 + cheat + description:Have 99 Floaters left + code:7e0096/63 + cheat + description:Have 99 Exploders left + code:7e0097/63 + cheat + description:Have 99 Blockers left + code:7e0098/63 + cheat + description:Have 99 Builders left + code:7e0099/63 + cheat + description:Have 99 Bashers left + code:7e009a/63 + cheat + description:Have 99 Miners left + code:7e009b/63 + cheat + description:Have 99 Diggers left + code:7e009c/63 + cheat + description:Have 0 Lemmings left in level + code:7e0069/00 + cheat + description:Have 0 Lemmings left to enter level + code:7e006a/00 + cheat + description:Always rescued 100% of Lemmings + code:7e006b/64 + +cartridge sha256:a2c1970670e2831e47e24ced01bf4ba5aba05cac3773bf524c62d689c35687e1 + name:Lester the Unlikely (USA) + cheat + description:Infinite health against most enemies + code:cea6d3/ad + cheat + description:Infinite lives + code:ceac85/ad + cheat + description:Flashing lasts a long time after getting hit + code:cea6da/04 + cheat + description:Flashing lasts a really long time after getting hit + code:cea6da/0c + cheat + description:Lighter gravity effect (disable right after pressing start, donï¾’t enable until first game play screen) + code:cea5c1/40 + cheat + description:Even lighter gravity effect + code:cea5c1/25 + cheat + description:Amazingly lighter gravity effect + code:cea5c1/15 + cheat + description:Infinite health + code:7e859b/03 + +cartridge sha256:3bc5f296c3dbee012e93a5cf25568f9288ce87b34d74085401a560350eaca03f + name:Lethal Enforcers (USA) + cheat + description:Invincibility - both players + code:84aad7/80 + cheat + description:Infinite ammo + code:82a6fb/ea + cheat + description:Infinite health - both players + code:829979/ea + cheat + description:No health loss when you hit civilians + code:8298da/ea + cheat + description:Hit anywhere - both players + code:84d0ee/80+8298ca/80+84843f/80+84d174/35 + cheat + description:1/2 health lost when you hit civilians + code:8298da/ea + cheat + description:Play with more health + code:808a76/1e+808ad2/1e + cheat + description:Keep weapon until you die + code:829917/80 + cheat + description:Magnum - more shots per round + code:81c0e6/0c + cheat + description:Normal gun - more shots per round + code:81c0e2/0c + cheat + description:Shotgun - more shots per round + code:81c0ea/0c + cheat + description:Invincibility - P1 + code:7e00b2/07 + cheat + description:Invincibility - P2 + code:7e00b4/07 + cheat + description:Infinite ammo for all guns - P1 + code:7e1fc0/06 + cheat + description:Infinite ammo for all guns - P2 + code:7e1fc2/06 + cheat + description:Have Grenade Launcher - P1 + code:7e1fbc/02 + cheat + description:Have Grenade Launcher - P2 + code:7e1fbe/02 + cheat + description:Have Magnum - P1 + code:7e1fbc/04 + cheat + description:Have Magnum - P2 + code:7e1fbe/04 + cheat + description:Have Shotgun - P1 + code:7e1fbc/06 + cheat + description:Have Shotgun - P2 + code:7e1fbe/06 + cheat + description:Have Automatic - P1 + code:7e1fbc/08 + cheat + description:Have Automatic - P2 + code:7e1fbe/08 + cheat + description:Have Glock 45 - P1 + code:7e1fbc/0a + cheat + description:Have Glock 45 - P2 + code:7e1fbe/0a + cheat + description:Have Uzi - P1 + code:7e1fbc/0c + cheat + description:Have Uzi - P2 + code:7e1fbe/0c + cheat + description:Start a new game to enter the Konami Gun System Check Mode + code:8089d5/07 + cheat + description:Start a new game to enter the Sound Check Mode + code:8089d5/10 + cheat + description:Start a new game to enter the Object Test + code:8089d5/11 + +cartridge sha256:80c22cc92d51a54de9cd9fd00db5ff58a35fff35e822169c94e445d50834fba3 + name:Lethal Weapon (USA) + cheat + description:Infinite health + code:009ff4/2c + cheat + description:Infinite ammo + code:00b80f/00 + cheat + description:Infinite time + code:00b67d/ad + cheat + description:More bullets in magazine + code:00b816/09 + cheat + description:2 magazines on pick-up + code:00a7cf/02 + cheat + description:4 magazines on pick-up + code:00a7cf/04 + cheat + description:Slower timer + code:00b695/62 + cheat + description:Faster timer + code:00b695/1f + cheat + description:Super-jump (can get stuck) + code:009508/ea + cheat + description:Start with more badges + code:0087dc/06 + cheat + description:Start with fewer badges + code:0087dc/00 + cheat + description:Start with more magazine clips + code:0087c6/09 + cheat + description:Start with fewer magazine clips + code:0087c6/01 + cheat + description:Invincibility (blinking) + code:7e025e/50 + cheat + description:Infinite health (alt) + code:7e0226/06 + cheat + description:Infinite ammo (alt) + code:7e021e/07 + cheat + description:Infinite time (alt) + code:7e0d28/99+7e0d29/09 + cheat + description:Play as Riggs + code:7e0246/00 + cheat + description:Play as Murtaugh + code:7e0246/01 + +cartridge sha256:457abe634e0a8be03e29513a3dca8f3e9d0ddc6bf97d8931f2316094260f3712 + name:Lion King, The (USA) + cheat + description:Almost infinite health + code:c35cb0/ad + cheat + description:Infinite lives + code:c08afa/af + cheat + description:Roaring doesn't decrease your roar meter + code:c3596e/ad + cheat + description:Roar meter doesn't fill up with time + code:c0b552/ad + cheat + description:Don't lose roar power when you get hit + code:c35bed/ad + cheat + description:higher-jump + code:c31152/a9+c31153/f6+c31154/ff + cheat + description:Mega-jump + code:c31152/a9+c31153/f4+c31154/ff + cheat + description:Walk through walls + code:c481a3/80+c48136/00+c0c7d3/00 + cheat + description:Invincibility (blinking) + code:7eb259/3d + cheat + description:Infinite health + code:7e2004/04 + cheat + description:Infinite Roar meter + code:7e2002/10 + cheat + description:Infinite lives (alt) + code:7fffaa/09 + cheat + description:Infinite continues + code:7fffa8/09 + cheat + description:Infinite time - Bug Hunt I + code:7ec0c1/28 + cheat + description:Infinite time - Bug Hunt II + code:7ecb41/28 + cheat + description:Infinite time - Bug Hunt III + code:7ebbc1/28 + cheat + description:Play as young Simba + code:7e2000/00 + cheat + description:Play as adult Simba + code:7e2001/ff + cheat + description:Start on The Pride Lands + code:7fff9e/00 + cheat + description:Start on Roar At Monkeys + code:7fff9e/01 + cheat + description:Start on The Elephant Graveyard + code:7fff9e/02 + cheat + description:Start on The Stampede + code:7fff9e/03 + cheat + description:Start on Simba's Exile + code:7fff9e/04 + cheat + description:Start on Hakuna Matata + code:7fff9e/05 + cheat + description:Start on Simba's Destiny + code:7fff9e/06 + cheat + description:Start on Be Prepared + code:7fff9e/07 + cheat + description:Start on Simba's Return + code:7fff9e/08 + cheat + description:Start on Pride Rock + code:7fff9e/09 + cheat + description:Start on Bug Toss + code:7fff9e/0a + cheat + description:Start on Bug Hunt I + code:7fff9e/0b + cheat + description:Start on Bug Hunt II + code:7fff9e/0c + cheat + description:Start on Bug Hunt III + code:7fff9e/0d + cheat + description:Start on Game Begins + code:7fff9e/0e + cheat + description:Start on Kill Him + code:7fff9e/0f + +cartridge sha256:52dbfdaca87debdf181b87d55192b0f8dd07e8aeb43afa4b04df16d44ec998e5 + name:Little Magic (Japan) + cheat + description:Infinite Mays / Retries + code:7e0059/09 + +cartridge sha256:7e1d6242ae2ec2c23afb876becdcf778098edd4d853234222dc16471cb51df9e + name:Lock On (USA) + cheat + description:Infinite Flares + code:7e1113/46 + cheat + description:Infinite Missile A + code:7e1115/46 + cheat + description:Infinite Missile B + code:7e1116/46 + cheat + description:Infinite lives + code:7e1106/0a + +cartridge sha256:9f7782a92fda789f9d119b1f0a2f7da0f35606357556a48eca9487797ee1a888 + name:Lost Vikings, The (USA) + cheat + description:Start with infinite health - all Vikings + code:7e0fe9/08 + +cartridge sha256:ab3d97c1a3a979e1680a428ec65df54cfb72997bbfe2173292248a4fa8c51ba1 + name:Lost Vikings 2 (USA) + cheat + description:Infinite health - 1st viking + code:7e1037/06 + cheat + description:Infinite health - 2nd viking + code:7e1039/06 + cheat + description:Infinite health - 3rd viking + code:7e103b/06 + +cartridge sha256:8510491f99400115ccf33570269bc4e484fb56370f7ac36f12e73eec19d342da + name:Lucky Luke (Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:7e0526/48 + cheat + description:Infinite health + code:7e059f/04 + cheat + description:Infinite lives + code:7e05a0/09 + cheat + description:Infinite rounds + code:7e05a2/09 + cheat + description:Infinite bombs + code:7e05a3/09 + +cartridge sha256:73731a5a7932965de02a9e98055dcf88b4d17b8f710a6ecfde3e36a1f248773b + name:Lufia & the Fortress of Doom (USA) + cheat + description:Move around caves and world map quicker (except when leaving a vehicle) + code:019829/20 + cheat + description:Infinite HP (hit points) + code:08e987/bd + cheat + description:Infinite magic points in battle mode + code:08e9c6/bd + cheat + description:No HP lost when walking over swamp ground + code:0196b4/00 + cheat + description:More HP lost when walking over swamp ground + code:0196b4/04 + cheat + description:Cheap bombs - 1 gold each + code:0aef4d/01 + cheat + description:Cheap smokeballs - 1 gold each + code:0aeda1/01 + cheat + description:Immune to all petrifying effects (stone, poison, confused, etc.) + code:08b912/80 + cheat + description:Shopkeepers don't charge for purchases - some shops only + code:00cabf/57 + cheat + description:More agility points from speed potion + code:0aed28/10 + cheat + description:More intelligence points from mind potion + code:0aed4b/10 + cheat + description:More strength points from great potion + code:0aed6e/10 + cheat + description:Higher max level of magic points from spell potion + code:0aed05/10 + cheat + description:Higher max level of hit points from power potion + code:0aece2/10 + cheat + description:99 of item in slot 1 + code:7e14f8/63 + cheat + description:99 of item in slot 2 + code:7e14fa/63 + cheat + description:99 of item in slot 3 + code:7e14fc/63 + cheat + description:No random battles + code:7e149e/00 + cheat + description:Slot 1 - Nothing + code:7e14f7/00 + cheat + description:Slot 1 - Knife + code:7e14f7/01 + cheat + description:Slot 1 - Club + code:7e14f7/02 + cheat + description:Slot 1 - Mace + code:7e14f7/03 + cheat + description:Slot 1 - Dagger + code:7e14f7/04 + cheat + description:Slot 1 - Long Knife + code:7e14f7/05 + cheat + description:Slot 1 - Short Sword + code:7e14f7/06 + cheat + description:Slot 1 - Rod + code:7e14f7/07 + cheat + description:Slot 1 - Gladius + code:7e14f7/08 + cheat + description:Slot 1 - Glass Robe + code:7e14f7/09 + cheat + description:Slot 1 - Brone Sword + code:7e14f7/0a + cheat + description:Slot 1 - Staff + code:7e14f7/0b + cheat + description:Slot 1 - Scimitar + code:7e14f7/0c + cheat + description:Slot 1 - Rapier + code:7e14f7/0d + cheat + description:Slot 1 - Long Sword + code:7e14f7/0e + cheat + description:Slot 1 - Long Staff + code:7e14f7/0f + cheat + description:Slot 1 - Axe + code:7e14f7/10 + cheat + description:Slot 1 - Spear + code:7e14f7/11 + cheat + description:Slot 1 - Morning Star + code:7e14f7/12 + cheat + description:Slot 1 - Catwhip + code:7e14f7/13 + cheat + description:Slot 1 - Battle Axe + code:7e14f7/14 + cheat + description:Slot 1 - Hammer Rod + code:7e14f7/15 + cheat + description:Slot 1 - Trident + code:7e14f7/16 + cheat + description:Slot 1 - Silver Rod + code:7e14f7/17 + cheat + description:Slot 1 - Silver Sword + code:7e14f7/18 + cheat + description:Slot 1 - Buster Sword + code:7e14f7/19 + cheat + description:Slot 1 - Zircon Rod + code:7e14f7/1a + cheat + description:Slot 1 - Great Axe + code:7e14f7/1b + cheat + description:Slot 1 - Great Blade + code:7e14f7/1c + cheat + description:Slot 1 - Zircon Axe + code:7e14f7/1d + cheat + description:Slot 1 - Zircon Sword + code:7e14f7/1e + cheat + description:Slot 1 - Broad Sword + code:7e14f7/1f + cheat + description:Slot 1 - Broad Rod + code:7e14f7/20 + cheat + description:Slot 1 - Luck Blade + code:7e14f7/21 + cheat + description:Slot 1 - Gloom Pick + code:7e14f7/22 + cheat + description:Slot 1 - Dual Blade + code:7e14f7/23 + cheat + description:Slot 1 - Dress + code:7e14f7/24 + cheat + description:Slot 1 - Cloth + code:7e14f7/25 + cheat + description:Slot 1 - Cloth Armor + code:7e14f7/26 + cheat + description:Slot 1 - Robe + code:7e14f7/27 + cheat + description:Slot 1 - Tan Armor + code:7e14f7/28 + cheat + description:Slot 1 - Tan Robe + code:7e14f7/29 + cheat + description:Slot 1 - Light Armor + code:7e14f7/2a + cheat + description:Slot 1 - Light Robe + code:7e14f7/2b + cheat + description:Slot 1 - Chain Mail + code:7e14f7/2c + cheat + description:Slot 1 - Chain Cloth + code:7e14f7/2d + cheat + description:Slot 1 - Plate Cloth + code:7e14f7/2e + cheat + description:Slot 1 - Brone Armor + code:7e14f7/2f + cheat + description:Slot 1 - Quilted Silk + code:7e14f7/30 + cheat + description:Slot 1 - Half Mail + code:7e14f7/31 + cheat + description:Slot 1 - Brone Robe + code:7e14f7/32 + cheat + description:Slot 1 - Silver Armor + code:7e14f7/33 + cheat + description:Slot 1 - Silver Robe + code:7e14f7/34 + cheat + description:Slot 1 - Plate Mail + code:7e14f7/35 + cheat + description:Slot 1 - Zircon Robe + code:7e14f7/36 + cheat + description:Slot 1 - Zircon Armor + code:7e14f7/37 + cheat + description:Slot 1 - Clear Silk + code:7e14f7/38 + cheat + description:Slot 1 - Bracelet + code:7e14f7/39 + cheat + description:Slot 1 - Tan Shield + code:7e14f7/3a + cheat + description:Slot 1 - Wood Shield + code:7e14f7/3b + cheat + description:Slot 1 - Buckler + code:7e14f7/3c + cheat + description:Slot 1 - Wood Wrist + code:7e14f7/3d + cheat + description:Slot 1 - Kite Shield + code:7e14f7/3e + cheat + description:Slot 1 - Round Shield + code:7e14f7/3f + cheat + description:Slot 1 - Round Wrist + code:7e14f7/40 + cheat + description:Slot 1 - Brone Shield + code:7e14f7/41 + cheat + description:Slot 1 - Tower Shield + code:7e14f7/42 + cheat + description:Slot 1 - Large Shield + code:7e14f7/43 + cheat + description:Slot 1 - Silver Wrist + code:7e14f7/44 + cheat + description:Slot 1 - Silver Plate + code:7e14f7/45 + cheat + description:Slot 1 - Zircon Wrist + code:7e14f7/46 + cheat + description:Slot 1 - Zircon Plate + code:7e14f7/47 + cheat + description:Slot 1 - Cloth Helm + code:7e14f7/48 + cheat + description:Slot 1 - Tan Helm + code:7e14f7/49 + cheat + description:Slot 1 - Hair Band + code:7e14f7/4a + cheat + description:Slot 1 - Wood Helm + code:7e14f7/4b + cheat + description:Slot 1 - Glass Cap + code:7e14f7/4c + cheat + description:Slot 1 - Brone Helm + code:7e14f7/4d + cheat + description:Slot 1 - Red Beret + code:7e14f7/4e + cheat + description:Slot 1 - Iron Helm + code:7e14f7/4f + cheat + description:Slot 1 - Plate Cap + code:7e14f7/50 + cheat + description:Slot 1 - Plate Helm + code:7e14f7/51 + cheat + description:Slot 1 - Glass Beret + code:7e14f7/52 + cheat + description:Slot 1 - Silver Helm + code:7e14f7/53 + cheat + description:Slot 1 - Sakret + code:7e14f7/54 + cheat + description:Slot 1 - Zircon Beret + code:7e14f7/55 + cheat + description:Slot 1 - Zircon Helm + code:7e14f7/56 + cheat + description:Slot 1 - Sandal + code:7e14f7/57 + cheat + description:Slot 1 - Cloth Shoes + code:7e14f7/58 + cheat + description:Slot 1 - Tan Shoes + code:7e14f7/59 + cheat + description:Slot 1 - Spike Shoes + code:7e14f7/5a + cheat + description:Slot 1 - Heeled Shoes + code:7e14f7/5b + cheat + description:Slot 1 - Wind Shoes + code:7e14f7/5c + cheat + description:Slot 1 - Wind Heels + code:7e14f7/5d + cheat + description:Slot 1 - Knife Shoes + code:7e14f7/5e + cheat + description:Slot 1 - Needle Heels + code:7e14f7/5f + cheat + description:Slot 1 - Sonic Shoes + code:7e14f7/60 + cheat + description:Slot 1 - Sonic Heels + code:7e14f7/61 + cheat + description:Slot 1 - Sword Shoes + code:7e14f7/62 + cheat + description:Slot 1 - Cat Heels + code:7e14f7/63 + cheat + description:Slot 1 - Mach Shoes + code:7e14f7/64 + cheat + description:Slot 1 - Mach Heels + code:7e14f7/65 + cheat + description:Slot 1 - Power Ring + code:7e14f7/66 + cheat + description:Slot 1 - HiPower Ring + code:7e14f7/67 + cheat + description:Slot 1 - Daze Ring + code:7e14f7/68 + cheat + description:Slot 1 - Hi Daze Ring + code:7e14f7/69 + cheat + description:Slot 1 - Mind Ring + code:7e14f7/6a + cheat + description:Slot 1 - Sonic Ring + code:7e14f7/6b + cheat + description:Slot 1 - Mach Ring + code:7e14f7/6c + cheat + description:Slot 1 - Undead Ring + code:7e14f7/6d + cheat + description:Slot 1 - Ghost Ring + code:7e14f7/6e + cheat + description:Slot 1 - Dragon Ring + code:7e14f7/6f + cheat + description:Slot 1 - Sea Ring + code:7e14f7/70 + cheat + description:Slot 1 - Fly Ring + code:7e14f7/71 + cheat + description:Slot 1 - Water Ring + code:7e14f7/72 + cheat + description:Slot 1 - Fire Ring + code:7e14f7/73 + cheat + description:Slot 1 - Ice Ring + code:7e14f7/74 + cheat + description:Slot 1 - Electro Ring + code:7e14f7/75 + cheat + description:Slot 1 - Flash Ring + code:7e14f7/76 + cheat + description:Slot 1 - Flame Ring + code:7e14f7/77 + cheat + description:Slot 1 - Water Ring + code:7e14f7/78 + cheat + description:Slot 1 - Blast Ring + code:7e14f7/79 + cheat + description:Slot 1 - Frost Ring + code:7e14f7/7a + cheat + description:Slot 1 - Might Armor + code:7e14f7/7b + cheat + description:Slot 1 - Might Shield + code:7e14f7/7c + cheat + description:Slot 1 - Might Helmet + code:7e14f7/7d + cheat + description:Slot 1 - Gloom Ring + code:7e14f7/7e + cheat + description:Slot 1 - Gloom Voice + code:7e14f7/7f + cheat + description:Slot 1 - Dummy (?) + code:7e14f7/80 + cheat + description:Slot 1 - Brone Breast + code:7e14f7/81 + cheat + description:Slot 1 - Carbo Sword + code:7e14f7/82 + cheat + description:Slot 1 - Carbo Plate + code:7e14f7/83 + cheat + description:Slot 1 - Carbo Shield + code:7e14f7/84 + cheat + description:Slot 1 - Carbo Helm + code:7e14f7/85 + cheat + description:Slot 1 - Carbo Cap + code:7e14f7/86 + cheat + description:Slot 1 - Gloom Guard + code:7e14f7/87 + cheat + description:Slot 1 - Diamond Ring + code:7e14f7/88 + cheat + description:Slot 1 - Engage Ring + code:7e14f7/89 + cheat + description:Slot 1 - Monster Ring + code:7e14f7/8a + cheat + description:Slot 1 - Blue Ring + code:7e14f7/8b + cheat + description:Slot 1 - Yellow Ring + code:7e14f7/8c + cheat + description:Slot 1 - Red Ring + code:7e14f7/8d + cheat + description:Slot 1 - Purple Ring + code:7e14f7/8e + cheat + description:Slot 1 - Green Ring + code:7e14f7/8f + cheat + description:Slot 1 - White Ring + code:7e14f7/90 + cheat + description:Slot 1 - Black Ring + code:7e14f7/91 + cheat + description:Slot 1 - Heavy Ring + code:7e14f7/92 + cheat + description:Slot 1 - Wave Ring + code:7e14f7/93 + cheat + description:Slot 1 - Potion + code:7e14f7/94 + cheat + description:Slot 1 - Hi Potion + code:7e14f7/95 + cheat + description:Slot 1 - Ex Potion + code:7e14f7/96 + cheat + description:Slot 1 - Hi Magic + code:7e14f7/97 + cheat + description:Slot 1 - Ex Magic + code:7e14f7/98 + cheat + description:Slot 1 - Antidote + code:7e14f7/99 + cheat + description:Slot 1 - Sweet Water + code:7e14f7/9a + cheat + description:Slot 1 - Foul Water + code:7e14f7/9b + cheat + description:Slot 1 - Awaken + code:7e14f7/9c + cheat + description:Slot 1 - Stone Cure + code:7e14f7/9d + cheat + description:Slot 1 - Mystery Pin + code:7e14f7/9e + cheat + description:Slot 1 - Shriek + code:7e14f7/9f + cheat + description:Slot 1 - Swing Wing + code:7e14f7/a0 + cheat + description:Slot 1 - Magic Guard + code:7e14f7/a1 + cheat + description:Slot 1 - Power Gourd + code:7e14f7/a2 + cheat + description:Slot 1 - Mind Gourd + code:7e14f7/a3 + cheat + description:Slot 1 - Power Potion + code:7e14f7/a4 + cheat + description:Slot 1 - Spell Potion + code:7e14f7/a5 + cheat + description:Slot 1 - Speed Potion + code:7e14f7/a6 + cheat + description:Slot 1 - Mind Potion + code:7e14f7/a7 + cheat + description:Slot 1 - Great Potion + code:7e14f7/a8 + cheat + description:Slot 1 - Float + code:7e14f7/a9 + cheat + description:Slot 1 - Smoke Ball + code:7e14f7/aa + cheat + description:Slot 1 - Arrow + code:7e14f7/ab + cheat + description:Slot 1 - Mid Arrow + code:7e14f7/ac + cheat + description:Slot 1 - Big Arrow + code:7e14f7/ad + cheat + description:Slot 1 - Arrows + code:7e14f7/ae + cheat + description:Slot 1 - Hi Arrows + code:7e14f7/af + cheat + description:Slot 1 - Ex Arrows + code:7e14f7/b0 + cheat + description:Slot 1 - Dragon Arrow + code:7e14f7/b1 + cheat + description:Slot 1 - Sleep Arrow + code:7e14f7/b2 + cheat + description:Slot 1 - Puzzle Arrow + code:7e14f7/b3 + cheat + description:Slot 1 - Stun Arrow + code:7e14f7/b4 + cheat + description:Slot 1 - Gloom Arrow + code:7e14f7/b5 + cheat + description:Slot 1 - Bomb + code:7e14f7/b6 + cheat + description:Slot 1 - Hi Bomb + code:7e14f7/b7 + cheat + description:Slot 1 - Ex Bomb + code:7e14f7/b8 + cheat + description:Slot 1 - Miracle + code:7e14f7/b9 + cheat + description:Slot 1 - Revive + code:7e14f7/ba + cheat + description:Slot 1 - Pear Cider + code:7e14f7/bb + cheat + description:Slot 1 - Sour Cider + code:7e14f7/bc + cheat + description:Slot 1 - Lime Cider + code:7e14f7/bd + cheat + description:Slot 1 - Plum Cider + code:7e14f7/be + cheat + description:Slot 1 - Apple Cider + code:7e14f7/bf + cheat + description:Slot 1 - Hair Band + code:7e14f7/c0 + cheat + description:Slot 1 - Brooch + code:7e14f7/c1 + cheat + description:Slot 1 - Earring + code:7e14f7/c2 + cheat + description:Slot 1 - Necklace + code:7e14f7/c3 + cheat + description:Slot 1 - Stuffed Bear + code:7e14f7/c4 + cheat + description:Slot 1 - Stuffed Dog + code:7e14f7/c5 + cheat + description:Slot 1 - Stuffed Pig + code:7e14f7/c6 + cheat + description:Slot 1 - Emerald + code:7e14f7/c7 + cheat + description:Slot 1 - Opal + code:7e14f7/c8 + cheat + description:Slot 1 - Goblet + code:7e14f7/c9 + cheat + description:Slot 1 - Ear Tip + code:7e14f7/ca + cheat + description:Slot 1 - Empty Bottle + code:7e14f7/cb + cheat + description:Slot 1 - Gown + code:7e14f7/cc + cheat + description:Slot 1 - Ribbon + code:7e14f7/cd + cheat + description:Slot 1 - Fry Pan + code:7e14f7/ce + cheat + description:Slot 1 - Small Knife + code:7e14f7/cf + cheat + description:Slot 1 - Pot + code:7e14f7/d0 + cheat + description:Slot 1 - Chop Block + code:7e14f7/d1 + cheat + description:Slot 1 - Apron + code:7e14f7/d2 + cheat + description:Slot 1 - Dragon Egg + code:7e14f7/d3 + cheat + description:Slot 1 - Crown + code:7e14f7/d4 + cheat + description:Slot 1 - Secret Map + code:7e14f7/d5 + cheat + description:Slot 1 - Miracle Gem + code:7e14f7/d6 + cheat + description:Slot 1 - Silver Wick + code:7e14f7/d7 + cheat + description:Slot 1 - Royal Statue + code:7e14f7/d8 + cheat + description:Slot 1 - Silver Tarot + code:7e14f7/d9 + cheat + description:Slot 1 - Golden Pawn + code:7e14f7/da + cheat + description:Slot 1 - Crown Jewels + code:7e14f7/db + cheat + description:Slot 1 - Wind Flute + code:7e14f7/dc + cheat + description:Slot 1 - Escape + code:7e14f7/dd + cheat + description:Slot 1 - Magic Jar + code:7e14f7/de + cheat + description:Slot 1 - Dragon Tooth + code:7e14f7/df + cheat + description:Slot 1 - Grilled Newt + code:7e14f7/e0 + cheat + description:Slot 1 - Poison Pin + code:7e14f7/e1 + cheat + description:Slot 1 - Might Sword + code:7e14f7/e2 + cheat + description:Slot 1 - Straw Doll + code:7e14f7/e3 + cheat + description:Slot 1 - Long Nail + code:7e14f7/e4 + cheat + description:Slot 1 - Bomb + code:7e14f7/e5 + cheat + description:Slot 1 - Alumina + code:7e14f7/e6 + cheat + description:Slot 1 - Power Oil + code:7e14f7/e7 + cheat + description:Slot 1 - Elven Bow + code:7e14f7/e8 + cheat + description:Slot 1 - Artea's Bow + code:7e14f7/e9 + cheat + description:Slot 1 - Might Bow + code:7e14f7/ea + cheat + description:Slot 1 - Dummy (?) + code:7e14f7/eb + cheat + description:Slot 1 - Dummy (?) + code:7e14f7/ec + cheat + description:Slot 1 - Dummy (?) + code:7e14f7/ed + cheat + description:Slot 1 - Dummy (?) + code:7e14f7/ee + cheat + description:Slot 1 - Free Door + code:7e14f7/ef + cheat + description:Slot 1 - Sheran Key + code:7e14f7/f0 + cheat + description:Slot 1 - Letter + code:7e14f7/f1 + cheat + description:Slot 1 - Dais Key + code:7e14f7/f2 + cheat + description:Slot 1 - Shrine Key + code:7e14f7/f3 + cheat + description:Slot 1 - Pirate Key + code:7e14f7/f4 + cheat + description:Slot 1 - Light Key + code:7e14f7/f5 + cheat + description:Slot 1 - Oil Key + code:7e14f7/f6 + cheat + description:Slot 1 - Green Jade + code:7e14f7/f7 + cheat + description:Slot 1 - Red Sapphire + code:7e14f7/f8 + cheat + description:Slot 1 - Blue Jade + code:7e14f7/f9 + cheat + description:Slot 1 - Purple Newt + code:7e14f7/fa + cheat + description:Slot 1 - Glasdar Key + code:7e14f7/fb + cheat + description:Slot 1 - Magic Flavor + code:7e14f7/fc + cheat + description:Slot 1 - Fairy Kiss + code:7e14f7/fd + cheat + description:Slot 2 - Nothing + code:7e14f9/00 + cheat + description:Slot 2 - Knife + code:7e14f9/01 + cheat + description:Slot 2 - Club + code:7e14f9/02 + cheat + description:Slot 2 - Mace + code:7e14f9/03 + cheat + description:Slot 2 - Dagger + code:7e14f9/04 + cheat + description:Slot 2 - Long Knife + code:7e14f9/05 + cheat + description:Slot 2 - Short Sword + code:7e14f9/06 + cheat + description:Slot 2 - Rod + code:7e14f9/07 + cheat + description:Slot 2 - Gladius + code:7e14f9/08 + cheat + description:Slot 2 - Glass Robe + code:7e14f9/09 + cheat + description:Slot 2 - Brone Sword + code:7e14f9/0a + cheat + description:Slot 2 - Staff + code:7e14f9/0b + cheat + description:Slot 2 - Scimitar + code:7e14f9/0c + cheat + description:Slot 2 - Rapier + code:7e14f9/0d + cheat + description:Slot 2 - Long Sword + code:7e14f9/0e + cheat + description:Slot 2 - Long Staff + code:7e14f9/0f + cheat + description:Slot 2 - Axe + code:7e14f9/10 + cheat + description:Slot 2 - Spear + code:7e14f9/11 + cheat + description:Slot 2 - Morning Star + code:7e14f9/12 + cheat + description:Slot 2 - Catwhip + code:7e14f9/13 + cheat + description:Slot 2 - Battle Axe + code:7e14f9/14 + cheat + description:Slot 2 - Hammer Rod + code:7e14f9/15 + cheat + description:Slot 2 - Trident + code:7e14f9/16 + cheat + description:Slot 2 - Silver Rod + code:7e14f9/17 + cheat + description:Slot 2 - Silver Sword + code:7e14f9/18 + cheat + description:Slot 2 - Buster Sword + code:7e14f9/19 + cheat + description:Slot 2 - Zircon Rod + code:7e14f9/1a + cheat + description:Slot 2 - Great Axe + code:7e14f9/1b + cheat + description:Slot 2 - Great Blade + code:7e14f9/1c + cheat + description:Slot 2 - Zircon Axe + code:7e14f9/1d + cheat + description:Slot 2 - Zircon Sword + code:7e14f9/1e + cheat + description:Slot 2 - Broad Sword + code:7e14f9/1f + cheat + description:Slot 2 - Broad Rod + code:7e14f9/20 + cheat + description:Slot 2 - Luck Blade + code:7e14f9/21 + cheat + description:Slot 2 - Gloom Pick + code:7e14f9/22 + cheat + description:Slot 2 - Dual Blade + code:7e14f9/23 + cheat + description:Slot 2 - Dress + code:7e14f9/24 + cheat + description:Slot 2 - Cloth + code:7e14f9/25 + cheat + description:Slot 2 - Cloth Armor + code:7e14f9/26 + cheat + description:Slot 2 - Robe + code:7e14f9/27 + cheat + description:Slot 2 - Tan Armor + code:7e14f9/28 + cheat + description:Slot 2 - Tan Robe + code:7e14f9/29 + cheat + description:Slot 2 - Light Armor + code:7e14f9/2a + cheat + description:Slot 2 - Light Robe + code:7e14f9/2b + cheat + description:Slot 2 - Chain Mail + code:7e14f9/2c + cheat + description:Slot 2 - Chain Cloth + code:7e14f9/2d + cheat + description:Slot 2 - Plate Cloth + code:7e14f9/2e + cheat + description:Slot 2 - Brone Armor + code:7e14f9/2f + cheat + description:Slot 2 - Quilted Silk + code:7e14f9/30 + cheat + description:Slot 2 - Half Mail + code:7e14f9/31 + cheat + description:Slot 2 - Brone Robe + code:7e14f9/32 + cheat + description:Slot 2 - Silver Armor + code:7e14f9/33 + cheat + description:Slot 2 - Silver Robe + code:7e14f9/34 + cheat + description:Slot 2 - Plate Mail + code:7e14f9/35 + cheat + description:Slot 2 - Zircon Robe + code:7e14f9/36 + cheat + description:Slot 2 - Zircon Armor + code:7e14f9/37 + cheat + description:Slot 2 - Clear Silk + code:7e14f9/38 + cheat + description:Slot 2 - Bracelet + code:7e14f9/39 + cheat + description:Slot 2 - Tan Shield + code:7e14f9/3a + cheat + description:Slot 2 - Wood Shield + code:7e14f9/3b + cheat + description:Slot 2 - Buckler + code:7e14f9/3c + cheat + description:Slot 2 - Wood Wrist + code:7e14f9/3d + cheat + description:Slot 2 - Kite Shield + code:7e14f9/3e + cheat + description:Slot 2 - Round Shield + code:7e14f9/3f + cheat + description:Slot 2 - Round Wrist + code:7e14f9/40 + cheat + description:Slot 2 - Brone Shield + code:7e14f9/41 + cheat + description:Slot 2 - Tower Shield + code:7e14f9/42 + cheat + description:Slot 2 - Large Shield + code:7e14f9/43 + cheat + description:Slot 2 - Silver Wrist + code:7e14f9/44 + cheat + description:Slot 2 - Silver Plate + code:7e14f9/45 + cheat + description:Slot 2 - Zircon Wrist + code:7e14f9/46 + cheat + description:Slot 2 - Zircon Plate + code:7e14f9/47 + cheat + description:Slot 2 - Cloth Helm + code:7e14f9/48 + cheat + description:Slot 2 - Tan Helm + code:7e14f9/49 + cheat + description:Slot 2 - Hair Band + code:7e14f9/4a + cheat + description:Slot 2 - Wood Helm + code:7e14f9/4b + cheat + description:Slot 2 - Glass Cap + code:7e14f9/4c + cheat + description:Slot 2 - Brone Helm + code:7e14f9/4d + cheat + description:Slot 2 - Red Beret + code:7e14f9/4e + cheat + description:Slot 2 - Iron Helm + code:7e14f9/4f + cheat + description:Slot 2 - Plate Cap + code:7e14f9/50 + cheat + description:Slot 2 - Plate Helm + code:7e14f9/51 + cheat + description:Slot 2 - Glass Beret + code:7e14f9/52 + cheat + description:Slot 2 - Silver Helm + code:7e14f9/53 + cheat + description:Slot 2 - Sakret + code:7e14f9/54 + cheat + description:Slot 2 - Zircon Beret + code:7e14f9/55 + cheat + description:Slot 2 - Zircon Helm + code:7e14f9/56 + cheat + description:Slot 2 - Sandal + code:7e14f9/57 + cheat + description:Slot 2 - Cloth Shoes + code:7e14f9/58 + cheat + description:Slot 2 - Tan Shoes + code:7e14f9/59 + cheat + description:Slot 2 - Spike Shoes + code:7e14f9/5a + cheat + description:Slot 2 - Heeled Shoes + code:7e14f9/5b + cheat + description:Slot 2 - Wind Shoes + code:7e14f9/5c + cheat + description:Slot 2 - Wind Heels + code:7e14f9/5d + cheat + description:Slot 2 - Knife Shoes + code:7e14f9/5e + cheat + description:Slot 2 - Needle Heels + code:7e14f9/5f + cheat + description:Slot 2 - Sonic Shoes + code:7e14f9/60 + cheat + description:Slot 2 - Sonic Heels + code:7e14f9/61 + cheat + description:Slot 2 - Sword Shoes + code:7e14f9/62 + cheat + description:Slot 2 - Cat Heels + code:7e14f9/63 + cheat + description:Slot 2 - Mach Shoes + code:7e14f9/64 + cheat + description:Slot 2 - Mach Heels + code:7e14f9/65 + cheat + description:Slot 2 - Power Ring + code:7e14f9/66 + cheat + description:Slot 2 - HiPower Ring + code:7e14f9/67 + cheat + description:Slot 2 - Daze Ring + code:7e14f9/68 + cheat + description:Slot 2 - Hi Daze Ring + code:7e14f9/69 + cheat + description:Slot 2 - Mind Ring + code:7e14f9/6a + cheat + description:Slot 2 - Sonic Ring + code:7e14f9/6b + cheat + description:Slot 2 - Mach Ring + code:7e14f9/6c + cheat + description:Slot 2 - Undead Ring + code:7e14f9/6d + cheat + description:Slot 2 - Ghost Ring + code:7e14f9/6e + cheat + description:Slot 2 - Dragon Ring + code:7e14f9/6f + cheat + description:Slot 2 - Sea Ring + code:7e14f9/70 + cheat + description:Slot 2 - Fly Ring + code:7e14f9/71 + cheat + description:Slot 2 - Water Ring + code:7e14f9/72 + cheat + description:Slot 2 - Fire Ring + code:7e14f9/73 + cheat + description:Slot 2 - Ice Ring + code:7e14f9/74 + cheat + description:Slot 2 - Electro Ring + code:7e14f9/75 + cheat + description:Slot 2 - Flash Ring + code:7e14f9/76 + cheat + description:Slot 2 - Flame Ring + code:7e14f9/77 + cheat + description:Slot 2 - Water Ring + code:7e14f9/78 + cheat + description:Slot 2 - Blast Ring + code:7e14f9/79 + cheat + description:Slot 2 - Frost Ring + code:7e14f9/7a + cheat + description:Slot 2 - Might Armor + code:7e14f9/7b + cheat + description:Slot 2 - Might Shield + code:7e14f9/7c + cheat + description:Slot 2 - Might Helmet + code:7e14f9/7d + cheat + description:Slot 2 - Gloom Ring + code:7e14f9/7e + cheat + description:Slot 2 - Gloom Voice + code:7e14f9/7f + cheat + description:Slot 2 - Dummy (?) + code:7e14f9/80 + cheat + description:Slot 2 - Brone Breast + code:7e14f9/81 + cheat + description:Slot 2 - Carbo Sword + code:7e14f9/82 + cheat + description:Slot 2 - Carbo Plate + code:7e14f9/83 + cheat + description:Slot 2 - Carbo Shield + code:7e14f9/84 + cheat + description:Slot 2 - Carbo Helm + code:7e14f9/85 + cheat + description:Slot 2 - Carbo Cap + code:7e14f9/86 + cheat + description:Slot 2 - Gloom Guard + code:7e14f9/87 + cheat + description:Slot 2 - Diamond Ring + code:7e14f9/88 + cheat + description:Slot 2 - Engage Ring + code:7e14f9/89 + cheat + description:Slot 2 - Monster Ring + code:7e14f9/8a + cheat + description:Slot 2 - Blue Ring + code:7e14f9/8b + cheat + description:Slot 2 - Yellow Ring + code:7e14f9/8c + cheat + description:Slot 2 - Red Ring + code:7e14f9/8d + cheat + description:Slot 2 - Purple Ring + code:7e14f9/8e + cheat + description:Slot 2 - Green Ring + code:7e14f9/8f + cheat + description:Slot 2 - White Ring + code:7e14f9/90 + cheat + description:Slot 2 - Black Ring + code:7e14f9/91 + cheat + description:Slot 2 - Heavy Ring + code:7e14f9/92 + cheat + description:Slot 2 - Wave Ring + code:7e14f9/93 + cheat + description:Slot 2 - Potion + code:7e14f9/94 + cheat + description:Slot 2 - Hi Potion + code:7e14f9/95 + cheat + description:Slot 2 - Ex Potion + code:7e14f9/96 + cheat + description:Slot 2 - Hi Magic + code:7e14f9/97 + cheat + description:Slot 2 - Ex Magic + code:7e14f9/98 + cheat + description:Slot 2 - Antidote + code:7e14f9/99 + cheat + description:Slot 2 - Sweet Water + code:7e14f9/9a + cheat + description:Slot 2 - Foul Water + code:7e14f9/9b + cheat + description:Slot 2 - Awaken + code:7e14f9/9c + cheat + description:Slot 2 - Stone Cure + code:7e14f9/9d + cheat + description:Slot 2 - Mystery Pin + code:7e14f9/9e + cheat + description:Slot 2 - Shriek + code:7e14f9/9f + cheat + description:Slot 2 - Swing Wing + code:7e14f9/a0 + cheat + description:Slot 2 - Magic Guard + code:7e14f9/a1 + cheat + description:Slot 2 - Power Gourd + code:7e14f9/a2 + cheat + description:Slot 2 - Mind Gourd + code:7e14f9/a3 + cheat + description:Slot 2 - Power Potion + code:7e14f9/a4 + cheat + description:Slot 2 - Spell Potion + code:7e14f9/a5 + cheat + description:Slot 2 - Speed Potion + code:7e14f9/a6 + cheat + description:Slot 2 - Mind Potion + code:7e14f9/a7 + cheat + description:Slot 2 - Great Potion + code:7e14f9/a8 + cheat + description:Slot 2 - Float + code:7e14f9/a9 + cheat + description:Slot 2 - Smoke Ball + code:7e14f9/aa + cheat + description:Slot 2 - Arrow + code:7e14f9/ab + cheat + description:Slot 2 - Mid Arrow + code:7e14f9/ac + cheat + description:Slot 2 - Big Arrow + code:7e14f9/ad + cheat + description:Slot 2 - Arrows + code:7e14f9/ae + cheat + description:Slot 2 - Hi Arrows + code:7e14f9/af + cheat + description:Slot 2 - Ex Arrows + code:7e14f9/b0 + cheat + description:Slot 2 - Dragon Arrow + code:7e14f9/b1 + cheat + description:Slot 2 - Sleep Arrow + code:7e14f9/b2 + cheat + description:Slot 2 - Puzzle Arrow + code:7e14f9/b3 + cheat + description:Slot 2 - Stun Arrow + code:7e14f9/b4 + cheat + description:Slot 2 - Gloom Arrow + code:7e14f9/b5 + cheat + description:Slot 2 - Bomb + code:7e14f9/b6 + cheat + description:Slot 2 - Hi Bomb + code:7e14f9/b7 + cheat + description:Slot 2 - Ex Bomb + code:7e14f9/b8 + cheat + description:Slot 2 - Miracle + code:7e14f9/b9 + cheat + description:Slot 2 - Revive + code:7e14f9/ba + cheat + description:Slot 2 - Pear Cider + code:7e14f9/bb + cheat + description:Slot 2 - Sour Cider + code:7e14f9/bc + cheat + description:Slot 2 - Lime Cider + code:7e14f9/bd + cheat + description:Slot 2 - Plum Cider + code:7e14f9/be + cheat + description:Slot 2 - Apple Cider + code:7e14f9/bf + cheat + description:Slot 2 - Hair Band + code:7e14f9/c0 + cheat + description:Slot 2 - Brooch + code:7e14f9/c1 + cheat + description:Slot 2 - Earring + code:7e14f9/c2 + cheat + description:Slot 2 - Necklace + code:7e14f9/c3 + cheat + description:Slot 2 - Stuffed Bear + code:7e14f9/c4 + cheat + description:Slot 2 - Stuffed Dog + code:7e14f9/c5 + cheat + description:Slot 2 - Stuffed Pig + code:7e14f9/c6 + cheat + description:Slot 2 - Emerald + code:7e14f9/c7 + cheat + description:Slot 2 - Opal + code:7e14f9/c8 + cheat + description:Slot 2 - Goblet + code:7e14f9/c9 + cheat + description:Slot 2 - Ear Tip + code:7e14f9/ca + cheat + description:Slot 2 - Empty Bottle + code:7e14f9/cb + cheat + description:Slot 2 - Gown + code:7e14f9/cc + cheat + description:Slot 2 - Ribbon + code:7e14f9/cd + cheat + description:Slot 2 - Fry Pan + code:7e14f9/ce + cheat + description:Slot 2 - Small Knife + code:7e14f9/cf + cheat + description:Slot 2 - Pot + code:7e14f9/d0 + cheat + description:Slot 2 - Chop Block + code:7e14f9/d1 + cheat + description:Slot 2 - Apron + code:7e14f9/d2 + cheat + description:Slot 2 - Dragon Egg + code:7e14f9/d3 + cheat + description:Slot 2 - Crown + code:7e14f9/d4 + cheat + description:Slot 2 - Secret Map + code:7e14f9/d5 + cheat + description:Slot 2 - Miracle Gem + code:7e14f9/d6 + cheat + description:Slot 2 - Silver Wick + code:7e14f9/d7 + cheat + description:Slot 2 - Royal Statue + code:7e14f9/d8 + cheat + description:Slot 2 - Silver Tarot + code:7e14f9/d9 + cheat + description:Slot 2 - Golden Pawn + code:7e14f9/da + cheat + description:Slot 2 - Crown Jewels + code:7e14f9/db + cheat + description:Slot 2 - Wind Flute + code:7e14f9/dc + cheat + description:Slot 2 - Escape + code:7e14f9/dd + cheat + description:Slot 2 - Magic Jar + code:7e14f9/de + cheat + description:Slot 2 - Dragon Tooth + code:7e14f9/df + cheat + description:Slot 2 - Grilled Newt + code:7e14f9/e0 + cheat + description:Slot 2 - Poison Pin + code:7e14f9/e1 + cheat + description:Slot 2 - Might Sword + code:7e14f9/e2 + cheat + description:Slot 2 - Straw Doll + code:7e14f9/e3 + cheat + description:Slot 2 - Long Nail + code:7e14f9/e4 + cheat + description:Slot 2 - Bomb + code:7e14f9/e5 + cheat + description:Slot 2 - Alumina + code:7e14f9/e6 + cheat + description:Slot 2 - Power Oil + code:7e14f9/e7 + cheat + description:Slot 2 - Elven Bow + code:7e14f9/e8 + cheat + description:Slot 2 - Artea's Bow + code:7e14f9/e9 + cheat + description:Slot 2 - Might Bow + code:7e14f9/ea + cheat + description:Slot 2 - Dummy (?) + code:7e14f9/eb + cheat + description:Slot 2 - Dummy (?) + code:7e14f9/ec + cheat + description:Slot 2 - Dummy (?) + code:7e14f9/ed + cheat + description:Slot 2 - Dummy (?) + code:7e14f9/ee + cheat + description:Slot 2 - Free Door + code:7e14f9/ef + cheat + description:Slot 2 - Sheran Key + code:7e14f9/f0 + cheat + description:Slot 2 - Letter + code:7e14f9/f1 + cheat + description:Slot 2 - Dais Key + code:7e14f9/f2 + cheat + description:Slot 2 - Shrine Key + code:7e14f9/f3 + cheat + description:Slot 2 - Pirate Key + code:7e14f9/f4 + cheat + description:Slot 2 - Light Key + code:7e14f9/f5 + cheat + description:Slot 2 - Oil Key + code:7e14f9/f6 + cheat + description:Slot 2 - Green Jade + code:7e14f9/f9 + cheat + description:Slot 2 - Red Sapphire + code:7e14f9/f8 + cheat + description:Slot 2 - Blue Jade + code:7e14f9/f9 + cheat + description:Slot 2 - Purple Newt + code:7e14f9/fa + cheat + description:Slot 2 - Glasdar Key + code:7e14f9/fb + cheat + description:Slot 2 - Magic Flavor + code:7e14f9/fc + cheat + description:Slot 2 - Fairy Kiss + code:7e14f9/fd + cheat + description:Slot 3 - Nothing + code:7e14fb/00 + cheat + description:Slot 3 - Knife + code:7e14fb/01 + cheat + description:Slot 3 - Club + code:7e14fb/02 + cheat + description:Slot 3 - Mace + code:7e14fb/03 + cheat + description:Slot 3 - Dagger + code:7e14fb/04 + cheat + description:Slot 3 - Long Knife + code:7e14fb/05 + cheat + description:Slot 3 - Short Sword + code:7e14fb/06 + cheat + description:Slot 3 - Rod + code:7e14fb/07 + cheat + description:Slot 3 - Gladius + code:7e14fb/08 + cheat + description:Slot 3 - Glass Robe + code:7e14fb/09 + cheat + description:Slot 3 - Brone Sword + code:7e14fb/0a + cheat + description:Slot 3 - Staff + code:7e14fb/0b + cheat + description:Slot 3 - Scimitar + code:7e14fb/0c + cheat + description:Slot 3 - Rapier + code:7e14fb/0d + cheat + description:Slot 3 - Long Sword + code:7e14fb/0e + cheat + description:Slot 3 - Long Staff + code:7e14fb/0f + cheat + description:Slot 3 - Axe + code:7e14fb/10 + cheat + description:Slot 3 - Spear + code:7e14fb/11 + cheat + description:Slot 3 - Morning Star + code:7e14fb/12 + cheat + description:Slot 3 - Catwhip + code:7e14fb/13 + cheat + description:Slot 3 - Battle Axe + code:7e14fb/14 + cheat + description:Slot 3 - Hammer Rod + code:7e14fb/15 + cheat + description:Slot 3 - Trident + code:7e14fb/16 + cheat + description:Slot 3 - Silver Rod + code:7e14fb/17 + cheat + description:Slot 3 - Silver Sword + code:7e14fb/18 + cheat + description:Slot 3 - Buster Sword + code:7e14fb/19 + cheat + description:Slot 3 - Zircon Rod + code:7e14fb/1a + cheat + description:Slot 3 - Great Axe + code:7e14fb/1b + cheat + description:Slot 3 - Great Blade + code:7e14fb/1c + cheat + description:Slot 3 - Zircon Axe + code:7e14fb/1d + cheat + description:Slot 3 - Zircon Sword + code:7e14fb/1e + cheat + description:Slot 3 - Broad Sword + code:7e14fb/1f + cheat + description:Slot 3 - Broad Rod + code:7e14fb/20 + cheat + description:Slot 3 - Luck Blade + code:7e14fb/21 + cheat + description:Slot 3 - Gloom Pick + code:7e14fb/22 + cheat + description:Slot 3 - Dual Blade + code:7e14fb/23 + cheat + description:Slot 3 - Dress + code:7e14fb/24 + cheat + description:Slot 3 - Cloth + code:7e14fb/25 + cheat + description:Slot 3 - Cloth Armor + code:7e14fb/26 + cheat + description:Slot 3 - Robe + code:7e14fb/27 + cheat + description:Slot 3 - Tan Armor + code:7e14fb/28 + cheat + description:Slot 3 - Tan Robe + code:7e14fb/29 + cheat + description:Slot 3 - Light Armor + code:7e14fb/2a + cheat + description:Slot 3 - Light Robe + code:7e14fb/2b + cheat + description:Slot 3 - Chain Mail + code:7e14fb/2c + cheat + description:Slot 3 - Chain Cloth + code:7e14fb/2d + cheat + description:Slot 3 - Plate Cloth + code:7e14fb/2e + cheat + description:Slot 3 - Brone Armor + code:7e14fb/2f + cheat + description:Slot 3 - Quilted Silk + code:7e14fb/30 + cheat + description:Slot 3 - Half Mail + code:7e14fb/31 + cheat + description:Slot 3 - Brone Robe + code:7e14fb/32 + cheat + description:Slot 3 - Silver Armor + code:7e14fb/33 + cheat + description:Slot 3 - Silver Robe + code:7e14fb/34 + cheat + description:Slot 3 - Plate Mail + code:7e14fb/35 + cheat + description:Slot 3 - Zircon Robe + code:7e14fb/36 + cheat + description:Slot 3 - Zircon Armor + code:7e14fb/37 + cheat + description:Slot 3 - Clear Silk + code:7e14fb/38 + cheat + description:Slot 3 - Bracelet + code:7e14fb/39 + cheat + description:Slot 3 - Tan Shield + code:7e14fb/3a + cheat + description:Slot 3 - Wood Shield + code:7e14fb/3b + cheat + description:Slot 3 - Buckler + code:7e14fb/3c + cheat + description:Slot 3 - Wood Wrist + code:7e14fb/3d + cheat + description:Slot 3 - Kite Shield + code:7e14fb/3e + cheat + description:Slot 3 - Round Shield + code:7e14fb/3f + cheat + description:Slot 3 - Round Wrist + code:7e14fb/40 + cheat + description:Slot 3 - Brone Shield + code:7e14fb/41 + cheat + description:Slot 3 - Tower Shield + code:7e14fb/42 + cheat + description:Slot 3 - Large Shield + code:7e14fb/43 + cheat + description:Slot 3 - Silver Wrist + code:7e14fb/44 + cheat + description:Slot 3 - Silver Plate + code:7e14fb/45 + cheat + description:Slot 3 - Zircon Wrist + code:7e14fb/46 + cheat + description:Slot 3 - Zircon Plate + code:7e14fb/47 + cheat + description:Slot 3 - Cloth Helm + code:7e14fb/48 + cheat + description:Slot 3 - Tan Helm + code:7e14fb/49 + cheat + description:Slot 3 - Hair Band + code:7e14fb/4a + cheat + description:Slot 3 - Wood Helm + code:7e14fb/4b + cheat + description:Slot 3 - Glass Cap + code:7e14fb/4c + cheat + description:Slot 3 - Brone Helm + code:7e14fb/4d + cheat + description:Slot 3 - Red Beret + code:7e14fb/4e + cheat + description:Slot 3 - Iron Helm + code:7e14fb/4f + cheat + description:Slot 3 - Plate Cap + code:7e14fb/50 + cheat + description:Slot 3 - Plate Helm + code:7e14fb/51 + cheat + description:Slot 3 - Glass Beret + code:7e14fb/52 + cheat + description:Slot 3 - Silver Helm + code:7e14fb/53 + cheat + description:Slot 3 - Sakret + code:7e14fb/54 + cheat + description:Slot 3 - Zircon Beret + code:7e14fb/55 + cheat + description:Slot 3 - Zircon Helm + code:7e14fb/56 + cheat + description:Slot 3 - Sandal + code:7e14fb/57 + cheat + description:Slot 3 - Cloth Shoes + code:7e14fb/58 + cheat + description:Slot 3 - Tan Shoes + code:7e14fb/59 + cheat + description:Slot 3 - Spike Shoes + code:7e14fb/5a + cheat + description:Slot 3 - Heeled Shoes + code:7e14fb/5b + cheat + description:Slot 3 - Wind Shoes + code:7e14fb/5c + cheat + description:Slot 3 - Wind Heels + code:7e14fb/5d + cheat + description:Slot 3 - Knife Shoes + code:7e14fb/5e + cheat + description:Slot 3 - Needle Heels + code:7e14fb/5f + cheat + description:Slot 3 - Sonic Shoes + code:7e14fb/60 + cheat + description:Slot 3 - Sonic Heels + code:7e14fb/61 + cheat + description:Slot 3 - Sword Shoes + code:7e14fb/62 + cheat + description:Slot 3 - Cat Heels + code:7e14fb/63 + cheat + description:Slot 3 - Mach Shoes + code:7e14fb/64 + cheat + description:Slot 3 - Mach Heels + code:7e14fb/65 + cheat + description:Slot 3 - Power Ring + code:7e14fb/66 + cheat + description:Slot 3 - HiPower Ring + code:7e14fb/67 + cheat + description:Slot 3 - Daze Ring + code:7e14fb/68 + cheat + description:Slot 3 - Hi Daze Ring + code:7e14fb/69 + cheat + description:Slot 3 - Mind Ring + code:7e14fb/6a + cheat + description:Slot 3 - Sonic Ring + code:7e14fb/6b + cheat + description:Slot 3 - Mach Ring + code:7e14fb/6c + cheat + description:Slot 3 - Undead Ring + code:7e14fb/6d + cheat + description:Slot 3 - Ghost Ring + code:7e14fb/6e + cheat + description:Slot 3 - Dragon Ring + code:7e14fb/6f + cheat + description:Slot 3 - Sea Ring + code:7e14fb/70 + cheat + description:Slot 3 - Fly Ring + code:7e14fb/71 + cheat + description:Slot 3 - Water Ring + code:7e14fb/72 + cheat + description:Slot 3 - Fire Ring + code:7e14fb/73 + cheat + description:Slot 3 - Ice Ring + code:7e14fb/74 + cheat + description:Slot 3 - Electro Ring + code:7e14fb/75 + cheat + description:Slot 3 - Flash Ring + code:7e14fb/76 + cheat + description:Slot 3 - Flame Ring + code:7e14fb/77 + cheat + description:Slot 3 - Water Ring + code:7e14fb/78 + cheat + description:Slot 3 - Blast Ring + code:7e14fb/79 + cheat + description:Slot 3 - Frost Ring + code:7e14fb/7a + cheat + description:Slot 3 - Might Armor + code:7e14fb/7b + cheat + description:Slot 3 - Might Shield + code:7e14fb/7c + cheat + description:Slot 3 - Might Helmet + code:7e14fb/7d + cheat + description:Slot 3 - Gloom Ring + code:7e14fb/7e + cheat + description:Slot 3 - Gloom Voice + code:7e14fb/7f + cheat + description:Slot 3 - Dummy (?) + code:7e14fb/80 + cheat + description:Slot 3 - Brone Breast + code:7e14fb/81 + cheat + description:Slot 3 - Carbo Sword + code:7e14fb/82 + cheat + description:Slot 3 - Carbo Plate + code:7e14fb/83 + cheat + description:Slot 3 - Carbo Shield + code:7e14fb/84 + cheat + description:Slot 3 - Carbo Helm + code:7e14fb/85 + cheat + description:Slot 3 - Carbo Cap + code:7e14fb/86 + cheat + description:Slot 3 - Gloom Guard + code:7e14fb/87 + cheat + description:Slot 3 - Diamond Ring + code:7e14fb/88 + cheat + description:Slot 3 - Engage Ring + code:7e14fb/89 + cheat + description:Slot 3 - Monster Ring + code:7e14fb/8a + cheat + description:Slot 3 - Blue Ring + code:7e14fb/8b + cheat + description:Slot 3 - Yellow Ring + code:7e14fb/8c + cheat + description:Slot 3 - Red Ring + code:7e14fb/8d + cheat + description:Slot 3 - Purple Ring + code:7e14fb/8e + cheat + description:Slot 3 - Green Ring + code:7e14fb/8f + cheat + description:Slot 3 - White Ring + code:7e14fb/90 + cheat + description:Slot 3 - Black Ring + code:7e14fb/91 + cheat + description:Slot 3 - Heavy Ring + code:7e14fb/92 + cheat + description:Slot 3 - Wave Ring + code:7e14fb/93 + cheat + description:Slot 3 - Potion + code:7e14fb/94 + cheat + description:Slot 3 - Hi Potion + code:7e14fb/95 + cheat + description:Slot 3 - Ex Potion + code:7e14fb/96 + cheat + description:Slot 3 - Hi Magic + code:7e14fb/97 + cheat + description:Slot 3 - Ex Magic + code:7e14fb/98 + cheat + description:Slot 3 - Antidote + code:7e14fb/99 + cheat + description:Slot 3 - Sweet Water + code:7e14fb/9a + cheat + description:Slot 3 - Foul Water + code:7e14fb/9b + cheat + description:Slot 3 - Awaken + code:7e14fb/9c + cheat + description:Slot 3 - Stone Cure + code:7e14fb/9d + cheat + description:Slot 3 - Mystery Pin + code:7e14fb/9e + cheat + description:Slot 3 - Shriek + code:7e14fb/9f + cheat + description:Slot 3 - Swing Wing + code:7e14fb/a0 + cheat + description:Slot 3 - Magic Guard + code:7e14fb/a1 + cheat + description:Slot 3 - Power Gourd + code:7e14fb/a2 + cheat + description:Slot 3 - Mind Gourd + code:7e14fb/a3 + cheat + description:Slot 3 - Power Potion + code:7e14fb/a4 + cheat + description:Slot 3 - Spell Potion + code:7e14fb/a5 + cheat + description:Slot 3 - Speed Potion + code:7e14fb/a6 + cheat + description:Slot 3 - Mind Potion + code:7e14fb/a7 + cheat + description:Slot 3 - Great Potion + code:7e14fb/a8 + cheat + description:Slot 3 - Float + code:7e14fb/a9 + cheat + description:Slot 3 - Smoke Ball + code:7e14fb/aa + cheat + description:Slot 3 - Arrow + code:7e14fb/ab + cheat + description:Slot 3 - Mid Arrow + code:7e14fb/ac + cheat + description:Slot 3 - Big Arrow + code:7e14fb/ad + cheat + description:Slot 3 - Arrows + code:7e14fb/ae + cheat + description:Slot 3 - Hi Arrows + code:7e14fb/af + cheat + description:Slot 3 - Ex Arrows + code:7e14fb/b0 + cheat + description:Slot 3 - Dragon Arrow + code:7e14fb/b1 + cheat + description:Slot 3 - Sleep Arrow + code:7e14fb/b2 + cheat + description:Slot 3 - Puzzle Arrow + code:7e14fb/b3 + cheat + description:Slot 3 - Stun Arrow + code:7e14fb/b4 + cheat + description:Slot 3 - Gloom Arrow + code:7e14fb/b5 + cheat + description:Slot 3 - Bomb + code:7e14fb/b6 + cheat + description:Slot 3 - Hi Bomb + code:7e14fb/b7 + cheat + description:Slot 3 - Ex Bomb + code:7e14fb/b8 + cheat + description:Slot 3 - Miracle + code:7e14fb/b9 + cheat + description:Slot 3 - Revive + code:7e14fb/ba + cheat + description:Slot 3 - Pear Cider + code:7e14fb/bb + cheat + description:Slot 3 - Sour Cider + code:7e14fb/bc + cheat + description:Slot 3 - Lime Cider + code:7e14fb/bd + cheat + description:Slot 3 - Plum Cider + code:7e14fb/be + cheat + description:Slot 3 - Apple Cider + code:7e14fb/bf + cheat + description:Slot 3 - Hair Band + code:7e14fb/c0 + cheat + description:Slot 3 - Brooch + code:7e14fb/c1 + cheat + description:Slot 3 - Earring + code:7e14fb/c2 + cheat + description:Slot 3 - Necklace + code:7e14fb/c3 + cheat + description:Slot 3 - Stuffed Bear + code:7e14fb/c4 + cheat + description:Slot 3 - Stuffed Dog + code:7e14fb/c5 + cheat + description:Slot 3 - Stuffed Pig + code:7e14fb/c6 + cheat + description:Slot 3 - Emerald + code:7e14fb/c7 + cheat + description:Slot 3 - Opal + code:7e14fb/c8 + cheat + description:Slot 3 - Goblet + code:7e14fb/c9 + cheat + description:Slot 3 - Ear Tip + code:7e14fb/ca + cheat + description:Slot 3 - Empty Bottle + code:7e14fb/cb + cheat + description:Slot 3 - Gown + code:7e14fb/cc + cheat + description:Slot 3 - Ribbon + code:7e14fb/cd + cheat + description:Slot 3 - Fry Pan + code:7e14fb/ce + cheat + description:Slot 3 - Small Knife + code:7e14fb/cf + cheat + description:Slot 3 - Pot + code:7e14fb/d0 + cheat + description:Slot 3 - Chop Block + code:7e14fb/d1 + cheat + description:Slot 3 - Apron + code:7e14fb/d2 + cheat + description:Slot 3 - Dragon Egg + code:7e14fb/d3 + cheat + description:Slot 3 - Crown + code:7e14fb/d4 + cheat + description:Slot 3 - Secret Map + code:7e14fb/d5 + cheat + description:Slot 3 - Miracle Gem + code:7e14fb/d6 + cheat + description:Slot 3 - Silver Wick + code:7e14fb/d7 + cheat + description:Slot 3 - Royal Statue + code:7e14fb/d8 + cheat + description:Slot 3 - Silver Tarot + code:7e14fb/d9 + cheat + description:Slot 3 - Golden Pawn + code:7e14fb/da + cheat + description:Slot 3 - Crown Jewels + code:7e14fb/db + cheat + description:Slot 3 - Wind Flute + code:7e14fb/dc + cheat + description:Slot 3 - Escape + code:7e14fb/dd + cheat + description:Slot 3 - Magic Jar + code:7e14fb/de + cheat + description:Slot 3 - Dragon Tooth + code:7e14fb/df + cheat + description:Slot 3 - Grilled Newt + code:7e14fb/e0 + cheat + description:Slot 3 - Poison Pin + code:7e14fb/e1 + cheat + description:Slot 3 - Might Sword + code:7e14fb/e2 + cheat + description:Slot 3 - Straw Doll + code:7e14fb/e3 + cheat + description:Slot 3 - Long Nail + code:7e14fb/e4 + cheat + description:Slot 3 - Bomb + code:7e14fb/e5 + cheat + description:Slot 3 - Alumina + code:7e14fb/e6 + cheat + description:Slot 3 - Power Oil + code:7e14fb/e7 + cheat + description:Slot 3 - Elven Bow + code:7e14fb/e8 + cheat + description:Slot 3 - Artea's Bow + code:7e14fb/e9 + cheat + description:Slot 3 - Might Bow + code:7e14fb/ea + cheat + description:Slot 3 - Dummy (?) + code:7e14fb/eb + cheat + description:Slot 3 - Dummy (?) + code:7e14fb/ec + cheat + description:Slot 3 - Dummy (?) + code:7e14fb/ed + cheat + description:Slot 3 - Dummy (?) + code:7e14fb/ee + cheat + description:Slot 3 - Free Door + code:7e14fb/ef + cheat + description:Slot 3 - Sheran Key + code:7e14fb/f0 + cheat + description:Slot 3 - Letter + code:7e14fb/f1 + cheat + description:Slot 3 - Dais Key + code:7e14fb/f2 + cheat + description:Slot 3 - Shrine Key + code:7e14fb/f3 + cheat + description:Slot 3 - Pirate Key + code:7e14fb/f4 + cheat + description:Slot 3 - Light Key + code:7e14fb/f5 + cheat + description:Slot 3 - Oil Key + code:7e14fb/f6 + cheat + description:Slot 3 - Green Jade + code:7e14fb/fb + cheat + description:Slot 3 - Red Sapphire + code:7e14fb/f8 + cheat + description:Slot 3 - Blue Jade + code:7e14fb/f9 + cheat + description:Slot 3 - Purple Newt + code:7e14fb/fa + cheat + description:Slot 3 - Glasdar Key + code:7e14fb/fb + cheat + description:Slot 3 - Magic Flavor + code:7e14fb/fc + cheat + description:Slot 3 - Fairy Kiss + code:7e14fb/fd + +cartridge sha256:7c34ecb16c10f551120ed7b86cfbc947042f479b52ee74bb3c40e92fdd192b3a + name:Lufia II - Rise of the Sinistrals (USA) + cheat + description:Infinite 999 MP in and out of battle + code:81f4f8/ff + cheat + description:Level 99 after one battle + code:81f99f/8f + cheat + description:Level 83 after one battle + code:81f99f/ff + cheat + description:Gain 35,000 gold after a battle + code:81fc05/ff + cheat + description:Enemies always miss + code:81fc74/ff + cheat + description:One hit kills + code:81fc38/ff + cheat + description:No random battles on world map + code:7e11e3/00 + cheat + description:9999999 GP + code:7e0a8a/7f+7e0a8b/96+7e0a8c/98 + cheat + description:9999999 Coins + code:7e0b55/7f+7e0b56/96+7e0b57/98 + cheat + description:All warps + code:7e0986/ff+7e0988/ff+7e0989/ff+7e0991/ff+7e098a/ff+7e0992/ff+7e098b/ff+7e0996/ff+7e098c/ff+7e098d/ff+7e098e/ff+7e098f/ff+7e0990/ff+7e097b/ff+7e097c/ff+7e097d/ff+7e097e/ff+7e097f/ff+7e0980/ff+7e0981/ff+7e0982/ff+7e0983/ff + cheat + description:P1 - 999 HP + code:7e0bbe/e7+7e0bbf/03 + cheat + description:P1 - 999 MP + code:7e0bc0/e7+7e0bc1/03 + cheat + description:P1 - 999 MAX MP + code:7e0bd4/e7+7e0bd5/03 + cheat + description:P1 - 999 STP + code:7e0bfe/e7+7e0bff/03 + cheat + description:P1 - 999 DFP + code:7e0c00/e7+7e0c01/03 + cheat + description:P1 - 999 STR + code:7e0c02/e7+7e0c03/03 + cheat + description:P1 - 999 AGL + code:7e0c04/e7+7e0c05/03 + cheat + description:P1 - 999 INT + code:7e0c06/e7+7e0c07/03 + cheat + description:P1 - 999 GUT + code:7e0c08/e7+7e0c09/03 + cheat + description:P1 - 999 MGR + code:7e0c0a/e7+7e0c0b/03 + cheat + description:P1 - Max IP + code:7e0c69/ff + cheat + description:P2 - 999 HP + code:7e0c7c/e7+7e0c7d/03 + cheat + description:P2 - 999 MP + code:7e0c7e/e7+7e0c7f/03 + cheat + description:P2 - 999 MAX MP + code:7e0c92/e7+7e0c93/03 + cheat + description:P2 - 999 STP + code:7e0cbc/e7+7e0cbd/03 + cheat + description:P2 - 999 DFP + code:7e0cbe/e7+7e0cbf/03 + cheat + description:P2 - 999 STR + code:7e0cc0/e7+7e0cc1/03 + cheat + description:P2 - 999 AGL + code:7e0cc2/e7+7e0cc3/03 + cheat + description:P2 - 999 INT + code:7e0cc4/e7+7e0cc5/03 + cheat + description:P2 - 999 GUT + code:7e0cc6/e7+7e0cc7/03 + cheat + description:P2 - 999 MGR + code:7e0cc8/e7+7e0cc9/03 + cheat + description:P2 - Max IP + code:7e0d27/ff + cheat + description:P3 - 999 HP + code:7e0d3a/e7+7e0d3b/03 + cheat + description:P3 - 999 MP + code:7e0d3c/e7+7e0d3d/03 + cheat + description:P3 - 999 MAX MP + code:7e0d50/e7+7e0d51/03 + cheat + description:P3 - 999 STP + code:7e0d7a/e7+7e0d7b/03 + cheat + description:P3 - 999 DFP + code:7e0d7c/e7+7e0d7d/03 + cheat + description:P3 - 999 STR + code:7e0d7e/e7+7e0d7f/03 + cheat + description:P3 - 999 AGL + code:7e0d80/e7+7e0d81/03 + cheat + description:P3 - 999 INT + code:7e0d82/e7+7e0d83/03 + cheat + description:P3 - 999 GUT + code:7e0d84/e7+7e0d85/03 + cheat + description:P3 - 999 MGR + code:7e0d86/e7+7e0d87/03 + cheat + description:P3 - Max IP + code:7e0de5/ff + cheat + description:P4 - 999 HP + code:7e0df8/e7+7e0df9/03 + cheat + description:P4 - 999 MP + code:7e0dfa/e7+7e0dfb/03 + cheat + description:P4 - 999 MAX MP + code:7e0e0e/e7+7e0e0f/03 + cheat + description:P4 - 999 STP + code:7e0e38/e7+7e0e39/03 + cheat + description:P4 - 999 DFP + code:7e0e3a/e7+7e0e3b/03 + cheat + description:P4 - 999 STR + code:7e0e3c/e7+7e0e3d/03 + cheat + description:P4 - 999 AGL + code:7e0e3e/e7+7e0e3f/03 + cheat + description:P4 - 999 INT + code:7e0e40/e7+7e0e41/03 + cheat + description:P4 - 999 GUT + code:7e0e42/e7+7e0e43/03 + cheat + description:P4 - 999 MGR + code:7e0e44/e7+7e0e45/03 + cheat + description:P4 - Max IP + code:7e0ea3/ff + cheat + description:P5 - 999 HP + code:7e0eb6/e7+7e0eb7/03 + cheat + description:P5 - 999 MP + code:7e0eb8/e7+7e0eb9/03 + cheat + description:P5 - 999 MAX MP + code:7e0ecc/e7+7e0ecc/03 + cheat + description:P5 - 999 STP + code:7e0ef6/e7+7e0ef7/03 + cheat + description:P5 - 999 DFP + code:7e0ef8/e7+7e0ef9/03 + cheat + description:P5 - 999 STR + code:7e0efa/e7+7e0efb/03 + cheat + description:P5 - 999 AGL + code:7e0efc/e7+7e0efd/03 + cheat + description:P5 - 999 INT + code:7e0efe/e7+7e0eff/03 + cheat + description:P5 - 999 GUT + code:7e0f00/e7+7e0f01/03 + cheat + description:P5 - 999 MGR + code:7e0f02/e7+7e0f03/03 + cheat + description:P5 - Max IP + code:7e0f61/ff + cheat + description:P6 - 999 HP + code:7e0f74/e7+7e0f75/03 + cheat + description:P6 - 999 MP + code:7e0f76/e7+7e0f77/03 + cheat + description:P6 - 999 MAX MP + code:7e0f8a/e7+7e0f8b/03 + cheat + description:P6 - 999 STP + code:7e0fb4/e7+7e0fb5/03 + cheat + description:P6 - 999 DFP + code:7e0fb6/e7+7e0fb7/03 + cheat + description:P6 - 999 STR + code:7e0fb8/e7+7e0fb9/03 + cheat + description:P6 - 999 AGL + code:7e0fba/e7+7e0fbb/03 + cheat + description:P6 - 999 INT + code:7e0fbc/e7+7e0fbd/03 + cheat + description:P6 - 999 GUT + code:7e0fbe/e7+7e0fbf/03 + cheat + description:P6 - 999 MGR + code:7e0fc0/e7+7e0fc1/03 + cheat + description:P6 - Max IP + code:7e101f/ff + cheat + description:P7 - 999 HP + code:7e1032/e7+7e1033/03 + cheat + description:P7 - 999 MP + code:7e1034/e7+7e1035/03 + cheat + description:P7 - 999 MAX MP + code:7e1048/e7+7e1049/03 + cheat + description:P7 - 999 STP + code:7e1072/e7+7e1073/03 + cheat + description:P7 - 999 DFP + code:7e1074/e7+7e1075/03 + cheat + description:P7 - 999 STR + code:7e1076/e7+7e1077/03 + cheat + description:P7 - 999 AGL + code:7e1078/e7+7e1079/03 + cheat + description:P7 - 999 INT + code:7e107a/e7+7e107b/03 + cheat + description:P7 - 999 GUT + code:7e107c/e7+7e107d/03 + cheat + description:P7 - 999 MGR + code:7e107e/e7+7e107f/03 + cheat + description:P7 - Max IP + code:7e10dd/ff + +cartridge sha256:7e77e196db47e87a5b297e60f0dfa7ce41df8d2d1fdd9152e06628d0b0e586af + name:Madden NFL '94 (USA) + cheat + description:Always 1st down + code:c0c1a0/ea + cheat + description:1 play to get a 1st down + code:c0c1bb/02 + cheat + description:2 plays to get a 1st down + code:c0c1bb/03 + cheat + description:3 plays to get a 1st down + code:c0c1bb/04 + cheat + description:5 plays to get a 1st down + code:c0c1bb/06 + cheat + description:7 plays to get a 1st down + code:c0c1bb/08 + cheat + description:Extra points worth 0 points + code:c0c7f1/00 + cheat + description:Extra points worth 3 points + code:c0c7f1/03 + cheat + description:Extra points worth 5 points + code:c0c7f1/05 + cheat + description:Extra points worth 7 points + code:c0c7f1/07 + cheat + description:Field goals worth 0 points + code:c0c7fe/00 + cheat + description:Field goals worth 2 points + code:c0c7fe/02 + cheat + description:Field goals worth 5 points + code:c0c7fe/05 + cheat + description:Field goals worth 7 points + code:c0c7fe/07 + cheat + description:Field goals worth 9 points + code:c0c7fe/09 + cheat + description:Safeties worth 0 points + code:c0c293/00 + cheat + description:Safeties worth 3 points + code:c0c293/03 + cheat + description:Safeties worth 5 points + code:c0c293/05 + cheat + description:Safeties worth 7 points + code:c0c293/07 + cheat + description:Touchdowns worth 0 points + code:c0c5c1/00 + cheat + description:Touchdowns worth 3 points + code:c0c5c1/03 + cheat + description:Touchdowns worth 5 points + code:c0c5c1/05 + cheat + description:Touchdowns worth 9 points + code:c0c5c1/09 + cheat + description:TD, FG, PAT, S worth 1 point - home team + code:c0c2d6/a9+c0c2d7/01 + cheat + description:TD, FG, PAT, S worth 3 points - home team + code:c0c2d6/a9+c0c2d7/03 + cheat + description:TD, FG, PAT, S worth 5 points - home team + code:c0c2d6/a9+c0c2d7/05 + cheat + description:TD, FG, PAT, S worth 7 points - home team + code:c0c2d6/a9+c0c2d7/07 + cheat + description:TD, FG, PAT, S worth 14 points - home team + code:c0c2d6/a9+c0c2d7/0e + cheat + description:TD, FG, PAT, S worth 21 points - home team + code:c0c2d6/a9+c0c2d7/15 + cheat + description:TD, FG, PAT, S worth 35 points - home team + code:c0c2d6/a9+c0c2d7/23 + cheat + description:TD, FG, PAT, S worth 3 points - visitor + code:c0c301/a9+c0c302/01 + cheat + description:TD, FG, PAT, S worth 5 points - visitor + code:c0c301/a9+c0c302/05 + cheat + description:TD, FG, PAT, S worth 7 points - visitor + code:c0c301/a9+c0c302/07 + cheat + description:TD, FG, PAT, S worth 14 points - visitor + code:c0c301/a9+c0c302/0e + cheat + description:TD, FG, PAT, S worth 21 points - visitor + code:c0c301/a9+c0c302/15 + cheat + description:TD, FG, PAT, S worth 35 points - visitor + code:c0c301/a9+c0c302/23 + cheat + description:Home team starts with a 3-point lead + code:c0e411/03+c0e416/0f + cheat + description:Home team starts with a 7-point lead + code:c0e411/07+c0e416/0f + cheat + description:Home team starts with a 10-point lead + code:c0e411/0a+c0e416/0f + cheat + description:Home team starts with a 14-point lead + code:c0e411/0e+c0e416/0f + cheat + description:Home team starts with a 35-point lead + code:c0e411/23+c0e416/0f + cheat + description:Visitors start with a 5-point lead + code:c0e411/05+c0e412/0f + cheat + description:Visitors start with a 7-point lead + code:c0e411/07+c0e412/0f + cheat + description:Visitors start with a 10-point lead + code:c0e411/0a+c0e412/0f + cheat + description:Visitors start with a 14-point lead + code:c0e411/0e+c0e412/0f + cheat + description:Visitors start with a 35-point lead + code:c0e411/23+c0e412/0f + +cartridge sha256:0ad77ae7af231313e1369a52d1622b88e3751aa5ec774628df7071f9e4244abc + name:Madden NFL 95 (USA) + cheat + description:Always 1st down + code:c0833a/ad + cheat + description:Infinite timeouts - both players (slightly glitchy) + code:c1714d/bd + cheat + description:Cannot be tackled (hold X) + code:c07c54/80+c07c56/30+c07c53/a5+c07c55/0a+c07c57/f5 + cheat + description:Field goals worth 0 points + code:c08a19/00 + cheat + description:Field goals worth 1 points + code:c08a19/01 + cheat + description:Field goals worth 5 points + code:c08a19/04 + cheat + description:Field goals worth 9 points + code:c08a19/09 + cheat + description:Safetys worth 0 points + code:c0841f/00 + cheat + description:Safetys worth 1 points + code:c0841f/01 + cheat + description:Safetys worth 5 points + code:c0841f/04 + cheat + description:Safetys worth 7 points + code:c0841f/07 + cheat + description:Touchdowns worth 0 points + code:c087d8/00 + cheat + description:Touchdowns worth 1 points + code:c087d8/01 + cheat + description:Touchdowns worth 5 points + code:c087d8/04 + cheat + description:Touchdowns worth 9 points + code:c087d8/09 + cheat + description:Start with 15 seconds on the play clock + code:c07678/0f + cheat + description:Start with 1 timeout - P1 + code:c00043/01 + cheat + description:Start with 1 timeout - P2 + code:c00044/01 + +cartridge sha256:3059d86cdc383985c564a7a891fe18e08f5222ead7ede9fa309159d60cde13a1 + name:Madden NFL 96 (USA) + cheat + description:Infinite time (2P mode only) + code:c002d5/ad + cheat + description:Infinite downs + code:c08ece/ad + cheat + description:Infinite timeouts + code:c15435/bd + cheat + description:Cannot be tackled (hold X) + code:c087a4/80+c087a6/30+c087a3/a5+c087a5/0a+c087a7/f5 + cheat + description:Safeties are worth 0 points + code:c08fd7/00 + cheat + description:Safeties are worth 1 point + code:c08fd7/01 + cheat + description:Safeties are worth 3 points + code:c08fd7/02 + cheat + description:Safeties are worth 5 points + code:c08fd7/05 + cheat + description:Safeties are worth 7 points + code:c08fd7/07 + cheat + description:Safeties are worth 9 points + code:c08fd7/09 + cheat + description:Field Goals are worth 0 points + code:c09693/00 + cheat + description:Field Goals are worth 1 point + code:c09693/01 + cheat + description:Field Goals are worth 2 points + code:c09693/02 + cheat + description:Field Goals are worth 5 points + code:c09693/05 + cheat + description:Field Goals are worth 7 points + code:c09693/07 + cheat + description:Field Goals are worth 9 points + code:c09693/09 + cheat + description:Start with 5 downs each possession + code:c08f7f/00 + cheat + description:Start with 3 downs each possession + code:c08f7f/03 + cheat + description:Start with 2 downs each possession + code:c08f7f/02 + cheat + description:Start with 1 down each possession + code:c08f7f/01 + +cartridge sha256:6874568d985f65dd817d4b03998e71c8cbacc8d8707411fde7bffee350605a88 + name:Madden NFL 97 (USA) + cheat + description:Cannot be tackled (hold X) + code:c08c8e/80+c08c90/30+c08c8d/a5+c08c8f/0a+c08c91/f5 + +cartridge sha256:e3c62c9fe55d2311aa6a264f41b45d6cbc7b1b069ed3aa82ee57d381c062547d + name:Madden NFL 98 (USA) + cheat + description:Cannot be tackled (hold X) + code:c08d19/80+c08d1b/30+c08d18/a5+c08d1a/0a+c08d1c/f5 + +cartridge sha256:c01fb8989d391d3e343003934937f02bd8ef9aacdad68c32c3d3f56feb72f5b0 + name:Magic Boy (USA) + cheat + description:Invincibility + code:809483/80 + cheat + description:Infinite lives + code:7e9bb6/03 + +cartridge sha256:9b6b0099f2b97ec3a18fef7a4935bfad235fdb83669dd99c3731a69506322cbe + name:Magic Knight Rayearth (Japan) + cheat + description:Infinite Gold + code:7E0D8A3F+7E0D8B42+7E0D8C0F + cheat + description:No random battles + code:c02a90/80 + cheat + description:Walk through walls + code:c02943/ad + cheat + description:Infinite items - slot 01 + code:7e0d8f/63 + cheat + description:Infinite items - slot 02 + code:7e0d91/63 + cheat + description:Infinite items - slot 03 + code:7e0d93/63 + cheat + description:Infinite items - slot 04 + code:7e0d95/63 + cheat + description:Infinite items - slot 05 + code:7e0d97/63 + cheat + description:Infinite items - slot 06 + code:7e0d99/63 + cheat + description:Infinite items - slot 07 + code:7e0d9b/63 + cheat + description:Infinite items - slot 08 + code:7e0d9d/63 + cheat + description:Infinite items - slot 09 + code:7e0d9f/63 + cheat + description:Infinite items - slot 10 + code:7e0da1/63 + cheat + description:Infinite items - slot 11 + code:7e0da3/63 + cheat + description:Infinite items - slot 12 + code:7e0da5/63 + cheat + description:Infinite items - slot 13 + code:7e0da7/63 + cheat + description:Infinite items - slot 14 + code:7e0da9/63 + cheat + description:Infinite items - slot 15 + code:7e0dab/63 + cheat + description:Infinite items - slot 16 + code:7e0dad/63 + cheat + description:Infinite items - slot 17 + code:7e0daf/63 + cheat + description:Infinite items - slot 18 + code:7e0db1/63 + cheat + description:Infinite items - slot 19 + code:7e0db3/63 + cheat + description:Infinite items - slot 20 + code:7e0db5/63 + +cartridge sha256:1d3cceaa05e054b002caeb09fd5fb9e718ec446764f4169d97bc185da76fdf4d + name:Magic Sword (USA) + cheat + description:No health loss on collision with enemies + code:019caf/ad+00b04c/ad + cheat + description:No health loss when magic is used + code:019624/ad + cheat + description:No magic counter countdown + code:00ada6/ad + cheat + description:Hit anywhere + code:03813a/ea+038137/ad+038138/08+03813b/f0+038139/16 + cheat + description:One hit kills + code:0380e9/80 + cheat + description:Slower magic counter countdown + code:00ada2/7f + cheat + description:Faster magic counter countdown + code:00ada2/ff + cheat + description:Invincibility + code:7e831c/09 + cheat + description:Infinite continues + code:7e042d/09 + cheat + description:Infinite health + code:7e0432/09 + cheat + description:Infinite support health + code:7e0423/04 + cheat + description:Infinite magic + code:7e040c/09+7e040d/09 + cheat + description:Have powered-up attack + code:7e068a/06 + cheat + description:Infinite Silver Keys + code:7e040f/09 + cheat + description:Infinite Gold Keys + code:7e0410/09 + cheat + description:Infinite Platinum Keys + code:7e0411/09 + cheat + description:Have optimum sword + code:7e040a/06 + cheat + description:Have optimum shield + code:7e040b/04 + cheat + description:Never lose shield + code:7e0435/02 + cheat + description:Barrier Invincibility + code:7e06d6/ff + cheat + description:Set score to 90,000,000 + code:7e0448/09 + cheat + description:Support modifier - Amazon + code:7e0424/03 + cheat + description:Support modifier - Big Man + code:7e0424/07 + cheat + description:Support modifier - Wizard + code:7e0424/09 + cheat + description:Support modifier - Knight + code:7e0424/0c + cheat + description:Support modifier - Lizardman + code:7e0424/0f + cheat + description:Support modifier - Ninja + code:7e0424/12 + cheat + description:Support modifier - Thief + code:7e0424/15 + cheat + description:Support modifier - Cleric + code:7e0424/18 + cheat + description:Max power for Amazon's Crossbow + code:7e0413/07 + cheat + description:Max power for Big Man's Axe + code:7e0414/07 + cheat + description:Max power for Wizard's Magic Missile + code:7e0415/07 + cheat + description:Max power for Knight's Spear + code:7e0416/07 + cheat + description:Max power for Lizardman's Sword + code:7e0417/07 + cheat + description:Max power for Ninja's Throwing Star + code:7e0418/07 + cheat + description:Max power for Thief's Bomb + code:7e0419/07 + cheat + description:Max power for Cleric's Magic Bullet + code:7e041a/07 + +cartridge sha256:ed617ad12c865fc9c9c5c75de840d3afeded57d13ca3a3062bf8e30095629414 + name:Magical Pop'n (Japan) + cheat + description:Infinite health + code:7e051a/06 + cheat + description:Infinite lives + code:7e0516/02 + cheat + description:Infinite stars + code:7e0508/09 + +cartridge sha256:f301bb8ea867e530ecb64e8eff504ed5b9697cf076c70e2036ecf2ffbe6c487a + name:Magical Quest Starring Mickey Mouse, The (USA) + cheat + description:Protection from most hits (lose no hearts) (disable if you get stuck) + code:03f43a/ad + cheat + description:Infinite magic - wizard's costume only + code:01eef9/ad + cheat + description:Infinite lives + code:01df93/ad + cheat + description:Small heart fill health completely + code:02d010/8d+02d015/ad + cheat + description:Each gold coin worth 10 (if too many are collected you may go back to 0) + code:02fd3d/01 + cheat + description:Longer invincibility after getting hit + code:01e207/ad + cheat + description:No invincibility after getting hit + code:01e202/a9 + cheat + description:Super-jump + code:01de0e/69+01de0f/2c + cheat + description:Mega-jump + code:01de0e/69+01de0f/20 + cheat + description:Ultra-jump + code:01de0e/69+01de0f/14 + cheat + description:Items in general store are free if you can afford them + code:02fd8b/80+02fd8c/2b + cheat + description:Start with 1 heart instead of 3 + code:00ccf8/01 + cheat + description:Start with 5 hearts + code:00ccf8/05 + cheat + description:Start with 7 hearts + code:00ccf8/07 + cheat + description:Start with 10 hearts + code:00ccf8/0a + cheat + description:Start with 1 life instead of 3 + code:01815f/00 + cheat + description:Start with 7 lives + code:01815f/06 + cheat + description:Start with 10 lives + code:01815f/09 + cheat + description:Invincibility after first hit + code:7e033f/03 + cheat + description:Infinite health + code:7e02b1/0a + cheat + description:Infinite magic + code:7e02b7/20 + cheat + description:Infinite water for Fireman costume + code:7e02b9/17 + cheat + description:Infinite lives (alt) + code:01df93/ad + cheat + description:Have all costumes + code:7e02c1/01+7e02c2/01+7e02c3/01 + cheat + description:Mega-jump + code:7e04b0/1a + cheat + description:Ultra-jump + code:7e04b0/06 + +cartridge sha256:78d0f6dd9ce0813e0532c7b25c7fa0b6b945d12a4ace21aa940e98babf4dacb1 + name:Majuu Ou (Japan) + cheat + description:Infinite health + code:7e009f/50 + cheat + description:Infinite lives + code:7e00a3/01 + +cartridge sha256:8267e2f092c86d5a29c9a826db82c7473638e28e2507cdaf5c86981f07cd0bef + name:Mario Is Missing! (USA) + cheat + description:Talk to someone once to learn all they know (all four checks appear on computer for that person) + code:80b50c/a9+80b50d/ff+80b50e/ea + cheat + description:Use computer to access any facts except pamphlets (no checks appear on computer) + code:80b60b/80+80b64d/00+80b678/00 + cheat + description:Use computer to view pamphlets on any artifact (no checks appear on computer) + code:80b5df/80 + cheat + description:Always get Yoshi after using Globulator + code:80f801/01 + cheat + description:Pick up one artifact and get all three + code:80b4ff/a9+80b500/ff+80b501/ea + cheat + description:Have all three arifacts + code:7e050a/07 + cheat + description:Always have Yoshi (Globulator doesn't automatically pick your location) + code:7e06db/01 + cheat + description:No waiting on wrong answer + code:7e0565/00 + +cartridge sha256:e842cac1a4301be196f1e137fbd1a16866d5c913f24dbca313f4dd8bd7472f45 + name:Mario Paint (Japan, USA) + cheat + description:Invincibility in bug swatting game + code:01a51e/a9+01a523/8d+01a51f/ff + cheat + description:Infinite lives in bug swatting game + code:01a6e9/cd + cheat + description:Have all icons in bug swatting game + code:01a329/a9 + cheat + description:Star easier to get under "P" on title screen + code:8f8555/00+8f8559/00+8f855a/01 + cheat + description:Invincibility in bug swatting game (alt) + code:7f0040/ff + cheat + description:Infinite lives in bug swatting game (alt) + code:7f0018/63 + cheat + description:Have all icons in bug swatting game (alt) + code:7f0012/0f + cheat + description:Only need to swat once to move around and kill flies + code:7f001e/02 + cheat + description:Enable all rotate/flip options + code:7e099f/01 + cheat + description:One hit to kill boss + code:7f00c9/14 + cheat + description:Start on level 2 + code:7f0014/01 + cheat + description:Start on level 3 + code:7f0014/02 + +cartridge sha256:4b69d4958e099c3b3f6ae45e153ced9b24755d8c161dfee06c9f67886a7c0f09 + name:Mario's Time Machine (USA) + cheat + description:Bonus timer doesn't count down in the whole game + code:818dc9/00 + cheat + description:Don't lose mushrooms in collisions + code:818727/a9+808f28/00+818729/00 + cheat + description:1 wrong answer to questions allowed + code:80d92d/01 + cheat + description:255 wrong answers allowed (ignore sad face icon) + code:80d92d/ff + +cartridge sha256:49dd77b310b476c875633335243553be59ecfb0bffae62e46f2e53ff05c20fcd + name:Marvel Super Heroes in War of the Gems (USA) + cheat + description:Infinite health + code:c00858/95 + cheat + description:Infinite Air + code:c00858/95 + cheat + description:Infinite Air (alt) + code:c271c6/f6 + cheat + description:Infinite equipment, all Gems selectable on pick-up + code:c0b87a/1c+c0b87d/80+c0b87e/1f + cheat + description:One hit kills + code:c06315/a9 + cheat + description:Always have a Gem + code:c27f28/9e + cheat + description:Always have 9 Gem power items + code:c06089/f5 + cheat + description:Always have 9 Revive items + code:c271c6/f6 + cheat + description:Invincibility - Boston Aquarium + code:7e042d/03+7e042f/00 + cheat + description:Invincibility - Alaska + code:7e02cd/03+7e02cf/00 + cheat + description:Invincibility - Dr. Doom's Castle + code:7e02bd/03+7e02bf/00 + cheat + description:Invincibility - Amazon + code:7e02fd/03+7e02ff/00 + cheat + description:Invincibility - Magus' Spaceship and Asteroid Belt + code:7e026d/03+7e026f/00 + cheat + description:Invincibility - Egypt + code:7e02dd/03+7e02df/00 + cheat + description:Invincibility - Arizona Mining Facility + code:7e031d/03+7e031f/00 + cheat + description:Invincibility - Mt. Vezuvius + code:7e039d/03+7e039f/00 + cheat + description:Invincibility - Nebula's Level + code:7e033d/03+7e033f/00 + cheat + description:Invincibility - Thanos' Level + code:7e034d/03+7e034f/00 + cheat + description:Infinite health - Dr. Doom's Castle + code:7e026b/64 + cheat + description:Infinite health - Alaska + code:7e027b/64 + cheat + description:Infinite health - Mt. Vesuvius + code:7e034b/64 + cheat + description:Infinite health - Egypt + code:7e028b/64 + cheat + description:Infinite health - Arizona Mining Facility + code:7e02cb/64 + cheat + description:Always have 9 Big energy Tanks + code:7fff1a/09 + cheat + description:Always have 9 Small energy Tanks + code:7fff1b/09 + +cartridge sha256:2731f0bd1c87e75121f41d1ed5cc9fbf177f414b8bf831c76fd9c4b58c86ed08 + name:Mary Shelley's Frankenstein (USA) + cheat + description:Infinite health + code:809953/ad+80e3e5/b7 + cheat + description:Energy balls don't deplete health + code:85f376/00+85f377/00 + cheat + description:Cool effects + code:7e0000/00 + cheat + description:Invincibility (blinking) + code:7e200d/09 + cheat + description:Infinite health (alt) + code:7e2043/1d + +cartridge sha256:44cc113ce1e7616cc737adea9e8f140436c9f1c3fba57e8e9db48025d4ace632 + name:Mask, The (USA) + cheat + description:Invincibility + code:80a44c/24+80a456/24 + cheat + description:Invincibility after one hit + code:80a44e/bd + cheat + description:Infinite mask power + code:80b1d5/ad + cheat + description:Infinite lives + code:80856a/a5 + cheat + description:Hit anywhere + collect items from anywhere) + code:80ad7b/24+80ad8b/24+80ad8f/24+80ad5a/24+80ad5e/24 + cheat + description:Mallet doesn't use any power + code:809b10/bf + cheat + description:Walk through walls + code:80b433/ad + cheat + description:Green hearts worth 10 + code:80af8d/10 + cheat + description:Green hearts worth 30 + code:80af8d/30 + cheat + description:Green hearts worth 100 + code:80af8d/a0 + cheat + description:Green hearts worth 0 + code:80afa5/ad + cheat + description:Flash longer + code:80b1b9/ff + cheat + description:Don't flash at all + code:80b1b9/00 + cheat + description:M's worth 0 + code:80af2a/a5 + cheat + description:M's worth 10 + code:80af1f/10 + cheat + description:M's worth 30 + code:80af1f/30 + cheat + description:M's worth 100 + code:80af1f/a0 + cheat + description:Start with 100 mask energy + code:8080fb/01 + cheat + description:Start with 300 mask energy + code:8080fb/03 + cheat + description:Start with 900 mask energy + code:8080fb/09 + cheat + description:Start with 1 life + code:8080ea/a9+8080eb/00+8080ec/00 + cheat + description:Start with 5 lives + code:8080ea/a9+8080eb/05+8080ec/00 + cheat + description:Start with 9 lives + code:8080ea/a9+8080eb/09+8080ec/00 + cheat + description:Infinite life + code:7e18af/20+7e18b0/03 + cheat + description:Infinite mask power (alt) + code:7e008f/84+7e0090/03 + cheat + description:Cheat menu enabled (in options menu) + code:7e0104/01 + +cartridge sha256:a203a13870eaec92095daef1196a0c9fe8416e600504d55dd0dc724d4f5f5cb0 + name:Maui Mallard in Cold Shadow (USA) + cheat + description:Enable level skip cheat (press Select + Y + A during the game) + code:7e1f55/02 + cheat + description:Enable infinite lives cheat + code:7e1f55/04 + cheat + description:Enable water is harmless cheat + code:7e1f55/40 + cheat + description:Enable infinite health cheat (health reaches 0, but you won't die) + code:7e1f55/80 + cheat + description:Disable all cheats + code:7e1f55/00 + +cartridge sha256:2a08704748f5ef6488348c4099729feca600412d331bda3756e51efd8b94e113 + name:MechWarrior (USA) + cheat + description:Protection from most hazards + code:85b0a7/8d + cheat + description:Infinite short-range missiles + code:80da1f/ff + cheat + description:Infinite short-range homing missiles + code:80da21/ff + cheat + description:Infinite medium-range missiles + code:80da23/ff + cheat + description:Infinite medium-range homing missiles + code:80da25/ff + cheat + description:Infinite long-range missiles + code:80da27/ff + cheat + description:Infinite long-range homing missiles + code:80da29/ff + cheat + description:Infinite machine gun ammo + code:80da2b/ff + cheat + description:Never run out of any ammo + code:80a809/ea + cheat + description:Getting any money sets money to 32 million C-bills + code:80e1ba/00 + cheat + description:100 ammo for short-range missiles + code:80da1f/64 + cheat + description:100 ammo for short-range homing missiles + code:80da21/64 + cheat + description:80 ammo for medium-range missiles + code:80da23/50 + cheat + description:80 ammo for medium-range homing missiles + code:80da25/50 + cheat + description:40 ammo for long-range missiles + code:80da27/28 + cheat + description:40 ammo for long-range homing missiles + code:80da29/28 + cheat + description:200 short-range missiles + code:80da1f/c8 + cheat + description:200 short-range homing missiles + code:80da21/c8 + cheat + description:100 medium-range missiles + code:80da23/64 + cheat + description:100 medium-range homing missiles + code:80da25/64 + cheat + description:100 long-range missiles + code:80da27/64 + cheat + description:100 long-range homing missiles + code:80da29/64 + cheat + description:Mech isn't slowed down as much by most obstacles + code:84ff08/a9+84ff0a/ea + cheat + description:Start with 100,000 C-bills + code:80e2fb/64 + cheat + description:Start with 250,000 C-bills + code:80e2fb/fa + cheat + description:Start with 562,000 C-bills + code:80e2fc/02 + cheat + description:Start with 1,074,000 C-bills + code:80e2fc/04 + cheat + description:Start with 5,170,000 C-bills + code:80e2fc/14 + cheat + description:Start with 10,290,000 C-bills + code:80e2fc/28 + +cartridge sha256:7bffa1dc31604fa3d61e06ce2c59168098cc8dd7e59998e1d5f30c49bdf8d617 + name:MechWarrior 3050 (USA) + cheat + description:Almost infinite ammo + code:c05177/ad + cheat + description:Almost invincible (disable to kill some enemies) + code:c053f2/60 + cheat + description:Coolant does nothing + code:c0899a/a9+c0899d/a9 + cheat + description:Guass Rifle starts at 10 + code:d64c55/0a + cheat + description:Guass Rifle starts at 50 + code:d64c55/32 + cheat + description:Guass Rifle starts at 100 + code:d64c55/64 + cheat + description:Arrow VI Missiles start at 20 + code:d64c53/14 + cheat + description:Arrow VI Missiles start at 50 + code:d64c53/32 + cheat + description:Arrow VI Missiles start at 100 + code:d64c53/64 + cheat + description:Particle Projection Cannon start at 10 + code:d64c4f/0a + cheat + description:Particle Projection Cannon start at 50 + code:d64c4f/32 + cheat + description:Particle Projection Cannon start at 100 + code:d64c4f/64 + cheat + description:Machine Gun starts at 100 + code:d64c46/00+d64c45/64 + cheat + description:Machine Gun starts at 1,000 + code:d64c46/03+d64c45/e8 + cheat + description:Machine Gun starts at 10,000 + code:d64c46/26+d64c45/10 + cheat + description:Auto Cannon starts at 50 + code:d64c47/32 + cheat + description:Auto Cannon starts at 100 + code:d64c47/64 + cheat + description:Auto Cannon starts at 250 + code:d64c47/fa + cheat + description:Large Laser starts at 50 + code:d64c4b/32+d64c4c/00 + cheat + description:Large Laser starts at 1,000 + code:d64c4b/e8+d64c4c/03 + cheat + description:Large Laser starts at 10,000 + code:d64c4b/10+d64c4c/26 + cheat + description:"Inferno" Short-Range Missiles start at 10 + code:d64c49/0a + cheat + description:"Inferno" Short-Range Missiles start at 50 + code:d64c49/32 + cheat + description:"Inferno" Short-Range Missiles start at 250 + code:d64c49/fa + cheat + description:"Maelstrom" Long-Range Missiles start at 20 + code:d64c51/14 + cheat + description:"Maelstrom" Long-Range Missiles start at 100 + code:d64c51/64 + cheat + description:"Maelstrom" Long-Range Missiles start at 250 + code:d64c51/fa + cheat + description:"Thunder" Time-Delay Mines start at 10 + code:d64c4d/0a + cheat + description:"Thunder" Time-Delay Mines start at 100 + code:d64c4d/64 + cheat + description:"Thunder" Time-Delay Mines start at 250 + code:d64c4d/fa + +cartridge sha256:ee1a030f30f3ab06361921447b3fcf84c987dd13d76e62964e44720e0ec82c56 + name:Mega lo Mania (Europe) (En,Fr,De) + cheat + description:Infinite number of people to use + code:7ee8d9/64 + +cartridge sha256:a255fec32453739903a1954149f19bc9658f4a415600b44badf1d4e5e13a16f9 + name:Mega Man 7 (USA) + cheat + description:Invincibility after first hit (blinking) + code:c1325b/80 + cheat + description:Infinite health + code:c30596/ad + cheat + description:Infinite health (alt) + code:c30593/05 + cheat + description:Infinite E-Tanks + code:c04853/ad + cheat + description:Infinite W-Tanks + code:c04890/ad + cheat + description:Infinite S-Tanks + code:c048f1/ad + cheat + description:Infinite Beat Whistles + code:c13235/ad + cheat + description:Infinite weapon energy + code:c12fd9/1f + cheat + description:One hit kills + code:c304f4/24 + cheat + description:Hit anywhere + code:c304b0/80 + cheat + description:Multi-jump + code:c17f67/32+c17f68/20+c17f69/9a+c17f6a/11+c17f6b/60+c113a9/60+c113aa/7f+c17f60/a5+c17f61/45+c17f62/0a+c17f63/90+c17f64/03+c17f65/20+c17f66/b7 + cheat + description:Always Shoot Shots + code:c12f49/11 + cheat + description:Always shoot Freeze Cracker + code:c12f49/24 + cheat + description:Always shoot Scorch Wheel + code:c12f49/26 + cheat + description:Always shoot Danger Wrap Bombs + code:c12f49/2e + cheat + description:Always shoot Noise Crush + code:c12f49/66 + cheat + description:Always shoot Fully Charged Mega Buster Blasts + code:c12f49/7d + cheat + description:Always shoot Slash Claw + code:c12f49/9c + cheat + description:Always shoot Thunder Bolt + code:c12f49/b5 + cheat + description:Always shoot Wild Coil + code:c12f49/f3 + cheat + description:Always shoot Charged Wild Coils + code:c12f49/ff + cheat + description:White Shots/Special Weapons + code:c14fda/ff + cheat + description:Infinite E-Tanks (alt) + code:7e0ba0/ff + cheat + description:Infinite W-Tanks (alt) + code:7e0ba1/ff + cheat + description:Infinite S-Tanks (alt) + code:7e0ba2/ff + cheat + description:Infinite Beat Whistles (alt) + code:7e0ba3/84 + cheat + description:Infinite Bolts + code:7e0ba6/e7+7e0ba7/03 + cheat + description:Infinite slide + code:7e0c61/ff + cheat + description:Moon-jump + code:7e0c1a/f4 + cheat + description:Have exit + code:7e0ba4/ff + cheat + description:Have S.Adapt + code:7e0b9f/ff + cheat + description:Have Super Fist upgrade for S.Adapt + code:7e0ba4/4f + cheat + description:Have Proto Shield + code:7e0b95/ff + cheat + description:Infinite Feeze Cracker + code:7e0b85/ff + cheat + description:Infinite Junk Shield + code:7e0b89/ff + cheat + description:Infinite Scorch Wheel + code:7e0b8b/ff + cheat + description:Infinite Slash Claw + code:7e0b8d/ff + cheat + description:Infinite Thunder Bolt + code:7e0b87/ff + cheat + description:Infinite Noise Crush + code:7e0b8f/ff + cheat + description:Infinite Danger Wrap + code:7e0b91/ff + cheat + description:Infinite Wild Coil + code:7e0b93/ff + cheat + description:Infinite Rush Coil + code:7e0b9b/ff + cheat + description:Infinite Rush Search + code:7e0b97/ff + cheat + description:Infinite Rush Jet + code:7e0b99/ff + +cartridge sha256:b8f70a6e7fb93819f79693578887e2c11e196bdf1ac6ddc7cb924b1ad0be2d32 + name:Mega Man X (USA) (Rev 1) + cheat + description:Infinite weapons once obtained + code:8194e7/00 + cheat + description:Immune to drain attack + code:81c809/ad + cheat + description:One hit kills (most enemies) + code:849e71/80 + cheat + description:Hit anywhere + code:849b68/24 + cheat + description:Multi-jump + code:81857f/24+818589/fc+81858a/95 + cheat + description:Enemies always drop large energy + code:84a392/a2+84a393/02 + cheat + description:Enemies always drop large weapon energy + code:84a392/a2+84a393/04 + cheat + description:Bogus jump (may go back to normal jumps) + code:86b9c6/04 + cheat + description:Super-jump (may go back to normal jumps) + code:86b9c6/07 + cheat + description:Mega-jump (may go back to normal jumps) + code:86b9c6/09 + cheat + description:Start with less health + code:8094ff/08 + cheat + description:Start with more health + code:8094ff/20 + cheat + description:Start with 10 lives + code:8094fa/09 + cheat + description:Start with 7 lives + code:8094fa/06 + cheat + description:Start with 5 lives + code:8094fa/04 + cheat + description:Start with 1 life + code:8094fa/00 + cheat + description:Max health containers + code:7e1f9a/20 + cheat + description:Infinite lives + code:7e1f80/09 + cheat + description:Have all equipment + code:7e1f99/ff + cheat + description:Enable Hadoken + code:7e1f7e/85 + cheat + description:Have sub-tank 1 full + code:7e1f83/ff + cheat + description:Have sub-tank 2 full + code:7e1f84/ff + cheat + description:Have sub-tank 3 full + code:7e1f85/ff + cheat + description:Have sub-tank 4 full + code:7e1f86/ff + +cartridge sha256:3e1209f473bff8cd4bcbf71d071e7f8df17a2d564e9a5c4c427ee8198cebb615 + name:Mega Man X (USA) + cheat + description:Infinite health + code:849d54/ad + cheat + description:Infinite lives + code:809b59/ad + cheat + description:Infinite weapons once obtained + code:8194ee/a5 + cheat + description:One hit kills (most enemies) + code:849e71/80 + cheat + description:Hit anywhere + code:849b68/24 + cheat + description:Weapon charges to 1st power level faster + code:819866/00 + cheat + description:Disable weapon charging + code:819847/00 + cheat + description:Multi-jump + code:818575/24+81857f/f2+818580/95 + cheat + description:Enemies always drop large energy + code:84a38d/a2+84a38e/02 + cheat + description:Enemies always drop large weapon energy + code:84a38d/a2+84a38e/04 + cheat + description:Bogus jump (may go back to normal jumps) + code:86b9c6/04 + cheat + description:Super-jump (may go back to normal jumps) + code:86b9c6/07 + cheat + description:Mega-jump (may go back to normal jumps) + code:86b9c6/09 + cheat + description:Start with all weapons and all enemies defeated (except Sigma) + code:809f05/de + cheat + description:Start with less health + code:8094ff/08 + cheat + description:Start with more health + code:8094ff/20 + cheat + description:Start with 10 lives + code:8094fa/09 + cheat + description:Start with 7 lives + code:8094fa/06 + cheat + description:Start with 5 lives + code:8094fa/04 + cheat + description:Start with 1 life + code:8094fa/00 + cheat + description:Max health containers + code:7e1f9a/20 + cheat + description:Infinite lives (alt) + code:7e1f80/09 + cheat + description:Have all equipment + code:7e1f99/ff + cheat + description:Have sub-tank 1 full + code:7e1f83/ff + cheat + description:Have sub-tank 2 full + code:7e1f84/ff + cheat + description:Have sub-tank 3 full + code:7e1f85/ff + cheat + description:Have sub-tank 4 full + code:7e1f86/ff + +cartridge sha256:f3246755f608a1e1dc9c848b61da3b824c7853b29b3be40df6fc7f2793a887ed + name:Mega Man X2 (USA) + cheat + description:Invincibility + code:089440/08 + cheat + description:Infinite health + code:08d9e9/ad + cheat + description:Infinite health (alt) + code:08d9e6/9c + cheat + description:One hit kills + code:08db05/80 + cheat + description:Hit anywhere + code:08d7bf/24+08dadf/ad+06f430/02 + cheat + description:Multi-jump + code:0898f0/24+0898fa/d8+0898fb/b9 + cheat + description:Infinite health (alt 2) + code:7e09ff/20 + cheat + description:Max health containers + code:7e1fd1/20 + cheat + description:Infinite lives + code:7e1fb3/09 + cheat + description:Have Shouryuken (F, D, DF + Fire) (must have max health and health containers) + code:7e1fb1/80 + cheat + description:Infinite L.Tracer + code:7e1fcd/5c + cheat + description:Infinite Bubble.S + code:7e1fbd/5c + cheat + description:Infinite Crystal.H + code:7e1fbb/5c + cheat + description:Infinite Magnet.M + code:7e1fc7/5c + cheat + description:Infinite S.Burner + code:7e1fc9/5c + cheat + description:Infinite S.Chain + code:7e1fc5/5c + cheat + description:Infinite S.Slicer + code:7e1fc3/5c + cheat + description:Infinite S.Wheel + code:7e1fc1/5c + cheat + description:Infinite Silk.S + code:7e1fbf/5c + cheat + description:Infinite G.Crush + code:7e1fcb/5c + cheat + description:Infinite Dash + code:7e0a2a/16 + cheat + description:Have all equipment + code:7e1fd0/ff + cheat + description:Have sub-tank 1 full + code:7e1fb6/ff + cheat + description:Have sub-tank 2 full + code:7e1fb7/ff + cheat + description:Have sub-tank 3 full + code:7e1fb8/ff + cheat + description:Have sub-tank 4 full + code:7e1fb9/ff + cheat + description:Have Zero's Head, Body and Legs + code:7e1fd6/80+7e1fd7/80+7e1fd8/80 + +cartridge sha256:65b03268afac296330e8ff8d60dd0825879e13ed658b37713c034a3bd074f1d7 + name:Mega Man X3 (USA) + cheat + description:Infinite health + code:04ce04/ad + cheat + description:Infinite special weapons on pick-up + code:04a593/bd+04a5c7/bd + cheat + description:Hit anywhere + code:04cbae/24+04cf40/80+04cf11/80 + cheat + description:Multi-jump + code:04852b/24+048535/0e+048536/a7 + cheat + description:Enemies always drop large energy + code:04d5f3/a2+04d5f4/02 + cheat + description:Enemies always drop large weapon energy + code:04d5f3/a2+04d5f4/04 + cheat + description:Super-jump + code:06b287/07 + cheat + description:Mega-jump + code:06b287/09 + cheat + description:Ultra mega-jump + code:06b287/0b + cheat + description:Normal weapon is much more powerful + code:04cf40/80 + cheat + description:Skip bosses at start of game and proceed to stage select + code:02e8e6/95 + cheat + description:Start with max health bar + code:04dbc0/14 + cheat + description:Invincibility + code:7e0a08/08 + cheat + description:Infinite lives + code:7e1fb4/09 + cheat + description:Infinite Boosts + code:7e0a9a/01 + cheat + description:Get all equipment when you enter the start menu + code:00cd80/a9+00cd81/ff+00cd82/8d+00cd83/d7 + cheat + description:Always have Super Shot + code:7e0a67/02 + cheat + description:Infinite Air Dash + code:7e0a34/78 + cheat + description:Have Zero-Saber + code:7e1fb2/fc + cheat + description:Have all upgrades + code:7e1fd1/4f + cheat + description:Invincible Ride Armor + code:7e0cf8/01 + +cartridge sha256:cf4d603dc0a3759da571224c671a9bfd29f9e52ca8dbb61bcc8ac8be5481e9b2 + name:Mega Man Soccer (USA) + cheat + description:Choose any character to play as Dr. Willy + code:81a3c6/a9+81a3c7/14+81a3c8/00 + cheat + description:View ending (select Capcom Championship) + code:81829b/ee+81829c/e0 + cheat + description:Unlock Capcom Championship mode ending + code:82d1f0/ea+82d1f1/ea+82d1f2/ea+82d1f3/ea + cheat + description:Unlock Tournament mode ending + code:82d29c/ea+82d29d/ea+82d29e/ea+82d29f/ea + +cartridge sha256:8815a2e8b26450053d43f2450936eced005d81ee9e33faa5aea2dd8d1e3e7d65 + name:Melfand Stories (Japan) + cheat + description:Hit anywhere + code:81ac80/80+81ac81/18 + cheat + description:One hit kills + code:81b066/80 + +cartridge sha256:d4f2cb6b209db29f7aec62e5a23846681c14665fb007e94d7bcfc7b5611e938b + name:Metal Combat - Falcon's Revenge (USA) + cheat + description:Infinite health + code:7e1968/7f + cheat + description:No time + code:7e03c5/00+7e03c7/00 + cheat + description:Infinite Bombs + code:7e03fe/08 + cheat + description:Infinite Energy Bolt charge + code:7e1b13/96 + cheat + description:Infinite Treble Energy Bolts + code:7e1b17/03 + +cartridge sha256:0a9609a505dd1555006b16f53d961b3ce50c518aa1597a77dcd46e55ecc716ff + name:Metal Marines (USA) + cheat + description:Building an ICBM only takes up one space + code:00c26f/80 + cheat + description:Can view entire enemy map + code:03a8f1/80 + cheat + description:Enemy has no attack phase + code:02de7b/60 + cheat + description:Instant maximum energy + code:00d17b/00 + cheat + description:Instant maximum war funds + code:00d1b1/00 + cheat + description:Enemy always has 0 energy + code:00d16f/9c + cheat + description:Enemy always has 0 war funds + code:00d1a5/9c + +cartridge sha256:057484558ebd18165f98e556b994080535e31cefdd98b5edb190516f7040fc9d + name:Metal Morph (USA) + cheat + description:Infinite ammo for all weapons (disable to change weapons) + code:81da8f/a5 + cheat + description:Infinite continues + code:81cc56/a5 + cheat + description:Infinite time on continue screen + code:81cc02/ad + cheat + description:Hit anywhere (side-scrolling mode) + code:81f946/24+81f938/24 + cheat + description:Hit anywhere (flying mode) + code:81b327/24+81b2f1/24 + cheat + description:Start with 255 continues + code:8081a4/ff + cheat + description:Invincibility + code:7e0387/03 + +cartridge sha256:0d7f875877fe856066cfb39b4ecdbbe7d48393a75770720876c94419f809bb1c + name:Metal Warriors (USA) + cheat + description:Infinite health (Mech) + code:81b010/ae + cheat + description:Infinite health (Human) + code:81c352/a5 + cheat + description:Infinite Gun ammo on pick-up + code:818da2/e4 + cheat + description:Press L to go Hyper (Mech) + code:818db5/a6 + +cartridge sha256:1b425ea5a883b7464637b74c2937fde699ffff52b53ad6940a66285e0663194a + name:Michael Jordan - Chaos in the Windy City (USA) + cheat + description:Infinite lives + code:7e1427/05 + cheat + description:Infinite Flame Balls + code:7e594e/05 + cheat + description:Infinite Grenade(?) Balls + code:7e5948/05 + cheat + description:Infinite Homing Balls + code:7e5950/05 + cheat + description:Infinite Bounce Balls + code:7e594c/05 + cheat + description:Invincibility and hit anywhere + code:c041bf/24+c041b7/24+c041c7/24+c0114f/80 + +cartridge sha256:0773eb741ce28f963f767fc7dd44678eb3d37ed4dc7fc82bb9cce7d55f1cfc64 + name:Mickey Mania - The Timeless Adventures of Mickey Mouse (USA) + cheat + description:Infinite health + code:bb9ab2/ad + cheat + description:Infinite lives + code:bb9ae9/ad + cheat + description:Infinite Marbles + code:bbc6b3/ad + cheat + description:Hit anywhere + code:bc9c93/da+bc9c95/d0+bc9c92/ad+bc9c94/06+bc9c96/16 + cheat + description:Each Marble worth 99 + code:bfb2a4/a9 + cheat + description:One hit and you're dead + code:a1c7ce/00 + cheat + description:Start with less health + code:a1c7ce/02 + cheat + description:Start with more health + code:a1c7ce/09 + cheat + description:Start with 1 life + code:a1c7e0/00 + cheat + description:Start with 7 lives + code:a1c7e3/06 + cheat + description:Start with 10 lives + code:a1c7e3/09 + cheat + description:Start on stage - the Wharf + code:a1c792/01 + cheat + description:Start on stage - Mad Doc 1 + code:a1c792/02 + cheat + description:Start on stage - Mad Doc 2 + code:a1c792/03 + cheat + description:Start on stage - Ride The Gurney + code:a1c792/04 + cheat + description:Start on stage - Mad Doc 4 + code:a1c792/05 + cheat + description:Start on stage - Elevator + code:a1c792/06 + cheat + description:Start on stage - Mad Doc Eol + code:a1c792/07 + cheat + description:Start on stage - Moose Hunt + code:a1c792/08 + cheat + description:Start on stage - Moose Chase + code:a1c792/09 + cheat + description:Start on stage - Haunted House + code:a1c792/0a + cheat + description:Start on stage - Haunted Basement + code:a1c792/0b + cheat + description:Start on stage - Haunted Halls + code:a1c792/0c + cheat + description:Start on stage - Garden + code:a1c792/0d + cheat + description:Start on stage - Tunnel + code:a1c792/0e + cheat + description:Start on stage - Steps + code:a1c792/0f + cheat + description:Start on stage - Table + code:a1c792/10 + cheat + description:Start on stage - Library + code:a1c792/11 + cheat + description:Start on stage - Kitchen + code:a1c792/12 + cheat + description:Start on stage - Dungeon + code:a1c792/13 + cheat + description:Start on stage - Tower Escape + code:a1c792/14 + cheat + description:Start on stage - Dungeon 2 + code:a1c792/15 + +cartridge sha256:453359b20f78787fcfea0dafe715238f0ff3f1d6f4d729285dc72a8004131a3b + name:Mickey to Donald - Magical Adventure 3 (Japan) + cheat + description:Invincibility - P1 + code:7e0454/ff + cheat + description:Invincibility - P2 + code:7e0554/ff + cheat + description:Infinite health - P1 + code:7e046f/03 + cheat + description:Infinite health - P2 + code:7e056f/03 + cheat + description:Infinite lives - P1 + code:7e0486/04 + cheat + description:Infinite lives - P2 + code:7e0586/04 + cheat + description:Infinite Oxygen - P1 + code:7e0481/0f + cheat + description:Infinite Oxygen - P2 + code:7e0581/0f + cheat + description:Max power bar - P1 + code:7e048a/ff + cheat + description:Max power bar - P2 + code:7e058a/ff + +cartridge sha256:a2adeb4bf0e7cc943611ac726e5578da404373a79e91436c9bbd15480688b15c + name:Micro Machines (USA) + cheat + description:Infinite lives + code:7e0323/09 + +cartridge sha256:889beb58d2a48a05a6230cabda14555cb030e2e986c0293bdf396e85af5c6798 + name:Mighty Max (USA) + cheat + description:Invincibility + code:7e0254/a1 + cheat + description:Infinite energy + code:7e0294/03 + cheat + description:Infinite lives + code:7e028c/09 + +cartridge sha256:624a66607caef2ca34920ea15b84b28cdd1916ee089d496cec4f1d43621fdbb3 + name:Mighty Morphin Power Rangers (USA) + cheat + description:Invincibility + code:04b743/ad + cheat + description:Infinite health + code:04ba80/ad + cheat + description:Infinite lives + code:00c4c4/ea + cheat + description:Infinite bombs on pick-up + code:049d34/ad + cheat + description:Collect items from anywhere + code:04b82d/24+04b9cf/80+04b9d0/1d + cheat + description:Mega-jump + code:048fc0/fa + cheat + description:More health from capsule + code:018e2a/c0 + cheat + description:Trini moves faster before morphing + code:0485ba/02 + cheat + description:Billy moves faster before morphing + code:0485a2/02 + cheat + description:Jason moves faster before morphing + code:04859a/02 + cheat + description:Kimberley moves faster before morphing + code:0485a9/c0 + cheat + description:Zach moves faster before morphing + code:0485b2/02 + cheat + description:Trini moves faster after morphing + code:0485d2/ff + cheat + description:Billy moves faster after morphing + code:0485c9/ff + cheat + description:Jason moves faster after morphing + code:0485c1/02 + cheat + description:Kimberley moves faster after morphing + code:0485d1/c0 + cheat + description:Zach moves faster, but the wrong way + code:0485da/ff + cheat + description:Start game with full health + code:00b2d8/c0 + cheat + description:Start with 1 life + code:00b2c0/00 + cheat + description:Start with 6 lives + code:00b2c0/05 + cheat + description:Start with 9 lives + code:00b2c0/08 + cheat + description:Infinite health (Megazord) + code:7e04c0/71 + cheat + description:Infinite power (Megazord) + code:7e04c2/71 + +cartridge sha256:1b85c0690aa156a255c7f79e133e453345452698fa98abf8df744c262d0cf865 + name:Mighty Morphin Power Rangers - The Fighting Edition (USA) + cheat + description:Infinite health - P1 + code:7e1a22/70 + cheat + description:Infinite health - P2 + code:7e1a26/70 + cheat + description:Special maxed - P1 + code:7e06a0/30 + cheat + description:Special maxed -P2 + code:7e06a6/30 + cheat + description:Play As Ivan Ooze - P1 + code:7e1a68/10 + cheat + description:Play as Ivan Ooze - P2 + code:7e1a6c/10 + cheat + description:Infinite round time + code:7e06b8/06+7e06ba/00 + cheat + description:Infinite time + code:7e06bc/01 + cheat + description:Special 1 - P1 + code:7e1b00/07+7e1b02/0c + cheat + description:Special 2 - P1 + code:7e1b08/07+7e1b0a/0c + cheat + description:Special 3 - P1 + code:7e1b10/07+7e1b12/0c + cheat + description:Special 4 - P1 + code:7e1b18/07+7e1b1a/0c + cheat + description:Special 5 - P1 + code:7e1b20/07+7e1b22/0c + cheat + description:Special 1 - P2 + code:7e1b04/07+7e1b06/0c + cheat + description:Special 2 - P2 + code:7e1b0c/07+7e1b0e/0c + cheat + description:Special 3 - P2 + code:7e1b14/07+7e1b16/0c + cheat + description:Special 4 - P2 + code:7e1b1c/07+7e1b1e/0c + cheat + description:Special 5 - P2 + code:7e1b24/07+7e1b26/0c + cheat + description:Super move - P2 + code:7e1b34/03+7e1b36/18 + +cartridge sha256:c706b70097c679f6f0ced6f77a30620807d0b2555fc3c683c0ec2fc791176039 + name:Mighty Morphin Power Rangers - The Movie (USA) + cheat + description:Invincibility + code:03b08a/8d + cheat + description:Infinite life force + code:03d58f/ad + cheat + description:Almost infinite life force + code:03d58f/b9 + cheat + description:Infinite lives + code:03d152/ad + cheat + description:Infinite continues - 1P mode + code:03f045/ad + cheat + description:Infinite continues - 2P mode + code:039367/ad + cheat + description:Large main power-up box gives max power + code:03d547/18 + cheat + description:Main collectable power doesn't go down after ranger powerup as fast + code:00be02/ea+03c228/ea + cheat + description:One hit kills + code:03d332/80 + cheat + description:No continues + code:00c1b0/00 + cheat + description:Start with mega-points + code:00c1c0/03 + cheat + description:Start with a lot of energy - first life only + code:00c1db/09 + cheat + description:Start with very little energy - first life only + code:00c1db/01 + cheat + description:Start with very little energy after first life + code:03d15c/01 + cheat + description:Start with more energy after first life + code:03d15c/09 + cheat + description:Start with 9 continues + code:00c1b0/09 + cheat + description:Start with 9 lives + code:0081f2/09 + cheat + description:Start with 5 lives + code:0081f2/05 + cheat + description:Start with 1 life + code:0081f2/01 + cheat + description:Invincibility - P1 + code:7e1c28/01 + cheat + description:Infinite health - P1 + code:7e0628/05 + cheat + description:Infinite power - P1 + code:7e062a/18 + cheat + description:Infinite time - P1 + code:ff4139/09 + cheat + description:Infinite lives - P1 + code:7e060a/09 + +cartridge sha256:2828e4485357585714f16f5bf96910794e22e4dfd19f2a22ce20d0a599f25878 + name:Miracle Girls (Japan) + cheat + description:Invincibility + code:c0e31b/60 + cheat + description:Infinite lives + code:c02ced/ad + +cartridge sha256:8715a641f2e4dd8b6066be7f2683d9129fff3fcccaf0a09cc8bdd2aa56460764 + name:Mohawk & Headphone Jack (USA) + cheat + description:Infinite health + code:7e0308/03 + cheat + description:Infinite lives + code:7e0306/05 + +cartridge sha256:6b0ac4d52d24536cdb7d9d0dc7d19ee30d08ac34363983290c5912ccc850fa0d + name:Monopoly (USA) (Rev 1) + cheat + description:Land, rent and some other things are free - all players + code:00b674/60 + cheat + description:Land, rent, and some other things are $50 - all players + code:00b674/e9+00b675/32+00b676/00 + cheat + description:Land, rent, and some other things are $100 - all players + code:00b674/e9+00b675/64+00b676/00 + cheat + description:Land, rent, and some other things are $200 - all players + code:00b674/e9+00b675/c8+00b676/00 + cheat + description:Land, rent, and some other things are $500 - all players + code:00b674/e9+00b675/f4+00b676/00 + cheat + description:Always throw double 6's + code:0093e5/a9+0093e6/06+0093e7/06 + cheat + description:Always throw double 5's + code:0093e5/a9+0093e6/05+0093e7/05 + cheat + description:Always throw double 4's + code:0093e5/a9+0093e6/04+0093e7/04 + cheat + description:Always throw double 3's + code:0093e5/a9+0093e6/02+0093e7/03 + cheat + description:Always throw double 2's + code:0093e5/a9+0093e6/02+0093e7/02 + cheat + description:Always throw double 1's + code:0093e5/a9+0093e6/01+0093e7/01 + cheat + description:P1 has a Get Out Of Jail card + code:7e08f2/01 + cheat + description:P2 has a Get Out Of Jail card + code:7e08f4/01 + cheat + description:P3 has a Get Out Of Jail card + code:7e08f6/01 + cheat + description:P4 has a Get Out Of Jail card + code:7e08f8/01 + cheat + description:P5 has a Get Out Of Jail card + code:7e08fa/01 + cheat + description:P6 has a Get Out Of Jail card + code:7e08fc/01 + cheat + description:P7 has a Get Out Of Jail card + code:7e08fe/01 + cheat + description:P8 has a Get Out Of Jail card + code:7e0900/01 + +cartridge sha256:480ae7186fd5b28200cd88e136b9cd3b6600d32508e280a0bc27ea0ed8d3c0bb + name:Monopoly (USA) + cheat + description:Land, rent and some other things are free - all players + code:00b674/60 + cheat + description:Land, rent, and some other things are $50 - all players + code:00b674/e9+00b675/32+00b676/00 + cheat + description:Land, rent, and some other things are $100 - all players + code:00b674/e9+00b675/64+00b676/00 + cheat + description:Land, rent, and some other things are $200 - all players + code:00b674/e9+00b675/c8+00b676/00 + cheat + description:Land, rent, and some other things are $500 - all players + code:00b674/e9+00b675/f4+00b676/00 + cheat + description:Always throw double 6's + code:0093e5/a9+0093e6/06+0093e7/06 + cheat + description:Always throw double 5's + code:0093e5/a9+0093e6/05+0093e7/05 + cheat + description:Always throw double 4's + code:0093e5/a9+0093e6/04+0093e7/04 + cheat + description:Always throw double 3's + code:0093e5/a9+0093e6/02+0093e7/03 + cheat + description:Always throw double 2's + code:0093e5/a9+0093e6/02+0093e7/02 + cheat + description:Always throw double 1's + code:0093e5/a9+0093e6/01+0093e7/01 + cheat + description:P1 has a Get Out Of Jail card + code:7e08f2/01 + cheat + description:P2 has a Get Out Of Jail card + code:7e08f4/01 + cheat + description:P3 has a Get Out Of Jail card + code:7e08f6/01 + cheat + description:P4 has a Get Out Of Jail card + code:7e08f8/01 + cheat + description:P5 has a Get Out Of Jail card + code:7e08fa/01 + cheat + description:P6 has a Get Out Of Jail card + code:7e08fc/01 + cheat + description:P7 has a Get Out Of Jail card + code:7e08fe/01 + cheat + description:P8 has a Get Out Of Jail card + code:7e0900/01 + +cartridge sha256:3c6d3e4a9c9af160f1c1cf11ce4ead531d9500c1f58f1cbe682c90a5eaa3efb2 + name:Mortal Kombat (USA) + cheat + description:Invincibility (except against throws) + code:80a4d4/24+80a4da/24+80a4de/e0+80a4df/77+80a4e0/17+80975b/60 + cheat + description:Infinite health + code:80e647/a1+80e649/8d+80e64a/b9 + cheat + description:Infinite time + code:8095df/a5 + cheat + description:Have much more fatality time + code:809b76/7f + cheat + description:Always get Flawless Victory bonus + code:809fb2/80 + cheat + description:First strike of any kind wins round + code:8097ad/00 + cheat + description:Hit anywhere - P1 + code:809711/e0+809712/d3+809713/18+809715/32 + cheat + description:All strikes do minimal damage (all equal to 1 hit point) (2P game only, donï¾’t choose handicap for either player) + code:809917/00 + cheat + description:P1 nearly invincible in 2P game (go to options, move P1ï¾’s handicap bar all the way to the right) + code:98b460/0b + cheat + description:One button fatalities - Liu Kang (Press Down) + code:80d10a/00 + cheat + description:One button fatalities - Johnny Cage (Press Y) + code:80ca49/08 + cheat + description:One button fatalities - Kano (Press B) + code:80d40b/08 + cheat + description:One button fatalities - Sonya (Press L or R) + code:80dac0/00 + cheat + description:One button fatalities - Sub Zero (Press Y) + code:80ccf0/08 + cheat + description:One button fatalities - Raiden (Press Y) + code:80cb01/08 + cheat + description:One button fatalities - Scorpion (Press Up, L or R) + code:80d03f/0d + cheat + description:Perform Kano's fatality from any distance + code:80d40a/24 + cheat + description:Perform Rayden's fatality from any distance + code:80cb00/24 + cheat + description:Perform Johnny Cage's fatality from any distance + code:80ca48/24 + cheat + description:Perform Scorpion's fatality from any distance + code:80d03e/24 + cheat + description:Perform Sub-Zero's fatality from any distance + code:80ccef/24 + cheat + description:All throws do more damage + code:809053/78 + cheat + description:Kano's High Punch does more damage + code:98d945/1e + cheat + description:Kano's Low Punch does more damage + code:98d94e/1e + cheat + description:Kano's High Kick does more damage + code:98d98d/48 + cheat + description:Kano's Low Kick does more damage + code:98d996/48 + cheat + description:Kano's Head Blow does more damage + code:98d960/48 + cheat + description:Kano's Knee does more damage + code:98d957/48 + cheat + description:Kano's Crouched Kick does more damage + code:98d984/3c + cheat + description:Kano's Uppercut does more damage + code:98d97b/78 + cheat + description:Kano's Roundhouse Kick does more damage + code:98d93c/60 + cheat + description:Kano's Foot Sweep does more damage + code:98d972/3c + cheat + description:Kano's Flying Punch does more damage + code:98d9a8/4b + cheat + description:Kano's Knife does more damage (only at close distance) + code:98d92a/4b + cheat + description:Johnny Cage's High Punch does more damage + code:98d8a4/1e + cheat + description:Johnny Cage's Low Punch does more damage + code:98d8ad/1e + cheat + description:Johnny Cage's High Kick does more damage + code:98d892/48 + cheat + description:Johnny Cage's Low Kick does more damage + code:98d89b/42 + cheat + description:Johnny Cage's Head Blow does more damage + code:98d8c8/3c + cheat + description:Johnny Cage's Knee does more damage + code:98d8d1/48 + cheat + description:Johnny Cage's Crouched Kick does more damage + code:98d8bf/18 + cheat + description:Johnny Cage's Uppercut does more damage + code:98d8da/78 + cheat + description:Johnny Cage's Roundhouse Kick does more damage + code:98d889/60 + cheat + description:Johnny Cage's Foot Sweep does more damage + code:98d8b6/3c + cheat + description:Johnny Cage's Flying Punch does more damage + code:98d880/4b + cheat + description:Johnny Cage's Shadow Kick does more damage + code:98d84a/5a + cheat + description:Johnny Cage's Fireball does more damage (only at close distance) + code:98d865/4b + cheat + description:Johnny Cage's Split Punch does more damage + code:98d85c/66 + cheat + description:Liu Kang's High Punch does more damage + code:98dae3/1e + cheat + description:Liu Kang's Low Punch does more damage + code:98daec/1e + cheat + description:Liu Kang's High Kick does more damage + code:98db22/48 + cheat + description:Liu Kang's Low Kick does more damage + code:98db2b/48 + cheat + description:Liu Kang's Head Blow does more damage + code:98dabf/3c + cheat + description:Liu Kang's Knee does more damage + code:98daf5/48 + cheat + description:Liu Kang's Crouched Kick does more damage + code:98db19/3c + cheat + description:Liu Kang's Uppercut does more damage + code:98db10/78 + cheat + description:Liu Kang's Roundhouse Kick does more damage + code:98dada/60 + cheat + description:Liu Kang's Foot Sweep does more damage + code:98db07/3c + cheat + description:Liu Kang's Flying Punch does more damage + code:98db3d/4b + cheat + description:Liu Kang's Special Flying Kick does more damage + code:98dab6/5a + cheat + description:Liu Kang's Fireball does more damage (only at close distance) + code:98dac8/4b + cheat + description:Sonya Blade's High Punch does more damage + code:98d717/1e + cheat + description:Sonya Blade's Low Punch does more damage + code:98d720/1e + cheat + description:Sonya Blade's High Kick does more damage + code:98d6e1/54 + cheat + description:Sonya Blade's Low Kick does more damage + code:98d6ea/51 + cheat + description:Sonya Blade's Head Blow does more damage + code:98d6f3/3c + cheat + description:Sonya Blade's Knee does more damage + code:98d6fc/48 + cheat + description:Sonya Blade's Crouched Kick does more damage + code:98d70e/3c + cheat + description:Sonya Blade's Uppercut does more damage + code:98d729/78 + cheat + description:Sonya Blade's Roundhouse Kick does more damage + code:98d6d8/66 + cheat + description:Sonya Blade's Foot Sweep does more damage + code:98d6cf/3c + cheat + description:Sonya Blade's Flying Punch does more damage + code:98d73b/4b + cheat + description:Sonya Blade's Leg Grab does more damage + code:80dd4f/78 + cheat + description:Sonya Blade's Sonic Rings does more damage (only at close distance) + code:98d6db/4b + cheat + description:Sonya Blade's Special Flying Kick does more damage + code:98d73b/4b + cheat + description:Rayden's High Punch does more damage + code:98da25/1e + cheat + description:Rayden's Low Punch does more damage + code:98da37/1e + cheat + description:Rayden's High Kick does more damage + code:98da13/45 + cheat + description:Rayden's Low Kick does more damage + code:98da1c/42 + cheat + description:Rayden's Head Blow does more damage + code:98da52/3c + cheat + description:Rayden's Knee does more damage + code:98da5b/48 + cheat + description:Rayden's Crouched Kick does more damage + code:98da49/18 + cheat + description:Rayden's Uppercut does more damage + code:98da64/78 + cheat + description:Rayden's Roundhouse Kick does more damage + code:98da0a/5a + cheat + description:Rayden's Foot Sweep does more damage + code:98da40/3c + cheat + description:Rayden's Flying Punch does more damage + code:98da01/4b + cheat + description:Rayden's Flying Thunderbolt does more damage + code:98d9dd/5a + cheat + description:Rayden's Lightning does more damage (only at close distance) + code:98d9e6/4b + cheat + description:Scorpion's, Sub-Zero's and Reptile's High Punch do more damage + code:98dbb7/1e + cheat + description:Scorpion's, Sub-Zero's and Reptile's Low Punch do more damage + code:98dbc0/1e + cheat + description:Scorpion's, Sub-Zero's and Reptile's High Kick do more damage + code:98dbf6/48 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Low Kick do more damage + code:98dbff/48 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Head Blow do more damage + code:98dbd2/3c + cheat + description:Scorpion's, Sub-Zero's and Reptile's Knee do more damage + code:98dbc9/48 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Crouched Kick do more damage + code:98dc1a/18 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Uppercut do more damage + code:98dbae/78 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Roundhouse Kick do more damage + code:98dc11/60 + cheat + description:Scorpion's, Sub-Zero's and Reptile's Foot Sweep do more damage + code:98dc08/3c + cheat + description:Scorpion's, Sub-Zero's and Reptile's Flying Punch do more damage + code:98dbe4/4b + cheat + description:Sub-Zero's and Reptile's Deep Freeze do damage + code:98dba5/28 + cheat + description:Sub-Zero's and Reptile's Slide do more damage + code:98db78/27 + cheat + description:Scorpion's and Reptile's Harpoon do more damage + code:98db8a/18 + cheat + description:Scorpion's and Reptile's Scorpion Split do more damage + code:98dbe4/4b + cheat + description:Each round is 199 seconds (time counts down twice) + code:808b81/02 + cheat + description:Each round is 90 seconds + code:808b80/91+808b81/00 + cheat + description:Each round is 80 seconds + code:808b80/81+808b81/00 + cheat + description:Each round is 70 seconds + code:808b80/71+808b81/00 + cheat + description:Each round is 60 seconds + code:808b80/61+808b81/00 + cheat + description:Each round is 50 seconds + code:808b80/51+808b81/00 + cheat + description:Each round is 40 seconds + code:808b80/41+808b81/00 + cheat + description:Each round is 30 seconds + code:808b80/31+808b81/00 + cheat + description:Each round is 20 seconds + code:808b80/21+808b81/00 + cheat + description:Each round is 10 seconds + code:808b80/11+808b81/00 + cheat + description:Always fight in the the Courtyard + code:8084cf/00 + cheat + description:After 1st match, almost always fight at the Palace Gates + code:8084cb/a9+8084cc/01 + cheat + description:After 1st match, almost always fight in the Warrior Shrine + code:8084cb/a9+8084cc/02 + cheat + description:After 1st match, almost always fight in the Pit + code:8084cb/a9+8084cc/03 + cheat + description:After 1st match, almost always fight in the Throne Room + code:8084cb/a9+8084cc/04 + cheat + description:After 1st match, almost always fight in Goro's Lair + code:8084cb/a9+8084cc/05 + cheat + description:After 1st match, almost always fight in the bottom of the pit (screen says Goro's Lair) + code:8084cb/a9+8084cc/06 + cheat + description:Almost always fight Johnny Cage + code:9897c4/a9+9897c5/00 + cheat + description:Almost always fight Kano + code:9897c4/a9+9897c5/01 + cheat + description:Almost always fight Rayden + code:9897c4/a9+9897c5/02 + cheat + description:Almost always fight Liu Kang + code:9897c4/a9+9897c5/03 + cheat + description:Almost always fight Scorpion + code:9897c4/a9+9897c5/04 + cheat + description:Almost always fight Sub-Zero + code:9897c4/a9+9897c5/05 + cheat + description:Almost always fight Sonya Blade + code:9897c4/a9+9897c5/06 + cheat + description:Almost always fight Goro (don't use Kano's or Johnny Cage's finishing move on Goro) + code:9897c4/a9+9897c5/07 + cheat + description:Start on Match 2 + code:808168/01 + cheat + description:Start on Match 3 + code:808168/02 + cheat + description:Start on Match 4 + code:808168/03 + cheat + description:Start on Match 5 + code:808168/04 + cheat + description:Start on Match 6 + code:808168/05 + cheat + description:Start on Mirror Match + code:808168/06 + cheat + description:Start on Endurance 1 match + code:808168/07 + cheat + description:Start on Endurance 2 match + code:808168/08 + cheat + description:Start on Endurance 3 match + code:808168/09 + cheat + description:Start on match with Goro + code:808168/0a + cheat + description:Start on match with Shang Tsung + code:808168/0b + +cartridge sha256:6caa0ab221a3e690a104baa4935fc86dbc385d4272e88afb46b999bf6c6edb36 + name:Mortal Kombat - Shinken Kourin Densetsu (Japan) + cheat + description:Infinite health + code:80e866/a1+80e868/8d+80e869/f9+80e86a/04 + cheat + description:One hit kill - P1 + code:80e8a8/00+80e8aa/8d+80e8ab/fb+80e8ac/04 + +cartridge sha256:43e36a74fb73a7efc46b380599e269b1fff8f55ecf80f5cf50c34d02ceda041a + name:Mortal Kombat II (USA) + cheat + description:Invincibility - P1 + code:849d68/ad + cheat + description:Invincibility - P2/CPU + code:849d78/ad + cheat + description:Infinite health + code:83b057/a9+83b058/a1+83b059/00+83b05b/fc+83b05c/2e + cheat + description:Infinite time + code:83a133/80 + cheat + description:Infinite continues + code:83a02f/ad + cheat + description:No health - P1 + code:849d64/00 + cheat + description:No health - P2/CPU + code:849d74/00 + cheat + description:Hit anywhere - P1 + code:849c45/40+849c44/d0+849c41/e0+849c42/00 + cheat + description:Have 127x more fatality time + code:83a6d5/7f + cheat + description:CPU always does fatalities + code:80cdef/24 + cheat + description:CPU always does friendships and babalities (Smoke and Jade will also be in the Living Forest) + code:80ff47/80 + cheat + description:Disable blood + code:84fda5/24 + cheat + description:Disable throws - 2P mode + code:82da9f/8d + cheat + description:Mileena's Sai Throw does massive damage + code:80f96c/48 + cheat + description:Liu Kang's High Fireball does massive damage + code:80fd50/48 + cheat + description:Kung Lao's Hat Throw does massive damage + code:80fdde/48 + cheat + description:Cage's Shadow Kick does massive damage + code:80fc1e/48 + cheat + description:Reptile's Force Ball does massive damage + code:80f59f/48 + cheat + description:Shang Tsung's Flaming Skull attack does massive damage + code:80f847/48 + cheat + description:Kitana's Fan Throw does massive damage + code:80f95f/48 + cheat + description:Baraka's Blade Spark does massive damage + code:80fafb/48 + cheat + description:Rayden's Lightning Bolt does massive damage + code:80f728/48 + cheat + description:Enable all 2P rules/moves when fighting computer + code:84a011/80 + cheat + description:Always fight Kung Lao + code:83af82/a9+83af83/00 + cheat + description:Always fight Liu Kang + code:83af82/a9+83af83/01 + cheat + description:Always fight Cage + code:83af82/a9+83af83/02 + cheat + description:Always fight Baraka + code:83af82/a9+83af83/03 + cheat + description:Always fight Kitana + code:83af82/a9+83af83/04 + cheat + description:Always fight Mileena + code:83af82/a9+83af83/05 + cheat + description:Always fight Shang Tsung + code:83af82/a9+83af83/06 + cheat + description:Always fight Rayden + code:83af82/a9+83af83/07 + cheat + description:Always fight Sub-Zero + code:83af82/a9+83af83/08 + cheat + description:Always fight Reptile + code:83af82/a9+83af83/09 + cheat + description:Always fight Scorpion + code:83af82/a9+83af83/0a + cheat + description:Always fight Jax + code:83af82/a9+83af83/0b + cheat + description:Always fight Kintaro + code:83af82/a9+83af83/0c + cheat + description:Always fight Shao Kahn + code:83af82/a9+83af83/0d + cheat + description:Always fight Smoke + code:83af82/a9+83af83/0e + cheat + description:Always fight Noob Saibot + code:83af82/a9+83af83/0f + cheat + description:Always fight Jade + code:83af82/a9+83af83/10 + cheat + description:Start with 0 continues + code:83b2a0/01 + cheat + description:Start with 2 continues + code:83b2a0/03 + cheat + description:Start with 6 continues + code:83b2a0/07 + cheat + description:Start with 8 continues + code:83b2a0/09 + cheat + description:Invincibility - P1 (alt) + code:849c68/80+849c69/09+849c7b/00+85aa52/60+85ab1c/60+85ac2a/60 + cheat + description:Invincibility - P2/CPU (alt) + code:849c68/80+849c69/06+849c76/00+85aa52/60+85ab1c/60+85ac2a/60 + +cartridge sha256:ca2f86ca77f822fcd8e86f5a287f2a76d0becbb81a7bce73ae22909beb2f834c + name:Mortal Kombat II (USA) (Rev 1) + cheat + description:P1 is killed by one hit + code:849d64/00 + cheat + description:P2/CPU is killed by one hit + code:849d74/00 + cheat + description:Have 127x more fatality time + code:83a6e5/7f + cheat + description:CPU always does fatalities + code:80ce01/24 + cheat + description:CPU always does friendships and babalities (Smoke and Jade will also be in the Living Forest) + code:80ff7a/80 + cheat + description:Disable blood + code:84fda9/24 + cheat + description:Disable throws - 2P mode + code:82da9f/8d + cheat + description:Enable all 2P rules/moves when fighting computer + code:84a011/80 + +cartridge sha256:417874aa57856fe93eefdb24066fa1a9ca3f23c72c09d5247ae2b3ab4b3d09d1 + name:Mortal Kombat 3 (USA) + cheat + description:Infinite health - P1 + code:83e642/ad + cheat + description:Infinite health - P2 + code:83e652/ad + cheat + description:P1 takes all damage + code:83e636/00 + cheat + description:P2 takes all damage + code:83e635/80 + cheat + description:Infinite continues + code:86d346/cd + cheat + description:Hit anywhere - P1 + code:83ff82/00+83ff83/f0+83ff84/03+83e54b/ff+83ff85/4c+83ff89/4c+83ff88/4c+83ff8a/e5+83ff87/e5+83ff80/e0+83e54a/80+83ff86/a2+83ff81/02 + cheat + description:Press A on main menu for Sound Test + code:82dcf8/02 + cheat + description:Press Up on main menu for Kool Stuff Menu + code:82dd2c/02 + cheat + description:Press Select on main menu for Kooler Stuff Menu + code:82dd60/02 + cheat + description:Press X on main menu for Scott's Menu + code:82dd94/02 + cheat + description:Always fight Kano in Master mode + code:84bf16/af+84dfef/9c+84c4f4/00 + cheat + description:Always fight Sonya in Master mode + code:84bf16/af+84dfef/9c+84c4f4/01 + cheat + description:Always fight Jax in Master mode + code:84bf16/af+84dfef/9c+84c4f4/02 + cheat + description:Always fight Nightwolf in Master mode + code:84bf16/af+84dfef/9c+84c4f4/03 + cheat + description:Always fight Sub-Zero in Master mode + code:84bf16/af+84dfef/9c+84c4f4/04 + cheat + description:Always fight Stryker in Master mode + code:84bf16/af+84dfef/9c+84c4f4/05 + cheat + description:Always fight Sindel in Master mode + code:84bf16/af+84dfef/9c+84c4f4/06 + cheat + description:Always fight Sektor in Master mode + code:84bf16/af+84dfef/9c+84c4f4/07 + cheat + description:Always fight Cyrax in Master mode + code:84bf16/af+84dfef/9c+84c4f4/08 + cheat + description:Always fight Kung Lao in Master mode + code:84bf16/af+84dfef/9c+84c4f4/09 + cheat + description:Always fight Kabal in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0a + cheat + description:Always fight Sheeva in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0b + cheat + description:Always fight Shang Tsung in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0c + cheat + description:Always fight Liu Kang in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0d + cheat + description:Always fight Smoke in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0e + cheat + description:Always fight Motaro in Master mode + code:84bf16/af+84dfef/9c+84c4f4/0f + cheat + description:Always fight Shao Kahn in Master mode + code:84bf16/af+84dfef/9c+84c4f4/10 + cheat + description:Always fight Noob-Saibot in Master mode + code:84bf16/af+84dfef/9c+84c4f4/11 + cheat + description:Invincibility (except throws and uppercuts) - P1 + code:7e5447/01 + cheat + description:Invincibility (except throws and uppercuts) - P2 + code:7e5449/01 + cheat + description:First round / one button fatalities + code:7e3af0/01 + +cartridge sha256:340293c06536d7b6981ad7c681e404f4390ff6c62340f844a4558877c1b82af0 + name:Mr. Do! (USA) + cheat + description:Invincibility + code:02e78d/80 + cheat + description:Infinite lives + code:7e18b2/09 + cheat + description:Two enemies on screen at most + code:7e1440/00 + cheat + description:Only one Cherry needed to clear level + code:02a4d9/9c + cheat + description:Level modifier (level is always one less than entered) + code:7e189e/00+7e18a0/00+7e18b4/00 + +cartridge sha256:3472dd574b50aed2fa998f464398db4fbb00f5a300a672c3737ee9336a008a16 + name:Mr. Nutz (USA) (En,Fr) + cheat + description:Invincibility + code:7e008d/2d + cheat + description:Infinite Nuts + code:7e0a29/99 + cheat + description:Infinite coins + code:7e1894/99 + cheat + description:One hit kills on bosses + code:7e05d0/00 + +cartridge sha256:44f0f159e1d56a703baa08d648a0d871c037e18198ec119c07795a3757c9e163 + name:Mr. Tuff (Europe) (En,Fr,De,Es,It) (Proto) (1994-12-05) + cheat + description:Infinite time + code:7eeb1c/39 + cheat + description:Infinite time on item pick-ups and flame-thrower fuel + code:7eeb93/27 + cheat + description:Enable auto-hit + code:7eeb79/03 + cheat + description:Easy bosses (except Octopod) + code:7ef4f8/00 + cheat + description:Jump higher + code:7e0421/00 + cheat + description:Have drill + code:7eeaf4/01 + cheat + description:Have super attack + code:7eeaf4/02 + cheat + description:Have bowling ball + code:7eeaf4/03 + cheat + description:Have fire smash + code:7eeaf4/04 + cheat + description:Have regular punch + code:7eeaf4/05 + cheat + description:Have crescent blast + code:7eeaf4/06 + cheat + description:Have mace + code:7eeaf4/07 + cheat + description:Have jet pack special + code:7eeb68/01 + cheat + description:Have missiles special + code:7eeb68/02 + cheat + description:Have flame thrower special + code:7eeb68/03 + +cartridge sha256:4f172253946ae29ddbf1e8169b48d55fe1aed8d007adafc6fa3e62685ed45de0 + name:Mr. Tuff (USA) (En,Fr,De) (Proto) (1994-07-12) + cheat + description:Invincibility + code:7eeb46/fe + cheat + description:Infinite health + code:7ed580/03 + cheat + description:Infinite lives + code:7ed580/03 + cheat + description:No targets to smash + code:7eeb2e/00 + +cartridge sha256:007735e68a91cab403f1c955d9d562e9311124e660fa5b32e5c5d0a2e052160e + name:Ms. Pac-Man (USA) + cheat + description:Ghosts eatable at start and infinite power pill time + code:7e029e/03 + cheat + description:Infinite Power Pellet time + code:7e029e/01 + cheat + description:Infinite lives + code:7e028c/03 + cheat + description:Level modifier + code:7e039e/00 + +cartridge sha256:f292598ac462fdfcd32ad9b6b35ac01d4bab020391dff92bfe94780ec604289a + name:Musya - The Classic Japanese Tale of Horror (USA) + cheat + description:Invincibility (blinking) + code:7e103c/0a + cheat + description:Infinite health + code:7e101a/10 + cheat + description:Infinite lives + code:7e1033/03 + cheat + description:Infinite Fire magic + code:7e102f/04 + cheat + description:Infinite Heal magic + code:7e1032/33 + cheat + description:Infinite Help magic + code:7e1030/33 + cheat + description:Infinite Lightning magic + code:7e102e/04 + cheat + description:Infinite Web magic + code:7e1031/33 + cheat + description:Have strongest weapon + code:7e102c/06 + +cartridge sha256:a19337da953f63c806754b90af7ff9fbea1bf090618dae732ee3a546882b8700 + name:Mystic Ark (Japan) + cheat + description:999 HP for hero + code:7eb004/0f+7eb005/27 + cheat + description:999 MP for Hero + code:7eb008/e7+7eb009/03 + cheat + description:Have enough gold + code:7eb120/ff+7eb121/ff + cheat + description:Quick gain EXP + code:7e0551/ff+7e0552/ff + +cartridge sha256:c70b812a9d2df7f95b279e4050e03a4b8a68588a370816e645f378296b84e5d1 + name:NBA All-Star Challenge (USA) + cheat + description:P1 can't score in the 1-on-1, free throw or tournament stages + code:80e395/6d + cheat + description:P2 or computer can't score in the 1-on-1, free throw or tournament events + code:80e3b9/cd + cheat + description:P1 can't score in 3-point shootout + code:80e155/cd+80e13e/cd + cheat + description:P2 or computer can't score in 3-point shootout + code:80e11e/cd+80e107/cd + cheat + description:Stop shot clock (1-on-1 and 1-on-1 tournament modes) + code:80af85/cd+80af83/80 + cheat + description:12-second shot clock (1-on-1 and 1-on-1 tournament modes) + code:80afe8/01+80afe3/02 + cheat + description:48-second shot clock - after the 1st shot (1-on-1 and 1-on-1 tournament modes) + code:80afe8/04+80afe3/08 + +cartridge sha256:b257cffb3484e6be051a56268cb99ee888bd6d3e9c0e8d6d0779ff66c411f6ba + name:NBA Jam - Tournament Edition (USA) + cheat + description:Enable extended roster + code:8aa145/a9 + cheat + description:Infinite shot clock time + code:80ad5a/ad + cheat + description:Ability to set shot clock option down to 1 + code:aa85d5/01 + cheat + description:Have almost Infinite Turbo - P1 + code:81bd93/ad + cheat + description:Have almost Infinite Turbo - P2 + code:a6b587/ad + cheat + description:Turbo recharges quicker - P1 + code:81bdc2/01 + cheat + description:Turbo recharges quicker - P2 + code:a6b5b6/01 + cheat + description:Twice as much turbo - P1 + code:81bdc7/40 + cheat + description:Twice as much turbo - P2 + code:a6b5bb/40 + cheat + description:Shots worth more - P1 + code:00a6d0/38 + cheat + description:Shots worth more - P2 + code:00a8e5/38 + cheat + description:Player is On Fire after 2 baskets instead of 3 + code:9a9d1a/04 + cheat + description:No turbo (except in tournament mode) - P1 + code:91bdbe/a9 + cheat + description:No turbo (except in tournament mode) - P2 + code:a6b5b2/a9 + cheat + description:Move much faster (except in tournament mode) - all players + code:26fd27/00+26fd2c/06 + cheat + description:Move super fast (except in tournament mode) - all players + code:26fd27/00+26fd2c/09 + cheat + description:Hot spots and Power ups are on in tournament mode automatically (don't select the special features menu) + code:26fc59/06 + cheat + description:Have all secret power-ups except slippery floors on - all players + code:8afa7c/00+8afa90/80+4cf078/26 + cheat + description:Have Power Push, Powered Up 3pts, Infinite Turbo, Always On Fire, Super Dunks, Max Power, Powered Up Goal Tending and Quick Hands - P1 + code:82f9c4/ff + cheat + description:Have Power Block, Powered Up 3pts, Infinite Turbo, Always On Fire, Super Dunks, Max Power, Powered Up Goal Tending and Quick Hands - P2 + code:82fa6a/ff + cheat + description:Have Power Block, Powered Up 3pts, Infinite Turbo, Always On Fire, Super Dunks, Max Power, Powered Up Goal Tending and Quick Hands - P3 + code:82fb10/ff + cheat + description:Have Power Block, Powered Up 3pts, Infinite Turbo, Always On Fire, Super Dunks, Max Power, Powered Up Goal Tending and Quick Hands - P4 + code:82fbb6/ff + cheat + description:Have Power-up offense, Speed Up, block opponent to make both fall, Teleport Pass and High Shots - P1 + code:82f9c5/ff + cheat + description:Have Power-up offense, Speed Up, block opponent to make both fall, Teleport Pass and High Shots - P2 + code:82fa6b/ff + cheat + description:Have Power-up offense, Speed Up, block opponent to make both fall, Teleport Pass and High Shots - P3 + code:82fb11/ff + cheat + description:Have Power-up offense, Speed Up, block opponent to make both fall, Teleport Pass and High Shots - P4 + code:82fbb7/ff + cheat + description:Have all secret power-ups - all players + code:8afa7c/00+8afa90/80 + cheat + description:Have all secret power-ups on - P1 + code:82f9c4/ff+82f9c5/ff + cheat + description:Have all secret power-ups on - P2 + code:82fa6a/ff+82fa6b/ff + cheat + description:Have all secret power-ups on - P3 + code:82fb10/ff+82fb11/ff + cheat + description:Have all secret power-ups on - P4 + code:82fbb6/ff+82fbb7/ff + cheat + description:Have Power Push - P1 + code:82f9c4/01 + cheat + description:Have Powered Up 3 pointers - P1 + code:82f9c4/02 + cheat + description:Have Powered Up 3 pointers - P2 + code:82fa6a/02 + cheat + description:Have Powered Up 3 pointers - P3 + code:82fb10/02 + cheat + description:Have Powered Up 3 pointers - P4 + code:82fbb6/02 + cheat + description:Have Infinite Turbo - P1 + code:82f9c4/04 + cheat + description:Have Infinite Turbo - P2 + code:82fa6a/04 + cheat + description:Have Infinite Turbo - P3 + code:82fb10/04 + cheat + description:Have Infinite Turbo - P4 + code:82fbb6/04 + cheat + description:Always On Fire - P1 + code:82f9c4/08 + cheat + description:Always On Fire - P2 + code:82fa6a/08 + cheat + description:Always On Fire - P3 + code:82fb10/08 + cheat + description:Always On Fire - P4 + code:82fbb6/08 + cheat + description:Have Super Dunks - P1 + code:82f9c4/10 + cheat + description:Have Super Dunks - P2 + code:82fa6a/10 + cheat + description:Have Super Dunks - P3 + code:82fb10/10 + cheat + description:Have Super Dunks - P4 + code:82fbb6/10 + cheat + description:Have Max Power - P1 + code:82f9c4/20 + cheat + description:Have Max Power - P2 + code:82fa6a/20 + cheat + description:Have Max Power - P3 + code:82fb10/20 + cheat + description:Have Max Power - P4 + code:82fbb6/20 + cheat + description:Have Powered Up Goal Tending - P1 + code:82f9c4/40 + cheat + description:Have Powered Up Goal Tending - P2 + code:82fa6a/40 + cheat + description:Have Powered Up Goal Tending - P3 + code:82fb10/40 + cheat + description:Have Powered Up Goal Tending - P4 + code:82fbb6/40 + cheat + description:Have Quick Hands - P1 + code:82f9c4/80 + cheat + description:Have Quick Hands - P2 + code:82fa6a/80 + cheat + description:Have Quick Hands - P3 + code:82fb10/80 + cheat + description:Have Quick Hands - P4 + code:82fbb6/80 + cheat + description:Have Powered Up Offense - P1 + code:82f9c5/01 + cheat + description:Have Powered Up Offense - P2 + code:82fa6b/01 + cheat + description:Have Powered Up Offense - P3 + code:82fb11/01 + cheat + description:Have Powered Up Offense - P4 + code:82fbb7/01 + cheat + description:Move very quickly - P1 + code:82f9c5/02 + cheat + description:Move very quickly - P2 + code:82fa6b/02 + cheat + description:Move very quickly - P3 + code:82fb11/02 + cheat + description:Move very quickly - P4 + code:82fbb7/02 + cheat + description:Knock down both opponents by pushing one - P1 + code:82f9c5/04 + cheat + description:Knock down both opponents by pushing two - P2 + code:82fa6b/04 + cheat + description:Knock down both opponents by pushing three - P3 + code:82fb11/04 + cheat + description:Knock down both opponents by pushing four - P4 + code:82fbb7/04 + cheat + description:Knock down opposite opponent - P1 + code:82f9c5/10 + cheat + description:Knock down opposite opponent - P2 + code:82fa6b/10 + cheat + description:Knock down opposite opponent - P3 + code:82fb11/10 + cheat + description:Knock down opposite opponent - P4 + code:82fbb7/10 + cheat + description:Have High Shots - P1 + code:82f9c5/20 + cheat + description:Have High Shots - P2 + code:82fa6b/20 + cheat + description:Have High Shots - P3 + code:82fb11/20 + cheat + description:Have High Shots - P4 + code:82fbb7/20 + cheat + description:Have Power Block - P2 + code:82fa6a/01 + cheat + description:Have Power Block - P3 + code:82fb10/01 + cheat + description:Have Power Block - P4 + code:82fbb6/01 + cheat + description:Have Teleport Passes - P1 + code:82f9c5/08 + cheat + description:Have Teleport Passes - P2 + code:82fa6b/08 + cheat + description:Have Teleport Passes - P3 + code:82fb11/08 + cheat + description:Have Teleport Passes - P4 + code:82fbb7/08 + cheat + description:Start with 1 point - P1 + code:82f843/ee + cheat + description:Start with 1 point - P2 + code:82f84f/ee + +cartridge sha256:3ef9d4b537ea83c8ba9ec8be7aba37ddac22a71c73d0aec46fe8e5a8f5b34a7c + name:NBA Jam (USA) (Rev 1) + cheat + description:Always On Fire - all players + code:8afed6/08 + cheat + description:Always On Fire (alt) - all players + code:8afe51/08 + cheat + description:Have Infinite Turbo - all players + code:8afeec/08 + cheat + description:Have Infinite Turbo (alt) - all players + code:8afe67/08 + cheat + description:Have Super Dunk ability - all players + code:8afebd/0b + cheat + description:Have Super Dunk ability (alt) - all players + code:8afe38/0b + cheat + description:Have Super Interception ability - all players + code:8afe8e/0b + cheat + description:Have Super Interception ability (alt) - all players + code:8afe09/0b + cheat + description:Juice mode + code:8aff02/08 + cheat + description:Juice mode (alt) + code:8afe7d/08 + cheat + description:Visitor's baskets worth 1 + code:00a5a6/99 + cheat + description:Visitor's baskets worth 2 + code:00a5a6/e2 + cheat + description:Visitor's baskets worth 3 + code:00a5a6/e4 + cheat + description:Visitor's baskets worth 4 + code:00a5a6/e5 + cheat + description:Visitor's baskets worth 5 + code:00a5a6/e7 + cheat + description:Visitor's baskets worth 6 + code:00a5a6/e8 + cheat + description:Visitor's baskets worth 7 + code:00a5a6/ea + cheat + description:Visitor's baskets worth 8 + code:00a5a6/ec + cheat + description:Home's baskets worth 1 + code:00a78f/99 + cheat + description:Home's baskets worth 2 + code:00a78f/e2 + cheat + description:Home's baskets worth 3 + code:00a78f/e4 + cheat + description:Home's baskets worth 4 + code:00a78f/e5 + cheat + description:Home's baskets worth 5 + code:00a78f/e7 + cheat + description:Home's baskets worth 6 + code:00a78f/e8 + cheat + description:Home's baskets worth 7 + code:00a78f/ea + cheat + description:Home's baskets worth 8 + code:00a78f/ec + cheat + description:Shot success percentages displayed for non-dunk shots + code:8afea7/08 + cheat + description:Shot success percentages displayed for non-dunk shots (alt) + code:8afe22/08 + cheat + description:Need 2 baskets to be On Fire + code:9a9f03/02+9a9ec4/02 + cheat + description:Need 4 baskets to be On Fire + code:9a9f03/04 + cheat + description:Need 5 baskets to be On Fire + code:9a9f03/05 + cheat + description:Need 6 baskets to be On Fire + code:9a9f03/06 + cheat + description:Need 7 baskets to be On Fire + code:9a9f03/07 + cheat + description:Need 8 baskets to be On Fire + code:9a9f03/08 + cheat + description:Need 9 baskets to be On Fire + code:9a9f03/09 + cheat + description:Need 10 baskets to be On Fire + code:9a9f03/0a + cheat + description:Need 2 baskets to stay On Fire until an opponent goes On Fire + code:9a9f03/02 + cheat + description:Turbo bar never goes up (until next quarter) + code:a7f387/00 + cheat + description:Turbo bar never goes up (until next quarter) (alt) + code:a7f36b/00 + cheat + description:Turbo bar restores very slowly + code:a7f387/0e + cheat + description:Turbo bar restores very slowly (alt) + code:a7f36b/0e + cheat + description:Turbo bar restores much slower + code:a7f387/15 + cheat + description:Turbo bar restores much slower (alt) + code:a7f36b/15 + cheat + description:Turbo bar restores slower + code:a7f387/1d + cheat + description:Turbo bar restores slower (alt) + code:a7f36b/1d + cheat + description:Turbo bar restores faster + code:a7f387/40 + cheat + description:Turbo bar restores faster (alt) + code:a7f36b/40 + cheat + description:Turbo bar restores much faster + code:a7f387/50 + cheat + description:Turbo bar restores much faster (alt) + code:a7f36b/50 + cheat + description:Turbo bar restores extremely fast + code:a7f387/81 + cheat + description:Turbo bar restores extremely fast (alt) + code:a7f36b/81 + cheat + description:Turbo drains very slowly + code:a7f378/04 + cheat + description:Turbo drains very slowly (alt) + code:a7f35c/04 + cheat + description:Turbo drains slower + code:a7f378/08 + cheat + description:Turbo drains slower (alt) + code:a7f35c/08 + cheat + description:Turbo drains slightly slower + code:a7f378/10 + cheat + description:Turbo drains slightly slower (alt) + code:a7f35c/10 + cheat + description:Turbo drains slightly faster + code:a7f378/22 + cheat + description:Turbo drains slightly faster (alt) + code:a7f35c/22 + cheat + description:Turbo drains faster + code:a7f378/2d + cheat + description:Turbo drains faster (alt) + code:a7f35c/2d + cheat + description:Turbo drains very fast + code:a7f378/38 + cheat + description:Turbo drains very fast (alt) + code:a7f35c/38 + cheat + description:Always On Fire - P1 + code:7e0a96/01 + cheat + description:Always On Fire - P2 + code:7e0a96/03 + +cartridge sha256:0f18c496426bb97fe5e8b91ad5299f0b1c3898ac17047b745c86b167c212ab7a + name:NBA Jam (USA) + cheat + description:Always On Fire - all players + code:8afed6/08 + cheat + description:Always On Fire (alt) - all players + code:8afe51/08 + cheat + description:Have Infinite Turbo - all players + code:8afeec/08 + cheat + description:Have Infinite Turbo (alt) - all players + code:8afe67/08 + cheat + description:Have Super Dunk ability - all players + code:8afebd/0b + cheat + description:Have Super Dunk ability (alt) - all players + code:8afe38/0b + cheat + description:Have Super Interception ability - all players + code:8afe8e/0b + cheat + description:Have Super Interception ability (alt) - all players + code:8afe09/0b + cheat + description:Juice mode + code:8aff02/08 + cheat + description:Juice mode (alt) + code:8afe7d/08 + cheat + description:Visitor's baskets worth 1 + code:00a5a6/99 + cheat + description:Visitor's baskets worth 2 + code:00a5a6/e2 + cheat + description:Visitor's baskets worth 3 + code:00a5a6/e4 + cheat + description:Visitor's baskets worth 4 + code:00a5a6/e5 + cheat + description:Visitor's baskets worth 5 + code:00a5a6/e7 + cheat + description:Visitor's baskets worth 6 + code:00a5a6/e8 + cheat + description:Visitor's baskets worth 7 + code:00a5a6/ea + cheat + description:Visitor's baskets worth 8 + code:00a5a6/ec + cheat + description:Home's baskets worth 1 + code:00a78f/99 + cheat + description:Home's baskets worth 2 + code:00a78f/e2 + cheat + description:Home's baskets worth 3 + code:00a78f/e4 + cheat + description:Home's baskets worth 4 + code:00a78f/e5 + cheat + description:Home's baskets worth 5 + code:00a78f/e7 + cheat + description:Home's baskets worth 6 + code:00a78f/e8 + cheat + description:Home's baskets worth 7 + code:00a78f/ea + cheat + description:Home's baskets worth 8 + code:00a78f/ec + cheat + description:Shot success percentages displayed for non-dunk shots + code:8afea7/08 + cheat + description:Shot success percentages displayed for non-dunk shots (alt) + code:8afe22/08 + cheat + description:Need 2 baskets to be On Fire + code:9a9f03/02+9a9ec4/02 + cheat + description:Need 4 baskets to be On Fire + code:9a9f03/04 + cheat + description:Need 5 baskets to be On Fire + code:9a9f03/05 + cheat + description:Need 6 baskets to be On Fire + code:9a9f03/06 + cheat + description:Need 7 baskets to be On Fire + code:9a9f03/07 + cheat + description:Need 8 baskets to be On Fire + code:9a9f03/08 + cheat + description:Need 9 baskets to be On Fire + code:9a9f03/09 + cheat + description:Need 10 baskets to be On Fire + code:9a9f03/0a + cheat + description:Need 2 baskets to stay On Fire until an opponent goes On Fire + code:9a9f03/02 + cheat + description:Turbo bar never goes up (until next quarter) + code:a7f387/00 + cheat + description:Turbo bar never goes up (until next quarter) (alt) + code:a7f36b/00 + cheat + description:Turbo bar restores very slowly + code:a7f387/0e + cheat + description:Turbo bar restores very slowly (alt) + code:a7f36b/0e + cheat + description:Turbo bar restores much slower + code:a7f387/15 + cheat + description:Turbo bar restores much slower (alt) + code:a7f36b/15 + cheat + description:Turbo bar restores slower + code:a7f387/1d + cheat + description:Turbo bar restores slower (alt) + code:a7f36b/1d + cheat + description:Turbo bar restores faster + code:a7f387/40 + cheat + description:Turbo bar restores faster (alt) + code:a7f36b/40 + cheat + description:Turbo bar restores much faster + code:a7f387/50 + cheat + description:Turbo bar restores much faster (alt) + code:a7f36b/50 + cheat + description:Turbo bar restores extremely fast + code:a7f387/81 + cheat + description:Turbo bar restores extremely fast (alt) + code:a7f36b/81 + cheat + description:Turbo drains very slowly + code:a7f378/04 + cheat + description:Turbo drains very slowly (alt) + code:a7f35c/04 + cheat + description:Turbo drains slower + code:a7f378/08 + cheat + description:Turbo drains slower (alt) + code:a7f35c/08 + cheat + description:Turbo drains slightly slower + code:a7f378/10 + cheat + description:Turbo drains slightly slower (alt) + code:a7f35c/10 + cheat + description:Turbo drains slightly faster + code:a7f378/22 + cheat + description:Turbo drains slightly faster (alt) + code:a7f35c/22 + cheat + description:Turbo drains faster + code:a7f378/2d + cheat + description:Turbo drains faster (alt) + code:a7f35c/2d + cheat + description:Turbo drains very fast + code:a7f378/38 + cheat + description:Turbo drains very fast (alt) + code:a7f35c/38 + cheat + description:Always On Fire - P1 + code:7e0a96/01 + cheat + description:Always On Fire - P2 + code:7e0a96/03 + +cartridge sha256:6a7324734004d99206439430243b51a05fa8c25ffa314dafc7f127235d1a730f + name:NBA Showdown (USA) + cheat + description:Infinite time + code:80d823/ad + cheat + description:Infinite time-outs + code:80e156/ad + cheat + description:No personal fouls - both teams + code:82ec9b/ad + cheat + description:Infinite shot clock - computer + code:80d444/ad + cheat + description:12-sec. shot clock when ball is in-bounded - P1 + code:83f1eb/0c+83933c/0c+80e519/0c + cheat + description:12-sec. shot clock when ball is in-bounded - computer + code:83f1eb/0c+828cfc/0c+82b620/0c + cheat + description:1-min. quarters + code:86fb0b/01 + cheat + description:3 time-outs + code:83f162/03 + +cartridge sha256:8ef5d5c50ffeca1e62e88e4fe2909eaf191e28fbb5a9faf98b7b10bea72c9ed9 + name:NCAA Basketball (USA) (Rev 1) + cheat + description:Infinite time to shoot + code:019473/ad + cheat + description:Infinite timeouts - P1 + code:00d624/ad + cheat + description:Infinite timeouts - P2 + code:00d62e/ad + cheat + description:Shot timer starts at 10 sec. instead of 45 + code:019490/10 + cheat + description:Shot timer starts at 20 sec. + code:019490/20 + cheat + description:Shot timer starts at 30 sec. + code:019490/30 + cheat + description:Shot timer starts at 60 sec. + code:019490/60 + cheat + description:Shot timer starts at 90 sec. + code:019490/90 + cheat + description:3-point shots worth 0 - both players + code:00ef2e/00 + cheat + description:3-point shots worth 1 point + code:00ef2e/01 + cheat + description:3-point shots worth 2 points + code:00ef2e/02 + cheat + description:3-point shots worth 4 points + code:00ef2e/04 + cheat + description:3-point shots worth 5 points + code:00ef2e/05 + cheat + description:3-point shots worth 6 points + code:00ef2e/06 + cheat + description:3-point shots worth 7 points + code:00ef2e/07 + cheat + description:3-point shots worth 8 points + code:00ef2e/08 + cheat + description:3-point shots worth 9 points + code:00ef2e/09 + cheat + description:P1 shots worth 1 extra point (2-pt. shots worth 3, 3-pt. shots worth 4) + code:009bc9/38+009e57/38 + cheat + description:P2 shots worth 1 extra point (2-pt. shots worth 3, 3-pt. shots worth 4) + code:009e4b/38+009bbd/38 + cheat + description:P1 free throws worth 2 instead of 1 + code:009d01/38 + cheat + description:P2 free throws worth 2 + code:009cf5/38 + cheat + description:No 5-second violations + code:008c78/ad + +cartridge sha256:6a59115a9958d4a9fa167095505a2ddf222ca6291209d07618319e39a2be8b61 + name:NFL Quarterback Club (USA) + cheat + description:Cannot be tackled (hold X) + code:829c85/2f+829c84/a5+829c86/0a+829c87/10 + +cartridge sha256:f43f8ec546b8060e9d191fca860c38caf5a43eda86a304f0073647c6fad7b2c9 + name:NFL Quarterback Club 96 (USA) + cheat + description:Cannot be tackled (hold X) + code:8289ab/6e+8289aa/a5+8289ac/0a+8289ad/10 + +cartridge sha256:5132e1c0d466963e6adc09e8a608ebd90619ab94f7fc908d626bbaf6a99dfa19 + name:NHL '94 (USA) + cheat + description:Score from anywhere (hold X) + code:9e90af/75+9e90ae/0e+9e90b0/07+9e90b4/0f+9e90b1/10 + +cartridge sha256:01c0b58d5fd5d5484fea988455a55a71ed9e606538d2b3ce3f216159cc6929b0 + name:NHL 95 (USA) + cheat + description:Score from anywhere (hold X while in the opponent's half of the rink) + code:c4444c/45+c44446/c0+c4444b/a6+c44445/a5+c44447/0a+c44448/10 + +cartridge sha256:d24c0175ee4eafed88e277691c5f5dafd4e197723097e2eb68aa6b40f449fff2 + name:NHL 96 (USA) + cheat + description:Score from anywhere (hold X while in the opponent's half of the rink) + code:c643b0/b1+c643af/a5+c643b1/0a+c643b5/0a+c643b2/10 + +cartridge sha256:2a2dc2ef84efd9a773d1e8231b7e3e57f0de7e4528968670963f2f1f358eef39 + name:NHL 97 (USA) + cheat + description:Score from anywhere (hold X while in the opponent's half of the rink) + code:c64424/45+c6441e/b1+c64423/78+c6441d/a5+c6441f/0a+c64420/10 + +cartridge sha256:8113c2cedafc8fd5a56c8638ae340fb275f263ff5c5e18d04dc6c3ebc5cfffee + name:NHL 98 (USA) + cheat + description:Score from anywhere (hold X while in the opponent's half of the rink) + code:c6466d/47+c64667/b1+c6466c/c1+c64666/a5+c64668/0a+c64669/10 + +cartridge sha256:d44f487d84f5bb761955b7b70a5464b2f094e199875f595f312c88e04ac647ff + name:NHL Stanley Cup (USA) (En,Fr) + cheat + description:Visitor starts with 1 point (exhibition mode) + code:808a33/01+808a37/08+808a36/f8 + cheat + description:Home starts with 1 point (exhibition mode) + code:808a33/01+808a37/08+808a36/fa + cheat + description:Visitor starts with 3 points (exhibition mode) + code:808a33/03+808a37/08+808a36/f8 + cheat + description:Home starts with 3 points (exhibition mode) + code:808a33/03+808a37/08+808a36/fa + cheat + description:Visitor starts with 5 points (exhibition mode) + code:808a33/05+808a37/08+808a36/f8 + cheat + description:Home starts with 5 points (exhibition mode) + code:808a33/05+808a37/08+808a36/fa + cheat + description:Visitor starts with 7 points (exhibition mode) + code:808a33/07+808a37/08+808a36/f8 + cheat + description:Home starts with 7 points (exhibition mode) + code:808a33/07+808a37/08+808a36/fa + cheat + description:Visitor starts with 9 points (exhibition mode) + code:808a33/09+808a37/08+808a36/f8 + cheat + description:Home starts with 9 points (exhibition mode) + code:808a33/09+808a37/08+808a36/fa + cheat + description:Visitor scores 1 point for goals, Home scores 3 + code:81c861/69 + cheat + description:Periods are 1 min (choose 5 minutes from Options) + code:80f641/01 + cheat + description:Periods are 3 min (choose 5 minutes from Options) + code:80f641/03 + cheat + description:Periods are 7 min (choose 5 minutes from Options) + code:80f641/07 + cheat + description:Periods are 9 min (choose 5 minutes from Options) + code:80f641/09 + cheat + description:Periods are 15 min (choose 10 minutes from Options) + code:80f60a/52 + cheat + description:Periods are 30 min (choose 10 minutes from Options) + code:80f64e/03 + cheat + description:Penalty for charging is 1 minute instead of 2 + code:81d395/3c + cheat + description:Penalty for holding is 1 minute instead of 2 + code:81d39e/3c + cheat + description:Penalty for tripping is 1 minute instead of 2 + code:81d3a7/3c + cheat + description:Penalty for high sticking is 1 minute instead of 2 + code:81d3b0/3c + cheat + description:Penalty for elbowing is 1 minute instead of 2 + code:81d3b9/3c + cheat + description:Penalty for hooking is 1 minute instead of 2 + code:81d3c2/3c + cheat + description:Penalty for roughing is 1 minute instead of 2 + code:81d3cb/3c + cheat + description:Penalty for slashing is 1 minute instead of 4 + code:81d3d4/3c + cheat + description:Penalty for spearing is 1 minute instead of 2 + code:81d3dd/3c + cheat + description:Penalty for charging is 30 seconds + code:81d395/1e + cheat + description:Penalty for holding is 30 seconds + code:81d39e/1e + cheat + description:Penalty for tripping is 30 seconds + code:81d3a7/1e + cheat + description:Penalty for high sticking is 30 seconds + code:81d3b0/1e + cheat + description:Penalty for elbowing is 30 seconds + code:81d3b9/1e + cheat + description:Penalty for hooking is 30 seconds + code:81d3c2/1e + cheat + description:Penalty for roughing is 30 seconds + code:81d3cb/1e + cheat + description:Penalty for slashing is 30 seconds + code:81d3d4/1e + cheat + description:Penalty for spearing is 30 seconds + code:81d3dd/1e + cheat + description:Penalty for charging is 3 minutes + code:81d395/b4 + cheat + description:Penalty for holding is 3 minutes + code:81d39e/b4 + cheat + description:Penalty for tripping is 3 minutes + code:81d3a7/b4 + cheat + description:Penalty for high sticking is 3 minutes + code:81d3b0/b4 + cheat + description:Penalty for elbowing is 3 minutes + code:81d3b9/b4 + cheat + description:Penalty for hooking is 3 minutes + code:81d3c2/b4 + cheat + description:Penalty for roughing is 3 minutes + code:81d3cb/b4 + cheat + description:Penalty for slashing is 3 minutes + code:81d3d4/b4 + cheat + description:Penalty for spearing is 3 minutes + code:81d3dd/b4 + +cartridge sha256:55f3432a130085c112d65aa6443c41eb7a8aeec59aad2c2b4b2ac536b604b449 + name:NHLPA Hockey 93 (USA) + cheat + description:Period clock runs faster + code:8e804c/16 + cheat + description:Period clock runs slower + code:8e804c/04 + cheat + description:Period clock runs much faster + code:8e804c/40 + cheat + description:Period clock runs much slower + code:8e804c/01 + cheat + description:Period clock is frozen (no time limit) + code:8e8052/ad + cheat + description:Each period lasts 1 minute instead of 10 minutes + code:86fcb1/3c+86fcb2/00 + cheat + description:Each period lasts 2 minutes + code:86fcb1/78+86fcb2/00 + cheat + description:Each period lasts 3 minutes + code:86fcb1/b4+86fcb2/00 + cheat + description:Each period lasts 4 minutes + code:86fcb1/f0+86fcb2/00 + cheat + description:Each period lasts 15 minutes + code:86fcb1/84+86fcb2/03 + cheat + description:Each period lasts 30 minutes + code:86fcb1/08+86fcb2/07 + cheat + description:Each period lasts 40 minutes + code:86fcb1/60+86fcb2/09 + cheat + description:Each period lasts 60 minutes + code:86fcb1/10+86fcb2/0e + cheat + description:All penalties last 1 minute + code:80eb66/01+80eb65/a9 + cheat + description:All penalties last 2 minutes + code:80eb66/02+80eb65/a9 + cheat + description:All penalties last 3 minutes + code:80eb66/03+80eb65/a9 + cheat + description:All penalties last 4 minutes + code:80eb66/04+80eb65/a9 + cheat + description:All penalties last 5 minutes + code:80eb66/05+80eb65/a9 + cheat + description:All penalties last 7 minutes + code:80eb66/07+80eb65/a9 + cheat + description:All penalties last 9 minutes + code:80eb66/09+80eb65/a9 + cheat + description:CPU Always Pulls Goalie + code:7e13f5/ff + +cartridge sha256:d7ad6f67860da78fe25d9e79dd13af7ac7efaa0c8e0103898a4849ab4af9e438 + name:Nickelodeon GUTS (USA) + cheat + description:Gain lots of points in Slam Dunk / Attack levels + code:7e126d/ff + +cartridge sha256:ce9c819d6496e58901b39d9b04558a89e09ccc3aac33690b8d02bb0406682a57 + name:Nigel Mansell's World Championship Racing (USA) + cheat + description:Almost no tire wear (graphic distortion in the pits) + code:818d9d/a5+819862/a5 + cheat + description:Only 1 lap required on all tracks + code:80bf6a/f2 + cheat + description:Only 3 laps required in South Africa + code:878066/02 + cheat + description:Only 3 laps required in Mexico + code:878068/02 + cheat + description:Only 3 laps required in Brazil + code:87806a/02 + cheat + description:Only 3 laps required in Spain + code:87806c/02 + cheat + description:Only 3 laps required in San Marino + code:87806e/02 + cheat + description:Only 3 laps required in Monaco + code:878070/02 + cheat + description:Only 3 laps required in Canada + code:878072/02 + cheat + description:Only 3 laps required in France + code:878074/02 + cheat + description:Only 3 laps required in Britain + code:878076/02 + cheat + description:Only 3 laps required in Germany + code:878078/02 + cheat + description:Only 3 laps required in Hungary + code:87807a/02 + cheat + description:Only 3 laps required in Belgium + code:87807c/02 + cheat + description:Only 3 laps required in Italy + code:87807e/02 + cheat + description:Only 3 laps required in Portugal + code:878080/02 + cheat + description:Only 3 laps required in Japan + code:878082/02 + cheat + description:Only 3 laps required in Australia + code:878084/02 + cheat + description:Full season ends after South Africa + code:1fe1f9/01 + cheat + description:Full season ends after Mexico + code:1fe1f9/02 + cheat + description:Full season ends after Brazil + code:1fe1f9/03 + cheat + description:Full season ends after Spain + code:1fe1f9/04 + cheat + description:Full season ends after San Marino + code:1fe1f9/05 + cheat + description:Full season ends after Monaco + code:1fe1f9/06 + cheat + description:Full season ends after Canada + code:1fe1f9/07 + cheat + description:Full season ends after France + code:1fe1f9/08 + cheat + description:Full season ends after Britain + code:1fe1f9/09 + cheat + description:Full season ends after Germany + code:1fe1f9/0a + cheat + description:Full season ends after Hungary + code:1fe1f9/0b + cheat + description:Full season ends after Belgium + code:1fe1f9/0c + cheat + description:Full season ends after Italy + code:1fe1f9/0d + cheat + description:Full season ends after Portugal + code:1fe1f9/0e + cheat + description:Full season ends after Japan + code:1fe1f9/0f + cheat + description:Start in Mexico in the Full Season + code:1f89d5/01 + cheat + description:Start in Brazil + code:1f89d5/02 + cheat + description:Start in Spain + code:1f89d5/03 + cheat + description:Start in San Marino + code:1f89d5/04 + cheat + description:Start in Monaco + code:1f89d5/05 + cheat + description:Start in Canada + code:1f89d5/06 + cheat + description:Start in France + code:1f89d5/07 + cheat + description:Start in Britain + code:1f89d5/08 + cheat + description:Start in Germany + code:1f89d5/09 + cheat + description:Start in Hungary + code:1f89d5/0a + cheat + description:Start in Belgium + code:1f89d5/0b + cheat + description:Start in Italy + code:1f89d5/0c + cheat + description:Start in Portugal + code:1f89d5/0d + cheat + description:Start in Japan + code:1f89d5/0e + cheat + description:Start in Australia + code:1f89d5/0f + cheat + description:Start on extra course (stats are for South Africa but the course is different) + code:1f89d5/10 + +cartridge sha256:620af60cd4a6683871e9339c2db63d87538819af29b3cf967a1729b53a3bd6b3 + name:Nightmare Busters (Europe) (Proto) + cheat + description:Enable Extra Options in options menu + code:7e1f6b/02 + +cartridge sha256:fccc96af24a2463b1c53253e1c5c8ef63641355fae53c0fb410427f29743262b + name:Ninja Gaiden Trilogy (USA) + cheat + description:(NG) Invincibility + code:849f7d/80 + cheat + description:(NG) Infinite health + code:84a3e7/a5 + cheat + description:(NG) Infinite lives + code:84a616/a5 + cheat + description:(NG) Infinite time + code:84bd65/00 + cheat + description:(NG) Start with very little time + code:86afb0/96 + cheat + description:(NG) Start with lots of time + code:86afb0/ff + cheat + description:(NG) Start with very little health (after first life) + code:84a5fb/01 + cheat + description:(NG) Start with about half health (after first life) + code:84a5fb/01 + cheat + description:(NG) Start with 1 life + code:84a870/00 + cheat + description:(NG) Start with 5 lives + code:84a870/03 + cheat + description:(NG) Start with 9 lives + code:84a870/08 + cheat + description:(NGII) Invincibility + code:889220/60 + cheat + description:(NGII) Infinite health + code:889499/a5 + cheat + description:(NGII) Infinite lives + code:888f63/a5 + cheat + description:(NGII) Infinite time + code:888d16/a5 + cheat + description:(NGII) Start with very little health + code:8895e8/01 + cheat + description:(NGII) Start with about half health + code:8895e8/08 + cheat + description:(NGII) Start every life with two Shadow Ninjas + code:88995a/0f + cheat + description:(NGII) Throwing stars don't use Ninja Power (ignore counter) + code:88ad24/01 + cheat + description:(NGII) Start with 1 life + code:8896ea/00 + cheat + description:(NGIII) Invincibility + code:8ccf97/00 + cheat + description:(NGIII) Infinite health + code:8cd2c7/a5 + cheat + description:(NGIII) Infinite lives + code:8c8e51/a9 + cheat + description:(NGIII) Infinite time + code:8cd53f/a5 + cheat + description:(NGIII) Almost infinite Ninja Power + code:8cce3d/a5 + cheat + description:(NGIII) Start with 99 Ninja Power (ignore the counter) + code:8c8ea3/63 + cheat + description:(NGIII) Start with 1 life + code:8c8e96/00 + cheat + description:(NGIII) Start with 5 lives + code:8c8e96/03 + cheat + description:(NGIII) Start with 9 lives + code:8c8e96/08 + cheat + description:(NGIII) Start with very little health + code:8c8eb0/01 + cheat + description:(NGIII) Start with about half health + code:8c8eb0/08 + cheat + description:(NG) Invincibility after first hit + code:7e0093/01 + cheat + description:(NG) Infinite Ninja Power + code:7e0064/63 + cheat + description:(NG) Auto kill enemies that are close by + code:849f92/80+849f9f/80 + cheat + description:(NGII) Invincibility (alt) + code:7e0068/25 + cheat + description:(NGII) Infinite Ninja Power + code:7e00ae/63 + cheat + description:(NGII) Always have Fireball + code:7e007d/02 + cheat + description:(NGIII) Infinite lives (alt) + code:7e00c4/03 + cheat + description:(NGIII) Infinite Ninja Power + code:7e00cd/63 + +cartridge sha256:3c109e50b91ec6df3bb8509778ae544c99433fb40dda9b801178dfe513053618 + name:Ninjawarriors (USA) + cheat + description:Invincibility + code:029c4e/f0+02b701/f0+029c60/d0+029c65/d0+02b70d/d0 + cheat + description:Infinite health + code:029842/ad + cheat + description:Infinite time + code:00ae20/8d + cheat + description:Infinite specials once you obtain one + code:00af9a/af + cheat + description:One hit kills + code:038cbf/a9+038cc0/00+038cc1/00+02a3f0/a9+02a3f1/00+02a3f2/00 + cheat + description:Go to stage select menu (disable once the menu loads) + code:7e0000/0a + +cartridge sha256:f099937ac4c8afb38c517c5d85475224985fb8f345dacb44994a617ea05bf4e5 + name:No Escape (USA) + cheat + description:Infinite health + code:80dec6/b7 + cheat + description:Infinite time + code:8c962d/a9 + cheat + description:Infinite lives + code:80dc1b/b2 + +cartridge sha256:7f3d0ebac6ecfb99cfd1d5b13210e989df9e8b2f2319a63c42faef8ad115a964 + name:Nolan Ryan's Baseball (USA) + cheat + description:1 strike and batter is out + code:019a10/ce + cheat + description:Batter never strikes out + code:019a10/ad + cheat + description:1 ball and batter walks + code:0199f2/ce + cheat + description:Batter never walks + code:0199f2/ad + cheat + description:Each run worth 2 - P1 + code:01cda2/38 + cheat + description:Each run worth 2 - P2 + code:01cdb8/38 + cheat + description:Short game (play only odd-numbered innings) + code:018e0f/38 + cheat + description:Increasing a player's power setting does not decrease the power number excess (use to maximize stats for a player) + code:02a0bd/00 + cheat + description:Maximum power for a player is 32 instead of 25 + code:029f1f/20 + cheat + description:Maximum power for a player is 40 instead of 25 + code:029f1f/28 + cheat + description:Maximum power for a player is 48 + code:029f1f/30 + +cartridge sha256:9712829b38f23229d4e3d65da78237659c790235f425c6b12487e4d9e9a37ae9 + name:Nosferatu (USA) + cheat + description:Almost infinite health + code:8099c5/a5 + cheat + description:Infinite time + code:80dc32/a6 + cheat + description:Don't lose crystals when you get hit + code:848372/ad + cheat + description:Start with very little health + code:809fd8/01 + cheat + description:Start with less health + code:809fd8/03 + cheat + description:Start with more health + code:809fd8/09 + cheat + description:Start with a lot more health + code:809fd8/0f + cheat + description:Start with more time + code:80a2f3/a9+80a2f4/22+80a2f5/00 + cheat + description:Start on stage 1-2 + code:809fe3/06 + cheat + description:Start on stage 1-3 + code:809fe3/09 + cheat + description:Start on stage 2 + code:809fe3/0a + cheat + description:Start on stage 2-2 + code:809fe3/10 + cheat + description:Start on stage 2-3 + code:809fe3/11 + cheat + description:Start on stage 2-4 + code:809fe3/17 + cheat + description:Start on stage 3 + code:809fe3/18 + cheat + description:Start on stage 3-2 + code:809fe3/20 + cheat + description:Start on stage 3-3 + code:809fe3/24 + cheat + description:Start on stage 4 + code:809fe3/27 + cheat + description:Start on stage 4-2 + code:809fe3/2d + cheat + description:Start on stage 4-3 + code:809fe3/2e + cheat + description:Start on stage 4-4 + code:809fe3/34 + cheat + description:Start on stage 5 + code:809fe3/35 + cheat + description:Start on stage 5-2 + code:809fe3/3b + cheat + description:Start on stage 5-3 + code:809fe3/3c + cheat + description:Start on stage 5-4 + code:809fe3/45 + cheat + description:Start on stage 6 + code:809fe3/46 + cheat + description:Start on stage 6-2 + code:809fe3/4e + cheat + description:Start on the final stage + code:809fe3/54 + cheat + description:Start on the final stage with more crystals + code:809fe3/54+809fe7/8d + cheat + description:View the ending + code:809fe3/56 + +cartridge sha256:31bc862ab0a8eabf23b5124e13940cb3501e7ecdd3f15e34142248ceb4aa139a + name:Obitus (USA) + cheat + description:Infinite health + code:7e1113/20 + cheat + description:Infinite Stamina + code:7e1117/20 + cheat + description:Infinite Daggers (keep off until you obtain one) + code:7f132e/02 + cheat + description:Infinite Silver Keys (keep off until you obtain one) + code:7f0ed8/02 + cheat + description:Infinite Gold Coins (keep off until you obtain one) + code:7f0e8e/63 + +cartridge sha256:b766c26498d0afd63f44aefdef42642d2483b54f18d2b81a4f1d67a57f641044 + name:Ogre Battle - The March of the Black Queen (USA) + cheat + description:Level up after every battle (even if you run away) + code:04db14/00 + cheat + description:View 'Edit Units' screen to give everyone 2778 max HP (2000 of it won't be visible, and you won't get your HP restored. It will go down to 999 max HP if it tries to update the amount) + code:02fb3d/a9+02fb42/9d+02fb43/da+02fb44/0a + cheat + description:View someone's stats from 'Edit Units' screen to give them max Luck + code:068730/a9+068731/ff+068732/ea+068733/9f + cheat + description:View someone's stats from 'Edit Units' screen to give them max Cha + code:06871c/a9+06871d/65+06871e/ea+06871f/9f + cheat + description:Every hidden thing is visible when you first enter an area + code:0583c3/a9+0583c5/a9+0583c6/ff + cheat + description:Leader's group moves 'Sky High' + code:82fd82/00 + cheat + description:Lans' group moves 'Sky High' + code:82fd36/00 + cheat + description:Judgement tarot card is stronger + code:03dd4d/ff + +cartridge sha256:e153195de7b59dd5b9854952cccca6bb93164e5fdff8292124bee6bbe5dbf16f + name:On the Ball (USA) + cheat + description:Infinite credits + code:01ccf6/ad + cheat + description:Faster timer + code:009899/02 + cheat + description:Stop timer - not lap timer (can still lose time by hitting hazards) + code:009899/00 + cheat + description:Minus blocks and bricks worth 0 (don't combine with other minus codes) + code:0098cc/ad + cheat + description:Minus 2 second block worth 0 + code:019d33/00 + cheat + description:Minus 2 second block worth minus 1 + code:019d33/10 + cheat + description:Minus 2 second block worth minus 3 + code:019d33/30 + cheat + description:Minus 2 second block worth minus 4 + code:019d33/40 + cheat + description:Minus 2 second block worth minus 5 + code:019d33/50 + cheat + description:Minus 2 second block worth minus 6 + code:019d33/60 + cheat + description:Minus 2 second block worth minus 7 + code:019d33/70 + cheat + description:Minus 2 second block worth minus 8 + code:019d33/80 + cheat + description:Minus 2 second block worth minus 9 + code:019d33/90 + cheat + description:Minus 5 second block worth 0 + code:019d46/00 + cheat + description:Minus 5 second block worth minus 1 + code:019d46/10 + cheat + description:Minus 5 second block worth minus 2 + code:019d46/20 + cheat + description:Minus 5 second block worth minus 3 + code:019d46/30 + cheat + description:Minus 5 second block worth minus 4 + code:019d46/40 + cheat + description:Minus 5 second block worth minus 6 + code:019d46/60 + cheat + description:Minus 5 second block worth minus 7 + code:019d46/70 + cheat + description:Minus 5 second block worth minus 8 + code:019d46/80 + cheat + description:Minus 5 second block worth minus 9 + code:019d46/90 + cheat + description:Minus 3 second brick worth 0 + code:019d59/00 + cheat + description:Minus 3 second brick worth minus 1 + code:019d59/10 + cheat + description:Minus 3 second brick worth minus 2 + code:019d59/20 + cheat + description:Minus 3 second brick worth minus 4 + code:019d59/40 + cheat + description:Minus 3 second brick worth minus 5 + code:019d59/50 + cheat + description:Minus 3 second brick worth minus 6 + code:019d59/60 + cheat + description:Minus 3 second brick worth minus 7 + code:019d59/70 + cheat + description:Minus 3 second brick worth minus 8 + code:019d59/80 + cheat + description:Minus 3 second brick worth minus 9 + code:019d59/90 + cheat + description:Plus bricks worth 0 (don't combine with other plus bricks codes) + code:0098b7/ad + cheat + description:Plus 3 bricks worth 0 + code:019d93/00 + cheat + description:Plus 3 bricks worth plus 1 + code:019d93/10 + cheat + description:Plus 3 bricks worth plus 2 + code:019d93/20 + cheat + description:Plus 3 bricks worth plus 4 + code:019d93/40 + cheat + description:Plus 3 bricks worth plus 5 + code:019d93/50 + cheat + description:Plus 3 bricks worth plus 6 + code:019d93/60 + cheat + description:Plus 3 bricks worth plus 7 + code:019d93/70 + cheat + description:Plus 3 bricks worth plus 8 + code:019d93/80 + cheat + description:Plus 3 bricks worth plus 9 + code:019d93/90 + cheat + description:Plus 5 bricks worth 0 + code:019da6/00 + cheat + description:Plus 5 bricks worth plus 1 + code:019da6/10 + cheat + description:Plus 5 bricks worth plus 2 + code:019da6/20 + cheat + description:Plus 5 bricks worth plus 3 + code:019da6/30 + cheat + description:Plus 5 bricks worth plus 4 + code:019da6/40 + cheat + description:Plus 5 bricks worth plus 6 + code:019da6/60 + cheat + description:Plus 5 bricks worth plus 7 + code:019da6/70 + cheat + description:Plus 5 bricks worth plus 8 + code:019da6/80 + cheat + description:Plus 5 bricks worth plus 9 + code:019da6/90 + cheat + description:Start with 2 credits + code:018083/01 + cheat + description:Start with 6 credits + code:018083/05 + cheat + description:Start with 8 credits + code:018083/07 + cheat + description:Start with 10 credits + code:018083/09 + +cartridge sha256:190742792a950a112f893cba0e083eb787cf24293f698967defff929635ba0e7 + name:Operation Logic Bomb - The Ultimate Search & Destroy (USA) + cheat + description:Infinite health + code:819070/ad + cheat + description:Take minimal damage + code:80aa8d/ee + cheat + description:Faster left-to-right movement + code:8191d5/fd+8191cd/02 + cheat + description:Faster up-and-down movement + code:819207/fd+8191e7/02 + cheat + description:Reflecting laser fire travels longer + code:8194d8/60 + cheat + description:Reflecting laser fire travels a lot longer + code:8194d8/ff + cheat + description:Start with 1 continue + code:809924/01 + cheat + description:Start with 6 continues + code:809924/06 + cheat + description:Start with 9 continues + code:809924/09 + cheat + description:Start with tracking missiles + code:809902/03+8098f0/20+809904/24 + cheat + description:Start with reflecting laser + code:809902/04+8098f0/20+809904/24 + cheat + description:Start with flame thrower + code:809902/05+8098f0/20+809904/24 + cheat + description:Start with hologram weapon + code:809914/01+809918/9c+80991b/9c + cheat + description:Start with directional mines + code:809914/02+809918/9c+80991b/9c + cheat + description:Infinite health (alt) + code:819070/ad + cheat + description:Infinite weapons + code:03ed4e/01 + cheat + description:Start with Tracking Missiles (alt) + code:8098f0/20+809902/03+809904/24 + cheat + description:Start with Reflecting Laser (alt) + code:8098f0/20+809902/04+809904/24 + cheat + description:Start with Flame Thrower (alt) + code:8098f0/20+809902/05+809904/24 + cheat + description:Start with Hologram weapon (alt) + code:809914/01+809918/9c+80991b/9c + cheat + description:Start with Directional Mines (alt) + code:809914/02+809918/9c+80991b/9c + cheat + description:Faster left-to-right movement (alt) + code:8191cd/02+8191d5/fd + cheat + description:Faster up-and-down movement (alt) + code:8191e7/02+819207/fd + cheat + description:Reflecting laser fire travels a lot longer (alt) + code:8194d8/ff + +cartridge sha256:2ec71aca4efc3791b6b3e65956df3eafd2a46e223d5ea71aead07d30ca48b6c9 + name:Operation Starfi5h (Europe) + cheat + description:Infinite health + code:7efb05/03 + cheat + description:Infinite lives + code:7efb03/03 + +cartridge sha256:5cbed0401734142184166917427d24f9e5f107a7adea665e2f4b4101491ad54b + name:Operation Thunderbolt (USA) + cheat + description:Infinite health + code:7e36ea/63 + cheat + description:Infinite Bullets + code:7e36ed/09 + cheat + description:Infinite Rockets + code:7e36ef/09 + cheat + description:Infinite Clips + code:7e36ee/09 + +cartridge sha256:0c08e6b817e4d0b333acb910a0bde3d79bd2dc188defc5df9a7c1233fa81c98d + name:Oscar (USA) + cheat + description:Invincibility + code:7e0320/03 + cheat + description:Invincibility (alt) + code:7e05b6/ff + cheat + description:Infinite lives + code:7e0322/0a + cheat + description:All Oscars found + code:7e0324/00 + cheat + description:No Oscars to find + code:7e0324/00 + cheat + description:Multi-jump + code:7e0c7e/00+7e0c7f/00 + +cartridge sha256:db44f8b58a31b640a47aa4390101c3c6a5f613e4e49c636d44786278033dec19 + name:Outlander (USA) + cheat + description:Infinite health while in the car + code:808e45/ad+008e45/ad + cheat + description:Almost infinite health while out of the car (except when you eat poisonous food) + code:90908d/a5 + cheat + description:Infinite handgun ammo + code:90885f/00 + cheat + description:Infinite surface-to-air missiles on pick-up + code:81b67c/ad + cheat + description:Car ammo worth nothing on pick-up + code:908a3b/00 + cheat + description:Car ammo worth more on pick-up + code:908a3c/02 + cheat + description:Water worth nothing on pick-up + code:908ae3/00 + cheat + description:Water worth more on pick-up + code:908ae4/01 + cheat + description:Hand gun ammo worth nothing on pick-up + code:908a82/00 + cheat + description:Food worth nothing on pick-up + code:908ac0/00 + cheat + description:Gas can worth nothing on pick-up + code:908a11/00 + cheat + description:Gas can worth more on pick-up + code:908a12/02 + cheat + description:Start with more car ammo + code:81b84f/05 + cheat + description:Start with less car ammo + code:81b84f/00 + cheat + description:Start with more handgun ammo + code:81b854/6c + cheat + description:Start with less handgun ammo + code:81b854/10 + cheat + description:Start with more fuel + code:81b846/02 + +cartridge sha256:582548dc86598a3557e9e3c27285c81964b006a954affe5c73948da5375ea11c + name:Out of this World (USA) + cheat + description:First three shields are infinite + code:7e0d84/e7+7e0d8a/e7+7e0d90/e7 + cheat + description:Infinite ammo in levels that have guns + code:7e0c4e/80+7e0c4f/80 + +cartridge sha256:54b2f03393109ac7fd36d8c7752f15a44d9607ab0187a371b853191db3592c01 + name:Out to Lunch (USA) + cheat + description:Invincibility + code:7e0002/c8 + cheat + description:Infinite lives + code:7e0088/63 + cheat + description:Infinite time + code:7e008a/a9 + cheat + description:Score modifier + code:7e0009/63 + cheat + description:Start with Net + code:7e009e/01 + cheat + description:Start with Bag Of Flour (choose one) + code:7e009f/01 + cheat + description:Start with hot sauce attack (choose one) + code:7e009f/02 + cheat + description:Start with spoon (choose one) + code:7e009f/03 + cheat + description:Start with Cleats + code:7e00a2/01 + cheat + description:Exit is open + code:7e00be/00 + cheat + description:Hidden warp is open (whenever available) + code:7e000b/01 + +cartridge sha256:10c8abce67b49f8afbe880d2f13e0fd6d5efc162df34d5941e4a94851f23b2ff + name:Pac-Attack (USA) + cheat + description:Fairy bar is always full (normal mode) + code:7e160e/ff + +cartridge sha256:7fe4cb9c294d66589ff78e225774471ecb7db80df25f2b6199ca25671358072b + name:Pac-In-Time (USA) + cheat + description:Infinite health + code:7e1533/bf + cheat + description:Infinite lives + code:7e0ad5/02 + cheat + description:Instant exit + code:7e0b03/00 + +cartridge sha256:4cb52ba751c42d9e12ca429e5d657622a370b608002880a997f64de453f0de20 + name:Pac-Man 2 - The New Adventures (USA) + cheat + description:Infinite power pellets + code:82b7b4/ad + cheat + description:Have Rope-Way and Train Pass + code:7e0500/04 + cheat + description:Have all 3 Power Pellets + code:7e0506/03 + cheat + description:Have all 3 Cartridges + code:7e0507/07 + cheat + description:Have all 3 I.D. Cards + code:7e0508/07 + cheat + description:Have Milk + code:7e0509/01 + +cartridge sha256:46286d0839a4397fc4c067b39783f98d2aefeca870a468bae601a1434f1dde90 + name:Paladin's Quest (USA) + cheat + description:Level 99 after one battle + code:018aed/80+018af9/80 + cheat + description:Infinite health + code:019e79/64 + cheat + description:Spells use up no HP + code:01b3f5/64 + cheat + description:No money needed in toolhouse and weapon shop + code:0dbaba/9c + cheat + description:No money needed in learning center + code:07edca/9c + cheat + description:Spell power increases at 2x normal rate + code:0188e9/04 + cheat + description:Spell power increases at 3x normal rate + code:0188e9/06 + cheat + description:Chezni starts with 255 max HP + code:08f691/ff + cheat + description:Chezni starts with 255 present HP + code:08f68f/ff + cheat + description:Chezni starts with 40 Power, 42 Attack + code:08f693/28 + cheat + description:Chezni starts with 60 Power, 62 Attack + code:08f693/3c + cheat + description:Chezni starts with 42 Defense, 30 Endurance + code:08f697/1e + cheat + description:Chezni starts with 72 Defense, 60 Endurance + code:08f697/3c + cheat + description:Chezni starts with 30 Speed + code:08f695/1e + cheat + description:Chezni starts with 60 Speed + code:08f695/3c + cheat + description:Chezni starts with a bow + code:08f2c5/08 + cheat + description:Chezni starts with a light sword + code:08f2c5/0d + cheat + description:Chezni starts with a mid sword + code:08f2c5/10 + cheat + description:Chezni starts with a Aybro Spear + code:08f2c5/1a + cheat + description:Chezni starts with a heavy sword + code:08f2c5/17 + cheat + description:Chezni starts with a wind sword + code:08f2c5/30 + cheat + description:Chezni starts with HST + code:08f2c5/34 + cheat + description:Chezni starts with Gomutai + code:08f2c5/51 + cheat + description:Chezni starts with a Psych Beam + code:08f2c5/72 + cheat + description:Chezni starts with a flame thrower + code:08f2c5/73 + cheat + description:Chezni starts with light armor + code:08f2c6/0b + cheat + description:Chezni starts with mid armor + code:08f2c6/0f + cheat + description:Chezni starts with heavy armor + code:08f2c6/1c + cheat + description:Chezni starts with storm armor + code:08f2c6/31 + cheat + description:Chezni starts with bib + code:08f2c6/33 + cheat + description:Chezni starts with wood boots + code:08f2c7/02 + cheat + description:Chezni starts with long boots + code:08f2c7/1b + cheat + description:Chezni starts with knife boots + code:08f2c7/24 + cheat + description:Chezni starts with mid boots + code:08f2c7/15 + cheat + description:Chezni starts with sun helm + code:08f2c3/32 + cheat + description:Chezni starts with leather helm + code:08f2c3/05 + cheat + description:Chezni starts with helmet + code:08f2c3/0c + cheat + description:Chezni starts with rage helmet + code:08f2c3/2c + cheat + description:Chezni starts with power helmet + code:08f2c3/16 + cheat + description:Chezni starts with cosmo helmet + code:08f2c3/77 + cheat + description:Chezni starts with gabni shield + code:08f2c4/35 + cheat + description:Chezni starts with leather shield + code:08f2c4/36 + cheat + description:Chezni starts with pick-axe + code:08f2c4/09 + cheat + description:Chezni starts with gauntlet + code:08f2c4/14 + cheat + description:Chezni starts with fire shield + code:08f2c4/19 + cheat + description:Chezni starts with Rft shield + code:08f2c4/75 + cheat + description:No random battles + code:7e1868/09 + cheat + description:Infinite high gold + code:7e17c3/0e + cheat + description:Character 1 - level 99 + code:7e15fa/63 + cheat + description:Character 1 - 9999 current HP + code:7e15fe/0f+7e15ff/27 + cheat + description:Character 1 - 9999 max HP + code:7e1600/0f+7e1601/27 + cheat + description:Character 1 - 999 Power/Attack + code:7e1602/e7+7e1603/03 + cheat + description:Character 1 - 999 SP/Attack SP + code:7e1604/e7+7e1605/03 + cheat + description:Character 1 - 999 Defense/Endurance + code:7e1606/e7+7e1607/03 + cheat + description:Character 1 - 999 Luck + code:7e1608/e7+7e1608/03 + cheat + description:Character 1 - 99 available Magic + code:7e160f/63 + cheat + description:Character 1 - 127 E Spirit + code:7e1610/7f + cheat + description:Character 1 - 127 W Spirit + code:7e1611/7f + cheat + description:Character 1 - 127 F Spirit + code:7e1612/7f + cheat + description:Character 1 - 127 Sk Spirit + code:7e1613/7f + cheat + description:Character 1 - 127 L Spirit + code:7e1614/7f + cheat + description:Character 1 - 127 A Spirit + code:7e1615/7f + cheat + description:Character 1 - 127 MT Spirit + code:7e1616/7f + cheat + description:Character 1 - 127 SP Spirit + code:7e1617/7f + cheat + description:Character 1 - 25 spells + code:7e16dd/25 + cheat + description:Character 2 - level 99 + code:7e1620/63 + cheat + description:Character 2 - 9999 current HP + code:7e1624/0f+7e1625/27 + cheat + description:Character 2 - 9999 max HP + code:7e1626/0f+7e1627/27 + cheat + description:Character 2 - 999 Power/Attack + code:7e1628/e7+7e1629/03 + cheat + description:Character 2 - 999 SP/Attack SP + code:7e162a/e7+7e162b/03 + cheat + description:Character 2 - 999 Defense/Endurance + code:7e162c/e7+7e162d/03 + cheat + description:Character 2 - 999 Luck + code:7e162e/e7+7e162e/03 + cheat + description:Character 2 - 99 available Magic + code:7e1635/63 + cheat + description:Character 2 - 127 E Spirit + code:7e1636/7f + cheat + description:Character 2 - 127 W Spirit + code:7e1637/7f + cheat + description:Character 2 - 127 F Spirit + code:7e1638/7f + cheat + description:Character 2 - 127 Sk Spirit + code:7e1639/7f + cheat + description:Character 2 - 127 L Spirit + code:7e163a/7f + cheat + description:Character 2 - 127 A Spirit + code:7e163b/7f + cheat + description:Character 2 - 127 MT Spirit + code:7e163c/7f + cheat + description:Character 2 - 127 SP Spirit + code:7e163d/7f + cheat + description:Character 2 - 25 spells + code:7e1703/25 + cheat + description:Character 3 - level 99 + code:7e1646/63 + cheat + description:Character 3 - 9999 current HP + code:7e164a/0f+7e164b/27 + cheat + description:Character 3 - 9999 max HP + code:7e164c/0f+7e164d/27 + cheat + description:Character 3 - 999 Power/Attack + code:7e164e/e7+7e164f/03 + cheat + description:Character 3 - 999 SP/Attack SP + code:7e1650/e7+7e1651/03 + cheat + description:Character 3 - 999 Defense/Endurance + code:7e1652/e7+7e1653/03 + cheat + description:Character 3 - 999 Luck + code:7e1654/e7+7e1654/03 + cheat + description:Character 3 - 99 available Magic + code:7e165b/63 + cheat + description:Character 3 - 127 E Spirit + code:7e165c/7f + cheat + description:Character 3 - 127 W Spirit + code:7e165d/7f + cheat + description:Character 3 - 127 F Spirit + code:7e165e/7f + cheat + description:Character 3 - 127 Sk Spirit + code:7e165f/7f + cheat + description:Character 3 - 127 L Spirit + code:7e1660/7f + cheat + description:Character 3 - 127 A Spirit + code:7e1661/7f + cheat + description:Character 3 - 127 MT Spirit + code:7e1662/7f + cheat + description:Character 3 - 127 SP Spirit + code:7e1663/7f + cheat + description:Character 3 - 25 spells + code:7e1729/25 + cheat + description:Character 4 - level 99 + code:7e166c/63 + cheat + description:Character 4 - 9999 current HP + code:7e1670/0f+7e1671/27 + cheat + description:Character 4 - 9999 max HP + code:7e1672/0f+7e1673/27 + cheat + description:Character 4 - 999 Power/Attack + code:7e1674/e7+7e1675/03 + cheat + description:Character 4 - 999 SP/Attack SP + code:7e1676/e7+7e1677/03 + cheat + description:Character 4 - 999 Defense/Endurance + code:7e1678/e7+7e1679/03 + cheat + description:Character 4 - 999 Luck + code:7e167a/e7+7e167a/03 + cheat + description:Character 4 - 99 available Magic + code:7e1681/63 + cheat + description:Character 4 - 127 E Spirit + code:7e1682/7f + cheat + description:Character 4 - 127 W Spirit + code:7e1683/7f + cheat + description:Character 4 - 127 F Spirit + code:7e1684/7f + cheat + description:Character 4 - 127 Sk Spirit + code:7e1685/7f + cheat + description:Character 4 - 127 L Spirit + code:7e1686/7f + cheat + description:Character 4 - 127 A Spirit + code:7e1687/7f + cheat + description:Character 4 - 127 MT Spirit + code:7e1688/7f + cheat + description:Character 4 - 127 SP Spirit + code:7e1689/7f + cheat + description:Character 4 - 25 spells + code:7e174f/25 + +cartridge sha256:7cec4ffc3eda0441561717cf55927901b5fbbd669c254079f78ca74c67c4a17b + name:Paperboy 2 (USA) + cheat + description:Infinite papers + code:00b8ba/00 + cheat + description:Infinite time in training course + code:018438/00 + cheat + description:Infinite lives (game still ends when all subscriptions are canceled) + code:009af9/00 + cheat + description:Paper bundles worth 0 if you have less than 10 + code:018206/00 + cheat + description:Paper bundles worth 5 if you have less than 10 + code:018206/05 + cheat + description:Paper bundles worth 20 if you have less than 10 + code:018206/14 + cheat + description:Paper bundles worth 30 if you have less than 10 + code:018206/1e + cheat + description:Paper bundles worth 40 if you have less than 10 + code:018206/28 + cheat + description:Paper bundles worth 50 if you have less than 10 + code:018206/32 + cheat + description:Continue next life with 1 paper if you had less than 10 + code:00a567/01 + cheat + description:Continue next life with 5 papers if you had less than 10 + code:00a567/05 + cheat + description:Continue next life with 20 papers if you had less than 10 + code:00a567/14 + cheat + description:Continue next life with 30 papers if you had less than 10 + code:00a567/1e + cheat + description:Continue next life with 40 papers if you had less than 10 + code:00a567/28 + cheat + description:Continue next life with 50 papers if you had less than 10 + code:00a567/32 + cheat + description:Start with 79 seconds instead of 39 in Week 1 training course + code:0183c3/09 + cheat + description:Start with 59 seconds in Week 1 training course + code:0183c3/07 + cheat + description:Start with 19 seconds in Week 1 training course + code:0183c3/03 + cheat + description:Start with 25 papers instead of 10 + code:00a087/19 + cheat + description:Start with 50 papers + code:00a087/32 + cheat + description:Start with 99 papers + code:00a087/63 + cheat + description:Start with 1 life instead of 5 - Paperboy + code:009f1e/01 + cheat + description:Start with 3 lives - Paperboy + code:009f1e/03 + cheat + description:Start with 7 lives - Paperboy + code:009f1e/07 + cheat + description:Start with 9 lives - Paperboy + code:009f1e/09 + cheat + description:Start with 25 lives - Paperboy + code:009f1e/19 + cheat + description:Start with 50 lives - Paperboy + code:009f1e/32 + cheat + description:Start with 99 lives - Paperboy + code:009f1e/63 + cheat + description:Start with 1 life instead of 5 - Papergirl + code:009f70/01 + cheat + description:Start with 3 lives - Papergirl + code:009f70/03 + cheat + description:Start with 7 lives - Papergirl + code:009f70/07 + cheat + description:Start with 9 lives - Papergirl + code:009f70/09 + cheat + description:Start with 25 lives - Papergirl + code:009f70/19 + cheat + description:Start with 50 lives - Papergirl + code:009f70/32 + cheat + description:Start with 99 lives - Papergirl + code:009f70/63 + +cartridge sha256:14ad9d2fb8e6bb0f49bc9e53f3c472177653d1c24102169ade308a2fab8a8888 + name:Parodius Da! - Shinwa kara Owarai e (Japan) + cheat + description:Infinite lives + code:7e0098/03 + +cartridge sha256:c414a4084b3d03aba19496d2efdd68fcf826194d8f1308f5c98e3a7af2fcc063 + name:Peace Keepers, The (USA) + cheat + description:Invincibility + code:80de55/ad + cheat + description:Infinite health + code:80e063/8f+80e064/94+80e065/06+80e066/7e + cheat + description:One hit kills + code:83daac/64 + cheat + description:Hit anywhere + code:81ca6c/e0+81ca70/7b+81ca6d/00+81ca6e/07+81ca6f/10 + +cartridge sha256:5c0b5266a191852ca593235f07180e673cb79e3f0b0dd31f65808eef83bf6e90 + name:PGA Tour Golf (USA) + cheat + description:Ball goes in from anywhere + code:00b27f/80+00afa0/80 + cheat + description:Allow 14 clubs for full set instead of 13 + code:00ee71/0d+00d4c9/0d + cheat + description:Allow 15 clubs for full set + code:00ee71/0e+00d4c9/0e + cheat + description:Allow 16 clubs for full set + code:00ee71/0f+00d4c9/0f + cheat + description:No wind + code:00aeb0/80 + cheat + description:Constant wind of 10 mph + code:00aeb0/a9+00aeb2/00+00aeb1/0a + cheat + description:Constant wind direction to the left + code:00aec8/9c + cheat + description:Each round ends after hole 1 + code:00cb3d/01 + cheat + description:Each round ends after hole 2 + code:00cb3d/02 + cheat + description:Each round ends after hole 3 + code:00cb3d/03 + cheat + description:Each round ends after hole 4 + code:00cb3d/04 + cheat + description:Each round ends after hole 5 + code:00cb3d/05 + cheat + description:Each round ends after hole 6 + code:00cb3d/06 + cheat + description:Each round ends after hole 7 + code:00cb3d/07 + cheat + description:Each round ends after hole 8 + code:00cb3d/08 + cheat + description:Each round ends after hole 9 + code:00cb3d/09 + cheat + description:Each round ends after hole 10 + code:00cb3d/0a + cheat + description:Each round ends after hole 11 + code:00cb3d/0b + cheat + description:Each round ends after hole 12 + code:00cb3d/0c + cheat + description:Each round ends after hole 13 + code:00cb3d/0d + cheat + description:Each round ends after hole 14 + code:00cb3d/0e + cheat + description:Each round ends after hole 15 + code:00cb3d/0f + cheat + description:Each round ends after hole 16 + code:00cb3d/10 + cheat + description:Each round ends after hole 17 + code:00cb3d/11 + +cartridge sha256:0663330bc061f4b768fa1806610878ef6e6cf546f36041ae087c8e55703693b8 + name:Phalanx (USA) + cheat + description:Infinite health + code:00d761/ea + cheat + description:Infinite lives + code:00d6cb/00 + cheat + description:Infinite credits + code:0088e1/00 + cheat + description:Hit anywhere + code:00e240/ad+00e228/00+00e22d/00+00e219/00+00e21e/00 + cheat + description:Once power-up has been obtained, it is not lost until you continue (doesn't work for weapon, only power-ups) + code:00d85f/ad + cheat + description:Power capsule restores armor to full strength + code:00d6e3/50+00d6e4/83 + cheat + description:Power capsule has no effect on armor or power-up + code:00d6e2/60 + cheat + description:Start with 1 credit instead of 4 + code:1fc9bf/01+1fd109/01 + cheat + description:Start with 2 credits + code:1fc9bf/02+1fd109/02 + cheat + description:Start with 3 credits + code:1fc9bf/03+1fd109/03 + cheat + description:Start with 5 credits + code:1fc9bf/05+1fd109/05 + cheat + description:Start with 7 credits + code:1fc9bf/07+1fd109/07 + cheat + description:Start with 10 credits + code:1fc9bf/10+1fd109/10 + cheat + description:Start with 1 life + code:1fc9b3/01+1fd102/01 + cheat + description:Start with 2 lives + code:1fc9b3/02+1fd102/02 + cheat + description:Start with 3 lives + code:1fc9b3/03+1fd102/03 + cheat + description:Start with 4 lives + code:1fc9b3/04+1fd102/04 + cheat + description:Start with 6 lives + code:1fc9b3/06+1fd102/06 + cheat + description:Start with 11 lives + code:1fc9b3/11+1fd102/11 + cheat + description:Start with 26 lives + code:1fc9b3/26+1fd102/26 + cheat + description:Start with 51 lives + code:1fc9b3/51+1fd102/51 + cheat + description:Start with 100 lives + code:1fc9b3/9a+1fd102/9a + cheat + description:Start on mission 2 + code:1fd110/02+1fc9cb/02 + cheat + description:Start on mission 3 + code:1fd110/03+1fc9cb/03 + cheat + description:Start on mission 4 + code:1fd110/04+1fc9cb/04 + cheat + description:Start on mission 5 + code:1fd110/05+1fc9cb/05 + cheat + description:Start on mission 6 + code:1fd110/06+1fc9cb/06 + cheat + description:Start on mission 7 + code:1fd110/07+1fc9cb/07 + cheat + description:Start on mission 8 + code:1fd110/08+1fc9cb/08 + cheat + description:After losing a life automatically finish level, gain 99 lives and retain all power-ups + code:00d83a/ad + cheat + description:Infinite lives (alt) + code:00d6cb/00 + +cartridge sha256:be1bf238d76b74bfcc0b86a899b8caedd0a49c105576c659b56045c85512a166 + name:Phantom 2040 (USA) (Beta) + cheat + description:Invincibility after first hit + code:81833e/ee + cheat + description:Infinite lives + code:81c614/ad + cheat + description:Infinite weapon energy + code:81c5cb/ad + cheat + description:Access all weapons (highlight weapon and press X to equip) + code:81e798/9d + cheat + description:Invincibility + code:7e0410/dc + cheat + description:Moonjump + code:7e0294/06 + cheat + description:Have Wave Gun + code:7e0cd3/01 + cheat + description:Have Blank Space + code:7e0cd4/01 + cheat + description:Have Spread + code:7e0cd5/01 + cheat + description:Have Devestator + code:7e0cd6/01 + cheat + description:Have Homing Missile + code:7e0cd7/01 + cheat + description:Have Breaker + code:7e0cd8/01 + cheat + description:Have Boomerang + code:7e0cd9/01 + cheat + description:Have Explosive Pellets + code:7e0cda/01 + cheat + description:Have Super Explosive Pellets + code:7e0cdb/01 + cheat + description:Have Flash Pellets + code:7e0cdc/01 + cheat + description:Have Fire Retardant Pellets + code:7e0cdd/01 + cheat + description:Have Shadow Panther + code:7e0cde/01 + cheat + description:Have Invisibility + code:7e0cdf/01 + cheat + description:Have Armor + code:7e0ce0/01 + cheat + description:Have First Aid Kit + code:7e0ce1/01 + cheat + description:Have Energy Aid Kit + code:7e0ce2/01 + +cartridge sha256:b7291088f5c49e1fc55bf932076ec03f7b39f6e409ae06e884b57024c56cdc87 + name:Phantom 2040 (USA) + cheat + description:Invincibility + code:818370/ee+81836b/ee + cheat + description:Infinite lives + code:81c718/8d + cheat + description:Infinite weapon energy + code:81c6d6/ad + cheat + description:Access all weapons (highlight weapon and press X to equip) + code:81e7f4/de + cheat + description:Super jump 2X + code:819102/f6 + cheat + description:Super jump 3X + code:819102/f1 + cheat + description:Walk through walls (horizontal) + code:81cd13/18 + cheat + description:Invincibility (alt) + code:7e0410/dc + cheat + description:Moonjump + code:7e0294/06 + cheat + description:Have Wave Gun + code:7e0fd3/01 + cheat + description:Have Blank Space + code:7e0fd4/01 + cheat + description:Have Spread + code:7e0fd5/01 + cheat + description:Have Devestator + code:7e0fd6/01 + cheat + description:Have Homing Missile + code:7e0fd7/01 + cheat + description:Have Breaker + code:7e0fd8/01 + cheat + description:Have Boomerang + code:7e0fd9/01 + cheat + description:Have Explosive Pellets + code:7e0fda/01 + cheat + description:Have Super Explosive Pellets + code:7e0fdb/01 + cheat + description:Have Flash Pellets + code:7e0fdc/01 + cheat + description:Have Fire Retardant Pellets + code:7e0fdd/01 + cheat + description:Have Shadow Panther + code:7e0fde/01 + cheat + description:Have Invisibility + code:7e0fdf/01 + cheat + description:Have Armor + code:7e0fe0/01 + cheat + description:Have First Aid Kit + code:7e0fe1/01 + cheat + description:Have Energy Aid Kit + code:7e0fe2/01 + +cartridge sha256:a0b39d7fd7c39c5b0f41f3542fb8d2887530ded1c111b4ffb2a863845e704ecc + name:Pieces (USA) + cheat + description:Place pieces anywhere to auto place + code:c08261/00+c08267/00 + +cartridge sha256:03d0127f5de3237e22ad00de0c20763274da7b71142dde693240ac96d10983a3 + name:Pilotwings (USA) + cheat + description:Infinite fuel + code:00bd07/64 + cheat + description:Infinite time (disable to detach hang glider from plane) + code:01bff4/00 + cheat + description:Reduce gravity + code:80f631/20 + cheat + description:Increase gravity + code:80f631/a0 + cheat + description:Increase rocket pack thrust power 3x + code:00f615/fd + +cartridge sha256:3a52bf09850aa054dca443f7ea74d43f201dffecc40326924ecba9b0f1450e43 + name:Pinball Dreams (USA) + cheat + description:Slow motion + code:808be0/a3 + cheat + description:Ball attracts to the top + code:80a650/6e + cheat + description:Ball attracts to the side + code:80a610/6e + cheat + description:Spastic ball + code:80a6a1/9f + +cartridge sha256:0888d20ab2f834c77b0a2dc2162c43890a1640adc78c6b0bb5892ca8d5008ad3 + name:Pinball Fantasies (USA) + cheat + description:Infinite balls + code:7e00b8/03 + +cartridge sha256:d0f4a5040ecf96dc49aa0084160e291a38f2ee75319750db4d6687ab36828da9 + name:Pink Goes to Hollywood (USA) + cheat + description:Invincibility + code:83924f/60+839756/60+839667/60 + cheat + description:Invincibility (alt) + code:7e0201/ff + cheat + description:Infinite lives + code:7e01ff/03 + cheat + description:Infinite time + code:7e0203/09 + cheat + description:Have 99 tricks + code:7e0217/99 + cheat + description:Have 9 of every token + code:7e01b9/09+7e01bb/09+7e01bd/09+7e01bf/09+7e01c1/09 + +cartridge sha256:fe7b861504886b40207d777cfc0dce76778b5fd8e679a67d04c9ded98cd1e59e + name:Pinocchio (Europe) + cheat + description:Infinite health + code:7e03d8/28 + cheat + description:Infinite lives + code:7e03de/03 + +cartridge sha256:98c51c3bb577600fe79577c323333a791baa30904f37c695890e6e380b75e3c8 + name:Pinocchio (USA) + cheat + description:Infinite health + code:7e03d8/50 + cheat + description:Infinite lives + code:7e03de/05 + cheat + description:Enable level select + code:7e201c/ff + +cartridge sha256:447dfa710e69479159e9d407474fbf5f67d3a3330ab0c7627afd123ded3fdb3a + name:Pirates of Dark Water, The (USA) + cheat + description:Invincibility + code:80b89c/ad + cheat + description:Health refills about every 15 seconds + code:80b5df/21+80b5e0/07 + cheat + description:Infinite health + code:80b5db/00 + cheat + description:Infinite health (alt) + code:82df9c/8d+82df9a/a9+82df9b/58 + cheat + description:Infinite special attacks (no health loss) + code:80c570/00 + cheat + description:Infinite lives + code:80b546/ad + cheat + description:Hit anywhere + code:80c24c/24+80c3cd/24+80c22d/8d+80c254/80+80c358/80+80c217/80+80c22e/37+80c22f/07+80c218/14 + cheat + description:One hit kills + code:80c713/ea+80c714/ea+80c715/a9+80c716/7f + cheat + description:1/2 health after 1st hit (1st life only) + code:858d74/20+838ce9/20 + cheat + description:Start with less health (after 1st life) + code:809644/20 + cheat + description:Start with 6 lives (not when joining in) + code:80a8b3/05 + cheat + description:Start with 2 lives (not when joining in) + code:80a8b3/01 + +cartridge sha256:c2a1a66648a0a0bfe2f201cf4f926d138e410fbf85ecf436ccb9aac70c0df3de + name:Pit-Fighter (USA) + cheat + description:Infinite super powers after gaining one + code:01e2dd/00 + cheat + description:Executioner in match 1 has less health + code:00a58c/64 + cheat + description:Executioner in match 1 has more health + code:00a58d/01 + cheat + description:C.C. has less health in match 2 + code:00a59c/64+00a59d/00 + cheat + description:C.C. has more health in match 2 + code:00a59d/02 + cheat + description:Angel has less health in match 3 + code:00a5bc/64 + cheat + description:Angel has more health in match 3 + code:00a5bd/01 + cheat + description:All opponents have less health + code:00bd70/a2+00bd71/00+00a58c/64 + cheat + description:All opponents have more health + code:00bd70/a2+00bd71/00+00a58c/64+00a58d/02 + cheat + description:Start with more health + code:019318/ff + cheat + description:Start with less health + code:019318/32 + cheat + description:Start with a lot more health + code:01931e/02 + cheat + description:Start with 3 super powers + code:0194ee/03 + +cartridge sha256:e03d117d8b3093b0bbad5224638f85378b254b81eb304e506a732b4338802e0f + name:Pitfall - The Mayan Adventure (USA) + cheat + description:Infinite Stones of Pacal + code:81c782/00 + cheat + description:Infinite Sling Stones + code:81c57d/00 + cheat + description:Infinite Boomerangs + code:81c37d/00 + cheat + description:Walk through walls + code:808623/80 + cheat + description:Jump through ceilings + code:8089b4/80 + cheat + description:Get 2x energy from sacred hearts + code:838092/32 + cheat + description:Get 3x energy from sacred hearts + code:838092/4b + cheat + description:Sling stones do mega-damage + code:81c626/32 + cheat + description:Time keeper power-up lasts longer + code:8382a0/f0+8382a1/02 + cheat + description:20 Stones of Pacal on pick-up + code:838101/14 + cheat + description:Moon-jump + code:818a1f/00 + cheat + description:Reset game to play original Pitfall infinitely + code:809575/0e + cheat + description:Replaces main game with original Pitfall + code:83b057/0e + cheat + description:Start with 10 lives + code:818a9b/09+83af88/09 + cheat + description:Start with 7 lives + code:818a9b/06+83af88/06 + cheat + description:Start with 2 lives + code:818a9b/01+83af88/01 + cheat + description:Invincibility and invisibility + code:7e03cd/19 + cheat + description:Infinite health + code:7e10c1/ff + cheat + description:Infinite lives + code:7e00c0/03 + +cartridge sha256:72b2b3bead3fcd27a1610ad5d4d8be3235efeaff96df2e7858911992a5892d21 + name:Pocky & Rocky (USA) + cheat + description:Infinite health - Pocky + code:04ebed/a5 + cheat + description:Infinite health - Rocky + code:04effd/a5 + cheat + description:Infinite time + code:00d404/a9 + cheat + description:Infinite lives - Pocky + code:01cf32/00 + cheat + description:Infinite lives - Rocky + code:01e97e/00 + cheat + description:Enable level select (pause and press select) + code:009ae8/80 + cheat + description:Weapons don't deplete when hit - Pocky + code:04ebd8/24 + cheat + description:Weapons don't deplete when hit - Pocky + code:04efe4/24 + cheat + description:Blue ball acts as red ball - Pocky + code:04ea14/02 + cheat + description:Red ball acts as blue ball - Pocky + code:04ea0b/01 + cheat + description:Blue ball acts as red ball - Rocky + code:04ee97/02 + cheat + description:Red ball acts as blue ball - Rocky + code:04ee8e/01 + cheat + description:9 lives stolen from Rocky (must have one life remaining) + code:01c3c2/09 + cheat + description:9 lives stolen from Pocky (must have one life remaining) + code:01e4c2/09 + cheat + description:Start with 1 life - Pocky + code:008bdc/01 + cheat + description:Start with 6 lives - Pocky + code:008bdc/06 + cheat + description:Start with 9 lives - Pocky + code:008bdc/09 + cheat + description:Start with 1 life - Rocky + code:008bdd/01 + cheat + description:Start with 6 lives - Rocky + code:008bdd/06 + cheat + description:Start with 9 lives - Rocky + code:008bdd/09 + cheat + description:Invincibility + code:01b67f/d0+01b67d/85 + cheat + description:Infinite health + code:7e0068/08 + cheat + description:Infinite time (alt) + code:7e0f12/9a + cheat + description:Infinite lives + code:7e006a/03 + cheat + description:Infinite Special + code:7e0066/02 + cheat + description:Infinite Shield + code:7e00e4/02 + +cartridge sha256:cc33ae02114ea18a86592de327b2b4bcc80728b11a5e4c61666dca71480d4169 + name:Pocky & Rocky 2 (USA) + cheat + description:Invincibility + code:039731/60+069739/60 + cheat + description:Infinite time + code:7e7064/76 + cheat + description:Infinite time (alt) + code:7e7064/79+7e7062/79+7e7060/79 + cheat + description:Infinite lives + code:7e19f4/03 + cheat + description:Infinite Keys + code:7e05b2/99 + cheat + description:Max Card + code:7e19f6/02 + cheat + description:Infinite hearts when riding Spirit Dog + code:7e19f2/05 + +cartridge sha256:000f4534a0376958edcc7ae3e6c5a7ea0dd6a775646207f60ad3923e27f110f3 + name:Pop'n TwinBee - Rainbow Bell Adventures (Europe) + cheat + description:Infinite health + code:7e02ec/64 + +cartridge sha256:5e580f220ed16281df8ee9a5f450b553f39f8c4078d3f3048d66bda15f98e19f + name:Populous (USA) + cheat + description:Allows you to select any world from the Conquer screen with the B and X buttons + code:00e248/00 + cheat + description:Your population starts at 10 instead of 3 for battles 0-4 + code:0186a5/0a + cheat + description:Your population starts at 20 for battles 0-4 + code:0186a5/14 + cheat + description:Your population starts at 30 for battles 0-4 + code:0186a5/1e + cheat + description:His population starts at 10 instead of 3 for battles 0-4 + code:0186a6/0a + cheat + description:His population starts at 20 for battles 0-4 + code:0186a6/14 + cheat + description:His population starts at 30 for battles 0-4 + code:0186a6/1e + cheat + description:You have no Supreme Commands available for battles 0-4 + code:0186a2/00 + cheat + description:He has all Supreme Commands available for battles 0-4 + code:0186a1/3f + cheat + description:Your population starts at 10 instead of 3 for battles 5-9 + code:0186af/0a + cheat + description:Your population starts at 20 for battles 5-9 + code:0186af/14 + cheat + description:Your population starts at 30 for battles 5-9 + code:0186af/1e + cheat + description:His population starts at 10 instead of 3 for battles 5-9 + code:0186b0/0a + cheat + description:His population starts at 20 for battles 5-9 + code:0186b0/14 + cheat + description:His population starts at 30 for battles 5-9 + code:0186b0/1e + cheat + description:You have no Supreme Commands available for battles 5-9 + code:0186ac/00 + cheat + description:He has all Supreme Commands available for battles 5-9 + code:0186ab/3f + cheat + description:Your population starts at 10 instead of 2 for battles 10-14 + code:0186b9/0a + cheat + description:Your population starts at 20 for battles 10-14 + code:0186b9/14 + cheat + description:Your population starts at 30 for battles 10-14 + code:0186b9/1e + cheat + description:His population starts at 10 instead of 2 for battles 10-14 + code:0186ba/0a + cheat + description:His population starts at 20 for battles 10-14 + code:0186ba/14 + cheat + description:His population starts at 30 for battles 10-14 + code:0186ba/1e + cheat + description:You have no Supreme Commands available for battles 10-14 + code:0186b6/00 + cheat + description:He has all Supreme Commands available for battles 10-14 + code:0186b5/3f + +cartridge sha256:ee9759fdb590ba908f569c2bb8a63703d282b58b84bd1fe0a472ea47685acdc5 + name:Porky Pig's Haunted Holiday (USA) + cheat + description:Invincibility (blinking) + code:02aced/a5 + cheat + description:Don't flash after geting hit + code:02d488/00 + cheat + description:Don't flash as long after geting hit + code:02d488/12 + cheat + description:Flash longer after geting hit + code:02d488/ff + cheat + description:Cupcakes are worth 0 + code:038e14/00 + cheat + description:Cupcakes are worth 2 + code:038e14/02 + cheat + description:Cupcakes are worth 5 + code:038e14/05 + cheat + description:Cupcakes are worth 10 + code:038e14/0a + cheat + description:Cupcakes are worth 15 + code:038e14/0f + cheat + description:Start with 1 life + code:00a087/00 + cheat + description:Start with 7 lives + code:00a087/06 + cheat + description:Start with 10 lives + code:00a087/09 + cheat + description:Start with 1 heart + code:00a08a/01 + cheat + description:Start with 2 hearts + code:00a08a/02 + cheat + description:Start with 8 hearts + code:00a08a/08 + cheat + description:Start with 10 hearts + code:00a08a/0a + cheat + description:Infinite health + code:7e0eaa/04 + cheat + description:Infinite Cupcakes + code:7e0e9f/63 + cheat + description:Infinite lives + code:7e0e9e/09 + +cartridge sha256:06c8fc466805f97c9147711b2d8370d4f4d05d9fa3a916f17aa1682f73c9a63b + name:Power Instinct (USA) + cheat + description:Hit anywhere - P1 + code:c4c7da/e0+c4c7dc/00+c4c7dd/f0+c4c7de/1c + +cartridge sha256:0288ec049723cd0c7f1148cdc1aef0b6922b8a756affe373c99d5690e0dfceaa + name:Power Piggs of the Dark Age (USA) + cheat + description:Invincibility + code:809639/60+809265/80 + cheat + description:Multi-jump + code:808e87/24+82f8c8/07 + cheat + description:Partial invincibility + code:7e06a4/3f + cheat + description:Infinite health + code:7e147e/00 + cheat + description:Infinite lives + code:7e1500/09 + cheat + description:Infinite Doughnuts + code:7e1505/09 + cheat + description:Start on level Beautiful Downtown Pigg + code:7e1874/00 + cheat + description:Start on level Dark Age Donut + code:7e1874/01 + cheat + description:Start on level North Blowhole Forest + code:7e1874/02 + cheat + description:Start on level Road to Wolff Castle + code:7e1874/03 + +cartridge sha256:982a56e543995ca2221a4a58431cdeb03ac178e2874c2d6ac00be15bddc6eb02 + name:Power Soukoban (Japan) + cheat + description:Invincibility + code:81e51c/00 + +cartridge sha256:8f387d083de1399bb79e5312c31a6f1757f2a536bfa25cecf1aea77bfd77058b + name:Prehistorik Man (USA) (En,Fr,Es) + cheat + description:Invincibility + code:7e00b6/03 + cheat + description:Infinite health + code:7e0558/03 + cheat + description:Infinite lives + code:7e0556/03 + cheat + description:Infinite Shout + code:7e056c/0a + cheat + description:Infinite ammo + code:7e0564/99 + cheat + description:Level modifier (first level must be cleared before the code actually works) + code:7e052a/00 + cheat + description:Lots of bones + code:7e0560/99+7e0561/09 + cheat + description:Have 99 diamonds (disable after you finish the level) + code:7e0814/99 + +cartridge sha256:55376715f243b1bacd9aeecf1092bbc7837fe512592a2c1703d24b0829fc1934 + name:Primal Rage (USA) + cheat + description:Infinite time + code:c04f1e/ad + cheat + description:Press down 3 times then start at the Start/Options screen for a hidden menu + code:c0d67a/05 + cheat + description:Able to select as many credits as you want in the options screen + code:c2762f/99 + cheat + description:Select different times in the options screen + code:c06800/10 + cheat + description:Start with less health + code:c0c27e/40 + cheat + description:Infinite health - P1 + code:7e1926/00 + cheat + description:Infinite health - P2 + code:7e1928/00 + cheat + description:One hit kills - P1 + code:7e210c/01 + cheat + description:One hit kills - P2 + code:7e210e/01 + cheat + description:Infinite fatality time + code:7e0270/00+7e02ce/54 + cheat + description:Freeplay activated + code:7e2114/01 + +cartridge sha256:494190cd6d7fd68882cbe255a6e237d9c4bdaf3988615ede0297a5e285ad5dd9 + name:Prince of Persia (USA) + cheat + description:Invincibility against enemies + code:0193c4/ad + cheat + description:Infinite time + code:01e9d7/80+01e9d8/0a + cheat + description:Non-fatal injuries do no damage + code:01cf83/9c + cheat + description:Non-fatal falls do no damage + code:01aa52/2e + cheat + description:Non-fatal falls do 2 points of damage instead of 1 + code:01aa6d/02 + cheat + description:Falls do no damage except spikes (if you get stuck choose End Game and use a password to start the level over) + code:01aa4d/80 + cheat + description:Walk on air (Can walk over pits. Run to any wall to fall down or walk to the edge of any floor to climb down.) + code:01abf0/80 + cheat + description:All enemies have 1 health point + code:018b4d/ad+0180a7/01 + cheat + description:All enemies have 2 health points + code:018b4d/ad+0180a7/02 + cheat + description:All enemies have 3 health points + code:018b4d/ad+0180a7/03 + cheat + description:All enemies have 4 health points + code:018b4d/ad+0180a7/04 + cheat + description:All enemies have 5 health points + code:018b4d/ad+0180a7/05 + cheat + description:All enemies have 10 health points + code:018b4d/ad+0180a7/0a + cheat + description:Enemies defeated immediately (disable on bosses) + code:018b53/9c + cheat + description:Start with 2 health points instead of 3 + code:01ed4b/02 + cheat + description:Start with 4 health points + code:01ed4b/04 + cheat + description:Start with 5 health points + code:01ed4b/05 + cheat + description:Start with 6 health points + code:01ed4b/06 + cheat + description:Start with 7 health points + code:01ed4b/07 + cheat + description:Start with 8 health points + code:01ed4b/08 + cheat + description:Start with 9 health points + code:01ed4b/09 + cheat + description:Start with 15 health points + code:01ed4b/10 + cheat + description:Start on level 2 + code:039c3a/01 + cheat + description:Start on level 3 + code:039c3a/02 + cheat + description:Start on level 4 + code:039c3a/03 + cheat + description:Start on level 5 + code:039c3a/04 + cheat + description:Start on level 6 + code:039c3a/05 + cheat + description:Start on level 7 + code:039c3a/06 + cheat + description:Start on level 8 + code:039c3a/07 + cheat + description:Start on level 9 + code:039c3a/08 + cheat + description:Start on level 10 + code:039c3a/09 + cheat + description:Start on level 11 + code:039c3a/0a + cheat + description:Start on level 12 + code:039c3a/0b + cheat + description:Start on level 13 + code:039c3a/0c + cheat + description:Start on level 14 + code:039c3a/0d + cheat + description:Start on level 15 + code:039c3a/0e + cheat + description:Start on level 16 + code:039c3a/0f + cheat + description:Start on level 17 + code:039c3a/10 + cheat + description:Start on level 18 + code:039c3a/11 + cheat + description:Start on level 19 + code:039c3a/12 + cheat + description:Start on level 20 + code:039c3a/13 + cheat + description:Cheat menu enabled (Start+Select) + code:7e106f/02 + +cartridge sha256:04ca1a481093c4a7e12f18b33697d6e05e50e30e0f5b1655aa265abd14719bba + name:Prince of Persia 2 (USA) + cheat + description:Infinite health + code:7e0957/03 + cheat + description:Infinite time + code:7e0b98/69 + cheat + description:Hit anywhere + code:80f64a/24+80f64f/24+80f642/24+80f66b/24+80f636/24+80f63c/24+80f654/24+80f5c7/24 + cheat + description:Cheat mode enabled (level skip = Select, kills = X) + code:7e0206/01 + +cartridge sha256:65f7123ab4fc9bad24b1976da8e84976cc6977861626a05d4e2cce132ef3fd42 + name:Psycho Dream (Japan) + cheat + description:Invincibility (blinking) + code:c09232/00 + cheat + description:Infinite time + code:c03c19/00 + cheat + description:Infinite magic + code:c094fc/85 + cheat + description:Hit anywhere + code:c8070d/80+c80722/80+c80737/80+c8074c/80 + cheat + description:Best weapon on pick-up + code:c0a03b/a9 + +cartridge sha256:475c9baa1c2b76a6b3119e47d32814dc1c08e84e23250ae015bb0bccea915637 + name:Push-Over (USA) + cheat + description:Still can complete level even if time runs out + code:008695/80 + cheat + description:Tokens aren't lost when used to undo a push + code:008685/ee + cheat + description:Tokens aren't lost when used to advance when time runs out + code:00873b/ee + cheat + description:Start on level 2 + code:008782/a9+008785/8d+008783/01 + cheat + description:Start on level 3 + code:008782/a9+008785/8d+008783/02 + cheat + description:Start on level 4 + code:008782/a9+008785/8d+008783/03 + cheat + description:Start on level 5 + code:008782/a9+008785/8d+008783/04 + cheat + description:Start on level 6 + code:008782/a9+008785/8d+008783/05 + cheat + description:Start on level 7 + code:008782/a9+008785/8d+008783/06 + cheat + description:Start on level 8 + code:008782/a9+008785/8d+008783/07 + cheat + description:Start on level 9 + code:008782/a9+008785/8d+008783/08 + cheat + description:Start on level 10 + code:008782/a9+008785/8d+008783/09 + cheat + description:Start on level 11 + code:008782/a9+008785/8d+008783/0a + cheat + description:Start on level 12 + code:008782/a9+008785/8d+008783/0b + cheat + description:Start on level 13 + code:008782/a9+008785/8d+008783/0c + cheat + description:Start on level 14 + code:008782/a9+008785/8d+008783/0d + cheat + description:Start on level 15 + code:008782/a9+008785/8d+008783/0e + cheat + description:Start on level 16 + code:008782/a9+008785/8d+008783/0f + cheat + description:Start on level 17 + code:008782/a9+008785/8d+008783/10 + cheat + description:Start on level 18 + code:008782/a9+008785/8d+008783/11 + cheat + description:Start on level 19 + code:008782/a9+008785/8d+008783/12 + cheat + description:Start on level 20 + code:008782/a9+008785/8d+008783/13 + cheat + description:Start on level 21 + code:008782/a9+008785/8d+008783/14 + cheat + description:Start on level 22 + code:008782/a9+008785/8d+008783/15 + cheat + description:Start on level 23 + code:008782/a9+008785/8d+008783/16 + cheat + description:Start on level 24 + code:008782/a9+008785/8d+008783/17 + cheat + description:Start on level 25 + code:008782/a9+008785/8d+008783/18 + cheat + description:Start on level 26 + code:008782/a9+008785/8d+008783/19 + cheat + description:Start on level 27 + code:008782/a9+008785/8d+008783/1a + cheat + description:Start on level 28 + code:008782/a9+008785/8d+008783/1b + cheat + description:Start on level 29 + code:008782/a9+008785/8d+008783/1c + cheat + description:Start on level 30 + code:008782/a9+008785/8d+008783/1d + cheat + description:Start on level 31 + code:008782/a9+008785/8d+008783/1e + cheat + description:Start on level 32 + code:008782/a9+008785/8d+008783/1f + cheat + description:Start on level 33 + code:008782/a9+008785/8d+008783/20 + cheat + description:Start on level 34 + code:008782/a9+008785/8d+008783/21 + cheat + description:Start on level 35 + code:008782/a9+008785/8d+008783/22 + cheat + description:Start on level 36 + code:008782/a9+008785/8d+008783/23 + cheat + description:Start on level 37 + code:008782/a9+008785/8d+008783/24 + cheat + description:Start on level 38 + code:008782/a9+008785/8d+008783/25 + cheat + description:Start on level 39 + code:008782/a9+008785/8d+008783/26 + cheat + description:Start on level 40 + code:008782/a9+008785/8d+008783/27 + cheat + description:Start on level 41 + code:008782/a9+008785/8d+008783/28 + cheat + description:Start on level 42 + code:008782/a9+008785/8d+008783/29 + cheat + description:Start on level 43 + code:008782/a9+008785/8d+008783/2a + cheat + description:Start on level 44 + code:008782/a9+008785/8d+008783/2b + cheat + description:Start on level 45 + code:008782/a9+008785/8d+008783/2c + cheat + description:Start on level 46 + code:008782/a9+008785/8d+008783/2d + cheat + description:Start on level 47 + code:008782/a9+008785/8d+008783/2e + cheat + description:Start on level 48 + code:008782/a9+008785/8d+008783/2f + cheat + description:Start on level 49 + code:008782/a9+008785/8d+008783/30 + cheat + description:Start on level 50 + code:008782/a9+008785/8d+008783/31 + cheat + description:Start on level 51 + code:008782/a9+008785/8d+008783/32 + cheat + description:Start on level 52 + code:008782/a9+008785/8d+008783/33 + cheat + description:Start on level 53 + code:008782/a9+008785/8d+008783/34 + cheat + description:Start on level 54 + code:008782/a9+008785/8d+008783/35 + cheat + description:Start on level 55 + code:008782/a9+008785/8d+008783/36 + cheat + description:Start on level 56 + code:008782/a9+008785/8d+008783/37 + cheat + description:Start on level 57 + code:008782/a9+008785/8d+008783/38 + cheat + description:Start on level 58 + code:008782/a9+008785/8d+008783/39 + cheat + description:Start on level 59 + code:008782/a9+008785/8d+008783/3a + cheat + description:Start on level 60 + code:008782/a9+008785/8d+008783/3b + cheat + description:Start on level 61 + code:008782/a9+008785/8d+008783/3c + cheat + description:Start on level 62 + code:008782/a9+008785/8d+008783/3d + cheat + description:Start on level 63 + code:008782/a9+008785/8d+008783/3e + cheat + description:Start on level 64 + code:008782/a9+008785/8d+008783/3f + cheat + description:Start on level 65 + code:008782/a9+008785/8d+008783/40 + cheat + description:Start on level 66 + code:008782/a9+008785/8d+008783/41 + cheat + description:Start on level 67 + code:008782/a9+008785/8d+008783/42 + cheat + description:Start on level 68 + code:008782/a9+008785/8d+008783/43 + cheat + description:Start on level 69 + code:008782/a9+008785/8d+008783/44 + cheat + description:Start on level 70 + code:008782/a9+008785/8d+008783/45 + cheat + description:Start on level 71 + code:008782/a9+008785/8d+008783/46 + cheat + description:Start on level 72 + code:008782/a9+008785/8d+008783/47 + cheat + description:Start on level 73 + code:008782/a9+008785/8d+008783/48 + cheat + description:Start on level 74 + code:008782/a9+008785/8d+008783/49 + cheat + description:Start on level 75 + code:008782/a9+008785/8d+008783/4a + cheat + description:Start on level 76 + code:008782/a9+008785/8d+008783/4b + cheat + description:Start on level 77 + code:008782/a9+008785/8d+008783/4c + cheat + description:Start on level 78 + code:008782/a9+008785/8d+008783/4d + cheat + description:Start on level 79 + code:008782/a9+008785/8d+008783/4e + cheat + description:Start on level 80 + code:008782/a9+008785/8d+008783/4f + cheat + description:Start on level 81 + code:008782/a9+008785/8d+008783/50 + cheat + description:Start on level 82 + code:008782/a9+008785/8d+008783/51 + cheat + description:Start on level 83 + code:008782/a9+008785/8d+008783/52 + cheat + description:Start on level 84 + code:008782/a9+008785/8d+008783/53 + cheat + description:Start on level 85 + code:008782/a9+008785/8d+008783/54 + cheat + description:Start on level 86 + code:008782/a9+008785/8d+008783/55 + cheat + description:Start on level 87 + code:008782/a9+008785/8d+008783/56 + cheat + description:Start on level 88 + code:008782/a9+008785/8d+008783/57 + cheat + description:Start on level 89 + code:008782/a9+008785/8d+008783/58 + cheat + description:Start on level 90 + code:008782/a9+008785/8d+008783/59 + cheat + description:Start on level 91 + code:008782/a9+008785/8d+008783/5a + cheat + description:Start on level 92 + code:008782/a9+008785/8d+008783/5b + cheat + description:Start on level 93 + code:008782/a9+008785/8d+008783/5c + cheat + description:Start on level 94 + code:008782/a9+008785/8d+008783/5d + cheat + description:Start on level 95 + code:008782/a9+008785/8d+008783/5e + cheat + description:Start on level 96 + code:008782/a9+008785/8d+008783/5f + cheat + description:Start on level 97 + code:008782/a9+008785/8d+008783/60 + cheat + description:Start on level 98 + code:008782/a9+008785/8d+008783/61 + cheat + description:Start on level 99 + code:008782/a9+008785/8d+008783/62 + +cartridge sha256:ba135ad37fef9932c2f840cf6cf82d559c232dfe0f85ba068a34755f3ad5f778 + name:Putty Squad (Europe) + cheat + description:Infinite health + code:7e0026/4e + cheat + description:Infinite lives + code:7e0035/99 + cheat + description:99 Stars + code:7e004f/99 + cheat + description:All Putties saved + code:7e0024/00 + +cartridge sha256:89d57bf308033ef17f770a80080cbeed2d112244635d5b5f860f2016398cd2f6 + name:Q-bert 3 (USA) + cheat + description:Invincibility + code:00b9a3/00 + cheat + description:Infinite lives + code:00a776/ad + cheat + description:Step on any cube to clear level + code:009057/00 + cheat + description:Start with 1 life instead of 5 + code:00808c/01 + cheat + description:Start with 3 lives + code:00808c/03 + cheat + description:Start with 7 lives + code:00808c/07 + cheat + description:Start with 9 lives + code:00808c/09 + cheat + description:Start with 25 lives + code:00808c/19 + cheat + description:Start with 100 lives + code:00808c/64 + cheat + description:Start on level 1-2 + code:00806e/01 + cheat + description:Start on level 1-3 + code:00806e/02 + cheat + description:Start on level 1-4 + code:00806e/03 + cheat + description:Start on level 2-1 + code:00806e/04 + cheat + description:Start on level 2-2 + code:00806e/05 + cheat + description:Start on level 2-3 + code:00806e/06 + cheat + description:Start on level 2-4 + code:00806e/07 + cheat + description:Start on level 3-1 + code:00806e/08 + cheat + description:Start on level 3-2 + code:00806e/09 + cheat + description:Start on level 3-3 + code:00806e/0a + cheat + description:Start on level 3-4 + code:00806e/0b + cheat + description:Start on level 4-1 + code:00806e/0c + cheat + description:Start on level 4-2 + code:00806e/0d + cheat + description:Start on level 4-3 + code:00806e/0e + cheat + description:Start on level 4-4 + code:00806e/0f + cheat + description:Start on level 5-1 + code:00806e/10 + cheat + description:Start on level 5-2 + code:00806e/11 + cheat + description:Start on level 5-3 + code:00806e/12 + cheat + description:Start on level 5-4 + code:00806e/13 + cheat + description:Start on level 6-1 + code:00806e/14 + cheat + description:Start on level 6-2 + code:00806e/15 + cheat + description:Start on level 6-3 + code:00806e/16 + cheat + description:Start on level 6-4 + code:00806e/17 + cheat + description:Start on level 7-1 + code:00806e/18 + cheat + description:Start on level 7-2 + code:00806e/19 + cheat + description:Start on level 7-3 + code:00806e/1a + cheat + description:Start on level 7-4 + code:00806e/1b + cheat + description:Start on level 8-1 + code:00806e/1c + cheat + description:Start on level 8-2 + code:00806e/1d + cheat + description:Start on level 8-3 + code:00806e/1e + cheat + description:Start on level 8-4 + code:00806e/1f + cheat + description:Start on level 9-1 + code:00806e/20 + cheat + description:Start on level 9-2 + code:00806e/21 + cheat + description:Start on level 9-3 + code:00806e/22 + cheat + description:Start on level 9-4 + code:00806e/23 + cheat + description:Start on level 10-1 + code:00806e/24 + cheat + description:Start on level 10-2 + code:00806e/25 + cheat + description:Start on level 10-3 + code:00806e/26 + cheat + description:Start on level 10-4 + code:00806e/27 + cheat + description:Start on level 11-1 + code:00806e/28 + cheat + description:Start on level 11-2 + code:00806e/29 + cheat + description:Start on level 11-3 + code:00806e/2a + cheat + description:Start on level 11-4 + code:00806e/2b + cheat + description:Start on level 12-1 + code:00806e/2c + cheat + description:Start on level 12-2 + code:00806e/2d + cheat + description:Start on level 12-3 + code:00806e/2e + cheat + description:Start on level 12-4 + code:00806e/2f + cheat + description:Start on level 13-1 + code:00806e/30 + cheat + description:Start on level 13-2 + code:00806e/31 + cheat + description:Start on level 13-3 + code:00806e/32 + cheat + description:Start on level 13-4 + code:00806e/33 + cheat + description:Start on level 14-1 + code:00806e/34 + cheat + description:Start on level 14-2 + code:00806e/35 + cheat + description:Start on level 14-3 + code:00806e/36 + cheat + description:Start on level 14-4 + code:00806e/37 + cheat + description:Start on level 15-1 + code:00806e/38 + cheat + description:Start on level 15-2 + code:00806e/39 + cheat + description:Start on level 15-3 + code:00806e/3a + cheat + description:Start on level 15-4 + code:00806e/3b + cheat + description:Start on level 16-1 + code:00806e/3c + cheat + description:Start on level 16-2 + code:00806e/3d + cheat + description:Start on level 16-3 + code:00806e/3e + cheat + description:Start on level 16-4 + code:00806e/3f + cheat + description:Start on level 17-1 + code:00806e/40 + cheat + description:Start on level 17-2 + code:00806e/41 + cheat + description:Start on level 17-3 + code:00806e/42 + cheat + description:Start on level 17-4 + code:00806e/43 + cheat + description:Start on level 18-1 + code:00806e/44 + cheat + description:Start on level 18-2 + code:00806e/45 + cheat + description:Start on level 18-3 + code:00806e/46 + cheat + description:Start on level 18-4 + code:00806e/47 + cheat + description:Start on level 19-1 + code:00806e/48 + cheat + description:Start on level 19-2 + code:00806e/49 + cheat + description:Start on level 19-3 + code:00806e/4a + cheat + description:Start on level 19-4 + code:00806e/4b + cheat + description:Start on level 20-1 + code:00806e/4c + cheat + description:Start on level 20-2 + code:00806e/4d + cheat + description:Start on level 20-3 + code:00806e/4e + cheat + description:Start on level 20-4 + code:00806e/4f + cheat + description:Start on level x1 + code:00806e/50 + cheat + description:Start on level x2 + code:00806e/51 + cheat + description:Start on level x3 + code:00806e/52 + cheat + description:Start on level x4 + code:00806e/53 + cheat + description:Start on level x5 + code:00806e/54 + cheat + description:Start on level x6 + code:00806e/55 + cheat + description:Start on level x7 + code:00806e/56 + cheat + description:Start on level x8 + code:00806e/57 + cheat + description:Start on level x9 + code:00806e/58 + cheat + description:Start on level x10 + code:00806e/59 + cheat + description:Start on level x11 + code:00806e/5a + cheat + description:Start on level x12 + code:00806e/5b + cheat + description:Start on level x13 + code:00806e/5c + cheat + description:Start on level x14 + code:00806e/5d + cheat + description:Start on level x15 + code:00806e/5e + cheat + description:Start on level x16 + code:00806e/5f + cheat + description:Start on level x17 + code:00806e/60 + cheat + description:Start on level x18 + code:00806e/61 + cheat + description:Start on level x19 + code:00806e/62 + cheat + description:Start on level x20 + code:00806e/63 + +cartridge sha256:4d6c7d6d2693d8d43bafaff7582f9a94885362dadd9ee4012bbbdce1ba10c30e + name:R-Type III (USA) + cheat + description:Invincibility + code:b083d8/00 + cheat + description:Infinite lives + code:81829c/ad + cheat + description:Start at speed level 3 + code:b0821d/0c + cheat + description:Start at speed level 4 + code:b0821d/10 + cheat + description:Start at speed level 5 + code:b0821d/14 + +cartridge sha256:edf990e502c646a2fe83fcd1d359ca0ed5003ace06cb4c3de5a51a0c56d6ec54 + name:Radical Psycho Machine Racing (USA) + cheat + description:Sturdy tires are free + code:019dba/00 + cheat + description:4-liter high output engine is free + code:019d66/00 + cheat + description:Sell sturdy tires for $4,910 instead of $10 + code:019dc7/49 + cheat + description:Sell 4-liter high output engine for $9,925 instead of $25 + code:019d73/99 + cheat + description:Start new game with $9,910 instead of $4,910 + code:01a896/99 + cheat + description:Start new game with $49,104,910 + code:01a89d/8d + cheat + description:Start new game with $99,109,910 + code:01a896/99+01a89d/8d + +cartridge sha256:dd0feb78e2d5d81f59241baf3bca5e2edaebbe98f0ac860a4eb6d448718f1ca5 + name:Race Drivin' (USA) + cheat + description:Infinite time + code:00818f/cd + cheat + description:Slow timer + code:008188/b4 + cheat + description:Fast timer + code:008188/2d + cheat + description:Freeze lap timer + code:0081af/d9 + cheat + description:Slow lap timer + code:0081b3/65 + +cartridge sha256:1869c0faf93bf21b7ff965f1925fad4b2924a64b1e48f4837221eebdf741226c + name:Radical Rex (USA) + cheat + description:Infinite health + code:819a28/b5 + cheat + description:Infinite roar + code:81bda4/ad+00a85f/ad + cheat + description:Infinite lives + code:84db61/ad + cheat + description:Don't loose breath level when you die + code:8098d1/ad+8098c5/ad + +cartridge sha256:5fd7666e509f9d3cf1fd6b209dc22f2f3848f74eae7b83239d1090e031fc6df2 + name:Raiden Trad (USA) + cheat + description:Invincibility - both players + code:0af515/00 + cheat + description:Infinite bombs - P1 + code:00fabf/f0+00fac0/05+00fac1/ea+00fac3/de + cheat + description:Infinite bombs - P2 + code:00fabf/d0+00fac0/05+00fac1/ea+00fac3/de + cheat + description:Infinite bombs - both players + code:00fac2/ea + cheat + description:Infinite lives - P1 + code:009c00/ea + cheat + description:Infinite lives - P2 + code:009d7a/ea + cheat + description:Hit anywhere + code:0af2b8/22+0af2b7/80+0af2e8/a5 + cheat + description:Replacement planes carry 0 bombs - P1 + code:009c34/af+009c35/8d + cheat + description:Replacement planes carry 6 bombs - P1 + code:009c34/56+009c35/89 + cheat + description:Replacement planes carry 9 bombs - P1 + code:009c34/b1+009c35/8d + cheat + description:Replacement planes carry 0 bombs - P2 + code:009dad/af+009dae/8d + cheat + description:Replacement planes carry 6 bombs - P2 + code:009dad/56+009dae/89 + cheat + description:Replacement planes carry 9 bombs - P2 + code:009dad/b1+009dae/8d + cheat + description:Start with 1 life - both players + code:00940e/98 + cheat + description:Start with 7 lives - both players + code:00940d/b9+00940e/84 + cheat + description:Start with 9 lives - both players + code:00940d/b1+00940e/8d + cheat + description:Start with 0 bombs - P1 + code:00941f/af+009420/8d + cheat + description:Start with 6 bombs - P1 + code:00941f/56+009420/89 + cheat + description:Start with 9 bombs - P1 + code:00941f/b1+009420/8d + cheat + description:Start with 0 bombs - P2 + code:00943c/af+00943d/8d + cheat + description:Start with 6 bombs - P2 + code:00943c/56+00943d/89 + cheat + description:Start with 9 bombs - P2 + code:00943c/b1+00943d/8d + cheat + description:Start with 3 credits + code:009616/02 + cheat + description:Start with 4 credits + code:009616/03 + cheat + description:Start with 6 credits + code:009616/05 + cheat + description:Start with 8 credits + code:009616/07 + cheat + description:Start with 10 credits + code:009616/09 + cheat + description:Start with 1 credit + code:009616/00 + +cartridge sha256:e19f7d8d5c3e4cefeff5889380d8780495e01f0553d13be4182a15a5d4b615bb + name:Rampart (USA) + cheat + description:Infinite continues + code:00bc21/ad + cheat + description:Infinite cannons + code:008c9a/ea + cheat + description:Start on battlefield 2 + code:00c2cc/a9+00c2ce/00+00c2cd/01 + cheat + description:Start on battlefield 3 + code:00c2cc/a9+00c2ce/00+00c2cd/02 + cheat + description:Start on battlefield 4 + code:00c2cc/a9+00c2ce/00+00c2cd/03 + cheat + description:Start on battlefield 5 + code:00c2cc/a9+00c2ce/00+00c2cd/04 + cheat + description:Start on battlefield 6 + code:00c2cc/a9+00c2ce/00+00c2cd/05 + cheat + description:Start on battlefield 7 + code:00c2cc/a9+00c2ce/00+00c2cd/06 + +cartridge sha256:32d32ef56af83887cdc2c04b3da4be1cd82a473988deaa2e7dd50d38ef79c3a1 + name:Ranma 1-2 - Hard Battle (USA) + cheat + description:Invincibility - P1 + code:c0237c/80 + cheat + description:Invincibility - P2 + code:c023df/80 + cheat + description:Hit anywhere - P1 + code:c023df/80+c023e0/12 + cheat + description:Hit anywhere - P2 + code:c0237c/80+c0237d/12 + cheat + description:Ranma moves faster + code:019523/03+019518/fc + cheat + description:Ranma jumps faster + code:01953c/fb+01953e/04 + cheat + description:Ranma's diagonal jumps are higher + code:01953e/f6 + cheat + description:Ranma's diagonal kicks are harder + code:019332/18 + cheat + description:Ranma's dragon blast kills with 1 hit + code:019468/60 + cheat + description:Genma moves faster + code:01be10/03+01bc04/fc + cheat + description:Genma's paternal anger (running at enemy) is faster + code:01bea0/f2 + cheat + description:Genma's verbal punishment is stronger + code:01bd5a/28 + cheat + description:Genma's verbal punishment kills with 1 hit + code:01bd5a/60 + cheat + description:Ryoga moves faster + code:01b26e/fc+01927a/03 + cheat + description:Ryoga jumps faster + code:01b292/fc+01b29e/03 + cheat + description:Ryoga's bandana throw kills with 1 hit + code:7f0cb1/60 + cheat + description:Shampoo moves faster + code:01ac5e/fc+01ac6a/03 + cheat + description:Shampoo's dragon sky kick is faster + code:01ad1e/f5 + cheat + description:Shampoo's super fury charge goes farther + code:01acfa/f5 + cheat + description:Shampoo's fury charge 1 hit kill + code:01ab9b/60 + cheat + description:Shampoo's kick is faster + code:01aa7c/26 + cheat + description:Akane moves faster + code:01b828/fc+01b834/03 + cheat + description:Akane jumps faster + code:01b84c/fb+01b25e/04 + cheat + description:Akane's 2-step whip kick is faster + code:01b8f4/f8 + cheat + description:Akane's 2-step whip kick is stronger + code:01b692/26 + cheat + description:Akane's 2-step whip kick kills with 1 hit + code:01b692/60 + cheat + description:Akane's dust devil uppercut is faster + code:01b8c6/ef+01b8c9/ff + cheat + description:Gosunkugi moves faster + code:01a678/fa+01a684/04 + cheat + description:Gosunkugi jumps faster + code:01a69c/fb+01a6a8/04 + cheat + description:Gosunkugi's straw man throw does more damage + code:7f0cb1/24 + cheat + description:Gosunkugi's straw man throw kills with 1 hit + code:7f0cb1/60 + cheat + description:Ukkyo moves faster + code:019ab8/fa+019ac4/04 + cheat + description:Ukkyo jumps faster + code:019adc/fb+019ae8/04 + cheat + description:Mousse's flying egg bombs are faster + code:01a174/f9 + cheat + description:Mousse's eagle claw strike - 1 hit kill + code:019f66/60 + cheat + description:Mousse's claw strike is quicker + code:01a16a/08 + cheat + description:Every move kills every opponent with 1 hit + code:c00e39/00 + cheat + description:No knock back when opponent is cornered + code:01809d/00 + +cartridge sha256:097cbe9720903bc14599158b80e0cc314ef2fe8a585d6d0a8962eb1626031492 + name:Realm (USA) + cheat + description:Infinite ammo + code:80ff23/a5 + cheat + description:Hit anywhere (if a platform is missing go back and come back) + code:80ad95/46+80ae99/64+80ad94/d0+80ade7/bd+80ade8/1c + cheat + description:Invincibility + code:7e007d/4f + cheat + description:Invincibility after first hit + code:80dcb3/a5+80dd00/a5 + cheat + description:Almost invincible + enable stage skip (press Start + Select to skip) (enable code before title screen) + code:98868c/f0 + cheat + description:Almost invincible + enable stage skip (press Start + Select to skip) (enable code before title screen) (alt) + code:7e0224/ff + cheat + description:Infinite health + code:89fc95/ad + cheat + description:Infinite health (alt) + code:7e132b/06 + cheat + description:Infinite lives + code:87ed80/ad + cheat + description:Infinite lives (alt) + code:7e1334/03 + cheat + description:Infinite ammo (alt) + code:7e00f5/09 + +cartridge sha256:549f2e5b17f685cad25ba71ce7bc6e004e7bfd09e6be12a827af9a9a26556fff + name:Redline F-1 Racer (USA) + cheat + description:Always in 1st place + code:00b6f4/a5 + cheat + description:Infinite special fuel + code:00cbc5/ea + cheat + description:Instant 255 mph speed (best to get into 6th gear before activating this code, then you can go 357 mph) + code:00a47d/a9+00a47f/ff + cheat + description:No speed loss when you get off accelerator button + code:00b6a5/a5 + cheat + description:No speed loss on grass + code:009905/a5 + +cartridge sha256:71e7083cfcf32b738f60f5eeffd4f9d1fd9250afbde0c56e22a4b97abac377a1 + name:Ren & Stimpy Show, The - Fire Dogs (USA) + cheat + description:Invincibility + code:7e257e/05 + cheat + description:Infinite health + code:7e00e3/30 + cheat + description:Infinite lives + code:7e0002/09 + cheat + description:Infinite time (disable on bonus stages) + code:7e00f5/3b + cheat + description:Max money + code:7e0004/e7+7e0005/03 + cheat + description:Infinite Dalmation Paint meter + code:7e0055/ee + cheat + description:Infinite Fire Extinguisher meter + code:7e0059/ee + cheat + description:Have Boots + code:7e2584/01 + cheat + description:Have Bucket + code:7e2586/01 + cheat + description:Have Fire Coat + code:7e2590/01 + cheat + description:Have Fire Hat + code:7e258c/01 + cheat + description:Have Fire Hose + code:7e2582/01 + cheat + description:Have Fire Extinguisher + code:7e2590/01 + cheat + description:Have Socks + code:7e258a/01 + cheat + description:Have Trampoline + code:7e2588/01 + cheat + description:Have 99 sacks of Gritty Kitty (On The Job stages) + code:7e2550/63 + cheat + description:Skip to bonus level (On The Job stages) + code:7e07ae/93+7e07af/20 + +cartridge sha256:ad7dd4efb8836d4009f6c76bd21865d8f5dcf9c3cbd8fa7bb32d686488847120 + name:Ren & Stimpy Show, The - Time Warp (USA) + cheat + description:Infinite health + code:82f000/bd + cheat + description:Infinite lives + code:82996b/ea + cheat + description:Don't have to charge special attack + code:829cfa/a9+829cfc/80+829cfe/00+829cff/8d + cheat + description:Flash longer after you die + code:83e5e6/ff + cheat + description:Don't flash after you die + code:83e5e6/ff + cheat + description:Health never goes back up + code:82f3c8/bd + cheat + description:1 kitty gritty gives 99 + code:82f419/a9+82f41a/63+82f41c/ea+82f41d/ea + cheat + description:Start with 1 lives + code:83e5c3/00 + cheat + description:Start with 5 lives + code:83e5c3/04 + cheat + description:Start with 10 lives + code:83e5c3/09 + cheat + description:Have 99 kitty gritty + code:7e0583/63 + +cartridge sha256:ba54d715abf100b94fee801351986fa818e4309730cefbacf9b4fad36e284c1c + name:Ren & Stimpy Show, The - Veediots! (USA) + cheat + description:Infinite health + code:01a107/ad + cheat + description:Infinite lives + code:01a17a/ad + cheat + description:Infinite time + code:01a41f/ad + cheat + description:Powdered Toast Shield lasts 85x longer + code:02f2b0/ff + cheat + description:"Socks" power-up lasts 200x longer + code:02f41f/ff + cheat + description:Stimpy's mouth won't close + code:01a574/ad + cheat + description:Money is worth 10x more + code:019ea3/fa+01cc93/fa + +cartridge sha256:82a9ee11b5640409c67772363f1148517b26127cef13aa2a8ffc2480b487d81f + name:Rendering Ranger R2 (Japan) + cheat + description:Invincibility + code:7e06ae/03 + cheat + description:Infinite health + code:7e06bc/05 + cheat + description:Infinite lives + code:7e0515/09 + cheat + description:Infinite Bombs + code:7e06c1/03 + cheat + description:Deactivate shield + code:7e06b8/00 + cheat + description:Have Pods (ship stages) + code:7e06b5/01 + cheat + description:Have Blue weapon (press A to switch weapons) + code:7e0aa2/00 + cheat + description:Have Green weapon (press A to switch weapons) + code:7e0aa3/00 + cheat + description:Have Yellow weapon (press A to switch weapons) + code:7e0aa4/00 + cheat + description:Best Red weapon + code:7e0a9d/04 + cheat + description:Best Blue weapon + code:7e0a9e/04 + cheat + description:Best Green weapon + code:7e0a9f/04 + cheat + description:Best Yellow weapon + code:7e0aa0/04 + +cartridge sha256:b61addb0abd36ebd29e5c2988ae642b174bfec18a899cfe40866000dc934f658 + name:Return of Double Dragon (Japan) + cheat + description:Invincibility (blinking) + code:7e1f92/01 + +cartridge sha256:5fb072c3c2e9d8e7f84bea9c4bf2253e6868eb2b1f13e35a7d75fdf05896d873 + name:Revolution X (USA) + cheat + description:Infinite CDs - both players + code:80c040/a9 + cheat + description:Infinite health - P1 + code:7e022b/ff + cheat + description:Infinite CDs - P1 + code:7e0088/ff + +cartridge sha256:f44482e2cccd9fcfd5875d84ff700f6e783f3bd8abd1ac4d939074cd6ad3fe65 + name:Rex Ronan - Experimental Surgeon (USA) (En,Es) + cheat + description:Infinite health + code:7e03c4/ff + +cartridge sha256:38be8013bbe07b2020ba30031fb0a2c77bad8a3eb61fac8217adfe82d6c402af + name:Rise of the Robots (USA) + cheat + description:Infinite time + code:c0cdae/00 + cheat + description:Hit anywhere - both players + code:c0ac6c/00+c0ac72/00+c0ac93/00 + cheat + description:One hit kills - both players + code:c0e52d/a9 + cheat + description:No jumping allowed + code:c0cbd8/a9+c0cbd9/00 + cheat + description:Win one round to advance + code:c035bf/01 + cheat + description:Every hit does more damage + code:c0e52e/20+c0af3b/ea+c0e52f/00 + +cartridge sha256:3f59cc687d22cd1b23cc33ae6e4518234c9da813c01f79f4c43716e12d32a12d + name:Rival Turf! (USA) + cheat + description:Invincibility + code:1e9413/ad + cheat + description:Infinite health + code:028870/a5 + cheat + description:Infinite lives + code:0289a3/a5 + cheat + description:Infinite continues + code:00a1e5/ad + cheat + description:Full health from all food + code:018bc2/00 + cheat + description:No score lost when special attack is used + code:0283df/00 + cheat + description:Hit anywhere (might make some enemies invisible) + code:1f9287/80+1f9288/15 + cheat + description:Start with more health + code:f80b0e/00+028a2a/ff+008deb/ff+018bbf/ff + cheat + description:Start with less health + code:00a522/1f+028a2a/1f+008deb/1f+018bbf/1f + cheat + description:Start with 1 life + code:009c3b/00 + cheat + description:Start with 8 lives + code:009c3b/07 + cheat + description:Start with 9 continues + code:009c45/09 + cheat + description:Start with 1 continue + code:009c45/01 + cheat + description:Invincibility - P1 + code:7e0208/ff + cheat + description:Invincibility - P2 + code:7e02d8/ff + cheat + description:Infinite health - P1 + code:7e0217/ff + cheat + description:Infinite health - P2 + code:7e02e7/ff + cheat + description:Infinite lives - P1 + code:7e023f/09 + cheat + description:Infinite lives - P2 + code:7e030f/09 + cheat + description:Infinite continues (alt) + code:7e10f5/05 + cheat + description:Always angry - P1 + code:7e024f/03 + cheat + description:Always angry - P2 + code:7e031f/03 + cheat + description:One hit kills + code:7e0487/00+7e0557/00+7e024f/00+7e03b7/00 + cheat + description:Infinite points - P1 + code:7e0224/70 + cheat + description:Infinite points - P2 + code:7e02f4/70 + cheat + description:Start on stage 2 - L.A. City Stadium + code:7e0120/01 + cheat + description:Start on stage 3 - Things Are Looking Up + code:7e0120/02 + cheat + description:Start on stage 4 - South Of The Border + code:7e0120/03 + cheat + description:Start on stage 5 - Dockyard Brawl + code:7e0120/04 + cheat + description:Start on stage 6 - Fight to the Finish + code:7e0120/05 + cheat + description:Start on stage - Welcome To The Warp Room + code:7e0120/06 + +cartridge sha256:864aa9068fb23cd20022a9ac36fb9082299278ea0cb07a20deec2b6a1c6cbc70 + name:Road Riot 4WD (USA) + cheat + description:Races are 1 lap instead of 3 + code:00951c/00 + cheat + description:Races are 2 laps instead of 3 + code:00951c/01 + cheat + description:Races are 4 laps instead of 3 + code:00951c/03 + cheat + description:Races are 5 laps instead of 3 + code:00951c/04 + cheat + description:Races are 6 laps instead of 3 + code:00951c/05 + cheat + description:Races are 7 laps instead of 3 + code:00951c/06 + cheat + description:Beginner track has an extra lap + code:009523/ea + +cartridge sha256:2e8203e421f97cf165f03a5d4f69dadf0bcca18c42c6a1dfe79c8705c522cc54 + name:Road Runner's Death Valley Rally (USA) + cheat + description:Protection against most hazards + code:80c7aa/ad+86ade3/ad + cheat + description:Infinite lives + code:8098d2/00 + cheat + description:Infinite time + code:809c9a/00 + cheat + description:Stay invincible longer after getting hit (Road Runner blinks) + code:80b2a8/ff + cheat + description:Stay invincible for less time after getting hit (Road Runner blinks) + code:80b2a8/40 + cheat + description:Stay invincible after getting hit until you fall and die (Road Runner blinks) + code:80a67f/ad + cheat + description:Stay invincible after getting hit until you fall and die (Road Runner does not blink) + code:80a67d/80 + cheat + description:Eating birdseed restores turbo speed meter to maximum + code:80db89/30 + cheat + description:Eating birdseed does nothing + code:80db89/00 + cheat + description:Using turbo speed does not use up bird seed + code:80af82/00 + cheat + description:Hearts worth nothing + code:80de5d/ad + cheat + description:1-up worth nothing + code:80e0e0/00 + cheat + description:1-up worth 2 + code:80e0e0/02 + cheat + description:1-up worth 3 + code:80e0e0/03 + cheat + description:1-up worth 4 + code:80e0e0/04 + cheat + description:1-up worth 5 + code:80e0e0/05 + cheat + description:Bogus jump + code:80b0ec/30 + cheat + description:Better jump + code:80b0ec/10 + cheat + description:Super-jump + code:80b0ec/0a + cheat + description:Mega-jump + code:80b0ec/05 + cheat + description:Start with more birdseed on the turbo speed meter + code:809c08/30 + cheat + description:Start with less birdseed on the turbo speed meter + code:809c08/10 + cheat + description:Start timer at 3:00 instead of 5:00 + code:80974a/03 + cheat + description:Start timer at 7:00 + code:80974a/07 + cheat + description:Start timer at 9:00 + code:80974a/09 + cheat + description:Start with 2 lives + code:809ba4/01 + cheat + description:Start with 4 lives + code:809ba4/03 + cheat + description:Start with 6 lives + code:809ba4/05 + cheat + description:Start with 8 lives + code:809ba4/07 + cheat + description:Start with 10 lives + code:809ba4/09 + cheat + description:Start with 21 lives + code:809ba4/20 + cheat + description:Start with 51 lives + code:809ba4/50 + cheat + description:Start with 76 lives + code:809ba4/75 + cheat + description:Start with 100 lives + code:809ba4/99 + cheat + description:Start on level 1, sub-level 2 + code:809b97/1e+809b96/e1+809b94/01 + cheat + description:Start on level 1, sub-level 3 + code:809b97/1e+809b96/e1+809b94/02 + cheat + description:Start on level 1, sub-level 4 + code:809b97/1e+809b96/e1+809b94/03 + cheat + description:Start on level 2, sub-level 1 + code:809b97/1e+809b96/e1+809b94/04 + cheat + description:Start on level 2, sub-level 2 + code:809b97/1e+809b96/e1+809b94/05 + cheat + description:Start on level 2, sub-level 3 + code:809b97/1e+809b96/e1+809b94/06 + cheat + description:Start on level 2, sub-level 4 + code:809b97/1e+809b96/e1+809b94/07 + cheat + description:Start on level 3, sub-level 1 + code:809b97/1e+809b96/e1+809b94/08 + cheat + description:Start on level 3, sub-level 2 + code:809b97/1e+809b96/e1+809b94/09 + cheat + description:Start on level 3, sub-level 3 + code:809b97/1e+809b96/e1+809b94/0a + cheat + description:Start on level 3, sub-level 4 + code:809b97/1e+809b96/e1+809b94/0b + cheat + description:Start on level 4, sub-level 1 + code:809b97/1e+809b96/e1+809b94/0c + cheat + description:Start on level 4, sub-level 2 + code:809b97/1e+809b96/e1+809b94/0d + cheat + description:Start on level 4, sub-level 3 + code:809b97/1e+809b96/e1+809b94/0e + cheat + description:Start on level 4, sub-level 4 + code:809b97/1e+809b96/e1+809b94/0f + cheat + description:Start on level 5, sub-level 1 + code:809b97/1e+809b96/e1+809b94/10 + cheat + description:Start on level 5, sub-level 2 + code:809b97/1e+809b96/e1+809b94/11 + cheat + description:Start on level 5, sub-level 3 + code:809b97/1e+809b96/e1+809b94/12 + cheat + description:Start on level 5, sub-level 4 + code:809b97/1e+809b96/e1+809b94/13 + +cartridge sha256:a2115e7576dec06e0de613efb89de861815a78ef72e78a3784be09fb7541928f + name:RoboCop versus The Terminator (USA) + cheat + description:Infinite lives + code:019df1/00 + cheat + description:Super-jump + code:80ee38/00 + cheat + description:Rockets do more damage + code:8182ea/0f + cheat + description:Normal pistol does more damage + code:81804a/0f + cheat + description:Plasma Rifle does massive damage + code:818185/30 + cheat + description:Only 10 Terminators to kill on the 3-D Stage + code:80842a/10 + cheat + description:Only 30 Terminators to kill on the 3-D Stage + code:80842a/30 + cheat + description:Start with 1 life + code:8092e1/01 + cheat + description:Start with 9 lives + code:8092e1/09 + cheat + description:Start with 15 lives (ignore counter) + code:8092e1/0f + cheat + description:Infinite health + code:7e10c5/0a + cheat + description:Infinite lives (alt) + code:019df1/00 + cheat + description:Super-jump (alt) + code:80ee38/00 + cheat + description:Normal pistol does more damage (alt) + code:81804a/0f + +cartridge sha256:055d9c6311a663af7c899a6f76a419c274c57baada3ef64c52fadb1c676b1446 + name:RoboCop 3 (USA) + cheat + description:Infinite lives + code:0082f4/2c + cheat + description:Slower timer + code:008651/70 + cheat + description:Faster timer + code:008651/1f + cheat + description:Infinite ammo (except flame thrower) + code:00ab3f/00 + cheat + description:Ammo pick-ups worth more + code:00fca2/01+00fca4/02 + cheat + description:Ammo pick-ups worth less + code:00fca1/30+00fca4/00+00fca3/30 + cheat + description:Faster Robocop - except on stages 3 and 5 + code:00a238/02+00a253/fe + cheat + description:Start with 1 life + code:0080dc/00 + cheat + description:Start with 6 lives + code:0080dc/05 + cheat + description:Start on stage 2 + code:00ea3b/01 + cheat + description:Start on stage 3 + code:00ea3b/02 + cheat + description:Start on stage 4 + code:00ea3b/03 + cheat + description:Start on stage 5 + code:00ea3b/04 + cheat + description:Infinite health + code:7e0477/38 + cheat + description:Infinite lives (alt) + code:7e1854/05 + cheat + description:Infinite ammo + code:7e1848/99 + cheat + description:Infinite time + code:7e030c/12+7e030d/04 + cheat + description:Have all weapons + code:7e046f/04 + +cartridge sha256:1e2ded7b1e350449b7a99b7ec414525e4b9b086c416deeee5eb3e48e032c46bd + name:Robotrek (USA) + cheat + description:Infinite battle bonus time + code:84c7c0/ea + cheat + description:Infinite robot points + code:8babf0/80 + cheat + description:Infinite vanish time + code:8bef27/ad + cheat + description:Everything is free + code:88eea2/ad + cheat + description:Get 9900 gold when you look into the robot book + code:8c9050/99 + cheat + description:More energy for robot energy + code:8bf582/90 + cheat + description:Mean robot + code:85f596/a9+85f597/99+85f598/00+85f599/ea + cheat + description:One-hit kills + code:8bf2dc/a9 + cheat + description:Start at level 3 + code:88ef20/a9+88ef21/03 + cheat + description:Start at level 10 + code:88ef20/a9+88ef21/0a + cheat + description:Start at level 20 + code:88ef20/a9+88ef21/14 + cheat + description:Start at level 50 + code:88ef20/a9+88ef21/32 + cheat + description:Start at level 50 (alt) + code:88ef20/a9+88ef21/32 + cheat + description:Infinite GP + code:7e06e6/99+7e06e7/99+7e06e8/09 + cheat + description:Max Program Points + code:7e0688/73+7e0689/05 + cheat + description:Max HP - First Robot + code:7e068a/ff + +cartridge sha256:9d721753301278325c851f1843d669a697aed757dcf6495a31fc31ddf664b182 + name:Rock n' Roll Racing (USA) + cheat + description:Infinite forward weapons + code:80941e/ad + cheat + description:Infinite power charges + code:809917/ad + cheat + description:No damage from hitting other cars + code:80fe72/ea + cheat + description:No damage from most mines + code:80df88/00 + cheat + description:No points needed to advance to any level + code:81ae9a/9c + cheat + description:Buy items for free if you have enough money + code:81b6a6/ad+81b69b/ad + cheat + description:More damage from mines + code:80df88/06 + cheat + description:Red Cross packages worth nothing + code:80e085/00 + cheat + description:Red Cross packages can blow up + code:80e085/10 + cheat + description:Start with $50,000 + code:81ae10/05 + cheat + description:Start with $100,000 + code:81ae10/10 + cheat + description:Start with $500,000 + code:81ae10/50 + cheat + description:Start with $990,000 + code:81ae10/99 + cheat + description:Start with $5,020,000 + code:81ae11/05 + +cartridge sha256:b072fd9b08042e3262446fdf418a41848251072a32bd7f8335cc03543c4ae6c8 + name:Rocketeer, The (USA) + cheat + description:Protection against guns (only partly against grenades) (only in hangar) + code:00b1b7/a5 + cheat + description:Protection against Armored Flying Tank + code:00b4a1/a5 + cheat + description:Protection against enemy rocketmen on the Zeppelin + code:00c749/a5 + cheat + description:Invincibility in the skies + code:008224/a5 + cheat + description:Infinite Super Shots on pick-up + code:008f6e/a5 + cheat + description:Infinite chances + code:008d47/bd + cheat + description:Automatically win first race at Bigelow + code:0086df/00 + cheat + description:Automatically win second race at Bigelow + code:0086e0/00 + cheat + description:Automatically win third race at Bigelow + code:0086e1/00 + cheat + description:First race at Bigelow is 1 lap instead of 10 + code:0086df/01 + cheat + description:First race at Bigelow is 5 laps + code:0086df/05 + cheat + description:First race at Bigelow is 15 laps + code:0086df/0f + cheat + description:First race at Bigelow is 25 laps + code:0086df/19 + cheat + description:First race at Bigelow is 50 laps + code:0086df/32 + cheat + description:First race at Bigelow is 99 laps + code:0086df/63 + cheat + description:Second race at Bigelow is 1 lap + code:0086e0/01 + cheat + description:Second race at Bigelow is 5 laps + code:0086e0/05 + cheat + description:Second race at Bigelow is 10 laps + code:0086e0/0a + cheat + description:Second race at Bigelow is 25 laps + code:0086e0/19 + cheat + description:Second race at Bigelow is 50 laps + code:0086e0/32 + cheat + description:Second race at Bigelow is 99 laps + code:0086e0/63 + cheat + description:Third race at Bigelow is 1 lap instead of 10 + code:0086e1/01 + cheat + description:Third race at Bigelow is 5 laps + code:0086e1/05 + cheat + description:Third race at Bigelow is 25 laps + code:0086e1/19 + cheat + description:Third race at Bigelow is 50 laps + code:0086e1/32 + cheat + description:Third race at Bigelow is 99 laps + code:0086e1/63 + cheat + description:Cliff starts with 2/3 normal energy in hangar + code:008708/4a + cheat + description:Cliff starts with 1/3 normal energy in hangar + code:008708/25 + cheat + description:Enemies start with 2/3 normal energy in hangar + code:00870f/4a + cheat + description:Enemies start with 1/3 normal energy in hangar + code:00870f/25 + cheat + description:Super Shots worth nothing on pick-up instead of 3 + code:00849e/00 + cheat + description:Super Shots worth 6 on pick-up (cannot gain over 29) + code:00849e/06 + cheat + description:Super Shots worth 9 on pick-up (cannot gain over 29) + code:00849e/09 + cheat + description:Super Shots worth 12 on pick-up (cannot gain over 29) + code:00849e/0c + cheat + description:Easily defeat enemy rocketmen on the Zeppelin + code:00c4b4/64 + cheat + description:Start with 1 chance instead of 3 + code:0085af/01 + cheat + description:Start with 2 chances + code:0085af/02 + cheat + description:Start with 4 chances + code:0085af/04 + cheat + description:Start with 5 chances + code:0085af/05 + cheat + description:Start with 6 chances + code:0085af/06 + cheat + description:Start with 7 chances + code:0085af/07 + cheat + description:Start with 8 chances + code:0085af/08 + cheat + description:Start with 9 chances + code:0085af/09 + +cartridge sha256:4fc2832e7aa01d105ca67977b38840ec1188869b5e74d20e58613c1cd127d78f + name:Rockman & Forte (Japan) + cheat + description:Invincibility against enemies + code:c345b7/6b + cheat + description:Invincibility against fire + code:c13411/6b + cheat + description:Invincibility against pits + code:c12cb8/60 + cheat + description:Invincibility against spikes + code:c133e9/6b + cheat + description:One hit kills + code:c34585/24 + cheat + description:Multi-jump - Megaman + code:c11c95/60+c11c96/7f+c17f60/20+c17f61/fd+c17f62/3a+c17f63/20+c17f64/e9+c17f65/31+c17f66/60 + cheat + description:Multi-jump - Bass + code:c12662/fd + cheat + description:Invincibility + code:7e0c30/30 + cheat + description:Infinite health + code:7e0c2f/1c + cheat + description:Infinite sliding time + code:7e0c54/01 + cheat + description:Infinite Beat + code:7e0b94/9c + cheat + description:Infinite Eddie + code:7e0b96/9c + cheat + description:Infinite Bolts + code:7e0b9c/e7+7e0b9d/03 + cheat + description:Infinite Mines + code:7e0b86/9f + cheat + description:Infinite T. Blade + code:7e0b8e/9f + cheat + description:Infinite Ice Wall + code:7e0b8c/9f + cheat + description:Infinite W. Burner + code:7e0b88/9f + cheat + description:Infinite S. Drill + code:7e0b82/9f + cheat + description:Infinite L. Bolt + code:7e0b84/9f + cheat + description:Infinite C. Vision + code:7e0b90/9f + cheat + description:Infinite M. Cards + code:7e0b8a/9f + cheat + description:Infinite Gospel Booster/Rush Search + code:7e0b92/9f + cheat + description:Have all items + code:7e0b97/ff+7e0b98/ff+7e0b99/ff + cheat + description:Have CD Sparkle info + code:7e0b98/ff + cheat + description:Have first 5 Units + code:7e0b97/ff + cheat + description:Have all CDs + code:306049/ff+30604a/ff+30604b/ff+30604c/1f+306040/fe+306041/ff+306042/ff+306043/ff+306044/ff+306045/ff+306046/ff+306047/ff+306048/ff + cheat + description:One hit kills (alt) + code:7e1a2f/01 + cheat + description:Last area open + code:7e0b79/ff + cheat + description:Last area, last level + code:7e0b7b/03 + +cartridge sha256:7c0f915b581796e5b6dd384ecdc0dad8af4d956492fbcedec628c8845d911d7e + name:Rocky Rodent (USA) + cheat + description:Infinite lives + code:80cc03/ea + cheat + description:Keep hairdo after you die + code:81afe0/ad + cheat + description:Start with red hairdo + code:80c9bc/02 + cheat + description:Start with purple hairdo + code:80c9bc/04 + cheat + description:Start with corkscrew hairdo + code:80c9bc/06 + cheat + description:Start with green ponytail hairdo + code:80c9bc/08 + cheat + description:Start with birdnest hairdo + code:80c9bc/0a + cheat + description:Invincibility + code:7e0054/72 + +cartridge sha256:f7e3c3012af2dbad350646b6ef3470f0b4c42e4a2873109f7aa6c81d7157c887 + name:Roger Clemens' MVP Baseball (USA) (Rev 1) + cheat + description:Batter never walks + code:00d207/ad + cheat + description:Batter never strikes out + code:00d232/ad + cheat + description:1 ball per walk + code:00d20e/01 + cheat + description:2 balls per walk + code:00d20e/02 + cheat + description:3 balls per walk + code:00d20e/03 + cheat + description:5 balls per walk + code:00d20e/05 + cheat + description:6 balls per walk + code:00d20e/06 + cheat + description:7 balls per walk + code:00d20e/07 + cheat + description:1 strike per out + code:00d239/01 + cheat + description:2 strikes per out + code:00d239/02 + cheat + description:4 strikes per out + code:00d239/04 + cheat + description:5 strikes per out + code:00d239/05 + cheat + description:Each run counts as 2 + code:018974/38+018955/38 + cheat + description:1 out per inning per team + code:00951c/01 + cheat + description:2 outs per inning per team + code:00951c/02 + +cartridge sha256:815bfcf4fd6eb23a20c2e50dde023c210b273ffb6cd86a93909d803c3643ce46 + name:Romance of the Three Kingdoms II (USA) + cheat + description:Scenario 1 - Start with 30,000 gold pieces + code:01ff3a/30+01ff3b/75 + cheat + description:Scenario 1 - Start with 30,000 rice + code:01ff3e/30+01ff3d/75 + cheat + description:Scenario 1 - Start with 30,000 population + code:01ff3e/30+01ff3f/75 + cheat + description:Scenario 2 - Start with 30,000 gold pieces + code:028339/30+02830a/75 + cheat + description:Scenario 2 - Start with 30,000 rice + code:02833b/30+02830c/75 + cheat + description:Scenario 2 - Start with 30,000 population + code:02833d/30+02830e/75 + cheat + description:Scenario 3 - Start with 30,000 gold pieces + code:02873c/30+02873d/75 + cheat + description:Scenario 3 - Start with 30,000 rice + code:02873e/30+02873f/75 + cheat + description:Scenario 3 - Start with 30,000 population + code:028740/30+028741/75 + cheat + description:Scenario 4 - Start with 30,000 gold pieces + code:028b3d/30+028b3e/75 + cheat + description:Scenario 4 - Start with 30,000 rice + code:028b3f/30+028b40/75 + cheat + description:Scenario 4 - Start with 30,000 population + code:028b41/30+028b42/75 + cheat + description:Scenario 5 - Start with 30,000 gold pieces + code:02909c/30+02909d/75 + cheat + description:Scenario 5 - Start with 30,000 rice + code:02909e/30+02909f/75 + cheat + description:Scenario 5 - Start with 30,000 population + code:0290a0/30+0290a1/75 + cheat + description:Scenario 6 - Start with 30,000 gold pieces + code:02925e/30+02925f/75 + cheat + description:Scenario 6 - Start with 30,000 rice + code:029260/30+029261/75 + cheat + description:Scenario 6 - Start with 30,000 population + code:029262/30+029263/75 + +cartridge sha256:4158e3e8890a52f0b12dc9ad5a29276058a247ff41e9f1d22897ebde1eb11269 + name:Run Saber (USA) + cheat + description:Almost invincible - P1 (disable if you fall into a pit) + code:809a53/ad + cheat + description:Almost invincible - P2 (disable if you fall into a pit) + code:809a6b/ad + cheat + description:Almost invincible - both players (disable if you fall into a pit) + code:809a4b/6b + cheat + description:Infinite lives - P1 + code:80d566/00 + cheat + description:Infinite lives - P2 + code:80d586/00 + cheat + description:Infinite Super Bombs - P1 + code:9ffb27/00 + cheat + description:Infinite Super Bombs - P2 + code:9ffb10/00 + cheat + description:Infinite continues + code:9ff43c/ad + cheat + description:Level select and 9 lives selectable on the option menu + code:0ceac9/01 + cheat + description:Hit anywhere - male character + code:86fc7f/80+86fc80/15 + cheat + description:Bomb power-ups give no Super Bombs + code:85fc6a/00 + cheat + description:Bomb power-ups give 2 Super Bombs + code:85fc6a/02 + cheat + description:Start with no Super Bombs + code:0cd958/00 + cheat + description:Start with 1 Super Bomb + code:0cd958/01 + cheat + description:Start with 5 Super Bombs + code:0cd958/05 + cheat + description:Start with 9 Super Bombs + code:0cd958/09 + cheat + description:Start with 1 health + code:0cd972/01 + cheat + description:Start with 4 health + code:0cd972/04+0ce959/04 + cheat + description:Start with 5 health + code:0cd972/05+0ce959/05 + cheat + description:Start with 8 health + code:0cd972/08+0ce959/08 + cheat + description:Start with no continues + code:0cbbe2/01 + cheat + description:Start with 1 continue + code:0cbbe2/02 + cheat + description:Start with 5 continues + code:0cbbe2/06 + cheat + description:Start with 9 continues + code:0cbbe2/0a + +cartridge sha256:00e78318926e5cae79bce0535fddd3dccaa732f5c70e43acefc2769a9899eaed + name:Rushing Beat Shura (Japan) + cheat + description:Invincibility + code:80ddc0/ad + cheat + description:One hit kills + code:83dab0/64 + cheat + description:Choose Dick to play as Super Dick + code:7e060a/16+7e060b/04 + +cartridge sha256:0aa16d6b588ba05ab00936201e68a694746fc5e1b2e4f2dbf7cda09265a81379 + name:Sailormoon (France) + cheat + description:Infinite HP - P2 + code:7e07c0/50 + cheat + description:Infinite Bombs + code:7e0759/09 + cheat + description:Full charge meter + code:7e0756/20 + +cartridge sha256:5db804171fca42486485ed85e4afe45b29e6d01304bdf75d520bfc42429739e3 + name:Samurai Shodown (USA) + cheat + description:Hit anywhere - both players + code:c042e4/00 + cheat + description:Max POW meter after one hit + code:c0f26e/01 + cheat + description:Start with 1/2 health + code:c15829/40 + cheat + description:Start with 1/4 health + code:c15829/20 + cheat + description:Start with 33 seconds + code:c078eb/21 + cheat + description:Infinite health - P1 + code:7e6214/80 + cheat + description:Infinite health - P2 + code:7e6614/80 + cheat + description:Infinite time + code:7ebe9b/63 + cheat + description:Max POW meter - P1 + code:7e623d/20 + cheat + description:Max POW meter - P2 + code:7e663d/20 + cheat + description:One hit kills - P1 + code:7e6614/01 + cheat + description:One hit kills - P2 + code:7e6214/01 + +cartridge sha256:c894d0d3b99ebbc54910c1d65ceae4272c959c8693a87c58e040bc5a5f74f129 + name:Sanrio World Smash Ball! (Japan) + cheat + description:Always have Strong Smash - P1 + code:7e0070/a0 + cheat + description:Always have Strong Smash - P2 + code:7e0086/a0 + cheat + description:Never have Strong Smash - P1 + code:7e0070/00 + cheat + description:Never have Strong Smash - P2 + code:7e0086/00 + +cartridge sha256:34e1af0642c85148c5a3dc3c7ab4bcbda13a9fea190934b5526c555fff035651 + name:Saturday Night Slam Masters (USA) + cheat + description:Able to pick the same characters + code:c03b54/60+c03b39/60 + cheat + description:Stingray becomes Biff + code:80a666/00 + cheat + description:Stingray becomes Gunloc + code:80a666/01 + cheat + description:Stingray becomes Oni + code:80a666/02 + cheat + description:Stingray becomes Titan + code:80a666/03 + cheat + description:Stingray becomes Haggar + code:80a666/05 + cheat + description:Stingray becomes Grater + code:80a666/06 + cheat + description:Stingray becomes Rasta + code:80a666/07 + cheat + description:Stingray becomes Jumbo + code:80a666/08 + cheat + description:Stingray becomes Scorpion + code:80a666/09 + cheat + description:Biff becomes Gunloc + code:80a662/01 + cheat + description:Biff becomes Oni + code:80a662/02 + cheat + description:Biff becomes Titan + code:80a662/03 + cheat + description:Biff becomes Stingray + code:80a662/04 + cheat + description:Biff becomes Haggar + code:80a662/05 + cheat + description:Biff becomes Grater + code:80a662/06 + cheat + description:Biff becomes Rasta + code:80a662/07 + cheat + description:Biff becomes Jumbo + code:80a662/08 + cheat + description:Biff becomes Scorpion + code:80a662/09 + cheat + description:14-second count outside ring + code:c10991/0e + cheat + description:10-second count outside ring + code:c10991/0a + cheat + description:9-second count for pin + code:c10980/09 + cheat + description:6-second count for pin + code:c10980/06 + cheat + description:1-second count for pin + code:c10980/01 + cheat + description:Faster timer + code:c06215/1e + cheat + description:Slower timer + code:c06215/60 + cheat + description:Stingray has faster jalepeno comet + code:c1dd0e/06+c1dd15/f9 + cheat + description:Quicker 'pattycake slap' for Grater + code:80bdec/4a+80bdf6/03 + cheat + description:Quicker 'sonic fist' for Gunloc + code:80bde7/4a+80bdf1/03 + cheat + description:Quicker 'sonic fist' for Biff + code:80bde6/4a+80bdf1/03 + cheat + description:Quicker 'jungle fever' for Rasta + code:80bded/4a+80bdf7/02 + cheat + description:Infinite health - P1 + code:7e0879/ff + cheat + description:Infinite health - P3 + code:7e0c79/ff + cheat + description:Infinite health - P4 + code:7e0e79/ff + cheat + description:No health - P1 + code:7e0879/00 + cheat + description:No health - P2 + code:7e0a79/00 + cheat + description:No health - P3 + code:7e0c79/00 + cheat + description:No health - P4 + code:7e0e79/00 + cheat + description:Infinite time + code:7e1a70/01 + cheat + description:Infinite time (alt) + code:7e1a70/59+7e1a71/02 + cheat + description:Infinite ringout time - all players + code:7e1a60/00 + cheat + description:P1 wrestler modifier - Jumbo + code:7e1b86/00 + cheat + description:P1 wrestler modifier - Biff + code:7e1b86/01 + cheat + description:P1 wrestler modifier - Gunloc + code:7e1b86/02 + cheat + description:P1 wrestler modifier - Oni + code:7e1b86/03 + cheat + description:P1 wrestler modifier - Titan + code:7e1b86/04 + cheat + description:P1 wrestler modifier - Stingray + code:7e1b86/05 + cheat + description:P1 wrestler modifier - Haggar + code:7e1b86/06 + cheat + description:P1 wrestler modifier - Grater + code:7e1b86/07 + cheat + description:P1 wrestler modifier - Rasta + code:7e1b86/08 + cheat + description:P1 wrestler modifier - Scorpion + code:7e1b86/09 + cheat + description:P2 wrestler modifier - Jumbo + code:7e1b87/00 + cheat + description:P2 wrestler modifier - Biff + code:7e1b87/01 + cheat + description:P2 wrestler modifier - Gunloc + code:7e1b87/02 + cheat + description:P2 wrestler modifier - Oni + code:7e1b87/03 + cheat + description:P2 wrestler modifier - Titan + code:7e1b87/04 + cheat + description:P2 wrestler modifier - Stingray + code:7e1b87/05 + cheat + description:P2 wrestler modifier - Haggar + code:7e1b87/06 + cheat + description:P2 wrestler modifier - Grater + code:7e1b87/07 + cheat + description:P2 wrestler modifier - Rasta + code:7e1b87/08 + cheat + description:P2 wrestler modifier - Scorpion + code:7e1b87/09 + cheat + description:P3 wrestler modifier - Jumbo + code:7e1b88/00 + cheat + description:P3 wrestler modifier - Biff + code:7e1b88/01 + cheat + description:P3 wrestler modifier - Gunloc + code:7e1b88/02 + cheat + description:P3 wrestler modifier - Oni + code:7e1b88/03 + cheat + description:P3 wrestler modifier - Titan + code:7e1b88/04 + cheat + description:P3 wrestler modifier - Stingray + code:7e1b88/05 + cheat + description:P3 wrestler modifier - Haggar + code:7e1b88/06 + cheat + description:P3 wrestler modifier - Grater + code:7e1b88/07 + cheat + description:P3 wrestler modifier - Rasta + code:7e1b88/08 + cheat + description:P3 wrestler modifier - Scorpion + code:7e1b88/09 + cheat + description:P4 wrestler modifier - Jumbo + code:7e1b89/00 + cheat + description:P4 wrestler modifier - Biff + code:7e1b89/01 + cheat + description:P4 wrestler modifier - Gunloc + code:7e1b89/02 + cheat + description:P4 wrestler modifier - Oni + code:7e1b89/03 + cheat + description:P4 wrestler modifier - Titan + code:7e1b89/04 + cheat + description:P4 wrestler modifier - Stingray + code:7e1b89/05 + cheat + description:P4 wrestler modifier - Haggar + code:7e1b89/06 + cheat + description:P4 wrestler modifier - Grater + code:7e1b89/07 + cheat + description:P4 wrestler modifier - Rasta + code:7e1b89/08 + cheat + description:P4 wrestler modifier - Scorpion + code:7e1b89/09 + +cartridge sha256:7fb5236d10852125f0f37c2188b907d636647400a57bccbdb2f63098ffae8b2d + name:Scooby-Doo Mystery (USA) + cheat + description:Infinite health + code:81fb05/00 + cheat + description:Infinite lives + code:809313/ad + cheat + description:Most enemies are more frightening + code:81fb05/ff + cheat + description:Scooby snacks do nothing + code:818d04/ad + cheat + description:Scooby snacks reduce more fright + code:818d20/ff + cheat + description:Start with 1 life + code:808d4a/00 + cheat + description:Start with 5 lives + code:808d4a/04 + cheat + description:Start with 7 lives + code:808d4a/06 + cheat + description:Start with 10 lives + code:808d4a/09 + +cartridge sha256:39c69dfbba31086cee0c6a034186148c46e1e6c86fcb8e990fb5364a8845fbcd + name:SD Kidou Senshi Gundam - V Sakusen Shidou (Japan) + cheat + description:Invincibility + code:0182b7/60+01831c/60 + +cartridge sha256:8cd9eea0f01e2442727e4624199afaa42dceeb05b9084a4358cadbe4e5a04577 + name:SD The Great Battle - Aratanaru Chousen (Japan) + cheat + description:Invincibility + code:00af7c/60+00a964/a5 + cheat + description:Infinite lives + code:0086bf/a5 + +cartridge sha256:a4ab8cfad2f236675b1c0124f8484688e149f38e8628a3b38e9ec14d491ec07e + name:SeaQuest DSV (USA) + cheat + description:Infinite weapons / items + code:84a3a5/bf+84a4b8/bf + cheat + description:Start with 99 Darwin's Aqua Lungs + code:81f2a9/63 + cheat + description:Start with 99 HR Probes + code:81f2b1/63 + cheat + description:Start with 99 Sea Trucks + code:81f2af/63 + cheat + description:Start with 99 Sea Speeders + code:81f2ab/63 + cheat + description:Start with 99 Crabs + code:81f2a7/63 + cheat + description:Start with 99 Stingers + code:81f2ad/63 + +cartridge sha256:17c864a76d498feb6479eee8e7d6807b951c66225033228622bb66754baab1db + name:Secret of Evermore (USA) + cheat + description:Everyone is invincible, including enemies + code:8fc241/ad+908498/bd+908461/0d + cheat + description:Infinite Alchemy ingredients + code:91ce25/bf+91cdf8/bf + cheat + description:Alchemy levels up on every use + code:91cd5c/00 + cheat + description:View Boy's stats to get 131,074 Talons (don't use if you already have more than that) + code:8da323/a9+8da324/02+8da325/00+8da328/8d + cheat + description:Your dog starts with 99 HP + code:8c9517/63 + cheat + description:Your dog starts with 255 HP + code:8c9517/ff + cheat + description:Start with 99 attack points + code:8c935b/57 + cheat + description:Start with a lot of attack points + code:8c935b/ff + cheat + description:Start with 99 defense points + code:8c927d/63 + cheat + description:Start with a lot of defense points + code:8c927d/ff + cheat + description:Start with 99 magic defense points + code:8c9439/63 + cheat + description:Start with a lot of magic defense points + code:8c9439/ff + cheat + description:Start with 50 evade % points + code:8c8e27/32 + cheat + description:Start with 99 evade % points + code:8c8e27/63 + cheat + description:Start with 50 hit % points + code:8c8f05/32 + cheat + description:Start with 99 hit % points + code:8c8f05/63 + cheat + description:Start with 99 HP + code:8eb687/63+8c919f/63 + cheat + description:Start with 255 HP + code:8eb687/ff+8c919f/ff + cheat + description:Have all weapons + code:7e22da/ff+7e22db/ff + +cartridge sha256:4c15013131351e694e05f22e38bb1b3e4031dedac77ec75abecebe8520d82d5f + name:Secret of Mana (USA) + cheat + description:999 health - P1 + code:7ee182/e7+7ee183/03 + cheat + description:999 health - P2 + code:7ee382/e7+7ee383/03 + cheat + description:999 health - P3 + code:7ee582/e7+7ee583/03 + cheat + description:999 Max health - P1 + code:7ee184/e7+7ee185/03 + cheat + description:999 Max health - P2 + code:7ee384/e7+7ee385/03 + cheat + description:999 Max health - P3 + code:7ee584/e7+7ee585/03 + cheat + description:Infinite MP + code:7ee386/63+7ee586/63 + cheat + description:Infinite GP + code:7ecc6a/7f+7ecc6b/96+7ecc6c/98 + cheat + description:Protection from most hits (disable to kill enemies) + code:c040be/bd + cheat + description:Enemies die instantly + code:c03cf2/a0+c03cf3/00+c03cf4/00 + cheat + description:Hit anywhere + code:01ce3e/24+01d1a6/24 + cheat + description:Level 99 after first enemy + code:c04486/98+c039b6/00 + cheat + description:Max weapon damage + code:c049c9/9c+c049c8/a9 + cheat + description:Change screens to max out Strength, Agility, Constitution, Intelligence and Wisdom + code:c04be1/00 + cheat + description:Weapon bar never decreases + code:02c24a/bd+00f944/bd + cheat + description:Walk through walls + code:01bb7c/00+01ba7b/00 + cheat + description:Strength for level 16 is 90 + code:d0428b/5a + cheat + description:Agility for level 16 is 90 + code:d0428c/5a + cheat + description:Constitution for level 16 is 90 + code:d0428d/5a + cheat + description:Intelligence for level 16 is 90 + code:d0428e/5a + cheat + description:Wisdom for level 16 is 90 + code:d0428f/5a + cheat + description:Chest in elder's basement in Potos gives you 65360 GP + code:ca8e9f/ff + cheat + description:Staying at the inn in Potos is free if you have enough money + code:c03a2e/ad+c03a33/ad + cheat + description:Items in the shop at Potos are free if you have enough money + code:c07d1e/af + cheat + description:Candy costs nothing + code:d8fb9c/00 + cheat + description:Overalls costs nothing + code:d8fbe0/00 + cheat + description:Bandanna costs nothing + code:d8fbb6/00 + cheat + description:Cup Of Wishes costs nothing + code:d8fba6/00 + cheat + description:Medical Herb costs nothing + code:d8fba4/00 + cheat + description:Wristband costs nothing + code:d8fc30/00 + cheat + description:Hair Ribbon costs nothing + code:d8fbb8/00 + cheat + description:Rabite Cap costs nothing + code:d8fbba/00 + cheat + description:Faerie Walnut costs nothing + code:d8fba2/00+d8fba3/00 + cheat + description:Royal Jam costs nothing + code:d8fba0/00 + cheat + description:Chocolate costs nothing + code:d8fb9e/00 + cheat + description:Staying at Neko's costs nothing instead of 30 + code:c9cf9d/00 + cheat + description:Start with 255 GP + code:c0d7b3/ff + cheat + description:Start with 32,768 GP + code:c0d7b4/80 + cheat + description:Start with 65,280 GP + code:c0d7b4/ff + cheat + description:Start at Level 16 + code:c04e5d/81 + +cartridge sha256:ab3d724f3032337300c0cc10259447b173793b9dc25f1f250baf785e9c16bb7d + name:Shadow, The (USA) (Proto) (Alt 1) + cheat + description:Infinite health + code:7e1e31/ff + cheat + description:Infinite dash + code:7e1876/ff + cheat + description:Infinite time + code:7e1b76/09 + cheat + description:Enemy 1 has 0 health + code:7e1b4a/00 + cheat + description:Enemy 2 has 0 health + code:7e1b4b/00 + cheat + description:Enemy 3 has 0 health + code:7e1b4c/00 + cheat + description:Start on level 2 - Empire State + code:7e1e28/01 + cheat + description:Start on level 3 - Amusement Park + code:7e1e28/02 + cheat + description:Start on level 4 - The Museum + code:7e1e28/03 + cheat + description:Start on level 5 - The Federal Buildings + code:7e1e28/04 + cheat + description:Start on level 6 - The Bike Chase + code:7e1e28/05 + cheat + description:Start on level 7 - Maritech Labs + code:7e1e28/06 + cheat + description:Start on level 8 - China Town + code:7e1e28/07 + cheat + description:Start on level 9 - Hotel Monolith + code:7e1e28/08 + +cartridge sha256:85092f4c566b4d34bd4bd70be55df92bfbda40f0030e63a15bafbb8f760c1519 + name:Shadow, The (USA) (Proto) + cheat + description:Infinite health + code:7e1e31/ff + cheat + description:Infinite dash + code:7e1876/ff + cheat + description:Infinite time + code:7e1b76/09 + cheat + description:Enemy 1 has 0 health + code:7e1b4a/00 + cheat + description:Enemy 2 has 0 health + code:7e1b4b/00 + cheat + description:Enemy 3 has 0 health + code:7e1b4c/00 + cheat + description:Start on level 2 - Empire State + code:7e1e28/01 + cheat + description:Start on level 3 - Amusement Park + code:7e1e28/02 + cheat + description:Start on level 4 - The Museum + code:7e1e28/03 + cheat + description:Start on level 5 - The Federal Buildings + code:7e1e28/04 + cheat + description:Start on level 6 - The Bike Chase + code:7e1e28/05 + cheat + description:Start on level 7 - Maritech Labs + code:7e1e28/06 + cheat + description:Start on level 8 - China Town + code:7e1e28/07 + cheat + description:Start on level 9 - Hotel Monolith + code:7e1e28/08 + +cartridge sha256:e6bc0a595d5c7c4bc0bbb61ffe35a70288a77eb78544ed74682d489a9e6f07f4 + name:Shadowrun (USA) + cheat + description:Infinite health in the Matrix + code:81b17f/ad + cheat + description:Everything is free + code:80ccf7/80+80ccf8/11 + cheat + description:Karma not subtracted for spells/skills (must have enough to advance) + code:80f010/af + cheat + description:Karma not subtracted for shooting people (ignore message saying you lost karma) + code:80880f/af + cheat + description:Spell points not subtracted (works for all spell casters) (casting spells you aren't allowed to raises your spell points) + code:808b53/bf + cheat + description:Walk through walls + code:81860d/80 + cheat + description:Going up 1 body point adds 20 stamina instead of 10 + code:80f164/14 + cheat + description:Going up 1 body point adds 30 stamina instead of 10 + code:80f164/1e + cheat + description:Add 65,000 nuyen (if less than 65,000) + code:8095af/01+8095b1/0f+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add about 131,000 nuyen (if less than 65,000) + code:8095af/02+8095b1/0f+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add about 524,000 nuyen (if less than 65,000) + code:8095af/08+8095b1/0f+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Set stamina to 100 + code:8095af/64+8095b1/00+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Set stamina to 200 + code:8095af/c8+8095b1/00+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Set magic total possible to 10 (and spell points to 100) + code:8095af/0a+8095b1/fc+8095b2/3b+8095b0/8f+8095b3/7e + cheat + description:Set total possible magic to 20 (and spell points to 200) + code:8095af/14+8095b1/fc+8095b2/3b+8095b0/8f+8095b3/7e + cheat + description:Set total possible magic to 25 (and spell points to 250) + code:8095af/19+8095b1/fc+8095b2/3b+8095b0/8f+8095b3/7e + cheat + description:Set strength to 6 + code:8095af/06+8095b1/fd+8095b2/3b+8095b0/8f+8095b3/7e + cheat + description:Set charisma to 6 + code:8095af/06+8095b1/ff+8095b2/3b+8095b0/8f+8095b3/7e + cheat + description:Set karma to 10 (if karma is less than 32) + code:8095af/50+8095b1/11+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Set karma to 20 (if karma is less than 32) + code:8095af/a0+8095b1/11+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Set karma to 31 (if karma is less than 32) + code:8095af/ff+8095b1/11+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add 32 karma (if karma is less than 32) + code:8095af/01+8095b1/12+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add 64 karma (if karma is less than 32) + code:8095af/02+8095b1/12+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add 96 karma (if karma is less than 32) + code:8095af/03+8095b1/12+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Add 192 karma (if karma is less than 32) + code:8095af/06+8095b1/12+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn powerball spell, level 6 + code:8095af/06+8095b1/07+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn heal spell, level 6 + code:8095af/06+8095b1/08+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn invisibility spell, level 6 + code:8095af/06+8095b1/09+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn armor spell, level 6 + code:8095af/06+8095b1/0a+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn summon spirit spell, level 6 + code:8095af/06+8095b1/0b+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn freeze spell, level 6 + code:8095af/06+8095b1/0c+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn firearms skill, level 5 + code:8095af/05+8095b1/01+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn firearms skill, level 10 + code:8095af/0a+8095b1/01+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn firearms skill, level 15 + code:8095af/0f+8095b1/01+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn computer skill, level 6 + code:8095af/06+8095b1/04+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn leadership skill, level 6 + code:8095af/06+8095b1/05+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn armed combat skill, level 6 + code:8095af/06+8095b1/03+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn unarmed combat skill, level 6 + code:8095af/06+8095b1/02+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Learn negotiation skill, level 6 + code:8095af/06+8095b1/06+8095b2/3c+8095b0/8f+8095b3/7e + cheat + description:Start with computer, firearms skills at level 2 + code:8098f3/02 + cheat + description:Start with computer, firearms skills at level 3 + code:8098f3/03 + cheat + description:Start with computer, firearms skills at level 4 + code:8098f3/04 + cheat + description:Start with computer, firearms skills at level 5 + code:8098f3/05 + cheat + description:Start with computer, firearms skills at level 6 + code:8098f3/06 + cheat + description:Start with 2 strength and charisma + code:8098a9/02 + cheat + description:Start with 4 strength and charisma + code:8098a9/04 + cheat + description:Start with 5 strength and charisma + code:8098a9/05 + cheat + description:Start with 6 strength and charisma + code:8098a9/06 + cheat + description:Start with 50 stamina + code:8098b3/32 + cheat + description:Start with 100 stamina + code:8098b3/64 + cheat + description:Lots of Nuyen + code:7e3c0d/7f+7e3c0e/96+7e3c0f/98 + cheat + description:Infinite / max HP + code:7e33de/c8+7e3c00/c8+7e3c01/01 + cheat + description:Debug room accessible + code:7e3bd3/ff+7e3bd4/ff + +cartridge sha256:b0fcef5b3e74ac20ac76720723e1affa5e0d4e3e864d09731ce7fe6f16b7fd28 + name:Shadowrun (USA) (Beta) + cheat + description:Debug room accessible + code:7e3bce/ff+7e3bcf/ff + +cartridge sha256:c73757eea258e169e506eaef989227a59918060f94117917f338183db14c50b6 + name:Shaq-Fu (USA) + cheat + description:Invincibility - P1 + code:c0b290/40+c0b292/d0+c0b28f/e0+c0b291/20 + cheat + description:Hit anywhere - P1 + code:c0b27c/40+c0b27b/e0+c0b27d/20+c0b282/00+c0b281/1c + cheat + description:Infinite continues - Duel Mode + code:c08355/ad + cheat + description:Blood enabled + code:c0958f/00+c094ea/00 + cheat + description:Start with no continues + code:c0cd81/00 + cheat + description:Start with 1 continues + code:c0cd81/01 + cheat + description:Start with 5 continues + code:c0cd81/05 + cheat + description:Start with 9 continues + code:c0cd81/09 + cheat + description:Start with 15 continues + code:c0cd81/0f + +cartridge sha256:dd94308d822636c6ddf73c5e2644c84f2eb8fb4d9201150fc5f37d44d6f423f1 + name:Shin Kidou Senki Gundam W - Endless Duel (Japan) + cheat + description:Hit anywhere - P1 + code:049ad4/47+049ad0/c0+049ad1/00+049ad2/00 + +cartridge sha256:40e25763288521509b2201f5b4e53f3e3bcdfa92e37cf5eeee4f00d8935d534a + name:Shin Nekketsu Kouha - Kunio-tachi no Banka (Japan) + cheat + description:Invincibility + code:82d19a/ad + cheat + description:Invincibility (alt) + code:7e1202/02 + cheat + description:Infinite health - Kunio + code:7e0094/ff + cheat + description:Infinite health - Riki + code:7e0096/ff + cheat + description:Infinite health - Misako + code:7e0098/ff + cheat + description:Infinite health - Kyouko + code:7e009a/ff + cheat + description:One hit kills + code:7e009c/00+7e009e/00+7e00a0/00+7e00a2/00 + cheat + description:Play as Kunio - Jail Outfit (Safe To Use) + code:7e11dc/00 + cheat + description:Play as Riki - Jail Outfit (Safe To Use) + code:7e11dc/01 + cheat + description:Play as Takayama + code:7e11dc/03 + cheat + description:Play as Cop + code:7e11dc/04 + cheat + description:Play as Gouji + code:7e11dc/05 + cheat + description:Play as Tooru + code:7e11dc/06 + cheat + description:Play as Gouji Henchman + code:7e11dc/07 + cheat + description:Play as Kunio - School Outfit (Safe To Use) + code:7e11dc/08 + cheat + description:Play as Riki - School Outfit (Safe To Use) + code:7e11dc/09 + cheat + description:Play as Misako (Safe To Use) + code:7e11dc/0a + cheat + description:Play as Kyouko (Safe To Use) + code:7e11dc/0b + cheat + description:Play as Daiki Stage 2, Ryuuta Stage 3 + code:7e11dc/0c + cheat + description:Play as Henchman Stage 2 + + code:7e11dc/0e+7e11dc/11+7e11dc/14 + cheat + description:Play as Shingi Henchman + code:7e11dc/17 + cheat + description:Play as Shingi + code:7e11dc/1a + cheat + description:Play as Lisa + code:7e11dc/1b + cheat + description:Play as Sabu + code:7e11dc/1e + cheat + description:Play as Kinji + code:7e11dc/1f + cheat + description:Play as Ken + code:7e11dc/20 + cheat + description:Play as Misuzu + code:7e11dc/21 + cheat + description:Play as Yakuza 1 + code:7e11dc/23 + cheat + description:Play as Yakuza 2 + code:7e11dc/25 + cheat + description:Play as Joe + code:7e11dc/2c + cheat + description:Character color becomes White + code:7e0084/00 + cheat + description:Character color becomes Blue + code:7e0084/01 + cheat + description:Character color becomes Green + code:7e0084/02 + cheat + description:Character color becomes Light Blue + code:7e0084/03 + +cartridge sha256:de2d5a952096c5f50368b9270d342aa6e7a39007ffbec27117e182e30ef4cf32 + name:Sid Meier's Civilization (USA) + cheat + description:Get a new skill every turn + code:c0e84b/00 + cheat + description:Have 42.0 moves until you specify no orders + code:c0d9b3/a9+c0d9b4/7e + cheat + description:Start with more money + code:cc4b24/99+cc4b25/99 + cheat + description:Start with a lot more money + code:cc4b24/ff+cc4b25/ff + cheat + description:Infinite time + code:7e75d7/00 + cheat + description:Max income + code:7e7630/ff + +cartridge sha256:d09ca5adaee65cfd686742482bc55b1a3ce9bc5ebed61f24c5631555151a7fc7 + name:Side Pocket (USA) + cheat + description:Infinite shots + code:7e1094/0a + cheat + description:Infinite shots (alt) + code:7e1094/10 + cheat + description:Gain lots of bonus shots for every ball you get in + code:7e1097/03 + cheat + description:Always advance to the next level + code:7e10a2/e7+7e10a3/03 + +cartridge sha256:d50a40576c5494c039d2da64c19353d5d075345199ae7a9a7a077fde33dbd70c + name:Silva Saga II - The Legend of Light and Darkness (Japan) + cheat + description:No random battles + code:80c769/ad + cheat + description:Walk anywhere + code:80c7ee/80+80c7ef/64 + +cartridge sha256:c0bd1b378337c32047a6b7122a3813beb646e496fbdb1fa5c87ab9856271e4c5 + name:SimAnt - The Electronic Ant Colony (USA) + cheat + description:Always have maximum energy + code:03b1b1/00 + cheat + description:Yellow ant always wins + code:03c639/00 + +cartridge sha256:e9c0bc05511e05a0d7c3e7cc42e761e1e8e532d46f59b9854b6902e1a2e9dd0a + name:SimCity (USA) + cheat + description:Money doesn't decrease for most types of spending + code:01bbc2/ad + cheat + description:Time goes faster + code:038037/00 + cheat + description:Time goes slower + code:038037/0f + cheat + description:Start easy game with $40,000 + code:03c691/40+03c692/9c + cheat + description:Start easy game with $60,000 + code:03c691/60+03c692/ea + cheat + description:Start easy game with $3,000 + code:03c691/b8+03c692/0b + cheat + description:Cheat menu at game exit + code:0188e7/a9+0188e8/80+0188e9/f0 + cheat + description:Infinite Gift Houses + code:7e03f5/01 + cheat + description:Infinite Gift Banks + code:7e03f5/02 + cheat + description:Infinite Gift Amusement Parks + code:7e03f5/03 + cheat + description:Infinite Gift Zoos + code:7e03f5/04 + cheat + description:Infinite Gift Casinos + code:7e03f5/05 + cheat + description:Infinite Gift Landfill + code:7e03f5/06 + cheat + description:Infinite Gift Police HQs + code:7e03f5/07 + cheat + description:Infinite Gift Fire Stations + code:7e03f5/08 + cheat + description:Infinite Gift Fountains + code:7e03f5/09 + cheat + description:Infinite Gift Mario Statue + code:7e03f5/0a + cheat + description:Infinite Gift Expo + code:7e03f5/0b + cheat + description:Infinite Gift Windmills + code:7e03f5/0c + cheat + description:Infinite Gift Libraries + code:7e03f5/0d + cheat + description:Infinite Gift Large Parks + code:7e03f5/0e + cheat + description:Infinite Gift Train Stations + code:7e03f5/0f + +cartridge sha256:bf74c58e4190faca2f3a967dc190fe529d13887d1262b72e057b5353e43cf67f + name:SimCity 2000 - The Ultimate City Simulator (USA) + cheat + description:Start with $99,999,999 on all the maps except the Land Of Freedom + code:c112ed/ff+c112ee/e0+c112f2/f5+c112f3/05 + cheat + description:Start with $99,999,999 on the Land Of Freedom + code:c112e1/ff+c112e2/e0+c112e6/f5+c112e7/05 + +cartridge sha256:446a1036d036986fdea7906c83832d3ba79ef63a6ed8c4e88b89ab9cb25daded + name:SimEarth - The Living Planet (USA) + cheat + description:Infinite Omega energy + code:7f9cd9/00 + +cartridge sha256:f0d98e9061d0f6a193bb856de8a592f336dada97c41966e8d03119ba97465413 + name:Simpsons, The - Bart's Nightmare (USA) + cheat + description:Infinite lives (Bartman and Itchy and Scratchy sub-games) + code:1f92f3/ad + cheat + description:Infinite Z's (main game) + code:15aee7/ad+15aeea/ad + cheat + description:Start with 2 bubbles + code:1588cf/02 + cheat + description:Start with 9 bubbles + code:1588cf/09 + cheat + description:Infinite life + code:7e0938/0a + cheat + description:Infinite hits + code:7e0514/0b + cheat + description:Infinite 99 Watermelon Seeds left + code:7e0137/63 + cheat + description:Infinite 99 Gum left + code:7e013d/63 + cheat + description:Infinite Bubbles and Seeds + code:15ac96/b5 + cheat + description:All Pages + code:7e013f/08 + cheat + description:No Pages + code:7e013f/00 + +cartridge sha256:70008efe51185eb0a2f8d8d8ac2bdbb99bd3dfcc169dcc474962f82692998051 + name:Sink or Swim (USA) + cheat + description:Infinite lives + code:7e0972/09 + cheat + description:0 left + code:7e164a/00 + cheat + description:0 to rescue + code:7e1650/00 + cheat + description:9 saved + code:7e164c/09 + +cartridge sha256:e10070f01845505ae8bfdf7b5b492e7209c2ae876f169fb6ff420dea269f4da3 + name:Skuljagger - Revolt of the Westicans (USA) + cheat + description:Invincibility + code:00aba8/60 + cheat + description:Infinite Red Jemeralds + code:00ab9c/02 + cheat + description:Don't lose Green Jemeralds when you fall and die + code:019a97/ad + cheat + description:Infinite time + code:008c95/00 + cheat + description:Infinite lives + code:00abc1/00+019a92/00 + cheat + description:Die when touched (regardless of Jemeralds) + code:00ab99/80+00aba8/80 + cheat + description:No enemies or Jemeralds (good for exploring, disable to advance) + code:01c690/b9 + cheat + description:Red jemeralds set to 10 after being hit (must have at least 1) + code:00ab9c/11 + cheat + description:Slower timer + code:008c87/70 + cheat + description:Faster timer + code:008c87/1e + cheat + description:Time goes by 2x as fast + code:008c95/02 + cheat + description:Time goes by 4x as fast + code:008c95/04 + cheat + description:Green Jemeralds worth 3 + code:00aadd/03 + cheat + description:Green Jemeralds worth 9 + code:00aadd/09 + cheat + description:Green Jemeralds worth 19 + code:00aadd/19 + cheat + description:Green Jemeralds worth 25 (extra life on each one) + code:00aadd/25 + cheat + description:10 Green Jemeralds gives an extra life + code:00aae3/10 + cheat + description:50 Green Jemeralds gives an extra life + code:00aae3/50 + cheat + description:1 Green Jemerald gives an extra life + code:00aae5/00 + cheat + description:Start with 1 life instead of 5 + code:01bcee/01 + cheat + description:Start with 3 lives + code:01bcee/03 + cheat + description:Start with 9 lives + code:01bcee/09 + cheat + description:Start with 19 lives + code:01bcee/19 + cheat + description:Start with 50 lives + code:01bcee/50 + cheat + description:Start with 99 lives + code:01bcee/99 + cheat + description:Invincibility (alt) + code:7e1a02/08 + cheat + description:Infinite time (alt) + code:7e02be/ff + +cartridge sha256:a4ba1483db79c3f6278082387bce216d8f3e3b11ca32d49516d27f5ac07135a5 + name:Skyblazer (USA) + cheat + description:Invincibility + code:7e0065/9e + cheat + description:Infinite health + code:7ef801/04 + cheat + description:Infinite special power + code:7e1f0d/08 + cheat + description:Infinite Warrior Force + code:7e0089/ff + cheat + description:Hit anywhere + code:018c1e/00+018be8/80 + cheat + description:Get items from anywhere + code:02b7e4/80 + cheat + description:One hit kills + code:01fe7b/00 + cheat + description:Enemies die automatically + code:018b8d/80+018c1e/00+018be8/80+01fe7b/00 + cheat + description:All enemies frozen + code:7efa60/8d+7efa61/8d+7efa62/8d+7efa63/8d+7efa64/8d+7efa65/8d+7efa66/8d+7efa67/8d+7efa68/8d+7efa69/8d+7efa6a/8d+7efa6b/8d+7efa6c/8d+7efa6d/8d+7efa6e/8d+7efa6f/8d+7efa70/8d+7efa71/8d+7efa72/8d+7efa73/8d+7efa74/8d+7efa75/8d+7efa76/8d+7efa77/8d+7efa78/8d+7efa79/8d+7efa7a/8d+7efa7b/8d+7efa7c/8d+7efa7d/8d+7efa7e/8d+7efa7f/8d + cheat + description:Have 99 gems + code:7e1f0e/63 + cheat + description:Have Aura Attack + code:7e1f0b/01 + cheat + description:Have Comet Flash + code:7e1f0b/02 + cheat + description:Have Lightning Strike + code:7e1f0b/03 + cheat + description:Have Time Stop + code:7e1f0b/04 + cheat + description:Have Star Fire + code:7e1f0b/05 + cheat + description:Have Warrior Force + code:7e1f0b/06 + cheat + description:Have Heal + code:7e1f0b/07 + cheat + description:Have Fiery Phoenix + code:7e1f0b/08 + +cartridge sha256:cbca00fa5dfd6c72db2f21d010255657c33f7ac48de2554262035ead11bdf314 + name:Smart Ball (USA) + cheat + description:Infinite lives + code:009155/ad + cheat + description:Protection from most enemies (lose no hearts) + code:009ffa/ad + cheat + description:Infinite red balls on pick-up - until continue + code:008d8b/ad + cheat + description:Go to any level + code:0081d9/33+0081d7/0f + cheat + description:Super-jump + code:00a0e6/fa + cheat + description:Mega-jump + code:00a0e6/f6 + cheat + description:Start with 1 life instead of 3 + code:00820e/01 + cheat + description:Start with 5 lives + code:00820e/05 + cheat + description:Start with 10 lives + code:00820e/0a + cheat + description:Start with 25 lives + code:00820e/19 + cheat + description:Start with 50 lives + code:00820e/32 + cheat + description:Start with 99 lives + code:00820e/63 + +cartridge sha256:6fe7c8d39fcfab7f0a18e837a7ee0dd162e0557d6989c6e0d10c81616d3a0b8b + name:Soldiers of Fortune (USA) + cheat + description:Infinite lives + code:c0a76a/a9 + cheat + description:Smaller food power-ups heal twice as much + code:c0f24f/0a + cheat + description:Smaller food power-ups heal four times as much + code:c0f24f/14 + cheat + description:Large food power-ups heal twice as much + code:c0f254/1e + cheat + description:Large food power-ups heal four times as much + code:c0f254/3c + cheat + description:Only 3 special powers can be stored instead of 6 (handicap) + code:c0f290/04 + cheat + description:Special power power-ups are worth 6 (always fill meter) + code:c0f291/80 + cheat + description:Special powers aren't used up + code:c0a28d/ea + cheat + description:Mercenary starts with much more health + code:cd2df8/60 + cheat + description:Brigand starts with much more health + code:cd2e2f/60 + cheat + description:Gentleman starts with much more health + code:cd2e66/60 + cheat + description:Navvie starts with much more health + code:cd2e9d/60 + cheat + description:Thug starts with much more health + code:cd2ed4/60 + cheat + description:Scientist starts with much more health + code:cd2f0b/60 + cheat + description:Extra lives cost 244 instead of 500 + code:cd1181/00 + cheat + description:Skill power-ups cost 44 instead of 300 + code:cd1183/00 + cheat + description:Health power-ups cost 1 instead of 75 + code:cd1184/01 + cheat + description:Health power-ups cost 25 instead of 75 + code:cd1184/19 + cheat + description:Speed power-ups cost 1 instead of 250 + code:cd1186/01 + cheat + description:Speed power-ups cost 100 instead of 250 + code:cd1186/64 + cheat + description:Wisdom power-ups cost 1 instead of 80 + code:cd1188/01 + cheat + description:Wisdom power-ups cost 25 instead of 80 + code:cd1188/19 + cheat + description:Special powers cost 1 instead of 150 + code:cd118a/01 + cheat + description:Special powers cost 50 instead of 150 + code:cd118a/32 + cheat + description:Weapon power-ups cost 1 instead of 250 + code:cd118e/01 + cheat + description:Weapon power-ups cost 100 instead of 250 + code:cd118e/64 + cheat + description:??? (New Special powers costs 44 instead of 300) + code:cd118d/00 + cheat + description:Brigand starts with Bomb special power + code:cd2f40/01 + cheat + description:Mercenary starts with Bomb special power + code:cd2f44/01 + cheat + description:Gentleman starts with Bomb special power + code:cd2f48/01 + cheat + description:Navvie starts with Bomb special power + code:cd2f4c/01 + cheat + description:Thug starts with Bomb special power + code:cd2f50/01 + cheat + description:Scientist starts with Bomb special power + code:cd2f54/01 + cheat + description:Brigand starts with Shot Burst special power + code:cd2f40/02 + cheat + description:Mercenary starts with Shot Burst special power + code:cd2f44/02 + cheat + description:Gentleman starts with Shot Burst special power + code:cd2f48/02 + cheat + description:Navvie starts with Shot Burst special power + code:cd2f4c/02 + cheat + description:Thug starts with Shot Burst special power + code:cd2f50/02 + cheat + description:Scientist starts with Shot Burst special power + code:cd2f54/02 + cheat + description:Brigand starts with Map special power (must still destroy nodes special power) + code:cd2f40/03 + cheat + description:Mercenary starts with Map special power (must still destroy nodes special power) + code:cd2f44/03 + cheat + description:Gentleman starts with Map special power (must still destroy nodes special power) + code:cd2f48/03 + cheat + description:Navvie starts with Map special power (must still destroy nodes special power) + code:cd2f4c/03 + cheat + description:Thug starts with Map special power (must still destroy nodes special power) + code:cd2f50/03 + cheat + description:Scientist starts with Map special power (must still destroy nodes special power) + code:cd2f54/03 + cheat + description:Brigand starts with Destroy Nodes special power + code:cd2f40/04 + cheat + description:Mercenary starts with Destroy Nodes special power + code:cd2f44/04 + cheat + description:Gentleman starts with Destroy Nodes special power + code:cd2f48/04 + cheat + description:Navvie starts with Destroy Nodes special power + code:cd2f4c/04 + cheat + description:Thug starts with Destroy Nodes special power + code:cd2f50/04 + cheat + description:Scientist starts with Destroy Nodes special power + code:cd2f54/04 + cheat + description:Brigand starts with Repel Monster special power + code:cd2f40/05 + cheat + description:Mercenary starts with Repel Monster special power + code:cd2f44/05 + cheat + description:Gentleman starts with Repel Monster special power + code:cd2f48/05 + cheat + description:Navvie starts with Repel Monster special power + code:cd2f4c/05 + cheat + description:Thug starts with Repel Monster special power + code:cd2f50/05 + cheat + description:Scientist starts with Repel Monster special power + code:cd2f54/05 + cheat + description:Brigand starts with First Aid special power + code:cd2f40/06 + cheat + description:Mercenary starts with First Aid special power + code:cd2f44/06 + cheat + description:Gentleman starts with First Aid special power + code:cd2f48/06 + cheat + description:Navvie starts with First Aid special power + code:cd2f4c/06 + cheat + description:Thug starts with First Aid special power + code:cd2f50/06 + cheat + description:Scientist starts with First Aid special power + code:cd2f54/06 + cheat + description:Brigand starts with Freeze Monster special power + code:cd2f40/07 + cheat + description:Mercenary starts with Freeze Monster special power + code:cd2f44/07 + cheat + description:Gentleman starts with Freeze Monster special power + code:cd2f48/07 + cheat + description:Navvie starts with Freeze Monster special power + code:cd2f4c/07 + cheat + description:Thug starts with Freeze Monster special power + code:cd2f50/07 + cheat + description:Scientist starts with Freeze Monster special power + code:cd2f54/07 + cheat + description:Brigand starts with Shield special power + code:cd2f40/08 + cheat + description:Mercenary starts with Shield special power + code:cd2f44/08 + cheat + description:Gentleman starts with Shield special power + code:cd2f48/08 + cheat + description:Navvie starts with Shield special power + code:cd2f4c/08 + cheat + description:Thug starts with Shield special power + code:cd2f50/08 + cheat + description:Scientists starts with Shield special power + code:cd2f54/08 + cheat + description:Brigand starts with Party Power special power + code:cd2f40/09 + cheat + description:Mercenary starts with Party Power special power + code:cd2f44/09 + cheat + description:Gentleman starts with Party Power special power + code:cd2f48/09 + cheat + description:Navvie starts with Party Power special power + code:cd2f4c/09 + cheat + description:Thug starts with Party Power special power + code:cd2f50/09 + cheat + description:Scientist starts with Party Power special power + code:cd2f54/09 + cheat + description:Brigand starts with Air Burst special power + code:cd2f40/0a + cheat + description:Mercenary starts with Air Burst special power + code:cd2f44/0a + cheat + description:Gentleman starts with Air Burst special power + code:cd2f48/0a + cheat + description:Navvie starts with Air Burst special power + code:cd2f4c/0a + cheat + description:Thug starts with Air Burst special power + code:cd2f50/0a + cheat + description:Scientist starts with Air Burst special power + code:cd2f54/0a + cheat + description:Brigand starts with Distract Monster special power + code:cd2f40/0b + cheat + description:Mercenary starts with Distract Monster special power + code:cd2f44/0b + cheat + description:Gentleman starts with Distract Monster special power + code:cd2f48/0b + cheat + description:Navvie starts with Distract Monster special power + code:cd2f4c/0b + cheat + description:Thug starts with Distract Monster special power + code:cd2f50/0b + cheat + description:Scientist starts with Distract Monster special power + code:cd2f54/0b + cheat + description:Brigand starts with Molotov special power + code:cd2f40/0c + cheat + description:Mercenary starts with Molotov special power + code:cd2f44/0c + cheat + description:Gentleman starts with Molotov special power + code:cd2f48/0c + cheat + description:Navvie starts with Molotov special power + code:cd2f4c/0c + cheat + description:Thug starts with Molotov special power + code:cd2f50/0c + cheat + description:Scientist starts with Molotov special power + code:cd2f54/0c + cheat + description:Brigand starts with Ground Mine special power + code:cd2f40/0d + cheat + description:Mercenary starts with Ground Mine special power + code:cd2f44/0d + cheat + description:Gentleman starts with Ground Mine special power + code:cd2f48/0d + cheat + description:Navvie starts with Ground Mine special power + code:cd2f4c/0d + cheat + description:Thug starts with Ground Mine special power + code:cd2f50/0d + cheat + description:Scientist starts with Ground Mine special power + code:cd2f54/0d + cheat + description:Brigand starts with Dynamite special power + code:cd2f40/0e + cheat + description:Mercenary starts with Dynamite special power + code:cd2f44/0e + cheat + description:Gentleman starts with Dynamite special power + code:cd2f48/0e + cheat + description:Navvie starts with Dynamite special power + code:cd2f4c/0e + cheat + description:Thug starts with Dynamite special power + code:cd2f50/0e + cheat + description:Scientist starts with Dynamite special power + code:cd2f54/0e + cheat + description:Brigand gets Party Power as a 4th special power + code:cd2f43/09 + cheat + description:Mercenary gets Party Power as a 4th special power + code:cd2f47/09 + cheat + description:Navvie gets Party Power as a 3rd special power + code:cd2f4e/09 + cheat + description:Thug gets Party Power as a 3rd special power + code:cd2f52/09 + cheat + description:Infinite health - P1 + code:7e40f0/64 + cheat + description:Infinite health - P2 or computer partner + code:7e4165/64 + cheat + description:Infinite lives - P1 + code:7e0090/04 + cheat + description:Infinite lives - P2 or computer partner + code:7e0092/04 + cheat + description:Infinite special attacks - P1 + code:7e40ff/06 + cheat + description:Infinite special attacks - P2 or computer partner + code:7e4174/06 + +cartridge sha256:75a7b5b8ad0329dc828d3201089e125fd55fdfc99d4cec704ffcd7e3036c2410 + name:Sonic Blast Man (USA) + cheat + description:Invincibility + code:00addf/d0 + cheat + description:Infinite health + code:00c15b/ad + cheat + description:Infinite health against most enemy hits + code:00c15b/ad + cheat + description:Infinite health against hits on the head when you're being held + code:00a1e3/ad + cheat + description:Infinite special + code:00a9ea/ad + cheat + description:Infinite Dynamite Punches + code:00a9ea/ad + cheat + description:Infinite lives + code:01c276/00 + cheat + description:Infinite lives (alt) + code:01c278/ad + cheat + description:Infinite credits + code:00cbab/ad + cheat + description:Hit anywhere + code:00c18f/23+00c18e/80 + cheat + description:Super glove worth nothing + code:00c556/ad + cheat + description:Hamburger worth nothing + code:00c52d/00 + cheat + description:Hamburger fully restores health + code:00c52d/50 + cheat + description:Apple worth nothing + code:00c519/00 + cheat + description:Apple fully restores health + code:00c519/50 + cheat + description:Continue with 3/4 health + code:009f79/3c + cheat + description:Continue with 1/2 health + code:009f79/28 + cheat + description:Continue with 1/4 health + code:009f79/14 + cheat + description:Start with 11 lives + code:00809a/03 + cheat + description:Start with 0 dynamite punches + code:00c700/00 + cheat + description:Start with 5 dynamite punches + code:00c700/05 + cheat + description:Start with 7 dynamite punches + code:00c700/07 + cheat + description:Start with 9 dynamite punches + code:00c700/09 + cheat + description:Start with 3/4 health + code:009d50/3c + cheat + description:Start with 1/2 health + code:009d50/28 + cheat + description:Start with 1/4 health + code:009d50/14 + cheat + description:Start on stage 2 + code:0095a5/ee + cheat + description:Start on stage 3 + code:0095a2/a9+0095a4/ea+0095a5/8d+0095a3/02 + cheat + description:Start on stage 4 + code:0095a2/a9+0095a4/ea+0095a5/8d+0095a3/03 + cheat + description:Start on stage 5 + code:0095a2/a9+0095a4/ea+0095a5/8d+0095a3/04 + +cartridge sha256:efe78f6fc68ddd0f6ef0ad9e0223d9417c14fcadece987dc8f50423fd6723b27 + name:Sonic Blast Man II (USA) + cheat + description:Invincibility + code:c04986/ad + cheat + description:Infinite health + code:c04f97/ad + cheat + description:Infinite lives + code:c05476/ad + cheat + description:Infinite health - P1 + code:7e0da5/ff + cheat + description:Infinite health - P2 + code:7e1da7/ff + cheat + description:Infinite Specials - P1 + code:7e0dad/63 + cheat + description:Infinite Specials - P2 + code:7e1daf/63 + cheat + description:Infinite lives - P1 + code:7e0da9/32 + cheat + description:Infinite lives - P2 + code:7e0dab/32 + cheat + description:One hit kills on most enemies and bosses + code:7e1377/00+7e1393/00+7e1395/00+7e1391/00+7e138f/00 + cheat + description:Play as Sonic Blast Man - P1 + code:7e0d8d/00 + cheat + description:Play as Sonic Blast Man - P2 + code:7e0d8f/00 + cheat + description:Play as Sonia - P1 + code:7e0d8d/01 + cheat + description:Play as Sonia - P2 + code:7e0d8f/01 + cheat + description:Play as Captain Choyear - P1 + code:7e0d8d/02 + cheat + description:Play as Captain Choyear - P2 + code:7e0d8f/02 + +cartridge sha256:8438da09de8ce9aded3bb08644543f7b60fb60cffc68ce2d67d6a0643f2ecfc2 + name:Soul Blazer (USA) + cheat + description:Invincibility + code:008ef3/ad+00dde1/ad + cheat + description:Have all spirits after obtaining the first one + code:03a7ec/1f + cheat + description:Get max level + code:04f699/00 + cheat + description:Gems set to 999,999 every time one is obtained + code:04f6ba/00 + cheat + description:10 EXP required instead of 100 for level 2 + code:01fbbe/10+01fbbf/00 + cheat + description:180 EXP required instead of 280 for level 3 + code:01fbc3/01 + cheat + description:380 EXP required instead of 580 for level 4 + code:01fbc7/03 + cheat + description:600 EXP required instead of 1,000 for level 5 + code:01fbcb/06 + cheat + description:1,200 EXP required instead of 2,000 for level 6 + code:01fbcf/12 + cheat + description:2,400 EXP required instead of 3,200 for level 7 + code:01fbd3/24 + cheat + description:3,500 EXP required instead of 4,500 for level 8 + code:01fbd7/35 + cheat + description:4,800 EXP required instead of 5,800 for level 9 + code:01fbdb/48 + cheat + description:6,600 EXP required instead of 7,600 for level 10 + code:01fbdf/66 + cheat + description:8,600 EXP required instead of 9,600 for level 11 + code:01fbe3/86 + cheat + description:10,000 EXP required instead of 12,400 for level 12 + code:01fbe7/00 + cheat + description:13,000 EXP required instead of 15,000 for level 13 + code:01fbeb/30 + cheat + description:15,000 EXP required instead of 19,000 for level 14 + code:01fbef/50 + cheat + description:Start with 4 HP + code:04f986/04 + cheat + description:Start with 15 HP + code:04f986/0f + cheat + description:Start with 25 HP + code:04f986/19 + cheat + description:Start with 50 HP + code:04f986/32 + cheat + description:Start with 75 HP + code:04f986/4b + cheat + description:Start with 100 HP + code:04f986/64 + cheat + description:Start with 127 HP + code:04f986/7f + cheat + description:Infinite and max HP + code:7e1b88/64+7e1b8a/64 + cheat + description:Level up more quickly + code:7e1b78/ff + +cartridge sha256:24f3f22949f36ebf8ab4beaa8cba22db107efe7a7585f749343f2860bf041fe1 + name:Space Football - One on One (USA) + cheat + description:Infinite energy + code:00945f/ad + cheat + description:Instant acceleration + code:00df8c/69 + cheat + description:No pushback on firing + code:00a45a/ad + cheat + description:Push forward on firing + code:00a457/69 + +cartridge sha256:dc5353ddc350816619230f25f8c51bddabf7438e6dfba21662eb1c4794856735 + name:Space Invaders (USA) + cheat + description:Infinite lives + code:81871f/a9 + cheat + description:Enemies never move + code:7e03d5/00 + cheat + description:Infinite credits + code:7e03bf/02 + +cartridge sha256:f5b7418c00ccac44615cfc57c7e17d57533837056886f6d733e6b714c36dec1f + name:Space Megaforce (USA) + cheat + description:Invincibility + code:0280be/d0 + cheat + description:Infinite special lives (always respawn after dying as long as you have regular lives remaining) + code:0084a6/ad + cheat + description:Infinite bombs + code:028777/00 + cheat + description:Infinite ships + code:02890f/00 + cheat + description:Protection against enemy hits, and weapon goes to level 2 when hit + code:0288bb/a9+0288bc/06 + cheat + description:Protection against enemy hits, and weapon goes to level 6 when hit + code:0288bb/a9+0288bc/06+0288c8/06 + cheat + description:Hit anywhere + code:01aa01/60+01aa03/d0+01aa04/2c+01aa00/ad+01aa02/0d + cheat + description:Power shots (weapon type 6) last until you pick up another weapon or get hit + code:02b7f6/bd + cheat + description:Weapon capsules give you weapon type 1 + code:02a125/a9+02a126/00 + cheat + description:Weapon capsules give you weapon type 2 + code:02a125/a9+02a126/01 + cheat + description:Weapon capsules give you weapon type 3 + code:02a125/a9+02a126/02 + cheat + description:Weapon capsules give you weapon type 4 + code:02a125/a9+02a126/03 + cheat + description:Weapon capsules give you weapon type 5 + code:02a125/a9+02a126/04 + cheat + description:Weapon capsules give you weapon type 6 + code:02a125/a9+02a126/05 + cheat + description:Bomb capsules worth 0 + code:02a0f8/00 + cheat + description:Bomb capsules worth 2 + code:02a0f8/02 + cheat + description:Bomb capsules worth 4 + code:02a0f8/04 + cheat + description:Bomb capsules worth 6 + code:02a0f8/06 + cheat + description:Start with 0 bombs instead of 3 + code:02a051/00 + cheat + description:Start with 7 bombs + code:02a051/07 + cheat + description:Start with 10 bombs + code:02a051/10 + cheat + description:Start with 25 bombs + code:02a051/25 + cheat + description:Start with 50 bombs + code:02a051/50 + cheat + description:Start with 99 bombs + code:02a051/99 + cheat + description:Start with 2 ships + code:029ffb/01 + cheat + description:Start with 8 ships + code:029ffb/07 + cheat + description:Start with 11 ships + code:029ffb/10 + cheat + description:Start with 26 ships + code:029ffb/25 + cheat + description:Start with 51 ships + code:029ffb/50 + cheat + description:Start with 76 ships + code:029ffb/75 + cheat + description:Start with 100 ships + code:029ffb/99 + cheat + description:Start in area 2 + code:0081c1/a9+0081c2/02 + cheat + description:Start in area 3 + code:0081c1/a9+0081c2/03 + cheat + description:Start in area 4 + code:0081c1/a9+0081c2/04 + cheat + description:Start in area 5 + code:0081c1/a9+0081c2/05 + cheat + description:Start in area 6 + code:0081c1/a9+0081c2/06 + cheat + description:Start in area 7 + code:0081c1/a9+0081c2/07 + cheat + description:Start in area 8 + code:0081c1/a9+0081c2/08 + cheat + description:Start in area 9 + code:0081c1/a9+0081c2/09 + cheat + description:Start in area 10 + code:0081c1/a9+0081c2/0a + cheat + description:Start in area 11 + code:0081c1/a9+0081c2/0b + cheat + description:Start in area 12 + code:0081c1/a9+0081c2/0c + cheat + description:Enable debug mode + code:80fff0/ff + +cartridge sha256:14dc44687c8da35aec63b9edadbaac21bf7293f5171646f614139192e82ab071 + name:Spanky's Quest (USA) + cheat + description:Infinite lives + code:02cca5/24 + cheat + description:Start with 1 life + code:00e367/00 + cheat + description:Start with 6 lives + code:00e367/05 + cheat + description:Start with 10 lives + code:00e367/09 + cheat + description:Start with 1 key in all areas after 1-1 + code:00e514/a9+00e515/01 + cheat + description:Start on area 2-1 + code:00e37f/a9+00e380/01 + cheat + description:Start on area 3-1 + code:00e37f/a9+00e380/02 + cheat + description:Start on area 4-1 + code:00e37f/a9+00e380/03 + cheat + description:Start on area 5-1 + code:00e37f/a9+00e380/04 + +cartridge sha256:eaa06470734ea57eff9b888137aa468fcb7bb149a0870a85e68c9db123de4670 + name:Sparkster (USA) + cheat + description:Invincibility + code:82d234/00 + cheat + description:Invincibility (blinking) + code:82d233/a9+82d234/04 + cheat + description:Infinite health + code:82edff/ea+82d1f8/ea + cheat + description:Infinite health (alt) + code:7e0691/0e + cheat + description:Infinite lives (alt) + code:7e0168/09 + cheat + description:Hit anywhere + code:80e34a/80+8482cd/a5+80e325/00 + cheat + description:1 Jewel needed for 1-up + code:7e016a/63 + +cartridge sha256:fe2371bed45f5e244ce3ef8585894c0ffa4272e3f58c2f4795ef91fb1ee54b15 + name:Spectre (USA) + cheat + description:Infinite ammo + code:00a0b8/ad + cheat + description:Infinite lives + code:00b019/f4 + cheat + description:Infinite health + code:00ae6d/f4 + cheat + description:Infinite hyperspace + code:00a440/ad + cheat + description:Freeze bonus timer + code:00ebd3/ad + cheat + description:Infinite custom shield + code:7e1b42/0a + cheat + description:Infinite custom speed + code:7e1b44/0a + cheat + description:Infinite custom ammo + code:7e1b46/0a + +cartridge sha256:68a51b7a06b6a9e7100a89521e52b5c467c46c828c0f6504bee677beac2aa6fd + name:Speedy Gonzales - Los Gatos Bandidos (USA) (Rev 1) + cheat + description:Infinite health + code:809227/ad + cheat + description:Infinite time + code:80c25e/ea + cheat + description:Infinite continues + code:81888b/ad + cheat + description:Start with 99 lives + code:8080a8/63 + cheat + description:Invincibility after first hit + code:7e099e/ff + cheat + description:Infinite health (alt) + code:7e08cc/05 + cheat + description:Infinite lives + code:7e0935/03 + cheat + description:Infinite time + code:7e0934/00 + cheat + description:Have 5 hearts + code:7e08ce/05 + cheat + description:Hyper Speedy Gonzalez + code:7e0052/00 + cheat + description:Keep Speedy Shoes until end of stage on pick-up + code:7e08b0/ff + cheat + description:Start on Sleepy Rock Part 1 + code:7e0098/00 + cheat + description:Start on Ancient Keep Part 1 + code:7e0098/02 + cheat + description:Start on Snowy Cabins Part 1 + code:7e0098/04 + cheat + description:Start on Galactical Galazies Part 1 + code:7e0098/06 + cheat + description:Start on Surely Wood Part 1 + code:7e0098/08 + cheat + description:Start on Snowy Cabins Part 2 + code:7e0098/0a + cheat + description:Start on Fiesta City Part 1 + code:7e0098/0c + cheat + description:Start on Ye Olde Bounty Part 1 + code:7e0098/0e + cheat + description:Start on Fiesta City Part 2 + code:7e0098/10 + cheat + description:Start on Ancient Keep Part 2 + code:7e0098/12 + cheat + description:Start on Ye Olde Bounty Part 2 + code:7e0098/14 + cheat + description:Start on Ye Olde Bounty Part 3 + code:7e0098/16 + cheat + description:Start on Surely Wood Part 2 + code:7e0098/18 + cheat + description:Start on Sleepy Rock Part 2 + code:7e0098/1a + cheat + description:Start on Surely Wood Part 3 + code:7e0098/1c + cheat + description:Start on Surely Wood? Cat Boss + code:7e0098/1e + cheat + description:Start on Ship Cat Boss + code:7e0098/20 + cheat + description:Start on Galactical Galazies? Cat Boss + code:7e0098/22 + cheat + description:Start on Galactical Galazies Part 2 + code:7e0098/24 + cheat + description:Start on Ye Olde Bounty Part 5 + code:7e0098/26 + +cartridge sha256:df02d0f4f40e2732138309d38e91b48aef482490979007ecb63359a35115dfd4 + name:Speedy Gonzales - Los Gatos Bandidos (USA) + cheat + description:Invincibility after first hit + code:7e099e/ff + cheat + description:Infinite health + code:7e08cc/05 + cheat + description:Infinite lives + code:7e0935/03 + cheat + description:Infinite time + code:7e0934/00 + cheat + description:Have 5 hearts + code:7e08ce/05 + cheat + description:Hyper Speedy Gonzalez + code:7e0052/00 + cheat + description:Keep Speedy Shoes until end of stage on pick-up + code:7e08b0/ff + cheat + description:Start on Sleepy Rock Part 1 + code:7e0098/00 + cheat + description:Start on Ancient Keep Part 1 + code:7e0098/02 + cheat + description:Start on Snowy Cabins Part 1 + code:7e0098/04 + cheat + description:Start on Galactical Galazies Part 1 + code:7e0098/06 + cheat + description:Start on Surely Wood Part 1 + code:7e0098/08 + cheat + description:Start on Snowy Cabins Part 2 + code:7e0098/0a + cheat + description:Start on Fiesta City Part 1 + code:7e0098/0c + cheat + description:Start on Ye Olde Bounty Part 1 + code:7e0098/0e + cheat + description:Start on Fiesta City Part 2 + code:7e0098/10 + cheat + description:Start on Ancient Keep Part 2 + code:7e0098/12 + cheat + description:Start on Ye Olde Bounty Part 2 + code:7e0098/14 + cheat + description:Start on Ye Olde Bounty Part 3 + code:7e0098/16 + cheat + description:Start on Surely Wood Part 2 + code:7e0098/18 + cheat + description:Start on Sleepy Rock Part 2 + code:7e0098/1a + cheat + description:Start on Surely Wood Part 3 + code:7e0098/1c + cheat + description:Start on Surely Wood? Cat Boss + code:7e0098/1e + cheat + description:Start on Ship Cat Boss + code:7e0098/20 + cheat + description:Start on Galactical Galazies? Cat Boss + code:7e0098/22 + cheat + description:Start on Galactical Galazies Part 2 + code:7e0098/24 + cheat + description:Start on Ye Olde Bounty Part 5 + code:7e0098/26 + +cartridge sha256:2701e94631ae1c43ca0ccef2b50bc0341a4111b31b885fa372ab5b4a49b06942 + name:SpellCraft - Aspects of Valor (USA) (Proto) + cheat + description:Infinite health + code:7e018d/99 + cheat + description:Quick enemy death + code:7e0193/00 + cheat + description:Fast level up + code:7e00fd/ff + cheat + description:Infinite Stones + code:7e0296/09 + cheat + description:Infinite Jewels + code:7e0298/09 + cheat + description:Infinite Candles + code:7e029a/09 + cheat + description:Infinite Powders + code:7e029c/09 + +cartridge sha256:f05d777e3de69aab18d336cac0af07f794f8d00090d085f86cebaed3679cabad + name:Spider-Man (USA) + cheat + description:Stay invincible after death + code:80a21d/ad + cheat + description:Infinite health + code:829f90/a5 + cheat + description:Infinite lives + code:829f6a/ad + cheat + description:Infinite webbing + code:80a5c6/ae+80acab/ad+80a5a7/ae+80ac1d/ad + cheat + description:Gain webbing instead of losing it + code:80a5c6/ee+80acab/ee+80a5a7/ee+80ac1d/ee + cheat + description:Hit anywhere + code:80ec57/80+80ec0e/80+80ec4f/00+80ec46/00 + cheat + description:Increase diagnol webbing with R button + code:80a5c6/ee + cheat + description:Increase straight webbing with X button + code:80acab/ee + +cartridge sha256:964d21996e385e032b5d18baf716692ba1db780245cd71956c212045c1b8eb9a + name:Spider-Man-Venom - Maximum Carnage (USA) + cheat + description:Invincibility + code:818224/ad + cheat + description:Infinite health + code:81c965/ad + cheat + description:Infinite lives + code:819992/ad + cheat + description:Infinite hero icons on pick-up + code:82d44f/bd + cheat + description:Jump higher + code:81bb46/30 + cheat + description:Hit anywhere + code:8183d3/00 + cheat + description:One hit kills + code:81c08e/80 + cheat + description:Get health pick-up from anywhere + code:82cdee/80+82cdef/33 + cheat + description:Super punch + code:85cd8c/09 + cheat + description:Power hit lasts longer + code:8184c5/04 + cheat + description:Start with 2x health + code:81a2aa/60 + cheat + description:Start with 3x health + code:81a2aa/90 + cheat + description:Start with 1 life + code:81a2b0/01 + cheat + description:Start with 6 lives + code:81a2b0/06 + cheat + description:Start with 9 lives + code:81a2b0/09 + cheat + description:Start with 9 continues + code:81a2b6/09 + cheat + description:Start with 6 continues + code:81a2b6/06 + cheat + description:Infinite health (alt) + code:7e0b7c/2c + cheat + description:Infinite lives (alt) + code:7e0990/05 + cheat + description:Infinite accuracy + code:7e1cca/58 + cheat + description:Have 7 Black Cats with infinite usage + code:7e0b18/07 + cheat + description:Have 7 Cloaks with infinite usage + code:7e0b1a/07 + cheat + description:Have 7 Dagger with infinite usage + code:7e0b1c/07 + cheat + description:Have 7 Morbius with infinite usage + code:7e0b1e/07 + cheat + description:Have 7 Firestar with infinite usage + code:7e0b20/07 + cheat + description:Have 7 Captain Americas with infinite usage + code:7e0b22/07 + cheat + description:Have 7 Iron Fist with infinite usage + code:7e0b24/07 + cheat + description:Have 7 Deathlok with infinite usage + code:7e0b26/07 + cheat + description:Have 7 Venom With Sonic Gun with infinite usage + code:7e0b28/07 + +cartridge sha256:63210a91573fa8e19592f2e6c746a400831d804c00453739447d2df32e731df7 + name:Spider-Man - X-Men - Arcade's Revenge (USA) + cheat + description:Invincibility after first hit (blinking) - Spider-Man + code:188b60/ad + cheat + description:Infinite health against most hits - Spider-Man + code:18aa98/00 + cheat + description:Protects Spider-Man from ground hazard (looks like silver weeds) + code:18afa5/ad + cheat + description:Infinite lives - Spider-Man + code:18808d/ad + cheat + description:Infinite lives - Gambit + code:138105/ad + cheat + description:Infinite lives - Wolverine, Cyclops, Storm + code:00acde/ad + cheat + description:Spider-Man jumps higher (if you jump too high in some places you die) + code:188d57/a9+188d58/f8 + cheat + description:Start with 1 life instead of 3 + code:0082ba/00 + cheat + description:Start with 5 lives + code:0082ba/04 + cheat + description:Start with 7 lives + code:0082ba/06 + cheat + description:Start with 10 lives + code:0082ba/09 + cheat + description:Start with 26 lives + code:0082ba/19 + cheat + description:Start with 51 lives + code:0082ba/32 + cheat + description:Start with 100 lives + code:0082ba/63 + cheat + description:Invincibility - Spider-Man + code:7e10f6/ff + cheat + description:Infinite health - Spider-Man + code:7e10f8/ff + cheat + description:Infinite health - Wolverine, Cyclops, Storm + code:7e0b29/64 + cheat + description:Infinite health - Gambit + code:7e119e/96 + cheat + description:Infinite lives - Everyone + code:7e0100/09 + cheat + description:Infinite multibolt - Storm + code:7e14f2/01 + cheat + description:99 stars - Gambit + code:7e11aa/63 + cheat + description:Infinite cards - Gambit + code:7e11a0/32 + cheat + description:Infinite joker wild cards - Gambit + code:7e11a2/09 + cheat + description:Stop giant spiked wheel in first stage - Gambit + code:7e11f9/ff + +cartridge sha256:fe10238ae42ed9eb4d906a81dd50ebe585140982cdfe266308ce1f16e78e6903 + name:Spindizzy Worlds (USA) + cheat + description:Faster G.E.R.A.L.D. + code:008214/02 + cheat + description:Slower timer + code:009608/04 + cheat + description:More fuel lost from falling off landscape + code:008ca4/20 + cheat + description:Less fuel lost from falling off landscape + code:008ca4/05 + cheat + description:Almost zero fuel lost from falling off landscape + code:008ca4/00 + cheat + description:Don't lose fuel from anything + code:00f8a3/2c + +cartridge sha256:e0196201e432fa33d46a2681f84fe6a0b5f952ba43f8e4dc325f892bb4a0b39b + name:Spirou (Europe) (En,Fr,De,Es) + cheat + description:Infinite lives + code:7e064c/03 + +cartridge sha256:3857b5294ea8f7468849437bb2d8271564e8a0ff30774622e9c872bcbd53a84d + name:Star Fox (USA) + cheat + description:Invincible right wing + code:7e0402/05 + cheat + description:Invincible left wing + code:7e03cc/05 + cheat + description:Infinite Shield + code:7e0396/35 + cheat + description:Infinite Shield (alt) + code:7e0396/28 + cheat + description:Infinite Shield (alt 2) + code:7e0396/35 + cheat + description:Infinite Shield - Slippy + code:7e18a2/40 + cheat + description:Infinite Shield - Falco + code:7e18a1/40 + cheat + description:Infinite Shield - Peppy + code:7e18a0/40 + cheat + description:Infinite Nova Bombs out + code:7e1528/01 + cheat + description:Infinite Bombs + code:7e15af/05 + cheat + description:Infinite Bombs (alt) + code:7e15af/05 + cheat + description:Infinite lives + code:7e16ee/09 + cheat + description:Infinite lives (alt) + code:7e16ee/0a + cheat + description:All views available in all stages + code:7e14de/05 + cheat + description:Have Double Blaster + code:7e14da/12+7e14d9/01 + cheat + description:Have Double Blaster (alt) + code:7e14da/12 + cheat + description:Have Double Blaster B and infinite Shield + code:7e14d9/03 + +cartridge sha256:2c0bac12a7866fad1cb306da768a201c12f2520332df1ef51cba1576db21ff06 + name:Star Fox - Super Weekend (USA) + cheat + description:Infinite Shield + code:7e0396/28 + cheat + description:Infinite Bombs + code:7e15af/04 + cheat + description:Infinite time (minutes) + code:7ef0da/09 + cheat + description:Infinite time (seconds tens) + code:7ef0dc/09 + cheat + description:Infinite time (seconds ones) + code:7ef0db/09 + cheat + description:Have Double Blaster + code:7e14d9/01 + +cartridge sha256:82e39dfbb3e4fe5c28044e80878392070c618b298dd5a267e5ea53c8f72cc548 + name:Star Fox (USA) (Rev 2) + cheat + description:Infinite Shield + code:7e0396/35 + cheat + description:Infinite Shield (alt) + code:7e0396/28 + cheat + description:Infinite Shield - Slippy + code:7e18a2/40 + cheat + description:Infinite Shield - Falco + code:7e18a1/40 + cheat + description:Infinite Shield - Peppy + code:7e18a0/40 + cheat + description:Infinite Shield (alt 2) + code:7e0396/35 + +cartridge sha256:efae37be832d0ea1490784d57bef00761a8bf0b5bcef9c23f558e063441c3876 + name:Star Ocean (Japan) + cheat + description:No random battles + code:c27006/80 + cheat + description:Fight one battle for max level / EXP + code:c16ff8/00 + cheat + description:Fight one battle for max Fol + code:c16f1a/00 + cheat + description:View status screen for max strength, constitution, agility and stamina (These affect the base stat, making it savable. Stamina won't appear updated until you turn the codes off and re-enter that character's status screen) + code:c825ba/00+c820ec/5b+c82137/61+c821e2/6d+c821c7/da + cheat + description:Infinite items when using item creation skills + code:cad2ee/bf + +cartridge sha256:3a16ad45ae3d89b13c9e53e21c2a4c725ff7cec7fbe7896d538d163f92cb4aac + name:Star Trek - Deep Space Nine - Crossroads of Time (USA) + cheat + description:Invincibility + code:19edf5/ea+19edf6/ea + cheat + description:Invincibility after first hit + code:19edf7/ad + cheat + description:Infinite energy + code:19eeac/ad + cheat + description:Sisko looks like O'brien + code:009512/04 + cheat + description:Start with 1/4 energy + code:009915/10+00951e/10 + cheat + description:Start with 1/2 energy + code:009915/1d+00951e/1d + cheat + description:Start with 3/4 energy + code:009915/27+00951e/27 + +cartridge sha256:22c907b56ac6f414365801ed375c3fbf75696ce7f34ec89e1724628dc5622957 + name:Star Trek - The Next Generation - Future's Past (USA) + cheat + description:Away Team - Medical packs aren't used up + code:82b46c/00+82b4b0/00 + cheat + description:Away Team - Start each away mission with 1 medical pack + code:80ddc0/01 + cheat + description:Away Team - Start each away mission with 2 medical packs + code:80ddc0/02 + cheat + description:Away Team - Start each away mission with 4 medical packs (only 3 shown) + code:80ddc0/04 + cheat + description:Away Team - Start each away mission with 5 medical packs (only 3 shown) + code:80ddc0/05 + cheat + description:Away Team - Phaser power doesn't go down + code:82c81a/00 + cheat + description:Away Team - Start away missions with phasers at 1/2 power + code:80ddca/18 + cheat + description:Away Team - Start away missions with phasers at 3/4 power + code:80ddca/24 + cheat + description:Away Team - Start away missions with phasers at 1/4 power + code:80ddca/0c + cheat + description:Away Team - Medical packs heal more + code:82b487/80 + cheat + description:Away Team - Medical packs heal twice as much + code:82b488/02 + cheat + description:Away Team - Medical packs heal completely + code:82b488/03 + cheat + description:Away Team - Crew members are immune to enemy fire + code:82c024/bf + cheat + description:Space Combat - Forward torpedoes reload much faster + code:849dd0/01 + cheat + description:Space Combat - Forward torpedoes reload faster + code:849dd0/02 + cheat + description:Space Combat - Aft torpedoes reload much faster + code:849db4/01 + cheat + description:Space Combat - Aft torpedoes reload faster + code:849db4/02 + cheat + description:Space Combat - Forward torpedoes don't require recharging + code:8483a4/ad + cheat + description:Space Combat - Aft torpedoes don't require recharging + code:84833b/ad + cheat + description:Space Combat - Enemy shields regenerate at half speed + code:849d27/08 + cheat + description:Space Combat - Enemy shields regenerate at 1/4 speed + code:849d27/04 + cheat + description:Space Combat - Enemy shields don't regenerate + code:849d27/00 + cheat + description:Space Combat - Enemy shields regenerate faster + code:849d27/18 + cheat + description:Space Combat - Forward phasers never lose power + code:8485c8/ea + cheat + description:Space Combat - Forward phasers don't recharge + code:849ce2/ad + cheat + description:Space Combat - Aft phasers never lose power + code:84855e/ea + cheat + description:Space Combat - Aft phasers don't recharge + code:849cf8/ad + cheat + description:Space Combat - Torpedoes do half damage + code:848923/03 + cheat + description:Space Combat - Torpedoes do less damage + code:848923/04 + cheat + description:Space Combat - Torpedoes do slightly more damage + code:848923/07 + cheat + description:Space Combat - Torpedoes do more damage + code:848923/08 + cheat + description:Space Combat - Torpedoes do much more damage + code:848923/09 + cheat + description:Space Combat - Torpedoes do double damage + code:848923/0c + +cartridge sha256:91f938b4989215b1cd39635797f23b59b9d7b6d36e583f9eb69d022abe537bfc + name:Steel Talons (USA) + cheat + description:Infinite Rockets + code:7e025c/09 + cheat + description:Infinite fuel and no damage + code:7e0262/50 + cheat + description:Always finish mission in 10 seconds + code:7e0258/0a + +cartridge sha256:dad9c116283322d5a13fd659874c681582abdff3df182cc4c90511d33fb7110a + name:Stone Protectors (USA) + cheat + description:Invincibility (blinking) + code:009d85/a9+009d86/05+009d87/9d+00d8de/24 + cheat + description:Don't lose health from special moves + code:00bd62/bd + cheat + description:Infinite lives - P1 + code:00bc6a/ad + cheat + description:Infinite health - P1 + code:7e13cc/b2 + +cartridge sha256:910a29f834199c63c22beddc749baba746da9922196a553255deade59f4fc127 + name:Street Fighter Alpha 2 (USA) + cheat + description:Invincibility (except throws and Akuma's special moves) + code:c0a180/ea+c0a181/e0+c0a182/80+c0a183/09+c0b046/e0+c0b047/00+c0b048/07 + cheat + description:Hit anywhere (except projectiles) - P1 + code:c0a231/e0+c0a232/80+c0a234/90+c0a233/09 + +cartridge sha256:2b34161e96ef3f0f48cecd67e531a9bb94310652d8686f301bac426e4ab97e77 + name:Street Fighter II (USA) + cheat + description:Invincibility (except against throws) - P1 + code:00da3d/80+00da3e/01+00e25d/24 + cheat + description:Win 1 bout to win the match instead of 2 out of 3 (disable before fighting M. Bison) + code:00bb42/01 + cheat + description:Hit anywhere (except projectiles) - P1 + code:00df5b/e0+00df5e/b0+00df5c/00+00df5d/0e + cheat + description:Dizziness wears off very quickly + code:0195f5/f0 + cheat + description:Dizziness lasts longer (on harder levels, won't work on computer) + code:0195f3/a5 + cheat + description:Championship mode on + code:07aa89/20 + cheat + description:Advance to next level when you continue (disable before you continue on M. Bison's stage) + code:00a81e/80+00a81f/11 + cheat + description:High throw and grab damage + code:00cc22/ea+00cc24/1f + cheat + description:Minimum throw and grab damage + code:00cc22/ea+00cc24/ff + cheat + description:Die after 2 hits - both players + code:00e5f8/74 + cheat + description:Round number does not advance (can't fight to a draw) + code:00a7ac/ad + cheat + description:1 draw ends fight in VS. battle + code:00bb6d/01 + cheat + description:Most punches and kicks do no damage + code:00e5f8/b5 + cheat + description:Players move faster + code:018075/6a + cheat + description:Some special moves are faster + code:018075/05 + cheat + description:Can do special moves in the air - both players + code:018663/00 + cheat + description:Dragon punch does not go as high + code:01c076/3e + cheat + description:Dragon punch goes higher + code:01c076/dc + cheat + description:Some special moves are easier to perform (E Honda's Sumo Head Butt, Blanka's Rolling Attack, Guile's Flash Kick and Sonic Boom, Chun Li's Whirlwind Kick) + code:01b821/00 + cheat + description:No pause after throwing a Fireball + code:01c043/01+01c044/c0 + cheat + description:Players can hit each other no matter where they are + code:00df7a/80+00df7b/81 + cheat + description:Do special moves by just pressing buttons (may make Fireballs lower) + code:019bbe/0c + cheat + description:Fireballs are lower to the ground + code:079bb0/00 + cheat + description:Fireballs are higher off the ground + code:079bb0/60 + cheat + description:Fireballs, Sonic Booms and Yoga Fires always go to the right (thrown to the left, they go backwards) + code:01f8e5/00 + cheat + description:Light Fireballs, Sonic Booms and Yoga Fires are slower + code:079bbd/ff + cheat + description:Light Fireballs, Sonic Booms and Yoga Fires are faster + code:079bbd/f9 + cheat + description:Light Fireballs, Sonic Booms and Yoga Fires are super fast + code:079bbd/f0 + cheat + description:Medium Fireballs, Sonic Booms and Yoga Fires are slower + code:079bbf/ff + cheat + description:Medium Fireballs, Sonic Booms and Yoga Fires are faster + code:079bbf/f9 + cheat + description:Medium Fireballs, Sonic Booms and Yoga Fires are super fast + code:079bbf/f0 + cheat + description:Hard Fireballs, Sonic Booms and Yoga Fires are slower + code:079bc1/ff + cheat + description:Hard Fireballs, Sonic Booms and Yoga Fires are faster + code:079bc1/f9 + cheat + description:Hard Fireballs, Sonic Booms and Yoga Fires are super fast + code:079bc1/f0 + cheat + description:Light Sumo Head Butts and Rolling Attacks are slower + code:079868/00+07986e/ff + cheat + description:Light Sumo Head Butts and Rolling Attacks are faster + code:079868/09+07986e/f9 + cheat + description:Light Sumo Head Butts and Rolling Attacks are super fast + code:079868/15+07986e/f0 + cheat + description:Medium Sumo Head Butts and Rolling Attacks are slower + code:07986a/00+079870/ff + cheat + description:Medium Sumo Head Butts and Rolling Attacks are faster + code:07986a/0a+079870/f7 + cheat + description:Medium Sumo Head Butts and Rolling Attacks are super fast + code:07986a/16+079870/ee + cheat + description:Hard Sumo Head Butts and Rolling Attacks are slower + code:07986c/00+079872/ff + cheat + description:Hard Sumo Head Butts and Rolling Attacks are faster + code:07986c/0b+079872/f5 + cheat + description:Hard Sumo Head Butts and Rolling Attacks are super fast + code:07986c/17+079872/ed + cheat + description:Most special moves disabled (computer can still do them, Zangief can still do Spinning Clothesline) + code:00ce2d/80 + cheat + description:Invisible Fireballs, Sonic Booms, Yoga Fires and Yoga Flames + code:00896f/a9 + cheat + description:No Fireballs, Sonic Booms or Yoga Fires, makes Yoga Flame invisible + code:0289b2/6b + cheat + description:Always fight Ryu + code:00cb46/a9+00cb47/ff + cheat + description:Always fight Honda + code:00cb46/a9+00cb47/00 + cheat + description:Always fight Blanka + code:00cb46/a9+00cb47/01 + cheat + description:Always fight Guile + code:00cb46/a9+00cb47/02 + cheat + description:Always fight Ken + code:00cb46/a9+00cb47/03 + cheat + description:Always fight Chun-Li + code:00cb46/a9+00cb47/04 + cheat + description:Always fight Zangief + code:00cb46/a9+00cb47/05 + cheat + description:Always fight Dhalsim + code:00cb46/a9+00cb47/06 + cheat + description:Always fight Balrog + code:00cb46/a9+00cb47/09 + cheat + description:Always fight Vega + code:00cb46/a9+00cb47/0a + cheat + description:Always fight Sagat + code:00cb46/a9+00cb47/08 + cheat + description:Fight M. Bison + code:00cb45/95 + cheat + description:Always fight on bonus stage 1 + code:00cb29/00+00cb2e/80 + cheat + description:Always fight on bonus stage 2 + code:00cb35/00+00cb3b/00 + cheat + description:90 seconds per round instead of 99 + code:0782df/90 + cheat + description:80 seconds per round + code:0782df/80 + cheat + description:70 seconds per round + code:0782df/70 + cheat + description:60 seconds per round + code:0782df/60 + cheat + description:50 seconds per round + code:0782df/50 + cheat + description:40 seconds per round + code:0782df/40 + cheat + description:30 seconds per round + code:0782df/30 + cheat + description:20 seconds per round + code:0782df/20 + cheat + description:10 seconds per round + code:0782df/10 + cheat + description:99 seconds in 1st bonus round instead of 40 + code:0782e3/99 + cheat + description:90 seconds in 1st bonus round + code:0782e3/90 + cheat + description:80 seconds in 1st bonus round + code:0782e3/80 + cheat + description:70 seconds in 1st bonus round + code:0782e3/70 + cheat + description:60 seconds in 1st bonus round + code:0782e3/60 + cheat + description:50 seconds in 1st bonus round + code:0782e3/50 + cheat + description:30 seconds in 1st bonus round + code:0782e3/30 + cheat + description:20 seconds in 1st bonus round + code:0782e3/20 + cheat + description:10 seconds in 1st bonus round + code:0782e3/10 + cheat + description:Start with no health - both players + code:00cba4/00 + cheat + description:Start with no health - P1 + code:00cba6/00 + cheat + description:Start with 3/4 health (1/4 damage) - both players + code:00cba4/84 + cheat + description:Start with 1/2 health (1/2 damage) - both players + code:00cba4/58 + cheat + description:Start with 1/4 health (3/4 damage) - both players + code:00cba4/2c + +cartridge sha256:3e487f8ba48c0b5e31744e3281d6bce375089db6075c8eb3d9a929376b817381 + name:Street Fighter II Turbo (USA) + cheat + description:Invincibility (except against throws) - P1 + code:c055e8/80+c055e9/01+c05d5e/a9+c05d5f/00+c05d60/09+c05d61/24+c05d63/ea + cheat + description:Infinite time + code:c04875/00 + cheat + description:Hit anywhere (except projectiles) - P1 + code:c05abd/e0+c05ac0/b0+c05abe/00+c05abf/07 + cheat + description:Some special moves can be performed in the air (Don't perform Vega's wall leap) + code:c11062/00 + cheat + description:Most attacks do no damage (throws still work) + code:c0621b/b5 + cheat + description:Throws do no damage + code:c1ec29/a3 + cheat + description:1st throws do more damage (if you have enough health), others do less damage + code:c1ec29/14 + cheat + description:Players can walk through each other + code:c0e317/00 + cheat + description:1st hit of any kind defeats opponent + code:c061bd/00 + cheat + description:Winner of 2nd round wins the battle + code:c04523/01 + cheat + description:Enable 10 star turbo mode + code:c013a9/c0+c013aa/15 + cheat + description:No charging required for special moves (except Balrog's turn punch power) + code:c1336a/04 + cheat + description:Hard special moves become light + code:c1327a/00 + cheat + description:Hard special moves become medium + code:c13a7a/02 + cheat + description:Hard special moves become disabled + code:c3367a/08 + cheat + description:Invisible players + code:c106df/bf + cheat + description:Most special moves go nowhere + code:c1e4e3/a5 + cheat + description:Fireballs go nowhere + code:c19cbf/a5 + cheat + description:Hard Hurricane Kicks go faster and farther (to the right only) + code:80e15b/04 + cheat + description:Ryu's hard Dragon Punch doesn't go as far + code:80e143/01 + cheat + description:Ryu's hard Dragon Punch goes farther + code:80e143/08 + cheat + description:Ryu's medium Dragon Punch doesn't go as far + code:80e141/01 + cheat + description:Ryu's medium Dragon Punch goes farther + code:80e141/08 + cheat + description:Ryu's light Dragon Punch goes farther + code:80e13f/08 + cheat + description:Ryu jumps backward farther + code:80d583/07 + cheat + description:Ryu jumps forward farther + code:80d57b/f7 + cheat + description:Ken jumps backward farther + code:80d603/07 + cheat + description:Ken jumps forward farther + code:80d5fb/f7 + cheat + description:Ken's hard Dragon Punch doesn't go as far + code:80e14f/01 + cheat + description:Ken's hard Dragon Punch goes farther + code:80e14f/0e + cheat + description:Ken's medium Dragon Punch doesn't go as far + code:80e14d/01 + cheat + description:Ken's medium Dragon Punch goes farther + code:80e14d/0b + cheat + description:Ken's light Dragon Punch goes farther + code:80e14b/08 + cheat + description:Hard projectiles go faster (except tiger shots) + code:80e36f/ef + cheat + description:Hard projectiles go slower (except tiger shots) + code:80e36f/ff + cheat + description:Medium projectiles go faster (except tiger shots) + code:80e36d/ef + cheat + description:Medium projectiles go slower (except tiger shots) + code:80e36d/ff + cheat + description:Light projectiles go faster (except tiger shots) + code:80e36b/ef + cheat + description:Light projectiles go slower (except tiger shots) + code:80e36b/ff + cheat + description:Edmond Honda's hard Sumo Head Butts are faster + code:80e177/0f + cheat + description:Edmond Honda's hard Sumo Head Butts are slower + code:80e177/01 + cheat + description:Edmond Honda's medium Sumo Head Butts are faster + code:80e175/0f + cheat + description:Edmond Honda's medium Sumo Head Butts are slower + code:80e175/01 + cheat + description:Edmond Honda's light Sumo Head Butts are faster + code:80e173/0f + cheat + description:Edmond Honda's light Sumo Head Butts are slower + code:80e173/01 + cheat + description:Edmond Honda's hard Sumo Smashes are faster + code:80e180/12 + cheat + description:Edmond Honda's medium Sumo Smashes are faster + code:80e17e/12 + cheat + description:Edmond Honda's light Sumo Smashes are faster + code:80e17c/12 + cheat + description:Sagat's hard Tiger Uppercut goes farther + code:80e29d/08 + cheat + description:Sagat's medium Tiger Uppercut goes farther + code:80e29b/08 + cheat + description:Sagat's light Tiger Uppercut goes farther + code:80e299/08 + cheat + description:Sagat's high Tiger Shots are disabled (you can still do the move but no projectile comes out) + code:80e359/02 + cheat + description:Sagat's hard Tiger Knee goes farther + code:80e2b5/0b + cheat + description:Sagat's medium Tiger Knee goes farther + code:80e2ad/0b + cheat + description:Sagat's light Tiger Knee goes farther + code:80e2a5/0b + cheat + description:M. Bison's hard Psycho Crusher goes slower + code:80e259/01 + cheat + description:M. Bison's hard Psycho Crusher goes faster + code:80e259/0a + cheat + description:M. Bison's medium Psycho Crusher goes slower + code:80e257/01 + cheat + description:M. Bison's medium Psycho Crusher goes faster + code:80e257/0a + cheat + description:M. Bison's light Psycho Crusher goes slower + code:80e255/01 + cheat + description:M. Bison's light Psycho Crusher goes faster + code:80e255/0a + cheat + description:M. Bison's hard Scissor Kick goes slower (not in normal mode) + code:80e262/01 + cheat + description:M. Bison's hard Scissor Kick goes faster (not in normal mode) + code:80e262/0a + cheat + description:M. Bison's medium Scissor Kick goes slower (not in normal mode) + code:80e260/01 + cheat + description:M. Bison's medium Scissor Kick goes faster (not in normal mode) + code:80e260/0a + cheat + description:M. Bison's light Scissor Kick goes slower (not in normal mode) + code:80e25e/01 + cheat + description:M. Bison's light Scissor Kick goes faster (not in normal mode) + code:80e25e/0a + cheat + description:Balrog's first Dash Punch goes slower + code:c18850/01 + cheat + description:Balrog's first Dash Punch goes faster + code:c18850/0b + cheat + description:Balrog's first Turn Punch goes slower (and a little backward) + code:80e2d5/02 + cheat + description:Balrog's first Turn Punch goes faster + code:80e2d5/0a + cheat + description:Chun Li's hard Whirlwind Kick goes farther + code:80e1b6/0a + cheat + description:Chun Li's medium Whirlwind Kick doesn't go as far + code:80e1b4/01 + cheat + description:Chun Li's medium Whirlwind Kick goes farther + code:80e1b4/0a + cheat + description:Chun Li's light Whirlwind Kick doesn't go as far + code:80e1b2/01 + cheat + description:Chun Li's light Whirlwind Kick goes farther + code:80e1b2/0a + cheat + description:Blanka's hard Rolling Attack goes slower + code:80e198/01 + cheat + description:Blanka's hard Rolling Attack goes faster + code:80e198/0a + cheat + description:Blanka's medium Rolling Attack goes slower + code:80e196/01 + cheat + description:Blanka's medium Rolling Attack goes faster + code:80e196/0a + cheat + description:Blanka's light Rolling Attack goes slower + code:80e194/01 + cheat + description:Blanka's light Rolling Attack goes faster + code:80e194/0a + cheat + description:Blanka's hard Vertical Rolling Attack doesn't go as far + code:80e1a1/01 + cheat + description:Blanka's hard Vertical Rolling Attack goes out farther + code:80e1a1/0c + cheat + description:Blanka's medium Vertical Rolling Attack doesn't go as far + code:80e19f/01 + cheat + description:Blanka's medium Vertical Rolling Attack goes out farther + code:80e19f/0c + cheat + description:Blanka's light Vertical Rolling Attack doesn't go as far + code:80e19d/01 + cheat + description:Blanka's light Vertical Rolling Attack goes out farther + code:80e19d/0c + cheat + description:Start with 90 seconds + code:80c1ee/90 + cheat + description:Start with 70 seconds + code:80c1ee/70 + cheat + description:Start with 50 seconds + code:80c1ee/50 + cheat + description:Start with 30 seconds + code:80c1ee/30 + cheat + description:Start with 10 seconds + code:80c1ee/10 + cheat + description:Start with 3/4 health + code:c0536e/84 + cheat + description:Start with 1/2 health + code:c0536e/58 + cheat + description:Start with 1/4 health + code:c0536e/2c + cheat + description:1st bonus round is 99 seconds + code:80c1f0/99 + cheat + description:1st bonus round is 80 seconds + code:80c1f0/80 + cheat + description:1st bonus round is 60 seconds + code:80c1f0/60 + cheat + description:1st bonus round is 20 seconds + code:80c1f0/20 + cheat + description:2nd bonus round is 99 seconds + code:80c1f2/99 + cheat + description:2nd bonus round is 80 seconds + code:80c1f2/80 + cheat + description:2nd bonus round is 60 seconds + code:80c1f2/60 + cheat + description:2nd bonus round is 20 seconds + code:80c1f2/20 + cheat + description:Infinite health - P1 + code:7e0530/63 + cheat + description:No health (disable during match) - P2 + code:7e0730/00 + cheat + description:Infinite time (alt) + code:7e18f3/99 + cheat + description:Select same character - both players + code:7e1848/20 + cheat + description:Enable 10 star turbo mode (alt) + code:7e1c87/32 + cheat + description:Dizzy from every knockdown - P1 + code:7e05b3/01 + cheat + description:Dizzy from every knockdown - P2 + code:7e07b3/01 + +cartridge sha256:d1f61b6bb4bb6879a4fbd2c82d77390c546ee7f821edddc884fb9cc7463ad79b + name:Street Racer (USA) + cheat + description:Infinite time + code:7e1833/00 + cheat + description:Secret tracks + code:7e53b4/01 + cheat + description:P1 Infinite health + code:7e1821/00 + cheat + description:P1 Infinite health (alt) + code:7e5382/00 + cheat + description:P2 Infinite health + code:7e1823/00 + cheat + description:P2 Infinite health (alt) + code:7e5384/00 + cheat + description:P3 Infinite health + code:7e1825/00 + cheat + description:P3 Infinite health (alt) + code:7e5386/00 + cheat + description:P4 Infinite health + code:7e1827/00 + cheat + description:P4 Infinite health (alt) + code:7e5388/00 + cheat + description:P1 Infinite Nitros + code:7e16f1/63 + cheat + description:P1 No Nitros + code:7e16f1/00 + cheat + description:P2 Infinite Nitros + code:7e16f3/63 + cheat + description:P2 No Nitros + code:7e16f3/00 + cheat + description:P3 Infinite Nitros + code:7e16f5/63 + cheat + description:P3 No Nitros + code:7e16f5/00 + cheat + description:P4 Infinite Nitros + code:7e16f7/63 + cheat + description:P4 No Nitros + code:7e16f7/00 + cheat + description:P1 Infinite credits + code:7e1d2a/03 + cheat + description:P2 Infinite credits + code:7e1d2c/03 + cheat + description:P3 Infinite credits + code:7e1d2e/03 + cheat + description:P4 Infinite credits + code:7e1d30/03 + cheat + description:P1 No weapons + code:7e5372/00 + cheat + description:P2 No weapons + code:7e5374/00 + cheat + description:P3 No weapons + code:7e5376/00 + cheat + description:P4 No weapons + code:7e5378/00 + cheat + description:P1 No fighting + code:7e537a/00 + cheat + description:P2 No fighting + code:7e537c/00 + cheat + description:P3 No fighting + code:7e537e/00 + cheat + description:P4 No fighting + code:7e5380/00 + cheat + description:P1 No collisions + code:7e538a/00 + cheat + description:P2 No collisions + code:7e538c/00 + cheat + description:P3 No collisions + code:7e538e/00 + cheat + description:P4 No collisions + code:7e5390/00 + cheat + description:P1 On last lap + code:7e1bcf/05 + cheat + description:P2 On last lap + code:7e1bd1/05 + cheat + description:P3 On last lap + code:7e1bd3/05 + cheat + description:P4 On last lap + code:7e1bd5/05 + +cartridge sha256:05f14e6ed3394d9273e2397769a8acf1a9db646be6066e82269521e8eec53562 + name:Strike Gunner S.T.G (USA) + cheat + description:Infinite lives - P1 + code:00952e/ad + cheat + description:Infinite lives - P2 + code:0095ba/ad + cheat + description:Infinite continues + code:1e80d7/ad + cheat + description:Infinite special weapon energy - P1 + code:00f0ca/ad + cheat + description:Infinite special weapon energy - P2 + code:00f123/ad + cheat + description:Hit anywhere - main weapon + code:00d46a/24+00d46f/24+00e7fb/24+00e7e8/80+00e7e0/80 + cheat + description:Start on stage 2 + code:008059/a9+00805a/01+00805b/ea + cheat + description:Start on stage 3 + code:008059/a9+00805a/02+00805b/ea + cheat + description:Start on stage 4 + code:008059/a9+00805a/03+00805b/ea + cheat + description:Start on stage 5 + code:008059/a9+00805a/04+00805b/ea + cheat + description:Start on stage 6 + code:008059/a9+00805a/05+00805b/ea + cheat + description:Invincibility after first life - P1 + code:7e024e/05 + cheat + description:Invincibility after first life - P2 + code:7e024f/05 + +cartridge sha256:c04d80b84514202ff319384ca20641eb0189e975eed5612915bd9c224b2ab30a + name:Stunt Race FX (USA) (Rev 1) + cheat + description:Always first place + code:07ddfc/6b + cheat + description:Choose any car + code:0bc7f0/d0 + cheat + description:Infinite lives + code:7e0df8/09 + cheat + description:Infinite boost - P1 + code:7e0e05/48+7e0e06/48 + cheat + description:Infinte time - minutes + code:7e0e66/00 + cheat + description:Infinite time - seconds + code:7e0e64/00 + cheat + description:Infinite time extended + code:7e19ee/99 + cheat + description:Have all stars collected + code:7e19ec/64 + cheat + description:Remove car body + code:7e2005/5c + +cartridge sha256:e9c406d4f773697b9b671e7ddf2207c9d0ab242d7f23e502cdd453fbb264d392 + name:Sunset Riders (USA) + cheat + description:Invincibility + code:818682/ee + cheat + description:Infinite lives + code:80e7d1/bd + cheat + description:Start a new game for stage select and sound test + code:80887b/14 + +cartridge sha256:190999122aacc2cff20c5677b3f60ed938d8a36b696d16cc1bf416705efe151e + name:Super Adventure Island (USA) + cheat + description:Infinite lives + code:0090ea/ad + cheat + description:Infinite credits + code:00a105/ad + cheat + description:Fruit restores full time + code:0498f5/a9+0498f6/10 + cheat + description:Super-jump (don't use the game's super-jump feature) + code:00b0a5/35 + cheat + description:Mega-jump (don't use the game's super-jump feature) + code:00b0a5/24 + cheat + description:Hit anywhere + code:03b6eb/d0+03b6ea/80+03b6e9/a5+00d161/00+03b6ec/1e + cheat + description:Multi-jump + code:00fd26/05+00fd27/a9+00fd28/00+00fd29/fa+00fd2a/95+00fd2b/1a+00fd2c/68+00fd2d/60+00b2a8/20+00b2a9/20+00b2aa/fd+00fd20/ad+00fd21/f8+00fd22/0b+00fd23/48+00fd24/0a+00fd25/10 + cheat + description:Don't lose all weapon power when you die (may give you unusual weapons) + code:00a34c/35+00a388/35 + cheat + description:Start with 1 life instead of 3 + code:0086ca/00 + cheat + description:Start with 5 lives + code:0086ca/04 + cheat + description:Start with 10 lives + code:0086ca/09 + cheat + description:Start with 15 lives + code:0086ca/0e + cheat + description:Start with 25 lives + code:0086ca/18 + cheat + description:Start with 50 lives + code:0086ca/31 + cheat + description:Start with 99 lives + code:0086ca/62 + cheat + description:Start with 1 credit + code:0086cf/00 + cheat + description:Start with 6 credits + code:0086cf/05 + cheat + description:Start in area 1, stage 2 + code:008d84/03 + cheat + description:Start in area 1 bonus round + code:008d84/05 + cheat + description:Start in area 1, stage 3 + code:008d84/07 + cheat + description:Start in area 2, stage 1 + code:008d84/0a + cheat + description:Start in area 2, stage 2 + code:008d84/0c + cheat + description:Start in area 2 bonus round + code:008d84/0e + cheat + description:Start in area 2, stage 3 + code:008d84/11 + cheat + description:Start in area 3, stage 1 + code:008d84/14 + cheat + description:Start in area 3, stage 2 + code:008d84/18 + cheat + description:Start in area 3, stage 3 + code:008d84/1a + cheat + description:Start in area 4, stage 1 + code:008d84/1d + cheat + description:Start in area 4, stage 2 + code:008d84/1f + cheat + description:Start in area 4 bonus round + code:008d84/20 + cheat + description:Start in area 4, stage 3 + code:008d84/24 + cheat + description:Start in area 5, stage 1 + code:008d84/27 + cheat + description:Start in area 5, stage 2 + code:008d84/29 + cheat + description:Start in area 5, stage 3 + code:008d84/2b + cheat + description:Start in area 5, bonus round + code:008d84/2d + cheat + description:Invincibility and Infinite time + code:7e0d6b/ff + cheat + description:Invincibility and always have Skateboard (disable at end of level) + code:7e0d6f/01 + cheat + description:Infinite time (disable at end of level) + code:7e0d6c/11 + cheat + description:Infinite lives (alt) + code:7e030d/03 + cheat + description:Have Boomerang after obtaining any weapon icon + code:7e0d75/01 + cheat + description:Have Fireball after obtaining any weapon icon + code:7e0d75/02 + cheat + description:Have Boomerang Fireball after obtaining any weapon icon + code:7e0d75/03 + cheat + description:Have Hammer after obtaining any weapon icon + code:7e0d75/04 + cheat + description:Start on last boss + code:008d84/30 + +cartridge sha256:eaf1b83e95d8a04f9a84d4960cf87cc182fc60ef07be35eb8929c4033d6fef67 + name:Super Adventure Island II (USA) + cheat + description:Infinite health + code:c05795/ad + cheat + description:Almost invincible after one hit + code:c20687/ad + cheat + description:Stacks of cash + code:c02372/a9 + cheat + description:Small potions don't restore health + code:cf9c22/ad + cheat + description:Fall slowly + code:c2146d/01 + cheat + description:Don't fall at all (disable to touch the ground again) + code:c2146d/00 + cheat + description:Have no Weapon + code:7e044d/01 + cheat + description:Have Silver Sword + code:7e044e/01 + cheat + description:Have Fire Sword + code:7e044f/01 + cheat + description:Have Ice Sword + code:7e0450/01 + cheat + description:Have Thunder Sword + code:7e0451/01 + cheat + description:Have Crystal Sword + code:7e0452/01 + cheat + description:Have Power Sword + code:7e0453/01 + cheat + description:Have Light Sword + code:7e0454/01 + cheat + description:Have Dagger + code:7e0455/01 + cheat + description:Have Fireballs + code:7e0456/01 + cheat + description:Have Boomerang + code:7e0457/01 + cheat + description:Have Ax + code:7e0458/01 + cheat + description:Have Shovel + code:7e0459/01 + cheat + description:Have no Armor + code:7e045a/01 + cheat + description:Have Fire Armor + code:7e045b/01 + cheat + description:Have Ice Armor + code:7e045c/01 + cheat + description:Have Aqua Armor + code:7e045d/01 + cheat + description:Have Light Armor + code:7e045e/01 + cheat + description:Have no Shield + code:7e045f/01 + cheat + description:Have Fire Shield + code:7e0460/01 + cheat + description:Have Ice Shield + code:7e0461/01 + cheat + description:Have Aqua Shield + code:7e0462/01 + cheat + description:Have Light Shield + code:7e0463/01 + cheat + description:Have no Equipment + code:7e0465/01 + cheat + description:Have Magic Wand + code:7e0464/01 + cheat + description:Have Ice Bell + code:7e0466/01 + cheat + description:Have Sun Ring + code:7e0467/01 + cheat + description:Have Power Fan + code:7e0468/01 + cheat + description:Have Elven Flute + code:7e0469/01 + cheat + description:Have Sky Bell + code:7e046a/01 + cheat + description:Have Light Stone + code:7e046b/01 + cheat + description:Have Sun Stone + code:7e046c/01 + cheat + description:Have Star Stone + code:7e046d/01 + cheat + description:Have Aqua Stone + code:7e046e/01 + cheat + description:Have Moon Stone + code:7e046f/01 + cheat + description:Have Thunder Spell + code:7e0470/01 + cheat + description:Have Star Spell + code:7e0471/01 + cheat + description:Have Sun Spell + code:7e0472/01 + cheat + description:Have Aqua Spell + code:7e0473/01 + cheat + description:Have Moon Spell + code:7e0474/01 + cheat + description:Have Shove + code:7e047d/01 + cheat + description:Have Up Jab + code:7e047e/01 + cheat + description:Have Down Jab + code:7e047f/01 + cheat + description:Light Gate down + code:7e0131/01 + cheat + description:Sun Gate down + code:7e0132/01 + cheat + description:Star Gate down + code:7e0133/01 + cheat + description:Aqua Gate down + code:7e0134/01 + cheat + description:Moon Gate down + code:7e0135/01 + +cartridge sha256:0deb7a91fbe5848f1733ce668daaa49b0dad3d821bacc0791837c1ba15e60d7c + name:Super Alfred Chicken (USA) + cheat + description:Infinite time + code:81ac23/ad + cheat + description:Infinite lives + code:819fa4/ad + cheat + description:Infinite lives (alt) + code:7e0012/04 + cheat + description:Infinite time (alt) + code:7e0017/09 + cheat + description:Infinite balloons + code:81a4e1/ad + +cartridge sha256:e57aa265b2fbfb7ee7f5488a3df06ae771db202d59ebbd13df8fc2db80a856f3 + name:Super Back to the Future Part II (Japan) + cheat + description:Invincibility + code:7e1401/ff + cheat + description:Infinite health + code:7e009a/03 + +cartridge sha256:1622371a5a4001fff9690323e89b7a8d449cdc3cae6dcd1249f0c7dc8c651d33 + name:Super Baseball Simulator 1.000 (USA) + cheat + description:Infinite added points + code:02aa0a/00 + cheat + description:Fewer "HR" points to distribute - standard game + code:02e8f6/3b + cheat + description:Fewer "R" points to distribute - standard game + code:02e8f8/50 + cheat + description:Fewer "F" points to distribute - standard game + code:02e8fa/14 + cheat + description:More "AV" points to distribute - moderate game + code:02e91d/09 + cheat + description:More "HR" points to distribute - moderate game + code:02e91f/01+02e91e/90 + cheat + description:More "R" points to distribute - moderate game + code:02e920/68+02e921/01 + cheat + description:More "F" points to distribute - moderate game + code:02e922/64 + +cartridge sha256:a8239355631d303ecebfd43fc14e80f148e4ac9937234e29cc87d6f939b033a0 + name:Super Bases Loaded (USA) + cheat + description:Game lasts 1 inning + code:00c36a/00+00c34e/01+00f246/01 + cheat + description:Game lasts 2 innings + code:00c36a/02+00c34e/03+00f246/03 + cheat + description:Game lasts 3 innings + code:00c36a/04+00c34e/05+00f246/05 + cheat + description:Game lasts 5 innings + code:00c36a/08+00c34e/09+00f246/09 + cheat + description:Game lasts 7 innings + code:00c36a/0c+00c34e/0d+00f246/0d + cheat + description:1 strike and batter is out + code:00ce16/01+00cddc/00 + cheat + description:2 strikes and batter is out + code:00ce16/02+00cddc/01 + cheat + description:4 strikes and batter is out + code:00ce16/04+00cddc/03 + cheat + description:5 strikes and batter is out + code:00ce16/05+00cddc/04 + cheat + description:7 strikes and batter is out + code:00ce16/07+00cddc/06 + cheat + description:9 strikes and batter is out + code:00ce16/09+00cddc/08 + cheat + description:Batter never strikes out + code:00f0b5/ad + cheat + description:Batter walks on 1 ball + code:00ce75/01+00ce3e/00 + cheat + description:Batter walks on 2 balls + code:00ce75/02+00ce3e/01 + cheat + description:Batter walks on 3 balls + code:00ce75/03+00ce3e/02 + cheat + description:Batter walks on 5 balls + code:00ce75/05+00ce3e/04 + cheat + description:Batter walks on 6 balls + code:00ce75/06+00ce3e/05 + cheat + description:Batter walks on 9 balls + code:00ce75/09+00ce3e/08 + cheat + description:Batter never walks + code:00f0c9/ad + cheat + description:1 out per inning + code:00f13f/00 + cheat + description:2 outs per inning + code:00f13f/01 + cheat + description:4 outs per inning + code:00f13f/03 + cheat + description:5 outs per inning + code:00f13f/04 + cheat + description:7 outs per inning + code:00f13f/06 + cheat + description:9 outs per inning + code:00f13f/08 + +cartridge sha256:b21a161fed748920e54cd72c54095416b1d999636e0388d7d147884779c52833 + name:Super Bases Loaded 3 - License to Steal (USA) + cheat + description:No strikes + code:8188f1/ad + cheat + description:One strike to strike out + code:8188f8/01 + cheat + description:Ten strikes to strike out + code:8188f8/0a + cheat + description:Infinite strikes gives P1 a homerun + code:8188f2/77 + cheat + description:Infinite strikes gives opponent a homerun + code:8188f2/78 + cheat + description:Walk on one ball + code:818a1a/01 + cheat + description:Walk on ten balls + code:818a1a/0a + cheat + description:Infinite balls gives P1 a homerun + code:818a14/77 + cheat + description:Infinite balls gives opponent a homerun + code:818a14/78 + +cartridge sha256:165938810948f3226f7446978fa36ae8bc781616d95b39cd126d5c8afbf6e2ee + name:Super Batter Up (USA) + cheat + description:Batter never walks + code:0391d2/ad + cheat + description:Batter never strikes out + code:039208/ad + cheat + description:1 ball per walk + code:0391d9/01 + cheat + description:2 balls per walk + code:0391d9/02 + cheat + description:3 balls per walk + code:0391d9/03 + cheat + description:5 balls per walk + code:0391d9/05 + cheat + description:6 balls per walk + code:0391d9/06 + cheat + description:7 balls per walk + code:0391d9/07 + cheat + description:1 strike per out + code:03920f/01 + cheat + description:2 strikes per out + code:03920f/02 + cheat + description:4 strikes per out + code:03920f/04 + cheat + description:5 strikes per out + code:03920f/05 + +cartridge sha256:b68e865b0b5fe6af421a171e94fb1cb0006ae3e412b6361f6f858c44adaa304b + name:Super Battletank 2 (USA) + cheat + description:Infinite hits + code:7e00ad/00 + cheat + description:Infinite health in 3rd person mode + code:7e0a2a/00 + cheat + description:Infinite 120mm bullets + code:7e10e3/09 + cheat + description:Infinite 120mm bullets in 3rd person mmode + code:7e0a10/09 + cheat + description:Infinite 7.62mm bullets + code:7e10e7/09 + cheat + description:Infinite 7.62mm bullets in 3rd person mode + code:7e0a0e/09 + cheat + description:Infinite Phalanx + code:7e10e8/09 + cheat + description:Infinite Scope + code:7e10e9/09 + cheat + description:Infinite Smoke + code:7e10e6/09 + cheat + description:Infinite LGM + code:7e10e5/09 + cheat + description:Infinite Patriot + code:7e10e4/09 + +cartridge sha256:4efab3f49cbe91ec77b6cba747ddfedfdc0b080c755a8b6ba51234f0676c000f + name:Super Bomberman (USA) + cheat + description:Invincibility (normal game) + code:c414ac/b5 + cheat + description:Infinite lives (normal game) + code:c419fe/b5 + cheat + description:Invincibility - P1 + code:7e0d79/80 + cheat + description:Invincibility - P2 + code:7e0db9/80 + cheat + description:Invincibility - P3 + code:7e0df9/80 + cheat + description:Invincibility - P4 + code:7e0e39/80 + cheat + description:Invincibility, Kick Bomb, Punch Glove, Bomb Walk, Brick Walk - P1 + code:7e0d79/e3 + cheat + description:Invincibility, Kick Bomb, Punch Glove, Bomb Walk, Brick Walk - P2 + code:7e0db9/e3 + cheat + description:Invincibility, Kick Bomb, Punch Glove, Bomb Walk, Brick Walk - P3 + code:7e0df9/e3 + cheat + description:Invincibility, Kick Bomb, Punch Glove, Bomb Walk, Brick Walk - P4 + code:7e0e39/e3 + cheat + description:Infinite time + code:7e0d3b/ff + cheat + description:Infinite lives - P1 + code:7e0d7d/09 + cheat + description:Infinite lives - P2 + code:7e0dbd/09 + cheat + description:Hit anywhere + code:c60c0f/40+c60c0b/66+c60c0a/ad+c60c0c/0d + cheat + description:Walk anywhere + code:c60b99/18 + cheat + description:Remove all blocks + code:c61aa9/01 + cheat + description:Max bomb power - P1 + code:7e0d71/09 + cheat + description:Max bomb power - P2 + code:7e0db1/09 + cheat + description:Max bomb power - P3 + code:7e0df1/09 + cheat + description:Max bomb power - P4 + code:7e0e31/09 + cheat + description:Max bomb quantity - P1 + code:7e0d70/09 + cheat + description:Max bomb quantity - P2 + code:7e0db0/09 + cheat + description:Max bomb quantity - P3 + code:7e0df0/09 + cheat + description:Max bomb quantity - P4 + code:7e0e30/09 + cheat + description:Max speed - P1 + code:7e0d72/09 + cheat + description:Max speed - P2 + code:7e0db2/09 + cheat + description:Max speed - P3 + code:7e0df2/09 + cheat + description:Max speed - P4 + code:7e0e32/09 + cheat + description:Have Detonator - P1 + code:7e0d73/09 + cheat + description:Have Detonator - P2 + code:7e0db3/09 + cheat + description:Have Detonator - P3 + code:7e0df3/09 + cheat + description:Have Detonator - P4 + code:7e0e33/09 + cheat + description:Have red bombs - P1 + code:7e0d78/09 + cheat + description:Have red bombs - P2 + code:7e0db8/09 + cheat + description:Have red bombs - P3 + code:7e0df8/09 + cheat + description:Have red bombs - P4 + code:7e0e38/09 + cheat + description:Have 9,000,000 points - P1 + code:7e0d5b/09 + cheat + description:Have 9,000,000 points - P2 + code:7e0d9b/09 + +cartridge sha256:0a4b4a783a7faf6ada3e1326ecf85de77e8c2a171659b42a78a1fae43f806ca6 + name:Super Bomberman 2 (USA) + cheat + description:Invincibility - P1 + code:7e80ef/01 + cheat + description:Invincibility - P2 + code:7e81ef/01 + cheat + description:Invincibility - P3 + code:7e82ef/01 + cheat + description:Invincibility - P4 + code:7e83ef/01 + cheat + description:Infinite time + code:7e5e12/3b + cheat + description:Infinite lives + code:7e1c6c/09 + cheat + description:Hit anywhere + code:c150d4/40+c150d6/d0+c150d3/29+c150d0/c4+c150cf/a5 + cheat + description:Walk through chests + code:c0b3f4/97 + cheat + description:Move fast + code:7e80f0/02 + cheat + description:Move faster + code:7e80f0/03 + cheat + description:Move fastest + code:7e80f0/04 + cheat + description:Max bomb power - P1 + code:7e80f2/09 + cheat + description:Max bomb power - P2 + code:7e81f2/09 + cheat + description:Max bomb power - P3 + code:7e82f2/09 + cheat + description:Max bomb power - P4 + code:7e83f2/09 + cheat + description:Max bomb quantity - P1 + code:7e80f1/09 + cheat + description:Max bomb quantity - P2 + code:7e81f1/09 + cheat + description:Max bomb quantity - P3 + code:7e82f1/09 + cheat + description:Max bomb quantity - P4 + code:7e83f1/09 + cheat + description:Max speed - P1 + code:7e80f0/06 + cheat + description:Max speed - P2 + code:7e81f0/06 + cheat + description:Max speed - P3 + code:7e82f0/06 + cheat + description:Max speed - P4 + code:7e83f0/06 + cheat + description:Have Detonator - P1 + code:7e80f3/01 + cheat + description:Have Detonator - P2 + code:7e81f3/01 + cheat + description:Have Detonator - P3 + code:7e82f3/01 + cheat + description:Have Detonator - P4 + code:7e83f3/01 + cheat + description:Have Power Bombs - P1 + code:7e80f3/02 + cheat + description:Have Power Bombs - P2 + code:7e81f3/02 + cheat + description:Have Power Bombs - P3 + code:7e82f3/02 + cheat + description:Have Power Bombs - P4 + code:7e83f3/02 + cheat + description:Have Super Bombs - P1 + code:7e80f3/04 + cheat + description:Have Super Bombs - P2 + code:7e81f3/04 + cheat + description:Have Super Bombs - P3 + code:7e82f3/04 + cheat + description:Have Super Bombs - P4 + code:7e83f3/04 + cheat + description:Have Gel Bombs - P1 + code:7e80f3/08 + cheat + description:Have Gel Bombs - P2 + code:7e81f3/08 + cheat + description:Have Gel Bombs - P3 + code:7e82f3/08 + cheat + description:Have Gel Bombs - P4 + code:7e83f3/08 + cheat + description:Have Punch Glove - P1 + code:7e80fe/01 + cheat + description:Have Punch Glove - P2 + code:7e81fe/01 + cheat + description:Have Punch Glove - P3 + code:7e82fe/01 + cheat + description:Have Punch Glove - P4 + code:7e83fe/01 + cheat + description:Have Kick Bomb - P1 + code:7e80ff/01 + cheat + description:Have Kick Bomb - P2 + code:7e81ff/01 + cheat + description:Have Kick Bomb - P3 + code:7e82ff/01 + cheat + description:Have Kick Bomb - P4 + code:7e83ff/01 + cheat + description:Have Bomb Walk - P1 + code:7e80fa/01 + cheat + description:Have Bomb Walk - P2 + code:7e81fa/01 + cheat + description:Have Bomb Walk - P3 + code:7e82fa/01 + cheat + description:Have Bomb Walk - P4 + code:7e83fa/01 + cheat + description:Have Brick Walk - P1 + code:7e80fb/01 + cheat + description:Have Brick Walk - P2 + code:7e81fb/01 + cheat + description:Have Brick Walk - P3 + code:7e82fb/01 + cheat + description:Have Brick Walk - P4 + code:7e83fb/01 + cheat + description:Have Poison Status - P1 + code:7e80f5/01 + cheat + description:Have Poison Status - P2 + code:7e81f5/01 + cheat + description:Have Poison Status - P3 + code:7e82f5/01 + cheat + description:Have Poison Status - P4 + code:7e83f5/01 + cheat + description:Have 4,000,000 points - P1 + code:7e5def/a7 + cheat + description:Have 9,000,000 points - P2 + code:7e0d9b/09 + cheat + description:Jump ability in battle-mode - all players + code:7e1c00/02+efff04/32 + +cartridge sha256:21d4a72461d8680cf75cf3b8eba42e13127815bc17b6249d89a5e39beb3f1406 + name:Super Bonk (USA) + cheat + description:Invincibility + code:82c3af/60+819378/80+819353/80 + cheat + description:Infinite lives + code:82f82f/ad + cheat + description:Infinite max life + code:7e101c/1e + cheat + description:Max life + code:7e101d/1e + cheat + description:Always have 99 lives + code:7e101e/63 + cheat + description:Always have 99 Smileys + code:7e1022/63 + cheat + description:Press up to fly on any level + code:82ec65/a9+82ec67/ea + cheat + description:Hit anywhere + code:8191ee/80+88a589/00 + +cartridge sha256:946de556b4f877e54e16b5c828db89c038e50349cfd0ddf8ea96b6541f9d70fa + name:Super Bowling (USA) + cheat + description:No spin on ball + code:00a9ca/2c + cheat + description:Faster spin meter + code:00a073/06 + cheat + description:Slower spin meter + code:00a073/02 + cheat + description:Really slow spin meter + code:00a073/01 + cheat + description:Faster power meter + code:00a078/06 + cheat + description:Slower power meter + code:00a078/02 + cheat + description:Really slow power meter + code:00a078/01 + +cartridge sha256:dc233b2805f7f73b454b53e45eef50df18932a1753fc0b7bc846bbd70a8993c3 + name:Super Buster Bros. (USA) (Rev 1) + cheat + description:Extra credit after 2 food items instead of 10 + code:01d39c/02 + cheat + description:Extra credit after 4 food items + code:01d39c/04 + cheat + description:Extra credit after 6 food items + code:01d39c/06 + cheat + description:Extra credit after 8 food items + code:01d39c/08 + cheat + description:Food items never earn extra credit + code:01d39a/ea + cheat + description:Invincibility + code:7e0100/05 + cheat + description:Shield always on + code:7e0134/02 + cheat + description:Normal shot + code:7e0131/00 + cheat + description:Double shot + code:7e0131/02 + cheat + description:Grappling shot + code:7e0131/04 + cheat + description:Gun shot + code:7e0131/06 + +cartridge sha256:5965bde449ff775c1a0d9fd3cf2fb8c51a86b44ad1942dfb5c14a91f103be030 + name:Super Buster Bros. (USA) + cheat + description:Infinite lives + code:0099df/00 + cheat + description:Infinite credits + code:009a51/a5 + cheat + description:Clock runs faster + code:00b9e2/19 + cheat + description:Clock runs slower + code:00b9e2/64 + cheat + description:Clock runs much slower + code:00b9e2/c8 + cheat + description:Clock is frozen (no time limit) + code:00b9ed/00 + cheat + description:Food items never earn extra credit + code:01d39a/ea + cheat + description:Double harpoon pick-up gives you machine gun + code:02bf23/06 + cheat + description:Retain weapon after dying or advancing thru stages + code:0282f4/a5 + cheat + description:Panic mode has 2 levels instead of 99 + code:00b840/03+00b865/03 + cheat + description:Panic mode has 5 levels + code:00b840/06+00b865/06 + cheat + description:Panic mode has 10 levels + code:00b840/0b+00b865/0b + cheat + description:Panic mode has 20 levels + code:00b840/15+00b865/15 + cheat + description:Extra credit after 2 food items instead of 10 + code:01d39c/02 + cheat + description:Extra credit after 4 food items + code:01d39c/04 + cheat + description:Extra credit after 6 food items + code:01d39c/06 + cheat + description:Extra credit after 8 food items + code:01d39c/08 + cheat + description:1 credit + code:038161/00 + cheat + description:2 credits + code:038161/01 + cheat + description:3 credits + code:038161/02 + cheat + description:4 credits + code:038161/03 + cheat + description:6 credits + code:038161/05 + cheat + description:8 credits + code:038161/07 + cheat + description:No credits + code:038161/ff + cheat + description:Start with 2 lives + code:038160/01 + cheat + description:Start with 3 lives + code:038160/02 + cheat + description:Start with 5 lives + code:038160/04 + cheat + description:Start with 6 lives + code:038160/05 + cheat + description:Start with 8 lives + code:038160/07 + cheat + description:Start with 10 lives + code:038160/09 + cheat + description:Start with 1 life + code:038160/00 + cheat + description:Invincibility + code:7e0100/05 + cheat + description:Shield always on + code:7e0134/02 + cheat + description:Normal shot + code:7e0131/00 + cheat + description:Double shot + code:7e0131/02 + cheat + description:Grappling shot + code:7e0131/04 + cheat + description:Gun shot + code:7e0131/06 + +cartridge sha256:d42f8c7969b4c434f9ca04ce0080d897877a5e71c2926d309ef5dae93ba25548 + name:Super Caesars Palace (USA) + cheat + description:Infinite 999 gold chips + code:7e188e/e7+7e188f/03 + cheat + description:Access all high roller areas + code:7e0c30/0f + +cartridge sha256:0ef6f4cce5a2273fa49fe1ce724e0048a8e39c91da6b00dbb693fe1ba909177d + name:Super Castlevania IV (USA) + cheat + description:Invincibility + code:00da9e/d0+00a80e/d0 + cheat + description:Invincibility (blinking) + code:06b4fc/84+00daa0/a5 + cheat + description:Infinite health + code:00dd1c/ad + cheat + description:Infinite health against most enemies + code:00dd1c/0d + cheat + description:Infinite lives (disable to get password) + code:0280a2/00 + cheat + description:Infinite time + code:028005/80 + cheat + description:Infinite lives + code:0280a4/a5 + cheat + description:Infinite shots for most weapons + code:00bd54/c8 + cheat + description:Hit anywhere (cannot use whip to grab onto things, press Y to moon jump instead) + code:00dbb7/92+00dbb8/a3+00dbae/00+00db4f/80+00db66/80 + cheat + description:Fully powered whip with first power-up + code:00df24/00 + cheat + description:Increase heart capacity 2.5 times + code:00de93/ff+00de78/1a+00de8e/ff + cheat + description:Max hearts on pick-up + code:00de91/00 + cheat + description:Double Shot gives you a Triple Shot + code:00df9e/ff + cheat + description:Slower timer + code:028003/7f + cheat + description:Faster timer + code:028003/1f + cheat + description:Super-jump + code:00a978/10 + cheat + description:Mega-jump + code:00a978/20 + cheat + description:Multi-jump + code:028000/6b+00b7ca/ad+00a211/6b+00da91/28+00da92/0a+00da93/90+00da94/04+00da95/22+00da96/92+00da97/a3+00da98/00+00da99/ea + cheat + description:Start with and always keep Dagger + code:00c6c3/a9+00c6c4/01+00c6c6/85 + cheat + description:Start with and always keep Axe + code:00c6c3/a9+00c6c4/02+00c6c6/85 + cheat + description:Start with and always keep Holy Water + code:00c6c3/a9+00c6c4/03+00c6c6/85 + cheat + description:Start with and always keep Boomerang + code:00c6c3/a9+00c6c4/04+00c6c6/85 + cheat + description:Start with and always keep Stopwatch + code:00c6c3/a9+00c6c4/05+00c6c6/85 + cheat + description:Start with 99 hearts - first life only + code:0094e9/99 + cheat + description:Start with 50 hearts - first life only + code:0094e9/50 + cheat + description:Start with 10 lives - first game only + code:0094db/10 + cheat + description:Start with 1 life - first game only + code:0094db/01 + cheat + description:Invincibility (blinking) (alt) + code:7e00bc/0a + cheat + description:Infinite health (alt) + code:7e13f4/10 + cheat + description:Infinite time (alt) + code:7e13f0/99 + cheat + description:Infinite hearts + code:7e13f2/99 + cheat + description:Have best whip + code:7e0092/02 + cheat + description:Have Dagger + code:7e008e/01 + cheat + description:Have Axe + code:7e008e/02 + cheat + description:Have Cross + code:7e008e/04 + cheat + description:Have Dagger + code:7e008e/01 + cheat + description:Have Holy Water + code:7e008e/03 + cheat + description:Have Stopwatch + code:7e008e/05 + cheat + description:Have Triple Shot + code:7e0090/02 + cheat + description:Start on second playthrough difficulty level + code:7e0088/01 + +cartridge sha256:b839253b878821ff00847491d11452e933baaf303f49dd39d22e3a524ea1ff81 + name:Super Chase H.Q. (USA) + cheat + description:Infinite health + code:7e127c/ff + cheat + description:Infinite nitro + code:7e1267/03 + cheat + description:Infinite time + code:7e127b/89 + +cartridge sha256:48afb82875ed4309f871f6b14021aa82c026fb14dc8acdbcf35f71ee605771b5 + name:Super Donkey Kong 2 - Dixie & Diddy (Japan) + cheat + description:Invincibility + code:b8d0d9/24 + +cartridge sha256:bcced1be76ef920b562a555696bcb4583d1c8cea4d4b057cab6e0e09be8ef8c4 + name:Super Double Dragon (USA) + cheat + description:Invincibility - both players + code:02811e/60 + cheat + description:Invincibility - P1 + code:028130/ad + cheat + description:Infinite lives - P1 + code:01be85/ad + cheat + description:Infinite lives - P1 (alt) + code:01be85/2c + cheat + description:Dragon power increases faster + code:059bec/00 + cheat + description:Prolonged maximum dragon power + code:059fde/03 + cheat + description:1 extra credit - 2P game A + code:02b5ad/01 + cheat + description:9 lives - 1P game + code:02b58d/09 + cheat + description:6 lives - 1P game + code:02b58d/06 + cheat + description:1 life - 1P game + code:02b58d/01 + cheat + description:9 lives - 2P game A + code:02b5b2/09 + cheat + description:6 lives - 2P game A + code:02b5b2/06 + cheat + description:1 life - 2P game A + code:02b5b2/01 + cheat + description:Start on Mission 2 (enable on Mode Seclect screen, then disable) + code:7e001c/14 + cheat + description:Start on Mission 3 (enable on Mode Seclect screen, then disable) + code:7e001c/17 + cheat + description:Start on Mission 4 (enable on Mode Seclect screen, then disable) + code:7e001c/1c + cheat + description:Start on Mission 5 (enable on Mode Seclect screen, then disable) + code:7e001c/1d + cheat + description:Start on Mission 6 (enable on Mode Seclect screen, then disable) + code:7e001c/1f + cheat + description:Start on Mission 7 (enable on Mode Seclect screen, then disable) + code:7e001c/20 + +cartridge sha256:4decfd480780d91f70f01c70552abd25a8ac0f8f6ceb49d1a5e72ba486203afc + name:Super Fire Pro Wrestling X Premium (Japan) + cheat + description:Infinite attribute points in wrestler edit (ignore display) + code:7e16be/00 + +cartridge sha256:7468c271d7240cf4e0d08c16e9969a1b1b1caf5adc0e5adc568d93c92651a057 + name:Super Ghouls'n Ghosts (USA) + cheat + description:Invincibility (disable at end of first two stages of level 3, so you can trigger the hidden end of stage marker) + code:7e0276/02 + cheat + description:Invincibility (alt) + code:01d164/00 + cheat + description:Never lose Armor + code:7e044a/01+7e14ba/01 + cheat + description:Infinite time + code:01b985/cd + cheat + description:Infinite lives + code:01ab61/cd + cheat + description:Infinite double-jumps + code:01cf7b/ad + cheat + description:Infinite shield hits + code:02ff3a/80 + cheat + description:Infinite continues + code:04968c/00 + cheat + description:Hit anywhere + code:02fd1d/60+02fc7d/ad+02fbc9/ad + cheat + description:Very few Zombies appear + code:01939a/a5 + cheat + description:Most Zombies carry a basket + code:028c77/01+069f05/a9 + cheat + description:Slower timer + code:01b981/5e + cheat + description:Faster timer + code:01b981/1f + cheat + description:Start with 9 minutes + code:01adea/09 + cheat + description:Start with 1 continue + code:01ab49/01 + cheat + description:Start with 9 continues + code:01ab49/09 + cheat + description:Invincibility (alt 2) + code:7e0276/02 + cheat + description:Never lose Armor (alt) + code:7e044a/01+7e14ba/01 + cheat + description:Infinite time (alt) + code:7e02a9/01 + cheat + description:Infinite lives (alt) + code:7e02a4/02 + cheat + description:Infinite double-jumps (alt) + code:7e14bc/00 + cheat + description:Super-jump + code:7e0458/0f + cheat + description:Run faster + code:7e0453/02 + cheat + description:900,000 points + code:7e0295/09 + cheat + description:Have no Armor + code:7e14ba/00 + cheat + description:Have regular Armor + code:7e14ba/01 + cheat + description:Have Green Armor + code:7e14ba/02 + cheat + description:Have Gold Armor + code:7e14ba/04 + cheat + description:Have Javelin + code:7e14d3/00 + cheat + description:Have Blue Fire Javelin + code:7e14d3/01 + cheat + description:Have Quick Dagger + code:7e14d3/02 + cheat + description:Have Laser Dagger + code:7e14d3/03 + cheat + description:Have Crossbow + code:7e14d3/04 + cheat + description:Have Crossbow with Homing Arrows + code:7e14d3/05 + cheat + description:Have Scythe + code:7e14d3/06 + cheat + description:Have Scythe level 2 + code:7e14d3/07 + cheat + description:Have Torch + code:7e14d3/08 + cheat + description:Have Torch level 2 + code:7e14d3/09 + cheat + description:Have Axe + code:7e14d3/0a + cheat + description:Have Double Edge Axe + code:7e14d3/0b + cheat + description:Have Dagger with L-shaped path + code:7e14d3/0c + cheat + description:Have Shuriken with L-shaped path + code:7e14d3/0d + cheat + description:Have Goddess Ring + code:7e14d3/0e + cheat + description:Stage select enabled (in options menu) + code:7e02b9/32+7e02ba/16 + +cartridge sha256:33dda5838264c93341ef865512e4b86e16fd4a0387eda04e331517bfaecf1c0b + name:Super Godzilla (USA) + cheat + description:Infinite health - Battle + code:268d20/ad + cheat + description:Infinite health - Map + code:01d407/ad + cheat + description:Infinite time + code:01d2ff/ae + +cartridge sha256:3f8efb19eae68f24feb42c018b7dc7a819bfd8d993ab36899681caa7ee94b06e + name:Super James Pond (USA) + cheat + description:Infinite health + code:7eb130/03 + cheat + description:Infinite lives + code:7eb12e/03 + +cartridge sha256:a9e3e57d591e995e8e0dd228b619b6aed42205eaf55316fa8ff33f236b3a32b3 + name:Super Mario All-Stars (USA) + cheat + description:SMB - Invincibility (Starman effect) + code:03de9c/d5 + cheat + description:SMB - Invincibility does not last as long + code:03de13/08 + cheat + description:SMB - Invincibility lasts longer + code:03de13/50 + cheat + description:SMB - Infinite lives + code:03a06b/ad + cheat + description:SMB - Infinite time + code:03b825/80 + cheat + description:SMB - Fireballs hit anywhere + code:03dcb8/24 + cheat + description:SMB - Fireballs can kill Bullet Bill + code:03dd7f/24 + cheat + description:SMB - Fireballs can kill Buzzy Beetle + code:03dcf2/80 + cheat + description:SMB - Run without holding the dash button + code:03b5a1/80 + cheat + description:SMB - 1-up worth nothing + code:048596/ad + cheat + description:SMB - Jump lower (disable if you get stuck) + code:03b561/a9+03b562/fd+03b563/ea + cheat + description:SMB - Super-jump + code:03b561/a9+03b562/fa+03b563/ea + cheat + description:SMB - Mega-jump + code:03b561/a9+03b562/f8+03b563/ea + cheat + description:SMB - Multi-jump + code:03b4fc/d0 + cheat + description:SMB - Allows you to select any world for File A + code:700010/07 + cheat + description:SMB - Start File A game with 2 lives + code:700013/01 + cheat + description:SMB - Start File A game with 10 lives + code:700013/09 + cheat + description:SMB - Start File A game with 50 lives + code:700013/31 + cheat + description:SMB - Start File A game with 100 lives + code:700013/63 + cheat + description:SMB - Invincibility (Starman) + code:7e07af/0f + cheat + description:SMB - Infinite lives (alt) + code:7e075a/05 + cheat + description:LL - Invincible against most enemies + code:0dddca/d5 + cheat + description:LL - Invincibility (get a power-up when an enemy touches you) + code:0dddc2/b5 + cheat + description:LL - Infinite time + code:0db5b5/60 + cheat + description:LL - Multi-jump + code:0db286/00 + cheat + description:LL - Run without holding the dash button + code:0db348/80 + cheat + description:LL - Death Mushrooms are 1-Ups + code:0dbd59/af + cheat + description:LL - There are no Death Mushrooms + code:0dbd59/ad + cheat + description:LL - All breakable bricks are coins when you're small + code:0dbd6d/ad + cheat + description:LL - Allows you to select any world or level for File A + code:700019/0c+70001a/03 + cheat + description:LL - Start File A game with 2 lives + code:70001c/01 + cheat + description:LL - Start File A game with 10 lives + code:70001c/09 + cheat + description:LL - Start File A game with 50 lives + code:70001c/31 + cheat + description:LL - Start File A game with 100 lives + code:70001c/63 + cheat + description:LL - Invincibility (blinking) + code:7e07ae/0f + cheat + description:LL - Invincibility (Star effect) + code:7e07af/0f + cheat + description:LL - Always Fiery Mario + code:7e0756/02 + cheat + description:LL - Coins are worth 10 + code:7e07df/09 + cheat + description:SMB2 - Infinite lives + code:1280ff/ad + cheat + description:SMB2 - Infinite hearts + code:12e2d6/00 + cheat + description:SMB2 - Hit anywhere + code:12df40/43+12df3d/e0+12df3e/00 + cheat + description:SMB2 - Multi-jump - all characters + code:12828a/05 + cheat + description:SMB2 - Float - all characters + code:12833f/8d + cheat + description:SMB2 - Jumping in place charges super jump + code:128346/3c + cheat + description:SMB2 - Run without holding the dash button + code:128449/00+12845b/00 + cheat + description:SMB2 - Allows you to select any world for File A + code:700021/06 + cheat + description:SMB2 - 1 life after continue + code:11816c/01 + cheat + description:SMB2 - 9 lives after continue + code:11816c/09 + cheat + description:SMB2 - 25 lives after continue + code:11816c/19 + cheat + description:SMB2 - 50 lives after continue + code:11816c/32 + cheat + description:SMB2 - 99 lives after continue + code:11816c/63 + cheat + description:SMB2 - Continue with 3 hearts instead of 2 + code:118b97/01 + cheat + description:SMB2 - Continue with 4 hearts + code:118b97/02 + cheat + description:SMB2 - Invincibility + code:7e0085/3b + cheat + description:SMB2 - Infinite float time - all characters + code:7e04ca/ff + cheat + description:SMB2 - Always big + code:7e04c3/1f + cheat + description:SMB2 - Always small + code:7e04c3/0f + cheat + description:SMB3 - Infinite lives + code:20919a/bd + cheat + description:SMB3 - Infinite time + code:29e601/80 + cheat + description:SMB3 - Infinite items + code:29dd18/ad + cheat + description:SMB3 - Infinite flying time + code:23cb26/ff + cheat + description:SMB3 - Fly at any time (run meter always full) + code:23cb1f/00 + cheat + description:SMB3 - Fireballs hit anywhere + code:27b8ec/24+27b90c/24 + cheat + description:SMB3 - Fireballs can kill most enemies + code:27b926/24 + cheat + description:SMB3 - Tail hits anywhere + code:27a62b/24 + cheat + description:SMB3 - Multi-jump + code:23cacd/24 + cheat + description:SMB3 - Multi-jump (alt) + code:23cac9/80 + cheat + description:SMB3 - Power-jump + code:21eafd/c0 + cheat + description:SMB3 - Super-jump + code:21eafd/b8 + cheat + description:SMB3 - Mega-jump + code:21eafd/b0 + cheat + description:SMB3 - Ultra power-jump + code:21eafd/a8 + cheat + description:SMB3 - Mega power-jump + code:23cb51/00 + cheat + description:SMB3 - Mushrooms always go to the right when spawned from a block + code:288fab/10 + cheat + description:SMB3 - Change to Big Mario whenever you go to the map + code:208f59/a9+208f5a/01 + cheat + description:SMB3 - Change to Fire Mario whenever you go to the map + code:208f59/a9+208f5a/02 + cheat + description:SMB3 - Change to Raccoon Mario whenever you go to the map + code:208f59/a9+208f5a/03 + cheat + description:SMB3 - Change to Frog Mario whenever you go to the map + code:208f59/a9+208f5a/04 + cheat + description:SMB3 - Change to Tanooki Mario whenever you go to the map + code:208f59/a9+208f5a/05 + cheat + description:SMB3 - Change to Sledgehammer Mario when you go to the map + code:208f59/a9+208f5a/06 + cheat + description:SMB3 - All power-ups turn you into Shoe Mario + code:23c269/04+23c0e1/f6 + cheat + description:SMB3 - Collisions turn you into Big Mario + code:23c2bb/02 + cheat + description:SMB3 - Collisions turn you into Fiery Mario + code:23c2bb/03 + cheat + description:SMB3 - Collisions turn you into Raccoon Mario + code:23c2bb/04 + cheat + description:SMB3 - Collisions turn you into Frog Mario + code:23c2bb/05 + cheat + description:SMB3 - Collisions turn you into Tanooki Mario + code:23c2bb/06 + cheat + description:SMB3 - Collisions turn you into Sledgehammer Mario + code:23c2bb/07 + cheat + description:SMB3 - After getting star, invincible until end of level (may have to disable to jump) + code:20e29d/ad + cheat + description:SMB3 - 1 life after continue + code:209497/01 + cheat + description:SMB3 - 10 lives after continue + code:209497/09 + cheat + description:SMB3 - 26 lives after continue + code:209497/19 + cheat + description:SMB3 - 51 lives after continue + code:209497/32 + cheat + description:SMB3 - 100 lives after continue + code:209497/63 + cheat + description:SMB3 - Gain lots of lives with each 5 coins + code:29e6f8/05 + cheat + description:SMB3 - 5 coins needed for an extra life + code:29e6fd/05 + cheat + description:SMB3 - 10 coins needed for an extra life + code:29e6fd/0a + cheat + description:SMB3 - 25 coins needed for an extra life + code:29e6fd/19 + cheat + description:SMB3 - 50 coins needed for an extra life + code:29e6fd/32 + cheat + description:SMB3 - Move anywhere on the world map + code:238e5e/80+238ab0/80 + cheat + description:SMB3 - Re-enter already beaten levels + code:218ce3/00 + cheat + description:SMB3 - Re-enter already beaten fortresses + code:218ce2/60 + cheat + description:SMB3 - Re-enter already beaten mushroom houses and special levels + code:218ce1/40 + cheat + description:SMB3 - Select any world for File A game + code:70002a/07 + cheat + description:SMB3 - Start and continue as Big Mario + code:23c0e1/f6 + cheat + description:SMB3 - Enable debug mode (in game) + code:7e0160/80 + cheat + description:SMB3 - Invincibility + code:7e0552/80 + cheat + description:SMB3 - Invincibility (Starman) + code:7e0553/ff + cheat + description:SMB3 - Always Small Mario + code:7e00bb/00 + cheat + description:SMB3 - Always Big Mario + code:7e00bb/01 + cheat + description:SMB3 - Always Fiery Mario + code:7e00bb/02 + cheat + description:SMB3 - Always Raccoon Mario + code:7e00bb/03 + cheat + description:SMB3 - Always Frog Mario + code:7e00bb/04 + cheat + description:SMB3 - Always Tanooki Mario + code:7e00bb/05 + cheat + description:SMB3 - Always Hammer Bros. Mario + code:7e00bb/06 + cheat + description:SMB3 - Have Magic Whistle + code:7e1d80/0c + cheat + description:SMB3 - Raccoon and Tanooki have P-Wing + code:7e056e/ff + cheat + description:SMB3 - Fly for an unlimited amount of time + code:23cb26/ff + +cartridge sha256:a8806bfe07cd3c9945d9fd3fcea932ae1cd671cab5cae12bb7a2ae726cbf9175 + name:Super Mario All-Stars + Super Mario World (USA) + cheat + description:SMB - Invincibility (Starman effect) + code:03de9c/d5 + cheat + description:SMB - Invincibility does not last as long + code:03de13/08 + cheat + description:SMB - Invincibility lasts longer + code:03de13/50 + cheat + description:SMB - Infinite lives + code:03a06b/ad + cheat + description:SMB - Infinite time + code:03b825/80 + cheat + description:SMB - Fireballs hit anywhere + code:03dcb8/24 + cheat + description:SMB - Fireballs can kill Bullet Bill + code:03dd7f/24 + cheat + description:SMB - Fireballs can kill Buzzy Beetle + code:03dcf2/80 + cheat + description:SMB - Run without holding the dash button + code:03b5a1/80 + cheat + description:SMB - 1-up worth nothing + code:048596/ad + cheat + description:SMB - Jump lower (disable if you get stuck) + code:03b561/a9+03b562/fd+03b563/ea + cheat + description:SMB - Super-jump + code:03b561/a9+03b562/fa+03b563/ea + cheat + description:SMB - Mega-jump + code:03b561/a9+03b562/f8+03b563/ea + cheat + description:SMB - Multi-jump + code:03b4fc/d0 + cheat + description:SMB - Allows you to select any world for File A + code:700010/07 + cheat + description:SMB - Start File A game with 2 lives + code:700013/01 + cheat + description:SMB - Start File A game with 10 lives + code:700013/09 + cheat + description:SMB - Start File A game with 50 lives + code:700013/31 + cheat + description:SMB - Start File A game with 100 lives + code:700013/63 + cheat + description:SMB - Invincibility (Starman) + code:7e07af/0f + cheat + description:SMB - Infinite lives (alt) + code:7e075a/05 + cheat + description:LL - Invincible against most enemies + code:0dddca/d5 + cheat + description:LL - Invincibility (get a power-up when an enemy touches you) + code:0dddc2/b5 + cheat + description:LL - Infinite time + code:0db5b5/60 + cheat + description:LL - Multi-jump + code:0db286/00 + cheat + description:LL - Run without holding the dash button + code:0db348/80 + cheat + description:LL - Death Mushrooms are 1-Ups + code:0dbd59/af + cheat + description:LL - There are no Death Mushrooms + code:0dbd59/ad + cheat + description:LL - All breakable bricks are coins when you're small + code:0dbd6d/ad + cheat + description:LL - Allows you to select any world or level for File A + code:700019/0c+70001a/03 + cheat + description:LL - Start File A game with 2 lives + code:70001c/01 + cheat + description:LL - Start File A game with 10 lives + code:70001c/09 + cheat + description:LL - Start File A game with 50 lives + code:70001c/31 + cheat + description:LL - Start File A game with 100 lives + code:70001c/63 + cheat + description:LL - Invincibility (blinking) + code:7e07ae/0f + cheat + description:LL - Invincibility (Star effect) + code:7e07af/0f + cheat + description:LL - Always Fiery Mario + code:7e0756/02 + cheat + description:LL - Coins are worth 10 + code:7e07df/09 + cheat + description:SMB2 - Infinite lives + code:1280ff/ad + cheat + description:SMB2 - Infinite hearts + code:12e2d6/00 + cheat + description:SMB2 - Hit anywhere + code:12df40/43+12df3d/e0+12df3e/00 + cheat + description:SMB2 - Multi-jump - all characters + code:12828a/05 + cheat + description:SMB2 - Float - all characters + code:12833f/8d + cheat + description:SMB2 - Jumping in place charges super jump + code:128346/3c + cheat + description:SMB2 - Run without holding the dash button + code:128449/00+12845b/00 + cheat + description:SMB2 - Allows you to select any world for File A + code:700021/06 + cheat + description:SMB2 - 1 life after continue + code:11816c/01 + cheat + description:SMB2 - 9 lives after continue + code:11816c/09 + cheat + description:SMB2 - 25 lives after continue + code:11816c/19 + cheat + description:SMB2 - 50 lives after continue + code:11816c/32 + cheat + description:SMB2 - 99 lives after continue + code:11816c/63 + cheat + description:SMB2 - Continue with 3 hearts instead of 2 + code:118b97/01 + cheat + description:SMB2 - Continue with 4 hearts + code:118b97/02 + cheat + description:SMB2 - Invincibility + code:7e0085/3b + cheat + description:SMB2 - Infinite float time - all characters + code:7e04ca/ff + cheat + description:SMB2 - Always big + code:7e04c3/1f + cheat + description:SMB2 - Always small + code:7e04c3/0f + cheat + description:SMB3 - Infinite lives + code:20919a/bd + cheat + description:SMB3 - Infinite time + code:29e601/80 + cheat + description:SMB3 - Infinite items + code:29dd18/ad + cheat + description:SMB3 - Infinite flying time + code:23cb26/ff + cheat + description:SMB3 - Fly at any time (run meter always full) + code:23cb1f/00 + cheat + description:SMB3 - Fireballs hit anywhere + code:27b8ec/24+27b90c/24 + cheat + description:SMB3 - Fireballs can kill most enemies + code:27b926/24 + cheat + description:SMB3 - Tail hits anywhere + code:27a62b/24 + cheat + description:SMB3 - Multi-jump + code:23cacd/24 + cheat + description:SMB3 - Multi-jump (alt) + code:23cac9/80 + cheat + description:SMB3 - Power-jump + code:21eafd/c0 + cheat + description:SMB3 - Super-jump + code:21eafd/b8 + cheat + description:SMB3 - Mega-jump + code:21eafd/b0 + cheat + description:SMB3 - Ultra power-jump + code:21eafd/a8 + cheat + description:SMB3 - Mega power-jump + code:23cb51/00 + cheat + description:SMB3 - Change to Big Mario whenever you go to the map + code:208f59/a9+208f5a/01 + cheat + description:SMB3 - Change to Fire Mario whenever you go to the map + code:208f59/a9+208f5a/02 + cheat + description:SMB3 - Change to Raccoon Mario whenever you go to the map + code:208f59/a9+208f5a/03 + cheat + description:SMB3 - Change to Frog Mario whenever you go to the map + code:208f59/a9+208f5a/04 + cheat + description:SMB3 - Change to Tanooki Mario whenever you go to the map + code:208f59/a9+208f5a/05 + cheat + description:SMB3 - Change to Sledgehammer Mario when you go to the map + code:208f59/a9+208f5a/06 + cheat + description:SMB3 - All power-ups turn you into Shoe Mario + code:23c269/04+23c0e1/f6 + cheat + description:SMB3 - Collisions turn you into Big Mario + code:23c2bb/02 + cheat + description:SMB3 - Collisions turn you into Fiery Mario + code:23c2bb/03 + cheat + description:SMB3 - Collisions turn you into Raccoon Mario + code:23c2bb/04 + cheat + description:SMB3 - Collisions turn you into Frog Mario + code:23c2bb/05 + cheat + description:SMB3 - Collisions turn you into Tanooki Mario + code:23c2bb/06 + cheat + description:SMB3 - Collisions turn you into Sledgehammer Mario + code:23c2bb/07 + cheat + description:SMB3 - After getting star, invincible until end of level (may have to disable to jump) + code:20e29d/ad + cheat + description:SMB3 - 1 life after continue + code:209497/01 + cheat + description:SMB3 - 10 lives after continue + code:209497/09 + cheat + description:SMB3 - 26 lives after continue + code:209497/19 + cheat + description:SMB3 - 51 lives after continue + code:209497/32 + cheat + description:SMB3 - 100 lives after continue + code:209497/63 + cheat + description:SMB3 - Gain lots of lives with each 5 coins + code:29e6f8/05 + cheat + description:SMB3 - 5 coins needed for an extra life + code:29e6fd/05 + cheat + description:SMB3 - 10 coins needed for an extra life + code:29e6fd/0a + cheat + description:SMB3 - 25 coins needed for an extra life + code:29e6fd/19 + cheat + description:SMB3 - 50 coins needed for an extra life + code:29e6fd/32 + cheat + description:SMB3 - Move anywhere on the world map + code:238e5e/80+238ab0/80 + cheat + description:SMB3 - Re-enter already beaten levels + code:218ce3/00 + cheat + description:SMB3 - Re-enter already beaten fortresses + code:218ce2/60 + cheat + description:SMB3 - Re-enter already beaten mushroom houses and special levels + code:218ce1/40 + cheat + description:SMB3 - Select any world for File A game + code:70002a/07 + cheat + description:SMB3 - Start and continue as Big Mario + code:23c0e1/f6 + cheat + description:SMB3 - Enable debug mode (in game) + code:7e0160/80 + cheat + description:SMB3 - Invincibility + code:7e0552/80 + cheat + description:SMB3 - Invincibility (Starman) + code:7e0553/ff + cheat + description:SMB3 - Always Small Mario + code:7e00bb/00 + cheat + description:SMB3 - Always Big Mario + code:7e00bb/01 + cheat + description:SMB3 - Always Fiery Mario + code:7e00bb/02 + cheat + description:SMB3 - Always Raccoon Mario + code:7e00bb/03 + cheat + description:SMB3 - Always Frog Mario + code:7e00bb/04 + cheat + description:SMB3 - Always Tanooki Mario + code:7e00bb/05 + cheat + description:SMB3 - Always Hammer Bros. Mario + code:7e00bb/06 + cheat + description:SMB3 - Have Magic Whistle + code:7e1d80/0c + cheat + description:SMB3 - Raccoon and Tanooki have P-Wing + code:7e056e/ff + cheat + description:SMB3 - Fly for an unlimited amount of time + code:23cb26/ff + cheat + description:SMW - Infinite flying time for Yoshi + code:01f1ad/ad + cheat + description:SMW - Nintendo's debug + code:00cc85/00 + cheat + description:SMW - Invincibility + code:7e1497/ff + cheat + description:SMW - Invincible (Starman) + code:7e1490/ff + cheat + description:SMW - Always Small Mario + code:7e0019/00 + cheat + description:SMW - Always Big Mario + code:7e0019/01 + cheat + description:SMW - Always Caped Mario + code:7e0019/02 + cheat + description:SMW - Always Fiery Mario + code:7e0019/03 + cheat + description:SMW - Always have Yoshi + code:7e0dc1/01 + cheat + description:SMW - Infinite time + code:7e0f31/09+7e0f32/09+7e0f33/09 + cheat + description:SMW - Infinite P-Balloon time + code:7e1891/ff + cheat + description:SMW - Multi-jump and float down (disable in water and to get on Yoshi) + code:7e1471/01 + cheat + description:SMW - Jump to automatically fly + code:7e13e4/70 + cheat + description:SMW - Activate yellow blocks (deactivate before entering the Yellow Switch Palace) + code:7e1f28/01 + cheat + description:SMW - Activate blue blocks (deactivate before entering the Blue Switch Palace) + code:7e1f29/01 + cheat + description:SMW - Activate red blocks (deactivate before entering the Red Switch Palace) + code:7e1f2a/01 + cheat + description:SMW - Automatically finish level + code:7e1493/01 + cheat + description:SMW - 8000 points for each enemy stomped + code:7e1697/06 + +cartridge sha256:2ada8919688087be60a6a48cace8f877add60c45d2e5d09e2442faa55be62a49 + name:Super Mario Kart (USA) + cheat + description:Invincibility + code:80eaf3/6c + cheat + description:All karts except yours do not move + code:80b048/55 + cheat + description:Drive through walls + code:80fa93/21 + cheat + description:Drive through opponents + code:80c283/53 + cheat + description:Invincibility and have a Red Shell + code:7e0d70/28 + cheat + description:Always have Red Shell + code:7e0d70/05 + cheat + description:Always have item + code:7e0d71/c0 + cheat + description:Drive anywhere + code:80fa93/20 + cheat + description:Mud and other land doesn't effect driving + code:759dc8/b4 + cheat + description:Special Cup enabled (1P time trial and 2P match race) + code:7e1d29/03 + +cartridge sha256:740646f3535bfb365ca44e70d46ab433467b142bd84010393070bd0b141af853 + name:Super Mario RPG - Legend of the Seven Stars (USA) + cheat + description:Infinite tries in action sequences + code:c0bcfd/c5 + cheat + description:Infinite HP - Character 1 + code:7efa91/ff + cheat + description:Infinite HP - Character 2 + code:7efb11/ff + cheat + description:Infinite HP - Character 3 + code:7efb91/ff + cheat + description:Max HP - Character 1 + code:7efa93/ff + cheat + description:Max HP - Character 2 + code:7efb13/ff + cheat + description:Max HP - Character 3 + code:7efb93/ff + cheat + description:Max Flower Points + code:7efa0d/63 + cheat + description:Infinite Flower Points (In Battle) + code:7efa0d/63+7efa0c/63 + cheat + description:Infinite Coins + code:7ff8af/e7+7ff8b0/03 + cheat + description:Infinite Frog Coins + code:7ff8b3/e7+7ff8b4/03 + cheat + description:255 EXP per battle (disable before going to the World Map or using the menu button) + code:7efa02/ff + cheat + description:Always Mario's turn + code:7e0702/00 + cheat + description:Mario consecutive super jumps modifier + code:7ff8c0/64 + cheat + description:Walk through walls + code:c97a55/80+c97a79/80+c97a1f/80+c979f7/80 + cheat + description:Mario - Level 30 + code:7ff800/1e + cheat + description:Mario - 999 HP + code:7ff801/e7+7ff802/03 + cheat + description:Mario - 999 Max HP + code:7ff803/e7+7ff804/03 + cheat + description:Mario - Max Speed + code:7ff805/ff + cheat + description:Mario - Max Attack + code:7ff806/ff + cheat + description:Mario - Max Defense + code:7ff807/ff + cheat + description:Mario - Max Magic Attack + code:7ff808/ff + cheat + description:Mario - Max Magic Defense + code:7ff809/ff + cheat + description:Mario - Max Experience + code:7ff80a/0f+7ff80b/27 + cheat + description:Mario - Equipped Weapon + code:7ff80c/1c + cheat + description:Mario - Equipped Armor + code:7ff80d/46 + cheat + description:Mario - Equipped Accessory + code:7ff80e/5e + cheat + description:Mario - Has all 'Correct' Spells + code:7ff810/3f + cheat + description:Mallow - Level 30 + code:7ff850/1e + cheat + description:Mallow - 999 HP + code:7ff851/e7+7ff852/03 + cheat + description:Mallow - 999 Max HP + code:7ff853/e7+7ff854/03 + cheat + description:Mallow - Max Speed + code:7ff855/ff + cheat + description:Mallow - Max Attack + code:7ff856/ff + cheat + description:Mallow - Max Defense + code:7ff857/ff + cheat + description:Mallow - Max Magic Attack + code:7ff858/ff + cheat + description:Mallow - Max Magic Defense + code:7ff859/ff + cheat + description:Mallow - Max Experience + code:7ff85a/0f+7ff85b/27 + cheat + description:Mallow - Equipped Weapon + code:7ff85c/20 + cheat + description:Mallow - Equipped Armor + code:7ff85d/46 + cheat + description:Mallow - Equipped Accessory + code:7ff85e/5e + cheat + description:Mallow - has all 'correct' spells + code:7ff862/e0+7ff863/07 + cheat + description:Geno - Level 30 + code:7ff83c/1e + cheat + description:Geno - 999 HP + code:7ff83d/e7+7ff83e/03 + cheat + description:Geno - 999 Max HP + code:7ff83f/e7+7ff840/03 + cheat + description:Geno - Max Speed + code:7ff841/ff + cheat + description:Geno - Max Attack + code:7ff842/ff + cheat + description:Geno - Max Defense + code:7ff843/ff + cheat + description:Geno - Max Magic Attack + code:7ff844/ff + cheat + description:Geno - Max Magic Defense + code:7ff845/ff + cheat + description:Geno - Max Experience + code:7ff846/0f+7ff847/27 + cheat + description:Geno - Equipped Weapon + code:7ff848/1f + cheat + description:Geno - Equipped Armor + code:7ff849/46 + cheat + description:Geno - Equipped Accessory + code:7ff84a/5e + cheat + description:Geno - Has all 'correct' spells + code:7ff84e/1f + cheat + description:Bowser - Level 30 + code:7ff828/1e + cheat + description:Bowser - 999 HP + code:7ff829/e7+7ff82a/03 + cheat + description:Bowser - 999 Max HP + code:7ff82b/e7+7ff82c/03 + cheat + description:Bowser - Max Speed + code:7ff82d/ff + cheat + description:Bowser - Max Attack + code:7ff82e/ff + cheat + description:Bowser - Max Defense + code:7ff82f/ff + cheat + description:Bowser - Max Magic Attack + code:7ff830/ff + cheat + description:Bowser - Max Magic Defense + code:7ff831/ff + cheat + description:Bowser - Max Experience + code:7ff832/0f+7ff833/27 + cheat + description:Bowser - Equipped Weapon + code:7ff834/1e + cheat + description:Bowser - Equipped Armor + code:7ff835/46 + cheat + description:Bowser - Equipped Accessory + code:7ff836/5e + cheat + description:Bowser - Has all 'correct' spells + code:7ff839/f0 + cheat + description:Princess - Level 30 + code:7ff814/1e + cheat + description:Princess - 999 HP + code:7ff815/e7+7ff816/03 + cheat + description:Princess - 999 Max HP + code:7ff817/e7+7ff818/03 + cheat + description:Princess - Max Speed + code:7ff819/ff + cheat + description:Princess - Max Attack + code:7ff81a/ff + cheat + description:Princess - Max Defense + code:7ff81b/ff + cheat + description:Princess - Max Magic Attack + code:7ff81c/ff + cheat + description:Princess - Max Magic Defense + code:7ff81d/ff + cheat + description:Princess - Max Experience + code:7ff81e/0f+7ff81f/27 + cheat + description:Princess - Equipped Weapon + code:7ff820/22 + cheat + description:Princess - Equipped Armor + code:7ff821/46 + cheat + description:Princess - Equipped Accessory + code:7ff822/5e + cheat + description:Princess - Has all 'correct' spells + code:7ff824/c0+7ff825/0f + +cartridge sha256:0838e531fe22c077528febe14cb3ff7c492f1f5fa8de354192bdff7137c27f5b + name:Super Mario World (USA) + cheat + description:Start and stay invincible most of the time + code:00e2d3/00 + cheat + description:Invincibility - Yoshi + code:01f724/b5+02a488/b5 + cheat + description:Infinite flying time - Yoshi + code:01f1ad/ad + cheat + description:Infinite time (disable for puzzles that use the timer) + code:008e28/ad + cheat + description:Infinite lives + code:00d0d8/ad + cheat + description:Cape hits anywhere + code:0293f2/24 + cheat + description:Fireballs hit anywhere + code:02a0df/24 + cheat + description:Fireballs shoot straight + code:00fec5/00+029fd4/00 + cheat + description:Fireballs turn most enemies into Flowers + code:02a12a/75 + cheat + description:Fireballs turn most enemies into 1-Up Mushrooms + code:02a12a/78 + cheat + description:Fireballs turn most enemies into Starmen + code:02a12a/76 + cheat + description:Multi-jump + code:00d5f4/80 + cheat + description:Spin jump in mid-air (hold to float down) + code:00ee1e/17+00ee1f/00 + cheat + description:Low jump + code:00d7a6/04 + cheat + description:Super-jump + code:00d7a6/02 + cheat + description:Mega-jump + code:00d7a6/01 + cheat + description:Swim in every level + code:00f2c3/a9 + cheat + description:Press R to scroll through items in the items box + code:00ce14/63+00ce1a/60+00ce17/8d+00ce0f/c2+00ce0c/c2+00ce18/c2+00ce15/a9+00ce12/06+00ce0d/0d+00ce19/0d+00ce10/0d+00ce16/01 + cheat + description:Little Yoshi grows after eating 1 enemy instead of 5 + code:01a2fb/01 + cheat + description:Little Yoshi grows after eating 2 enemies + code:01a2fb/02 + cheat + description:Little Yoshi grows after eating 3 enemies + code:01a2fb/03 + cheat + description:Little Yoshi grows after eating 4 enemies + code:01a2fb/04 + cheat + description:1-Up at 5 coins instead of 100 + code:008f2c/05+008f37/05 + cheat + description:1-Up at 10 coins + code:008f2c/0a+008f37/0a + cheat + description:1-Up at 20 coins + code:008f2c/14+008f37/14 + cheat + description:1-Up at 50 coins + code:008f2c/32+008f37/32 + cheat + description:1-Up at 1 dragon coin instead of 5 + code:00f37f/0d + cheat + description:Start as Super Mario + code:009e35/e6 + cheat + description:Start as Cape Mario + code:009e32/a9+009e33/02+009e34/ea+009e35/85 + cheat + description:Start as Fire Mario + code:009e32/a9+009e33/03+009e34/ea+009e35/85 + cheat + description:Start with 1 life instead of 5 + code:009e25/00 + cheat + description:Start with 9 lives + code:009e25/08 + cheat + description:Start with 15 lives + code:009e25/0e + cheat + description:Start with 25 lives + code:009e25/18 + cheat + description:Start with 50 lives + code:009e25/31 + cheat + description:Start with 99 lives + code:009e25/62 + cheat + description:Nintendo's Debug + code:00a268/00+00a273/00 + cheat + description:Nintendo's Debug 2 + code:00cc85/00 + cheat + description:Invincibility + code:7e1497/ff + cheat + description:Invincibility (Starman) + code:7e1490/ff + cheat + description:Infinite P-Balloon time + code:7e1891/ff + cheat + description:Always Small Mario + code:7e0019/00 + cheat + description:Always Big Mario + code:7e0019/01 + cheat + description:Always Caped Mario + code:7e0019/02 + cheat + description:Always Fiery Mario + code:7e0019/03 + cheat + description:Always have Yoshi + code:7e0dc1/01 + cheat + description:Always have 100 bonus points + code:7e0f48/64 + cheat + description:Multi-jump and float down (disable in water and to get on Yoshi) + code:7e1471/01 + cheat + description:Swim on every level + code:00f2c3/a9 + cheat + description:Activate green blocks (disable before entering the Green Switch Palace) + code:7e1f27/01 + cheat + description:Activate yellow blocks (disable before entering the Yellow Switch Palace) + code:7e1f28/01 + cheat + description:Activate red blocks (disable before entering the Red Switch Palace) + code:7e1f2a/01 + cheat + description:Activate blue blocks (disable before entering the Blue Switch Palace) + code:7e1f29/01 + cheat + description:8000 points for each enemy stomped + code:7e1697/06 + cheat + description:Reznor already defeated in all four fortresses + code:7e1520/01+7e1521/01+7e1522/01+7e1523/01 + +cartridge sha256:bd763c1a56365c244be92e6cffefd318780a2a19eda7d5baf1c6d5bd6c1b3e06 + name:Super Mario World 2 - Yoshi's Island (USA) (Rev 1) + cheat + description:Infinite lives + code:04f6f9/ad + cheat + description:All levels are completed with 100 points + code:108152/a9+108153/e4 + cheat + description:Always score 100 points + code:01bec8/a9+01bec9/64+01beca/ea + cheat + description:Power-ups don't get used up + code:01db87/60 + cheat + description:Mario's crying disabled + code:06c64f/22 + cheat + description:Horizontal one-way pinball doors open from both sides + code:0d9e85/80 + cheat + description:Infinite lives/Start at Middle Ring (when you die) + code:04f6fa/ad + cheat + description:After using the magnifying glass, red coins and hidden items are always revealed + code:01afba/ad + cheat + description:Red switches stay on for over twice as long + code:0eb7c4/05 + cheat + description:Red switches stay on for over four times as long + code:0eb7c4/09 + cheat + description:Red switches stay on for a very, very long time + code:0eb7c4/7f + cheat + description:Disable autoscroll + code:03d848/ad + cheat + description:Don't get crushed + code:04ac9f/6b + cheat + description:Multi-jump + code:06d06c/8e+06d06d/ab+06d06e/60+06d063/72+06d064/60+06d065/29+06d066/00+06d067/80+06d068/f0+06d069/05+06d06a/a2+06d06b/fb + cheat + description:Star timer doesn't decrease when hit + code:7e0391/01+7e0392/00 + cheat + description:Mario's crying disabled (alt) + code:06c64f/22 + cheat + description:Infinite red switch time + code:7e0cec/66 + cheat + description:Hold B to float + code:7e0945/00 + cheat + description:Unlock items in boss fights + code:7e0b48/00 + cheat + description:Have Stars +10 + code:7e0357/01 + cheat + description:Have Stars +20 + code:7e0358/02 + cheat + description:Have POW Block + code:7e0359/03 + cheat + description:Have full Eggs + code:7e035a/04 + cheat + description:Have Magnifying Glass + code:7e035b/05 + cheat + description:Have Winged Cloud + code:7e035c/06 + cheat + description:Have Green Watermelon + code:7e035d/07 + cheat + description:Have Blue Watermelon + code:7e035e/08 + cheat + description:Have Red Watermelon + code:7e035f/09 + cheat + description:Have Pink Yoshi + code:7e0383/01 + cheat + description:Have Orange Yoshi + code:7e0383/02 + cheat + description:Have Light Blue Yoshi + code:7e0383/03 + cheat + description:Have Purple Yoshi + code:7e0383/04 + cheat + description:Have Brown Yoshi + code:7e0383/05 + cheat + description:Have Red Yoshi + code:7e0383/06 + cheat + description:Have Dark Blue Yoshi + code:7e0383/07 + cheat + description:Have Glow Red Yoshi + code:7e0383/08 + cheat + description:Have Shadow Yoshi + code:7e0383/09 + +cartridge sha256:9b4957466798bbdb5b43a450bbb60b2591ae81d95b891430f62d53ca62e8bc7b + name:Super Mario World 2 - Yoshi's Island (USA) + cheat + description:Infinite lives + code:04f6f9/ad + cheat + description:Infinite lives and start at middle ring when you die + code:04f6fa/ad + cheat + description:All levels are completed with 100 points + code:108152/a9+108153/e4 + cheat + description:Always score 100 points + code:01bec8/a9+01bec9/64+01beca/ea + cheat + description:Power-ups don't get used up + code:01db87/60 + cheat + description:Mario's crying disabled + code:06c64f/22 + cheat + description:Horizontal one-way pinball doors open from both sides + code:0d9e85/80 + cheat + description:After using the magnifying glass, red coins and hidden items are always revealed + code:01afba/ad + cheat + description:Red switches stay on for over twice as long + code:0eb7c4/05 + cheat + description:Red switches stay on for over four times as long + code:0eb7c4/09 + cheat + description:Disable autoscroll + code:03d848/ad + cheat + description:Don't get crushed + code:04ac9f/6b + cheat + description:Multi-jump + code:06d06c/8e+06d06d/ab+06d06e/60+06d063/72+06d064/60+06d065/29+06d066/00+06d067/80+06d068/f0+06d069/05+06d06a/a2+06d06b/fb + cheat + description:Continue with 5 lives + code:10e189/0a + cheat + description:Continue with 10 lives + code:10e189/19 + cheat + description:Continue with 25 lives + code:10e189/32 + cheat + description:Continue with 50 lives + code:10e189/63 + cheat + description:Continue with 99 lives + code:10e189/63 + cheat + description:Start with 5 lives + code:179933/05 + cheat + description:Start with 10 lives + code:179933/0a + cheat + description:Start with 25 lives + code:179933/19 + cheat + description:Start with 50 lives + code:179933/32 + cheat + description:Start with 99 lives + code:179933/63 + cheat + description:Star timer doesn't decrease when hit + code:7e0391/01+7e0392/00 + cheat + description:Hold B to float + code:7e0945/00 + cheat + description:Unlock items in boss fights + code:7e0b48/00 + cheat + description:Infinite red switch time + code:7e0cec/66 + cheat + description:Mario's crying disabled (alt) + code:06c64f/22 + cheat + description:Have Stars +10 + code:7e0357/01 + cheat + description:Have Stars +20 + code:7e0358/02 + cheat + description:Have POW Block + code:7e0359/03 + cheat + description:Have full Eggs + code:7e035a/04 + cheat + description:Have Magnifying Glass + code:7e035b/05 + cheat + description:Have Winged Cloud + code:7e035c/06 + cheat + description:Have Green Watermelon + code:7e035d/07 + cheat + description:Have Blue Watermelon + code:7e035e/08 + cheat + description:Have Red Watermelon + code:7e035f/09 + cheat + description:Have Pink Yoshi + code:7e0383/01 + cheat + description:Have Orange Yoshi + code:7e0383/02 + cheat + description:Have Light Blue Yoshi + code:7e0383/03 + cheat + description:Have Purple Yoshi + code:7e0383/04 + cheat + description:Have Brown Yoshi + code:7e0383/05 + cheat + description:Have Red Yoshi + code:7e0383/06 + cheat + description:Have Dark Blue Yoshi + code:7e0383/07 + cheat + description:Have Glow Red Yoshi + code:7e0383/08 + cheat + description:Have Shadow Yoshi + code:7e0383/09 + +cartridge sha256:12b77c4bc9c1832cee8881244659065ee1d84c70c3d29e6eaf92e6798cc2ca72 + name:Super Metroid (Japan, USA) (En,Ja) + cheat + description:Invincibility (except for acid and when bosses grab you) + code:7e18a8/01 + cheat + description:Infinite energy (except for acid) + code:91df71/ad + cheat + description:Infinite Missiles + code:90bebf/ad + cheat + description:Infinite Super Missiles + code:90bec4/ad + cheat + description:Infinite Power Bombs + code:90c02d/ea + cheat + description:Infinite Power Bombs (alt) + code:7e09ce/63 + cheat + description:Hit anywhere + code:a0a1bc/24+a0976a/80+a0a1d4/80 + cheat + description:Super-jumps don't drain energy + code:90d0ce/ad + cheat + description:Enemies die on contact (Speed Booster effect) + code:a0a4b8/80+a0a4a4/80 + cheat + description:Switching areas fills the map + code:808597/af+80859a/03 + cheat + description:Automatically collect secret and/or special items in current room (Missiles, Energy Tanks, etc.) + code:84df92/24+84dff4/24 + cheat + description:View all hidden blocks with X-ray Scope regardless of your viewing direction + code:88817c/0f + cheat + description:Can access Tourain from sunken statues room + code:7ed820/c1+7ed821/1f + cheat + description:Disabled water + code:88c4b8/a9+88c4b9/ff+88c4ba/ff + cheat + description:Full movement in Maridia sand + code:84b518/80+90981d/00 + cheat + description:Multi-jump (when using button A) + code:90eee7/a5+90eee8/8e+90eee9/0a+90eeea/90+90eeeb/04+90eeec/22+90eeed/bc+90eeee/98+90eeef/90 + cheat + description:Multi-jump (when using button B) + code:90eee7/a5+90eee8/8f+90eee9/0a+90eeea/90+90eeeb/04+90eeec/22+90eeed/bc+90eeee/98+90eeef/90 + cheat + description:Metroids can be killed without being frozen first + code:a3ef1c/24+a3ef27/80 + cheat + description:Skip intro and start on Planet Zebes on new game + code:82eebb/00 + cheat + description:Select area when loading saved game A (press right on map screen) + code:81a81a/00+81a8af/80 + cheat + description:0 hours played + code:70004e/00 + cheat + description:Display entire map + code:82947f/80+8294ef/80+8085ae/a9 + cheat + description:Brinstar mapped + code:7ed909/ff + cheat + description:Crateria mapped + code:7ed908/ff + cheat + description:Maridia mapped + code:7ed90c/ff + cheat + description:Norfair mapped + code:7ed90a/ff + cheat + description:Tourain mapped + code:7ed90d/ff + cheat + description:Wrecked Ship mapped + code:7ed90b/ff + cheat + description:Maximum 99 Power Bombs + code:7e09d0/63 + cheat + description:Maximum 99 Super Missiles + code:7e09cc/63 + cheat + description:Maximum Missiles=10 + code:700036/0a + cheat + description:Maximum Missiles=100 + code:700036/64 + cheat + description:Maximum Missiles=125 + code:700036/7d + cheat + description:Maximum Missiles=150 + code:700036/96 + cheat + description:Maximum Missiles=175 + code:700036/af + cheat + description:Maximum Missiles=200 + code:700036/c8 + cheat + description:Maximum Missiles=25 + code:700036/19 + cheat + description:Maximum Missiles=50 + code:700036/32 + cheat + description:Maximum Missiles=75 + code:700036/4b + cheat + description:Maximum Power Bombs=10 + code:70003e/0a + cheat + description:Maximum Power Bombs=25 + code:70003e/19 + cheat + description:Maximum Power Bombs=5 + code:70003e/05 + cheat + description:Maximum Power Bombs=50 + code:70003e/32 + cheat + description:Maximum Super Missiles=10 + code:70003a/0a + cheat + description:Maximum Super Missiles=25 + code:70003a/19 + cheat + description:Maximum Super Missiles=5 + code:70003a/05 + cheat + description:Maximum Super Missiles=50 + code:70003a/32 + cheat + description:Start with about 500 Energy Tanks on saved game A + code:700033/f3+700032/01 + cheat + description:Start with about 700 Energy Tanks on saved game A + code:700033/bb+700032/02 + cheat + description:Start with about 1000 Energy Tanks on saved game A + code:700033/e7+700032/03 + cheat + description:Start with about 1200 Energy Tanks on saved game A + code:700033/af+700032/04 + cheat + description:Start with about 1500 Energy Tanks on saved game A + code:700033/db+700032/05 + cheat + description:Invincibility (except for acid and when bosses grab you) (alt) + code:7e18a8/4c + cheat + description:Infinite energy (can combine with invincibility code) + code:7e09c2/63 + cheat + description:Kill most enemies on contact + code:7e0a6e/0f + cheat + description:Infinite Missiles (alt) + code:7e09c6/e7 + cheat + description:Infinite Missiles (alt 2) + code:7e09c6/e7+7e09c7/03 + cheat + description:Maximum 999 Missiles + code:7e09c8/e7+7e09c9/03 + cheat + description:Infinite Super Missiles (alt) + code:7e09ca/50 + cheat + description:Infinite Power Bombs (alt) + code:7e09ce/50 + cheat + description:Have all Guns except Charge Beam + code:7e09a8/ff + cheat + description:Have Charge Beam + code:7e09a9/ff + cheat + description:Have all suits and misc items (except Bombs) + code:7e09a4/ff + cheat + description:Have all boots and regular Bombs + code:7e09a5/ff + cheat + description:Have Missiles and Power Bombs + code:7e09ce/50 + cheat + description:Infinite time to escape ship + code:7e0945/00+7e0946/00+7e0947/01 + cheat + description:Full movement in Maridia sand (alt) + code:84b518/80+90981d/00 + cheat + description:Moon-jump + code:7e0b2d/44+7e0b2e/01 + cheat + description:0 hours played (alt) + code:7e09e0/00 + cheat + description:Brinstar mapped (alt) + code:7ed909/ff + cheat + description:Crateria mapped (alt) + code:7ed908/ff + cheat + description:Maridia mapped (alt) + code:7ed90c/ff + cheat + description:Norfair mapped (alt) + code:70015a/ff + cheat + description:Tourian mapped (alt) + code:7ed90d/ff + cheat + description:Wrecked Ship mapped (alt) + code:7ed90b/ff + cheat + description:Start with Missiles + code:7e09c8/01 + cheat + description:Start with Super Missiles + code:7e09cc/01 + cheat + description:Start with Power Bombs + code:7e09d0/01 + +cartridge sha256:40b46bb29785fb431b325f22377faa8b099be4d77aecc1f03000b8a4cb589b63 + name:Super Ninja Boy (USA) + cheat + description:Protection from most hazards (makes some side-view enemies invincible) + code:05d1fe/bd + cheat + description:Don't subtract money (must have enough to buy) + code:02c018/60 + cheat + description:All stats are 20 (attack, defense, energy, max HP, max NP) + code:02db1d/a9+02db1f/ea+02db1e/14 + cheat + description:All stats for every level are 50 + code:02db1d/a9+02db1f/ea+02db1e/32 + cheat + description:All stats for every level are 100 + code:02db1d/a9+02db1f/ea+02db1e/64 + cheat + description:All stats for every level are 255 + code:02db1d/a9+02db1f/ea+02db1e/ff + cheat + description:1 experience point required for level 2 + code:02db2b/01 + cheat + description:1 experience point required for level 3 + code:02db2e/01 + cheat + description:1 experience point required for level 4 + code:02db31/01 + cheat + description:1 experience point required for level 5 + code:02db34/01 + cheat + description:Don't subtract M's for ninja cyclone attack + code:058c6f/00 + cheat + description:Don't subtract M's for mighty balls attack + code:05c97b/00 + cheat + description:Skulls subtract 2 M's + code:05e23b/02 + cheat + description:Skulls don't subtract an M + code:05e23b/00 + cheat + description:M power-ups worth nothing (handicap) + code:05e24f/00 + cheat + description:M power-ups worth 2 + code:05e24f/02 + cheat + description:M power-ups worth 3 + code:05e24f/03 + cheat + description:M power-ups worth 4 + code:05e24f/04 + cheat + description:M power-ups worth 5 + code:05e24f/05 + cheat + description:M power-ups set to 15 + code:05e24f/15 + cheat + description:Start with 250 cash + code:01b766/fa + cheat + description:Start with 40,960 cash + code:01b768/85 + +cartridge sha256:a8acbbd6f8afbf289a6b837da6cd8bd109a00cd38625c956ab8ff739732d9e4f + name:Super Nova (USA) + cheat + description:Invincibility + code:80be2b/4c+80be2c/35+80be2d/be + cheat + description:Infinite lives + code:8a80bd/cd + cheat + description:Hit anywhere + code:80cd53/80+89b930/00+80cc74/00 + cheat + description:Keep main weapon after dying + code:8a80a8/ad + cheat + description:Start with strongest main weapon + code:8aa124/8d + +cartridge sha256:24b687f95bb9737d223738f13c00aeaa7d697fa9e2fd50597b81d0cfa2160daa + name:Super Off Road (USA) + cheat + description:Infinite nitros + code:00953f/02+009544/dd + cheat + description:Infinite cash - P1 + code:00aecd/d9 + cheat + description:Infinite cash - P2 + code:00b020/d9 + cheat + description:Start with $500,000 + code:00b631/05 + cheat + description:Start with $900,000 + code:00b631/09 + +cartridge sha256:16f9c90d75bd23d0620be00ecf818fcb25c5935d4ee26b1fe17b926f8987aa65 + name:Super Off Road - The Baja (USA) + cheat + description:Infinite nitros + code:80c642/ea + cheat + description:Indestructible engine + code:80bfe8/ad + cheat + description:Indestructible shocks + code:80bfc2/ad + cheat + description:Indestructible tires + code:80bfa0/ad + cheat + description:Vehicle can take only about 60% damage + code:80bf6c/60 + cheat + description:Vehicle can take only about 35% damage + code:80bf6c/30 + cheat + description:$9,000 for brakes + code:809584/09 + cheat + description:$2,000 for brakes + code:809584/02 + cheat + description:$9,000 for tires + code:809586/09 + cheat + description:$2,000 for tires + code:809586/02 + cheat + description:$2,000 for shocks + code:809588/02 + cheat + description:$9,000 for shocks + code:809588/09 + cheat + description:$2,000 for lights + code:80958a/02 + cheat + description:$9,000 for lights + code:80958a/09 + cheat + description:$2,000 for engine + code:80958c/02 + cheat + description:$4,000 for engine + code:80958c/04 + +cartridge sha256:5a4b0c89606f71182fa5552ac476cc3bbda5ddc7d44e33f9184114aaea38020d + name:Super Play Action Football (USA) + cheat + description:One timeout each team + code:009c38/01 + cheat + description:No timeouts - P1 + code:009c39/64 + cheat + description:No timeouts - P2 + code:009c3b/64 + cheat + description:Infinite time to select play + code:008234/24 + cheat + description:Less time to select play + code:008231/1e + cheat + description:More time to select play + code:008231/70 + +cartridge sha256:a3d803b8c6b0b6ac55085671040b840f993543915c7f802e14fb651beabe9b63 + name:Super Punch-Out!! (USA) + cheat + description:Invincibility against normal attacks + code:00c3fd/00 + cheat + description:Infinite health against most punches + code:00c824/ad + cheat + description:Gain max health after connecting a hit - both players + code:00c803/05 + cheat + description:Infinite time + code:00f2e8/a5 + cheat + description:Opponent has no health + code:00f0aa/9c + cheat + description:Most opponents stay down for the count + code:00c394/01 + cheat + description:Opponent does almost nothing + code:018064/80 + cheat + description:Some special attacks don't damage as much + code:00c494/ad + cheat + description:Super Punch anytime + code:00cf6e/00 + cheat + description:Max power after one hit + code:00ef21/a9+00ef22/1b+00ef23/ea + cheat + description:Infinite rematches + code:019ebb/ad + cheat + description:No rematches + code:00993d/00 + cheat + description:Fix game genied world circuit + code:00bc23/a9+00bc24/00 + cheat + description:Start with 5 rematches + code:00993d/06 + cheat + description:Start with 8 rematches + code:00993d/09 + cheat + description:Start with half health - both players + code:0096a6/25 + cheat + description:Start with very little health - both players + code:0096a6/01 + cheat + description:Start on world circuit + code:01b8cb/09+01b8cc/02+01b8cd/ea + cheat + description:Infinite health + code:7e088f/50+7e089f/50 + cheat + description:Infinite time (alt) + code:7e0b27/03 + cheat + description:Infinite health (alt) + code:7e088f/50+7e089f/50 + cheat + description:Opponent has no health (alt) + code:7e099f/01 + cheat + description:Always cause dizziness + code:7e0938/8f + cheat + description:All hits cause super dizziness + code:7e092b/b0 + cheat + description:Max power (Super and Rapid Punch) + code:7e0899/00+7e089a/00+7e089b/00+7e089c/1b + cheat + description:TKO after only one knockdown + code:7e099d/03 + +cartridge sha256:05c7f6461209020785fba33007e1830820aa44ada4b1a6f991d936bf2335b15b + name:Super R-Type (USA) + cheat + description:Start with Invincibility (blinking) + code:01a8d6/bd + cheat + description:Infinite lives + code:00a631/ad + cheat + description:Infinite FORCE once obtained + code:018738/ad + cheat + description:One hit kills + code:009e15/80 + cheat + description:Hit anywhere + code:009d6a/24+009d78/24+009d7f/24+009d71/24+009d86/24 + cheat + description:Always fire charged shots (hold B) + code:01b934/3d+01b932/00 + cheat + description:Spiral motion gun takes less time to power up + code:01ba40/80+01ba41/00 + cheat + description:Spiral motion gun takes much less time to power up + code:01ba43/00 + cheat + description:Spiral motion gun can't get over-charged + code:01ba25/80 + cheat + description:All FORCE satellites have 1 unit of power (but can't exceed 1 unit) + code:0286b0/00+0286af/a9+0286b2/30 + cheat + description:All FORCE satellites have 2 units of power (but can't exceed 2 units) + code:0286b0/01+0286af/a9+0286b2/30 + cheat + description:All FORCE satellites have 3 units of power + code:0286b0/02+0286af/a9+0286b2/30 + cheat + description:Start with 1 life instead of 3 + code:018185/01+018184/a9+018186/00 + cheat + description:Start with 2 lives + code:018185/02+018184/a9+018186/00 + cheat + description:Start with 4 lives + code:018185/04+018184/a9+018186/00 + cheat + description:Start with 5 lives + code:018185/05+018184/a9+018186/00 + cheat + description:Start with 7 lives + code:018185/07+018184/a9+018186/00 + cheat + description:Start with 9 lives + code:018185/09+018184/a9+018186/00 + cheat + description:Continue with 1 life instead of 3 + code:0187ad/01+0187ac/a9+0187ae/00 + cheat + description:Continue with 2 lives + code:0187ad/02+0187ac/a9+0187ae/00 + cheat + description:Continue with 4 lives + code:0187ad/04+0187ac/a9+0187ae/00 + cheat + description:Continue with 5 lives + code:0187ad/05+0187ac/a9+0187ae/00 + cheat + description:Continue with 7 lives + code:0187ad/07+0187ac/a9+0187ae/00 + cheat + description:Continue with 9 lives + code:0187ad/09+0187ac/a9+0187ae/00 + cheat + description:Stage select enabled (Pause, A+R+Select) + code:7e16f5/ff+7e16f6/ff + cheat + description:Start with Invincibility (blinking) (alt) + code:7e15bd/00 + +cartridge sha256:7a8ffaf8bb549b400ec2f0bda9f3c0dbf5852c38618cdb21cd783c368383e2c7 + name:Super Scope 6 (USA) + cheat + description:Add 1 bullets at a time (Blastris A) + code:10a98c/01 + cheat + description:Add 3 bullets at a time (Blastris A) + code:10a98c/03 + cheat + description:Add 5 bullets at a time (Blastris A) + code:10a98c/05 + cheat + description:Add 7 bullets at a time (Blastris A) + code:10a98c/07 + cheat + description:Add 9 bullets at a time (Blastris A) + code:10a98c/09 + cheat + description:Infinite bullets (Blastris A) + code:10a4da/a5 + cheat + description:Clear 1 line instead of 5 to advance to next level (Blastris A) + code:10a55e/01 + cheat + description:Clear 2 lines to advance to next level (Blastris A) + code:10a55e/02 + cheat + description:Clear 3 lines to advance to next level (Blastris A) + code:10a55e/03 + cheat + description:Clear 4 lines to advance to next level (Blastris A) + code:10a55e/04 + cheat + description:Select low mode to start on level 5 (Blastris B, Type B) + code:1180b9/05 + cheat + description:Select low mode to start on level 15 (Blastris B, Type B) + code:1180b9/0f + cheat + description:Select low mode to start on level 25 (Blastris B, Type B) + code:1180b9/19 + cheat + description:Select low mode to start on level 30 (Blastris B, Type B) + code:1180b9/1e + cheat + description:Select low mode to start on level 35 (Blastris B, Type B) + code:1180b9/23 + cheat + description:Select low mode to start on level 40 (Blastris B, Type B) + code:1180b9/28 + cheat + description:Clear stage after 1 Molian is hit (Mole Patrol, Stage Mode) + code:10c188/9c + cheat + description:Take no damage (LazerBlazer, Type A) + code:018adb/bd + cheat + description:Take no damage (LazerBlazer Game, Type B) + code:02964d/ea + cheat + description:Take no damage (LazerBlazer Game, Type C) + code:038e5c/ad + +cartridge sha256:72268d692f03f9c012844edac1febe0b77932268b3b37ad55d6ccf631cda8483 + name:Super Shadow of the Beast (USA) (Proto) + cheat + description:Invincibility + code:008917/ad+0088f3/8d+008902/d0 + cheat + description:Infinite health + code:008921/c5 + cheat + description:Infinite lives + code:008921/a5 + cheat + description:Infinite credits + code:00817a/c5 + cheat + description:Moon-jump + code:009e42/ad+008e97/ad + +cartridge sha256:8b75ab4bb1b63c45a56e7a4c5a37c0864f14375ab3131edc33489764426ad888 + name:Super Smash T.V. (USA) + cheat + description:Invincibility on mobile force field pick-up + code:038a79/80+038a7a/01 + cheat + description:Weapons gauge doesn't lose power until you die (don't combine with don't lose weapon power code) + code:00beec/bd + cheat + description:Don't lose weapon power after death (don't combine with weapons gauge doesn't lose power code) + code:0098b9/80+0098ba/01 + cheat + description:Infinite credits (if continue timer runs out and player starts, a credit gets used) + code:0ed4ee/ad + cheat + description:Infinite lives + code:009891/bd + cheat + description:Bonus life worth nothing + code:03bb25/bd + cheat + description:Join in with 2 lives - P1 + code:00981f/ff + cheat + description:Join in with 3 lives - P1 + code:00981f/00 + cheat + description:Join in with 4 lives - P1 + code:00981f/01 + cheat + description:Join in with 5 lives - P1 + code:00981f/02 + cheat + description:Join in with 7 lives - P1 + code:00981f/04 + cheat + description:Join in with 8 lives - P1 + code:00981f/05 + cheat + description:Join in with 9 lives - P1 + code:00981f/06 + cheat + description:2 lives after continue - P1 + code:00986f/ff + cheat + description:3 lives after continue - P1 + code:00986f/00 + cheat + description:4 lives after continue - P1 + code:00986f/01 + cheat + description:5 lives after continue - P1 + code:00986f/02 + cheat + description:7 lives after continue - P1 + code:00986f/04 + cheat + description:8 lives after continue - P1 + code:00986f/05 + cheat + description:9 lives after continue - P1 + code:00986f/06 + cheat + description:10 lives after continue - P1 + code:00986f/07 + cheat + description:2 lives after continue - P2 + code:009843/ff + cheat + description:3 lives after continue - P2 + code:009843/00 + cheat + description:4 lives after continue - P2 + code:009843/01 + cheat + description:5 lives after continue - P2 + code:009843/02 + cheat + description:7 lives after continue - P2 + code:009843/04 + cheat + description:8 lives after continue - P2 + code:009843/05 + cheat + description:9 lives after continue - P2 + code:009843/06 + cheat + description:10 lives after continue - P2 + code:009843/07 + cheat + description:Start with 0 continues + code:0081d5/00 + cheat + description:Start with 1 continue + code:0081d5/01 + cheat + description:Start with 2 continues + code:0081d5/02 + cheat + description:Start with 3 continues + code:0081d5/03 + cheat + description:Start with 5 continues + code:0081d5/05 + cheat + description:Start with 6 continues + code:0081d5/06 + cheat + description:Start with 7 continues + code:0081d5/07 + cheat + description:Start with 8 continues + code:0081d5/08 + cheat + description:Start with 9 continues + code:0081d5/09 + cheat + description:Start with 3 lives + code:0081de/00 + cheat + description:Start with 4 lives + code:0081de/01 + cheat + description:Start with 5 lives + code:0081de/02 + cheat + description:Start with 7 lives + code:0081de/04 + cheat + description:Start with 8 lives + code:0081de/05 + cheat + description:Start with 9 lives + code:0081de/06 + cheat + description:Start with 10 lives + code:0081de/07 + cheat + description:Invincibility - P1 + code:7e18a5/00 + cheat + description:Invincibility - P2 + code:7e18a6/00 + cheat + description:Infinite Shield - P1 + code:7e18a9/01 + cheat + description:Infinite Shield - P2 + code:7e18aa/01 + cheat + description:Infinite lives - P1 + code:7e0531/09 + cheat + description:Infinite lives - P2 + code:7e0532/09 + cheat + description:Max weapon gauge - P1 + code:7e1899/06 + cheat + description:Max weapon gauge - P2 + code:7e189a/06 + cheat + description:Have Rapid Fire - P1 + code:7e18b0/04 + cheat + description:Have Rapid Fire - P2 + code:7e18b1/04 + cheat + description:Have normal weapon - P1 + code:7e1897/00 + cheat + description:Have normal weapon - P2 + code:7e1898/00 + cheat + description:Have Spread weapon - P1 + code:7e1897/01 + cheat + description:Have Spread weapon - P2 + code:7e1898/01 + cheat + description:Have Rockets - P1 + code:7e1897/02 + cheat + description:Have Rockets - P2 + code:7e1898/02 + cheat + description:Have Grenade Launcher - P1 + code:7e1897/03 + cheat + description:Have Grenade Launcher - P2 + code:7e1898/03 + cheat + description:Have Grenade Lobber (glitchy) - P1 + code:7e1897/04 + cheat + description:Have Grenade Lobber (glitchy) - P2 + code:7e1898/04 + cheat + description:Have Speed Shoes - P1 + code:7e18ad/ff + cheat + description:Have Speed Shoes - P2 + code:7e18ae/fa + cheat + description:Have 10 Keys + code:7e05b1/0a + cheat + description:Turbo mode on + code:7e052e/01 + cheat + description:Circuit warp on + code:7e020e/01 + cheat + description:Infinite credits (alt) + code:7e0533/09 + +cartridge sha256:694ad2b34ab808bd8a1aa9dda359594cfd3a5fd9d95d4cf262ccaa0eb57eef67 + name:Super Soccer (USA) + cheat + description:Each goal worth 2 - P1 + code:01ddc6/1a+01ddc7/ea + cheat + description:Each goal worth 3 - P1 + code:01ddc6/1a+01ddc7/1a + cheat + description:Each goal worth 4 - P1 + code:01ddc6/69+01ddc7/03 + cheat + description:Each goal worth 5 - P1 + code:01ddc6/69+01ddc7/04 + cheat + description:Each goal worth 6 - P1 + code:01ddc6/69+01ddc7/05 + cheat + description:Each goal worth 7 - P1 + code:01ddc6/69+01ddc7/06 + cheat + description:Each goal worth 8 - P1 + code:01ddc6/69+01ddc7/07 + cheat + description:Each goal worth 9 - P1 + code:01ddc6/69+01ddc7/08 + cheat + description:Each goal worth 2 - P2 + code:01ddda/1a+01dddb/ea + cheat + description:Each goal worth 3 - P2 + code:01ddda/1a+01dddb/1a + cheat + description:Each goal worth 4 - P2 + code:01ddda/69+01dddb/03 + cheat + description:Each goal worth 5 - P2 + code:01ddda/69+01dddb/04 + cheat + description:Each goal worth 6 - P2 + code:01ddda/69+01dddb/05 + cheat + description:Each goal worth 7 - P2 + code:01ddda/69+01dddb/06 + cheat + description:Each goal worth 8 - P2 + code:01ddda/69+01dddb/07 + cheat + description:Each goal worth 9 - P2 + code:01ddda/69+01dddb/08 + cheat + description:Timer continues to count when it is normally stopped (pause can still stop time) + code:01c980/00 + +cartridge sha256:5eb9736d66b3ac730ebbfdd19ef2397282b5f1a62dc0048093e041e23b807741 + name:Super Soccer Champ (USA) + cheat + description:Faster timer + code:01d099/1e + cheat + description:Slower timer + code:01d099/70 + cheat + description:Faster Brazil strikers + code:0cf633/02 + cheat + description:Faster USA strikers + code:0cf643/02 + cheat + description:Faster England strikers + code:0cf603/02 + cheat + description:Faster Germany strikers + code:0cf5e3/02 + cheat + description:Faster Italy strikers + code:0cf613/02 + cheat + description:Faster Holland strikers + code:0cf623/02 + cheat + description:Faster Argentina strikers + code:0cf5f3/02 + cheat + description:Faster France strikers + code:0cf653/02 + +cartridge sha256:5985cdad45958a5b8c5967ad39efe51569f560bf237a4e9864f21111082a8500 + name:Super Solitaire (USA) (En,Fr,De,Es,It) + cheat + description:Move cards to any pile - Klondike + code:80b4ae/80+80b3cb/00+80b3b1/00 + cheat + description:Move cards to any pile - Free Cell + code:80b81b/80 + +cartridge sha256:5670ad514d086359e28f41d79a05ae93309b382d6d56d42a6a0e493e6107111b + name:Super Soukoban (Japan) + cheat + description:Infinite steps + code:02a6ab/ad + cheat + description:Walk through walls + code:02b0bb/00+02b0bd/00 + +cartridge sha256:298b643fec4208f33d02a7afbb05c6f757b0086be533f8ca739466cbe96ae918 + name:Super Star Wars (USA) (Rev 1) + cheat + description:Protection against most damage + code:80ea2d/60 + cheat + description:Infinite lives + code:80e9d8/ad+808fae/a9 + cheat + description:Infinite continues + code:81dd68/2c + cheat + description:Blaster power-ups remain after dying + code:80e9ce/77 + cheat + description:Hit anywhere - Side-scrolling levels + code:80bd59/60+80bd58/d0+80bd55/c0+80bd63/00+80bd56/00+80bd57/00 + cheat + description:Invincibility + hit anywhere + code:80a5a3/e0+80a5a6/30+80a5a5/00+80a5a4/1d + cheat + description:Only 1 Jawa needed to pass landspeeder levels + code:808437/01+808442/01 + cheat + description:Only 5 Jawas needed to pass landspeeder levels + code:808437/05+808442/05 + cheat + description:Only 10 Jawas needed to pass landspeeder levels + code:808437/0a+808442/0a + cheat + description:25 Jawas needed to pass landspeeder levels + code:808437/19+808442/19 + cheat + description:50 Jawas needed to pass landspeeder levels + code:808437/32+808442/32 + cheat + description:No fuel maximum for fuel power-ups + code:80c871/80 + cheat + description:Fuel power-ups completely refill the landspeeder + code:80c86c/24 + cheat + description:Small hearts restore 1/2 health (easy level) + code:81e295/02 + cheat + description:Small hearts restore 1/2 health (brave level) + code:81e297/01 + cheat + description:Small hearts restore 1/2 health (Jedi level) + code:81e299/01 + cheat + description:Small hearts restore 2x health (easy level) + code:81e295/06 + cheat + description:Small hearts restore 2x health (brave level) + code:81e297/04 + cheat + description:Small hearts restore 2x health (Jedi level) + code:81e299/04 + cheat + description:Small hearts restore 4x health (easy level) + code:81e295/0c + cheat + description:Small hearts restore 4x health (brave level) + code:81e297/08 + cheat + description:Small hearts restore 4x health (Jedi level) + code:81e299/08 + cheat + description:Han Solo and Chewbacca start with a blaster + code:81bfbf/00 + cheat + description:Han Solo and Chewbacca start with a seeker gun + code:81bfbf/02 + cheat + description:Han Solo and Chewbacca start with a rapid ion gun + code:81bfbf/03 + cheat + description:Han Solo and Chewbacca start with a plasma gun + code:81bfbf/04 + cheat + description:Have character select menu on a new game + code:809e56/00 + cheat + description:Have Lightsaber on a new game + code:809e4e/00 + cheat + description:Start with 1/2 fuel on landspeeder levels + code:808431/12 + cheat + description:Start with 2x fuel on landspeeder levels + code:808431/48 + cheat + description:Start with 2 lives + code:81e273/01 + cheat + description:Start with 6 lives + code:81e273/05 + cheat + description:Start with 8 lives + code:81e273/07 + cheat + description:Start with 11 lives + code:81e273/0a + cheat + description:Start with 16 lives + code:81e273/0f + cheat + description:Start with 26 lives + code:81e273/19 + cheat + description:Start with 51 lives + code:81e273/32 + cheat + description:Start with 100 lives + code:81e273/63 + cheat + description:Start with no continues + code:81e29e/00 + cheat + description:Start with 5 continues + code:81e29e/05 + cheat + description:Start with 7 continues + code:81e29e/07 + cheat + description:Start with 10 continues + code:81e29e/0a + cheat + description:Start with 15 continues + code:81e29e/0f + cheat + description:Start with 25 continues + code:81e29e/19 + cheat + description:Start with 50 continues + code:81e29e/32 + cheat + description:Start with 99 continues + code:81e29e/63 + cheat + description:Start with 1/2 health (easy level) + code:81e277/12 + cheat + description:Start with 1/2 health (brave level) + code:81e279/10 + cheat + description:Start with 1/2 health (Jedi level) + code:81e27b/0e + cheat + description:Start with 2x health (easy level) + code:81e277/48 + cheat + description:Start with 2x health (brave level) + code:81e279/40 + cheat + description:Start with 2x health (Jedi level) + code:81e27b/38 + cheat + description:Infinite health + code:7e0a79/ff + cheat + description:Infinite time + code:7e096f/0f + cheat + description:Infinite Shields + code:7e0988/01 + cheat + description:Infinite lives + code:7e08fb/03 + cheat + description:Infinite Thermal Detonators + code:7e0978/06 + cheat + description:Infinite Fighter Life + code:7e0876/64 + cheat + description:Infinite Torpedoes + code:7e0878/63 + cheat + description:Always have Plasma Gun + code:7e0985/04 + cheat + description:Always have Rapid Ion + code:7e0985/03 + cheat + description:Always have Seeker Gun + code:7e0985/02 + cheat + description:Have Lightsaber and character select menu on a new game + code:7e0110/c0 + +cartridge sha256:c6bd7239cb2074ff1c471d14535bead6290bba2d7c75b4f03209cb114877b4c8 + name:Super Star Wars (USA) + cheat + description:Hit anywhere - Side-scrolling levels + code:80bd9a/60+80bd99/d0+80bd96/c0+80bd98/00+80bd97/00+80bda4/00 + cheat + description:Infinite health + code:7e0a79/ff + cheat + description:Infinite time + code:7e096f/0f + cheat + description:Infinite Shields + code:7e0988/01 + cheat + description:Infinite lives + code:7e08fb/03 + cheat + description:Infinite Thermal Detonators + code:7e0978/06 + cheat + description:Infinite Fighter Life + code:7e0876/64 + cheat + description:Infinite Torpedoes + code:7e0878/63 + cheat + description:Always have Plasma Gun + code:7e0985/04 + cheat + description:Always have Rapid Ion + code:7e0985/03 + cheat + description:Always have Seeker Gun + code:7e0985/02 + cheat + description:Have Lightsaber and character select menu on a new game + code:7e0110/c0 + +cartridge sha256:f7df5cd16ce6624567d1a24e9b9c0b9050ea9b6a9fe5a7973484589637756596 + name:Super Star Wars - Return of the Jedi (USA) (Rev 1) + cheat + description:Infinite lives + code:80e645/ad + cheat + description:Infinite Force power when you use the Force Saber + code:83e32b/ad + cheat + description:Always have shield + code:8088fd/a9 + cheat + description:Once you have thermal detonator you keep it (disable to use force power) + code:81d7de/ad + cheat + description:Infinite Force power when you use the Freeze Force + code:85b762/ad + cheat + description:Finish the first level almost instantly + code:839a0d/69+839a0e/ff+839a0f/ff + cheat + description:Start with 1 life + code:85bade/00 + cheat + description:Start with 5 lives + code:85bade/04 + cheat + description:Start with 10 lives + code:85bade/09 + cheat + description:Start with 25 lives + code:85bade/18 + cheat + description:Start with very little health + code:85bbf3/a9+85bbf4/01+85bbf5/00 + cheat + description:Start with about 1/4 health + code:85bbf3/a9+85bbf4/0f+85bbf5/00 + cheat + description:Start with about 1/2 health + code:85bbf3/a9+85bbf4/10+85bbf5/00 + cheat + description:Start with about 3/4 health + code:85bbf3/a9+85bbf4/1f+85bbf5/00 + +cartridge sha256:46370b3bd6ff9ee04c425eef0f482f521f3b61bd4b058f2f4e9d322253d7b5de + name:Super Star Wars - The Empire Strikes Back (USA) (Rev 1) + cheat + description:Almost invincible - except spikes (works for enemy too) + code:80e71e/2b + cheat + description:Infinite lives + code:80e6bd/ad + cheat + description:Infinite continues + code:81d850/ad + cheat + description:Infinite thermal detonators + code:80f45f/80 + cheat + description:Elevation and Freeze don't drain force bar + code:85d558/ad + cheat + description:Saber control doesn't drain force bar + code:83a1a0/00 + cheat + description:Mind control, Slow, Deflect and Invisible don't drain force bar + code:85d61c/ad + cheat + description:Keep gun power-ups after dying + code:80e6b2/ad + cheat + description:Shield power-ups don't last as long + code:80bb60/00 + cheat + description:Shield power-ups last longer + code:80bb60/02 + cheat + description:Shield power-ups last much longer + code:80bb60/03 + cheat + description:Shield power-ups last a very long time + code:80bb60/0f + cheat + description:Health sword power-ups add 1/2 as much + code:80bb2f/02 + cheat + description:Health sword power-ups add 2x as much + code:80bb2f/08 + cheat + description:Health sword power-ups add 4x as much + code:80bb2f/10 + cheat + description:Force orbs add 1/2 as much + code:80bb9e/18 + cheat + description:Force orbs add 2x as much + code:80bb9e/60 + cheat + description:Force orbs fill force bar + code:80bb9e/ff + cheat + description:Small hearts heal less on Easy + code:81de9a/01 + cheat + description:Small hearts heal 2x as much on Easy + code:81de9a/06 + cheat + description:Small hearts heal 4x as much on Easy + code:81de9a/0c + cheat + description:Small hearts heal very much on Easy + code:81de9a/20 + cheat + description:Small hearts heal completely on Easy + code:81de9a/44 + cheat + description:Small hearts heal less on Brave level + code:81de9c/01 + cheat + description:Small hearts heal 2x as much on Brave + code:81de9c/04 + cheat + description:Small hearts heal 4x as much on Brave + code:81de9c/08 + cheat + description:Small hearts heal very much on Brave + code:81de9c/20 + cheat + description:Small hearts heal completely on Brave + code:81de9c/44 + cheat + description:Small hearts heal less on Jedi level + code:81de9e/01 + cheat + description:Small hearts heal 2x as much on Jedi + code:81de9e/04 + cheat + description:Small hearts heal 4x as much on Jedi + code:81de9e/08 + cheat + description:Small hearts heal very much on Jedi + code:81de9e/20 + cheat + description:Small hearts heal completely on Jedi + code:81de9e/44 + cheat + description:Big hearts heal 1/2 your health instead of 1/4 + code:80bb01/ea + cheat + description:Big hearts heal completely + code:80bb01/0a + cheat + description:Continue with 2 lives on Easy + code:81de6a/01 + cheat + description:Continue with 6 lives on Easy + code:81de6a/05 + cheat + description:Continue with 21 lives on Easy + code:81de6a/14 + cheat + description:Continue with 51 lives on Easy + code:81de6a/32 + cheat + description:Continue with 2 lives on Jedi + code:81de6e/01 + cheat + description:Continue with 6 lives on Jedi + code:81de6e/05 + cheat + description:Continue with 21 lives on Jedi + code:81de6e/14 + cheat + description:Continue with 100 lives on Jedi + code:81de6e/63 + cheat + description:Tauntaun starts with 1/2 usual health + code:84d647/20 + cheat + description:Tauntaun starts with 3/4 usual health + code:84d647/30 + cheat + description:Tauntaun starts with a little more health than usual + code:84d647/44 + cheat + description:Start with all force abilities + code:85d4ec/80 + cheat + description:Start with Flame gun - 1st life only + code:81d0ac/8d + cheat + description:Start with 2 lives on Brave + code:81de6c/01 + cheat + description:Start with 6 lives on Brave + code:81de6c/05 + cheat + description:Start with 21 lives on Brave + code:81de6c/14 + cheat + description:Start with 100 lives on Brave + code:81de6c/63 + cheat + description:Start with 1 continue + code:81dea3/01 + cheat + description:Start with 5 continues + code:81dea3/05 + cheat + description:Start with 9 continues + code:81dea3/09 + cheat + description:Start with 1/2 as much health on Easy + code:81de70/12 + cheat + description:Start with 3/4 as much health on Easy + code:81de70/18 + cheat + description:Start with more health on Easy + code:81de70/2a + cheat + description:Start with much more health on Easy + code:81de70/30 + cheat + description:Start with maximum health on Easy + code:81de70/44 + cheat + description:Start with 1/2 as much health on Brave + code:81de72/10 + cheat + description:Start with 3/4 as much health on Brave + code:81de72/18 + cheat + description:Start with more health on Brave + code:81de72/2a + cheat + description:Start with much more health on Brave + code:81de72/30 + cheat + description:Start with maximum health on Brave + code:81de72/44 + cheat + description:Start with half as much health on Jedi + code:81de74/0e + cheat + description:Start with 3/4 as much health on Jedi + code:81de74/15 + cheat + description:Start with no continues + code:81dea3/00 + cheat + description:Start on level 1-2 + code:808d5d/02 + cheat + description:Start on level 1-3 + code:808d5d/06 + cheat + description:Start on level 1-4 + code:808d5d/03 + cheat + description:Start on level 1-5 + code:808d5d/05 + cheat + description:Start on level 1-6 + code:808d5d/04 + cheat + description:Start on level 1-7 + code:808d5d/09 + cheat + description:Start on level 1-8 + code:808d5d/15 + cheat + description:Start on level 1-10 + code:808d5d/07 + cheat + description:Start on Hoth 3D level + code:808d5c/0e+808d5d/0a + cheat + description:Start on level 1-11 + code:808d5d/08 + cheat + description:Start on Asteroids level + code:808d5c/12+808d5d/00 + cheat + description:Start on level 3-1 + code:808d5d/0c + cheat + description:Start on level 3-2 + code:808d5d/0d + cheat + description:Start on level 3-3 + code:808d5d/0e + cheat + description:Start on Cloud City 3D level + code:808d5c/0e+808d5d/1a + cheat + description:Start on level 4-2 + code:808d5d/0f + cheat + description:Start on level 4-3 + code:808d5d/13 + cheat + description:Start on level 4-4 + code:808d5d/12 + cheat + description:Start on level 4-5 + code:808d5d/10 + cheat + description:Start on level 4-6 + code:808d5d/17 + cheat + description:Start on level 4-7 + code:808d5d/18 + cheat + description:Start on Darth Vader level + code:808d5d/16 + +cartridge sha256:d17cb5c73174060fcbd9cba6c705643f19c3b8be24d0f7ee43aee674ff1ea38e + name:Super Street Fighter II (USA) + cheat + description:Invincibility (except against throws, projectiles don't work) - P1 + code:c05ea2/80+c05ea3/01+c1ce64/80+c1ce65/02+c1cc19/80+c1cc1a/02 + cheat + description:Infinite health - P1 + code:c05080/a9+c05081/b0+c05082/8d+c05083/31+c05084/05 + cheat + description:Don't take damage except from throws or grabs - both players + code:c06c4a/ea+c06c4b/ea + cheat + description:Hit anywhere (except projectiles) - P1 + code:c06500/e0+c06503/b0+c06501/40+c06502/07 + cheat + description:1st normal hit wins - except throws or grabs + code:c06c4d/00 + cheat + description:No charging required for some special moves + code:c14fd0/04 + cheat + description:Some special moves can be done in the air + code:c12a30/00 + cheat + description:Dizziness doesn't last + code:c13836/64 + cheat + description:Every hit sets opponent on fire + code:c06237/a9+c06238/30 + cheat + description:Every hit sets the opponent on fire and knocks him down + code:c06237/a9+c06238/18 + cheat + description:Every hit zaps the opponent and knocks him down + code:c06237/a9+c06238/1a + cheat + description:Every hit knocks the opponent down + code:c06237/a9+c06238/1c + cheat + description:Every hit is a "hard hit" - opponent almost never gets knocked down + code:c06237/a9+c06238/0a + cheat + description:Players jump slower (not functional for CPU) + code:c13b56/a9+c13b57/07 + cheat + description:Players jump faster (not functional for CPU) + code:c13b56/a9+c13b57/0b + cheat + description:Each battle lasts only 1 round + code:c0bb69/01 + cheat + description:Speed up timer + code:c040a4/1f + cheat + description:Slow down timer + code:c040a4/5a + cheat + description:P2 starts right in front of P1 + code:c1d3de/16 + cheat + description:Start with 1/4 health - both players + code:c054a4/2c + cheat + description:Start with 1/2 health - both players + code:c054a4/58 + cheat + description:Start with 3/4 health - both players + code:c054a4/84 + cheat + description:Balrog - Fierce charging punch, does heavy damage + code:c583c5/8f + cheat + description:Balrog - Roundhouse charging uppercut, does heavy damage + code:c583dd/8f + cheat + description:Balrog - Fierce shoulder butt, does heavy damage + code:c5855d/8f + cheat + description:Balrog - Faster turn punch - roundhouse + code:c1bca8/06 + cheat + description:Balrog - Superfast turn punch - roundhouse + code:c1bca8/09 + cheat + description:Blanka - Fierce forward ball, does heavy damage + code:c563af/8f + cheat + description:Blanka - Beast leap, does heavy damage + code:c56493/8f + cheat + description:Blanka - Jab zap, does heavy damage + code:c56373/8f + cheat + description:Cammy - Fierce spin knuckle, does heavy damage + code:c591e7/8f + cheat + description:Cammy - Roundhouse front kick, does heavy damage + code:c5919f/8f + cheat + description:Cammy - Roundhouse cannon drill, from far away, does heavy damage + code:c5911b/8f + cheat + description:Cammy - Erratic cannon drill + code:c193ff/06 + cheat + description:Cammy - Superfast cannon drill + code:c193fe/00 + cheat + description:Cammy - Superfast front kick - fierce + code:87d14c/08 + cheat + description:Cammy - Superfast front kick - strong + code:87d149/08 + cheat + description:Cammy - Superfast front kick - jab + code:87d148/08 + cheat + description:Chun-Li - Fierce fireball, does heavy damage + code:c57003/8f + cheat + description:Chun-Li - Down step, does heavy damage + code:c56d4b/0f + cheat + description:Chun-Li - Short lightning kick, does heavy damage + code:c56e6b/8f + cheat + description:Chun Li - Faster whirlwind kick - roundhouse + code:c172f6/06 + cheat + description:Chun Li - Superfast whirlwind kick - roundhouse + code:c172f6/09 + cheat + description:Dee Jay - Fierce hyper fist (1st hit), does heavy damage + code:c5a775/8f + cheat + description:Dee Jay - Fierce Max Out, does heavy damage + code:c5a811/8f + cheat + description:Dee Jay - Roundhouse dread kick, does heavy damage + code:c5a6e5/8f + cheat + description:Dee Jay - Dread kick is faster - fierce + code:87d1ed/09 + cheat + description:Dee Jay - Dread kick is faster - strong + code:87d1e5/09 + cheat + description:Dhalsim - Yoga spear, does heavy damage + code:c576ff/0f + cheat + description:Dhalsim - Strong yoga flame (solid hit), does heavy damage + code:c577fb/8f + cheat + description:Dhalsim - Fierce yoga fire, does heavy damage + code:c577bf/8f + cheat + description:E Honda - Jab hundred-hand slap, does heavy damage + code:c55e5d/8f + cheat + description:E Honda - Fierce torpedo, does heavy damage + code:c55f89/8f + cheat + description:E Honda - Fierce sumo splash, does heavy damage + code:c55fdd/8f + cheat + description:Fei Long - Fierce slide punch (1st hit), does heavy damage + code:c5a137/8f + cheat + description:Fei Long - Fierce slide punch (2nd hit), does heavy damage + code:c5a143/8f + cheat + description:Fei Long - Fierce slide punch (3rd hit), does heavy damage + code:c5a14f/8f + cheat + description:Fei Long - Roundhouse dragon kick, does heavy damage + code:c5a0fb/8f + cheat + description:Fei Long - Superfast rekka-ken - strong + code:87d1b3/07 + cheat + description:Fei Long - Superfast rekka-ken - fierce + code:87d137/08 + cheat + description:Guile - Fierce sonic boom, does heavy damage + code:c56989/8f + cheat + description:Guile - Roundhouse sonic kick, extremely close range, does heavy damage + code:c568f9/8f + cheat + description:Hawk - The Hawk, does heavy damage + code:c599e5/8f + cheat + description:Ken - Fierce dragon punch, close to opponent, does heavy damage + code:c55a8f/8f + cheat + description:Ken - Fierce fireballs, close to opponent, does heavy damage + code:c55ad7/8f + cheat + description:Ken - Roundhouse hurricane kick while on the ground, does heavy damage + code:c559cf/8f + cheat + description:Ken - No delay after throwing fireball + code:c18d5f/e6 + cheat + description:Ken - Hurricane kicks rise higher when done in mid-air + code:c18f49/64 + cheat + description:Ken - Faster hurricane kicks - roundhouse + code:87c152/06 + cheat + description:Ken - Super fast hurricane kicks - roundhouse + code:87c152/09 + cheat + description:M. Bison - Super fast psycho crusher - fierce + code:87d211/09 + cheat + description:M. Bison - Psycho crusher in one place - fierce + code:c1b181/64 + cheat + description:Ryu - Jab dragon punch, close to opponent, does heavy damage + code:c5560f/8f + cheat + description:Ryu - Fierce red fireballs from far away, does heavy damage + code:c5579b/8f + cheat + description:Ryu - Roundhouse hurricane kick in the air, does heavy damage + code:c5570b/8f + cheat + description:Ryu - No delay after throwing fireball + code:c18d5f/e6 + cheat + description:Ryu - Hurricane kicks rise higher when done in mid-air + code:c18f49/64 + cheat + description:Ryu - Faster hurricane kicks - roundhouse + code:87c152/06 + cheat + description:Ryu - Super fast hurricane kicks - roundhouse + code:87c152/09 + cheat + description:Sagat - Roundhouse low tiger, from far away, does heavy damage + code:c58127/8f + cheat + description:Sagat - Fierce high tiger, from far away, does heavy damage + code:c580df/8f + cheat + description:Sagat - Short tiger knee, does heavy damage + code:c57fe3/8f + cheat + description:Sagat - Jab projectiles move slower for everyone but Sagat, does heavy damage + code:87dc3d/ff + cheat + description:Sagat - Jab projectiles move slower for Sagat, does heavy damage + code:87dc43/ff + cheat + description:Sagat - Fierce projectiles move faster for everyone but Sagat, does heavy damage + code:87dc41/fa + cheat + description:Sagat - Fierce projectiles move faster for Sagat, does heavy damage + code:87dc47/f7 + cheat + description:Vega - Fierce claw dive, does heavy damage + code:c58ac9/cf + cheat + description:Vega - Rolling claw attack, does heavy damage + code:c58ad5/8f + cheat + description:Vega - Claw thrust, does heavy damage + code:c58bf5/8f + cheat + description:Vega - Superfast claw roll + code:c171e5/07 + cheat + description:Vega - Claw roll in one place + code:c171ee/64 + cheat + description:Zangief - Double spinning lariat (only certain hits), does heavy damage + code:c57365/8f + cheat + description:Zangief - Spinning clothesline, does heavy damage + code:c57311/8f + cheat + description:Infinite health - P1 (alt) + code:7e0531/b0 + cheat + description:Instant win - P1 + code:7e0771/ff + cheat + description:Infinite time + code:7e1929/99 + +cartridge sha256:830c900083cccc6ded74c167c4e257db34df4786ecd6e2f053de454db7d31fe5 + name:Super Strike Eagle (USA) + cheat + description:Infinite fuel + code:80980f/a5 + cheat + description:Infinite ammo - air-to-air mode + code:80dbc2/00 + cheat + description:Infinite Maverick Missiles + code:80af04/bd + cheat + description:Infinite Sidewinder Missiles + code:80dc1b/a5 + cheat + description:Infinite Chaff + code:80dccd/ea + cheat + description:Infinite Flares + code:80dc84/ea + cheat + description:Use up ammo faster - air-to-air mode + code:80dbc2/0a + cheat + description:Start with 0 Chaff instead of 12 + code:01e916/00 + cheat + description:Start with 6 Chaff + code:01e916/06 + cheat + description:Start with 50 Chaff + code:01e916/32 + cheat + description:Start with 99 Chaff + code:01e916/63 + cheat + description:Start with 0 Flares instead of 12 + code:01e91b/00 + cheat + description:Start with 6 Flares + code:01e91b/06 + cheat + description:Start with 50 Flares + code:01e91b/32 + cheat + description:Start with 99 Flares + code:01e91b/63 + cheat + description:Start with 2 Sidewinder missiles instead of 12 + code:01e939/02 + cheat + description:Start with 25 Sidewinder Missiles + code:01e939/19 + cheat + description:Start with 50 Sidewinder Missiles + code:01e939/32 + cheat + description:Start with 99 Sidewinder Missiles + code:01e939/63 + cheat + description:Start with less fuel + code:01e90d/40 + +cartridge sha256:6e45a80ea148654514cb4e8604a0ffcbc726946e70f9e0b9860e36c0f3fa4877 + name:Super Tennis (USA) + cheat + description:Super speed - Matt + code:008747/04+008767/03+01dd2f/00 + cheat + description:Super speed - Amy + code:008747/04+008767/03+01df2f/00 + cheat + description:Super speed - Brian + code:008747/04+008767/03+01dd3f/00 + cheat + description:Super speed - Ki + code:008747/04+008767/03+01df3f/00 + cheat + description:Super speed - Phil + code:008747/04+008767/03+01dd4f/00 + cheat + description:Super speed - Lisa + code:008747/04+008767/03+01df4f/00 + cheat + description:Super speed - John + code:008747/04+008767/03+01dd5f/00 + cheat + description:Super speed - Erin + code:008747/04+008767/03+01df5f/00 + cheat + description:Super speed - Meyer + code:008747/04+008767/03+01dd6f/00 + cheat + description:Super speed - Donna + code:008747/04+008767/03+01df6f/00 + cheat + description:Super speed - Rich + code:008747/04+008767/03+01dd7f/00 + cheat + description:Super speed - Debbie + code:008747/04+008767/03+01df7f/00 + cheat + description:Super speed - Hiro + code:008747/04+008767/03+01dd8f/00 + cheat + description:Super speed - Colette + code:008747/04+008767/03+01df8f/00 + cheat + description:Super speed - Steve + code:008747/04+008767/03+01dd9f/00 + cheat + description:Super speed - Nancy + code:008747/04+008767/03+01df9f/00 + cheat + description:Super speed - Rob + code:008747/04+008767/03+01ddaf/00 + cheat + description:Super speed - Yuka + code:008747/04+008767/03+01dfaf/00 + cheat + description:Super speed - Mar + code:008747/04+008767/03+01ddbf/00 + cheat + description:Super speed - Barb + code:008747/04+008767/03+01dfbf/00 + cheat + description:Play as Don J (Boss player) - P1 + code:7e0802/40 + cheat + description:Play as Don J (Boss player) - P2 + code:7e0842/40 + cheat + description:Play as Don J (Boss player) - P3 + code:7e0882/40 + cheat + description:Play as Don J (Boss player) - P4 + code:7e08c2/40 + cheat + description:CPU can't hit the ball + code:7e00ef/00 + cheat + description:CPU scared of the ball + code:7e00ec/00 + +cartridge sha256:8dda3b0888a32005041f2feb9be4e14807d40291f951a4612461cf41dac9cb78 + name:Super Tetris 2 + Bombliss (Japan) + cheat + description:Drop pieces on left side of the board to clear that line + code:009e28/01 + +cartridge sha256:02cb7f1ed21ed6bfb9eaa0e91df2adb063a9bf4cbd6feb6cd024d676829e227e + name:Super Troll Islands (USA) + cheat + description:Infinite health (except spikes) + code:7e215a/04 + cheat + description:Max score + code:7e2009/99+7e200a/99+7e200b/99+7e200c/09 + cheat + description:Infinite whirlwinds + code:7e2074/09 + cheat + description:Infinite cupcakes + code:7e20f7/99 + cheat + description:Die after one hit + code:7e215a/00 + +cartridge sha256:056ac8160363d577e3ffc2f593801b8bb3d024fe4f3a3331b711dc556204949d + name:Super Turrican (USA) + cheat + description:Invincibility + code:00d880/ad + cheat + description:Infinite time + code:00d7b0/80 + cheat + description:Infinite lives + code:00d700/ad + cheat + description:Infinite continues + code:008482/ad + cheat + description:Infinite wheel time + code:00d909/ad + cheat + description:Infinite Smart Lines + code:00d88d/ad + cheat + description:Hit anywhere + code:00b9ad/78+00b9ac/80+00ba4c/ad + cheat + description:Don't decrease weapon power after dying + code:00d6d9/80+00d6da/16 + cheat + description:Never change weapon type + code:00b3d5/2c + cheat + description:Start with blue weapon + code:00b2e1/01 + cheat + description:Start with yellow weapon + code:00b2e1/02 + cheat + description:Start with all weapons at maximum power (4 power-ups) + code:00b2e1/04+00b2ec/9c + cheat + description:Start with 1 life - Normal/Hard only + code:008261/00 + cheat + description:Start with 2 lives - Normal/Hard only + code:008261/01 + cheat + description:Start with 5 lives - Normal/Hard only + code:008261/04 + cheat + description:Start with 10 lives - Normal/Hard only + code:008261/09 + cheat + description:Start with 25 lives - Normal/Hard only + code:008261/18 + cheat + description:Start with 50 lives - Normal/Hard only + code:008261/31 + cheat + description:Start with 99 lives - Normal/Hard only + code:008261/62 + cheat + description:Start with 1 continue - Easy/Normal only + code:008210/01 + cheat + description:Start with 2 continues - Easy/Normal only + code:008210/02 + cheat + description:Start with 5 continues - Easy/Normal only + code:008210/05 + cheat + description:Start with 10 continues - Easy/Normal only + code:008210/0a + cheat + description:Start with 25 continues - Easy/Normal only + code:008210/19 + cheat + description:Start with 50 continues - Easy/Normal only + code:008210/32 + cheat + description:Start with 99 continues - Easy/Normal only + code:008210/63 + cheat + description:Start with no Smart Lines + code:00b2f0/00 + cheat + description:Start with 1 Smart Line + code:00b2f0/01 + cheat + description:Start with 2 Smart Lines + code:00b2f0/02 + cheat + description:Start with 4 Smart Lines - only 3 shown at once + code:00b2f0/04 + cheat + description:Start with 5 Smart Lines - only 3 shown at once + code:00b2f0/05 + cheat + description:Start with 10 Smart Lines - only 3 shown at once + code:00b2f0/0a + cheat + description:Start with 25 Smart Lines - only 3 shown at once + code:00b2f0/19 + cheat + description:Start with 50 Smart Lines - only 3 shown at once + code:00b2f0/32 + cheat + description:Start with 99 Smart Lines - only 3 shown at once + code:00b2f0/63 + cheat + description:Start on level 2 + code:008208/02 + cheat + description:Start on level 3 + code:008208/03 + cheat + description:Start on level 4 + code:008208/04 + cheat + description:Start on level 5 + code:008208/05 + cheat + description:Start on level 6 + code:008208/06 + cheat + description:Start on level 7 + code:008208/07 + cheat + description:Start on level 8 + code:008208/08 + cheat + description:Start on level 9 + code:008208/09 + cheat + description:Start on level 10 + code:008208/0a + cheat + description:Start on level 11 + code:008208/0b + cheat + description:Start on level 12 + code:008208/0c + cheat + description:Start on level 13 + code:7e049e/0d + cheat + description:Infinite health + code:7e04ff/0c + cheat + description:Infinite time (alt) + code:7e056c/23 + cheat + description:Infinite Bombs + code:7e050a/04 + +cartridge sha256:96da3512a1aa05a40f1e5d61c48932b0d55d9f136d6418b848153a9fecab06de + name:Super Turrican 2 (USA) + cheat + description:Infinite time + code:7e0aea/03+7e0aeb/55 + cheat + description:Infinite lives + code:7e0af2/02 + cheat + description:Infinite Bombs + code:7e0af4/03 + cheat + description:Have Missile sub-weapon + code:7e034a/01 + cheat + description:Max Spread Shot level + code:7e033c/04 + cheat + description:Max Rebound level + code:7e033e/04 + cheat + description:Max Laser level + code:7e0340/04 + cheat + description:Max Flamethrower level + code:7e0342/04 + cheat + description:Start with Spread Shot + code:7e0336/00 + cheat + description:Start with Rebound + code:7e0336/10 + cheat + description:Start with Laser + code:7e0336/16 + cheat + description:Start with Flamethrower + code:7e0336/02 + cheat + description:Start on level 2 + code:7e007e/02 + cheat + description:Start on level 3 + code:7e007e/03 + cheat + description:Start on level 4 + code:7e007e/04 + cheat + description:Start on level 5 + code:7e007e/05 + cheat + description:Start on level 6 + code:7e007e/06 + cheat + description:Start on level 7 + code:7e007e/07 + cheat + description:Start on level 8 + code:7e007e/08 + cheat + description:Start on level 9 + code:7e007e/09 + cheat + description:Start on level 10 + code:7e007e/0a + cheat + description:Start on level 11 + code:7e007e/0b + cheat + description:Start on level 12 + code:7e007e/0c + cheat + description:Start on level 13 + code:7e007e/0e + cheat + description:Start on level 14 + code:7e007e/0f + cheat + description:Start on level 15 + code:7e007e/10 + cheat + description:Start on level 16 + code:7e007e/11 + cheat + description:Start on level 17 + code:7e007e/12 + +cartridge sha256:fddc6634f727899152a5b8b1ca3b8938a4e4ccdd5a6adb9e1579363e3b676f20 + name:Super Uno (Japan) + cheat + description:Place any card on the stack regardless of color + code:01a092/80 + +cartridge sha256:792e615a34ceae5a1b9a4f54c5a5d9b53e39299332fece83e4bceca2c22efb21 + name:Super Valis IV (USA) + cheat + description:Allows you to select easy mode on the options screen + code:00dfa0/42 + cheat + description:Infinite usage for all special attacks + code:008f8f/00 + cheat + description:Protection from most enemy attacks + code:00c5c3/ad + cheat + description:Infinite hits on armor + code:00c5c7/ad + cheat + description:Hit anywhere + code:00b001/00+00c498/00 + cheat + description:Get items from anywhere + code:00bfc6/80 + cheat + description:Heart worth more + code:00b125/18 + cheat + description:Heart worth much more + code:00b125/28 + cheat + description:Selecting an item does not remove it from the menu of available items + code:008f1a/bd + cheat + description:Enables level select + code:00cea9/ea + cheat + description:Get any score for maximum score + code:00ac9f/00 + cheat + description:Item is always search + code:008ede/a9+008edf/03 + cheat + description:Item is always three-way beam + code:008ede/a9+008edf/01 + cheat + description:Item is always bomber + code:008ede/a9+008edf/02 + cheat + description:Item is always homing + code:008ede/a9+008edf/04 + cheat + description:Item is always heart + code:008ede/a9+008edf/05 + cheat + description:Item is always armor + code:008ede/a9+008edf/06 + cheat + description:Infinite max health + code:7e0fb5/40 + cheat + description:Highest max health + code:7e0fb6/40 + cheat + description:Infinite item use + code:7e0fae/09 + cheat + description:Have all items + code:7e0fa7/01+7e0fa8/02+7e0fa9/03+7e0faa/04+7e0fab/05+7e0fac/06 + +cartridge sha256:62d3d650e956f23f3b221f83c5c5bd204afd0e4f4d9c47a3251962323de96089 + name:Super Widget (USA) + cheat + description:Invincibility + code:009155/00 + cheat + description:Infinite lives + code:0083b4/ad + cheat + description:Infinite time + code:008292/ad + cheat + description:1 W gives 1 life + code:009cc8/03 + +cartridge sha256:d802715fb4f09d7e499b5b3e577af641598a723dae7cedeaa93943bb53c6edbb + name:SWAT Kats - The Radical Squadron (USA) + cheat + description:Invincibility after first hit + code:c05313/bd + cheat + description:Invincible while flying the jet + code:c1f594/6b+c1f5d7/6b+c1f60b/6b + cheat + description:Almost infinite health + code:c0cc5a/34 + cheat + description:Gain levels quickly + code:c13d60/69 + cheat + description:World 5 - Dark Kat always enabled + code:c0ecd6/05 + +cartridge sha256:40916fe512541aafba354e39c4ef63a9114de235526de5bb949a239a9257490e + name:Sword Maniac (Japan) + cheat + description:Infinite time + code:008bf8/ad + cheat + description:Infinite health + code:7e0a18/a0 + cheat + description:Infinite lives + code:7e0a3e/09 + cheat + description:Attack really fast + code:7e101e/01 + +cartridge sha256:c2015d03dd3db08069b2a6ea1ed6b3e1ac1e3a5f804b02295c3cd3717add91ef + name:Syndicate (USA) + cheat + description:Start with Mega-cash + code:80a1e4/30+80a1e5/30 + cheat + description:All agents have infinite ammo for pistols + code:81ca91/a9 + +cartridge sha256:365f10f9d9f68cc59e769eeb451c417e1ff7415022a625de9976a3b924c0bd61 + name:T2 - The Arcade Game (USA) + cheat + description:Infinite health (alt) - P1 + code:82e0ec/80 + cheat + description:Infinite health (alt) - P2 + code:82e113/80 + cheat + description:Infinite gunpower - P1 + code:809d39/a5 + cheat + description:Infinite gunpower - P2 + code:809d5c/a5 + cheat + description:Infinite missiles - P1 + code:82d4ce/00 + cheat + description:Infinite missiles - P2 + code:82d4f0/00 + cheat + description:Shields lasts longer + code:80dc3b/7f + cheat + description:Plasma Pulse Energizer lasts longer - P1 + code:80dc96/08 + cheat + description:Plasma Pulse Energizer lasts longer - P2 + code:80dcbc/08 + cheat + description:Keep P.P.E. for that level once picked up - P1 + code:818c3f/ad + cheat + description:Keep P.P.E. for that level once picked up - P2 + code:818c4e/ad + cheat + description:Get 6 missiles for each 1 - P1 + code:80dc0d/06 + cheat + description:Get 9 missiles for each 1 - P1 + code:80dc0d/09 + cheat + description:Get 9 missiles for each 1 - P2 + code:80dc22/06 + cheat + description:Get 6 missiles for each 1 - P2 + code:80dc22/09 + cheat + description:Gunpower replenishes slower - P1 + code:8094ee/10 + cheat + description:Gunpower replenishes slower - P2 + code:809545/10 + cheat + description:10 credits + code:83eaff/10 + cheat + description:15 credits + code:83eaff/15 + cheat + description:20 credits + code:83eaff/20 + cheat + description:P.P.E. does extra damage - P1 + code:80dc9b/06 + cheat + description:P.P.E. does massive damage - P1 + code:80dc9b/12 + cheat + description:Infinite health - P1 + code:7e007f/7f + cheat + description:Infinite health - P2 + code:7e0081/7f + +cartridge sha256:1711fe9010232b41ec406900e5b4ef528dd2beaa97b27d94ed7eef57d63904a0 + name:Taz-Mania (USA) (Rev 1) + cheat + description:Infinite health + code:99e072/a5 + cheat + description:Infinite time + code:99e292/00 + cheat + description:Infinite continues (don't combine with start on act codes) + code:99e1b8/ad + cheat + description:Advance to next level after getting 1 kiwi + code:96bb59/84 + cheat + description:Faster timer + code:99e27c/04 + cheat + description:1 minute to complete act 1, level 1 + code:99802a/01 + cheat + description:5 minutes to complete act 1, level 1 + code:99802a/05 + cheat + description:Kiwi's worth 2 + code:96bb59/fe + cheat + description:Kiwi's worth 4 + code:96bb59/fc + cheat + description:Kiwi's worth 5 + code:96bb59/fb + cheat + description:Kiwi's worth 7 + code:96bb59/f9 + cheat + description:Red bird worth 0 seconds instead of 10 + code:99e245/00 + cheat + description:Red bird worth 20 seconds + code:99e245/02 + cheat + description:Red bird worth 30 seconds + code:99e245/03 + cheat + description:Red bird worth 40 seconds + code:99e245/04 + cheat + description:Red bird worth 50 seconds + code:99e245/05 + cheat + description:Start with 1/4 normal health + code:99dfdc/07 + cheat + description:Start with 1/2 normal health + code:99dfdc/0f + cheat + description:Start with 3/4 normal health + code:99dfdc/15 + cheat + description:Start with 1 continue (don't combine with start on act codes) + code:99e11e/01 + cheat + description:Start with 5 continues (don't combine with start on act codes) + code:99e11e/05 + cheat + description:Start with 7 continues (don't combine with start on act codes) + code:99e11e/07 + cheat + description:Start with 9 continues (don't combine with start on act codes) + code:99e11e/09 + cheat + description:Start with 50 continues (don't combine with start on act codes) + code:99e11e/32 + cheat + description:Start with 99 continues (don't combine with start on act codes) + code:99e11e/63 + cheat + description:Start on act 1, level 2 + code:99e188/2c+99e189/30+99e11e/01 + cheat + description:Start on act 1, level 3 + code:99e188/2c+99e189/30+99e11e/02 + cheat + description:Start on act 1 bonus level + code:99e188/2c+99e189/30 + cheat + description:Start on act 2, level 1 + code:99e188/2c+99e189/30+99e11e/04 + cheat + description:Start on act 2, level 2 + code:99e188/2c+99e189/30+99e11e/05 + cheat + description:Start on act 2, level 3 + code:99e188/2c+99e189/30+99e11e/06 + cheat + description:Start on act 2 bonus level + code:99e188/2c+99e189/30+99e11e/07 + cheat + description:Start on act 3, level 1 + code:99e188/2c+99e189/30+99e11e/08 + cheat + description:Start on act 3, level 2 + code:99e188/2c+99e189/30+99e11e/09 + cheat + description:Start on act 3, level 3 + code:99e188/2c+99e189/30+99e11e/0a + cheat + description:Start on act 3 bonus level + code:99e188/2c+99e189/30+99e11e/0b + cheat + description:Start on act 4, level 1 + code:99e188/2c+99e189/30+99e11e/0c + cheat + description:Start on act 4, level 2 + code:99e188/2c+99e189/30+99e11e/0d + cheat + description:Start on act 4, level 3 + code:99e188/2c+99e189/30+99e11e/0e + cheat + description:Start on act 4 bonus level + code:99e188/2c+99e189/30+99e11e/0f + cheat + description:Start on act 5, level 1 + code:99e188/2c+99e189/30+99e11e/10 + cheat + description:Start on act 5, level 2 + code:99e188/2c+99e189/30+99e11e/11 + cheat + description:Start on act 5, level 3 + code:99e188/2c+99e189/30+99e11e/12 + cheat + description:Infinite health (alt) + code:7e0096/1d + cheat + description:Infinite time (alt) + code:7e0098/99 + +cartridge sha256:e3bd2296b860a547bb8594485048d3e1326a416405ed9e91139c75f8927acfe3 + name:Taz-Mania (USA) + cheat + description:Infinite health + code:99e072/a5 + cheat + description:Infinite time + code:99e292/00 + cheat + description:Infinite continues (don't combine with start on act codes) + code:99e1b8/ad + cheat + description:Advance to next level after getting 1 kiwi + code:96bb59/84 + cheat + description:Faster timer + code:99e27c/04 + cheat + description:1 minute to complete act 1, level 1 + code:99802a/01 + cheat + description:5 minutes to complete act 1, level 1 + code:99802a/05 + cheat + description:Kiwi's worth 2 + code:96bb59/fe + cheat + description:Kiwi's worth 4 + code:96bb59/fc + cheat + description:Kiwi's worth 5 + code:96bb59/fb + cheat + description:Kiwi's worth 7 + code:96bb59/f9 + cheat + description:Red bird worth 0 seconds instead of 10 + code:99e245/00 + cheat + description:Red bird worth 20 seconds + code:99e245/02 + cheat + description:Red bird worth 30 seconds + code:99e245/03 + cheat + description:Red bird worth 40 seconds + code:99e245/04 + cheat + description:Red bird worth 50 seconds + code:99e245/05 + cheat + description:Start with 1/4 normal health + code:99dfdc/07 + cheat + description:Start with 1/2 normal health + code:99dfdc/0f + cheat + description:Start with 3/4 normal health + code:99dfdc/15 + cheat + description:Start with 1 continue (don't combine with start on act codes) + code:99e11e/01 + cheat + description:Start with 5 continues (don't combine with start on act codes) + code:99e11e/05 + cheat + description:Start with 7 continues (don't combine with start on act codes) + code:99e11e/07 + cheat + description:Start with 9 continues (don't combine with start on act codes) + code:99e11e/09 + cheat + description:Start with 50 continues (don't combine with start on act codes) + code:99e11e/32 + cheat + description:Start with 99 continues (don't combine with start on act codes) + code:99e11e/63 + cheat + description:Start on act 1, level 2 + code:99e188/2c+99e189/30+99e11e/01 + cheat + description:Start on act 1, level 3 + code:99e188/2c+99e189/30+99e11e/02 + cheat + description:Start on act 1 bonus level + code:99e188/2c+99e189/30 + cheat + description:Start on act 2, level 1 + code:99e188/2c+99e189/30+99e11e/04 + cheat + description:Start on act 2, level 2 + code:99e188/2c+99e189/30+99e11e/05 + cheat + description:Start on act 2, level 3 + code:99e188/2c+99e189/30+99e11e/06 + cheat + description:Start on act 2 bonus level + code:99e188/2c+99e189/30+99e11e/07 + cheat + description:Start on act 3, level 1 + code:99e188/2c+99e189/30+99e11e/08 + cheat + description:Start on act 3, level 2 + code:99e188/2c+99e189/30+99e11e/09 + cheat + description:Start on act 3, level 3 + code:99e188/2c+99e189/30+99e11e/0a + cheat + description:Start on act 3 bonus level + code:99e188/2c+99e189/30+99e11e/0b + cheat + description:Start on act 4, level 1 + code:99e188/2c+99e189/30+99e11e/0c + cheat + description:Start on act 4, level 2 + code:99e188/2c+99e189/30+99e11e/0d + cheat + description:Start on act 4, level 3 + code:99e188/2c+99e189/30+99e11e/0e + cheat + description:Start on act 4 bonus level + code:99e188/2c+99e189/30+99e11e/0f + cheat + description:Start on act 5, level 1 + code:99e188/2c+99e189/30+99e11e/10 + cheat + description:Start on act 5, level 2 + code:99e188/2c+99e189/30+99e11e/11 + cheat + description:Start on act 5, level 3 + code:99e188/2c+99e189/30+99e11e/12 + cheat + description:Infinite health (alt) + code:7e0096/1d + cheat + description:Infinite time (alt) + code:7e0098/99 + +cartridge sha256:7da4a3cfa5de4bb4722a6e2a42c26aae322b5e668f1645d8c870fb99e6080600 + name:Tecmo Secret of the Stars (USA) + cheat + description:Reach level 99 after one battle + code:00af03/00 + cheat + description:Kill one enemy to win battle (you only get exp for that one enemy) + code:00dd8c/00 + +cartridge sha256:35dd020cf57fc402417ab6e4a6c49866c5a86bba25218c0aaf7ce85cb134bcf8 + name:Tecmo Super Bowl (USA) + cheat + description:Always 1st down + code:8299c8/a5 + cheat + description:1 play to get a 1st down + code:8299cd/01 + cheat + description:2 plays to get a 1st down + code:8299cd/02 + cheat + description:3 plays to get a 1st down + code:8299cd/03 + cheat + description:5 plays to get a 1st down + code:8299cd/05 + cheat + description:7 plays to get a 1st down + code:8299cd/07 + cheat + description:Extra points worth 0 points - P1 + code:828b68/00 + cheat + description:Extra points worth 3 points - P1 + code:828b68/03 + cheat + description:Extra points worth 5 points - P1 + code:828b68/05 + cheat + description:Extra points worth 9 points - P1 + code:828b68/09 + cheat + description:Extra points worth 0 points - P2 + code:82977b/00 + cheat + description:Extra points worth 3 points - P2 + code:82977b/03 + cheat + description:Extra points worth 5 points - P2 + code:82977b/05 + cheat + description:Extra points worth 9 points - P2 + code:82977b/09 + cheat + description:Field goals worth 0 points - P1 + code:8287ef/00 + cheat + description:Field goals worth 1 points - P1 + code:8287ef/01 + cheat + description:Field goals worth 5 points - P1 + code:8287ef/05 + cheat + description:Field goals worth 9 points - P1 + code:8287ef/09 + cheat + description:Field goals worth 0 points - P2 + code:829400/00 + cheat + description:Field goals worth 1 points - P2 + code:829400/01 + cheat + description:Field goals worth 5 points - P2 + code:829400/05 + cheat + description:Field goals worth 9 points - P2 + code:829400/09 + cheat + description:Safeties worth 0 points - P1 + code:82954f/00 + cheat + description:Safeties worth 1 points - P1 + code:82954f/01 + cheat + description:Safeties worth 5 points - P1 + code:82954f/05 + cheat + description:Safeties worth 9 points - P1 + code:82954f/09 + cheat + description:Safeties worth 0 points - P2 + code:82893c/00 + cheat + description:Safeties worth 1 points - P2 + code:82893c/01 + cheat + description:Safeties worth 5 points - P2 + code:82893c/05 + cheat + description:Safeties worth 9 points - P2 + code:82893c/09 + cheat + description:Touchdowns worth 0 points - P1 + code:82898b/00 + cheat + description:Touchdowns worth 3 points - P1 + code:82898b/03 + cheat + description:Touchdowns worth 5 points - P1 + code:82898b/05 + cheat + description:Touchdowns worth 8 points - P1 + code:82898b/08 + cheat + description:Touchdowns worth 0 points - P2 + code:82affb/00+82959e/00 + cheat + description:Touchdowns worth 3 points - P2 + code:82affb/03+82959e/03 + cheat + description:Touchdowns worth 5 points - P2 + code:82affb/05+82959e/05 + cheat + description:Touchdowns worth 9 points - P2 + code:82affb/09+82959e/09 + cheat + description:0 timeouts for the first half - both players + code:84c177/00 + cheat + description:2 timeouts for the first half - both players + code:84c177/02 + cheat + description:7 timeouts for the first half - both players + code:84c177/07 + cheat + description:9 timeouts for the first half - both players + code:84c177/09 + cheat + description:0 timeouts for the first half - P1 + code:84c178/64 + cheat + description:0 timeouts for the first half - P2 + code:84c17a/64 + cheat + description:0 timeouts for the second half - both players + code:84c1c8/00 + cheat + description:2 timeouts for the second half - both players + code:84c1c8/02 + cheat + description:7 timeouts for the second half - both players + code:84c1c8/07 + cheat + description:9 timeouts for the second half - both players + code:84c1c8/09 + cheat + description:0 timeouts for the second half - P1 + code:84c1c9/64 + cheat + description:0 timeouts for the second half - P2 + code:84c1cb/64 + cheat + description:Timeouts are not reset at half-time - P1 + code:84c1c9/a5 + cheat + description:Timeouts are not reset at half-time - P2 + code:84c1cb/a5 + cheat + description:Quarters start at 2 minutes 30 seconds + code:819eed/30+819eee/02 + +cartridge sha256:8cfd4c5525f4bd4bba5af7e2323f1e61f27ce97c6d5617cfa685c9276fbf6407 + name:Tecmo Super Bowl III - Final Edition (USA) + cheat + description:Infinite ability points in the edit menu + code:bce2b5/ea + +cartridge sha256:14bce564f976d1431127259edbcb23c52c79361fed9814d307d627c4650e800e + name:Tecmo Super NBA Basketball (USA) + cheat + description:Never miss a shot (hold Y and press the shot button) + code:8c8e53/30+8c8e50/ad+8c8e51/0b+8c8e52/0a+8c8e54/11 + +cartridge sha256:5b82cdd6f2da56f43680d6a5021faebe2e06036d30602c1a7917aa414cf8b5f4 + name:Teenage Mutant Ninja Turtles IV - Turtles in Time (USA) + cheat + description:Invincibility + code:00b98e/ea+00b992/95+00b98f/a9+00b990/02+00b991/00 + cheat + description:Infinite health + code:00dd10/b5 + cheat + description:Infinite lives + code:00cea6/00 + cheat + description:Infinite Special Attack - Both Players + code:00c297/b5 + cheat + description:One hit kills (disable during Shredder's first fight) + code:0485a7/80 + cheat + description:Hit anywhere - P1 + code:03828f/fc + cheat + description:Hit anywhere - P2 + code:03829f/fc + cheat + description:Start with 1 life instead of 3 + code:01d6bc/00 + cheat + description:Start with 5 lives + code:01d6bc/04 + cheat + description:Start with 10 lives + code:01d6bc/09 + cheat + description:Start with 25 lives + code:01d6bc/24 + cheat + description:Start with 50 lives + code:01d6bc/49 + cheat + description:Start with 75 lives + code:01d6bc/74 + cheat + description:Start with 100 lives + code:01d6bc/99 + cheat + description:Start on level 2 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/01 + cheat + description:Start on level 4 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/03 + cheat + description:Start on level 5 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/04 + cheat + description:Start on level 6 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/05 + cheat + description:Start on level 7 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/06 + cheat + description:Start on level 8 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/07 + cheat + description:Start on level 9 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/08 + cheat + description:Start on level 10 + code:0497bb/85+0497bc/81+0497bd/00+0497ba/09 + cheat + description:Infinite health (alt) (enable after level starts) + code:7e044a/56 + cheat + description:Infinite time + code:7e0096/99 + cheat + description:Infinite time (alt) + code:7e0098/02 + +cartridge sha256:849141370f164d6db3e5709da670726f958ce13ffef69319564db3fb0b12c69d + name:Teenage Mutant Ninja Turtles - Tournament Fighters (USA) + cheat + description:Health doesn't decrease over time + code:83a961/00 + cheat + description:Automatic and infinite continues + code:80c887/bd + cheat + description:Hit anywhere - P1 + code:848559/80 + cheat + description:Hit anywhere - P2 + code:8485f5/80 + cheat + description:Leonardo is replaced by Rat King + code:81adc9/0a + cheat + description:Leonardo is replaced by Karai + code:81adc9/0b + cheat + description:Raphael is replaced by Rat King + code:81adcb/0a + cheat + description:Raphael is replaced by Karai + code:81adcb/0b + cheat + description:Donatello is replaced by Rat King + code:81adcd/0a + cheat + description:Donatello is replaced by Karai + code:81adcd/0b + cheat + description:Matches are 10 seconds long (leave menu option on 60) + code:81b085/10 + cheat + description:Matches are 15 seconds long (leave menu option on 60) + code:81b085/15 + cheat + description:Matches are 20 seconds long (leave menu option on 60) + code:81b085/20 + cheat + description:Matches are 75 seconds long (leave menu option on 60) + code:81b085/75 + cheat + description:Ultimate attack can be done any time + code:83a8cb/01 + cheat + description:Ultimate attack can be done with about 1/4 health + code:83a8cb/14 + cheat + description:Ultimate attack can be done with about 1/2 health + code:83a8cb/28 + cheat + description:Ultimate attack can be done with about 3/4 health + code:83a8cb/3c + cheat + description:Health decreases twice as fast + code:83a961/02 + cheat + description:After doing an ultimate attack, health bar goes to about 1/4 + code:83a8ea/14 + cheat + description:After doing an ultimate attack, health bar goes to about 1/2 + code:83a8ea/28 + cheat + description:After doing an ultimate attack, health bar goes to about 3/4 + code:83a8ea/3c + cheat + description:Start with 1/4 health - both players + code:85ff53/18 + cheat + description:Start with 1/2 health - both players + code:85ff53/30 + cheat + description:Start with 3/4 health - both players + code:85ff53/48 + cheat + description:Start with no continues (leave menu option on 3) + code:819266/00 + cheat + description:Start with 1 continue + code:819266/02 + cheat + description:Start with 3 continues + code:819266/04 + cheat + description:Start with 5 continues + code:819266/06 + cheat + description:Start with 7 continues + code:819266/08 + cheat + description:Infinite health + code:7e0ee4/60 + cheat + description:Full power bar + code:7e1ac0/60 + cheat + description:Empty power bar - opponent + code:7e1b10/00 + cheat + description:Opponent dizzy after every knockdown + code:7e0fc2/10 + cheat + description:Win one round to win match + code:7e1950/02 + +cartridge sha256:8620203da71d32d017bb21f542864c1d90705b87eb67815d06b43f09120318aa + name:Tengai Makyou Zero (Japan) + cheat + description:No random battles + code:7e1659/08 + cheat + description:Infinite HP - character 1 + code:7e1694/e7+7e1695/03 + cheat + description:Infinite HP - character 2 + code:7e1696/e7+7e1697/03 + cheat + description:Infinite HP - character 3 + code:7e1698/e7+7e1699/03 + cheat + description:Infinite MP - character 1 + code:7e16c8/e7+7e16c9/03 + cheat + description:Infinite MP - character 2 + code:7e16ca/e7+7e16cb/03 + cheat + description:Infinite MP - character 3 + code:7e16cc/e7+7e16cd/03 + cheat + description:Fast level gain + code:7e1950/ff+7e1951/ff + +cartridge sha256:bd7074ef4a05d790646abe145ffd2587fb48044e4b730286d807abe102841177 + name:Terminator, The (USA) + cheat + description:Infinite lives (not on car stages) + code:80b18c/ad + cheat + description:Infinite Grenades + code:06c1e5/2c + cheat + description:Infinite Missiles + code:06cd71/ad + cheat + description:10 Grenades on pick-up + code:06cb9c/0a + cheat + description:2 Grenades on pick-up + code:06cb9c/02 + cheat + description:Longer invulnerability after being hit + code:06b961/ff + cheat + description:Shorter invulnerability after being hit + code:06b961/1f + cheat + description:Don't lose Grenades on dying + code:06c158/2c + cheat + description:Don't lose Missiles on dying + code:06c155/2c + cheat + description:Get Rapid Fire on dying + code:06c151/03 + cheat + description:Start with Rapid Fire + code:808237/03 + cheat + description:Start with 9 lives + code:80c6db/09 + cheat + description:Start with 1 life + code:80c6db/01 + +cartridge sha256:06db3be569a587d79b51bfc684fd2ebdea977863875aedec88218fbb4169c21b + name:Terminator 2 - Judgment Day (USA) + cheat + description:Infinite energy + code:7e1407/c8 + cheat + description:Infinite health - John + code:7e1452/64 + cheat + description:Infinite health - Sarah + code:7e149d/64 + cheat + description:Infinte ammo + code:7e1407/ff + +cartridge sha256:3cdebbd8adc4bb6773a7995f542fdac49adefca71cba583255a1c1bf37ac3946 + name:Tetris & Dr. Mario (USA) + cheat + description:Tetris - Level never increases + code:819d26/80 + cheat + description:Tetris - After the first level your level increases every line + code:819d29/01 + cheat + description:Tetris - The same piece always drops + code:81923a/a9+81923b/02+81923c/00 + cheat + description:Tetris - Always at high speed + code:8197d3/a9+8197d4/0a+8197d5/ea + cheat + description:Dr. Mario - Drop pieces anywhere to complete level + code:82a343/80+82a34f/a9 + cheat + description:Dr. Mario - The same piece always drops until you hit the change button + code:82a05a/a9+82a05b/0a+82a05c/ea + cheat + description:Dr. Mario - The same piece always drops + code:828b3c/a9+828b3d/0a+828b3e/ea + cheat + description:Tetris 2 - Select any round - 1P (at round select meter, keep pressing right) + code:849b00/50 + cheat + description:Tetris 2 - Tile speed always at 0 + code:82a874/a9+82a875/00+82a876/00 + cheat + description:Tetris 2 - Tile speed always at 255 + code:82a874/a9+82a875/ff+82a876/00 + cheat + description:Tetris 2 - More time to place the blocks where you want them, even after they hit the ground (left and right only) + code:82976a/80 + +cartridge sha256:70dea29a928c1625def31c862dc74960e39e587e416b45829efc21f13ebd9630 + name:Tetris 2 (USA) (Rev 1) + cheat + description:Select any round + code:849b00/50 + cheat + description:Tile speed always at 0 + code:82a874/a9+82a875/00+82a876/00 + cheat + description:Tile speed always at 255 + code:82a874/a9+82a875/ff+82a876/00 + cheat + description:More time to place the blocks where you want them + code:82976a/80 + +cartridge sha256:accc836c3adabadc810fbe35702c6a64d50a09f4c672d2734fa58b251d7a20aa + name:Tetris 2 (USA) + cheat + description:Select any round + code:849b00/50 + cheat + description:Tile speed always at 0 + code:82a874/a9+82a875/00+82a876/00 + cheat + description:Tile speed always at 255 + code:82a874/a9+82a875/ff+82a876/00 + cheat + description:More time to place the blocks where you want them + code:82976a/80 + +cartridge sha256:4aee5b05ae11643fc6cb7ed32dfd4e82bbb52d03b12aabb080af35e2df6f562f + name:Tetsuwan Atom (Japan) + cheat + description:Invincibility + code:9c8271/d0 + cheat + description:Infinite health + code:81a812/ad + cheat + description:Infinite lives + code:81a569/ad + +cartridge sha256:d50aaa41e153ca356eee16a9deccb1a763ee56ebbe6c80cd28c5ad1db66a5316 + name:Thunder Spirits (USA) + cheat + description:Infinite lives + code:00ada9/a9 + cheat + description:Infinite lives (alt) + code:c0ada9/ad + cheat + description:Infinite credits + code:00c6ac/ea + cheat + description:Infinite credits (alt) + code:c0c6b1/ad + cheat + description:Hit anywhere + code:00ae70/24+00ae89/24+00ae57/24+00aea2/24+00ae1e/24 + cheat + description:Keep captured weapon until game ends (except claw and shield) + code:00adb9/ad+00adbe/ad + cheat + description:Continue with 1 life + code:00c700/9c + cheat + description:Continue with 2 lives + code:00c6fd/00+00c6fc/a9 + cheat + description:Continue with 5 lives + code:00c6fd/03+00c6fc/a9 + cheat + description:Continue with 7 lives + code:00c6fd/05+00c6fc/a9 + cheat + description:Continue with 9 lives + code:00c6fd/07+00c6fc/a9 + cheat + description:Start with 1 credit + code:009113/a3 + cheat + description:Start with 2 credits + code:009113/b2 + cheat + description:Start with 3 credits + code:009113/92 + cheat + description:Start with 5 credits + code:009113/9f + cheat + description:Start with 8 credits + code:009112/8b+009113/a2 + cheat + description:Start with 12 credits + code:009112/04+009113/ae + cheat + description:Start with 1 life + code:0090e1/ff+0090e0/a9 + cheat + description:Start with 2 lives + code:0090e1/00+0090e0/a9 + cheat + description:Start with 5 lives + code:0090e1/03+0090e0/a9 + cheat + description:Start with 7 lives + code:0090e1/05+0090e0/a9 + cheat + description:Start with 9 lives + code:0090e1/07+0090e0/a9 + cheat + description:Start with 25 lives + code:0090e1/17+0090e0/a9 + cheat + description:Start with 50 lives + code:0090e1/30+0090e0/a9 + cheat + description:Start with 100 lives + code:0090e1/62+0090e0/a9 + cheat + description:Stage modifier + code:7e1a98/00 + cheat + description:Start on stage 2 + code:008a7c/01+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 3 + code:008a7c/02+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 4 + code:008a7c/03+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 5 + code:008a7c/04+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 6 + code:008a7c/05+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 7 + code:008a7c/06+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Start on stage 8 + code:008a7c/07+008a7b/a9+008a7d/00+008a7e/ea + cheat + description:Invincibility + code:7e0418/7b + cheat + description:Invincibility (alt) + code:00ad90/77 + +cartridge sha256:eb958801fd1f08771e5a0933f7701d633262efbfe8d47de21dda18e3b77670de + name:Tick, The (USA) + cheat + description:Infinite lives + code:80a536/00 + cheat + description:Most kicks are stronger + code:bf8549/0c + cheat + description:Most kicks kill most enemies + code:bf8549/1f + +cartridge sha256:8e82f98d2e62bc1e5fcf2386c2b5ca54998398220efcedd67858aaaa92289a42 + name:Time Slip (USA) + cheat + description:Invincibility + code:01a4de/ea + cheat + description:Infinite health + code:019230/ad + cheat + description:Infinite lives + code:00ddfb/ad + cheat + description:Infinite ammo + code:01a3e4/ad + cheat + description:Infinite TGS meter + code:01b729/ad + cheat + description:Hit anywhere + code:00955f/80+009560/16+009594/ad+00959e/ad + cheat + description:Keep gun power-ups after dying + code:00de2f/a0+00de2a/a0 + cheat + description:Flash 2x longer when hit + code:01923a/80 + cheat + description:Barely flash at all when hit + code:01923a/10 + cheat + description:Fewer enemies + code:018a14/ad+0189af/ad+018b10/ad+0189a7/ad + cheat + description:Start with all weapons and 9 rounds + code:0082b1/09 + cheat + description:Start with 16 lives + code:00829d/ff + cheat + description:Start with 4 health bars - after 1st life + code:00ddf6/0f + cheat + description:Start with 3 health bars - after 1st life + code:00ddf6/07 + cheat + description:Start with 4 health bars - 1st life + code:0082a5/0f + cheat + description:Start with 3 health bars - 1st life + code:0082a5/07 + cheat + description:Start on stage - Cretaceous + code:00dc2d/a9+00dc2f/00+00dc30/8d+00dc2e/01 + cheat + description:Start on stage - Egypt + code:00dc2d/a9+00dc2f/00+00dc30/8d+00dc2e/02 + cheat + description:Start on stage - Rome + code:00dc2d/a9+00dc2f/00+00dc30/8d+00dc2e/03 + cheat + description:Start on stage - Invasion 2147 + code:00dc2d/a9+00dc2f/00+00dc30/8d+00dc2e/04 + cheat + description:Start on stage - Tirmat + code:00dc2d/a9+00dc2f/00+00dc30/8d+00dc2e/05 + +cartridge sha256:fa7e2b40093f0cc7233cc77e95bbbea2144c8183dec10446590396fffd7cda37 + name:Time Trax (USA) + cheat + description:Infinite health + code:81f1b6/ad + cheat + description:Infinite lives + code:81f314/ad + cheat + description:Invincibility + code:84e948/ff+8187ff/ff + cheat + description:Infinite health (alt) + code:7e14b5/06 + cheat + description:Infinite Time Stall + code:7e14b9/30 + +cartridge sha256:16fb965130e57f37dda2466f23820f091f8b96758aa7e30ba4fd63cb618e5ddb + name:Timecop (USA) + cheat + description:Invincibility + code:809ec8/00 + cheat + description:Don't flash when invincible + code:809ed1/80 + cheat + description:Infinite health + code:7e06f3/99 + cheat + description:Infinite Gun + code:7e06f5/99 + cheat + description:Infinite Bombs + code:7e06f7/99 + cheat + description:Infinite time + code:7e0638/63 + +cartridge sha256:271a67b32b3bb00ceb0f4e7d81494888d0d821635f0f936d481dfbe671567c08 + name:Timon & Pumbaa's Jungle Games (USA) + cheat + description:Infinite ammo/balls + code:7e00dc/09 + +cartridge sha256:0503cd93b4d211a825acd47ff3813668b4ce68890c8be2fbfe5ac2b46882dfcf + name:Tin Star (USA) + cheat + description:Infinite health + code:7e09c8/a0 + cheat + description:Infinite lives + code:7e0928/09 + cheat + description:Bosses die automatically + code:7e0b78/00 + cheat + description:Gain money much faster + code:7e182a/50+7e182b/c3 + cheat + description:Max money + code:7e07dd/09+7e07dc/09+7e07db/09+7e07da/09+7e07d9/09+7e07d8/09 + cheat + description:Have $9,000,000 + code:7e07d8/09 + +cartridge sha256:5b8a7309910ae040b6301bdc0ad09fa1991b2b7210a6b76931cd91ce0c82c424 + name:Tinhead (Europe) (Proto) + cheat + description:Infinite health + code:009803/ad + cheat + description:Infinite lives + code:0087f6/ad + cheat + description:Infinite Bombs + code:0097f0/ad + +cartridge sha256:71de4dec6a8e8be685627b6e929317f7cefb836997059bbd3b438ccc07a60044 + name:Tintin - Prisoners of the Sun (Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:80823c/d0+828591/d0 + cheat + description:Infinite health + code:82bb5e/cd + cheat + description:Infinite time + code:82be5b/af + cheat + description:Infinite lives + code:82bb7f/cd + cheat + description:Infinite health (alt) + code:7e059b/04 + cheat + description:Infinite time (alt) + code:7f5b7f/63 + +cartridge sha256:da8b8bccebf51b70213adecda37387d1bdb55aeb7bc0805bb1be1cd9b514daf6 + name:Tintin in Tibet (Europe) (En,Fr,De,Nl) + cheat + description:Invincibility (after first hit) + code:7e050f/2c + cheat + description:Infinite health + code:7e05c9/04 + cheat + description:Infinite lives + code:7e05cb/03 + cheat + description:Infinite time + code:7f59ae/06 + +cartridge sha256:ba679a11264e9695895a6c17358a41e8459be06166d056811df9c2738fef3d0d + name:Tiny Toon Adventures - Buster Busts Loose! (USA) + cheat + description:Infinite health (when hit, a fake empty heart appears) + code:8ff05a/ea + cheat + description:Infinite lives (except football level) + code:80ef2c/00 + cheat + description:Infinite lives (football level) + code:80af45/00 + cheat + description:Infinite dash meter + code:80d03f/a5 + cheat + description:Five heart maximum on challenge level + code:81ba2b/06 + cheat + description:1-up gives 2-up (not on mystery weight challenge level, or by collecting stars) + code:808697/02 + cheat + description:Small star worth 2 + code:8feefa/02 + cheat + description:Small star worth 5 + code:8feefa/05 + cheat + description:Small star worth 10 + code:8feefa/10 + cheat + description:Gold Gogo Dodo Trophy lasts 1/2 as long + code:83812b/01 + cheat + description:Gold Gogo Dodo Trophy lasts 2x as long + code:83812b/04 + cheat + description:Choose bonus level after completing a level + code:80a5f5/a5 + cheat + description:Passwords work on any difficulty level (not just Children level) + code:91ea81/34 + cheat + description:Continue with 1 life + code:80a647/01 + cheat + description:Continue with 5 lives + code:80a647/05 + cheat + description:Continue with 10 lives + code:80a647/10 + cheat + description:Continue with 25 lives + code:80a647/25 + cheat + description:Continue with 50 lives + code:80a647/50 + cheat + description:Continue with 99 lives + code:80a647/99 + cheat + description:Start with 1 life + code:808518/01 + cheat + description:Start with 5 lives + code:808518/05 + cheat + description:Start with 10 lives + code:808518/10 + cheat + description:Start with 25 lives + code:808518/25 + cheat + description:Start with 50 lives + code:808518/50 + cheat + description:Start with 99 lives + code:808518/99 + cheat + description:Start with no continues on normal level - handicap + code:81800c/00 + cheat + description:Start with 7 continues on normal level + code:81800c/07 + cheat + description:Start with 9 continues on normal level + code:81800c/09 + cheat + description:Start with no continues on challenge level + code:81800d/00 + cheat + description:Start with 5 continues on challenge level + code:81800d/05 + cheat + description:Start with 7 continues on challenge level + code:81800d/07 + cheat + description:Start with 9 continues on challenge level + code:81800d/09 + cheat + description:Start with 1 heart on Children or Normal difficulty levels (don't pick challenge level) + code:80a407/01 + cheat + description:Start with 4 hearts on Children or Normal difficulty levels, 2 on Challenge + code:80a407/04 + cheat + description:Start with 5 hearts on Children or Normal difficulty levels, 3 on Challenge + code:80a407/05 + +cartridge sha256:08d808e9c5851e4301a38a56b350a20ea9e3adbef51546e87e1785d691d0f2d5 + name:TKO Super Championship Boxing (USA) + cheat + description:Infinite punch meters - both players + code:01b3b5/24 + cheat + description:Infinite punch meter - P1 + code:009118/24 + cheat + description:Infinite punch meter - P2 + code:00914e/24 + cheat + description:9 minutes per round + code:008b4c/09 + cheat + description:6 minutes per round + code:008b4c/06 + cheat + description:1 minute per round + code:008b4c/01 + cheat + description:Allowed only 3 punches in punch meter - P1 + code:009122/03+008b7e/03 + cheat + description:Allowed only 3 punches in punch meter - P2 + code:009158/03+008b7e/03 + +cartridge sha256:32d0f1ca5b91fd9b2caf81422fb9e8fb30bc091f0b2a429b9269dd307fcba4fd + name:Todd McFarlane's Spawn - The Video Game (USA) + cheat + description:Invincibility after one hit (invisible) + code:c14ae8/ad + cheat + description:Almost invincible (blinking) + code:c14ae6/ea + cheat + description:Infinite health + code:c14abc/ad + cheat + description:Infinite special moves + code:c13a0d/ad + cheat + description:Hit anywhere + code:c512ba/24 + cheat + description:Don't blink after getting hit + code:c50596/10 + cheat + description:Falling doesn't use life points + code:c11824/ad + cheat + description:Special moves don't use life points + code:c13a0d/ad + cheat + description:Some bullets do 2x damage + code:c50237/08 + cheat + description:Some bullets do no damage + code:c50237/00 + cheat + description:Some bullets kill you + code:c50237/ff + cheat + description:Some enemy punches electrocute you + code:c532ba/09 + cheat + description:Some enemy punches do no damage + code:c532ba/00 + cheat + description:Some enemy punches kill you + code:c532ba/ff + cheat + description:Guys with pipes do 2x damage + code:c39b47/09+c3aa1e/09 + cheat + description:Guys with pipes do no damage + code:c39b47/00+c3aa1e/00 + cheat + description:Guys with pipes kill + code:c39b47/ff+c3aa1e/ff + cheat + description:Flaming bottles do 2x damage + code:c52890/09+c527e8/09 + cheat + description:Flaming bottles do no damage + code:c52890/00+c527e8/00 + cheat + description:Flaming bottles kill + code:c52890/ff+c527e8/ff + cheat + description:Start with 1/4 health + code:c29748/10 + cheat + description:Start with 1/2 health + code:c29748/2a + cheat + description:Start with 3/4 health + code:c29748/3e + cheat + description:Invincibility + code:7e1f56/1f + cheat + description:Infinite health (alt) + code:7e1f00/63 + +cartridge sha256:4f500da19dbb1557a7bc0ce14437098c1402478d573fb569303b81c011f86fbf + name:Tom and Jerry (USA) + cheat + description:Invincibility + code:7e14c8/33 + cheat + description:Infinite hearts + code:7e1242/04 + cheat + description:Infinite lives + code:7e14fc/09 + cheat + description:Infinite time + code:7e157a/63 + cheat + description:Infinite Cheese Bits + code:7e155e/63 + +cartridge sha256:ca9889f17f184b3d99a2eaaa82af73e366f03ed00313fdd369e5e023b208e788 + name:Top Gear (USA) + cheat + description:Always finish first + code:00a1f2/18 + cheat + description:Infinite fuel - P1 + code:05d67b/ad + cheat + description:Infinite fuel - P2 + code:05dee1/ad + cheat + description:Infinite nitro boosts - P1 + code:00ba22/ea + cheat + description:Infinite nitro boosts - P2 + code:00ba8b/ea + cheat + description:Nitro boost lasts until end of race - P1 + code:00ba47/ad + cheat + description:Nitro boost lasts until end of race - P2 + code:00bab0/ad + cheat + description:Race in any country + code:0f9337/80 + cheat + description:Don't slow down offroad + code:05d858/ad + cheat + description:Don't slow down against obstacles + code:05d6e9/00 + cheat + description:Don't slow down against cars + code:05e4bc/00+05e4b7/00 + cheat + description:Start with 1/2 fuel + code:00d996/53 + cheat + description:Start with 3/4 fuel + code:00d996/7c + cheat + description:Start with no nitro boosts instead of 3 + code:0082e0/00 + cheat + description:Start with 1 nitro boost + code:0082e0/01 + cheat + description:Start with 2 nitro boosts + code:0082e0/02 + cheat + description:Start with 6 nitro boosts + code:0082e0/06 + cheat + description:Start with 9 nitro boosts + code:0082e0/09 + +cartridge sha256:76b2702c4be8b668c1017f2817c280283c275eaa41535bf6ffa2b8d2220b68c6 + name:Top Gear 2 (USA) + cheat + description:Infinite nitro + code:808e31/cd + cheat + description:Infinite nitros - P1 + code:808e31/ad + cheat + description:Infinite nitros - P2 + code:80a695/ad + cheat + description:Infinite fuel + code:809a39/ad + cheat + description:Infinite money + code:9fac27/bd + cheat + description:Fuel never runs out + code:809905/a5 + cheat + description:Always finish first + code:80defe/8e + cheat + description:1st place gives $50,000 instead of $10,000 + code:9fef46/32 + cheat + description:2nd place gives $50,000 instead of $6,000 + code:9fef48/32 + cheat + description:3rd place gives $50,000 instead of $4,000 + code:9fef4a/32 + cheat + description:4th place gives $50,000 instead of $3,000 + code:9fef4c/32 + cheat + description:5th place gives $50,000 instead of $2,000 + code:9fef4e/32 + cheat + description:6th place gives $50,000 instead of $1,000 + code:9fef50/32 + cheat + description:7th place gives $50,000 instead of $0 + code:9fef52/32 + cheat + description:8th place gives $50,000 instead of $0 + code:9fef54/32 + cheat + description:9th place gives $50,000 instead of $0 + code:9fef56/32 + cheat + description:10th place gives $50,000 instead of $0 + code:9fef58/32 + cheat + description:1st place is worth 20 points instead of 10 + code:9fe35d/14 + cheat + description:2nd place is worth 20 points instead of 6 + code:9fe35f/14 + cheat + description:3rd place is worth 20 points instead of 4 + code:9fe361/14 + cheat + description:4th place is worth 20 points instead of 3 + code:9fe363/14 + cheat + description:5th place is worth 20 points instead of 2 + code:9fe365/14 + cheat + description:6th place is worth 20 points instead of 1 + code:9fe367/14 + cheat + description:7th place is worth 20 points instead of 0 + code:9fe369/14 + cheat + description:8th place is worth 20 points instead of 0 + code:9fe36b/14 + cheat + description:9th place is worth 20 points instead of 0 + code:9fe36d/14 + cheat + description:10th place is worth 20 points instead of 0 + code:9fe36f/14 + cheat + description:Everything is free (must have enough to buy) + code:9fac27/49+9fabe2/7d + cheat + description:2nd engine costs $1K instead of $30K + code:9fac71/01 + cheat + description:2nd engine costs $15K instead of $30K + code:9fac71/0f + cheat + description:3rd engine costs $1K instead of $50K + code:9fac73/01 + cheat + description:3rd engine costs $25K instead of $50K + code:9fac73/19 + cheat + description:4th engine costs $1K instead of $80K + code:9fac75/01 + cheat + description:4th engine costs $40K instead of $80K + code:9fac75/28 + cheat + description:2nd wet tires are free + code:9fac79/00 + cheat + description:3rd wet tires are free + code:9fac7b/00 + cheat + description:4th wet tires are free + code:9fac7d/00 + cheat + description:2nd dry tires are free + code:9fac81/00 + cheat + description:3rd dry tires are free + code:9fac83/00 + cheat + description:4th dry tires are free + code:9fac85/00 + cheat + description:2nd gear box costs $1K instead of $10K + code:9fac89/01 + cheat + description:2nd gear box costs $5K instead of $10K + code:9fac89/05 + cheat + description:3rd gear box costs $1K instead of $30K + code:9fac8b/01 + cheat + description:3rd gear box costs $15K instead of $30K + code:9fac8b/0f + cheat + description:4th gear box costs $1K instead of $50K + code:9fac8d/01 + cheat + description:4th gear box costs $25K instead of $50K + code:9fac8d/19 + cheat + description:2nd nitro costs $1K instead of $5K + code:9fac91/01 + cheat + description:2nd nitro costs $2K instead of $5K + code:9fac91/02 + cheat + description:3rd nitro costs $1K instead of $15K + code:9fac93/01 + cheat + description:3rd nitro costs $7K instead of $15K + code:9fac93/07 + cheat + description:4th nitro costs $1K instead of $30K + code:9fac95/01 + cheat + description:4th nitro costs $15K instead of $30K + code:9fac95/0f + cheat + description:2nd side armor costs $1K instead of $5K + code:9faca1/01 + cheat + description:2nd side armor costs $2K instead of $5K + code:9faca1/02 + cheat + description:3rd side armor costs $1K instead of $10K + code:9faca3/01 + cheat + description:3rd side armor costs $5K instead of $10K + code:9faca3/05 + cheat + description:4th side armor costs $1K instead of $20K + code:9faca5/01 + cheat + description:4th side armor costs $10K instead of $20K + code:9faca5/0a + cheat + description:2nd rear armor costs $1K instead of $5K + code:9faca9/01 + cheat + description:2nd rear armor costs $2K instead of $5K + code:9faca9/02 + cheat + description:3rd rear armor costs $1K instead of $10K + code:9facab/01 + cheat + description:3rd rear armor costs $5K instead of $10K + code:9facab/05 + cheat + description:4th rear armor costs $1K instead of $20K + code:9facad/01 + cheat + description:4th rear armor costs $10K instead of $20K + code:9facad/0a + cheat + description:2nd front armor costs $1K instead of $5K + code:9facb1/01 + cheat + description:2nd front armor costs $2K instead of $5K + code:9facb1/02 + cheat + description:3rd front armor costs $1K instead of $10K + code:9facb3/01 + cheat + description:3rd front armor costs $5K instead of $10K + code:9facb3/05 + cheat + description:4th front armor costs $1K instead of $20K + code:9facb5/01 + cheat + description:4th front armor costs $10K instead of $20K + code:9facb5/0a + cheat + description:Start with 0 nitros + code:80d0c2/00 + cheat + description:Start with 2 nitros + code:80d0c2/02 + cheat + description:Start with 4 nitros + code:80d0c2/04 + cheat + description:Start with 8 nitros + code:80d0c2/08 + cheat + description:Start with 10 nitros + code:80d0c2/0a + +cartridge sha256:6be49983976564f1fd9eff2f14f5bb41d3a0ff48573e39318088ecce286aca62 + name:Top Gear 3000 (USA) + cheat + description:Always finish first + code:81f1ad/ae + cheat + description:Infinite fuel + code:83ed82/a5 + cheat + description:Infinite Nitro + code:83eb4a/c5 + cheat + description:Infinite time + code:7e005b/00 + cheat + description:Infinite money + code:7e0390/75+7e038f/30 + +cartridge sha256:9bf884be5627d38f060ad7f3a61ea1fea1474d416e1d037d33014ca9d5205c1d + name:Total Carnage (USA) + cheat + description:Invincibility + code:8bdc39/80 + cheat + description:Infinite lives + code:8befd9/a5 + cheat + description:Infinite Time Bombs + code:8bd755/24 + cheat + description:Shields last longer + code:809aee/08 + cheat + description:Shields don't last last as long + code:809aee/00 + cheat + description:Weapons don't run out until you die or change weapons + code:8be040/a5 + cheat + description:Join in with 2 lives and 3 Time Bombs + code:8098ac/01 + cheat + description:Join in with 10 lives and 9 Time Bombs + code:8098ac/09 + cheat + description:Start with 2 lives + code:83a4e8/01 + cheat + description:Start with 10 lives + code:83a4e8/09 + cheat + description:Start with 1 Time Bomb + code:83a500/01+809970/24 + cheat + description:Start with 9 Time Bombs + code:83a500/09 + cheat + description:Invincibility (alt) + code:8bdc39/80 + cheat + description:Infinite Shield - P1 + code:7e0463/01 + cheat + description:Infinite Shield - P2 + code:7e04ab/01 + cheat + description:Infinite lives - P1 + code:7e0480/09 + cheat + description:Infinite lives - P2 + code:7e04c8/09 + cheat + description:Infinite Time Bombs - P1 + code:7e0481/09 + cheat + description:Infinite Time Bombs - P2 + code:7e04c9/09 + cheat + description:Rapid Fire - P1 + code:7e0477/03 + cheat + description:Rapid Fire - P2 + code:7e04bf/03 + cheat + description:Always have Speed Shoes - P1 + code:7e045e/01+7e0468/01 + cheat + description:Always have Speed Shoes - P2 + code:7e04a6/01+7e04b0/01 + cheat + description:Have normal Gun - P1 + code:7e0476/00 + cheat + description:Have normal Gun - P2 + code:7e04be/00 + cheat + description:Have Gatling Ball Gun - P1 + code:7e0476/0f + cheat + description:Have Gatling Ball Gun - P2 + code:7e04be/0f + cheat + description:Have 3-way Gun - P1 + code:7e0476/1e + cheat + description:Have 3-way Gun - P2 + code:7e04be/1e + cheat + description:Have Rocket Launcher - P1 + code:7e0476/2d + cheat + description:Have Rocket Launcher - P2 + code:7e04be/2d + cheat + description:Have Blue Flame Thrower - P1 + code:7e0476/4c + cheat + description:Have Blue Flame Thrower - P2 + code:7e04be/4c + cheat + description:Have Ball Launcher - P1 + code:7e0476/5a + cheat + description:Have Ball Launcher - P2 + code:7e04be/5a + cheat + description:Have 150 Keys - P1 + code:7e0485/96 + cheat + description:Have 150 Keys - P2 + code:7e04cd/96 + cheat + description:Disable hurry up timer + code:7e00af/00+7e00b0/00 + +cartridge sha256:345e795000e74f51704774edfc8049473461761a65eb47cab710caa29e09897b + name:Toy Story (USA) + cheat + description:Invincibility + code:989b35/ad + cheat + description:Infinite lives + code:989b55/af + cheat + description:Start with 5 more lives than usual + code:87e20e/08 + cheat + description:Start with 10 more lives than usual + code:87e20e/0f + cheat + description:Start with 25 more lives than usual + code:87e20e/1e + cheat + description:Start with 50 more lives than usual + code:87e20e/37 + cheat + description:Start on level 2 + code:88cb82/01 + cheat + description:Start on level 3 + code:88cb82/02 + cheat + description:Start on level 4 + code:88cb82/03 + cheat + description:Start on level 5 + code:88cb82/04 + cheat + description:Start on level 6 + code:88cb82/05 + cheat + description:Start on level 7 + code:88cb82/06 + cheat + description:Start on level 8 + code:88cb82/07 + cheat + description:Start on level 9 + code:88cb82/08 + cheat + description:Start on level 10 + code:88cb82/09 + cheat + description:Start on level 11 + code:88cb82/0a + cheat + description:Start on level 12 + code:88cb82/0b + cheat + description:Start on level 13 + code:88cb82/0c + cheat + description:Start on level 14 + code:88cb82/0d + cheat + description:Start on level 15 + code:88cb82/0e + cheat + description:Start on level 16 + code:88cb82/0f + cheat + description:Start on level 17 + code:88cb82/10 + +cartridge sha256:7a6e5da46b026900fba4584a32ad40d940b9ecf9fccfb11f96a205a914014784 + name:Toys - Let the Toy Wars begin! (USA) + cheat + description:Infinite lives + code:8e8760/ad + cheat + description:Protection against most hazards + code:8e9b85/ad+8ecb26/ad + cheat + description:Fewer toys gained from floor boxes + code:88b873/0a + cheat + description:More toys gained from floor boxes + code:889873/6f+809479/ff + cheat + description:Lots more toys gained from floor boxes + code:88b873/35+809479/ff + cheat + description:Fewer toys gained from carousel + code:888e54/0a + cheat + description:More toys gained from carousel + code:888e54/35 + cheat + description:Lots more toys gained from carousel + code:888e54/6f + cheat + description:Start with 1 life + code:82db0f/01 + cheat + description:Start with 9 lives + code:82db0f/09 + +cartridge sha256:683f5755fdce9c073561d5907f9182884eb203d4e52f84488440dd8dd8223005 + name:Treasure Hunter G (Japan) + cheat + description:Quick level up + code:90a123/a9+90a125/ea + cheat + description:Always win frog race + code:878d79/a9+878d7a/34 + cheat + description:C.1 Full Element Set + code:83da0d/0f + cheat + description:C.2 Full Element Set + code:83da26/0f + cheat + description:C.3 Full Element Set + code:83da3f/0f + cheat + description:C.4 Full Element Set + code:83da58/0f + cheat + description:Instant win battles + code:81a48e/9c + cheat + description:Instant win Frog Dodgeball, Fly Catching + code:879b25/80 + cheat + description:Defeat one enemy to win battle + code:90dab3/9c + cheat + description:Walk through walls - towns/dungeons + code:8196b6/00 + cheat + description:Walk through walls - world map + code:84c1c4/00+84c16d/80+84c0b9/80+84c110/00 + +cartridge sha256:4070a7702dc506a1ceb6f65b5c330b3a162df6f01735c8f206934fd47b810ed4 + name:Troddlers (USA) + cheat + description:Infinite time + code:008a5a/ad + +cartridge sha256:5c7b28bb24bad697156ad444ff23bd15ad6744dbf9899b3cccf2aa36d559d825 + name:True Golf Classics - Pebble Beach Golf Links (USA) + cheat + description:All holes are par 4 + code:03887e/af + cheat + description:Course is generally harder (par goes down randomly for some holes) + code:03887f/b8+03d1b8/03 + +cartridge sha256:72088194a65fc057f2910945a33d9f071682a4cecac8996f0bdabcdb5ef39962 + name:True Golf Classics - Waialae Country Club (USA) + cheat + description:Most holes have new par values + code:0186cc/6a+03b16a/04 + cheat + description:All holes are par 5 + code:0186cb/af + cheat + description:All holes are par 4 + code:0186cb/af+0186cc/6c + +cartridge sha256:47dd8ea2d12a6bb2a9774de1d492259fc4fb9f8ec7976383bbfd922532671f6b + name:True Lies (USA) + cheat + description:Infinite health + code:7e2d38/17 + cheat + description:Infinite lives + code:7e1a57/05 + cheat + description:Infinite Aircraft Missiles + code:7e1a61/06 + cheat + description:Infinite Big Gun ammo + code:7e00a9/73 + cheat + description:Infinite Flamethrower fuel + code:7e00af/63 + cheat + description:Infinite Grenades + code:7e00ab/09 + cheat + description:Infinite Mines + code:7e00ad/09 + cheat + description:Infinite Pistol ammo + code:7e00a5/0f + cheat + description:Infinite Shotgun Shells + code:7e00a7/63 + cheat + description:Infinite Uzi ammo + code:7e00aa/0a + cheat + description:Have all weapons + code:7e1a55/ff + cheat + description:No civilian kill limit (warning on first two deaths) + code:7e1a2a/00 + +cartridge sha256:8f62d014f513a7dcbca5aa76cbe476c3e4526100f34913af831bc05dab029bd1 + name:Tuff E Nuff (USA) + cheat + description:Invincibility + code:8181cb/80 + cheat + description:One hit kills + code:818537/a9+818539/ff + cheat + description:Allows you to select same player vs. same player in a 1P vs. 2P game (must select 2nd player using right button) + code:81cef3/00 + cheat + description:Allows you to select any character in a vs. computer game + code:81caef/ff + cheat + description:Syoh and Zazi's High Fist Thrust does more damage + code:a7d8f0/18 + cheat + description:Syoh and Zazi's Sliding Heel Kick does more damage + code:a7db24/24 + cheat + description:Syoh and Zazi's Big Head Thrust Punch does more damage - from close up only + code:a7dd10/24 + cheat + description:Syoh and Zazi's Big Head Thrust Punch does no damage + code:a7dd10/00 + cheat + description:Syoh and Zazi's Flying Side Kick does more damage - from close up only + code:a7de4a/24 + cheat + description:Syoh and Zazi's Ball of Energy does more damage + code:a7e145/24 + cheat + description:Syoh and Zazi's Palm Hit Drop does more damage + code:a7ddf7/2a + cheat + description:Zazi's Blue Thunder Punch and Syoh's Dragon Blade does more damage + code:a7e308/24 + cheat + description:Kotono's Straight Line Slash does more damage + code:a8dfd1/1e + cheat + description:Kotono's Sweeping Knee Kick does more damage + code:a8dee9/18 + cheat + description:Kotono's Flying Swallow Double Drop does more damage + code:a8eb51/1e + cheat + description:Kotono's Flying Side Kick does more damage + code:a8df2b/18 + cheat + description:Kotono's Flying Swallow Point Break does more damage + code:a8ebd4/1e + cheat + description:Kotono's Drawn Sword Mist Slash does more damage + code:a8e5fb/1e + cheat + description:Kotono's Double Edge does more damage + code:a8ebe5/18 + cheat + description:Kotono's Special Kick does more damage + code:a8e790/24 + cheat + description:Vortz's Middle Kick does more damage + code:a9e496/2a + cheat + description:Vortz's Low Kick does more damage + code:a9e444/18 + cheat + description:Vortz's Low Aerial Drop Kick does more damage + code:a9e3af/2a + cheat + description:Vortz's Big Double Sledge Hammer does more damage + code:a9e265/24 + cheat + description:Vortz's Diving Knee Pad does more damage + code:a9e30b/1e + cheat + description:Vortz's Diving Elbow does more damage + code:a9e297/2a + cheat + description:Vortz's Lightning Tackle does more damage + code:a9e54e/2a + cheat + description:Each round is 80 seconds + code:808978/80 + cheat + description:Each round is 60 seconds + code:808978/60 + cheat + description:Each round is 40 seconds + code:808978/40 + cheat + description:Each round is 20 seconds + code:808978/20 + cheat + description:Start with 1/4 health - P1 + code:81a5f4/16 + cheat + description:Start with 1/2 health - P1 + code:81a5f4/2c + cheat + description:Start with 3/4 health - P1 + code:81a5f4/42 + cheat + description:Play stage 2 in story (brings you back to level 1) + code:80848a/04 + cheat + description:Play stage 3 in story (brings you back to level 1) + code:80848a/06 + cheat + description:Play stage 4 in story (brings you back to level 1) + code:80848a/08 + cheat + description:Play stage 5 in story (brings you back to level 1) + code:80848a/0a + cheat + description:Play stage 6 in story (brings you back to level 1) + code:80848a/0c + cheat + description:Play stage 7 in story (brings you back to level 1) + code:80848a/0e + cheat + description:Play stage 8 in story (brings you back to level 1) + code:80848a/10 + cheat + description:Play stage 9 in story (brings you back to level 1) + code:80848a/12 + cheat + description:Play final stage in story (brings you back to level 1) + code:80848a/14 + cheat + description:Infinite health - P1 + code:7e0fb7/58 + cheat + description:Infinite health - P2 + code:7e1010/58 + cheat + description:Infinite time + code:7e0b27/99 + cheat + description:Powered moves - P1 + code:7e0fb8/06 + cheat + description:Powered moves - P2 + code:7e1011/06 + +cartridge sha256:dbf11d4c77b9aa3416f687201d57d71a23bb8fb0b8fe5e9e8212db3fac036631 + name:Turbo Toons (Europe) + cheat + description:Start at Final Tournament (press Select at title screen, then in the topmost menu select the trophy) + code:7e1e44/04 + cheat + description:Infinite Turbo - Hong Kong Phooey + code:7e0c9e/e0 + +cartridge sha256:e4343c0fadc00ffdc3dc31345068d751eea5d639f826731f08cb81673d508c40 + name:Turn and Burn - No-Fly Zone (USA) + cheat + description:Infinite health + code:7e10db/38 + cheat + description:Infinite fuel + code:7e1ac4/99+7e1ac5/74 + cheat + description:Infinite AIM-7 + code:7e05e9/ff + cheat + description:Infinite AIM-9 + code:7e05e7/ff + cheat + description:Infinite AIM-54 + code:7e05eb/bf + cheat + description:Infinite M-61 + code:7e05e5/ff + +cartridge sha256:c8187417a27a2f14ce2be35eebd0f112bd413b57d3589ae6d40b333bc21ba694 + name:TwinBee - Rainbow Bell Adventure (Japan) + cheat + description:Invincibility + code:7e1994/0a + cheat + description:Infinite health + code:7e02ec/03 + cheat + description:Infinite time + code:7e02ce/00 + cheat + description:Hit anywhere + code:848363/00 + cheat + description:Multi-jump + code:829d5e/30+829d5d/fc + +cartridge sha256:259c25d4613f97f5fa7992900fb583625d7fb912c7ae09fa9def2e682834dc9f + name:Twisted Tales of Spike McFang, The (USA) + cheat + description:Invincibility + code:80c778/af + cheat + description:Infinite money + code:82834e/ad + cheat + description:Infinite HP + code:7e4ce0/ff+7e4ce1/4f + cheat + description:Infinite money (alt) + code:7e0a57/e7+7e0a58/03 + cheat + description:Start with max hit level + code:7e4da0/30 + +cartridge sha256:0c169bbb4e6dcb3b23e7b3b05e3bddd590f45cecd803a4e5a7118fd606158b23 + name:U.F.O. Kamen Yakisoban - Kettler no Kuroi Inbou (Japan) + cheat + description:Infinite health + code:7e0175/28 + cheat + description:Infinite lives + code:7e0176/07 + cheat + description:Infinite time + code:7e0af3/b0 + +cartridge sha256:0b155a54b6134601fc0791252a63ca73efd522667c3d6fd7a44f5b3c500039d7 + name:U.N. Squadron (USA) + cheat + description:Invincibility + code:00e43e/00+04e52c/80 + cheat + description:Infinite lives + code:00d4e0/c5+00d4e2/c5 + cheat + description:Infinite continues + code:00d5a1/c0 + cheat + description:Infinite shots for all weapons + code:04e7bf/dd + cheat + description:Infinite money + code:00b9fc/c5 + cheat + description:Hit anywhere + code:04e74d/6b+00e37b/e2+00e310/e2+00e37c/20+00e311/20 + cheat + description:Shoot without stopping + code:04e56e/a5 + cheat + description:Max power on first pellet pick-up + code:04fb7d/00 + cheat + description:Start with no money + code:00b143/00 + cheat + description:Start with $9,000 + code:00b143/90 + cheat + description:Start with 1 life and 1 continue + code:00b159/01 + cheat + description:Start with 5 lives and 5 continues + code:00b159/05 + cheat + description:Start with 9 lives and 9 continues + code:00b159/09 + cheat + description:Invincibility (alt) + code:7e00f7/01 + cheat + description:Infinite health + code:7e1008/08 + cheat + description:Infinite shots for all weapons (alt) + code:04e7bf/dd + cheat + description:Infinite money (alt) + code:00b9fc/c5 + cheat + description:Infinite lives (alt) + code:00d4e0/c5+00d4e2/c5 + cheat + description:Infinite continues (alt) + code:7e00f3/03 + cheat + description:Enable all 6 jets selectable for free + code:7e00f6/3f + cheat + description:Loads of money - P1 + code:7e00d9/01 + cheat + description:Infinite Conventional Bombs + code:7e00dd/31 + cheat + description:Infinite Mega Crush Weapons + code:7e00dd/02 + cheat + description:Infinite Thunder Laser + code:7e00dd/14 + +cartridge sha256:094555d5720158ee60c9d5ab9a13110192db5ebf0f6cf69abbb59a00bc470345 + name:Ultima - Runes of Virtue II (USA) + cheat + description:Infinite energy - makes enemies invincible too (Shamino in easy mode) + code:80acef/ad + cheat + description:Stars never recharge (Shamino in easy mode) + code:80e99a/a9 + cheat + description:Almost infinite stars (Shamino in easy mode) + code:808b3e/a9 + cheat + description:Start with a stronger armor (Shamino in easy mode) + code:828ca2/a9+828ca3/2c + cheat + description:Start with less stars (Shamino in easy mode) + code:828c54/01 + cheat + description:Start with Crossbow instead of the Axe (Shamino in easy mode) + code:828c4c/33 + cheat + description:Start with Longbow instead of the Axe (Shamino in easy mode) + code:828c4c/34 + cheat + description:Start with Fireball wand instead of the Axe (Shamino in easy mode) + code:828c4c/37 + cheat + description:Start with Boomerang instead of the Axe (Shamino in easy mode) + code:828c4c/38 + cheat + description:Start with Shuriken instead of the Axe (Shamino in easy mode) + code:828c4c/2f + cheat + description:Start with 30 intelligence (Shamino in easy mode) + code:828c4e/30 + cheat + description:Start with 5 intelligence (Shamino in easy mode) + code:828c4e/05 + +cartridge sha256:11659bd8dd620d50400d16042aeb2d0ddb00c7183fc1ecb95b1a34f07db0431b + name:Ultima - The False Prophet (USA) + cheat + description:Infinite time + code:00a0be/b5 + cheat + description:Infinite Gold + code:7e014b/ff+7e014c/ff + cheat + description:Max Karma + code:7e014a/64 + cheat + description:Infinite Energy (Avatar) + code:7e8603/f0 + cheat + description:Infinite Energy (Shamino) + code:7e8607/f0 + cheat + description:Infinite Energy (Iolo) + code:7e8609/f0 + cheat + description:Infinite Energy (Dupre) + code:7e8605/f0 + cheat + description:Infinite MP (Avatar) + code:7e8c02/3c + cheat + description:Infinite MP (Shamino) + code:7e8c06/3c + cheat + description:Infinite MP (Iolo) + code:7e8c08/3c + cheat + description:Infinite MP (Dupre) + code:7e8c04/3c + cheat + description:Infinite Energy (Jaana) + code:7e867d/f0 + cheat + description:Infinite Energy (Gwenno) + code:7e8685/f0 + cheat + description:Infinite Energy (Seggal) + code:7e8741/f0 + cheat + description:Infinite Energy (Katrina) + code:7e86c3/f0 + cheat + description:Infinite Energy (Sentri) + code:7e874d/f0 + cheat + description:Infinite Energy (Leodon) + code:7e86e3/f0 + cheat + description:Infinite Energy (Gorn) + code:7e8757/f0 + cheat + description:Infinite Energy (Leonna) + code:7e86e5/f0 + cheat + description:Infinite Energy (Blaine) + code:7e870f/f0 + cheat + description:Infinite Energy (Beh Lem) + code:7e875d/f0 + cheat + description:Infinite Energy (Julia) + code:7e8687/f0 + cheat + description:Infinite MP (Gwenno) + code:7e8c84/3c + cheat + description:Infinite MP (Jaana) + code:7e8c7c/3c + cheat + description:Infinite MP (Julia) + code:7e8c86/3c + cheat + description:Infinite MP (Katrina) + code:7e8cc2/3c + cheat + description:Infinite MP (Seggal) + code:7e8d40/3c + cheat + description:Infinite MP (Sentri) + code:7e8d4c/3c + cheat + description:Infinite MP (Gorn) + code:7e8d56/3c + cheat + description:Infinite MP (Leodon) + code:7e8ce2/3c + cheat + description:Infinite MP (Leonna) + code:7e8ce4/3c + cheat + description:Infinite MP (Blaine) + code:7e8d0e/3c + cheat + description:Infinite MP (Beh Lem) + code:7e8d5c/3c + cheat + description:Max Experience (Gwenno) + code:7e8884/0f+7e8885/27 + cheat + description:Max Experience (Seggal) + code:7e8940/0f+7e8941/27 + cheat + description:Max Experience (Sentri) + code:7e894c/0f+7e894d/27 + cheat + description:Max Experience (Julia) + code:7e8886/0f+7e8887/27 + cheat + description:Max Experience (Katrina) + code:7e88c2/0f+7e88c3/27 + cheat + description:Max Experience (Jaana) + code:7e887c/0f+7e887d/27 + cheat + description:Max Experience (Blaine) + code:7e890e/0f+7e890f/27 + cheat + description:Max Experience (Beh Lem) + code:7e895c/0f+7e895d/27 + cheat + description:Max Experience (Gorn) + code:7e8956/0f+7e8957/27 + cheat + description:Max Experience (Leonna) + code:7e88e4/0f+7e88e5/27 + cheat + description:Max Experience (Leodon) + code:7e88e2/0f+7e88e3/27 + cheat + description:Max Experience (Avatar) + code:7e8802/0f+7e8803/27 + cheat + description:Max Experience (Dupre) + code:7e8804/0f+7e8805/27 + cheat + description:Max Experience (Shamino) + code:7e8806/0f+7e8807/27 + cheat + description:Max Experience (Iolo) + code:7e8808/0f+7e8809/27 + +cartridge sha256:a31af0e39afb55bbc92a5543b504327fbe7e8cd0a5e08626976bed7b65376737 + name:Ultima - The Black Gate (USA) + cheat + description:Infinite health + code:7e1cfa/e4 + cheat + description:Infinite Keys + code:7e1cfc/63 + cheat + description:65,000 Exp + code:7e1d00/e8+7e1d01/fd + cheat + description:65,000 Gold + code:7e1ce6/e8+7e1ce7/fd + +cartridge sha256:78bf82963cded9162e25035053c8b1a9f760748ff0beacc230d005204992737d + name:Ultimate Fighter (USA) + cheat + description:Invincibility (except projectiles) - P1 + code:86b72b/00 + cheat + description:Invincibility (except projectiles) - P2 + code:86b53e/00 + cheat + description:Infinite health + code:7e1402/c8 + cheat + description:Hit anywhere (except projectiles) - P1 + code:86b53d/80 + cheat + description:Hit anywhere (except projectiles) - P2 + code:86b72a/80 + cheat + description:Infinite lives - story mode + code:7e09c9/63 + cheat + description:Start with 60,000 score + code:7e09b9/60+7e09ba/ea + +cartridge sha256:cb2fdfce61858063bf4c9da4228381c3ec3abe423f4d378cddd174ae4adb261e + name:Ultimate Mortal Kombat 3 (USA) + cheat + description:Invincibility (throws damage CPU) + code:84e6ad/e0+84e7e2/80+84e6b0/30+84e6ae/01+84e6b1/f6 + cheat + description:Infinite health - P1 + code:7e36d4/a6 + cheat + description:Infinite health - P2 + code:7e3898/a6 + cheat + description:Infinite run - P1 + code:7e36d8/30 + cheat + description:Infinite run - P2 + code:7e389c/30 + cheat + description:Max fatality time + code:7e3be0/01 + cheat + description:Hit anywhere - P1 + code:84ff92/00+84ff94/03+84ff93/f0+84e6aa/ff+84ff95/4c+84ff98/4c+84ff9a/e6+84ff97/e7+84ff90/e0+84ff96/28+84ff99/b2+84e6a9/90+84ff91/02 + cheat + description:Blank versus screen + code:83e635/ff + cheat + description:Scrambled backgrounds + code:849566/ad + cheat + description:Black background (wait for title screen to appear before proceeding) + code:849584/ad + cheat + description:Press Left on main menu for Sound Test menu + code:83b6db/02 + cheat + description:Press Right on main menu for Kool Stuff menu + code:83b70f/02 + cheat + description:Press Up on main menu for Kooler Stuff menu + code:83b743/02 + cheat + description:Press B on main menu for Scotts Stuff menu + code:83b777/02 + cheat + description:First round / one button fatalities + code:7e3be3/01 + +cartridge sha256:e9fae4c2e171a1fc4f2bd800abd9e42750aaf7a4db9e40c5b9142e15029500bd + name:Ultraman (USA) + cheat + description:Infinite health + code:0096cc/2c + cheat + description:Infinite health - P1 + code:7e07ee/53 + cheat + description:No health - P2 + code:7e084e/00 + cheat + description:Infinite chances + code:00de27/24 + cheat + description:Infinite time (seconds) + code:7e00a3/63 + cheat + description:Infinite time (minutes) + code:7e00a4/09 + cheat + description:Quicker health replenishment + code:00b015/00 + cheat + description:Less health replenishment for enemies + code:00b040/ea + cheat + description:Weaker punch + code:03ccae/01 + cheat + description:Weaker kick + code:03ccb0/01 + cheat + description:9 minutes per stage + code:009022/09 + cheat + description:6 minutes per stage + code:009022/06 + cheat + description:2 minutes per stage + code:009022/02 + cheat + description:Start with 1 chance + code:008daa/00 + cheat + description:Start with 6 chances + code:008daa/05 + cheat + description:Start with 9 chances + code:008daa/09 + cheat + description:Start on stage 1 - Gudis + code:7e00f8/00 + cheat + description:Start on stage 2 - Bogun + code:7e00f8/01 + cheat + description:Start on stage 3 - Degola + code:7e00f8/02 + cheat + description:Start on stage 4 - Barrangas + code:7e00f8/03 + cheat + description:Start on stage 5 - Gudis II + code:7e00f8/04 + cheat + description:Start on stage 6 - Zebokon + code:7e00f8/05 + cheat + description:Start on stage 7 - Majaba + code:7e00f8/06 + cheat + description:Start on stage 8 - Kodalar + code:7e00f8/07 + cheat + description:Start on final stage - Kilazee + code:7e00f8/08 + +cartridge sha256:794152fc6f55cb15a0b203fa645ac9fa314a293da999d8ec8b3dda080434d175 + name:Uncharted Waters (USA) + cheat + description:Start with 65,000 Gold + code:01fc1c/fd + +cartridge sha256:64bc4707f422661a66618088887e2363a5f896ea683c58984fffd96dd21ab5f0 + name:New Horizons (USA) + cheat + description:Joao starts with 156 Leadership instead of 78 + code:c8820f/9c + cheat + description:Joao starts with 250 Leadership instead of 78 + code:c8820f/fa + cheat + description:Joao starts with 150 Seamanship instead of 75 + code:c88210/96 + cheat + description:Joao starts with 250 Seamanship instead of 75 + code:c88210/fa + cheat + description:Joao starts with 146 Knowledge instead of 73 + code:c88211/92 + cheat + description:Joao starts with 250 Knowledge instead of 73 + code:c88211/fa + cheat + description:Joao starts with 170 Intuition instead of 85 + code:c88212/aa + cheat + description:Joao starts with 250 Intuition instead of 85 + code:c88212/fa + cheat + description:Joao starts with 164 Courage instead of 82 + code:c88213/a4 + cheat + description:Joao starts with 250 Courage instead of 82 + code:c88213/fa + cheat + description:Joao starts with 164 Dueling Skill instead of 82 + code:c88214/a4 + cheat + description:Joao starts with 250 Dueling Skill instead of 82 + code:c88214/fa + cheat + description:Joao starts with 178 Likability (Charm) instead of 89 + code:c88215/b2 + cheat + description:Joao starts with 250 Likability (Charm) instead of 89 + code:c88215/fa + cheat + description:Catalina starts with 24 Sail Level instead of 8 + code:c88249/18 + cheat + description:Catalina starts with 80 Sail Level instead of 8 + code:c88249/50 + cheat + description:Catalina starts with 30 Battle Level instead of 10 + code:c8824a/1e + cheat + description:Catalina starts with 100 Battle Level instead of 10 + code:c8824a/64 + cheat + description:Catalina starts with 160 Leadership instead of 80 + code:c88241/a0 + cheat + description:Catalina starts with 250 Leadership instead of 80 + code:c88241/fa + cheat + description:Catalina starts with 158 Seamanship instead of 79 + code:c88242/9e + cheat + description:Catalina starts with 250 Seamanship instead of 79 + code:c88242/fa + cheat + description:Catalina starts with 130 Knowledge instead of 65 + code:c88243/82 + cheat + description:Catalina starts with 250 Knowledge instead of 65 + code:c88243/fa + cheat + description:Catalina starts with 104 Intuition instead of 52 + code:c88244/68 + cheat + description:Catalina starts with 250 Intuition instead of 52 + code:c88244/fa + cheat + description:Catalina starts with 172 Courage instead of 86 + code:c88245/ac + cheat + description:Catalina starts with 250 Courage instead of 86 + code:c88245/fa + cheat + description:Catalina starts with 184 Dueling Skill instead of 92 + code:c88246/b8 + cheat + description:Catalina starts with 250 Dueling Skill instead of 92 + code:c88246/fa + cheat + description:Catalina starts with 190 Likability instead of 95 + code:c88247/be + cheat + description:Catalina starts with 250 Likability instead of 95 + code:c88247/fa + cheat + description:Ali Vezas starts with 160 Leadership (instead of 80) + code:c88309/a0 + cheat + description:Ali Vezas starts with 250 Leadership (instead of 80) + code:c88309/fa + cheat + description:Ali Vezas starts with 172 Seamanship (instead of 86) + code:c8830a/ac + cheat + description:Ali Vezas starts with 250 Seamanship (instead of 86) + code:c8830a/fa + cheat + description:Ali Vezas starts with 168 Knowledge (instead of 84) + code:c8830b/a8 + cheat + description:Ali Vezas starts with 250 Knowledge (instead of 84) + code:c8830b/fa + cheat + description:Ali Vezas starts with 130 Intuition (instead of 65) + code:c8830c/82 + cheat + description:Ali Vezas starts with 250 Intuition (instead of 65) + code:c8830c/fa + cheat + description:Ali Vezas starts with 106 Courage (instead of 53) + code:c8830d/6a + cheat + description:Ali Vezas starts with 250 Courage (instead of 53) + code:c8830d/fa + cheat + description:Ali Vezas starts with 84 Dueling Skill (instead of 42) + code:c8830e/54 + cheat + description:Ali Vezas starts with 250 Dueling Skill (instead of 42) + code:c8830e/fa + cheat + description:Ali Vezas starts with 160 Likability (instead of 80) + code:c8830f/a0 + cheat + description:Ali Vezas starts with 250 Likability (instead of 80) + code:c8830f/fa + cheat + description:Start a new game with $250 Gold + code:c881eb/fa + cheat + description:Start a new game with $1,024 Gold + code:c881ec/04 + cheat + description:Start a new game with $9,984 Gold + code:c881ec/27 + cheat + description:Start a new game with $64,000 Gold + code:c881ec/fa + cheat + description:Start a new game with $196,608 Gold + code:c881ed/03 + cheat + description:Start a new game with over one Million Gold + code:c881ed/10 + cheat + description:No Storms + code:7e201b/80 + cheat + description:1 D.a.s., No Scurvy + code:7e415e/00 + cheat + description:Joao's Steering Power + code:7e2620/ff + cheat + description:Joao's Battle Power + code:7e2621/ff + cheat + description:Ali's Steering Power + code:7e271a/ff + cheat + description:Ali's Battle Power + code:7e271b/ff + cheat + description:Pietro's Steering Power + code:7e26e8/ff + cheat + description:Pietro's Battle Power + code:7e26e9/ff + cheat + description:Max Adventure For Joao + code:7e25a4/50+7e25a5/c3 + cheat + description:100% Popular In Portugal + code:7e25a6/c8 + cheat + description:100% Popular In Spain + code:7e25a7/c8 + cheat + description:100% Popular In Turkey + code:7e25a8/c8 + cheat + description:100% Popular In England + code:7e25a9/c8 + cheat + description:100% Popular In Italy + code:7e25aa/c8 + cheat + description:100% Popular In Holland + code:7e25ab/c8 + cheat + description:S.1 Infinite Water + code:7e661a/7f + cheat + description:S.2 Infinite Water + code:7e6638/7f + cheat + description:S.3 Infinite Water + code:7e6656/7f + cheat + description:S.4 Infinite Water + code:7e6674/7f + cheat + description:S.5 Infinite Water + code:7e6692/7f + cheat + description:S.6 Infinite Water + code:7e66b0/7f + cheat + description:S.7 Infinite Water + code:7e66ce/7f + cheat + description:S.8 Infinite Water + code:7e66ec/7f + cheat + description:S.9 Infinite Water + code:7e670a/7f + cheat + description:S.10 Infinite Water + code:7e6728/7f + cheat + description:S.11 Infinite Water + code:7e6746/7f + cheat + description:S.12 Infinite Water + code:7e6764/7f + cheat + description:S.13 Infinite Water + code:7e6782/7f + cheat + description:S.14 Infinite Water + code:7e67a0/7f + cheat + description:S.15 Infinite Water + code:7e67be/7f + cheat + description:S.16 Infinite Water + code:7e67dc/7f + cheat + description:S.17 Infinite Water + code:7e67fa/7f + cheat + description:S.1 Infinite Food + code:7e661c/7f + cheat + description:S.2 Infinite Food + code:7e663a/7f + cheat + description:S.3 Infinite Food + code:7e6658/7f + cheat + description:S.4 Infinite Food + code:7e6676/7f + cheat + description:S.5 Infinite Food + code:7e6694/7f + cheat + description:S.6 Infinite Food + code:7e66b2/7f + cheat + description:S.7 Infinite Food + code:7e66d0/7f + cheat + description:S.8 Infinite Food + code:7e66ee/7f + cheat + description:S.9 Infinite Food + code:7e670c/7f + cheat + description:S.10 Infinite Food + code:7e672a/7f + cheat + description:S.11 Infinite Food + code:7e6748/7f + cheat + description:S.12 Infinite Food + code:7e6766/7f + cheat + description:S.13 Infinite Food + code:7e6784/7f + cheat + description:S.14 Infinite Food + code:7e67a2/7f + cheat + description:S.15 Infinite Food + code:7e67c0/7f + cheat + description:S.16 Infinite Food + code:7e67d7/7f + cheat + description:S.17 Infinite Food + code:7e67fc/7f + cheat + description:S.1 Infinite Crew (Ship HP) + code:7e41e7/22 + cheat + description:S.2 Infinite Crew (Ship HP) + code:7e41f0/22 + cheat + description:S.3 Infinite Crew (Ship HP) + code:7e41f9/22 + cheat + description:S.4 Infinite Crew (Ship HP) + code:7e4202/22 + cheat + description:S.5 Infinite Crew (Ship HP) + code:7e420b/22 + cheat + description:S.6 Infinite Crew (Ship HP) + code:7e4214/22 + cheat + description:S.7 Infinite Crew (Ship HP) + code:7e421d/22 + cheat + description:S.8 Infinite Crew (Ship HP) + code:7e4226/22 + cheat + description:S.9 Infinite Crew (Ship HP) + code:7e422f/22 + cheat + description:S.10 Infinite Crew (Ship HP) + code:7e4238/22 + cheat + description:S.11 Infinite Crew (Ship HP) + code:7e4241/22 + cheat + description:S.12 Infinite Crew (Ship HP) + code:7e424a/22 + cheat + description:S.13 Infinite Crew (Ship HP) + code:7e4253/22 + cheat + description:S.14 Infinite Crew (Ship HP) + code:7e425c/22 + cheat + description:S.15 Infinite Crew (Ship HP) + code:7e4265/22 + cheat + description:S.16 Infinite Crew (Ship HP) + code:7e426e/22 + cheat + description:S.17 Infinite Crew (Ship HP) + code:7e4277/22 + cheat + description:S.1 Speedy + code:7e41eb/ff + cheat + description:S.2 Speedy + code:7e41f4/ff + cheat + description:S.3 Speedy + code:7e41fd/ff + cheat + description:S.4 Speedy + code:7e4206/ff + cheat + description:S.5 Speedy + code:7e420f/ff + cheat + description:S.6 Speedy + code:7e4218/ff + cheat + description:S.7 Speedy + code:7e4221/ff + cheat + description:S.8 Speedy + code:7e422a/ff + cheat + description:S.9 Speedy + code:7e4233/ff + cheat + description:S.10 Speedy + code:7e423c/ff + cheat + description:S.11 Speedy + code:7e4245/ff + cheat + description:S.12 Speedy + code:7e424e/ff + cheat + description:S.13 Speedy + code:7e4257/ff + cheat + description:S.14 Speedy + code:7e4260/ff + cheat + description:S.15 Speedy + code:7e4269/ff + +cartridge sha256:cb8073cf95eace56ba4324a2106164fa540900c2de083aff490c4afe91ae95f7 + name:Undercover Cops (Japan) + cheat + description:Infinite health + code:c08d8c/ad + cheat + description:Infinite lives + code:c0fcef/ad + cheat + description:Infinite time + code:c10a26/ad + cheat + description:Infinite continues + code:c14beb/ad + cheat + description:Hit anywhere + code:c0d4fd/80+c0d4fe/3e + cheat + description:one hit kils + code:c0d54a/00 + cheat + description:Infinite health (alt) + code:7e0c36/e8+7e0d36/e8 + cheat + description:Infinite lives (alt) + code:7e0110/0a + cheat + description:Infinite time (alt) + code:7e016c/64 + cheat + description:Infinite continues (alt) + code:7e0112/09 + +cartridge sha256:859ec99fdc25dd9b239d9085bf656e4f49c93a32faa5bb248da83efd68ebd478 + name:Uniracers (USA) + cheat + description:No timer in almost every race + code:81c726/ea + cheat + description:No timer in almost every race (alt) + code:81c726/ea + +cartridge sha256:cf587d72123277f72f658829f1efdb4f52f3bec012a316c1fea25e1f9c292575 + name:Universal Soldier (USA) (Proto) + cheat + description:Infinite health + code:00f5e6/ad + cheat + description:Infinite lines + code:018505/ad + +cartridge sha256:ecefb4117a6aae117e033c8cc07f0db2797d6be93dd5cdcefc23692a21fae02e + name:Untouchables, The (USA) + cheat + description:Infinite lives + code:7e1b86/09 + cheat + description:Infinite ammo + code:7e1b89/63 + +cartridge sha256:8b3ff3a0ca1c85facb71f42886291dfa916ca74245702c79ca8ae635f28bc864 + name:Ushio to Tora (Japan) + cheat + description:Invincibility + code:7e0222/26 + cheat + description:Infinite health + code:7e021e/40 + cheat + description:Infinite lives + code:7e0608/63 + +cartridge sha256:2500d6c846c78bcb729f15535bf2b852a120411891cabaaaa6fc407906d0214e + name:Utopia - The Creation of a Nation (USA) + cheat + description:1-day buildings + code:009691/00 + cheat + description:Have 655360000 cash (enable while on map then disable) + code:00a5e9/a9+00a5ec/85+00a5ed/71 + +cartridge sha256:78bf9d79fb2ff3f9d03ecc1176d070e53ddaca2c6b0cda69e74c19a4e50b195b + name:Vegas Stakes (USA) + cheat + description:Only $34,464 needed for highroller status (glitchy) + code:00c34b/00 + cheat + description:Only $38,527 needed to win the game instead of $10 million + code:00c2b9/00 + cheat + description:Only $5,019,263 needed to win the game + code:00c2b9/4c + cheat + description:Player wins pushes in Blackjack + code:0eb93b/00 + cheat + description:Dealer wins pushes in Blackjack + code:0eb93b/01 + cheat + description:Start with $488 - P1 + code:00bf68/01 + cheat + description:Start with $488 - P2 + code:00bf95/01 + cheat + description:Start with $488 - P3 + code:00bfc2/01 + cheat + description:Start with $488 - P4 + code:00bfef/01 + cheat + description:Start with $2280 - P1 + code:00bf68/08 + cheat + description:Start with $2280 - P2 + code:00bf95/08 + cheat + description:Start with $2280 - P3 + code:00bfc2/08 + cheat + description:Start with $2280 - P4 + code:00bfef/08 + cheat + description:Start with $9960 - P1 + code:00bf68/26 + cheat + description:Start with $9960 - P2 + code:00bf95/26 + cheat + description:Start with $9960 - P3 + code:00bfc2/26 + cheat + description:Start with $9960 - P4 + code:00bfef/26 + cheat + description:Start with $132,072 (highroller status) - P1 + code:00bf6d/02 + cheat + description:Start with $132,072 - P2 + code:00bf9a/02 + cheat + description:Start with $132,072 - P3 + code:00bfc7/02 + cheat + description:Start with $132,072 - P4 + code:00bff4/02 + +cartridge sha256:b72fbbfe737eff49f59dcef9f13b963e50c5bc322d7eb0e7b4c25f3a71aa0815 + name:Venom-Spider-Man - Separation Anxiety (USA) + cheat + description:Infinite health - P1 + code:82e174/b5 + cheat + description:Infinite lives - P1 + code:81a554/79 + cheat + description:Infinite health - P2 + code:7e0a5a/99 + cheat + description:Infinite lives - P2 + code:7e1a8b/06 + cheat + description:Infinite Captain America hero icons + code:7e1bc5/05 + cheat + description:Infinite Ghost Rider hero icons + code:7e1bc7/05 + cheat + description:Infinite Daredevil hero icons + code:7e1bc9/05 + cheat + description:Infinite Hawkeye hero icons + code:7e1bcb/05 + cheat + description:Infinite Vault Guardsman hero icon + code:7e1bcd/05 + cheat + description:Use helpers multiple times + code:7e1bc4/00 + cheat + description:Hard mode enabled + code:7e1c3c/ff + cheat + description:Stage select enabled + code:7e1c40/ff + cheat + description:Hit anywhere + code:82ab25/24 + cheat + description:One hit kills for most enemies and some bosses + code:7e0ad3/00+7e0b4c/00+7e0bc5/00+7e0c3e/00+7e0cb7/00 + +cartridge sha256:29c28188234ddbb0b72fc84253dcd3514e23034779c773db8097b073b73390c8 + name:Virtual Bart (USA) + cheat + description:Infinite time + code:80e75f/ad + cheat + description:Infinite health and Tomatoes (Baby Bart takes damage when he walks on grass) + code:80e8fb/47 + cheat + description:Infinite continues + code:80e8bb/ad + cheat + description:Infinite lives + code:80e8ad/ad + +cartridge sha256:41b5561de9e4984276e52987ea46c5f4fa8526d8141c70c738875a9eb9fe9d70 + name:Vortex (USA) (En,Es) + cheat + description:Infinite health + code:7e039a/3d+7e118b/32 + cheat + description:Infinite lives + code:7e120e/0a + cheat + description:Infinite Missiles + code:7e1de4/63 + cheat + description:Infinite Rockets + code:7e1de5/63 + cheat + description:Infinite Cannon + code:7e1de6/63 + cheat + description:Infinite Blasts + code:7e121a/63 + +cartridge sha256:8579dd352d20589072ed5c026bde7adadd6229d18a022e7cb47cf5602b54015e + name:Warlock (USA) + cheat + description:Invincibility + code:009ff8/a9+00a8a2/ee + cheat + description:Infinite items on pick-up + code:02887a/ea + cheat + description:Enter the password GRKKL to go to the final battle + code:04c4a3/31 + cheat + description:Enter the password GRKKL to go to the ending + code:04c4a3/32 + +cartridge sha256:0fadb3b67bfb7d750d873e7601dd5ffdfd33b8ebda833a18a3c999c7f8aa9e15 + name:Waterworld (Europe) + cheat + description:Invincibility underwater + code:81a69f/00 + cheat + description:Infinite health underwater + code:81933b/ad + cheat + description:Infinite health - Overworld + code:7e0288/7f + cheat + description:Hit anywhere + code:80c17d/80+80c17e/2a+80c1ac/60 + cheat + description:Get items from anywhere + code:81e283/80+81e284/18 + +cartridge sha256:56ba3d585bf6b701e342d86a0bd164ab0a97dfbd5df46b3a964506842633459c + name:Wayne's World (USA) + cheat + description:Infinite Worthiness + code:069caf/ad + cheat + description:Infinite lives + code:00b91d/ad + cheat + description:Worthiness item worth nothing on pick-up + code:06997a/ad + cheat + description:Schwing item worth nothing on pick-up + code:06994a/ad + cheat + description:Infinite Schwings if you have at least 1 + code:068552/ad + cheat + description:Invincibility lasts longer after getting hit + code:069ce5/ff + cheat + description:Invincibility does not last as long after getting hit + code:069ce5/10 + cheat + description:Invincibility lasts forever after getting hit (Wayne blinks) + code:069d94/bd + cheat + description:Invincibility (Wayne doesn't blink) + code:069c9b/80 + cheat + description:Amp power-up worth nothing on pick-up + code:06989a/00 + cheat + description:Amp power-up gives you Distortion-type chords + code:06989a/04 + cheat + description:Amp power-up gives you Mega-Amp-type chords + code:06989a/02 + cheat + description:Amp power-up gives you Chorus-type chords + code:06989a/03 + cheat + description:Amp power-up gives you Homer-type chords + code:06989a/05 + cheat + description:Distortion power-up worth nothing on pick-up + code:069900/00 + cheat + description:Distortion power-up gives you Amp-type chords + code:069900/01 + cheat + description:Distortion power-up gives you Mega-Amp-type chords + code:069900/02 + cheat + description:Distortion power-up gives you Chorus-type-chords + code:069900/03 + cheat + description:Distortion power-up gives you Homer-type-chords + code:069900/05 + cheat + description:Heart item worth nothing + code:06999d/ad + cheat + description:Start with 1 life + code:00cbce/01 + cheat + description:Start with 3 lives + code:00cbce/03 + cheat + description:Start with 7 lives + code:00cbce/07 + cheat + description:Start with 9 lives + code:00cbce/09 + cheat + description:Start with 1 Worthiness point + code:00b93e/01 + cheat + description:Start with 3 Worthiness points + code:00b93e/03 + cheat + description:Start with 7 Worthiness points + code:00b93e/07 + cheat + description:Start with 9 Worthiness points + code:00b93e/09 + +cartridge sha256:0b1ba31ae95b61d7d9a0f5509b5836fff84f60915802e3b3ba1170a5c50a4b71 + name:WeaponLord (USA) + cheat + description:Infinite health - P1 + code:ea64c7/7a + cheat + description:Infinite health - both players + code:ea64c6/ad + cheat + description:Infinite time + code:e94d22/ad + cheat + description:Hit anywhere - both players + code:e973c6/80+e97409/80+e973c2/00+e97403/00 + cheat + description:Play as Zarak in story mode + code:eae5a1/06 + +cartridge sha256:e931c3c08f20f78e3a43ad92d16eb472be619abaa17c2d8e2b0fcd5d05dbd74d + name:We're Back! - A Dinosaur's Story (USA) + cheat + description:Infinite health + code:9a96dc/ad + cheat + description:Infinite lives + code:9a847a/ad + cheat + description:Infinite Vorb on pick-up for the rest of the stage + code:9aae88/ad + cheat + description:Infinite Elsa on pick-up for the rest of the stage + code:9aa761/ad + cheat + description:Infinite Dweebs on pick-up for the rest of the stage + code:9aac73/ad + cheat + description:Infinite Woog on pick-up + code:9aa964/ad + cheat + description:Super-jump + code:9a9a68/1f + cheat + description:Mega-jump + code:9a9a68/2f + cheat + description:Less grain to get for tail swipe + code:9a8909/03 + cheat + description:Less grain to get for stomp + code:9a8903/09 + cheat + description:Start with less health + code:99b299/02+9a8886/02 + cheat + description:Start with 9 lives + code:99b293/09 + cheat + description:Start with 6 lives + code:99b293/06 + cheat + description:Start with 1 life + code:99b293/01 + cheat + description:Start on Manhattan - Zone 2 + code:99b17f/a9+99b180/02+99b181/00 + cheat + description:Start on the Subway + code:99b17f/a9+99b180/03+99b181/00 + cheat + description:Start on Crazy Crane + code:99b17f/a9+99b180/04+99b181/00 + cheat + description:Start on Construction in the City + code:99b17f/a9+99b180/06+99b181/00 + cheat + description:Start on Thanksgiving - Zone 1 + code:99b17f/a9+99b180/07+99b181/00 + cheat + description:Start on Thanksgiving - Zone 2 + code:99b17f/a9+99b180/08+99b181/00 + cheat + description:Start on Balloon Blow-out + code:99b17f/a9+99b180/09+99b181/00 + cheat + description:Start on Central Park - Zone 1 + code:99b17f/a9+99b180/0b+99b181/00 + cheat + description:Start on Central Park - Zone 2 + code:99b17f/a9+99b180/0c+99b181/00 + cheat + description:Start on the Zoo + code:99b17f/a9+99b180/0d+99b181/00 + cheat + description:Start on Prehistoric Panic + code:99b17f/a9+99b180/0e+99b181/00 + cheat + description:Start on Outside the Circus + code:99b17f/a9+99b180/10+99b181/00 + cheat + description:Start on Circus - Zone 1 + code:99b17f/a9+99b180/11+99b181/00 + cheat + description:Start on Circus - Zone 2 + code:99b17f/a9+99b180/12+99b181/00 + cheat + description:Start on Jack in the Box + code:99b17f/a9+99b180/13+99b181/00 + cheat + description:Start on Empire State Building + code:99b17f/a9+99b180/15+99b181/00 + cheat + description:Start on Spaceship - Zone 1 + code:99b17f/a9+99b180/16+99b181/00 + cheat + description:Start on Spaceship - Zone 2 + code:99b17f/a9+99b180/17+99b181/00 + cheat + description:Infinite health (alt) + code:9a96dc/ad + cheat + description:Infinite lives (alt) + code:9a847a/ad + cheat + description:Super-jump (alt) + code:9a9a68/1f + cheat + description:Mega-jump (alt) + code:9a9a68/2f + +cartridge sha256:12abf1ba063c120c1a98495a1c85e67a0007aff771ef92adcb94b4a0a2fd5adb + name:Wheel of Fortune (USA) + cheat + description:Infinite time to choose + code:008425/ad + cheat + description:Don't lose money when landing on bankrupt + code:0094f4/ad + cheat + description:3/4 of normal time to choose + code:009866/1e + cheat + description:1/2 of normal time to choose + code:009866/14 + cheat + description:1/4 of normal time to choose + code:009866/0a + cheat + description:Vowels are free is you have at least $250 + code:008cd5/00 + cheat + description:Vowels cost $50 if you have at least $250 + code:008cd5/32 + cheat + description:Vowels cost $100 if you have at least $250 + code:008cd5/64 + cheat + description:Vowels cost $150 if you have at least $250 + code:008cd5/96 + cheat + description:Vowels cost $200 if you have at least $250 + code:008cd5/c8 + +cartridge sha256:0a52dc1e7820f5541f53ce0e1e96144fe079af0efe3dae5c2c89d86365feb8b1 + name:Whizz (USA) + cheat + description:Infinite health + code:80a1a4/a5 + cheat + description:Infinite time + code:80874f/ad + cheat + description:Infinite lives + code:80ab7c/ad + cheat + description:Infinite time (alt) + code:7e03a4/63 + +cartridge sha256:c8f159e2625ac8078535c06857ea28475706da45df494de8e46f50888272cf71 + name:Wild Guns (USA) + cheat + description:Invincibility + code:038067/24 + cheat + description:Hit anywhere + code:009520/24+00952d/24+009537/24+039301/24+009516/24+0094f0/80 + cheat + description:Infinite specials + code:7e1fa0/05 + cheat + description:Infinite lives + code:7e1fb2/04 + cheat + description:Enable stage select after select player screen (disable before you exit the menu) + code:7e05f0/ff+7e05f1/ff + +cartridge sha256:2167fc7c5447b2287668d2f3e4ef1a285361b2292ecc8a4cbd9f966a460ad7a2 + name:Wing Commander (USA) + cheat + description:Increase front shield on Hornet + code:8b9bad/3c + cheat + description:Increase rear shield on Hornet + code:8b9c21/3c + cheat + description:Increase front armor on Hornet + code:8b9c95/40 + cheat + description:Increase rear armor on Hornet + code:8b9d09/40 + cheat + description:Increase left side armor on Hornet + code:8b9df1/40 + cheat + description:Increase right side armor on Hornet + code:8b9d7d/40 + cheat + description:Increase front shield on Scimitar + code:8b9bb1/63 + cheat + description:Increase rear shield on Scimitar + code:8b9c25/63 + cheat + description:Increase front armor on Scimitar + code:8b9c99/63 + cheat + description:Increase rear armor on Scimitar + code:8b9d0d/63 + cheat + description:Increase left side armor on Scimitar + code:8b9df5/63 + cheat + description:Increase right side armor on Scimitar + code:8b9d81/63 + cheat + description:Mega front shields on Hornet + code:8b9bae/ff + cheat + description:Mega rear shields on Hornet + code:8b9c22/ff + cheat + description:Mega front shields on Scimitar + code:8b9bb2/55 + cheat + description:Mega rear shields on Scimitar + code:8b9c26/55 + +cartridge sha256:132ca0b6a4888edf7de785d48f4417fac28522646e6c7514f80c5e9ff1438d5f + name:Wing Commander - The Secret Missions (USA) + cheat + description:Infinite blaster power + code:80c081/ad + cheat + description:Infinite fuel + code:80a1bb/ad + cheat + description:Infinite missiles + code:818a8f/ea + cheat + description:Start on mission 4 + code:8386b9/04 + cheat + description:Start on mission 8 + code:8386b9/08 + +cartridge sha256:c3bcd5c716f96e6359ebcfd85c3e9b07b46c5124bf4010d89ceef5b6f2f868f6 + name:Wings 2 - Aces High (USA) + cheat + description:Infinite lives - all pilots (you can still get fired) + code:02b5c9/bd + cheat + description:Infinite power-ups + code:02ac80/ad + +cartridge sha256:025dd3047c474d879e69b91a3918add9cdabedf4182e1c1e10e5f0c13a124bf9 + name:Wizard of Oz, The (USA) + cheat + description:Invincibility + code:01bd0f/d0 + cheat + description:Infinite health + code:02e3a2/bd + cheat + description:Infinite lives + code:00e4f3/dd + cheat + description:Infinite health - Dorthy + code:7e01e5/00 + cheat + description:Infinite health - Scarecrow + code:7e01e7/00 + cheat + description:Infinite health - Tinman + code:7e01e9/00 + cheat + description:Infinite health - Lion + code:7e01eb/00 + cheat + description:Infinite Star Shot - Dorthy + code:7e01db/09 + cheat + description:Infinite Throwing Rocks - all + code:7e01d1/09 + cheat + description:Have Flight Shoes + code:7e01d3/01 + +cartridge sha256:621180a73a5552899ff2a437e84f2891ec078e9883f25f6671b620ab4db24270 + name:Wizardry VI - Kindan no Mahitsu (Japan) + cheat + description:The whole party doesn't take damage from normal enemy attacks (doesn't protect from poison or certain magic spells) + code:05bbb9/bd + cheat + description:Create a character and he has a lot of gold + code:049c13/20 + +cartridge sha256:e0165bafeb8d65be08a5a4079f8651104471f450c60794b761b1255853ca2d98 + name:Wolfchild (USA) + cheat + description:Infinite health + code:00c4e7/ea + cheat + description:Infinite health (alt) + code:7e0636/14 + cheat + description:Infinite continues + code:00f2a7/ad + cheat + description:Infinite lives + code:00c38b/a5 + cheat + description:Infinite lives (alt) + code:7e029a/99 + cheat + description:Infinite Bombs + code:00c4e1/a5 + cheat + description:Infinite Bombs (alt) + code:7e0298/99 + cheat + description:Infinite Projectiles + code:7e0296/99 + cheat + description:Stay in wolf form until next continue + code:00c3f8/ad+00c3fb/ad + cheat + description:Start with 254 lives and 255 Bombs + code:00888f/fe + cheat + description:Start at final boss + code:008887/0b + +cartridge sha256:9c2b458e8fda5cb437a4c6d28fb430e45c4cfef98420c40546b8e08563a4fc7d + name:Wolfenstein 3-D (USA) + cheat + description:Infinite health + code:c0a9a2/ad + cheat + description:Infinite ammo + code:c0b401/ad + cheat + description:Infinite lives + code:c0dbbc/ad + cheat + description:Infinite ammo for special weapon 1 after first life + code:c0b45c/ad + cheat + description:Infinite ammo for special weapon 2 after first life + code:c0b618/ad + cheat + description:Start with 1 life + code:c0da78/01 + cheat + description:Start with 6 lives + code:c0da78/06 + cheat + description:Start with 9 lives + code:c0da78/09 + cheat + description:Start with more ammo + code:c0da5d/63+c0d8b8/63 + cheat + description:Start with chain gun + code:c0d8ae/8d + cheat + description:Start with machine gun + code:c0d8ab/8d + cheat + description:Start with special weapon 1 (super machine gun) and ammo after first life + code:c0d8c0/8d+c0d8a3/04 + cheat + description:Start with special weapon 2 (rocket launcher) and ammo after first life + code:c0d8bd/8d+c0d4a3/05 + +cartridge sha256:44428a3d1c796fbd41da7620e321c45f11cd80a0e5f4ab8c48177106cb960d77 + name:Wolverine - Adamantium Rage (USA) + cheat + description:Infinite health + code:80f707/a5 + cheat + description:Infinite time + code:b1cfb3/d0 + cheat + description:No enemies + code:b8f751/85 + cheat + description:Hit anywhere + one hit kills + code:808349/24+808342/24+80836c/24+808360/24+808322/24+80832e/24+80837f/24+808359/24+808352/24 + cheat + description:One hit kills + code:80837f/24 + cheat + description:Invincibility + code:7e00b8/ff + cheat + description:Infinite health (alt) + code:7e1027/64 + +cartridge sha256:ea76cfdbb2a555a7b6eff8b466a879f9a9189639416e8c2fb45bf074e695105f + name:World Heroes (USA) + cheat + description:Infinite health - P1 + code:c046b7/24 + cheat + description:Hit anywhere - P1 + code:c010fe/30+c010fa/c0+c010fb/00+c010fc/10 + cheat + description:Always win - P1 + code:c0ba8b/39 + cheat + description:Win a draw - P1 + code:c04a55/02 + cheat + description:Win a draw - P2 + code:c04a55/07 + cheat + description:Slow timer down by half + code:c0463b/a0 + cheat + description:3 hits to win round - either player + code:c048a2/19+c0489f/00 + cheat + description:2 hits to win round - either player + code:c048a2/31+c0489f/00 + cheat + description:1 hit to win (sudden death) - either player + code:c048a2/61+c0489f/00 + cheat + description:Start with more health - P1 + code:c02a5c/7e + cheat + description:Start with 1/2 health - P1 + code:c02a5c/30 + cheat + description:Start with very little health - P1 + code:c02a5c/01 + cheat + description:Start with more health - P2/CPU + code:c02ac6/7e + cheat + description:Start with half health - P2/CPU + code:c02ac6/30 + cheat + description:Start with very little health - P2/CPU + code:c02ac6/01 + +cartridge sha256:159d5341d13d6801324e8271f7191c0223617c9d30984676319b2df7937c78c0 + name:World Heroes 2 (USA) + cheat + description:Invincibility - P1 + code:00b3d6/60+00b9e6/60 + cheat + description:Invincibility - P2 + code:00b1d1/60+00b821/60 + cheat + description:Hit anywhere - P1 + code:00b1cc/80+00b81c/80 + cheat + description:Hit anywhere - P2 + code:00b3d1/80+00b9e1/80 + cheat + description:Infinite health - P1 + code:7e0574/80 + cheat + description:No health - P2 + code:7e0576/00 + cheat + description:Infinite time + code:7e052c/99 + cheat + description:One win wins the match - P1 + code:7e0570/02 + +cartridge sha256:d4d9f1b41dad7e7a126a9adbe8d86c4b339e120c866156796de1cb0c9a214189 + name:World League Soccer (USA) + cheat + description:Score from anywhere (hold X and kick to the goal line and out of bounds) + code:038d65/a5+038d67/0a+038d69/44+038d68/30+038d66/33 + cheat + description:Each goal worth 2 - P1 + code:03cba3/02 + cheat + description:Each goal worth 3 - P1 + code:03cba3/03 + cheat + description:Each goal worth 4 - P1 + code:03cba3/04 + cheat + description:Each goal worth 5 - P1 + code:03cba3/05 + cheat + description:Each goal worth 6 - P1 + code:03cba3/06 + cheat + description:Each goal worth 7 - P1 + code:03cba3/07 + cheat + description:Each goal worth 8 - P1 + code:03cba3/08 + cheat + description:Each goal worth 9 - P1 + code:03cba3/09 + cheat + description:Each goal worth 2 - P2 + code:03cc0c/02 + cheat + description:Each goal worth 3 - P2 + code:03cc0c/03 + cheat + description:Each goal worth 4 - P2 + code:03cc0c/04 + cheat + description:Each goal worth 5 - P2 + code:03cc0c/05 + cheat + description:Each goal worth 6 - P2 + code:03cc0c/06 + cheat + description:Each goal worth 7 - P2 + code:03cc0c/07 + cheat + description:Each goal worth 8 - P2 + code:03cc0c/08 + cheat + description:Each goal worth 9 - P2 + code:03cc0c/09 + +cartridge sha256:2143bbd87ea1c5cfe5eaf46ae39e3ebb11a2e929d05cbb929904037f4d72acfe + name:World Soccer 94 - Road to Glory (USA) + cheat + description:Score from anywhere (press and hold A, kick to the goal line and out of bounds) + code:80f20f/ad+80f210/a5+80f211/0d+80f213/55 + +cartridge sha256:0af7b0d3022acd24a1fb15865a076519f7f56e7a4b33f12b6d851b3a91e5388c + name:WWF Raw (USA) + cheat + description:Start with half health + code:acf108/03 + cheat + description:Nobody gets hurt + code:afeb63/ad + cheat + description:No out of ring timer + code:affae1/ad + cheat + description:Infinite health - P1 + code:7e0a78/a0 + cheat + description:Two punch knockouts + code:7e0f44/01 + cheat + description:Max grapple meter - P1 + code:7e0b44/be+7e0b45/02+7e0b46/00 + +cartridge sha256:51c53e36ed0b959b0695fc6ef036fa7302d1c995eca35c28261d6f3cb77df0ca + name:WWF Royal Rumble (USA) + cheat + description:Max grapple meter - P1 + code:7e06de/ff+7e06df/02+7e06e0/00 + cheat + description:Two punch knockouts + code:7e092c/01 + +cartridge sha256:0b9abf2fc25a5f07c71f9d8efbb0d0e616c1494060138fbb63f7398e9c26198e + name:WWF Super WrestleMania (USA) + cheat + description:Punches and kicks (except flying drop kick) do no damage + code:009c65/00 + cheat + description:Punches and kicks (except flying drop kick) do more damage + code:009c65/03 + cheat + description:Punches and kicks (except flying drop kick) do a lot more damage + code:009c65/06 + cheat + description:Stomps do no damage + code:009d47/00 + cheat + description:Stomps do more damage + code:009d47/03 + cheat + description:Stomps do a lot more damage + code:009d47/06 + cheat + description:Elbow drops do no damage + code:05f8f5/00 + cheat + description:Elbow drops do more damage + code:05f8f5/05 + cheat + description:Elbow drops do a lot more damage + code:05f8f5/08 + cheat + description:Flying elbow drops do no damage + code:05f8f7/00 + cheat + description:Flying elbow drops do more damage + code:05f8f7/07 + cheat + description:Flying elbow drops do a lot more damage + code:05f8f7/0a + cheat + description:Headbutts do no damage + code:009d99/00 + cheat + description:Headbutts do more damage + code:009d99/06 + cheat + description:Headbutts do a lot more damage + code:009d99/09 + cheat + description:Start with 1/4 health - both players + code:00a284/0c + cheat + description:Start with 1/2 health - both players + code:00a284/18 + cheat + description:Start with 3/4 health - both players + code:00a284/24 + +cartridge sha256:67faa6ed3406a5ab0d7224b811c0960bb36560040ee959bb3304c9293ceaa093 + name:WWF WrestleMania - The Arcade Game (USA) + cheat + description:Infinite time + code:e51845/ea + cheat + description:Do mega damage and don't die + code:c302d4/a5 + cheat + description:Max combo meter + code:c31e48/a9+c31e4b/80 + cheat + description:Start with 1/4 health + code:c30041/20+c300d9/20 + cheat + description:Start with 1/2 health + code:7e0000/00+c300d9/4f + cheat + description:Start with 3/4 health + code:c30041/78+c300d9/78 + cheat + description:Start with 1/4 health - opponent + code:c30012/20 + cheat + description:Start with 1/2 health - opponent + code:c30012/4f + cheat + description:Start with 3/4 health - opponent + code:c30012/78 + +cartridge sha256:71b69490c78d0bbaf47da25217c5dae295190311aa5df75653c3fac0a1b45358 + name:Xardion (USA) + cheat + description:Immune to most collisions + code:04d976/2c + cheat + description:Immune to most bullets + code:04e260/2c + cheat + description:Start characters at level 12 + code:08f1de/00 + +cartridge sha256:dc3792e9fe7ef7aaea4ac675a48ad06129dd3ebdd4b96a513bc8241549cbd579 + name:X-Kaliber 2097 (USA) + cheat + description:Infinite time + code:008c4e/ad + cheat + description:Infinite lives + code:0083ae/ea + cheat + description:Soda Cans give 50% life back + code:1080ee/5a + cheat + description:Infinite health - P1 + code:7e0a18/90 + cheat + description:Infinite lives - P1 + code:7e0a3e/09 + cheat + description:Infinite continues - P1 + code:7e0a46/09 + cheat + description:Infinite time (alt) + code:7e0a21/5a + +cartridge sha256:65fe17fd6b297f52df6ce9812ecb02c3bb1bfda3ebc05a19c4a8decbf9a446ae + name:X-Men - Mutant Apocalypse (USA) + cheat + description:Infinite health + code:c00f99/ee + cheat + description:Infinite health (alt) + code:7e008b/41+7e0c35/41 + cheat + description:Infinite lives - training mode + code:c00e66/ad + cheat + description:Infinite lives - mission mode + code:c00936/ad + cheat + description:Hit anywhere + code:c2f1ee/24+c2f218/80 + cheat + description:Easy specials (press X) + code:c12b2d/ee + cheat + description:Walk through walls + code:c02e38/ad+c106df/b5+c02e45/ad + cheat + description:Invincibility + code:7e0c4c/21 + cheat + description:Infinite lives - Wolverine + code:7e0b7e/08 + cheat + description:Infinite lives - Cyclops + code:7e0b7f/08 + cheat + description:Infinite lives - Beast + code:7e0b82/08 + cheat + description:Infinite lives - Psylocke + code:7e0b80/08 + cheat + description:Infinite lives - Gambit + code:7e0b81/08 + cheat + description:Use 1 button specials from practice mode in mission mode + code:7e0b89/01 + cheat + description:Lava stops flowing + code:7e1685/db + +cartridge sha256:363c60f924257bf6465efc32093c7749a0e69ea7234e47ebd4f070e7b0e7035d + name:Yogi Bear (Japan) + cheat + description:Infinite health + code:7e021e/06 + cheat + description:Infinite lives + code:7e021c/09 + cheat + description:Super-jump + code:7e0ab0/00 + cheat + description:Start on Snow Business Stage 1 + code:7e009f/23 + cheat + description:Start on Snow Business Stage 2 + code:7e009f/28 + cheat + description:Start on Snow Business Stage 3 + code:7e009f/2d + cheat + description:Start on Snow Business Stage 4 + code:7e009f/32 + cheat + description:Start on Cave Capers Stage 1 + code:7e009f/37 + cheat + description:Start on Cave Capers Stage 2 + code:7e009f/3c + cheat + description:Start on Cave Capers Stage 3 + code:7e009f/41 + cheat + description:Start on Cave Capers Stage 4 + code:7e009f/46 + cheat + description:Start on Redwood Rendevous Stage 1 + code:7e009f/4b + cheat + description:Start on Redwood Rendevous Stage 2 + code:7e009f/50 + cheat + description:Start on Redwood Rendevous Stage 3 + code:7e009f/55 + cheat + description:Start on Redwood Rendevous Stage 4 + code:7e009f/5a + cheat + description:Start on Water Palaver Stage 1 + code:7e009f/5f + cheat + description:Start on Water Palaver Stage 2 + code:7e009f/64 + cheat + description:Start on Water Palaver Stage 3 + code:7e009f/69 + cheat + description:Start on Water Palaver Stage 4 + code:7e009f/6e + cheat + description:Start on Construction Site Shenanigans Stage 1 + code:7e009f/73 + cheat + description:Start on Construction Site Shenanigans Stage 2 + code:7e009f/78 + cheat + description:Start on Construction Site Shenanigans Stage 3 + code:7e009f/7d + cheat + description:Start on Construction Site Shenanigans Stage 4 + code:7e009f/82 + +cartridge sha256:163399c955e6d813056826e53fc1a7d21d8958e3d11c6384854cc284412caffb + name:Yogi Bear's Cartoon Capers (Europe) + cheat + description:Infinite health + code:7e021e/06 + cheat + description:Infinite lives + code:7e021c/09 + cheat + description:Start on Snow Business Stage 1 + code:7e009f/23 + cheat + description:Start on Snow Business Stage 2 + code:7e009f/28 + cheat + description:Start on Snow Business Stage 3 + code:7e009f/2d + cheat + description:Start on Snow Business Stage 4 + code:7e009f/32 + cheat + description:Start on Cave Capers Stage 1 + code:7e009f/37 + cheat + description:Start on Cave Capers Stage 2 + code:7e009f/3c + cheat + description:Start on Cave Capers Stage 3 + code:7e009f/41 + cheat + description:Start on Cave Capers Stage 4 + code:7e009f/46 + cheat + description:Start on Redwood Rendevous Stage 1 + code:7e009f/4b + cheat + description:Start on Redwood Rendevous Stage 2 + code:7e009f/50 + cheat + description:Start on Redwood Rendevous Stage 3 + code:7e009f/55 + cheat + description:Start on Redwood Rendevous Stage 4 + code:7e009f/5a + cheat + description:Start on Water Palaver Stage 1 + code:7e009f/5f + cheat + description:Start on Water Palaver Stage 2 + code:7e009f/64 + cheat + description:Start on Water Palaver Stage 3 + code:7e009f/69 + cheat + description:Start on Water Palaver Stage 4 + code:7e009f/6e + cheat + description:Start on Construction Site Shenanigans Stage 1 + code:7e009f/73 + cheat + description:Start on Construction Site Shenanigans Stage 2 + code:7e009f/78 + cheat + description:Start on Construction Site Shenanigans Stage 3 + code:7e009f/7d + cheat + description:Start on Construction Site Shenanigans Stage 4 + code:7e009f/82 + +cartridge sha256:90ad69a489194aca7ef7b7fd1d30e0105da4934a81ac8b0333ea20f9248df92d + name:Yoshi's Cookie (USA) + cheat + description:In action mode, passing a stage advances to the next round + code:0ab417/80 + cheat + description:Immediately complete current Action level whenever effects switch is turned on (keep switch off to play) + code:0ab303/02 + cheat + description:All 99 Action rounds available without the secret code + code:0aa18b/62 + cheat + description:In VS mode, only 1 win is required instead of 3. P2 always wins the set (2P only) + code:0abb8d/01 + cheat + description:In VS mode, the fuses don't count down + code:0acc44/ad + cheat + description:In VS mode, play against tougher opponents without the secret code + code:02b37e/08+02b386/00 + cheat + description:In Puzzle mode, passing a stage advances to the next round + code:0aeeaf/00 + cheat + description:Unlimited moves in puzzle mode (turn effects switch off to use up moves if the level becomes impossible) + code:0af6cd/ad + +cartridge sha256:12fba2aff04c8e39968e828629ebd16caa314bca397a9418d35fdaffe8188e20 + name:Yoshi's Safari (USA) + cheat + description:Almost infinite health + code:90d16a/ad+83bce7/ad + cheat + description:Infinite power + code:818191/00+90d58b/00 + cheat + description:Infinite time + code:83fc5c/ad + cheat + description:Infinite lives + code:80d3be/ad + cheat + description:Don't lose coins when you miss a jump + code:83b711/ad + cheat + description:1 minute for stage 1 instead of 4 + code:8fa456/01 + cheat + description:9 minutes for stage 1 + code:8fa456/09 + cheat + description:1 minute for stage 2 instead of 4 + code:8fa458/01 + cheat + description:9 minutes for stage 2 + code:8fa458/09 + cheat + description:Lose power more quickly + code:818192/01+90d58c/01 + cheat + description:Lose power more slowly + code:818191/05+90d58b/05 + cheat + description:Gain power more quickly + code:8181aa/01+90d59e/01 + cheat + description:Gain power more slowly + code:8181a9/20+90d59d/20 + cheat + description:1-up with every coin after you get 10 + code:83fd12/09 + cheat + description:1-up with every coin after you get 30 + code:83fd12/1e + cheat + description:1-up with every coin after you get 99 + code:83fd12/62 + cheat + description:Start with 1 life + code:8d8131/00 + cheat + description:Start with 5 lives + code:8d8131/04 + cheat + description:Start with 10 lives + code:8d8131/09 + +cartridge sha256:fbe8926fc0149d3e8e2aec20f15640ea6814f4f4b01c3960f3c477f5f17e890f + name:Young Merlin (USA) + cheat + description:Faster Merlin + code:859538/05 + cheat + description:Slower mine cart + code:998193/02 + cheat + description:2 hearts from rainbow water bottle + code:80a642/02 + cheat + description:3 hearts from rainbow water bottle + code:80a642/03 + cheat + description:Start with 6 heart containers (new game) + code:91ba88/06 + cheat + description:Start with 8 heart containers (new game) + code:91ba88/08 + cheat + description:Infinite health + code:7eedde/02 + cheat + description:Have Air Bubble 1D + code:7e4d00/02 + cheat + description:Have Air Bubble on button Y + code:7e4d29/21 + cheat + description:Have Balloon + code:7e4d07/02 + cheat + description:Have Balloon on button Y + code:7e4d1c/28 + cheat + description:Have Blue Spark 6C + code:7e4cf5/02 + cheat + description:Have Blue Sparkly on button Y + code:7e4d26/16 + cheat + description:Have Bubble Wand + code:7e4d0c/02 + cheat + description:Have Bubble Wand on button Y + code:7e4d1d/2d + cheat + description:Have Daffodil + code:7e4ce2/02 + cheat + description:Have Daffodil on button Y + code:7e4d1a/03 + cheat + description:Have Daisy + code:7e4ce1/02 + cheat + description:Have Daisy on button Y + code:7e4d17/02 + cheat + description:Have Dwarf Teleport + code:7e4d11/02 + cheat + description:Have Dwarf Teleport on button Y + code:7e4d1f/32 + cheat + description:Have FishBowl E 4C + code:7e4d0d/02 + cheat + description:Have FishBowl E on button Y + code:7e4d24/2e + cheat + description:Have Key - Gold 4C + code:7e4d03/02 + cheat + description:Have Key - Gold on button Y + code:7e4d22/24 + cheat + description:Have Key - Silver + code:7e4d04/02 + cheat + description:Have Key - Silver on button Y + code:7e4d25/25 + cheat + description:Have Golden Comb + code:7e4cf7/02 + cheat + description:Have Golden Comb on button Y + code:7e4d20/18 + cheat + description:Have Gold Spark 6C + code:7e4d15/02 + cheat + description:Have Gold Spark on button Y + code:7e4d28/36 + cheat + description:Have Golden Foxglove + code:7e4ce4/02 + cheat + description:Have Golden Foxglove on button Y + code:7e4d19/05 + cheat + description:Have Hour Glass + code:7e4cf6/02 + cheat + description:Have Hour Glass on button Y + code:7e4d21/17 + cheat + description:Have Mirror + code:7e4d08/02 + cheat + description:Have Mirror on button Y + code:7e4d1e/29 + cheat + description:Have Reflec Cry 6C + code:7e4d0a/02 + cheat + description:Have Reflec Cry 6C on button Y + code:7e4d27/2b + cheat + description:Have Rose + code:7e4ce3/02 + cheat + description:Have Rose on button Y + code:7e4d18/04 + cheat + description:Have Spring 4C + code:7e4d0b/02 + cheat + description:Have Spring on button Y + code:7e4d23/2c + cheat + description:Have Stun Dust + code:7e4d01/02 + cheat + description:Have Stun Dust on button Y + code:7e4d1b/22 + cheat + description:Have Tulip + code:7e4ce0/02 + cheat + description:Have Tulip on button Y + code:7e4d16/01 + cheat + description:Have Wheel 1D + code:7e4d05/02 + cheat + description:Have Wheel on button Y + code:7e4d2b/26 + cheat + description:Have Wrench 1D + code:7e4d02/04 + cheat + description:Have Wrench on button Y + code:7e4d2a/23 + +cartridge sha256:b0e74f0fe8d1e7fe2fe404341fea7c68e28f3a0ab78552d5092d413f2ecec417 + name:Ys III - Wanderers from Ys (USA) + cheat + description:Invincibility + code:7e1afc/08 + cheat + description:Infinite health + code:1794e1/ad + cheat + description:Infinite Amulet shots + code:7e1fe9/03 + cheat + description:Items are free if you have enough money + code:00f49a/80+00f49b/0a + cheat + description:One hit kills on bosses (except final boss) + code:7e17e1/00 + cheat + description:Gain experience quicker + code:179799/a9 + cheat + description:Gain experience much quicker + code:179799/a9+17979a/35 + cheat + description:Start with 100 hit points instead of 20 + code:17bddb/64 + cheat + description:Start with 200 hit points + code:17bddb/c8 + cheat + description:Start with 488 Gold instead of 1,000 + code:17bdf2/01 + cheat + description:Start with 2,024 Gold + code:17bdf2/07 + cheat + description:Start with 9,704 Gold + code:17bdf2/25 + cheat + description:Start with 20,200 Gold + code:17bdf2/4e + cheat + description:Start with 40,168 Gold + code:17bdf2/9c + cheat + description:Start with 65,512 Gold + code:17bdf2/ff + cheat + description:Invincibility (alt) + code:7e1afc/08 + cheat + description:Infinite Gold + code:7e1297/ff+7e1298/ff + cheat + description:255 Max HP + code:7e1295/ff + cheat + description:Max Exp + code:7e1299/ff+7e129a/ff + cheat + description:255 Ring + code:7e1296/ff + cheat + description:255 STR + code:7e129d/ff + cheat + description:255 DEF + code:7e129e/ff + cheat + description:1 Exp point to gain next level + code:7e129b/01 + cheat + description:Have all equipment + code:7e12a9/ff+7e12aa/ff+7e12ab/ff+7e12b3/ff+7e12ac/ff+7e12ad/ff+7e12ae/ff+7e12af/ff+7e12b0/ff+7e12b1/ff+7e12b2/ff+7e12a0/ff+7e12a1/ff+7e12a2/ff+7e12a3/ff+7e12a4/ff+7e12a5/ff+7e12a6/ff+7e12a7/ff+7e12a8/ff + cheat + description:Have all inventory items + code:7e12c2/ff+7e12c3/ff+7e12c4/ff+7e12b9/ff+7e12ba/ff+7e12bb/ff+7e12bc/ff+7e12bd/ff+7e12be/ff+7e12bf/ff+7e12c0/ff+7e12c1/ff + cheat + description:Have all statues + code:7e12c5/ff+7e12c6/ff+7e12c7/ff+7e12c8/ff + +cartridge sha256:10d94f1acd8108552eaefe9e26069e5d83e8fc3e847df7af318c2e25b53d39c3 + name:Ys IV - Mask of the Sun (Japan) + cheat + description:Infinite HP + code:7e0973/ff + cheat + description:Infinite GP + code:7e0983/ff+7e0984/ff + cheat + description:Max EXP + code:7e097b/ff+7e097c/ff + +cartridge sha256:d8d14c9f599cf915127440ba22fcbb7c33814f5688c9ae4f8855ed1f6ed42128 + name:Yu Yu Hakusho Final - Makai Saikyou Retsuden (Japan) + cheat + description:Infinite health + code:7e0a38/50 + cheat + description:Infinite power + code:7e0a3c/50 + cheat + description:One hit kills + code:7e0f38/00 + cheat + description:Opponent has no power + code:7e0f3c/00 + +cartridge sha256:9b2cb155b270a78d122c46c44287f4973064dc96f75b0471c0843ca6a54bf41d + name:Zen-Nihon GT Senshuken (Japan) + cheat + description:Disable timer + code:7e16dc/00 + cheat + description:Always 1st + code:7e0cdc/00 + cheat + description:Lap modifier + code:7e149c/00 + +cartridge sha256:7d414b7f5941f1eddc35259a22accbbbd7b47c517dfcf8bad86c4dcfa9e50b1e + name:Zero the Kamikaze Squirrel (USA) + cheat + description:Jump higher + code:838542/f4+838a45/f4 + cheat + description:Invincibility + code:7e0e2c/02 + cheat + description:Infinite health + code:7e1674/04 + cheat + description:Infinite lives + code:7e1672/06 + cheat + description:Infinite Shurikens + code:7e1676/99 + +cartridge sha256:25414de02c6805ca62574cfb39c23bf292b3d8c4ff33eb8f212ccdbcd61c5ae3 + name:Zool - Ninja of the 'Nth' Dimension (USA) + cheat + description:Invincibility (blinking) + code:7e1d8b/49 + cheat + description:Invincibility + code:7e05dc/ff + cheat + description:Infinite health + code:7e1cf1/fa + cheat + description:Infinite lives + code:7e020c/63 + cheat + description:Infinite time + code:7e1cef/09 + cheat + description:Infinite continues + code:7e020c/63 + cheat + description:Hit anywhere + code:009de0/80+009de1/1a + cheat + description:Multi-jump + code:00e031/80 + +cartridge sha256:b27e2e957fa760f4f483e2af30e03062034a6c0066984f2e284cc2cb430b2059 + name:Zombies Ate My Neighbors (USA) + cheat + description:Invincibility, hit anywhere, get items from anywhere (do not use martian gun) - both players + code:80f9a8/80+80d01e/00+80bf0c/00+80befe/00 + cheat + description:Invincibility - both players + code:80d01e/00 + cheat + description:Infinite health - both players + code:80d041/ea + cheat + description:Infinite weapons - both players + code:80ed47/00 + cheat + description:Infinite Keys on pick-up + code:80e910/00 + cheat + description:Infinite special items (except Keys and random Potions) + code:80eb58/00 + cheat + description:Infinite lives - both players + code:80cec5/bd + cheat + description:Victims are invincible + code:83a3ac/6b + cheat + description:Package of 99 Squirtgun shots worth 999 + code:80f8ad/09 + cheat + description:Package of 20 Soda Pop Cans worth 99 + code:80f8b8/99 + cheat + description:Package of 20 Tomatoes worth 99 + code:80f8ba/99 + cheat + description:Package of 5 Bazookas worth 999 + code:80f8b7/99 + cheat + description:Each First Aid Kit worth 9 on pick-up + code:80f915/09 + cheat + description:Each Key worth 9 on pick-up + code:80f907/09 + cheat + description:Only 1 victim to rescue per level (no bonus for rescuing all victims, game is over if Zombie eats a victim) + code:8085e8/01 + cheat + description:Can advance to next level after getting 1 victim (no bonus for rescuing all victims, game is over if Zombie eats a victim) + code:80c86b/9c + cheat + description:Walk through walls + code:80e4cc/80+80e50b/80 + cheat + description:Continue with 1/2 health + code:80d960/05 + cheat + description:Start with 1/2 health + code:80887a/05 + cheat + description:Start with 10 lives + code:808880/09 + cheat + description:Start with 7 lives + code:808880/06 + cheat + description:Start with 1 life + code:808880/00 + cheat + description:Start with 50 shots in Squirtgun + code:808893/00 + cheat + description:Start with 100 shots in Squirtgun + code:808892/00 + cheat + description:Start with 550 shots in Squirtgun + code:808893/05 + cheat + description:Start with 950 shots in Squirtgun + code:808893/09 + cheat + description:Start with Soda Pop Cans instead of Squirtguns (Press B or Y to get item) + code:80889d/d8 + cheat + description:Start with Bazookas (Press B or Y to get item) + code:80889d/d6 + cheat + description:Start with Tomatoes (Press B or Y to get item) + code:80889d/da + cheat + description:Start with Fire Extinguishers (Press B or Y to get item) + code:80889d/ce + cheat + description:Start with Ice Pops (Press B or Y to get item) + code:80889d/dc + cheat + description:Start with Peppers (Press B or Y to get item) + code:80889d/de + cheat + description:Start with Martian Bubble Guns (Press B or Y to get item) + code:80889d/d0 + cheat + description:Start with Weed-eaters (Press B or Y to get item) + code:80889d/d2 + cheat + description:Start with Ancient Artifacts (Press B or Y to get item) + code:80889d/d4 + cheat + description:Start with Plates (Press B or Y to get item) + code:80889d/e0 + cheat + description:Start with Silverware (Press B or Y to get item) + code:80889d/e2 + cheat + description:Start with Footballs (Press B or Y to get item) + code:80889d/e4 + cheat + description:Start with 9 First Aid Kits instead of 1 + code:808895/09 + cheat + description:Start with Speed Shoes instead of First Aid Kit (Press B or Y to get item) + code:8088a0/0e + cheat + description:Start with a Monster Potion (Press B or Y to get item) + code:8088a0/10 + cheat + description:Start with a Ghost Potion (Press B or Y to get item) + code:8088a0/12 + cheat + description:Start with a Random Potion (Press B or Y to get item) + code:8088a0/14 + cheat + description:Start with a Pandora's box (Press B or Y to get item) + code:8088a0/1c + cheat + description:Start with a Skeleton key (Press B or Y to get item) + code:8088a0/1e + cheat + description:Start with a Decoy (Press B or Y to get item) + code:8088a0/20 + cheat + description:Start on level 2 + code:8085f1/02 + cheat + description:Start on level 3 + code:8085f1/03 + cheat + description:Start on level 4 + code:8085f1/04 + cheat + description:Start on level 5 + code:8085f1/05 + cheat + description:Start on level 6 + code:8085f1/06 + cheat + description:Start on level 7 + code:8085f1/07 + cheat + description:Start on level 8 + code:8085f1/08 + cheat + description:Start on level 9 + code:8085f1/09 + cheat + description:Start on level 10 + code:8085f1/0a + cheat + description:Start on level 11 + code:8085f1/0b + cheat + description:Start on level 12 + code:8085f1/0c + cheat + description:Start on level 13 + code:8085f1/0d + cheat + description:Start on level 14 + code:8085f1/0e + cheat + description:Start on level 15 + code:8085f1/0f + cheat + description:Start on level 16 + code:8085f1/10 + cheat + description:Start on level 17 + code:8085f1/11 + cheat + description:Start on level 18 + code:8085f1/12 + cheat + description:Start on level 19 + code:8085f1/13 + cheat + description:Start on level 20 + code:8085f1/14 + cheat + description:Start on level 21 + code:8085f1/15 + cheat + description:Start on level 22 + code:8085f1/16 + cheat + description:Start on level 23 + code:8085f1/17 + cheat + description:Start on level 24 + code:8085f1/18 + cheat + description:Start on level 25 + code:8085f1/19 + cheat + description:Start on level 26 + code:8085f1/1a + cheat + description:Start on level 27 + code:8085f1/1b + cheat + description:Start on level 28 + code:8085f1/1c + cheat + description:Start on level 29 + code:8085f1/1d + cheat + description:Start on level 30 + code:8085f1/1e + cheat + description:Start on level 31 + code:8085f1/1f + cheat + description:Start on level 32 + code:8085f1/20 + cheat + description:Start on level 33 + code:8085f1/21 + cheat + description:Start on level 34 + code:8085f1/22 + cheat + description:Start on level 35 + code:8085f1/23 + cheat + description:Start on level 36 + code:8085f1/24 + cheat + description:Start on level 37 + code:8085f1/25 + cheat + description:Start on level 38 + code:8085f1/26 + cheat + description:Start on level 39 + code:8085f1/27 + cheat + description:Start on level 40 + code:8085f1/28 + cheat + description:Start on level 41 + code:8085f1/29 + cheat + description:Start on level 42 + code:8085f1/2a + cheat + description:Start on level 43 + code:8085f1/2b + cheat + description:Start on level 44 + code:8085f1/2c + cheat + description:Start on level 45 + code:8085f1/2d + cheat + description:Start on level 46 + code:8085f1/2e + cheat + description:Start on level 47 + code:8085f1/2f + cheat + description:Start on level 48 + code:8085f1/30 + cheat + description:Start on bonus level Son of Dr. Tongue + code:8085f1/32 + cheat + description:Start on bonus level Day of the Tentacle + code:8085f1/33 + cheat + description:Start on bonus level Someplace Very Warm + code:8085f1/34 + cheat + description:Start on bonus level Curse of the Pharaohs + code:8085f1/35 + cheat + description:Start on bonus level Mushroom Men + code:8085f1/36 + cheat + description:Start on bonus level Cheerleaders vs. the Monsters + code:8085f1/37 + cheat + description:Start on credit level Monsters Among Us + code:8085f1/31 + cheat + description:Infinite health - P1 + code:7e1cb8/0a + cheat + description:Infinite health - P2 + code:7e1cba/0a + cheat + description:Infinite lives - P1 + code:7e1d4c/03 + cheat + description:Infinite lives - P2 + code:7e1d4e/03 + cheat + description:Skip Konami and LucasArts intro screens + code:7e0c7c/01 + cheat + description:Only 1 victim to rescue to advance + code:7e1d52/01 + cheat + description:Always have Shoes effect - P1 + code:7e0155/ff + cheat + description:Always have Shoes effect - P2 + code:7e02d5/ff + cheat + description:Infinite Bazooka - P1 + code:7e1cd6/50 + cheat + description:Infinite Bazooka - P2 + code:7e1cf6/50 + cheat + description:Infinite Berries - P1 + code:7e1cda/50 + cheat + description:Infinite Berries - P2 + code:7e1cfa/50 + cheat + description:Infinite Cold Potion - P1 + code:7e1d12/09 + cheat + description:Infinite Cold Potion - P2 + code:7e1d32/09 + cheat + description:Infinite Dummy Clown - P1 + code:7e1d20/09 + cheat + description:Infinite Dummy Clown - P2 + code:7e1d40/09 + cheat + description:Infinite Extinguisher - P1 + code:7e1cce/50 + cheat + description:Infinite Extinguisher - P2 + code:7e1cee/50 + cheat + description:Infinite Flamethrower - P1 + code:7e1ce6/50 + cheat + description:Infinite Flamethrower - P2 + code:7e1d06/50 + cheat + description:Infinite Footballs - P1 + code:7e1ce4/50 + cheat + description:Infinite Footballs - P2 + code:7e1d04/50 + cheat + description:Infinite Holy Cross - P1 + code:7e1cd4/50 + cheat + description:Infinite Holy Cross - P2 + code:7e1cf4/50 + cheat + description:Infinite Keys - P1 + code:7e1d0c/09 + cheat + description:Infinite Keys - P2 + code:7e1d2c/09 + cheat + description:Infinite Martian Gun - P1 + code:7e1cd0/50 + cheat + description:Infinite Martian Gun - P2 + code:7e1cf0/50 + cheat + description:Infinite Medical Kit - P1 + code:7e1d1a/09 + cheat + description:Infinite Medical Kit - P2 + code:7e1d3a/09 + cheat + description:Infinite Monster Potion - P1 + code:7e1d10/09 + cheat + description:Infinite Monster Potion - P2 + code:7e1d30/09 + cheat + description:Infinite Pandoras Box - P1 + code:7e1d1c/09 + cheat + description:Infinite Pandoras Box - P2 + code:7e1d3c/09 + cheat + description:Infinite Plates - P1 + code:7e1ce0/50 + cheat + description:Infinite Plates - P2 + code:7e1d00/50 + cheat + description:Infinite Popsicles - P1 + code:7e1cdc/50 + cheat + description:Infinite Popsicles - P2 + code:7e1cfc/50 + cheat + description:Infinite Random A Potion - P1 + code:7e1d14/09 + cheat + description:Infinite Random A Potion - P2 + code:7e1d34/09 + cheat + description:Infinite Random B Potion - P1 + code:7e1d16/09 + cheat + description:Infinite Random B Potion - P2 + code:7e1d36/09 + cheat + description:Infinite Shoes - P1 + code:7e1d0e/09 + cheat + description:Infinite Shoes - P2 + code:7e1d2e/09 + cheat + description:Infinite Silverware - P1 + code:7e1ce2/50 + cheat + description:Infinite Silverware - P2 + code:7e1d02/50 + cheat + description:Infinite Skeleton Key - P1 + code:7e1d1e/09 + cheat + description:Infinite Skeleton Key - P2 + code:7e1d3e/09 + cheat + description:Infinite Soda Bombs - P1 + code:7e1cd8/50 + cheat + description:Infinite Soda Bombs - P2 + code:7e1cf8/50 + cheat + description:Infinite Squirt Gun - P1 + code:7e1ccc/50 + cheat + description:Infinite Squirt Gun - P2 + code:7e1cec/50 + cheat + description:Infinite Weed Wacker - P1 + code:7e1cd2/50 + cheat + description:Infinite Weed Wacker - P2 + code:7e1cf2/50 + +cartridge sha256:c8497ee7a25d1eb7cf4ef1604b2fd7836a64c5c30e8334f7a48f1ed2a27b5cc1 + name:1942 (USA, Europe) + cheat + description:Invincibility + code:2c8b/28/18+18c5/28/18 + cheat + description:Hit anywhere + code:19ec/26/00+19f5/1b/c9 + +cartridge sha256:da5eb5a56ab97f7b6779fa70b894cb94abf351aaf0c9430bd775156528a334a0 + name:4-in-1 Fun Pak (USA, Europe) + cheat + description:Chess - move anywhere + code:5ed0/be/77+5ed1/28/18 + cheat + description:Checkers - move anywhere + code:54bc/28/18+54cd/20/18+539c/28/18 + +cartridge sha256:d16375478a455270b758eb61f9c9fb380fbf5187e32a8fe3fc93ba4f4a330959 + name:4-in-1 Fun Pak Volume II (USA, Europe) + cheat + description:Solitaire - move cards anywhere + code:48e3/16/00+4559/7d/00 + +cartridge sha256:f66a6c521c706bf3bf4536731becacf1336a711bd40658d853646cd6b20fdb2b + name:720 Degrees (USA, Europe) + cheat + description:Jump to get 1000 points + code:7da4/0c/00 + +cartridge sha256:52ee7edb02d42bfc7a9a5a52df082424cd8d9b3cbd2aa47fc84bd32f79cd059a + name:A-mazing Tater (USA) + cheat + description:Walk anywhere + code:0f68/1d/00 + +cartridge sha256:fa9fe020c07a5194dcd61ab33be44779ce5c9de4074fac3eb68bae9311d7c2f6 + name:Action Man - Search for Base X (USA, Europe) + cheat + description:Invincibility + code:66d8/ea/fa + cheat + description:Hit anywhere + code:673a/24/00 + +cartridge sha256:18746d4607424feca05aee056c3ed5f840195c792409881e9145d4bd96800dbd + name:Addams Family, The - Pugsley's Scavenger Hunt (USA, Europe) + cheat + description:Invincibility + code:3915/35/c9 + cheat + description:Infinite health + code:3915/35/be + cheat + description:Infinite hearts + code:3911/c1/00 + cheat + description:Infinite lives + code:0428/ea/fa + cheat + description:Infinite lives (alt) + code:0427/3d/be + cheat + description:When game begins, go through any door, enter secret bonus room, disable to exit room + code:13de/e6/af+13df/1f/3c+13e1/7f/7d + cheat + description:Lose 1 heart to become invincible + code:0adc/ea/fa + cheat + description:Start each life with 1 heart + code:7fe9/03/01 + cheat + description:Start each life with 5 hearts + code:7fe9/03/05 + cheat + description:Start with 1 life + code:0217/05/01 + cheat + description:Start with 10 lives + code:0217/05/0a + +cartridge sha256:f267738e785f43a09c92511bcbb7f16d2e8acbe43b36f75bee35ff3fb0c21621 + name:Addams Family, The (USA) + cheat + description:Invincibility + code:4ada/ea/be+09d7/ea/c9 + cheat + description:Infinite health + code:1f35/35/be + cheat + description:Infinite lives + code:5dce/35/be + cheat + description:Infinite weapon + code:7868/35/be + cheat + description:Hit anywhere + code:49fd/08/00 + +cartridge sha256:7771919d5f5a114fb8685345eab290be22e99c59d8798ed9c5f29e3079c11c56 + name:Adventure Island (USA, Europe) + cheat + description:Invincibility + code:1653/ea/be + cheat + description:Infinite time + code:1690/35/be + cheat + description:Infinite lives + code:7ac8/35/be + cheat + description:Hit anywhere + code:20e1/f6/00+2102/28/18 + +cartridge sha256:bbb38ee1e9877404dd999ef7067aa238a1039ca603b987f8adeff4488e318331 + name:Adventure Island II - Aliens in Paradise (USA, Europe) + cheat + description:Invincibility + code:1ad8/ea/c9 + cheat + description:Infinite time + code:0e2c/ea/c9 + cheat + description:Infinite lives + code:46dd/01/00 + cheat + description:Infinite lives (alt) + code:46dc/d6/be + cheat + description:Hit anywhere + code:1ca1/c8/c9+1922/d2/c3 + cheat + description:No gradual loss of energy, but can still be drained by obstacles and enemies + code:0e28/01/00 + cheat + description:Once you collect any non-throwable object, you can't lose it from menu + code:5d51/01/00 + cheat + description:Start with 1 of each power-up + code:4037/af/3c + cheat + description:Start with 1 life + code:406d/03/00 + cheat + description:Start with 6 lives + code:406d/03/05 + cheat + description:Start with 9 lives + code:406d/03/08 + cheat + description:Start on level 1-4 + code:4057/01/08 + +cartridge sha256:4c156c4d826b9cba5741feb621de60c6294adb36553fc43971794bd2a4ffb34a + name:Adventures of Lolo (Europe) (SGB Enhanced) + cheat + description:Walk anywhere + code:4928/06/00 + +cartridge sha256:50c3a2193005c9134699ab00de16510fb946db10cdbc33bfacd8a3132926b72e + name:Adventures of Pinocchio, The (Unknown) (Proto) + cheat + description:Invincibility + code:14c0/e0/c9 + +cartridge sha256:ee582fc5f302c430556703c553c3a49db8e05847ba9b13d0f6bc018657ac8593 + name:Adventures of Rocky and Bullwinkle and Friends, The (USA) + cheat + description:Invincibility + code:144c/c0/c9 + cheat + description:Invincibility after first hit + code:1428/ea/fa + cheat + description:Infinite energy + code:1496/ea/fa + cheat + description:Die in one hit + code:1453/78/01 + cheat + description:Start with 1 life + code:515c/02/00 + cheat + description:Start with 10 lives + code:515c/02/09 + cheat + description:Start with 15 lives + code:515c/02/0e + cheat + description:Start with 1 mooseberry - 1st life + code:5161/03/00 + cheat + description:Start with 5 mooseberries - 1st life + code:5161/03/04 + cheat + description:Start with 10 mooseberries - 1st life + code:5161/03/09 + cheat + description:Start with 1 mooseberry - 2nd life + code:14bc/03/00 + cheat + description:Start with 5 mooseberries - 2nd life + code:14bc/03/04 + cheat + description:Start with 10 mooseberries - 2nd life + code:14bc/03/09 + +cartridge sha256:e946c9e9c819cb9ba37eb1718903aa3cd5ea101d5890e27681b370a44fe0f1d8 + name:Adventures of Star Saver, The (USA, Europe) + cheat + description:Invincibility (blinking) + code:1bd9/ea/c9 + cheat + description:Infinite lives + code:11a7/35/be + cheat + description:Infinite life ropes + code:2389/c6/00 + cheat + description:Infinite shields on pick-up + code:2163/c6/00+1bb7/c6/00+1bdb/c6/00 + cheat + description:Hit anywhere + code:1dc4/38/18+1db7/38/18 + cheat + description:49 life ropes on pick-up + code:1c94/34/75 + cheat + description:Start with all power-ups (except shields) - 1st life only + code:117f/af/3c + cheat + description:Start with 2 lives + code:1199/03/02 + cheat + description:Start with 4 lives + code:1199/03/04 + cheat + description:Start with 6 lives + code:1199/03/06 + +cartridge sha256:29a39e0ccf66a1eb5d456e027b2c1abcd9d2ea8bbf6b6d19d86fff61a493e008 + name:Adventures of the Smurfs, The (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Infinite health + code:1b9f/09/00 + +cartridge sha256:cb1d45fca310ef4b7013d094663bddcd209362f272bb3e54ce10540828c8c212 + name:Aerostar (USA, Europe) + cheat + description:Invincibility + code:2aad/d2/03+2aae/30/17+1707/3e/f0 + cheat + description:Infinite lives + code:16f1/e0/f0 + cheat + description:Infinite jump + code:1870/e0/be + cheat + description:Hit anywhere + code:2e93/c0/c9+2fe0/2f/3e+2fdf/30/18 + +cartridge sha256:efee40857f6310f5437732198d998779711f86d80673e72cfc93a3378ca26303 + name:AirForce Delta (USA) + cheat + description:Invincibility + code:7568/38/18 + +cartridge sha256:8e45c7d6b5498d4048653e92b2a792bb2eea00b2897a7711fb7be1b6bed0534f + name:Akumajou Dracula - Shikkoku Taru Zensoukyoku - Dark Night Prelude (Japan) (SGB Enhanced) + cheat + description:Fast walk left + code:4df3/c5/11 + cheat + description:Fast walk right + code:4dcc/c5/11 + cheat + description:Fast jump left + code:542c/c5/11 + cheat + description:Fast jump right + code:540b/c5/11 + +cartridge sha256:4940bf228fb2095daa6b382d84ebd0cf05cd81fc2e6e5244a03ab458593e53f5 + name:Aladdin (USA) (SGB Enhanced) + cheat + description:Infinite health + code:0dca/90/be + cheat + description:Infinite lives + code:1ce5/3d/be + cheat + description:Infinite Apples + code:216d/3d/be + cheat + description:Hit anywhere - Sword + code:5c54/c0/00+5c4a/d8/00 + +cartridge sha256:944df9d20c715099ef6bf0e418d928684b284d4a4562391a661a7978fa7f5417 + name:Alfred Chicken (USA) + cheat + description:Invincibility + code:1546/e0/be + cheat + description:Infinite time + code:1bc2/ce/be + cheat + description:Infinite lives + code:1be9/93/be + +cartridge sha256:4790f55d0917f4418c63d29c5c528362b1c7ae39546f6fc3ae94e867d1e9f270 + name:Alien 3 (USA, Europe) + cheat + description:Almost infinite health + code:1768/ea/fa + cheat + description:Infinite tries + code:1692/ea/fa + cheat + description:Infinite shots per clip on pick-up + code:2f9c/c3/00 + cheat + description:Infinite magazine clips on pick-up + code:2b45/ea/fa + cheat + description:50 shots per magazine clip + code:5a3c/3c/32 + cheat + description:75 shots per magazine clip + code:5a3c/3c/4b + cheat + description:100 shots per magazine clip + code:5a3c/3c/64 + cheat + description:Start with 1/2 health + code:2442/ff/8e + cheat + description:Start with 4 tries + code:1b27/03/04 + cheat + description:Start with 6 tries + code:1b27/03/06 + cheat + description:Start with 10 tries + code:1b27/03/0a + +cartridge sha256:073f82f8bf4ab9d15569b5a7a4aa152351c177b9072a9481563b26562215f55b + name:Alien Olympics (Europe) + cheat + description:Meter never decreases + code:4d7d/9a/c9 + cheat + description:Hyper velocity + code:4d7a/93/be + cheat + description:Freeze time + code:5c6d/3c/be + +cartridge sha256:e1a71b44a1c5dcacfe90e76907766fd48518482950531bee34208114d4a03e53 + name:Alien vs Predator - The Last of His Clan (USA) + cheat + description:Infinite lives + code:2fd4/35/be + cheat + description:Infinite energy + code:04ef/3d/be + cheat + description:Infinite HP + code:3bba/ea/be + +cartridge sha256:ed8070e011713527bdc03e2b9cec9f9c4a7e3aaa00e57e8786a186b265da1bb2 + name:Alleyway (World) + cheat + description:Infinite lives + code:07ee/3d/be + cheat + description:Hit anywhere - Paddle + code:0cd1/0f/00 + +cartridge sha256:04c5507efe0beb40ea1a887538bd8a04acc70622bf9ef800951a71f4804c9cbc + name:All-Star Baseball 99 (USA) + cheat + description:Infinite time + code:665e/01/00 + cheat + description:Computer's 3-pt. shots worth 25 points + code:211f/03/19 + cheat + description:Computer's 3-pt. shots worth 17 points + code:211f/03/11+2118/c1/11 + cheat + description:Computer makes almost all shots + code:2ef7/fe/36+26f8/04/09 + cheat + description:Computer can't score against you + code:2115/36/34+2116/c1/00 + cheat + description:Shot clock for human player is 9 seconds - 1-on-1 game + code:65fb/24/09+233d/24/09+65c4/24/09 + +cartridge sha256:21d507b3ee6acbde8427d8e5cc5de1083eec03df8bd55745e4384ee0be14460e + name:All-Star Baseball 2000 (USA, Europe) + cheat + description:Balls are considered strikes + code:53f8/0c/00+53ea/1a/00+53dc/28/00 + +cartridge sha256:c0bd16cfe156f36a0bcbf70c537a172ad4780641da6e23eacf47cc5f155d2640 + name:All-Star Baseball 2001 (USA) + cheat + description:Balls are considered strikes + code:53f7/30/3e+53ea/1a/00+53dc/28/00 + +cartridge sha256:995dc210efdf7c12ae7d4c731e2ea0ae758554fc7f545dae72aa97a99dd10ed7 + name:Alone in the Dark - The New Nightmare (USA) (En,Fr,Es) + cheat + description:Invincibility + code:43d5/38/18 + +cartridge sha256:4f6450321ee163d5fd8a942816b10af1ce41bbcad62185a550c97b16cac125a1 + name:Altered Space - A 3-D Alien Adventure (USA) + cheat + description:Infinite energy (air) + code:14f1/d6/3a + +cartridge sha256:db4e590899aab75bceb31e84a2ec77c34b561838a61fd9dc9fda004a0507a01c + name:Amazing Penguin (USA, Europe) + cheat + description:Invincibility + code:119f/c0/c9 + cheat + description:Infinite lives + code:2228/3d/be + cheat + description:Infinite time + code:16c4/35/be + +cartridge sha256:a52b036d637b59950749de679208785480b8ad2d5e95c0ea2a6f638750cc645e + name:Amazing Spider-Man, The (USA, Europe) + cheat + description:Hit anywhere + code:28ea/d8/00+288c/65/00 + +cartridge sha256:c4eb652e47d458b8faba7fd753a3eff8e875658f2b4cee0ae6194dc8cb0783e7 + name:Amida (Japan) + cheat + description:Invincibility + code:03eb/06/00+05e2/20/18 + +cartridge sha256:4d2cca30eb8804ed6fffa07da2dea1992ff1ce12bded2195d05cf912b879b951 + name:Animaniacs (USA) (SGB Enhanced) + cheat + description:Multi-jump + code:4a0e/c0/00+4a0b/c0/00 + cheat + description:Get Stars from anywhere + code:4060/40/00 + +cartridge sha256:23b432a52aefcca6731fccace793f58ee5cac030b27ad18ac8d354430a388f01 + name:Arcade Classics - Battlezone & Super Breakout (USA, Europe) (SGB Enhanced) + cheat + description:Paddle hits ball anywhere + code:0f6d/79/00+0f70/38/18 + +cartridge sha256:7cebe1e446c56061f71e94b99cf6dfb7267cac0e21cb37b0f9a8118d5a127eb0 + name:Arcade Classic No. 2 - Centipede & Millipede (USA, Europe) (SGB Enhanced) + cheat + description:Centipede - Invincibility + code:5628/d2/c3 + cheat + description:Millipede - Invincibility + code:7543/ea/fa+7573/b8/37 + +cartridge sha256:b9bb5b4d3274a7f4c443bd8fb2bf5f1018358d76a54c01e3a53f7ff610fa4fa6 + name:Aretha (Japan) + cheat + description:Walk anywhere + code:562e/01/00 + +cartridge sha256:afaf5380f970c2f07ff585a84bab50295fd17888591511cc1d71e8d7ddad7599 + name:Aretha II (Japan) + cheat + description:Walk anywhere + code:4cce/01/00 + +cartridge sha256:c504be420e7bfdcf9905fc4d6674fd4b7466e832976a7a48660b901086536d1f + name:Army Men (USA, Europe) (En,Fr,De) + cheat + description:Invincibility + code:7d00/38/18 + cheat + description:Infinite health + code:0c33/c0/c9 + cheat + description:Infinite ammo - all weapons + code:0cd1/35/00 + cheat + description:Get items from anywhere + code:3345/d2/fa+332c/d2/fa + +cartridge sha256:6da0357c4b00a1b8393f4e9fb5dbbe620e9b1680a7c4032303a058178fa245b7 + name:Army Men 2 (USA, Europe) (En,Fr,De) + cheat + description:Invincibility + code:796a/20/18 + cheat + description:Infinite health + code:772a/c0/c9 + cheat + description:Infinite ammo - all weapons + code:0cda/35/00 + +cartridge sha256:801660458dc65c29701f21985943ba84c1f55cf57c9be3527b17548c33be260d + name:Asterix - Search for Dogmatix (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Invincibility + code:1043/28/3e+47b2/c8/c9 + cheat + description:Hit anywhere + code:1d14/d2/fa + +cartridge sha256:b34d96392f38b6b7c5462ce166f26e5c42f356dff6cff74ef9ac3e940ad7c6de + name:Asteroids (USA, Europe) + cheat + description:Infinite lives + code:0383/35/00 + cheat + description:No extra rocks as you go up levels + code:2a7e/34/00 + cheat + description:Invincible against rocks (from starting/center position only) + code:2cb4/07/01+039c/35/00 + cheat + description:Start with 1 life + code:0315/03/01 + cheat + description:Start with 5 lives + code:0315/03/05 + cheat + description:Start with 9 lives + code:0315/03/09 + +cartridge sha256:3f0688ed9219c44ce133647f0668cde50fdcba7ed8f04c34c3a0fc5ce596bfe5 + name:Asteroids (USA, Europe) + cheat + description:Invincibility + code:5549/d0/c9 + +cartridge sha256:d5306853c8dc7d402808cc340064fdf48d930bbc5a531c8ece3661bfa7f7ff55 + name:Atlantis - The Lost Empire (USA, Europe) + cheat + description:Infinite energy + code:52ac/ea/fa + cheat + description:Infinite lives + code:1c3a/ea/fa + cheat + description:Start with 9 lives + code:343e/03/09 + +cartridge sha256:2df8eb5d48a204d9609e0c12fed81304cc0b23421c5015ab2296d51ffc8b36ad + name:Atomic Punk (USA) + cheat + description:Invincibility and infinite time + code:025e/47/09+025d/94/75+0976/ff/91 + cheat + description:Hit anywhere - Mode A + code:1672/38/20+1671/10/3d+1670/fe/8b+166f/1a/f0 + cheat + description:Hit anywhere - Mode B + code:57ee/d8/c8+57ed/10/00+57ea/4a/c3+57e9/48/00+57e8/cd/21 + +cartridge sha256:ac3656cb5b86c13ad67a486d11d21643fdec306500d989fbd770b5939bab22f0 + name:Attack of the Killer Tomatoes (USA, Europe) + cheat + description:Infinite health + code:0adb/35/00 + cheat + description:Infinite lives + code:3945/ea/fa + +cartridge sha256:0d80b2ad776053f50c3eb0e0e32c675f24acf94923bf3ac4c156c7c28bc76a6e + name:Avenging Spirit (USA, Europe) + cheat + description:Invincibility except against spikes + code:3592/fa/c9+2e82/c0/c9 + cheat + description:Invincibility against spikes + code:554d/c0/c9 + cheat + description:Infinite health except if weapon is used against you + code:35af/ea/fa+2ec2/ea/fa + cheat + description:Infinite L health except against spikes + code:2eb5/ea/fa + cheat + description:Hit anywhere + code:2d4d/ea/fa+2d30/33/00 + cheat + description:Get items from anywhere + code:6550/ca/fa + cheat + description:Multi-jump + code:4fa6/d8/00 + cheat + description:Start with 1/2 health + code:332b/14/0a + cheat + description:Start with 1/4 health + code:332b/14/05 + cheat + description:Start with 3/4 health + code:332b/14/0f + cheat + description:Start on level 2 (brings you back to level 2) + code:39b9/01/02 + cheat + description:Start on level 4 (brings you back to level 2) + code:39b9/01/04 + cheat + description:Start on level 6 (brings you back to level 2) + code:39b9/01/06 + +cartridge sha256:6340ba86bf9500ece66d8acbcca90c4ab8c42de26804fde393311d62eaab3b61 + name:B.C. Kid 2 (Europe) (SGB Enhanced) + cheat + description:Invincibility + code:5aab/12/00+4f26/20/18 + cheat + description:Hit anywhere + code:5dce/28/18+5c08/cd/fa + +cartridge sha256:1b48b454bb421836c33c2d572c61f69145a077ebcecbf8194dfb05fc6581ff82 + name:Balloon Kid (USA, Europe) + cheat + description:Invincibility against fire + code:5604/09/00 + +cartridge sha256:c71663c9172c69b3daded65aaaa3735d1f50379a471af345e8421a6a6c9aaa98 + name:Barbie - Game Girl (USA, Europe) + cheat + description:Infinite HP + code:3aa5/ea/fa + cheat + description:Infinite continues + code:6b95/ea/fa + cheat + description:1 continue + code:27ad/03/01 + cheat + description:4 continues + code:27ad/03/04 + cheat + description:8 continues + code:27ad/03/08 + cheat + description:Start with 2 HP + code:277a/05/02 + cheat + description:Start with 4 HP + code:277a/05/04 + cheat + description:Start with 8 HP + code:277a/05/08 + +cartridge sha256:86e5b7037d7c61248adfdc316d61b5c58fe46c5d3fe376bcdfeda9d6538b197d + name:Bart Simpson's Escape from Camp Deadly (USA, Europe) + cheat + description:Infinite health + code:07fa/ea/fa + +cartridge sha256:debc4ac9d7587166f4754d99955c8ed8c5ae014bb10e91764fe9e632cdbcb3fc + name:Baseball (World) + cheat + description:Balls are counted as strikes + code:6047/d8/00 + +cartridge sha256:0eedbdd6530f30adcc8ee88b32e852b7983de8bba8122ddd2c1adaf2805a454c + name:Bases Loaded for Game Boy (USA) + cheat + description:No walks + code:4c63/3c/00 + cheat + description:1 ball and you walk + code:4c66/04/00 + cheat + description:2 balls and you walk + code:4c66/04/02 + cheat + description:3 balls and you walk + code:4c66/04/03 + cheat + description:5 balls and you walk + code:4c66/04/04 + cheat + description:Outs aren't counted (base runners will still be taken out) + code:4c77/3c/00 + cheat + description:Number of outs to retire the side varies + code:738f/03/00 + cheat + description:Strikes aren't counted + code:4c43/34/00 + cheat + description:1 strike and you're out + code:4c46/03/01 + cheat + description:2 strikes and you're out + code:4c46/03/02 + cheat + description:5 strikes and you're out + code:4c46/03/05 + cheat + description:No scoring - disable to score + code:081f/01/00+0811/01/00 + +cartridge sha256:2eb0708771791f2e126bd97e672a365c70c3d7064ecc391433545352133dad60 + name:Battle Crusher (Japan) (SGB Enhanced) + cheat + description:Hit anywhere - P1 + code:53de/05/00 + cheat + description:Invincibility (except throws) - P1 + code:53cc/28/18 + cheat + description:Blocking disabled - both players + code:23cb/01/00 + +cartridge sha256:ea30dd015164e6895547d518a96cee60a17767f985b68c50d07ca560c80956ae + name:Battle of Olympus, The (Europe) (En,Fr,De,Es,It) + cheat + description:Hit anywhere + code:2a7b/b7/37 + cheat + description:Get items from anywhere (press down) + code:61a6/11/00 + +cartridge sha256:c38fc7e54ed27bd82c9829a6535f5be0d2ff81822863ab9c088bf345ab01b734 + name:BattleCity (Japan) + cheat + description:Invincibility + code:3668/da/c3 + cheat + description:Invincibility - Base + code:3e99/01/00 + +cartridge sha256:9ac1f4a299d32ba21cf65f67ab210afeb4c629adbd8e5779f76b6667ca3a0a4a + name:Batman - The Animated Series (USA, Europe) + cheat + description:Almost invincible - disable if you get stuck + code:2592/cd/21 + cheat + description:Infinite energy + code:25ef/77/00 + cheat + description:Infinite batarangs + code:2ba3/35/00 + cheat + description:One hit kills on most enemies + code:1615/91/af + cheat + description:Each batarang pick-up is worth 9 + code:4a70/05/09 + cheat + description:Most enemies don't die + code:1616/77/00 + cheat + description:Most enemies are harder to kill + code:4fcd/02/0a + cheat + description:Start with 7 batarangs + code:2496/af/00+249a/ea/fa + cheat + description:Start with very little energy + code:248e/07/01 + cheat + description:Start with about half energy + code:248e/07/04 + cheat + description:Start with about 2x energy + code:248e/07/0e + +cartridge sha256:d0e4ff010ab013e519abd9950ab465f3369c76e23d82927c0f39b5e259d4febf + name:Batman - The Video Game (World) + cheat + description:Invincibility + code:018d/ff/a1 + cheat + description:Infinite health + code:4ec1/ea/fa + cheat + description:Infinite health (alt) + code:0104/c0/c8 + cheat + description:Infinite lives + code:095d/ea/fa + cheat + description:Infinite lives (alt) + code:0103/c0/c7 + cheat + description:Hit anywhere + code:4275/54/00+2e16/30/18+2e17/12/23 + cheat + description:Hit anywhere - Bosses + code:2eca/25/28+2ec9/38/18 + cheat + description:Multi-jump + code:375b/28/18 + +cartridge sha256:152fc252bba7130e786d408eed310b3009b8e05834f8003dfbf514ec804cbaea + name:Batman - Return of the Joker (USA, Europe) + cheat + description:Invincibile against enemies + code:54ad/11/00+54b2/e6/c6 + cheat + description:Infinite batarangs on pick-up + code:1996/3d/00 + cheat + description:Infinite continues + code:2ab5/c7/00 + cheat + description:Select any weapon from menu + code:56bc/e6/00 + cheat + description:Hit anywhere + code:26b5/6c/00+26ac/75/00 + cheat + description:Multi-jump + code:1f4b/28/18+2003/ca/c3+1a34/22/00 + cheat + description:5 Batarangs on pick-up + code:4da0/0a/05 + cheat + description:20 Batarangs on pick-up + code:4da0/0a/14 + cheat + description:40 Batarangs on pick-up + code:4da0/0a/28 + cheat + description:1 continue + code:0207/05/02 + cheat + description:9 continues + code:0207/05/0a + cheat + description:Start with max of 3 HP + code:f000/ba/00 + cheat + description:Start with max of 8 HP + code:0201/0a/10 + +cartridge sha256:bfb324176949811c6e116cb8e3d434b4937634d95b4f9bdfb54e0157c612dea0 + name:Batman Beyond - Return of the Joker (USA) + cheat + description:Hit anywhere + code:4e67/d0/00 + +cartridge sha256:519ca6523e54b67a4b4dcc7f525d56df986e0d77c84699dcf9e022f0ae6fbd0e + name:Battle Arena Toshinden (USA) (SGB Enhanced) + cheat + description:Hit anywhere - both players + code:4e01/ca/fa + cheat + description:Blocking disabled - both players + code:6a8f/02/00 + +cartridge sha256:b9909506f566ea7998d6170e9610bad62dbda7d38e42830cd187592e262acfed + name:Battle Unit Zeoth (USA, Europe) + cheat + description:Infinite health + code:1233/e0/f0 + +cartridge sha256:dfa8ec0354c2c364398686cac91545dd2729ab4e0784e6f0b3a23cfe2f7d253b + name:Battletoads (USA, Europe) + cheat + description:Invincibility + code:277d/01/04+277c/28/36 + cheat + description:Infinite lives and energy + code:0cca/ea/fa+17b0/c6/00 + cheat + description:Infinite continues + code:17c2/35/00 + cheat + description:One hit kills + code:2e9a/15/00 + cheat + description:Keep axe after dying + code:7d91/ea/fa + cheat + description:Big arms that hack at you from caves in level 1 do not move + code:1542/01/00 + cheat + description:1 continue + code:77f2/03/01 + cheat + description:5 continues + code:77f2/03/05 + cheat + description:10 continues + code:77f2/03/0a + cheat + description:Start with 1 life + code:77ed/03/00 + cheat + description:Start with 6 lives + code:f000/ba/00 + cheat + description:Start with 10 lives + code:77ed/03/09 + cheat + description:Start with 2 extra HP - after 1st life + code:7e38/0c/0e + cheat + description:Start 1st life with 2 extra HP + code:0326/0c/0e + cheat + description:Start 1st life with 1/2 energy + code:0326/0c/06 + cheat + description:Start with only 1/2 energy - after 1st life + code:7e38/0c/06 + +cartridge sha256:e10716e26a1b4edddc8c8fbf24cdad4decd054e555c77a6c0cd64fe283fa2287 + name:Battletoads in Ragnarok's World (USA) + cheat + description:Invincibility - beat'em up levels + code:2cfd/fa/ea + cheat + description:Infinite health + code:0871/ea/fa + cheat + description:Infinite lives + code:1a31/35/7e + +cartridge sha256:ffb240c74aac4527af2c268e1d7cf4f1b44229ff624d22966b5679e301617465 + name:Beast Fighter (Asia) (Unl) + cheat + description:Invincibility + code:57f6/c8/00+5800/c0/00+57ff/00/01+57fe/fe/3e + cheat + description:Infinite time + code:2db6/c8/c9 + cheat + description:One hit kills on bosses + code:46fa/02/00 + +cartridge sha256:1cbdbf760d84d62933f1b66410a80dda4185b138d964e6ec51780d391d09143d + name:Beauty and the Beast - A Board Game Adventure (USA) (SGB Enhanced) + cheat + description:Access credits in options menu + code:6915/03/04 + +cartridge sha256:436918dc75ffe606f458206caad6c063369ecbf650afcf96499eb98b2b85a72f + name:Beetlejuice (USA) + cheat + description:Infinite health + code:37e4/ea/fa + cheat + description:Infinite lives + code:37ef/ea/fa + +cartridge sha256:0e825ec2c23a16fac1f33cdfd7402f218e3813961e95ddb4ca9fed19bfd79d04 + name:Bill & Ted's Excellent Game Boy Adventure (USA, Europe) + cheat + description:Invincibility + code:2eb7/28/18 + +cartridge sha256:378435aa66290a4d8a930e000eddf08dcb7b00fd36341991b0abedc488bb8c5d + name:Bill Elliott's NASCAR Fast Tracks (USA) + cheat + description:Start with burst of speed + code:f000/ba/00 + cheat + description:Infinite fuel + code:5465/35/00 + cheat + description:Collisons with cars don't affect speed + code:4d46/35/00 + cheat + description:Collisions barely affect speed + code:43c5/77/00+523f/77/00+50bd/3d/00 + cheat + description:Start with 1 lap - ignore lap timer and counter + code:4731/57/1e+4732/13/02 + cheat + description:Start with 3 laps - ignore lap timer and counter + code:4731/57/1e+4732/13/04 + cheat + description:Start with 9 laps - ignore lap timer and counter + code:4731/57/1e+4732/13/0a + +cartridge sha256:692e62d9e0048350256ee124d55c6ef225dc2bb54e0808fd882312d4dcaf0f28 + name:Bionic Commando (USA) + cheat + description:Infinite energy + code:4e6e/ea/fa + cheat + description:Infinite lives + code:160a/df/00 + cheat + description:Infinite continues + code:1404/df/00 + cheat + description:2 continues + code:7481/03/02 + cheat + description:4 continues + code:7481/03/04 + cheat + description:6 continues + code:7481/03/06 + cheat + description:Start with 8 energy + code:15e0/af/84 + cheat + description:Start with 2 lives + code:140e/03/02 + cheat + description:Start with 4 lives + code:140e/03/04 + cheat + description:Start with 6 lives + code:140e/03/06 + +cartridge sha256:9338af642104f7f286687b2e6e55759917c0db35bc89ef398a92c18570bff681 + name:Blades of Steel (USA) + cheat + description:Set length of game to 1:00 + code:4165/20/01 + cheat + description:Set length of game to 3:00 + code:4165/20/03 + cheat + description:Set length of game to 9:00 + code:4165/20/09 + cheat + description:Opponent's energy doesn't go up again and yours does + code:7793/3c/00 + cheat + description:Invincible in fights + code:779f/ea/fa + cheat + description:3 penalty shots in shoot-out + code:55b6/05/03 + cheat + description:5 penalty shots in shoot-out + code:55b6/05/05 + cheat + description:9 penalty shots in shoot-out + code:55b6/05/09 + +cartridge sha256:e0258871c84d18cb0b4cf9a41e1be2ad010c04fad45d97b23baca7746edcfa76 + name:Blaster Master - Enemy Below (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:0ef3/c0/c9+1681/c0/c9 + cheat + description:Invincibility when falling from very high (on foot) + code:1682/21/c9 + cheat + description:Hit anywhere + code:6dd5/cd/fa+6dbe/28/18 + cheat + description:Get items from anywhere + code:6c3b/28/18 + cheat + description:Multi-jump (vehical) + code:4605/28/18+45ff/28/3e + cheat + description:Multi-jump (on foot) + code:4d05/c0/00 + cheat + description:Infinite POW meter - Vehicle + code:0140/c1/24 + cheat + description:Infinite POW meter - Jason + code:0140/c1/25 + cheat + description:Infinite HOV meter - Vehicle + code:0140/c1/26 + cheat + description:Infinite Gun meter - Jason + code:0140/c1/27 + cheat + description:Infinite Homing Missiles + code:0163/c1/28 + cheat + description:Infinite Thunderbolts + code:0163/c1/29 + cheat + description:Infinite 3-Way Missiles + code:0163/c1/2a + cheat + description:All vehicle upgrades + code:01ff/c1/06+01ff/c1/07 + +cartridge sha256:01bb3527ea235380895b8df07a864829b2ad9e399f8cd90bb816110e2bfb1693 + name:Blaster Master Boy (USA) + cheat + description:Invincibility + code:2d06/24/10+2d05/28/18 + cheat + description:Hit anywhere + code:159b/af/7b + cheat + description:One hit kills - normal enemies + code:37cb/3d/af + cheat + description:One hit kills - bosses + code:3849/30/3e + +cartridge sha256:04aeb80ff35bd863c3922ad9b8cac7ee379e78feac4ce3cef2d58ccca142fc03 + name:Blues Brothers, The (USA, Europe) + cheat + description:Infinite energy + code:6af2/77/00 + cheat + description:Infinite encores + code:0805/ea/fa + cheat + description:Start with 3 encores (continues) + code:037c/02/03 + cheat + description:Start with 7 encores + code:037c/02/07 + cheat + description:Start with 9 encores + code:039c/02/09 + cheat + description:Start with 5 lives + code:4015/02/05 + cheat + description:Start with 7 lives + code:4015/02/07 + cheat + description:Start with 9 lives + code:4015/02/09 + +cartridge sha256:9053443a6c786a54bebc2fa9c10acd3875887134c953e5bdf0a07dc554721fb6 + name:Bo Jackson - Two Games in One (USA) + cheat + description:Baseball - 1 ball and you walk + code:3f13/04/01 + cheat + description:Baseball - 2 balls and you walk + code:3f13/04/02 + cheat + description:Baseball - 5 balls and you walk + code:3f13/04/05 + cheat + description:Baseball - Strikes aren't counted - ignore message, you need 4 balls to walk + code:3ec5/34/00 + cheat + description:Baseball - Outs aren't counted + code:73e8/34/00 + cheat + description:Baseball - 1 strike and you're out + code:3e87/03/01 + cheat + description:Baseball - 2 strikes and you're out + code:3e87/03/02 + cheat + description:Baseball - No scoring - disable to score + code:783c/34/00+7826/34/00 + cheat + description:Football - Infinite time + code:356e/e0/f0 + cheat + description:Football - Infinite timeouts + code:5012/35/00 + cheat + description:Football - Always 1st down + code:47d0/e0/f0 + cheat + description:Football - Start with 1 timeout + code:4068/03/01 + cheat + description:Football - Start with 2 timeouts + code:4068/03/02 + cheat + description:Football - Start with 10 timeouts + code:4068/03/0a + +cartridge sha256:195f5a9e97bfec6f071bfd6b82a39ffa25185b687a26a1f2937f9718c4d4d16e + name:Boggle Plus (USA) + cheat + description:Infinite time + code:25af/01/00 + cheat + description:1-minute game + code:26bc/03/01 + cheat + description:5-minute game + code:26bc/03/05 + cheat + description:9-minute game + code:26bc/03/09 + cheat + description:Can re-use shaded letters + code:5882/c2/d4 + cheat + description:Can select any letter on the board - letters don't have to be next to each other + code:5ea9/28/30 + cheat + description:Boggle - 1 and 2 letter words allowed + code:5b4c/03/01 + cheat + description:Boggle - Minimum word length 4 letters + code:5b4c/03/04 + cheat + description:Big Boggle - 1 to 3 letter words allowed + code:5b8f/04/01 + cheat + description:Big Boggle - Minimum word length 5 letters + code:5b8f/04/05 + +cartridge sha256:beca58b71a27884d2c2820da0c7eb806fa945b2fab66da271588281e03153900 + name:Bomb Jack (Europe) + cheat + description:Infinite lives + code:0479/e0/f0 + +cartridge sha256:604db636c45af3cd1fec52e206701a8969a8a3e610df281f7461769bd86729ea + name:Bomber Man GB 3 (Japan) (SGB Enhanced) + cheat + description:Invincibility + code:4cae/01/02 + cheat + description:Infinite lives + code:1517/3d/00 + cheat + description:Freeze timer + code:29e0/3d/00 + cheat + description:Maximum Bombs placable + code:7515/20/18 + cheat + description:Maximum blast range + code:7523/20/18 + +cartridge sha256:16d6a4650566ede0ec9e3e23a85544737faab4154d6381668e8547047340eee6 + name:Bomberman GB (USA, Europe) (SGB Enhanced) + cheat + description:Hit anywhere (press B) + code:73c0/00/3d+73c1/cd/3d+73bf/00/a1+73c2/03/c9+73be/01/f0 + cheat + description:Bombs can break any block + code:76c2/05/00 + +cartridge sha256:27d2eb237362b5647b020d0b22a08b079b40e50347dacc43b732830b9519a852 + name:Bomberman Max - Blue Champion (USA) + cheat + description:Invincibility + code:51b9/ff/00+52eb/ca/c3 + cheat + description:Hit anywhere + code:35e2/22/f2+35e3/c6/c2 + cheat + description:Walk anywhere + code:4b16/ea/fa + cheat + description:Infinite health + code:0102/c3/04 + cheat + description:Infinite lives + code:010a/c2/f7 + cheat + description:Infinite time + code:01ff/c3/01 + cheat + description:Max Bombs + code:0109/c2/f3 + cheat + description:Max Explosion + code:0109/c2/f4 + cheat + description:All enemies frozen + code:0100/c2/ff + +cartridge sha256:5f7c1cdf6adbe6d6dcef488bd37d0da82fa356b79fd579b2022a149e983abc39 + name:Bomberman Max - Red Challenger (USA) + cheat + description:Invincibility + code:52ea/a7/af+519d/38/18 + cheat + description:Hit anywhere + code:35f1/c6/c2+35f0/22/f2 + cheat + description:Walk anywhere + code:4b15/01/00 + cheat + description:Infinite health + code:0102/c3/04 + cheat + description:Infinite lives + code:010a/c2/f7 + cheat + description:Infinite time + code:01ff/c3/01 + cheat + description:Max Bombs + code:0109/c2/f3 + cheat + description:Max Explosion + code:0109/c2/f4 + cheat + description:All enemies frozen + code:0100/c2/ff + +cartridge sha256:0e885739f2b4ce4a6a196e4db9f317d3346ce270276e44adce078927231096df + name:Bomberman Quest (USA) (SGB Enhanced) + cheat + description:Walk through walls + code:4a46/28/18 + +cartridge sha256:6081309e7f5b63e4f6694965060c68baf82a775eb18e667c2c89898096e6e3d8 + name:Bonk's Adventure (USA) + cheat + description:Infinite energy + code:4513/c5/00 + cheat + description:Infinite lives + code:2799/cd/00 + cheat + description:Start with 3 lives, 1st life as Mad Bonk + code:01af/03/02+01b3/af/00 + cheat + description:Start 1st life as Turtle Bonk + code:01af/03/02+01b3/af/00 + cheat + description:Start with 8 lives + code:01af/03/07 + cheat + description:Start with 10 lives + code:01af/03/09 + +cartridge sha256:6ac93cc5186a2e92e13260fd61951c1b28f0df2278b9003b2bcb1ddcbf51543c + name:Boomer's Adventure in ASMIK World (USA) + cheat + description:Always have key + code:23c7/c8/00 + +cartridge sha256:c2fdb7f5887132d1d5ba4081f1332d347089dd73bf1e30a47af21bacc314e601 + name:Brain Drain (USA) (SGB Enhanced) + cheat + description:Clear level automatically + code:22a5/28/18 + cheat + description:Clear level automatically - Race Mode + code:2bf3/28/18 + +cartridge sha256:b164bafab4da7f92a33a2cdfce706b35407f3aa0ac379cd770fe2f78447bdf7a + name:Bram Stoker's Dracula (USA, Europe) + cheat + description:Invincibility + code:0672/19/00 + cheat + description:Infinite time + code:2d50/ea/fa + cheat + description:Infinite ammo + code:1121/ea/fa + +cartridge sha256:5ffda4ca9e2712e2ecc44e75bfd8c7307f4ed5fbcbb82a0f5cd9ad19e3bac6c2 + name:Brave Saga - Shinshou Astaria (Japan) + cheat + description:No random battles + code:42cf/c8/c9 + +cartridge sha256:c5ddbb08e8509633853346c5f35850cc3abe5afaabb0d0ee294b40e804253b7f + name:Bubble Bobble (USA, Europe) + cheat + description:Hit anywhere + code:1d22/08/00+1d29/38/18 + cheat + description:Hit anywhere - Bosses (except final boss) + code:4c05/d0/00+4bfc/d0/00 + cheat + description:Get items from anywhere + code:2c02/d0/00+2c0b/d0/00+2d56/d0/00+458f/21/37+2d5f/d0/37+4590/1d/c9 + cheat + description:One hit kill - final boss + code:48b7/3d/af + +cartridge sha256:29f17b604be580c0132a6d0bd7a966c82930069ca82f83798c955d532c6b4694 + name:Bubble Bobble Part 2 (USA, Europe) + cheat + description:Infinite hearts + code:1bce/ea/fa + cheat + description:Defeat one enemy to go to next level + code:5e33/3d/af + cheat + description:Hit anywhere + code:25d5/04/11+24d8/d2/fa+24c7/da/fa + cheat + description:One hit kills - bosses + code:24fb/38/18 + cheat + description:No big bubbles appear + code:178a/03/c9 + cheat + description:Run into 1 enemy and you remain invincible for the rest of the game + code:1558/ea/fa+1b46/ea/fa+1b63/ea/fa + cheat + description:Start with 1 heart + code:155c/03/01 + cheat + description:Start with 6 hearts + code:155c/03/06 + cheat + description:Start with 9 hearts + code:155c/03/09 + cheat + description:Start on round 20 + code:0839/fa/3e+083a/0d/13+083b/c1/00 + cheat + description:Start on round 40 + code:0839/fa/3e+083a/0d/27+083b/c1/00 + cheat + description:Start on round 60 + code:0839/fa/3e+083a/0d/3b+083b/c1/00 + +cartridge sha256:106d5443e092df3dc53035930766061f1ae4eae670470a93d648dc1adcda01c0 + name:Bubble Ghost (USA, Europe) + cheat + description:Bubble is invincible + code:24aa/3e/c9+2ddf/3e/c9+3653/3e/c9 + +cartridge sha256:6c8a53796be79a934f1393c668057cad38e857922cd552bc52fdf8f3ebdd2cc6 + name:Bugs Bunny & Lola Bunny - Operation Carrots (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Stage skip (pause, press Select to skip to the next stage) + code:7af5/13/00 + +cartridge sha256:a0bd5d25545de941e719437f7829f4edf32b3a140a399387f96dda2f8059fe4e + name:Bugs Bunny Crazy Castle, The (USA, Europe) + cheat + description:Invincibility + code:36cc/38/18 + cheat + description:Get carrots from anywhere (entire level) + code:2ce2/09/00+2cdd/0e/00 + cheat + description:Get carrots from anywhere (horizontal position) + code:2cdd/0e/00 + +cartridge sha256:cf1a8d9c9d4fc9e58740f6e008e5280ff2831c099aecab642e64e5195c0ad0bc + name:Bugs Bunny Crazy Castle 2, The (USA) + cheat + description:Invincibility + code:6289/ea/c9 + cheat + description:Infinite lives + code:1600/3d/be + cheat + description:Get keys from anywhere (except from the ones inside of doors) + code:5fd5/01/16+5fd4/28/18 + +cartridge sha256:89e43fdc94ec1d2a67aaab39d72afa50dd01df4323df7bf3d0909247cc490c24 + name:Bugs Bunny - Crazy Castle 3 (USA, Europe) + cheat + description:Invincibility + code:6197/c0/c9 + cheat + description:Get Keys from anywhere + code:6069/33/00+606e/2e/00 + cheat + description:Open locked doors without having 8 Keys + code:4c65/28/18 + cheat + description:Enter any door to clear level + code:1ab6/07/05 + +cartridge sha256:e5abce2a219fe38e53d1a572d371008f3b6d70be4607c1722139a9ea95fa7422 + name:Bug's Life, A (USA) (SGB Enhanced) + cheat + description:Invincibility (can still drown) + code:10ee/fa/00 + cheat + description:Infinite lives + code:262f/35/00 + +cartridge sha256:2f4254faaa4bda89486c4820c601917cd034c7965eae075ba81acef4295fa8bd + name:BurgerTime Deluxe (World) + cheat + description:Invincibility + code:2e98/36/c9 + cheat + description:Infinite lives + code:15ca/d6/fe + cheat + description:Infinite weapon + code:2b76/d6/fe + cheat + description:Touch Burgers from anywhere + code:20c0/3a/00 + +cartridge sha256:2fbf14a5bffb070e183537c3ff4cd8e05626a94b3949785ed240b28642d0a259 + name:Bust-A-Move Millennium (USA, Europe) + cheat + description:Hit one bubble to clear level - Challenge Mode + code:433a/3d/af+42ee/ba/c2 + cheat + description:Hit one bubble to clear level - Puzzle Mode + code:5469/28/18 + cheat + description:Win automatically - Story Mode + code:45ab/0a/07+45aa/28/18+4593/04/06 + +cartridge sha256:2223993b7a91a5f2ccca1f43652df0062528e3fb37128f61a0ec8a779bcf65a1 + name:Buster Bros. (USA) + cheat + description:Hit anywhere - main weapon + code:2559/d1/5b+2531/d2/fa + +cartridge sha256:ce892641c500ddd0ccb804208556113ad4b9736f89cc94c6822f863508eb81f0 + name:Buzz Lightyear of Star Command (USA, Europe) + cheat + description:Infinite health + code:0164/cc/da + cheat + description:Always have five coins + code:0105/cc/c8 + +cartridge sha256:f0b147eb3429b1b480424a31eb2d800b5676d01a701b494b2c9e9d2de63d31c5 + name:Captain America and the Avengers (USA) + cheat + description:Infinite energy + code:15cc/77/00 + cheat + description:Enemy bullets do very little damage + code:7774/0c/01 + cheat + description:Enemy bullets do more damage + code:7774/0c/19 + cheat + description:Enemy bullets do much more damage + code:7774/0c/33 + cheat + description:Start with energy at 153 + code:0a29/64/99 + cheat + description:Start with energy at 255 + code:0a29/64/ff + cheat + description:Start with energy at 34 + code:0a29/64/22 + cheat + description:Start with 1 lives + code:01dd/03/01 + cheat + description:Start with 10 lives + code:01dd/03/0a + cheat + description:Start on stage 1-2 + code:03a8/1e/3e+03a9/00/01+03aa/f0/e0 + cheat + description:Start on stage 1-3 + code:03a8/1e/3e+03a9/00/02+03aa/f0/e0 + cheat + description:Start on stage 1-4 + code:03a8/1e/3e+03a9/00/03+03aa/f0/e0 + cheat + description:Start on stage 1-5 + code:03a8/1e/3e+03a9/00/04+03aa/f0/e0 + cheat + description:Start on stage 1-6 + code:03a8/1e/3e+03a9/00/05+03aa/f0/e0 + cheat + description:Start on stage 2-1 + code:03a8/1e/3e+03a9/00/06+03aa/f0/e0 + cheat + description:Start on stage 2-2 + code:03a8/1e/3e+03a9/00/07+03aa/f0/e0 + cheat + description:Start on stage 2-3 + code:03a8/1e/3e+03a9/00/08+03aa/f0/e0 + cheat + description:Start on stage 2-4 + code:03a8/1e/3e+03a9/00/09+03aa/f0/e0 + cheat + description:Start on stage 2-5 + code:03a8/1e/3e+03a9/00/0a+03aa/f0/e0 + cheat + description:Start on stage 2-6 + code:03a8/1e/3e+03a9/00/0b+03aa/f0/e0 + cheat + description:Start on stage 3-1 + code:03a8/1e/3e+03a9/00/0c+03aa/f0/e0 + cheat + description:Start on stage 3-2 + code:03a8/1e/3e+03a9/00/0d+03aa/f0/e0 + cheat + description:Start on stage 3-3 + code:03a8/1e/3e+03a9/00/0e+03aa/f0/e0 + cheat + description:Start on stage 3-4 + code:03a8/1e/3e+03a9/00/0f+03aa/f0/e0 + cheat + description:Start on stage 3-5 + code:03a8/1e/3e+03a9/00/10+03aa/f0/e0 + cheat + description:Start on stage 4-1 + code:03a8/1e/3e+03a9/00/11+03aa/f0/e0 + cheat + description:Start on stage 4-2 + code:03a8/1e/3e+03a9/00/12+03aa/f0/e0 + cheat + description:Start on stage 4-3 + code:03a8/1e/3e+03a9/00/13+03aa/f0/e0 + cheat + description:Start on stage 4-4 + code:03a8/1e/3e+03a9/00/14+03aa/f0/e0 + cheat + description:Start on stage 4-5 + code:03a8/1e/3e+03a9/00/15+03aa/f0/e0 + cheat + description:Start on stage 4-6 + code:03a8/1e/3e+03a9/00/16+03aa/f0/e0 + cheat + description:Start on stage 5-1 + code:03a8/1e/3e+03a9/00/17+03aa/f0/e0 + cheat + description:Start on stage 5-2 + code:03a8/1e/3e+03a9/00/18+03aa/f0/e0 + cheat + description:Start on stage 5-3 + code:03a8/1e/3e+03a9/00/19+03aa/f0/e0 + cheat + description:Start on stage 5-4 + code:03a8/1e/3e+03a9/00/1a+03aa/f0/e0 + cheat + description:Start on stage 5-5 + code:03a8/1e/3e+03a9/00/1b+03aa/f0/e0 + cheat + description:Start on stage 5-6 + code:03a8/1e/3e+03a9/00/1c+03aa/f0/e0 + +cartridge sha256:1ff537c010391d6b865b5113d03a9c6601e43659f341f5db2bfc5cc501b6aa04 + name:Casper (USA) + cheat + description:Infinite Brass Keys + code:0163/c1/a9 + cheat + description:Infinite Iron Keys + code:0163/c1/a8 + cheat + description:Infinite Weights + code:0163/c1/ab + +cartridge sha256:1bedb523a9612d48adafe8d70c88408f35e1fc84d0e70031649f3d113d5d9d09 + name:Casper (USA) + cheat + description:Return Books from anywhere + code:66b2/c0/00 + cheat + description:Invincibility - Platform mini-game + code:5d5f/30/18 + cheat + description:Hit anywhere - Shooting mini-game + code:5701/dc/cd + +cartridge sha256:17570ceec1b22153604622c4412d048dd8f7ccb4626daf9ddea96de8a062dbf2 + name:Castlevania II - Belmont's Revenge (USA, Europe) + cheat + description:Invincibility + code:4586/fa/ea + cheat + description:Hit anywhere + code:3936/09/00 + cheat + description:Multi-jump + code:4294/02/87+4295/c0/c8+4296/3d/e6+4297/ca/10+4298/d4/20+4299/43/15+0d47/d8/c9 + +cartridge sha256:edb101e924f22149bdcbcfe6603801fdb4ec0139a40493d700fa0205f6dab30c + name:Castlevania - The Adventure (USA) + cheat + description:Infinite energy + code:7af2/77/00 + cheat + description:Infinite time - disable at end of stages + code:0407/77/00 + cheat + description:Infinite lives + code:0694/77/00 + cheat + description:Hit anywhere + code:2261/12/00+2271/02/00 + cheat + description:Multi-jump + code:17e3/18/00+00eb/ff/18+00e8/ff/1a+00ea/ff/23+00e7/ff/32+00ec/ff/c9+00e6/ff/cd+00e9/ff/cd+17e2/23/e6 + cheat + description:Slightly improves speed - new games only + code:173c/c0/ff + cheat + description:Don't lose weapon after being hit + code:7acf/77/00 + cheat + description:Start with 5 lives + code:085e/02/04 + cheat + description:Start with 7 lives + code:085e/02/06 + cheat + description:Start with 2 energy bars + code:055c/0a/02 + cheat + description:Start with 4 energy bars + code:055c/0a/04 + cheat + description:Start with 6 energy bars + code:055c/0a/06 + cheat + description:Start with timer at 2:15 for first stage + code:09b3/13/02 + cheat + description:Start with timer at 4:15 for first stage + code:09b3/13/04 + cheat + description:Start with timer at 7:15 for first stage + code:09b3/13/07 + +cartridge sha256:56d3dee063b8801704a284bd1bc229b94f15a3a448f485d347f04283d9bd16d7 + name:Castlevania Legends (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:573b/cb/c9 + cheat + description:Infinite lives + code:4345/ea/da + cheat + description:Infinite time + code:2d85/22/c9 + cheat + description:Disable death traps + code:545c/cd/c9 + cheat + description:Fast walk left + code:4c9d/c5/11 + cheat + description:Fast walk right + code:4c76/c5/11 + cheat + description:Fast jump left + code:52d6/c5/11 + cheat + description:Fast jump right + code:52b5/c5/11 + cheat + description:Hit anywhere + code:2349/5a/4b+545c/cd/c9 + cheat + description:Multi-jump + code:5733/37/03+5732/fa/28+5736/02/51+572e/18/55+5735/fe/59+5731/c0/67+5737/c8/c9+1fe4/d0/c9+5730/b7/cb+5734/c7/cd+5170/ea/fa + +cartridge sha256:2f83ab433323f4d08f111ace559a7e29d37ff33fe1ca9d726edd5bb98a854ec2 + name:Centipede (USA) + cheat + description:Kill one enemy to complete level + code:4586/01/05 + +cartridge sha256:7e483524aa104928149e4e56f01b7e98c6eed70dcd30ac5d65cd9d2387cde5ff + name:Chessmaster, The (DMG-N5) (USA) + cheat + description:Move pieces anywhere + code:19d8/28/18+1a12/28/18+1a00/d9/00 + +cartridge sha256:0a44d1f127436d73fc2f64201da0e0fd40793a414e533bba0a08e02dfb51cb10 + name:Chessmaster, The (DMG-N5) (USA) (Rev A) + cheat + description:Move pieces anywhere + code:1ab6/28/18+1af8/28/18+1ae6/d1/00 + +cartridge sha256:781b31deb923c544b42b2116d973a103fd5c21b3cf25e920968ef392a5df917b + name:Chessmaster (USA, Europe) + cheat + description:Move pieces anywhere + code:2783/d1/00+2795/28/18+2753/28/18 + +cartridge sha256:50a6ddd98a515f530ca031f86e5491c8d77d16b0694c0d1054bcc964991eba41 + name:Chicken Run (USA, Europe) (En,Fr,De,Es,It) + cheat + description:Invisibility + code:16cd/c0/c9 + cheat + description:Infinite Feed + code:1bfb/20/18 + cheat + description:Infinite Time + code:4495/c0/c9 + cheat + description:Walk through walls + code:1b02/02/00 + cheat + description:Stage skip (pause, press Select to skip to the next stage) + code:60f7/20/18 + +cartridge sha256:2eb1ab19a19e688ebc047497922b17218da3cb673084846999bd81a4dd73eba4 + name:Chiki Chiki Tengoku (Japan) + cheat + description:Clear level automatically + code:3afe/30/3e+3b17/03/00+3b0a/20/3e + +cartridge sha256:53199f624a81f566104c143b835ca648ee9bbccc2c10efa21a3f4b3f5b5e7ea7 + name:College Slam (USA) + cheat + description:Dunk and layup from anywhere + code:6c09/13/00 + +cartridge sha256:d8e44a2c2aa67f9afa49365f62802160842aef48d2003a69daeb109813f6f20c + name:Contra - The Alien Wars (USA) (SGB Enhanced) + cheat + description:Invincibility + code:4b81/28/3e + cheat + description:Infinite smart bombs + code:37e2/3d/00 + cheat + description:Hit anywhere + code:1377/55/00+137c/50/00+1382/4a/00+1387/45/00+13c3/36/00 + cheat + description:Get 5 smart bombs after you die + code:42b1/01/05 + cheat + description:Get 9 smart bombs after you die + code:42b1/01/09 + cheat + description:Don't flash after getting hit + code:406f/64/01 + cheat + description:Longer invincibility after getting hit + code:406f/64/ff + cheat + description:Start with Flame Thrower + code:4797/00/01 + cheat + description:Start with Crush Gun + code:4797/00/07 + cheat + description:Start with Homing shot + code:4797/00/08 + cheat + description:Start with Spread shot + code:4797/00/09 + +cartridge sha256:8e765a4e381462a29632b7a3c5421080be3e8445e5913d7e904a8e80d688ca81 + name:Contra (Japan) + cheat + description:Invincibility + code:3b3a/fe/be+3aa3/fe/be+1a0f/fe/be + cheat + description:Hit anywhere + code:3ad0/1c/00+3aea/dc/c3+3afb/fe/c6 + cheat + description:Multi-jump + code:558c/55/00+00e6/ff/26+00e9/ff/46+00e7/ff/52+00ea/ff/55+00eb/ff/c9+00e5/ff/cd+00e8/ff/cd+558b/46/e5 + +cartridge sha256:830e46d203dee9775b76849a3aa259b530e6bf5ea17cf8c79cc19549d61bce37 + name:Cool Ball (USA) + cheat + description:All items worth 99 + code:0c66/fe/3e+0c67/64/63 + cheat + description:Complete levels automatically + code:1393/38/18+13ad/20/3e + +cartridge sha256:aa993ef6fd692435f869c63add9d49bf08db6fc8d6ee7baa9b406982d7b38c7c + name:Cool Bricks (Europe) (En,Fr,De,Es,It) + cheat + description:Paddle hits ball anywhere + code:1858/2b/00+1855/2e/00 + +cartridge sha256:805c18920e01f4b5746827c201e9a88554f085a8c297ed45f119700fe54da52e + name:Cool Spot (USA) + cheat + description:Hit anywhere + code:1bd8/49/00+1867/d2/fa + +cartridge sha256:e0dafd8b66cc6c19c3b64471d198e1dc87f3e5e1000c4fd8d71122a004fea5ae + name:Cosmo Tank (USA) + cheat + description:Invincibility + code:599f/38/18 + cheat + description:Hit anywhere + code:4d4f/12/00 + +cartridge sha256:5437ce255372eca79a5e33cfca4158e70c7a9d46fd93c6a38ed1e1a13cab4b73 + name:Croc (USA, Europe) + cheat + description:Invincibility + code:6114/c0/c9 + cheat + description:Enemies die on contact + code:5bd9/28/18 + +cartridge sha256:002ad8e22b4d846d3185c2e42af284dcb5f9b040bb174c9b5e9670de4df79278 + name:Croc 2 (USA, Europe) + cheat + description:Invincibility + code:55c9/c0/c9+5595/c0/c9 + cheat + description:Enemies die on contact + code:5580/20/18 + cheat + description:Walk over pits + code:4731/fa/c9 + +cartridge sha256:3c86f30b11442c93b011287310dfea0a9c23a182527d8447769226e52ef29d5e + name:Crystal Quest (USA) + cheat + description:Invincibility (allows you to exit the level at anytime) + code:1000/c8/c9+0d79/30/18 + cheat + description:Hit anywhere + code:08b9/77/00+0863/30/3e + +cartridge sha256:3ab8bcd08f0aa01c16ccc2bc286fc6c50cf2d140fd3ed411ef0e16e586410110 + name:Crystalis (USA) + cheat + description:Hit anywhere + code:2a5b/28/3e + cheat + description:Walk anywhere + code:46b8/c0/00 + +cartridge sha256:d5a1c0e7af970859449c47fcc80a5f4dfa4f456b20fdfcd49e753ce46f2dc3da + name:Cyraid (USA) + cheat + description:Infinite lives + code:4d8c/01/00 + cheat + description:1st nasty on bottom level of stage 1 is removed from the game + code:6072/01/00 + cheat + description:Collect only 1 energy capsule and all enemy robots are destroyed-can proceed to next room + code:1a4e/3d/af + cheat + description:Skip to 3rd room after completing 1st + code:0e8a/28/3e+0e8b/05/03 + cheat + description:Skip to 5rd room after completing 1st + code:0e8a/28/3e+0e8b/05/05 + cheat + description:Skip to 8rd room after completing 1st + code:0e8a/28/3e+0e8b/05/08 + cheat + description:Start with 4 lives + code:1e7c/05/04 + cheat + description:Start with 6 lives + code:1e7c/05/06 + cheat + description:Start with 9 lives + code:1e7c/05/09 + +cartridge sha256:06d2f49483cf16f00580ba227d86174fdb9f72e555d9a9afea6aebcbfff012e4 + name:Daedalian Opus (USA) + cheat + description:Infinite time + code:2d62/34/00 + cheat + description:Place any piece to clear level + code:1115/d0/1b + cheat + description:Get password to select any level after completing level 1 + code:019a/fe/3e+019b/24/0a + cheat + description:Start on level 5 or 6 after completing level 1 + code:019c/30/3e+019d/05/05 + +cartridge sha256:30faf530573519d690d066093e9fae3b461d79df37c025a9ec9115f5fc5786e4 + name:Daffy Duck (Europe) + cheat + description:Infinite jet pack + code:3401/3c/af + cheat + description:Infinite jet pack + hit anywhere + code:3401/3c/af+3df2/c2/c3+3dd5/20/18+3deb/da/fa+3eb2/da/fa + +cartridge sha256:e4a40a4c961f937950a69da5a9de654a121ebffe307d3ad9e834731b68d4e347 + name:Daikatana (Europe) (En,Fr,It) + cheat + description:Invincibilities against enemies + code:522b/da/c3 + cheat + description:Infinite ammo - sub-weapons + code:6a3b/ea/fa + cheat + description:Hit anywhere + code:52d5/da/18+52d6/72/1e + cheat + description:Hit anywhere - sub-weapons + code:4f04/c5/29+4f03/da/18 + cheat + description:Get items from anywhere + code:6f18/da/18+6f19/b3/20 + cheat + description:Multi-jump + code:6b7c/51/00 + +cartridge sha256:b482f9a96a292dea1fcc94bdeae24b664a3222c9eb820795388aab274eebdaf0 + name:Darkman (USA, Europe) + cheat + description:Infinite energy + code:050f/fa/ba + cheat + description:Infinite lives + code:04dd/c0/01 + cheat + description:Infinite time + code:0597/01/00 + cheat + description:Start 1st life with mega-energy + code:3f91/1c/63 + cheat + description:Start 1st life with 1/2 energy + code:3f91/1c/0a + cheat + description:Start rest of lives with mega-energy + code:2640/1c/63 + cheat + description:Start with 9 minutes + code:59ac/40/90 + cheat + description:Start with 1 life + code:024d/03/00 + cheat + description:Start with 8 lives + code:024d/03/07 + +cartridge sha256:122a1d3bd99c87a337f770fbdef2b7cf8538673df1595585af6684d4d4807614 + name:Darkwing Duck (USA) + cheat + description:Infinite lives + code:0a0b/c9/01 + cheat + description:Infinite ammo on pick-up + code:7d39/ea/fa + cheat + description:Hit anywhere + code:40ce/30/3e + cheat + description:One hit kills + code:4102/28/18 + cheat + description:Invincibility time lasts 4 seconds + code:4064/50/aa + cheat + description:Invincibility time lasts 6 seconds + code:4064/50/ff + cheat + description:1 touch by an enemy kills you + code:406f/50/01 + cheat + description:Start with 1 pt. of energy and 1 life - 1st game + code:0184/04/01 + cheat + description:Start with 5 pts. of energy on 1st life and 5 lives - 1st game + code:0184/04/05 + cheat + description:Start with 9 pts. of energy on 1st life and 9 lives - 1st game + code:0184/04/09 + cheat + description:Start with 1 pt. of energy after 1st life + code:09f0/04/01 + cheat + description:Start with 5 pts. of energy after 1st life + code:09f0/04/05 + cheat + description:Start with 9 pts. of energy after 1st life + code:09f0/04/09 + +cartridge sha256:61d632a2e17526cc55cc8e107abaf9aa11830cd4dd94c0b0f94d10a12a0c9f71 + name:David Crane's The Rescue of Princess Blobette Starring A Boy and His Blob (USA) + cheat + description:Infinite jellybeans + code:2056/01/00 + cheat + description:Infinite lives + code:2d4f/35/00 + cheat + description:Start with 2 honeys + code:7c0e/03/02 + cheat + description:Start with 4 honeys + code:7c0e/03/04 + cheat + description:Start with 8 honeys + code:7c0e/03/08 + cheat + description:Start with 2 root beers + code:7c0c/00/02 + cheat + description:Start with 4 root beers + code:7c0c/00/04 + cheat + description:Start with 2 tangerines + code:7c0a/06/02 + cheat + description:Start with 4 tangerines + code:7c0a/06/04 + cheat + description:Start with 2 vanillas + code:7c08/05/02 + cheat + description:Start with 4 vanillas + code:7c08/05/04 + cheat + description:Start with 2 limes + code:7c06/00/02 + cheat + description:Start with 4 limes + code:7c06/00/04 + cheat + description:Start with 2 apples + code:7c04/01/02 + cheat + description:Start with 4 apples + code:7c04/01/04 + cheat + description:Start with 2 bananas + code:7c02/00/02 + cheat + description:Start with 4 bananas + code:7c02/00/04 + cheat + description:Start with 2 colas + code:7c00/00/02 + cheat + description:Start with 4 colas + code:7c00/00/04 + cheat + description:Start with 2 coconuts + code:7bfe/03/02 + cheat + description:Start with 4 coconuts + code:7bfe/03/04 + cheat + description:Start with 2 strawberries + code:7bfc/00/02 + cheat + description:Start with 4 strawberries + code:7bfc/00/04 + cheat + description:Start with 2 licorices + code:7bfa/02/02 + cheat + description:Start with 4 licorices + code:7bfa/02/04 + cheat + description:Start with 2 ketchups + code:7c10/01/02 + cheat + description:Start with 4 ketchups + code:7c10/01/04 + cheat + description:Start with 2 punches + code:7c12/00/02 + cheat + description:Start with 4 punches + code:7c12/00/04 + cheat + description:Start with 2 mints + code:7c14/00/02 + cheat + description:Start with 4 mints + code:7c14/00/04 + cheat + description:Start with 2 lives + code:7bca/05/02 + cheat + description:Start with 4 lives + code:7bca/05/04 + cheat + description:Start with 8 lives + code:7bca/05/08 + +cartridge sha256:1a62bbcaff8d12b752826472beac346e5fce9d8640f7ae23c6e390b79e55346d + name:Days of Thunder (USA, Europe) + cheat + description:Infinite time in pits + code:6e7b/ea/fa + cheat + description:Infinite fuel + code:7294/72/00 + cheat + description:Car takes no damage + code:169c/77/00 + cheat + description:Tires take no damage + code:272f/34/c9 + +cartridge sha256:d534102be843dc15a465709164e09e82c6bdf6df2ac440930af2e34c2f0e01ce + name:Dead Heat Scramble (USA) + cheat + description:Infinite time + code:0405/3d/00 + cheat + description:Start on stage 2 + code:7b0c/01/02 + cheat + description:Start on stage 3 + code:7b0c/01/03 + cheat + description:Start on stage 4 + code:7b0c/01/04 + cheat + description:Start on stage 5 + code:7b0c/01/05 + cheat + description:Start on stage 6 + code:7b0c/01/06 + cheat + description:Start on stage 7 + code:7b0c/01/07 + cheat + description:Start on stage 8 + code:7b0c/01/08 + cheat + description:Start on stage 9 + code:7b0c/01/09 + cheat + description:Start on stage 10 + code:7b0c/01/0a + +cartridge sha256:a089bea1d6eec0e99f03276744aea293fe3fe3a2889791ab8f3a00b83e2cf58b + name:Deer Hunter (USA) + cheat + description:Infinite time + code:041f/3c/00 + +cartridge sha256:2d8fb80ece07198260fb47b6a2e8d0097e2d6ca27fb21bc3c439f90d7880317d + name:Dig Dug (USA) + cheat + description:Invincibility + code:23c1/ea/fa + cheat + description:Infinite lives + code:481b/3d/00 + cheat + description:When Pookas are partially inflated, they don't shrink + code:3450/35/00 + cheat + description:1 pump kills monster instantly + code:36d9/01/04+239e/01/04+478e/01/04 + cheat + description:Start with 6 lives + code:5bac/03/06 + cheat + description:Start with 9 lives + code:5bac/03/09 + cheat + description:Start with 2 lives + code:5bac/03/02 + cheat + description:Start on level 4 (display still says level 1) + code:5cd9/38/3e+5cda/02/04 + cheat + description:Start on level 2 (display still says level 1) + code:5cd9/38/3e+5cda/02/02 + cheat + description:Start on level 9 (display still says level 1) + code:23ec/1c/00+5cda/02/09 + +cartridge sha256:0ee26b1a12c91560ab852510a792b13d7391c2fcebf4c0c0a1d8323194eb473a + name:Donald Duck - Goin' Quackers (USA) (En,Fr,De,Es,It) + cheat + description:Get blue items from anywhere + code:74a2/28/3e + +cartridge sha256:2781f6b1014336e3318073f162cadd970329c8148fc62b5e795441cd6fd57051 + name:Donkey Kong (Japan) (En) (SGB Enhanced) + cheat + description:Infinite lives + code:094d/35/00 + cheat + description:Infinite time + code:0c34/01/00 + cheat + description:Can open doors without a key + code:407b/d2/fa + cheat + description:Timer is 2x faster + code:0c34/01/02 + cheat + description:Practice stage XX - level indicator doesn't work, can't go on to next level + code:24f3/fa/3e+f000/ba/00+24f5/c8/00 + cheat + description:Start with 36 lives + code:0264/04/88 + +cartridge sha256:b490c89efe718633b07381def66ce0ed58a5075aabe40c6e644baf2b408a76f4 + name:Donkey Kong (World) (Rev A) (SGB Enhanced) + cheat + description:Invincibility + code:53b4/36/c9+544d/72/c9+5546/36/c9 + cheat + description:Invincibility (alt) + code:51f5/c2/fa + +cartridge sha256:eaf831ddd75e7cbc9990e478a139ac162034c03377670fdb79615a9aa2cc570d + name:Donkey Kong Land (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:4081/28/3e + cheat + description:Kill enemies on contact + code:2599/20/3e+25a5/7c/6d + cheat + description:Infinite lives + code:4d9d/35/00+4da0/c2/21 + cheat + description:Multi-jump + code:54b4/38/3e + cheat + description:Always save game at end of level, regardless if you have KONG letters or not + code:40cb/ca/c3 + cheat + description:Lose all your lives when you die + code:4da0/c2/c3 + cheat + description:If you get hit you don't change characters until you are back at the map screen + code:4dfd/ea/c9 + cheat + description:Each banana gives you mega lives (disable when you have enough lives) + code:44c6/35/00+44c0/36/3e + cheat + description:Change soundtrack + code:421f/35/00 + cheat + description:Start with 1 life + code:6e89/05/00+7e95/05/00 + cheat + description:Start with 9 lives + code:6e89/05/08+7e95/05/08 + cheat + description:Start with 15 lives + code:6e89/05/0e+7e95/05/0e + cheat + description:Start with 99 lives + code:6e89/05/63+7e95/05/63 + +cartridge sha256:7722555df42413c6fd5434b717e82ba4a842cc0df3ef02fd0cd9b45b1bb5f2ca + name:Donkey Kong Land 2 (USA, Europe) (SGB Enhanced) + cheat + description:Multi-jump (disables hanging on horizontal ropes) + code:083b/22/00+0b33/20/18+085a/3a/36+0852/a4/a5+085b/5f/af + cheat + description:Glimmer's Galleon always lit + code:46ad/df/00 + cheat + description:Can exit unbeaten levels + code:4a26/28/3e + +cartridge sha256:75f902ab8674c3cd379438fbd54cfe7e87ca3ddf9727679547261d1b77db720b + name:Double Dragon (USA, Europe) + cheat + description:Infinite health + code:012f/c4/98 + cheat + description:Infinite lives + code:0104/c4/99 + cheat + description:Hit anywhere + code:6e97/21/18+6e98/84/4c + cheat + description:One hit kills (bosses die after three hits) + code:6ada/28/00+6b62/04/00 + cheat + description:Start on Mission 1 (slum) (disable code to advance to next stage) + code:0100/c6/50 + cheat + description:Start on Mission 1 (area with boxes) (disable code to advance to next stage) + code:0101/c6/50 + cheat + description:Start on Mission 1 (boss) (disable code to advance to next stage) + code:0102/c6/50 + cheat + description:Start on Mission 2 (disable code to advance to next stage) + code:0103/c6/50 + cheat + description:Start on Mission 3 (woods) (disable code to advance to next stage) + code:0104/c6/50 + cheat + description:Start on Mission 3 (cave) (disable code to advance to next stage) + code:0105/c6/50 + cheat + description:Start on Mission 4 (outside enemy's base) (disable code to advance to next stage) + code:0106/c6/50 + cheat + description:Start on Mission 4 (enemy's base) (disable code to advance to next stage) + code:0107/c6/50 + cheat + description:Start on Ending (disable code to advance to next stage) + code:0108/c6/50 + +cartridge sha256:21639689078496d4c2d000b120d493b69e7df603e5c2b5cd337974665e597878 + name:Double Dragon II (USA, Europe) + cheat + description:Invincibility + code:34e6/21/c9 + cheat + description:Hit anywhere + code:339f/fa/18+33a0/50/23 + cheat + description:One hit kills + code:56f2/0d/00+5772/0c/00+57a3/04/00+56f4/04/01 + +cartridge sha256:ba60449b8e57d1288e78a2cb69c6df46e1443cc611d139d27f4c5d5fad307fd3 + name:Double Dragon 3 - The Arcade Game (USA, Europe) + cheat + description:Infinite lives + code:700e/3d/00 + cheat + description:Infinite coins + code:0f1b/01/00 + cheat + description:Start with 4 lives + code:009f/06/03 + cheat + description:Start with 10 lives + code:009f/06/09 + cheat + description:Start with 13 lives + code:009f/06/0c + cheat + description:Start with 5 coins + code:7949/01/04 + cheat + description:Start with 10 coins + code:7949/01/09 + cheat + description:Start with 20 coins + code:7949/01/19 + cheat + description:Start 1st life with 5 energy points + code:0097/bf/50 + cheat + description:Start 1st life with 15 energy points + code:0097/bf/f0 + cheat + description:Start with 5 points of energy - after 1st life + code:7013/bf/50 + cheat + description:Start with 15 points of energy - after 1st life + code:7013/bf/f0 + +cartridge sha256:936df4d0f74620c784129259a22fc3216eea04f70c10cab6005457a0f681e313 + name:Double Dribble - 5 on 5 (USA) + cheat + description:Infinite time + code:0b8c/01/00 + cheat + description:No computer scoring + code:0d64/22/00 + cheat + description:Game lasts only 1 quarter, goes straight to 4th quarter + code:0ce2/01/04 + cheat + description:When selecting skill level, keep pressing down. Bleeping will continue, and computer will become more and more skillful. + code:1a0b/03/ff + +cartridge sha256:3296ce126e2ebf61f99e39d82e20e0f7d7ade84539ddd48f7c0e21fef5f46932 + name:Dr. Mario (World) + cheat + description:Drop capsules anywhere to clear level + code:2a3a/20/18+2be2/20/3e + +cartridge sha256:15fecc6e3d9f72e9cf3f5af7c1f034cc94a2007d29ea0a204976adcc0ff9a52e + name:Dragon's Lair - The Legend (USA) + cheat + description:Have all Life Stones + code:0101/c3/43+0109/c3/44+0104/c3/45 + +cartridge sha256:8dab48cc81d14bcee7c73274df09cf5c4dd44c3b93d10a5a3175e04fead25dee + name:Dragon Ball Z - Legendary Super Warriors (USA) + cheat + description:Opponent doesn't attack + code:68fc/fa/c9 + +cartridge sha256:3996cbfb2f133a48f58a0d81420362caceaa3e348704d496ba6cbff0eb47139f + name:Dragon Warrior I & II (USA) (SGB Enhanced) + cheat + description:No random battles + code:40b1/38/3e + cheat + description:Walk anywhere + code:62f5/20/3e + +cartridge sha256:34f11935cb3c23102462aab9d96c09e25b81b35eef91f5e5456b2c3665734f0e + name:Dragon Warrior III (USA) + cheat + description:Enemies only attack themselves + code:5add/14/04+5adc/28/f6 + cheat + description:Quick level gain + code:457f/2a/01+4580/46/ff+4581/4f/ff + cheat + description:HP set to approx 198 every move + code:5f5e/79/7c + +cartridge sha256:64d791cadae2500ddd7dfd3ebedc48a182fdc0e027f9bfd74c8ff65b56371dbf + name:Druaga no Tou (Japan) + cheat + description:Reset to see ending + code:016f/08 + +cartridge sha256:4d754abe2502f79396790f04963468f5c614eb4768e2b3f9b5c79c8e28b55dcb + name:Elevator Action EX (Europe) (En,Fr,De,Es,It) + cheat + description:Invincibility + code:5ee8/38/18+59fa/c2/c3 + cheat + description:Hit anywhere + code:4c83/28/3e+4bc7/28/3e + cheat + description:Don't get crushed by elevators + code:5eaf/28/18+472d/28/18 + +cartridge sha256:9eee3454a1198c01c7adb9562507f2eb5791888c63885bea2e933948f66f6321 + name:Extra Bases! (USA) + cheat + description:Outs aren't counted + code:100b/34/00 + cheat + description:Strikes aren't counted + code:407a/34/00 + cheat + description:Balls aren't counted + code:408b/34/00 + cheat + description:Opponents can't score (disable when you're batting so you can score) + code:5b91/3c/00 + cheat + description:One strike and you're out + code:0fd6/03/01 + cheat + description:2 strikes and you're out + code:0fd6/03/02 + cheat + description:1 out and side is retired + code:0ff0/03/01 + cheat + description:2 outs and side is retired + code:0ff0/03/02 + cheat + description:1 ball and you walk + code:0fc0/04/01 + cheat + description:2 balls and you walk + code:0fc0/04/02 + +cartridge sha256:571e45610cae528b3c50304c42c946f307d71797fc2029e9ca1978045dd5186d + name:F-15 Strike Eagle (USA, Europe) + cheat + description:Infinite bullets + code:2a52/ea/fa + cheat + description:Infinite sidewinders + code:08ee/ea/fa + cheat + description:Infinite mavericks + code:08ab/ea/fa + cheat + description:Infinite E.C.M. + code:085b/ea/fa + cheat + description:Fly very slowly + code:33bc/02/01 + cheat + description:Fly at supersonic speed + code:33bc/02/09 + cheat + description:Start with 10 sidewinders + code:3388/1e/0a + cheat + description:Start with 50 sidewinders + code:3388/1e/32 + cheat + description:Start with 90 sidewinders + code:3388/1e/5a + cheat + description:Start with 10 mavericks + code:338d/0f/0a + cheat + description:Start with 50 mavericks + code:338d/0f/32 + cheat + description:Start with 90 mavericks + code:338d/0f/5a + cheat + description:Start with 10 E.C.M. + code:3392/18/0a + cheat + description:Start with 50 E.C.M. + code:3392/18/32 + cheat + description:Start with 90 E.C.M. + code:3392/18/5a + cheat + description:Start with 513 bullets + code:339b/03/02+339a/20/01 + cheat + description:Start with 2049 bullets + code:339b/03/08+339a/20/01 + cheat + description:Start with 4097 bullets + code:339b/03/10+339a/20/01 + +cartridge sha256:ece080d17963acfb7f9b2c28272881edd2a17bc93fcd65bb649810b5e8ed513a + name:Fastest Lap (Japan, USA) + cheat + description:Quick laps + code:1fd8/da/fa+1fd1/d2/fa + +cartridge sha256:db506cb639b6336bf17c993c597da3990398ec01e235e0d9236e9df87ab0439e + name:Ferrari Grand Prix Challenge (USA, Europe) + cheat + description:Don't lose speed when touching side of track in qualifying round or race. Hitting sign will slow you down (if you accelerate fully, release A and position car in middle of track, it will steer itself). + code:3458/3d/00 + cheat + description:When you crash with another car, your speed won't drop to 0 + code:3022/c8/00 + cheat + description:No qualifying timer + code:4a39/01/00+4a1a/01/00 + +cartridge sha256:9b72e7d44d1cb31a06cf4e630c83abc61fb7218e3d55d7dc6aa1ecbf9e490cf0 + name:Fighting Simulator 2 in 1 (USA, Europe) + cheat + description:Infinite energy + code:173c/3c/3d + cheat + description:Infinite lives + code:18d7/3d/00 + cheat + description:Start with 5 lives + code:1724/03/05 + cheat + description:Start with 9 lives + code:1724/03/09 + cheat + description:Start with 15 lives + code:1724/03/0f + +cartridge sha256:5a462f1bbb4e75823c04c7a0b2a7497cbe7e709a425854c71c1fc4d60f16f445 + name:Final Fantasy Adventure (USA) + cheat + description:Most items are free + code:5606/01/40 + cheat + description:Start with 255 of each ability + code:6e6b/02/ff + cheat + description:Start with 65,330 GP + code:6ecc/ff + +cartridge sha256:e5b1d116a8fb01b7a7213f906b3ef1bcc91a18f6826b01ee1bccd89429a0d906 + name:Final Fantasy Legend, The (USA) + cheat + description:Infinite items + code:4395/35/00+28cf/35/00 + cheat + description:Enemies have 0 HP + code:5758/7b/af+575a/7a/af + cheat + description:Enemies have 0 in all abilities + code:5760/0a/af+5763/0a/af+5766/0a/af+5769/0a/af + cheat + description:No random battles + code:229a/c0/c9 + cheat + description:Walk faster + code:245a/01/02 + cheat + description:Human male - Start with 1 strength point + code:7123/08/01 + cheat + description:Human male - 5 strength points + code:7123/08/05 + cheat + description:Human male - 2 defense points + code:7124/01/02 + cheat + description:Human male - 6 defense points + code:7124/01/06 + cheat + description:Human male - 3 agility points + code:7125/04/03 + cheat + description:Human male - 7 agility points + code:7125/04/07 + cheat + description:Human male - 4 mana points + code:7126/00/04 + cheat + description:Human male - 8 mana points + code:7126/00/08 + cheat + description:Human male - 1 HP + code:7258/3c/01 + cheat + description:Human male - Start with 5 HP + code:7258/3c/05 + +cartridge sha256:2d89231f9e264a024d634bcf7d00de5a66d8a45f6f4ca33e1fc1602a35b9840b + name:Final Fantasy Legend II (USA) + cheat + description:Infinite HP (don't heal or stay and Inn) + code:4064/11/b9 + cheat + description:0 HP - enemies + code:448c/7c/af+4489/7d/af + cheat + description:Infinite item usage + code:5d28/35/00+41f0/12/00 + cheat + description:Items are free + code:655b/30/00+655c/cd/fa + cheat + description:Get extra GP and Meat + code:4d23/30/c9 + cheat + description:Get tons of GP after every battle + code:4d23/30/00 + cheat + description:Engage in a fight every second + code:2fc5/35/37 + cheat + description:Start with 15,163 HP (shows only 999) - All characters + code:0596/78/00+059c/78/00 + cheat + description:Start with 9 HP + code:78e2/3b/09 + cheat + description:Start with 9 defense points + code:78e6/03/09 + cheat + description:Start with 9 mana points + code:78e7/03/09 + cheat + description:Start with 9 agility points + code:78e5/05/09 + cheat + description:Start with 9 strength points + code:78e4/06/09 + cheat + description:Start with 9 swords (if your character can start with swords) + code:7e81/32/09 + +cartridge sha256:5ed87f65225b72a74c3c04a4e5d67683fb5cc33e5f1266157350828ab973fc1d + name:Final Fantasy Legend III (USA) + cheat + description:Set initial power to mega-power + code:7a92/00/ff+7891/32/ff+7893/32/ff + cheat + description:Always strike first + code:6aa0/76/ff + cheat + description:Able to run from every battle, even bosses + code:4ab4/52/ff + cheat + description:Gain extra EXP and GP + code:57ca/37/d7 + cheat + description:Defeating leftmost or upper-left enemy defeats all enemies on screen + code:54ca/37/02 + cheat + description:Gain a level after every battle on a new game - Character 1 (Hero - Arthur) + code:7a87/01/ff + cheat + description:Gain a level after every battle on a new game - Character 2 (Boy - Curtis) + code:7ae7/01/ff + cheat + description:Gain a level after every battle on a new game - Character 3 (Girl - Gloria) + code:7b47/00/ff + cheat + description:Gain a level after every battle on a new game - Character 4 (Heroine - Sharon) + code:7ba7/00/ff + +cartridge sha256:8327ed0d686d223995f86c267eeaf5f450c0d16a9bf9b6925dcb52cd1481f0e1 + name:Fish Dude (USA) + cheat + description:Infinite lives + code:02a8/35/00 + cheat + description:No timer + code:0525/fa/21 + cheat + description:Start with 1 life + code:023d/02/00 + cheat + description:Start with 5 lives + code:023d/02/04 + cheat + description:Start with 9 lives + code:023d/02/08 + cheat + description:Start with 15 lives (ignore counter for first 5 lives) + code:023d/02/0e + +cartridge sha256:da62ce2133b788e88605fad8f8d15582457d2a08de88124f231ef943ffba8805 + name:Fist of the North Star (USA) + cheat + description:Almost invincible + code:0e9f/ea/21 + cheat + description:No energy loss from weapons thrown + code:0fa5/ea/21 + cheat + description:Hit anywhere - both players + code:10d0/06/00+10d5/30/18 + cheat + description:One hit kills + code:0e10/09/00 + cheat + description:Start on level 5 + code:1bcc/01/05 + cheat + description:Start on level 9 + code:1bcc/01/09 + cheat + description:Start with 25% energy + code:1ff7/ff/40 + cheat + description:Start with 50% energy + code:14f7/ff/7f + cheat + description:Start with 75% energy + code:14f7/ff/c4 + +cartridge sha256:eededd0318cc5b80a2aa019a9a7eb3dfb9cb9ac11d974d24d704d7d4cf771a94 + name:Flash, The (USA, Europe) + cheat + description:Infinite energy (except against exploding bombs) + code:0a85/c1/00 + cheat + description:Infinite lives + code:03a8/c0/00 + cheat + description:Infinite time (disable at end of each stage) + code:3db6/35/00 + cheat + description:Start with 1 life + code:059c/03/01 + cheat + description:Start with 6 lives + code:059c/03/06 + cheat + description:Start with 1/2 surge power + code:05a1/8f/4c + cheat + description:Start with 1/2 energy + code:05a6/48/24 + +cartridge sha256:23fe1e88229645354f665908eb0dcd39cd8f3fbbeebec4bd93d11f7740a478e4 + name:Flipull (USA) + cheat + description:Any block can clear an entire row or column + code:22df/20/3e+2177/20/3e + +cartridge sha256:44bd5dd98b6ca3730435197d5af7f4fb6fa0f86fecf9b74005d5a76c28870f88 + name:Foreman for Real (USA, Europe) + cheat + description:Enable everyone for tournament mode + code:0c9b/01/00+0ca0/0f/13 + +cartridge sha256:06643cffc888b1c0c80ccae3cef66babb9b878ee594c29de8c9216bddd48287f + name:Fortified Zone (USA, Europe) + cheat + description:Hit anywhere + code:6317/fe/18+6318/ff/14 + +cartridge sha256:f07e6f63023d997a83066b422024242d6a7b61cee1af0c1fc41e6fbf4b54b65b + name:Frogger (USA) + cheat + description:Invincibility + code:0d14/ea/fa+0a7f/ea/fa + cheat + description:Infinite lives + code:0b6d/ea/fa + cheat + description:Infinite time + code:0e84/77/00 + +cartridge sha256:1f60f516020ef685d353dcbff810e4d93d09a4bcf6f6e87803768ea776c85929 + name:Frogger (USA) + cheat + description:Invincibility + code:0d12/3e/c9+0a7b/20/18 + cheat + description:Infinite time + code:0e71/c0/c9 + +cartridge sha256:8c144ddebdc63631949ba0f946ae4a745be4aaf1082736676cb1af61887ab7a2 + name:Frogger 2 (USA) + cheat + description:Invincibility + code:0e5f/3e/c9+0e3d/3e/c9 + cheat + description:Infinite time + code:036d/34/00 + +cartridge sha256:d96da0c0c17a164c398b2d5b02cbe92e7eafbfa755fee649d159b46e61814dc6 + name:Galaga - Destination Earth (USA) + cheat + description:Invincibility + code:51b2/28/18+764c/30/18 + cheat + description:Hit anywhere + code:5a5a/d2/fa+5a8b/d2/fa+5a71/da/fa + +cartridge sha256:af4fda51b28e426f6cab8b48037cf2cbc18ad6c1f02311ad901365aa52c918b7 + name:Ganso!! Yancha Maru (Japan) + cheat + description:Invincibility (the second code kills enemies on contact) + code:4776/07/00+477b/01/00 + cheat + description:Infinite Shurikens on pick-up + code:0b8d/03/01 + cheat + description:999 coins on pick-up + code:0c5f/d0/00 + cheat + description:Infinite time + code:0bb9/77/00 + +cartridge sha256:ad6f9fe97a40418279d3b834a64d9c6c52c0da209f430718f2bd02611892326f + name:Gargoyle's Quest (USA, Europe) + cheat + description:Invincibility + code:6e17/c8/c9 + cheat + description:Hit anywhere + code:7bb0/30/3e+7ba6/30/3e + +cartridge sha256:b7774eb039d335d8870b28e05ff7bc0869c46d0accc0d7f467affd71bbae8871 + name:Gauntlet II (USA, Europe) + cheat + description:Invincibility + code:432d/d2/c3 + +cartridge sha256:4bbf52ae46599bed5e08c6ea97f05220a4a5244f35519003d9b66e9d77328fe1 + name:Gekitou Power Modeller (Japan) (SGB Enhanced) + cheat + description:Invincibility against normal attacks - P1 + code:790e/28/18 + cheat + description:Hit anywhere + code:7878/7e/0b+7874/ae/84 + +cartridge sha256:78d35816612a521315e0b0618886e4b9e1005c58e459248c7e7585d8c04e71ac + name:George Foreman's KO Boxing (USA, Europe) + cheat + description:Infinite health (display still decreases) + code:19cb/28/3e + cheat + description:Infinite time + code:1189/01/00 + cheat + description:Infinite super punch + code:17ee/38/3e + +cartridge sha256:ca9d168e068492644cf054a2e35f0bccc31af5899e54c05a2cbc740247014a51 + name:Gex - Enter the Gecko (USA, Europe) + cheat + description:Invincibility + code:06bf/cd/c9 + cheat + description:Hit anywhere + code:51bf/d0/00+51c9/d0/00 + cheat + description:Get Skulls from anywhere (the ones that are not dropped by enemies) + code:6516/0d/00+650c/17/00 + cheat + description:Moon jump + code:4279/20/02+4277/d2/d5+4276/09/9f + +cartridge sha256:af1c1c11d7039fbf03932b17629b8ad17c275d1cb638fdb2e00dab5084919cb9 + name:Gex 3 - Deep Pocket Gecko (USA) + cheat + description:Invincibility + code:4f94/35/77+4f92/28/3e + cheat + description:Hit anywhere + code:5566/fd/94+5565/c2/c3 + cheat + description:Get Butterflies from anywhere (the ones that are not dropped by enemies) + code:61c9/0a/00+61bf/14/00 + cheat + description:Moon jump + code:48c0/66/4e+48be/d8/da+48bd/05/d7 + +cartridge sha256:895524c63a57b94718e63cd8f71db21617e1692788659cd7cec8e3470b7921f2 + name:Ghosts'n Goblins (USA, Europe) + cheat + description:Invincibility + code:3335/f0/c9 + cheat + description:Hit anywhere + code:21d8/3b/00 + +cartridge sha256:1d47b7e1d6654747e41bd38bf2f6064c23537e9bcea280634f263cdccc6ec5e4 + name:Ghostbusters II (USA, Europe) + cheat + description:Get visible ghosts from anywhere (press B) + code:4795/28/3e+4772/29/00 + +cartridge sha256:dc898d66af6c2ada73946f1cb68f1539c16240060f72e31da5bee2ba2655fcbc + name:Goal! (USA) + cheat + description:Infinite time + code:19ef/01/00 + cheat + description:Select time of up to 99 minutes per half + code:43ec/2d/63 + cheat + description:No goals scored against you by computer + code:4ada/3c/00 + cheat + description:Some teammates have a mega-kick + code:555b/0b/22 + cheat + description:Player 2 is fastest on the pitch + code:555a/09/ff+555b/0b/ff+555c/09/ff + +cartridge sha256:185f092bbebd5fa29a82ffb7d18c8242f75d6f8fee968cf6dee00b32a879febb + name:God Medicine - Hukkoku Ban (Japan) (SGB Enhanced) + cheat + description:Sell an item to get maximum cash + code:5f60/03/00 + cheat + description:Gain maximum EXP after each battle + code:460c/d8/00 + cheat + description:No random battles + code:3294/c8/c9 + cheat + description:Enemies have no HP + code:404a/1a/af+4052/1a/af + cheat + description:Final boss has no HP + code:75d6/03/00 + +cartridge sha256:0f129d30e71c578d737cc9ca6be57abe68d8ba12a934da7d90a3949e192b0dfb + name:Gold and Glory - The Road to El Dorado (USA) + cheat + description:Invincibility + code:5603/1b/00+55f9/d6/3e + cheat + description:Hit anywhere + code:6dd9/f0/c9+6dd8/47/37 + cheat + description:Multi-jump + code:53e3/ec/e0+53e1/20/00+53b5/20/18+53a2/5f/00 + +cartridge sha256:896d9ffbdfe35c802cdcb66b5a6ce84a4ad6bc356c85067904883944a621cbb4 + name:Golf (World) + cheat + description:Wind power is 10 mph + code:1d87/38/3e+1d88/09/5e + +cartridge sha256:4c4397870b96a88e3232f7437945ba122ab2e951b3fe2bb7775d99843d1d6aa5 + name:Grandia - Parallel Trippers (Japan) + cheat + description:Walk anywhere + code:4c57/ea/fa+4c65/ea/fa + cheat + description:Skip battles + code:69c8/ea/fa+6a34/30/18 + +cartridge sha256:2ed249eb86d4fd01e10efd1787a545f4921c19dc0e00b5c516b8bbdfe4c4aedc + name:Gradius - The Interstellar Assault (USA) + cheat + description:Invincibility + code:5118/fa/c9 + cheat + description:Hit anywhere + code:4a57/64/59+5a95/01/05+4a4a/d0/00+4a39/d0/00 + +cartridge sha256:77e9ab506b0995d958fa4b320b9076ee3408de063f76140663c01ae6c32ae3aa + name:Grand Theft Auto (USA) + cheat + description:Infinite ammo + code:46fb/35/00 + cheat + description:Jesus mode + code:1b4d/28/c9 + +cartridge sha256:da9bbcdbd8baba652599419c3d828697c206fb9290b9e008c2ed9ca6103561e8 + name:Great Greed (USA) + cheat + description:No random battles + code:4934/46/00 + cheat + description:One hit kills + code:4c1f/9f/7c + cheat + description:Enemies don't attack + code:466f/28/18 + cheat + description:Walk through walls + code:4e60/55/00 + +cartridge sha256:c1b7a9c2c3df31292b70824159e8c102045f23ac38b263b23ef17a96d8b60c44 + name:HAL Wrestling (USA) + cheat + description:CPU loses all health with one hit + code:2eaa/30/3e + cheat + description:CPU can't recover health + code:58a4/ea/fa + +cartridge sha256:6281ee9af82cbd882250de4802465876a630239b1bc27c1c58b2b3c4ac6fa5d3 + name:Hatris (Japan, USA) + cheat + description:Eliminate a stack with two hats + code:31e6/20/3e+320b/d2/c3 + +cartridge sha256:bfbed25beef74dec194a7330e3f4864a4b82f28927121cf03d9b871965553420 + name:Heavyweight Championship Boxing (USA) + cheat + description:No ring timer + code:1ba4/01/00 + cheat + description:No round increase + code:46e1/3d/af + cheat + description:Juggle your power - can alter power settings and give full power in all categories + code:18b2/3d/00 + cheat + description:Start with punch, life and speed at 1 + code:0478/03/01 + cheat + description:Start with punch, life and speed at 2 + code:0478/03/02 + cheat + description:Start with punch, life and speed at 3 + code:0478/03/03 + cheat + description:Start with punch, life and speed at 4 + code:0478/03/04 + cheat + description:Start with punch, life and speed at 5 + code:0478/03/05 + cheat + description:Start with punch, life and speed at 6 + code:0478/03/06 + cheat + description:Start with punch, life and speed at 7 + code:0478/03/07 + cheat + description:Start with punch, life and speed at 8 + code:0478/03/08 + cheat + description:Start with punch, life and speed at 9 + code:0478/03/09 + cheat + description:Start with super power + code:0478/03/99 + +cartridge sha256:6bf16580b0047f7b0dbaf2bf9a2d34095e057efe70414feeda48de8dcf8952fd + name:High Stakes (USA) + cheat + description:Once you've collected an item from Shady, you can't lose it - blackjack mission 1 only + code:4cad/35/00+566b/35/00 + cheat + description:Betting and cheat tokens cost 0 + code:1bb1/12/00 + cheat + description:No limit to how much you can buy of each item from Shady + code:1003/78/00+40b2/c2/00 + cheat + description:Start with 1/2 money (display will show $50,000) + code:08d8/c3/62 + cheat + description:Start with over $65,000 (display will show $50,000) + code:08d8/c3/ff + +cartridge sha256:f6bdf9f2c4148ce7da23986524781ee844729f360ff9ef27d695ecf0886ff9e0 + name:Hit the Ice - VHL - The Official Video Hockey League (USA, Europe) + cheat + description:Infinite timer + code:1a54/01/00 + cheat + description:Faster timer + code:1a54/01/02 + cheat + description:Infinite super shots + code:2297/34/00 + cheat + description:Only 1 super shot allowed + code:2299/0a/01 + cheat + description:5 super shots allowed + code:2299/0a/05 + cheat + description:10 super shots allowed + code:2299/0a/0a + cheat + description:1-minute periods - vs. mode + code:41f6/05/01 + cheat + description:2-minute periods - vs. mode + code:41f6/05/02 + cheat + description:10-minute periods - vs. mode + code:41f6/05/0a + cheat + description:Neither team can score + code:4439/01/00 + cheat + description:10 seconds in short race after the first shot of 20 seconds + code:1197/20/0a + cheat + description:15 seconds in short race after the first shot of 20 seconds + code:1197/20/0f + cheat + description:5 seconds in short race after the first shot of 20 seconds + code:1197/20/05 + +cartridge sha256:2449307e540566135734977b01ca488a3feb2ce9d887f69a275a308b5a78cc3f + name:Home Alone (USA, Europe) + cheat + description:Invincibility + code:2abd/d0/c9 + cheat + description:Infinite hit points + code:2b5a/3d/00 + cheat + description:Hit anywhere + code:2cb6/d2/fa+2cc7/d2/fa + cheat + description:No enemies + code:0434/fa/21 + cheat + description:Multi-jump + code:1933/3e/00 + cheat + description:Need 1 treasure to finish level 1 + code:23e5/24/01 + cheat + description:Start with 1 hit point + code:23ad/03/01 + cheat + description:Start with 6 hit points + code:23ad/03/06 + cheat + description:Start with 9 hit points + code:23ad/03/09 + +cartridge sha256:f1506c97b36e776a8839187b278efacdfacaa6bb5cf0b3f18e04ced31d0d4a01 + name:Home Alone 2 - Lost In New York (USA, Europe) + cheat + description:Infinite lives + code:1782/3d/00 + cheat + description:Infinite hits unless picked up by shoulders + code:17e9/3d/00 + cheat + description:Get 111,111 points instantly + code:1675/78/00 + cheat + description:Start with 5 lives + code:166f/03/05 + cheat + description:Start with 6 lives + code:166f/03/06 + +cartridge sha256:0dc2278500feb3844ba0ceabee289be011da1084903ab1c3fd681c83e7191118 + name:Hook (USA) + cheat + description:Infinite lives + code:2cfd/35/3d + cheat + description:Multi-jump + code:5f23/30/00 + cheat + description:Skip intro screen + code:3637/06/18+3638/00/23 + +cartridge sha256:a04db245f19a55cd3ff43e2b3fc51cc747fc048a551c4e18639fef4af77553e1 + name:Humans, The (USA) + cheat + description:Infinite humans + code:03e9/ea/fa + cheat + description:Infinite time + code:39b7/ea/fa + cheat + description:Start with 6 humans + code:6d60/0c/06 + cheat + description:Start with 9 humans + code:6d60/0c/09 + cheat + description:Start with 15 humans + code:6d60/0c/0f + +cartridge sha256:690f7b634282d9e8d0ba74f32164f08be45eab1f213bd2c4f02f2b75e22b1773 + name:Ikari no Yousai 2 (Japan) + cheat + description:Invincibility + code:14bb/28/3e + cheat + description:Hit anywhere + code:0caf/d8/00+0cb1/d0/00+0ccc/d8/00+0ad3/ea/fa+0cce/d0/00 + +cartridge sha256:ef563c4a4b063ea045d71b435dd078c19d0738f85079928803167cee8f34a4ec + name:Incredible Crash Dummies, The (USA, Europe) + cheat + description:Infinite time + code:313e/01/00 + cheat + description:Faster timer + code:913e/01/02 + cheat + description:Don't lose money when you go through fire + code:5b00/ff/00 + cheat + description:More cash for each hit + code:3149/83/85 + cheat + description:Start with 2 lives + code:02a9/05/02 + cheat + description:Start with 4 lives + code:02a9/05/04 + cheat + description:Start with 8 lives + code:02a9/05/08 + +cartridge sha256:a900ffcc69fa1fa94dc99584b94914de46d2fa9f1a38c8c303c493a5ee008fec + name:In Your Face (USA) + cheat + description:Computer can't score - when it scores, you get the points + code:14e9/23/00 + cheat + description:Opponents are frozen - 2-on-2 game + code:08aa/c2/c3 + cheat + description:5-second game + code:1a08/59/05 + cheat + description:10-second game + code:1a08/59/0a + cheat + description:20-second game + code:1a08/59/20 + +cartridge sha256:616202e0c2bea4898268c9b3a4eb22e198f1b559e29406057e039dded3db9637 + name:Jeep Jamboree (USA) + cheat + description:Always finish in 1st place + code:1c62/80/3e+1c63/3c/01 + cheat + description:Mega speed - stay at constant high speed even when off course and hitting rocks + code:69d4/7d/79+69d7/7c/79 + cheat + description:Race 1 lap shorter + code:5bf0/01/02 + cheat + description:Race 2 laps shorter + code:5bf0/01/03 + cheat + description:Race 3 laps shorter + code:5bf0/01/04 + +cartridge sha256:7459baee09bf535b8a5402c4c9f9ffc91642a473b7a0ef6085f1df47a35354a0 + name:Jeopardy! (USA) + cheat + description:Always correct (even if you enter nothing) + code:124c/c8/00+1252/28/18 + +cartridge sha256:5eaa028521fbff19dd87cd65a89a1a964ab098e343f4df6a94acae0d24b65e7d + name:Jeopardy! - Sports Edition (USA) + cheat + description:Always correct (even if you enter nothing) + code:1263/28/18+125d/c8/00 + +cartridge sha256:9f8a2dec7c3faa1ca2c12dd819cb36dc331a0ff7c2bb1b49786568e9df016357 + name:Jeopardy! - Teen Tournament (USA) (SGB Enhanced) + cheat + description:Always correct (even if you enter nothing) + code:1289/28/18+1283/c8/00 + +cartridge sha256:873d813fc51b735571c721c12922e85f200ee66f0cb742a60e4a9a63aea74944 + name:Jetsons, The - Robot Panic (USA, Europe) + cheat + description:Infinite lives + code:0fc7/01/00 + cheat + description:Infinite health - some robots can't be killed (disable to fight them) + code:7908/77/00 + cheat + description:Max collectible health + code:3f1e/05/09 + cheat + description:Capped robots on first Elroy stage take 1 hit to kill + code:42a7/02/01 + cheat + description:Capped robots on first Elroy stage take 8 hits to kill + code:42a7/02/08 + cheat + description:Start with 4 lives + code:3f16/03/04 + cheat + description:Start with 7 lives + code:3f16/03/07 + cheat + description:Start with 9 lives + code:3f16/03/09 + +cartridge sha256:bbc006dcf175f1fec822c533bed6abc136a98bcb3b6f8d726cc87c8e17c62e1f + name:Joe & Mac (USA) + cheat + description:Infinite lives + code:2237/01/00 + cheat + description:Infinite health + code:3be9/ea/fa + cheat + description:Take one hit and lose life + code:3be8/91/af + cheat + description:No extra energy from pick-ups + code:3bd8/77/00 + cheat + description:Start with 1 life + code:0a81/03/01 + cheat + description:Start with 6 lives + code:0a81/03/06 + cheat + description:Start with 9 lives + code:0a81/03/09 + cheat + description:Start on level 3 + code:0a89/e0/3e+0a8a/e5/02+0a8b/f0/e0 + cheat + description:Start on level 6 + code:0a89/e0/3e+0a8a/e5/05+0a8b/f0/e0 + cheat + description:Start on level 9 + code:0a89/e0/3e+0a8a/e5/08+0a8b/f0/e0 + +cartridge sha256:63a7bfef616b1f9c19c90fdbbea1a096fd1ab6aad16f67d619b07842b0ad04c1 + name:Jordan vs Bird - One on One (USA, Europe) + cheat + description:Infinite time of possession-1-on-1 game + code:2706/01/00 + cheat + description:8 seconds of possession-1-on-1 game + code:8dd6/24/08 + cheat + description:10 seconds of possession-1-on-1 game + code:8de6/24/0a + cheat + description:15 seconds of possession-1-on-1 game + code:8dd6/24/0f + cheat + description:No timer + code:2748/01/00 + cheat + description:5 points on 3-point shots + code:2672/02/05+2681/02/05 + cheat + description:8 points on 3-point shots + code:2672/02/08+2681/02/08 + cheat + description:12 points on 3-point shots + code:2672/02/0c+2681/02/0c + cheat + description:5 points on 2-point shots + code:26a1/01/05+26ad/02/05 + cheat + description:8 points on 2-point shots + code:26a1/01/08+26ad/02/08 + cheat + description:12 points on 2-point shots + code:26a1/01/0c+26ad/02/0c + +cartridge sha256:6b13a664a3c74e6e61b019f4024f65b3fb301ee5518a9cf9e2a27dc41bbdd561 + name:Jurassic Park (USA) + cheat + description:Infinite hearts + code:1c46/3d/00 + cheat + description:Infinite lives + code:1c11/01/00 + cheat + description:Remove All Objects (Disable this code to collect eggs, enable it to avoid the dinosaurs) + code:4c55/3c/9b+3075/49/f8+4642/8e/00 + cheat + description:Only need 1 card to open the gate + code:43c9/27/af + cheat + description:Canï¾’t collect any energy + code:43dc/3c/00 + cheat + description:First Aid gives you mega energy + code:43dc/3c/af + cheat + description:Get max energy from collecting energy + code:43da/28/3e+43db/05/03 + cheat + description:Die after one hit + code:1c46/3d/af + cheat + description:Start with 1 lives + code:039e/03/01 + cheat + description:Start with 5 lives + code:039e/03/05 + cheat + description:Start with 7 lives + code:039e/03/07 + cheat + description:Start with 9 lives + code:039e/03/09 + cheat + description:Start with 1 heart - after 1st life + code:1c06/04/01 + cheat + description:Start with 9 hearts - after 1st life + code:1c06/04/09 + cheat + description:Start with 1 heart - 1st life + code:039b/04/01 + cheat + description:Start with 9 hearts - 1st life + code:039b/04/09 + +cartridge sha256:5b3e8b6b22662607933bac74e03059ceb7274b6ed3dc2c8752cab45472584a3a + name:Karate Joe (Europe) (Unl) + cheat + description:Invincibility + code:1e82/35/77+1e80/28/3e + cheat + description:Hit anywhere + code:0fc1/d2/fa+0fbb/da/fa+0fa2/d2/fa+0f9c/da/fa + cheat + description:Hit anywhere - Boss + code:10e6/d2/fa+10e0/da/fa+10c7/d2/fa+10c1/da/fa + +cartridge sha256:5759871de43dd530b6e54bbd8025018576c0e5f97a2aa7128c091df33554ea91 + name:Ken Griffey Jr.'s Slugfest (USA) + cheat + description:Balls are considered strikes + code:6802/20/18 + +cartridge sha256:b0a1019b6199c923a6a764c15e7bf6d1bb0bef8a042c383f3e3ead74ab171ede + name:Kid Dracula (USA, Europe) + cheat + description:Invincibility + code:0813/77/00 + cheat + description:Infinite lives + code:5bf5/ea/fa + cheat + description:Hit anywhere + code:3a9d/d0/00+3aae/d0/00 + cheat + description:One hit kills + code:3bac/28/18 + cheat + description:Start with 1 energy heart + code:0543/03/01 + cheat + description:Start with 5 energy hearts + code:0543/03/05 + cheat + description:Start with 1 life + code:054b/02/00 + cheat + description:Start with 5 lives + code:054b/02/04 + cheat + description:Start with 10 lives + code:054b/02/09 + cheat + description:Start on level 3 + code:70cd/01/03 + cheat + description:Start on level 5 + code:70cd/01/05 + +cartridge sha256:92c1fbf422abb8f09ca7fdbb563d1284108cc042e60e1222422986d9a59f9d97 + name:Kid Icarus - Of Myths and Monsters (USA, Europe) + cheat + description:Hit anywhere + code:48b8/af/00 + cheat + description:Run into enemies to get Hearts + code:4567/28/18 + cheat + description:Collected hammers seem to count towards your enemy kill number + code:7ad1/79/c9+7ab4/c0/7a + cheat + description:Maximum kills after killing first enemy + code:0cca/d0/00 + +cartridge sha256:4a091956a579de541aa2eef831e6d0c07d8324255cff7cc889c8ed9b70847769 + name:Killer Instinct (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility - P1 + code:50d1/c0/c9+4b4c/d2/c3 + cheat + description:Hit anywhere - P1 + code:4b01/27/22+4b00/d2/c3 + cheat + description:Disable blocking - P2 + code:4518/ca/c3+501c/ca/c3 + cheat + description:Infinite health + code:47b0/ea/fa + cheat + description:Infinite time + code:6219/3d/00 + cheat + description:Round starts with 10 seconds + code:231c/99/10 + cheat + description:Round starts with 30 seconds + code:231c/99/30 + cheat + description:Round starts with 50 seconds + code:231c/99/50 + cheat + description:Round starts with 75 seconds + code:231c/99/75 + cheat + description:Fierce tiger fury does no damage + code:7b42/22/00 + cheat + description:Fierce tiger fury does more damage + code:7b42/22/88 + cheat + description:Fierce tiger fury kills + code:7b42/22/ff + cheat + description:Fierce wind kick does no damage + code:7b69/1f/00 + cheat + description:Fierce wind kick does more damage + code:7b69/1f/88 + cheat + description:Fierce wind kick kills + code:7b69/1f/ff + cheat + description:Fierce laser blade does no damage + code:7b83/1d/00 + cheat + description:Fierce laser blade does more damage + code:7b83/1d/88 + cheat + description:Fierce laser blade kills + code:7b83/1d/ff + cheat + description:Freeze everything except timer + code:2038/14/d9 + cheat + description:Start with very little energy + code:22ea/dc/01 + cheat + description:Start with 1/4 energy + code:22ea/dc/4b + cheat + description:Start with 1/2 energy + code:22ea/dc/88 + cheat + description:Start with 3/4 energy + code:22ea/dc/b4 + +cartridge sha256:0eac0600e7d9b243c5c648fc3d9f8b5d9962e3634d6ff0d6f1873281d31e8ff7 + name:King of Fighters '95, The (USA) (SGB Enhanced) + cheat + description:Hit anywhere - P1 + code:482d/13/00+4778/0e/00 + cheat + description:Blocking disabled - both players + code:2c57/de/9e + +cartridge sha256:0b5f1ddb0b40b34735c1adf42b46651526d1e55c14c13969659cf04fc2173e16 + name:Kirby's Block Ball (USA, Europe) (SGB Enhanced) + cheat + description:Paddle hits Kirby from anywhere + code:54a6/6d/01+54a5/d2/18 + +cartridge sha256:0f6dba94fae248d419083001c42c02a78be6bd3dff679c895517559e72c98d58 + name:Kirby's Dream Land (USA, Europe) + cheat + description:Infinite lives + code:46db/ea/fa + cheat + description:Infinite lives and gain points when hit + code:500c/fd/00+2ff1/e0/b1 + cheat + description:Infinite vitality bars except against end of stage boss + code:4463/ea/fa + cheat + description:Hit anywhere + code:43e1/05/00 + cheat + description:Inhale from anywhere + code:4853/39/00+4867/25/00 + cheat + description:Start with 2 lives + code:01bb/05/02 + cheat + description:Start with 5 lives + code:01bb/05/05 + cheat + description:Start with 9 lives + code:01bb/05/09 + cheat + description:Start with 2 vitality bars + code:01c0/06/02 + cheat + description:Start with 5 vitality bars + code:01c0/06/05 + cheat + description:Start with 9 vitality bars + code:01c0/06/09 + +cartridge sha256:08ddc36709d551b6c2b768e8280e0213ebe89a5088b34e1cc6c0e14977b8e312 + name:Kirby's Dream Land 2 (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility after one hit + code:7383/3d/00 + cheat + description:Don't flash at all after getting hit + code:52bf/60/01 + cheat + description:Don't flash as long after getting hit + code:52bf/60/20 + cheat + description:Infinite energy + code:27cb/ea/fa + cheat + description:Infinite lives + code:41c4/ea/fa + cheat + description:Hit anywhere + code:26e5/20/00+2704/30/18 + cheat + description:Inhale from anywhere + code:25be/3d/00+25df/1c/00 + cheat + description:Get items from anywhere + code:7b89/38/18 + cheat + description:One hit and you die + code:3a9e/90/af + cheat + description:Each star worth an extra life + code:7cde/07/01 + cheat + description:Can't get extra lives from stars + code:7cdc/3c/00 + cheat + description:Each star takes away a life + code:7cde/07/01+7c87/3c/3d + cheat + description:Start with 1 life + code:6d58/02/00 + cheat + description:Start with 5 lives + code:6d58/02/04 + cheat + description:Start with 7 lives + code:6d58/02/06 + cheat + description:Start with 10 lives + code:6d58/02/09 + +cartridge sha256:43bbc3111fe66b5d87940da810a1a0839ab7d48b50c327807538026241b40295 + name:Kirby's Pinball Land (USA, Europe) + cheat + description:Infinite bonus room time - disable to exit + code:5f1a/ea/fa + cheat + description:Infinite balls + code:4534/c0/00 + cheat + description:Infinite M-Tomato + code:43f6/c8/74 + cheat + description:30 seconds allowed in Wispy-Woods bonus room + code:60b9/60/30 + cheat + description:99 seconds allowed in Wispy-Woods bonus room + code:60b9/60/99 + cheat + description:Go straight to end of level bosses + code:6ecf/f0/3e+6ed0/d2/01 + cheat + description:Go straight to bonus games + code:6ecf/f0/3e+6ed0/d2/02 + cheat + description:DeDeDe takes 1 hit + code:4d1d/17/01 + cheat + description:Start with 5 balls + code:047c/03/05 + cheat + description:Start with 1 ball + code:047c/03/01 + cheat + description:Start with 9 balls + code:047c/03/09 + +cartridge sha256:e497ee2ed48507c32bb3a0c89f449d6f3e3e6b3850534f6af814aaa6d5dcefbd + name:Kirby's Star Stacker (USA, Europe) (SGB Enhanced) + cheat + description:Clear most blocks with any pair + code:6f75/0b/00+6f6d/13/00+6fa6/cc/cd+6f77/28/18 + +cartridge sha256:841bb9ea4b253145b2ed2225e6e81d396ddc4260a7ef6b42d54f0a7e25fef90d + name:Kizuchida Quiz da Gen-san da! (Japan) + cheat + description:Infinite time to answer + code:352d/34/00 + cheat + description:Always correct + code:3751/5d/53 + +cartridge sha256:214710311150029f87ab0c8d67713ac446f3b75057cbebdc8960455acb1824eb + name:Knockout Kings (USA, Europe) + cheat + description:Invincibility + code:5794/c2/c3 + cheat + description:Hit anywhere + code:582e/c2/fa+580c/c2/fa+581a/ca/fa+4f6d/ca/fa+57ff/c2/fa + +cartridge sha256:7c7fb68ae4693ee68fa67e6ac0aef20554b697411d859c30da778290be7b9280 + name:Koushien Pocket (Japan) (SGB Enhanced) + cheat + description:Balls are considered strikes + code:6657/13/00 + +cartridge sha256:cca2e1e06b50869a16b0b7bcef0095ff7d53af926419808da2b82fbab3762750 + name:Krusty's Fun House (USA, Europe) + cheat + description:Infinite lives + code:03ac/ea/fa + cheat + description:Infinite pies + code:46eb/ea/fa + cheat + description:Start with 2 pies + code:025d/0a/02 + cheat + description:Start with 7 pies + code:025d/0a/07 + cheat + description:Start with 15 pies (only shows 10) + code:025d/0a/0f + cheat + description:Start with 2 lives + code:0243/03/02+0258/03/02 + cheat + description:Start with 6 lives + code:0243/03/06+0258/03/06 + cheat + description:Start with 9 lives + code:0243/03/09+0258/03/09 + +cartridge sha256:dff23b973c6c5e85da109dfb346ee396625fa7f934bc7c4b853ce4f237dfa42a + name:Kung-Fu Master (USA, Europe) + cheat + description:Mostly invincible + code:09ff/35/00+0a42/90/00 + cheat + description:Infinite time (disable to complete level) + code:5c8e/35/00 + cheat + description:Hit anywhere + code:138d/02/00 + cheat + description:Touch weak enemies to defeat them + code:09e6/06/00 + +cartridge sha256:e1340810c6dd12f55ab5928f08fbec92975f2303bda68e2a4b94cd8bc5ddec33 + name:Kwirk - He's A-maze-ing! (USA, Europe) + cheat + description:Walk through walls + code:11d6/28/18+11d7/6f/1e + +cartridge sha256:4804741a60591a637103a54a6e3a5611bd775097c457fdf85775d74da93ab600 + name:Kyoro-chan Land (Japan) + cheat + description:Invincibility + code:29ee/38/3e + +cartridge sha256:dbcecd9ed9ee70e8f3a231eb0bda95c882ff0e9697d52fe919a02f076962de91 + name:Lamborghini American Challenge (USA, Europe) + cheat + description:Infinite money + code:328a/9e/00 + cheat + description:Infinite turbos + code:7931/35/00 + cheat + description:Increased money + code:1d1a/00/99 + cheat + description:No Loss Of Speed On Collisions + code:61c3/60/00 + cheat + description:No Loss Of Speed When Off Track + code:6a18/04/00 + cheat + description:Start With 2 Turbos + code:1d27/01/01 + cheat + description:Start With 6 Turbos + code:1d27/01/05 + cheat + description:Start With 10 Turbos + code:1d27/01/09 + +cartridge sha256:2451d61085652f25d36e35f1fa50dc7e6b51c6e20a50120decc33efcf1c91109 + name:Last Action Hero (USA, Europe) + cheat + description:Level select (# = level 1-9 or A for ending credits) + code:f000/ba/00 + +cartridge sha256:26c7fd748c4f34b6c091870ebaa0d4798216df6389642493681deb644752508c + name:Lawnmower Man, The (Europe) + cheat + description:Invincibility - Sidescrolling levels + code:4037/c4/fa+4030/c4/fa + cheat + description:Invincibility - Cyber Tube + code:429e/da/c3 + cheat + description:Invincibility - Virtual World + code:5f1f/30/18+6409/30/18 + cheat + description:Infinite lives + code:46fd/ea/fa+5a6d/ea/fa+4315/35/00+0faf/ea/fa+4554/ea/fa + +cartridge sha256:96db9c11cff58dd637efbdc11416580d1a05bb6cc119d9efa0b17bfb0d0f80ad + name:Lazlos' Leap (USA) + cheat + description:Move one piece to clear level (move a piece over another) + code:1fa0/06/07 + +cartridge sha256:7fcf3eec2ce487e804115b814b8ddc3f833bdae8d7e01df8975a1af029edefcd + name:Legend (Japan) + cheat + description:No random battles + code:3eef/d0/c9 + +cartridge sha256:21f712e213f43f9efb93ca039a5190fc09325d5d932af1fb2f8e90b4f9fd169f + name:Legend of Zelda, The - Link's Awakening (USA, Europe) + cheat + description:Infinite health + code:f000/04/00 + cheat + description:Infinite rupees (rupees aren't deducted for purchases you can afford) + code:5fbd/ea/fa+5fb2/ea/fa + cheat + description:All items you get start at max power. When you get an item, you must have a space open (either A or B). + code:4c56/01/09+5c74/01/09 + cheat + description:Get 5 rupees for each single rupee + code:64ee/01/05 + cheat + description:Get 50 rupees for each single rupee + code:64ee/01/32 + cheat + description:Get 255 rupees for each single rupee + code:64ee/01/ff + cheat + description:Hookshot attaches to anything + code:7c9e/a0/9f+7ca3/77/ea+7ca4/a7/9f+7ca5/c9/c2 + cheat + description:Walk through walls. Can walk past the edge of walls and objects, but not through people. Be careful of entering doors from the wrong side. If you get stuck on the edge of a screen, try diagonal and straight movement in all directions. Works from locations in the water. Doesn't work for underground passages. + code:7716/b6/af + +cartridge sha256:5373296324b1ad40716f707239d42cfec8a1ee44ba6f0aa3e1809463747bf767 + name:Legend of Zelda, The - Link's Awakening (USA, Europe) (Rev A) + cheat + description:Hookshot attaches to anything + code:7c9c/a0/9f+7ca0/77/ea+7ca1/a7/9f+7ca2/c9/c2 + +cartridge sha256:c95dd3d9cb798e86c28e3269554e458d434bf3277b96cadf5bc81cfacfb5ee60 + name:Legend of Zelda, The - Link's Awakening DX (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:6d73/fa/c9 + cheat + description:Walk through walls. Be careful of entering doors from the wrong side. If you get stuck on the edge of a screen, try diagonal and straight movement in all directions to free yourself. Allows you to go through walls starting from locations in the water. Doesn't work for underground passages. + code:745b/b6/af + +cartridge sha256:6285ba6201f17bc8595c600ebc2477d52561f0aff29b11f7fc3343bacb2e230b + name:Legend of Zelda, The - Link's Awakening DX (USA, Europe) (Rev A) (SGB Enhanced) + cheat + description:Invincibility + code:6d68/fa/c9 + cheat + description:Hit anywhere + code:6e8d/d2/fa+6e6d/d2/fa+5a03/d0/90+6323/d0/90 + cheat + description:One hit kills + code:72ad/7e/00 + cheat + description:Shop items are free + code:7a2c/30/18 + cheat + description:Revive infinite times + code:63c9/55/04+63c8/28/18 + cheat + description:Throw more than one Boomerang at a time + code:4462/01/00 + cheat + description:Multi-jump + code:14d4/c0/00 + cheat + description:Walk over water, holes, etc + code:762f/ea/c9 + cheat + description:Can place up to 14 bombs at once + code:66a9/34/00 + cheat + description:Cut down almost anything with your sword + code:1633/c0/00+1616/ca/fa+1621/28/18 + cheat + description:Horse pieces always land standing + code:7691/04/00+7690/01/00 + cheat + description:Easier Wing Egg puzzle + code:7a90/07/0d+7a8e/be/02+7a8c/19/79+7a8d/79/fe + +cartridge sha256:5dee5816ed9b46cfc4a2d94f275e555dd3c5080eca00ded975a41a881a6d4c06 + name:Legend of Zelda, The - Link's Awakening DX (USA, Europe) (Rev B) (SGB Enhanced) + cheat + description:Invincibility + code:6d68/fa/c9 + cheat + description:Hit anywhere + code:6e8d/d2/fa+6e6d/d2/fa+5a03/d0/90+6323/d0/90 + cheat + description:Shop items are free + code:7a2c/30/18 + cheat + description:Revive infinite times + code:63c9/55/04+63c8/28/18 + cheat + description:Cut down almost anything with your sword + code:1633/c0/00+1616/ca/fa+1621/28/18 + cheat + description:Horse pieces always land standing + code:7691/04/00+7690/01/00 + cheat + description:Easier Wing Egg puzzle + code:7a90/07/0d+7a8e/be/02+7a8c/19/79+7a8d/79/fe + +cartridge sha256:0b56b78a9e45452e98c33edd111234931f1e034dc097f6f23082eb8db6055474 + name:Legend of Zelda, The - Oracle of Ages (USA) + cheat + description:Invincibility + code:47df/7b/c9 + cheat + description:Infinite Seed/Bomb use on pick-up + code:17d3/01/00 + cheat + description:Hit anywhere + code:44e4/be/fe+533c/fd/fc+42b5/da/c3+6ec7/af/00 + cheat + description:Get items from anywhere + code:4214/d0/00+4b7b/d0/00 + cheat + description:Moon-jump + code:5328/20/18+5329/28/06 + cheat + description:Defeat 1 enemy for fully grown Gashas/Maple meeting + code:0246/c0/00 + cheat + description:Each Seed/Gasha/Bomb worth 99 + code:4592/02/00 + cheat + description:Cut down almost anything with your sword + code:78e1/3a/01+7936/1c/3a+4751/d0/00+4762/c8/00 + cheat + description:Walk through walls. It's not hard to get stuck, so save where it's safe. + code:5da5/1a/af + cheat + description:Always win shooting gallery mini-game + code:5085/20/18 + cheat + description:Never miss in Goron Dance + code:7908/28/18+7909/1d/1a + cheat + description:Mermaid Suite - hold down button instead of continuously pressing + code:5910/2a/29 + +cartridge sha256:862a51368fb30539279d336b3fe193b43876d2cb15c87a36f5da517804ab3971 + name:Legend of Zelda, The - Oracle of Seasons (USA) + cheat + description:Invincibility + code:47c7/7b/c9 + cheat + description:Infinite Seed/Bomb use on pick-up + code:17ac/01/00 + cheat + description:Hit anywhere + code:5a32/eb/00+448e/34/30+7780/d0/00+44cc/be/fe+429d/da/c3+6749/3d/00+6e3f/d0/00+463f/62/c9 + cheat + description:Get items from anywhere + code:420d/d0/00+4221/d0/00 + cheat + description:Moon-jump + code:515d/20/18+515e/31/06+5182/02/00 + cheat + description:Defeat 1 enemy for fully grown Gashas/Maple meeting + code:0246/c0/00 + cheat + description:Each Seed/Gasha/Bomb worth 99 + code:4598/02/00 + cheat + description:Cut down almost anything with your sword + code:4437/3d/56+774c/e1/01+4741/c8/00+4730/d0/00 + cheat + description:Walk through walls. It's not hard to get stuck, so save where it's safe. + code:5c96/1a/af + cheat + description:Touch any button to enter desert with pirate ship + code:6014/07/00 + cheat + description:Lost woods - no need to change seasons to move on (Noble Sword direction - L, L, L, L. Level 6 direction - L, D, R, U.) + code:5e0c/03/00 + +cartridge sha256:68e708010f14daa6013370d43b9ee00a2305b1a95285e7daafa6642a0677b8c2 + name:Lethal Weapon (USA, Europe) + cheat + description:Infinite weapon energy + code:1601/ea/fa + cheat + description:Infinite life energy (except falling down holes) + code:2a1d/ea/fa+2aa5/ea/fa + cheat + description:No enemies + code:445b/ff/00 + cheat + description:Start with weapon energy on 1/2 + code:19ce/40/1e + cheat + description:Start with life energy on 1/2 + code:19c3/40/23 + +cartridge sha256:c24d7fdc7706cf0e01cbdb8c67ce4fb8079015e2b533a731a520844126073d77 + name:Little Magic (Japan) + cheat + description:Invincibility + code:44cb/fa/ea + cheat + description:Stairs always open + code:5b4d/c2/fa + cheat + description:Walk anywhere + code:4721/08/00+4704/08/00+475b/08/00+473e/08/00 + +cartridge sha256:f15722ebebdae93e08bd6642d642614114f2d128778d6a131748c9855603e052 + name:Little Mermaid, The (USA) + cheat + description:Infinite energy + code:1822/35/c9 + cheat + description:Infinite lives + code:0c79/35/00 + cheat + description:Start with 2 lives + code:07f1/03/01 + cheat + description:Start with 6 lives + code:07f1/03/05 + cheat + description:Start with 10 lives + code:07f1/03/09 + cheat + description:Start with 1 energy pt + code:0896/03/01 + cheat + description:Start with 5 energy pts + code:0896/03/05 + cheat + description:Start with 8 energy pts + code:0896/03/08 + cheat + description:Start on level 2 + code:0807/ff/01 + cheat + description:Start on level 3 + code:0807/ff/02 + cheat + description:Start on level 4 + code:0807/ff/03 + cheat + description:Start on level 5 + code:0807/ff/04 + cheat + description:Start on level 6 + code:0807/ff/05 + cheat + description:See end of game credits + code:0807/ff/06 + +cartridge sha256:0d6c56da2fdb6b27d388912604ad97c2f71729604a075d76c1fcd923f29e6915 + name:Lock n' Chase ~ Lock 'n' Chase (World) + cheat + description:Invincibility + code:1764/28/3e + cheat + description:Press A to clear level (except final level) + code:255e/ae/b6+2560/a7/3d + +cartridge sha256:17b55c1a46af87f5dae066b0fdbe2b7cac05c29c3d86800e0717ed4c6325af3e + name:Looney Tunes (USA) + cheat + description:Infinite time + code:0890/3c/00 + cheat + description:Hit anywhere + code:7845/d2/fa+780a/d2/fa+7800/d2/fa + cheat + description:Multi-jump + code:4480/03/00 + cheat + description:Start with 99 lives + code:01ec/02/99 + +cartridge sha256:a62f8d94d9eb0633c03d6a67100b354ffee92bee2fff26c0de8c35796a544a53 + name:Looney Tunes (USA, Europe) + cheat + description:Infinite time + code:0890/3c/00 + cheat + description:Hit anywhere + code:7845/d2/fa+7809/bd/37+77ff/bc/37 + cheat + description:Multi-jump + code:4481/c2/fa + +cartridge sha256:53c29bbf5a96a600e4879374215c3bc840df0343bce7ef37a2b7f043b383cb1c + name:Looney Tunes - Carrot Crazy (USA) (En,Fr,Es) + cheat + description:Invincibility + code:17e0/e0/f0 + cheat + description:Invincible from high falls + code:28bb/20/18 + cheat + description:Hit anywhere + code:78cc/30/3e+78f6/20/3e+790e/38/3e+7908/20/3e + +cartridge sha256:59971b1b4a49e14b4870dd500682ece31f1654ce2f34a3799e5dcdeda5f5e73e + name:Looney Tunes Collector - Martian Revenge! (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Invincibility + code:3eee/c0/c9 + cheat + description:Hit anywhere + code:0ab7/0c/9b + cheat + description:Infinite ammo + code:5db3/77/00 + cheat + description:Get items from anywhere + code:569e/c8/00+5a80/c8/00 + cheat + description:Walk over space + code:519b/c8/c9 + +cartridge sha256:ff9b75f13d25595ebf286d284f6bb951648f3d67f0fd043947d3c48132441c7f + name:Lucky Luke (USA) (En,Fr,De,Es) + cheat + description:Invincibility + code:7647/e0/f0+32c7/e0/f0 + cheat + description:Infinite ammo + code:1916/77/00 + +cartridge sha256:4231fd9f25a5729208475d2d6aa6c2a6e53b1e918e7731a1eee3ce532993301b + name:Lufia - The Legend Returns (USA) + cheat + description:0 HP - Enemies + code:674b/2a/af+674c/46/47 + cheat + description:No random battles + code:4034/3c/af + cheat + description:Enemies always miss + code:7295/f5/c9 + cheat + description:Walk anywhere + code:55e6/ca/c3+55dd/01/00 + +cartridge sha256:2e102efe39e0825933f1fbf4b0b8cc2dbef42f3df809311a5c8a8c1d84899bf7 + name:M&M's Minis Madness (USA) + cheat + description:Multi-jump + code:65d0/ca/fa + +cartridge sha256:bf4cae27bd0dfdede3838d50f92d03cb7cd183a15091bd2a76c7b3fc7b3e718b + name:Madden '95 (USA, Europe) (SGB Enhanced) + cheat + description:Infinite play clock + code:1c3b/3d/00 + cheat + description:Infinite game time + code:1c62/3d/00+3933/e0/f0 + cheat + description:Start on second down + code:288e/01/02 + cheat + description:Start on third down + code:288e/01/03 + cheat + description:Start on fourth down + code:288e/01/04 + cheat + description:Down never increases + code:25de/3c/00+3ef0/ea/fa + +cartridge sha256:eabe2a1c9116871837ddb1d39d643621dc144c18490b5673bd8eedc88b8ceff9 + name:Malibu Beach Volleyball (USA) + cheat + description:Easier to score + code:4daa/04/03 + cheat + description:Computer can't score a point. If score is 0-0, makes you change court a lot. + code:5f0c/c1/00 + cheat + description:You always serve + code:5d0e/01/00+5de0/01/00 + +cartridge sha256:0d479d68a4ac800ab9fde8b3db016af718c13a979163b3eb34b00af96550cd3e + name:Mario's Picross (USA, Europe) (SGB Enhanced) + cheat + description:Infinite time + code:7b11/3d/00 + cheat + description:Mistakes don't decrease time + code:7c8f/91/00 + +cartridge sha256:2c45623446cf82896830712223079e9be5e79b3e5faf550c07f92f082bef419e + name:Maru's Mission (USA) + cheat + description:Infinite health + code:397c/91/00+3980/98/00 + +cartridge sha256:3fe6e53d0a44081f90a91004aa2ea4253a5a5933fff940c22e30e84029e4b2ef + name:Max (Europe) + cheat + description:Infinite Rockets + code:08dd/ea/fa + cheat + description:Hit anywhere + code:551a/38/18+550d/38/18+54b5/38/18+54a8/38/18 + +cartridge sha256:550995df4740397fccdc70d480c9a595260afb59bfcea0b0ec50cb5d55cfe9b0 + name:McDonaldland (Europe) + cheat + description:Invincibility + code:2639/28/3e + cheat + description:Hit anywhere - Throwing and pickup up blocks + code:3aaa/d2/fa + cheat + description:Multi-jump + code:3fa6/28/3e + +cartridge sha256:33d16365318411f063edd9100c79458aabb7ea71bb1873e30f38b93814f0ec6e + name:Mega Man - Dr. Wily's Revenge (USA) + cheat + description:Invincibility + code:55fa/01/00+683f/be/41 + cheat + description:Infinite weapons except Flash + code:4209/12/00+515a/ea/fa+4964/ea/fa + cheat + description:Hit anywhere + code:5861/fe/01+2a3d/13/15+2b47/7d/52+281a/af/00+2b5a/21/00+10d2/38/18+10d3/0c/11 + cheat + description:Multi-jump + code:6b24/21/fa+6b25/4a/3f+6b27/7e/e6+6b28/b7/01+6b2b/35/00+6cce/34/1c+6ccf/28/18 + cheat + description:One hit kills + code:2b62/01/00+4c87/01/00 + cheat + description:Moon jump + code:6b2a/4d/00+6b49/12/18+6b4a/af/18+6b4b/ea/2c + +cartridge sha256:be3fc7ab2d7eb79a9e2538b090bdecc2694740f3beda933f34cb1e4059b10a11 + name:Mega Man II (USA) + cheat + description:Invincibility + code:35ce/c0/c9 + cheat + description:Infinite weapons + code:3a14/90/00 + cheat + description:Multi-jump + code:00f0/ff/cd+00f1/ff/d4+00f2/ff/0f+00f3/ff/c9+1226/fa/cd+1227/6f/f0+1228/cf/00+122a/28/18+1244/20/00+1245/00/01 + +cartridge sha256:7344a36fcfc8151098238529218762e44c5a1546fab7e7fd5d32927e06cbf5a8 + name:Mega Man III (USA) + cheat + description:Infinite energy + code:6c09/77/00 + cheat + description:Infinite weapons + code:4235/12/00+5488/ea/fa+58a9/ea/fa + cheat + description:One hit kills + code:296e/01/00+0f25/01/00 + cheat + description:Laser barriers appear and explode immediately on Sparkman stage + code:3977/01/00 + cheat + description:Takes 1 hit to kill Merciless Matt + code:3953/07/01 + cheat + description:Takes 15 hits to kill Merciless Matt + code:3953/07/0f + cheat + description:Multi-jump + code:6e3f/21/fa+6e40/4a/3f+6e42/7e/e6+6e43/b7/01+6e46/35/00+7002/34/1c+7003/28/18 + cheat + description:Start with 2 lives + code:0b17/03/02 + cheat + description:Start with 6 lives + code:0b17/03/06 + cheat + description:Start with 9 lives + code:0b17/03/09 + +cartridge sha256:4d980ca46a83cd127312dbc445ed1a83e97ed7a8026dce6fdd22a01b1895781b + name:Mega Man IV (USA) + cheat + description:Invincibility + code:5fea/c2/21 + cheat + description:Infinite energy + code:61ce/77/00 + cheat + description:Infinite lives + code:0c45/df/01 + cheat + description:Shoot more than 3 shots at a time + code:4567/d0/00 + cheat + description:Start with 1/4 energy + code:09f6/98/26 + cheat + description:Start with 1/2 energy + code:09f6/98/4b + cheat + description:Start with 3/4 energy + code:09f6/98/70 + cheat + description:Start with 1 lives + code:0cae/03/01 + cheat + description:Start with 5 lives + code:0cae/03/05 + cheat + description:Start with 9 lives + code:0cae/03/09 + +cartridge sha256:7a108770a7c1ad592b52d0c46d7ead422d0a20961abaafca3d40086e3f2f588f + name:Mega Man V (USA) (SGB Enhanced) + cheat + description:Invincibility + code:6226/c2/21 + cheat + description:Infinite lives + code:0b75/df/01 + cheat + description:Infinite energy + code:641d/77/00 + cheat + description:Walk through enemies (can still take damage from projectiles) + code:12cd/00 + cheat + description:Hit anywhere + code:11fa/0c/11+11f9/38/18+7a0e/0c/11+7a0d/38/18 + cheat + description:Multi-jump + code:6682/21/fa+6683/52/40+6685/7e/e6+6686/b7/01+6689/35/00+6871/08/1c+6879/34/1c + cheat + description:One hit kills + code:1185/01/00+290e/01/00+7a4e/01/00 + cheat + description:Start with 1 lives + code:0bea/03/01 + cheat + description:Start with 5 lives + code:0bea/03/05 + cheat + description:Start with 9 lives + code:0bea/03/09 + cheat + description:Start with about 1/4 energy + code:0944/98/26 + cheat + description:Start with about 1/2 energy + code:0944/98/4b + cheat + description:Start with about 3/4 energy + code:0944/98/70 + +cartridge sha256:638225d961484c8749ff8ceba1c865d267a5401b0d37a3a84cac7a6fb6bd8b9a + name:Mega Man Xtreme (USA, Europe) + cheat + description:Invincibility + code:2d0e/28/18 + cheat + description:Infinite secondary weapons + code:6844/35/00 + cheat + description:Hit anywhere + code:2d62/77/0b+2d63/2d/2f + cheat + description:Get items from anywhere + code:7bd4/77/0b+7bd5/2d/2f + +cartridge sha256:e37a14a8e61bd64f2226dacc26a7ee75dd90abfcf88c5016eb97b76ecda0ddca + name:Mega Man Xtreme 2 (USA, Europe) + cheat + description:Invincibility + code:285e/28/18 + cheat + description:Infinite secondary weapons + code:66a9/77/00 + cheat + description:Hit anywhere + code:28b5/28/2a+28b4/cb/9d + cheat + description:get items from anywhere + code:75f3/09/00 + +cartridge sha256:bed7986ba7428470bf946a174810db1a49494f05a0985270a7c6d1ab6fe86f2b + name:Megalit (USA, Europe) + cheat + description:Infinite lives + code:026a/ea/fa + cheat + description:Infinite time - Quest mode + code:2d31/ea/fa + cheat + description:Blocks don't break + code:2f7f/34/00 + +cartridge sha256:0430cbbcdd56b693d40ab7b424603c639d98d5ec97e91e17ce1ede766104e765 + name:Merlin (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Level select (below Options at title screen) + code:6285/03/04 + +cartridge sha256:56a69d19ba26941a25adad8bdf17c7baba12245097e901999f4c897eec877ddb + name:Metal Gear Solid (USA) + cheat + description:Infinite ammo for all weapons + code:6318/3d/00 + cheat + description:Enemies don't see you + code:74a8/b7/c9+64e8/fa/c9 + cheat + description:Cameras don't see you (normal game and VR training) + code:7369/c8/c9 + +cartridge sha256:58130b462d7760624fa150938f5e3958f9185ef827644855acdef38ff6d55749 + name:Metal Walker (USA) + cheat + description:1 HP - enemies + code:4e2b/79/3c+4e24/78/af + cheat + description:No random battles + code:523e/c0/c9 + +cartridge sha256:3080bcc2eb9965de463f5f4e02f0dabbb13b060e1654a18da8b50948c10af4a6 + name:Metroid II - Return of Samus (World) + cheat + description:Invincibility against enemies + code:2ee8/c0/c9 + cheat + description:Infinite energy + code:2f6d/27/80 + cheat + description:Infinite missiles + code:4f36/01/00 + cheat + description:Hit anywhere + code:3270/36/0d+326f/30/18+52e3/30/18 + cheat + description:Multi-jump + code:0d46/13/14+0d45/9d/98+0d44/c2/cd+1430/ea/fa+1461/ea/fa + +cartridge sha256:7c96841877908473f7873c91373b06bfd3749b341b4c4180c8fd2cc8b8308b68 + name:Mickey Mouse (Europe) + cheat + description:Invincibility + code:625e/20/18 + cheat + description:Can open locked doors without 8 Keys + code:48ab/c2/fa + +cartridge sha256:bc14dac53de625535cc2825efa3d2399bf0c8c661f8a9417c4b97414a630cd0e + name:Mickey Mouse - Magic Wands (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:0e92/c8/3e + +cartridge sha256:fedb0c8100987cb466c116a3ac3a6572675b6aa721a7a8930cec1ae39f677bc6 + name:Mickey's Dangerous Chase (USA) + cheat + description:Invincibility after first hit + code:11a8/01/00 + cheat + description:Infinite health + code:1da0/ea/fa + cheat + description:Infinite lives + code:05e2/ea/fa + cheat + description:Start with 99 lives + code:04b6/03/63 + +cartridge sha256:573798e5dfa80c13f2c7f77795fa3460c0c41ffbc49ab3b830fb4bf30c89f179 + name:Mighty Morphin Power Rangers (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:2cb9/e0/c9+2d1e/21/c9+2c9f/f0/c9 + cheat + description:Hit anywhere + code:2e1e/30/3e+2e2a/38/18 + cheat + description:One hit kills - bosses + code:2e4a/28/18 + cheat + description:Multi-jump + code:26c9/38/00+2535/20/3e + +cartridge sha256:67f16ea0f0afdb20fa75cc988466c0726203412a57a36e0f866eb341ede5d311 + name:Mighty Morphin Power Rangers - The Movie (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:4c7b/d0/c9 + cheat + description:Hit anywhere + code:4041/03/00 + cheat + description:Can always use power + code:486d/c0/00 + +cartridge sha256:70124937963d44c034d73e3e3c7ecf9c3440cdb934cd1a8b6fd4629381343d02 + name:Milon's Secret Castle (USA, Europe) + cheat + description:Protection against most hazards + code:7d36/ea/fa + cheat + description:Infinite money on pick-up + code:678f/ea/fa + cheat + description:Each $ box is worth 99 + code:7713/fa/3e+7714/cf/62+7715/df/00 + cheat + description:Start with and keep double shot and shield + code:7cfd/ea/fa+5ca8/af/3c + cheat + description:Start with 3 energy bars + code:76ea/05/03 + cheat + description:Start with 6 energy bars + code:76ea/05/06 + cheat + description:Start with 9 energy bars + code:76ea/05/09 + +cartridge sha256:b136c40a4ca52d6567e7f71790690b1e71ddad3b9df8d1ee98135ac46a2e7637 + name:Minesweeper - Soukaitei (Japan) + cheat + description:Never miss + code:306b/28/18+3140/28/18 + +cartridge sha256:d74962fe1750b3918c6b5e34dd30851df50e33eaeb27659097d52090c9803705 + name:Miner 2049er Starring Bounty Bob (USA) + cheat + description:Invincibility + code:5239/d2/c3+52dd/d2/c3+4ca4/ea/fa + cheat + description:Infinite time + code:6223/01/00 + cheat + description:Infinite lives + code:423d/01/00 + cheat + description:Take 1 step to complete level + code:3f26/d2/fa + cheat + description:Nasties are invincible + code:09ca/00/03 + cheat + description:Start with 2 lives + code:269e/03/02 + cheat + description:Start with 4 lives + code:269e/03/04 + cheat + description:Start with 8 lives + code:269e/03/08 + +cartridge sha256:f6d779c4882e032919903b4874dec1b6f06716911f77eb9f8acd1727215eb791 + name:Missile Command (USA, Europe) + cheat + description:Infinite missiles + code:129a/3d/00+124b/3d/00+1ffd/0f/20 + cheat + description:Invincible bases + code:26bb/fe/ff + cheat + description:Hit anywhere + code:1f4d/da/c3+1fa8/af/37 + cheat + description:New York + code:1f28/00/02 + cheat + description:London + code:1f28/00/04 + cheat + description:Sydney + code:1f28/00/06 + cheat + description:Paris + code:1f28/00/08 + cheat + description:Moscow + code:1f28/00/0a + cheat + description:San Francisco + code:1f28/00/18 + +cartridge sha256:0b3e5a9611551cc135cebfa67fe3f9aa1a54ef9855c0888b715351035908e126 + name:Missile Command (USA) + cheat + description:Hit anywhere + code:1f4d/da/c3+1fa8/af/37 + cheat + description:Infinite Missiles + code:124c/ea/fa+129b/ea/fa + +cartridge sha256:3b0aaea526447c2d682139c9494eec82045b36e5e684cc56132391ba9a2ef689 + name:Momotarou Dengeki (Japan) + cheat + description:Hit anywhere + code:5184/c2/fa+51d8/c2/fa+51b1/c2/fa+5157/c2/fa + cheat + description:Multi-jump + code:2112/23/29+20a1/c2/fa + +cartridge sha256:f1bf118bd383a91ecf81f7ee759ce702b85cfee9f8cf11d8365cb243d555c607 + name:Momotarou Dengeki 2 (Japan) (SGB Enhanced) + cheat + description:Hit anywhere + code:5333/38/18+5382/38/18+5341/38/18+538f/38/18 + cheat + description:Multi-jump + code:4113/c2/fa+419e/2b/1d + +cartridge sha256:5bc4ca50f5cbbc2cf5e2fc98f4a4df661faab495369ab41d9a63c0f8d49c0fa3 + name:Monopoly (USA) + cheat + description:Infinite money - P1 + code:c47c/99+c47d/99+c47e/09 + cheat + description:Infinite money - P2 + code:c480/99+c481/99+c482/09 + cheat + description:Infinite money - P3 + code:c484/99+c485/99+c486/09 + cheat + description:Infinite money - P4 + code:c488/99+c489/99+c48a/09 + +cartridge sha256:003097c7a363da268fa2853262c1924ee72fe23fc546834b247c359f69a684aa + name:Montezuma's Return! (USA) (En,Es) + cheat + description:Invincibility against enemies + code:5580/c0/c9+490d/30/18 + cheat + description:Invincibility against fire + code:49e0/28/18 + cheat + description:Invincibility against high falls + code:4a2f/28/18 + +cartridge sha256:84686cd3c77c533926fc2c56783613ecc5781de1bff7065e00112a69d17a5e69 + name:Mortal Kombat (USA, Europe) + cheat + description:Infinite health - P1 + code:3594/d6/00 + cheat + description:Infinite time + code:1cb5/35/00 + cheat + description:Infinite continues + code:2296/d6/00 + cheat + description:Infinite fatality time + code:0a11/c2/c3 + cheat + description:One button fatality - Sonya (Press back, close but not close to opponent) + code:38c9/00/ff + cheat + description:One button fatality - Rayden (Press back) + code:3879/00/ff + cheat + description:One button fatality - Kano (Press down) + code:3889/00/ff + cheat + description:One button fatality - Liu Kang (Press foward) + code:3899/00/ff + cheat + description:One button fatality - Scorpion (Press forward, Halfway distance) + code:38aa/01/ff + cheat + description:One button fatality - Sub Zero (Press forward) + code:38b9/00/ff + cheat + description:Foot sweep does less damage + code:39c7/41/10 + cheat + description:Foot sweep does more damage + code:39c7/41/ff + cheat + description:Punches do less damage + code:39af/21/10 + cheat + description:Punches do more damage + code:39af/21/ff + cheat + description:Knees do less damage + code:39bf/41/10 + cheat + description:Knees do more damage + code:39bf/41/ff + cheat + description:Uppercuts do less damage + code:39a7/82/10 + cheat + description:Uppercuts do more damage + code:39a7/82/ff + cheat + description:Kicks to stomach do less damage + code:39cf/41/10 + cheat + description:Kicks to stomach do more damage + code:39cf/41/ff + cheat + description:Kicks to face do less damage + code:39b7/62/10 + cheat + description:Kicks to face do more damage + code:39b7/62/ff + cheat + description:Shoulder throws do less damage + code:3a17/41/10 + cheat + description:Shoulder throws do more damage + code:3a17/41/ff + cheat + description:Sub-Zero's slide does less damage + code:3a07/51/10 + cheat + description:Sub-Zero's slide does more damage + code:3a07/51/ff + cheat + description:Sonya's leg grab does less damage + code:3a27/61/10 + cheat + description:Sonya's leg grab does more damage + code:3a27/61/ff + cheat + description:Kano's cannonball does less damage + code:3a1f/61/10 + cheat + description:Kano's cannonball does more damage + code:3a1f/61/ff + cheat + description:Rayden's lightning does less damage + code:3a5f/e7/10 + cheat + description:Rayden's lightning does more damage + code:3a5f/e7/ff + cheat + description:1 continue + code:4014/06/01 + cheat + description:5 continues + code:4014/06/05 + cheat + description:10 continues + code:4014/06/0a + +cartridge sha256:29d69e0f71b692f348a0954cc3aaa86dcd9a32d8a7268ce6b76ba26b0c0e4629 + name:Mortal Kombat II (USA, Europe) + cheat + description:Infinite health + code:4948/dd/00 + cheat + description:Infinite continues + code:0dab/35/00 + cheat + description:Infinite time + code:4c55/01/00 + cheat + description:No continues + code:0157/06/00 + cheat + description:1 continue + code:0157/06/01 + cheat + description:3 continues + code:0157/06/03 + cheat + description:9 continues + code:0157/06/09 + cheat + description:15 continues + code:0157/06/0f + cheat + description:Much faster timer + code:4c55/01/02 + cheat + description:Timer starts at 30 + code:2339/9a/2c + cheat + description:Timer starts at 40 + code:2339/9a/3c + cheat + description:Timer starts at 50 + code:2339/9a/4c + cheat + description:Timer starts at 60 + code:2339/9a/5c + cheat + description:Player can't move from floor + code:462e/77/00+501f/77/00 + cheat + description:Complete round 1 and go to round 3 (disable after end of round) + code:1179/28/3e+117a/10/03+117b/f0/e0 + cheat + description:Complete round 1 and go to round 4 (disable after end of round) + code:1179/28/3e+117a/10/04+117b/f0/e0 + cheat + description:Computer can't move from floor + code:6327/3d/00+6324/3d/00 + cheat + description:Normal punches do more damage + code:60e8/31/f4 + cheat + description:Uppercuts do less damage + code:6100/f4/31 + cheat + description:Back throws do less damage + code:613a/c0/31 + cheat + description:Special moves (projectiles) do more damage + code:615a/82/f4 + +cartridge sha256:6c2733c0a57bbfe5075bec42e0735c685c934780db45b33f899f62dfea549f69 + name:Mortal Kombat 3 (USA) + cheat + description:Invincibility except for throws and projectiles + code:1a25/fa/00+1a26/e7/00+1a27/c0/7d+1a29/0f/14+1a2a/c0/c8+1d57/c8/c9 + cheat + description:Hit anywhere - P1 + code:1d30/04/00 + cheat + description:Enable Smoke + code:3dda/20/18 + cheat + description:Infinite Fatality time + code:0e16/35/00 + cheat + description:Cyrax one button Fatality (press Down) + code:44d5/80/16+44d4/00/ff+44d3/02/80 + cheat + description:Cyrax one button Babality (press Punch) + code:44ca/20/22+44c9/00/ff + cheat + description:Kabal one button Fatality (press Kick) + code:462a/00/ff+462b/08/16 + cheat + description:Kabal one button Babality (press Down) + code:4641/11/80+4643/10/22+4642/00/ff + cheat + description:Kano one button Fatality (press Down) + code:435b/11/80+435d/10/16+435c/00/ff + cheat + description:Kano one button Babality (press Kick) + code:436e/80/22+436d/00/ff + cheat + description:Sektor one button Fatality (press Block) + code:4468/20/16+4467/00/ff + cheat + description:Sektor one button Babality (press Kick) + code:4451/80/22+4450/00/ff + cheat + description:Sheeva one button Fatality (press Punch) + code:45d2/00/ff+45d3/10/16 + cheat + description:Sheeva one button Babality (press Kick) + code:4601/00/ff+4602/20/22 + cheat + description:Sindel one button Fatality (press Punch) + code:4573/10/16+4572/00/ff + cheat + description:Sindel one button Babality (press Up) + code:4559/10/22+4558/00/ff + cheat + description:Smoke one button Fatality (press Down) + code:451b/00/ff+451c/10/16 + cheat + description:Smoke one button Babality (press Kick) + code:4525/00/ff+4526/20/22 + cheat + description:Sonya one button Fatality (press Down) + code:4382/11/80+4383/10/ff+4384/00/16 + cheat + description:Sonya one button Fatality (press Kick) + code:43d1/00/ff+43d2/10/22 + cheat + description:Sub-Zero one button Fatality (press Forward) + code:46a2/00/ff+46a3/20/16 + cheat + description:Sub-Zero one button Babality (press Kick) + code:46d2/00/ff+46d3/20/22 + +cartridge sha256:cd999acce90fb40bb1231fda253fa8a0db9e26517ed4723353429aedf4ddf5db + name:Mortal Kombat 4 (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility - normal attacks + code:1ce0/c8/c9 + cheat + description:Hit anywhere - normal attacks + code:1ccb/0f/00 + cheat + description:Infinite Fatality Time + code:0e43/35/00 + cheat + description:Fujin one button Fatality (press Back) + code:43e5/10/16+43e4/00/ff + cheat + description:Liu Kang one button Fatality (press Down) + code:43cb/10/16+43ca/00/ff + cheat + description:Quanchi one button Fatality (press Forward) + code:4363/80/16+4362/00/ff + cheat + description:Raiden one button Fatality (press Up) + code:43a9/40/16+43a8/00/ff + cheat + description:Reiko and Shinnok one button Fatality (press Back) + code:4331/80/16+4330/00/ff + cheat + description:Reptile one button Fatality (press Punch) + code:438e/10/16+438d/00/ff + cheat + description:Scorpion one button Fatality (press Back) + code:437b/10/16+437a/00/ff + cheat + description:Sub Zero one button Fatality (press Down) + code:43f9/10/16+43f8/00/ff + cheat + description:Tanya one button Fatality (press Down) + code:4349/40/16+4348/00/ff + +cartridge sha256:abc725f10251ae954a23c46b7e33b101bc52203fed4ffad49018858d82361964 + name:Motocross Maniacs (USA) + cheat + description:Infinite tires on pick-up + code:1dcd/ea/fa + cheat + description:Infinite jet on pick-up + code:1dc7/ea/fa + cheat + description:Infinite time + code:2d22/01/00 + cheat + description:Faster timer + code:2d22/01/02 + cheat + description:Start with 7 nitros + code:09e4/04/07 + cheat + description:Super fast bike + code:201e/ea/fa+1988/96/00 + +cartridge sha256:e493b87e119d61268af2f97c9e16e65daab3c8223c15261214656667108cc817 + name:Mouse Trap Hotel (USA) + cheat + description:Infinite lives + code:220c/ea/fa + cheat + description:Collect cookie for invincibility against balls, etc. + code:06e9/ea/fa+06da/ea/fa + cheat + description:Start with 4 lives + code:0338/02/04 + cheat + description:Start with 6 lives + code:0338/02/06 + cheat + description:Start with 8 lives + code:0338/02/08 + +cartridge sha256:6e4876c4e6516d8f3325a7341bea05a275d91de178af080e174d697a4e3d5921 + name:Mr. Chin's Gourmet Paradise (USA) + cheat + description:Can eat momos without zapping them + code:1c51/ca/fa+1d4d/ca/fa+1cf9/ca/fa+1ca5/ca/fa + +cartridge sha256:c19f7ec9ff29fa438d7ef189f81711dcaedaa55c86b192d6d9020f5f7dc22702 + name:Mr. Do! (USA) + cheat + description:Invincibility + code:1c39/30/18 + cheat + description:Infinite lives + code:3728/ea/fa + cheat + description:Only 1 Cherry needed to complete level + code:3e35/3d/af + cheat + description:Keep 1 map layout thru game (still will progress from map to map, but layout stays the same) + code:182c/fe/3e+182d/0a/09+182e/20/18 + cheat + description:Start new game from level you died on + code:356a/22/23+2478/ea/21 + cheat + description:Start with 1 life + code:15b2/03/01 + cheat + description:Start with 6 lives + code:15b2/03/06 + cheat + description:Start with 9 lives + code:15b2/03/09 + +cartridge sha256:ccf89ab34bbea5c54cf8da205bd5db9364c1e81136a8ffd009fa0f822d0373a8 + name:Mr. Driller (USA) + cheat + description:Invincibility + code:2504/28/18 + cheat + description:Infinite air + code:264e/ea/fa + cheat + description:Break brown blocks faster + code:7e03/20/3e+273e/c5/c9 + cheat + description:Dig faster (hold A) + code:2489/1b/1a + +cartridge sha256:46c4a36696d1594ffa3441db352d80c8e4927794373d9d2712dcd425664936fe + name:Mr Nutz (Europe) (En,Fr,De,Es,It,Nl) + cheat + description:Invincibility + code:4cee/cb/3e + cheat + description:Hit anywhere - Nuts + code:4e01/01/44+4e00/30/18 + cheat + description:Hit anywhere - Tail + code:4d3b/93/61+4d3a/c2/18 + cheat + description:One hit kills - Bosses + code:4963/38/18 + cheat + description:Always have Nuts + code:1ee5/06/11+1ee4/28/18 + cheat + description:Moon jump + code:1f54/20/00+1f4c/20/3e + +cartridge sha256:d3148649d39fc4f5a8ca3624e022a6c92afbb82b335a3b568b514c60894bfd6b + name:Mr Nutz (USA) (En,Fr,Es) + cheat + description:Press Select to refill your health, nutz and lives. Hold Select and press Start to skip to the next stage. + code:397a/25/00 + +cartridge sha256:21db857936d7eff3d57d576f0a01a52e012d0dcf5dc8f2a6cdb0e92a131a72b6 + name:Ms. Pac-Man (USA) + cheat + description:Invincibility + code:1906/02/00 + cheat + description:Get fruit from anywhere + code:1b21/0f/00 + +cartridge sha256:8e556307f484b3451429f695391820e896202b1046312473911abb72222acee3 + name:Ms. Pac-Man - Special Color Edition (USA) (SGB Enhanced) + cheat + description:Ms. Pac-Man - Invincibility + code:521e/30/18 + cheat + description:Ms. Pac-Man - Infinite lives + code:67d1/ea/fa + cheat + description:Ms. Pac-Man - Get fruits from anywhere + code:36cd/30/3e + cheat + description:Super Pac - Invincibility + code:69c0/ca/c3 + cheat + description:Super Pac - Infinite lives + code:6a23/ea/fa + cheat + description:Super Pac - After eating a power pellet, ghosts stay vulnerable until eaten + code:559f/0b/00 + +cartridge sha256:ba1afcea3239c1acc9af228cebe6872f5547ad04480e71652e2e56dcd4e2f08e + name:Mysterium (USA) + cheat + description:Invincibility + code:37f8/c0/c9 + cheat + description:Infinite lives + code:3398/ea/fa + cheat + description:Max energy in battle. Works for enemies, disable to defeat them. + code:3878/80/af + cheat + description:Start with 1/2 energy + code:7db3/00/3a + cheat + description:Start with 1 life + code:7d00/03/01 + cheat + description:Start with 5 lives + code:7d00/03/05 + cheat + description:Start with 9 lives + code:7d00/03/09 + +cartridge sha256:220915c980318a194273d11d7a22836734ae6365ea2d8658956c3be374fc89f0 + name:Mystical Ninja Starring Goemon (USA) (SGB Enhanced) + cheat + description:Invincibility + code:41cf/c0/c9 + cheat + description:Hit anywhere - main weapon + code:422b/7f/da+4219/c8/00 + cheat + description:Hit anywhere - ninja stars + code:4255/c8/3c+4241/c8/00 + cheat + description:Walk over water and pits + code:45e9/20/18 + +cartridge sha256:424ca9fc4d842444a01c4dbf7375558035f4cb04a7d7056a4c1a1a18b769643d + name:Nail'n Scale (USA, Europe) + cheat + description:Infinite lives + code:0b7e/c3/00 + cheat + description:Can always use power-ups (press select) + code:214c/77/00+136e/20/18 + cheat + description:Can use power-ups in boss levels + code:132f/c3/00 + cheat + description:Start with 1 life + code:04b5/04/00 + cheat + description:Start with 9 lives + code:04b5/04/08 + +cartridge sha256:24797d8f8f74f56fd619f346db92b1829b2262c979a0dca58875ae86d93abe66 + name:NBA Jam (USA, Europe) + cheat + description:Dunk and layup from anywhere + code:3642/da/c3+3623/22/00+4466/cd/fa+361b/c8/00 + +cartridge sha256:e807eef2018cb12c73a5395a47936ce0b24b1e8876c10e3dff6b2d30873e52f3 + name:Nemesis (Europe) + cheat + description:Hit anywhere - Default weapon + code:28a7/d0/00+28b8/d0/00 + cheat + description:Hit anywhere - Laser + code:295f/d0/00+2970/d0/00 + cheat + description:Hit anywhere - Missiles + code:29cb/d0/00+29dc/d0/00 + cheat + description:Get items from anywhere + code:2768/d0/00 + +cartridge sha256:58c4da647070388c9e77ddf1a0fce6777c63ff96efcd804d0917f555c3e02369 + name:Nemesis (USA) + cheat + description:Hit anywhere - normal weapon + code:28a5/d0/00+2894/d0/00 + cheat + description:Hit anywhere - Laser + code:295d/d0/00+294c/d0/00 + cheat + description:Hit anywhere - Missiles + code:29c9/d0/00+29b8/d0/00 + cheat + description:Get items from anywhere + code:2755/d0/00 + +cartridge sha256:9ee539f631e964cb0fbf3564de53f8261b55ad61ca4b022ee423bfc8367f5002 + name:Nettou Garou Densetsu 2 (Japan) (SGB Enhanced) + cheat + description:Invincibility - P1 + code:4054/28/18+40b5/28/18 + cheat + description:Hit anywhere (except projectiles) + code:40a5/05/00 + +cartridge sha256:e8b4326469231ba798657cfa8032bc6c2000c0a61e11fbad8406711642a184eb + name:NFL Football (USA) + cheat + description:No game timer + code:5934/01/00 + cheat + description:Computer can't score on its possessions + code:11ed/83/af + cheat + description:Touchdown worth 1 point + code:0f59/06/01 + cheat + description:Touchdown worth 5 points + code:0f59/06/05 + cheat + description:Touchdown worth 8 points + code:0f59/06/08 + +cartridge sha256:d50625512f089c7a8c6ce3a44de7357466d61a2ef91ae0a0b87afce2a2e9621c + name:NFL Quarterback Club (USA, Europe) + cheat + description:Final time is always under one second(speed and mobility) + code:2588/7c/af + +cartridge sha256:f513d07ace08618cb2d8a39471b617982f23e0b4f7814a62809b9969ff41635b + name:Ninja Boy (USA, Europe) + cheat + description:Hit anywhere (can get items from anywhere by punching) + code:6e27/4a/00 + +cartridge sha256:efc3b14064153fd16b690034c078188d7d1f424ad210b585aaa4e7b0f7f171ee + name:Ninja Gaiden Shadow (USA) + cheat + description:Invincibility + code:669c/c0/c9 + cheat + description:Invincibility (alt) + code:22c1/fa/c9 + cheat + description:Infinite health + code:231d/3d/00 + cheat + description:Infinite lives + code:131c/3d/00 + cheat + description:Hit anywhere + code:2730/1b/00+271d/dc/cd + cheat + description:One hit kills - bosses + code:0100/c4/11 + cheat + description:Start each new life with 5 firewheel markers + code:0b01/01/05+0b29/01/05 + cheat + description:Start at stage 1 boss (Spider) + code:0ae6/00/02 + cheat + description:Start at beginning of stage 2 + code:0ae6/00/04 + cheat + description:Start at stage 2 boss (Jack & Gregory) + code:0ae6/00/07 + cheat + description:Start at beginning of stage 3 + code:0ae6/00/08 + cheat + description:Start at stage 3 boss (Colonel Allen) + code:0ae6/00/0b + cheat + description:Start at beginning of stage 4 + code:0ae6/00/0c + cheat + description:Start at stage 4 boss (Evil Nobleman Who-kisai) + code:0ae6/00/0f + cheat + description:Start at beginning of stage 5 + code:0ae6/00/10 + +cartridge sha256:58ce4e32820b1313d86c96555abcc53220c9c221ae785338b0ebcf360eb5aaa7 + name:Ninja Taro (USA) + cheat + description:Infinite health + code:0109/ff/97 + +cartridge sha256:ea284fad45e612ab2fcd721152ab815fe8e58062155ab6e182195f637d7b6da4 + name:Nintendo World Cup (USA, Europe) + cheat + description:Computer can't score + code:7e2d/3c/00 + cheat + description:No timer + code:7d2c/01/00 + cheat + description:1:59 each half + code:7cdd/03/01 + cheat + description:4:59 each half + code:7cdd/03/04 + cheat + description:6:59 each half + code:7cdd/03/06 + cheat + description:9:59 each half + code:7cdd/03/09 + +cartridge sha256:79b35e46b8258cccf8a858b6d66caf16855399fdc54bb1c0a5342e409908363f + name:Nobunaga's Ambition (USA) + cheat + description:Train samurais once and they have 100% skill level (must be Oda Nobunaga) + code:4f9f/fe/3e + cheat + description:Start with 75 loyalty pts (must be Oda Nobunaga) + code:515a/32/4b + cheat + description:Start with 100 loyalty pts (must be Oda Nobunaga) + code:515a/32/64 + cheat + description:Start with 50 town value pts (must be Oda Nobunaga) + code:5156/19/32 + cheat + description:Start with 75 town value pts (must be Oda Nobunaga) + code:5156/19/4b + cheat + description:Start with 100 town value pts (must be Oda Nobunaga) + code:5156/19/64 + cheat + description:Start with 50 castle defense pts (must be Oda Nobunaga) + code:515c/0f/32 + cheat + description:Start with 75 castle defense pts (must be Oda Nobunaga) + code:515c/0f/4b + cheat + description:Start with 100 castle defense pts (must be Oda Nobunaga) + code:515c/0f/64 + cheat + description:Start with flood control level at 75 (must be Oda Nobunaga) + code:515b/32/4b + cheat + description:Start with flood control level at 100 (must be Oda Nobunaga) + code:515b/32/64 + cheat + description:Start with 2580 rice pts (must be Oda Nobunaga) + code:4eb6/14/0a+4eb9/00/0a + cheat + description:Start with 788 rice pts (must be Oda Nobunaga) + code:4eb6/14/03+4eb9/00/03 + cheat + description:Start with 276 rice pts (must be Oda Nobunaga) + code:4eb6/14/01+4eb9/00/01 + cheat + description:Start with 999 gold (must be Oda Nobunaga) + code:4eb6/0f/0a+4eb7/00/0a + cheat + description:Attributes for Oda Nobunaga are 100% (will show original values, answer no when asked if this is OK, then attributes will be 100%) + code:557e/fe/3e + +cartridge sha256:52ad82cb79d557d37c4fd92a9782c594f49340d493f007900b901b3aa232bb9e + name:Oddworld Adventures (USA, Europe) + cheat + description:Invincibility + code:7afa/ca/c3 + +cartridge sha256:0b6670e44cc2edc6fbf32fc78f499e774cf0802019480f2bf7bdb836ee15c433 + name:Operation C (USA) + cheat + description:Invincibility + code:5abf/cb/af+5ac0/4e/77 + cheat + description:Hit anywhere + code:3aca/1c/00+3ae4/dc/c3+3af5/fe/c6 + cheat + description:Multi-jump + code:55c0/55/00+00e6/ff/5a+00e7/ff/52+00ea/ff/55+00e9/ff/7a+00e5/ff/cd+00e8/ff/cd+00eb/ff/c9+55bf/7a/e5 + +cartridge sha256:efcce0d4264fbfff4b1b3a0843a681194b2d7a597e842d2895c2eadcfc6998c3 + name:Out of Gas (USA) + cheat + description:Infinite lives + code:05dd/ea/fa + cheat + description:Collect only 1 canister to complete each stage + code:18ec/fe/af + cheat + description:Start with 2 lives + code:01ac/03/02 + cheat + description:Start with 4 lives + code:01ac/03/04 + cheat + description:Start with 8 lives + code:01ac/03/08 + +cartridge sha256:d07986785d76db33e96ccbbe840ac962542f1c359e5b896e6478afd5cf9586b3 + name:Pac-Man (USA) + cheat + description:Invincibility + code:177d/d0/c9 + cheat + description:Get fruit from anywhere + code:1922/c0/00+1928/c0/00 + +cartridge sha256:dcbbc8f8128940a35c9b09624a9987a80cecb2edc8db8e48605de30b4887a3a9 + name:Pac-Man - Special Color Edition (USA) (SGB Enhanced) + cheat + description:Invincibility + code:5627/d0/c9 + cheat + description:Infinite lives + code:4c89/35/00 + cheat + description:Get fruits from anywhere + code:57d2/c0/00+57cc/c0/00 + +cartridge sha256:8b81c75dd11e24ba5e1d2f439a6fabf7313024829df397409a20dd37995122cb + name:Pagemaster, The (USA) (SGB Enhanced) + cheat + description:Invincibility + code:4836/3d/00 + cheat + description:Infinite Help Books + code:7f34/3d/00 + cheat + description:Don't flash at all when you start a new stage + code:4095/3c/00 + cheat + description:Flash longer when you start a new stage + code:4095/3c/ff + cheat + description:Get a Help Book for every Gold Token + code:1fd1/1e/01 + cheat + description:Get a Help Book for every 2 Gold Tokens + code:1fd1/1e/02 + cheat + description:Get a Help Book for every 10 Gold Tokens + code:1fd1/1e/0a + cheat + description:Get a Help Book for every 50 Gold Tokens + code:1fd1/1e/32 + cheat + description:Get a Help Book for every 99 Gold Tokens + code:1fd1/1e/63 + cheat + description:Start in the Adventure World with 1 life + code:01bf/05/01+01c3/af/00 + cheat + description:Start in the Fantasy World with 2 lives + code:01bf/05/02+01c3/af/00 + cheat + description:Start with 1 life + code:01bf/05/01 + cheat + description:Start with 3 lives + code:01bf/05/03 + cheat + description:Start with 7 lives + code:01bf/05/07 + cheat + description:Start with 10 lives + code:01bf/05/0a + cheat + description:Start with 15 lives + code:01bf/05/0f + cheat + description:Start with 11,111,111 points + code:01cd/af/3c + +cartridge sha256:b36e2bb2642a385ce67c059e8fb2a1cc4f63ccff56c023a3f211d81ebd4a8a77 + name:Paperboy (USA, Europe) + cheat + description:Invincibility (except for training courses) + code:618c/cd/c9+62dc/d5/c9 + +cartridge sha256:5c357df199e755eae719588a3424d49bc5212289922f11968e47954276941d6a + name:Paperboy 2 (USA, Europe) + cheat + description:Infinite papers + code:64c0/35/00 + cheat + description:Infinite lives + code:4691/35/00 + cheat + description:Go on to next day after completing Monday + code:470c/06/00 + cheat + description:Start with 15 papers - 1st life only + code:3cc6/0a/0f + cheat + description:Start with 20 papers - 1st life only + code:3cc6/0a/14 + cheat + description:Start with 10 lives - Paperboy + code:3ae6/05/0a + cheat + description:Start with 20 lives - Paperboy + code:3ae6/05/14 + +cartridge sha256:3bcf1b2fe43907d96e58b9aca893a9124bfb3c35774926279f9368a975665086 + name:Parodius (Europe) + cheat + description:Invincibility + code:7a20/c0/c9 + cheat + description:Infinite lives + code:33c6/ea/fa + cheat + description:Infinite super shields once collected + code:7b5d/ea/fa + cheat + description:Start with super shields and triple firing + code:2bd3/00/ff+2bd6/00/ff + cheat + description:Start with 5 lives + code:2a93/03/05 + cheat + description:Start with 8 lives + code:2a93/03/08 + cheat + description:Start with 11 lives + code:2a93/03/0b + +cartridge sha256:b5c0c1e3bc4ee2f1ca3cba1bed9483707f4ab72b87e517ca80f1bbb612fd86cd + name:Penguin Land (Japan) + cheat + description:Infinite time + code:200a/ea/fa + +cartridge sha256:d84a2382b358d83a0891d40b2de65494f060d8be1a048d5aa8721282218b04b6 + name:Pinball - Revenge of the 'Gator (USA, Europe) + cheat + description:Infinite supply of balls + code:07e1/35/00 + cheat + description:Disable left flipper + code:2f24/cd/21 + cheat + description:Disable right flipper + code:2f2a/e6/c9 + cheat + description:Start with 1 ball + code:06ed/03/01 + cheat + description:Start with 9 balls + code:06ed/03/09 + +cartridge sha256:ec2420a8d1b129379435e9a217ef8e6be7fcece10a17d72affa8b1b2449888cb + name:Pinball Dreams (USA, Europe) + cheat + description:Infinite balls + code:0818/34/00 + cheat + description:Start with 5x bonus, lose it if you collect any other bonus + code:0bed/ea/3e+0bee/6b/04+0bef/d1/00 + cheat + description:No tilt - shake the table as much as you want + code:34ba/28/00+34bb/16/00 + cheat + description:Collect 2x bonus and get 6x bonus + code:24c7/02/05 + cheat + description:Start with 1 ball + code:081b/03/01 + cheat + description:Start with 4 balls + code:081b/03/04 + cheat + description:Start with 7 balls + code:081b/03/07 + cheat + description:Start with 9 balls + code:081b/03/09 + +cartridge sha256:fddf9b0ebdc5294554339b59dd9b949286e5281bf81f05bc4c1759844effc0a9 + name:Pinocchio (USA) + cheat + description:Infinite health + code:0b59/35/36 + +cartridge sha256:11347375400080c6e2bfac1ae908d571b91bd4a5406b823c912eb9df1bd3d014 + name:Pitfall - Beyond the Jungle (USA, Europe) + cheat + description:Invincibility + code:719d/c0/c9 + cheat + description:Hit anywhere + code:6733/c2/fa+67ab/c2/fa+6764/c2/fa+67ed/c2/fa + cheat + description:Walk on air + code:1f6e/3e/c9 + +cartridge sha256:634c932dafbc56bdf9b88c02cd69540b327523c2b1d21edcb672884c9a06ef68 + name:Planet of the Apes (USA) (En,Fr,De,Es,It,Nl) + cheat + description:Infinite health + code:6563/c0/c9 + cheat + description:Start with all weapons + code:5e4b/1c/00 + +cartridge sha256:027a8bb2843c3f96373ca60830f58fbc2fcf15d51756649e002b87a97f438a41 + name:Play Action Football (USA) + cheat + description:Always kick at full power + code:35df/20/3e+35e0/e8/40+35e5/3d/00 + cheat + description:Infinite time + code:2a6b/3d/00 + cheat + description:Infinite downs + code:632a/c0/01 + cheat + description:Only get 2 downs + code:1b84/04/02 + cheat + description:Only need 5 yards for 1st down + code:6341/0a/05 + +cartridge sha256:d6702e353dcbe2d2c69183046c878ef13a0dae4006e8cdff521cca83dd1582fe + name:Pokemon - Crystal Version (USA, Europe) + cheat + description:One hit kills + code:5d49/30/3e + cheat + description:Opponent doesn't attack + code:46de/cd/c9 + cheat + description:No random battles + code:60ea/30/18 + cheat + description:Skip trainer battles + code:682c/1b/00 + +cartridge sha256:fdcc3c8c43813cf8731fc037d2a6d191bac75439c34b24ba1c27526e6acdc8a2 + name:Pokemon - Crystal Version (USA, Europe) (Rev A) + cheat + description:One hit kills + code:5d49/30/3e + cheat + description:Opponent doesn't attack + code:46de/cd/c9 + cheat + description:No random battles + code:60ea/30/18 + cheat + description:Skip trainer battles + code:682c/1b/00 + +cartridge sha256:fb0016d27b1e5374e1ec9fcad60e6628d8646103b5313ca683417f52b97e7e4e + name:Pokemon - Gold Version (USA, Europe) (SGB Enhanced) + cheat + description:One hit kills + code:5e86/0e/00 + cheat + description:Opponent doesn't attack + code:4686/cd/c9 + cheat + description:No random battles + code:6646/30/18 + cheat + description:Skip trainer battles + code:676b/1b/00 + +cartridge sha256:72b190859a59623cbef6c49d601f8de52c1d2331b4f08a8d2acc17274fc19a8c + name:Pokemon - Silver Version (USA, Europe) (SGB Enhanced) + cheat + description:One hit kills + code:5e85/30/3e + cheat + description:Opponent doesn't attack + code:4686/cd/c9 + cheat + description:No random battles + code:6646/30/18 + cheat + description:Skip trainer battles (the only way to fight them is to talk to them) + code:676b/1b/00 + +cartridge sha256:a54515bb6b3e364964d3c0226f5a6b0c8c0f7318c9296ef2e321df0bbb8541ce + name:Pokemon Trading Card Game (USA) (SGB Enhanced) + cheat + description:Always your turn + code:67be/e0/c9 + cheat + description:Attack without energy cards + code:474f/30/18 + +cartridge sha256:952660d14941a2ab77810c3fe36658c8e8dd490e2c4e744fb3d41ce2eb31e703 + name:Pocket Bomberman (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:458a/01/00+2c54/05/00 + cheat + description:Bomb hits anywhere when placed on the ground + code:40c2/07/00 + +cartridge sha256:2f74f1a512d862372e0bccf09260ffb91a676cdb2391fd91f2f6bc8487d75974 + name:Pong - The Next Level (USA, Europe) + cheat + description:Right side player cannot hit ball + code:48fc/20/28+48fd/20/df+48fb/02/03 + +cartridge sha256:cfff247d91c3c448d3588a5c5fc3ee4c19b0031e45679022bdbdadae6d545802 + name:Pop'n TwinBee (Europe) + cheat + description:Invincibility + code:3a52/30/18+3e8d/d2/c3 + cheat + description:Hit anywhere - normal enemies + code:32dd/30/3e+32ce/30/3e + cheat + description:Hit anywhere - bosses + code:60d0/30/3e+60c3/30/3e + +cartridge sha256:4a1c9750f77deffb8e003b8938d2ffe5f520fb43143aedd309909b8a9907856d + name:Popeye 2 (USA) + cheat + description:Invincibility after first hit until end of level + code:4e83/3d/00 + cheat + description:Infinite Pows + code:63c5/ea/fa + cheat + description:Infinite lives + code:03af/ea/fa + cheat + description:Infinite time - disable to advance in some areas + code:4202/12/2a + cheat + description:Infinite continues + code:5a1a/3d/00 + cheat + description:Super code - more lives and power + code:4b68/03/88 + cheat + description:Start with 1 Pow after 1st life + code:03a7/03/01 + cheat + description:Start with 7 Pows after 1st life + code:03a7/03/07 + cheat + description:Start with no continues + code:53f7/05/00 + cheat + description:Start with 2 continues + code:53f7/05/02 + cheat + description:Start with 9 continues + code:53f7/05/09 + +cartridge sha256:584f8fcfde1ae9f262747be425df0ed4d1a7421d24b8d62af05b075875b1cb35 + name:Project S-11 (USA) + cheat + description:Invincibility + code:46bb/c2/c3 + cheat + description:Hit anywhere - normal enemies + code:45b0/30/3e+45a4/38/3e+45b5/38/3e+459f/30/3e + cheat + description:Hit anywhere - bosses + code:465d/38/3e+466e/38/3e+4669/30/3e+4658/30/3e + cheat + description:One hit kills - normal enemies + code:45e2/38/18 + cheat + description:One hit kills - bosses + code:4687/30/3e + +cartridge sha256:e1b69e85caebf764bfa6cece5c1d33b67b370cf055480f309644b937e4a7ebdb + name:Prophecy - The Viking Child (USA) + cheat + description:Infinite lives + code:3e04/ea/fa + cheat + description:Infinite energy + code:3df5/ea/fa + cheat + description:Each coin gives lots of money + code:2d9b/7c/00 + cheat + description:Start with 25 energy - 1st life + code:04a5/63/19 + cheat + description:Start with 50 energy - 1st life + code:04a5/63/32 + cheat + description:Start with 4 lives + code:04a0/01/03 + cheat + description:Start with 7 lives + code:04a0/01/06 + cheat + description:Start with 10 lives + code:04a0/01/09 + +cartridge sha256:459ccbbab8580bd93a2a0d5d66ca4ae42c8f664f3106687ffc31c7aef7dd677b + name:Puzzle Boy II (Japan) + cheat + description:Walk anywhere + code:0f67/20/3e + +cartridge sha256:cfc6560d1385808cfd5c242a9f3aa38892c6ab2cb242d0767115144c633708b6 + name:Puzzled (USA) + cheat + description:Clear level automatically + code:424a/ca/c3+4296/c2/fa + +cartridge sha256:567aef8ea27486a4fa38ef4a4ae6ebae2a9138dc8a6a675d155895936e1318d8 + name:Pyramids of Ra (USA) + cheat + description:Energy bar doesn't go down when you make a move + code:458e/ea/fa + cheat + description:Only 1 pt. of energy per move on first attempt at each level (instead of 3) + code:7ac4/a1/a2+7ac6/7c/3c+7ac3/ea/fa + cheat + description:Start on level 100 + code:b1ab/01/64+01ac/00/00 + cheat + description:Start on level 300 + code:01ab/01/2c+01ac/00/01 + cheat + description:Start on level 500 + code:01ab/01/f4+01ac/00/01 + +cartridge sha256:4e624ad741077f574c1d0b57cbc45171ed4ca9f23fa89dfd8f282897aa53ab9a + name:Q Billion (USA) + cheat + description:Pressing Select in Game B once gives you 246 seconds + code:1b9f/0a/00 + cheat + description:Infinite timer + code:1755/3d/00 + cheat + description:Level select - Game A + code:0b61/38/3e+0b62/15/0d+0b63/79/00 + +cartridge sha256:878a21de57986965bf2c68774119180d21dbd5111eef4a9a70ffd0f9f6bdbf7b + name:Q-bert (USA) + cheat + description:Invincibility + code:3e61/da/fa + cheat + description:Step on one cube to clear level + code:482c/ca/c3 + +cartridge sha256:ed110933b5a41ed89d2b980e6e984733833fa6b2c15e5235eff1f5df54175df4 + name:QIX (World) + cheat + description:Invincibility + code:3edb/b7/af + cheat + description:Create any shape to clear level + code:409a/04/00 + +cartridge sha256:0ccfd1166f7e6158c8d4189e5dc9a11724fce01f375f2a78f54ed4a41d7beb0c + name:QIX Adventure (Europe) + cheat + description:Invincibility + code:49bd/ea/fa+738d/c2/c3 + cheat + description:Create any shape to clear level + code:5533/20/3e+5538/38/3e + +cartridge sha256:7d8e122f6f70f6ca49521f2c24fd987e91f621977da2912702285735438be901 + name:Quarth (USA, Europe) + cheat + description:Select up to level 5 + code:549e/03/05 + cheat + description:Super turbo ship + code:2b31/79/00 + cheat + description:Blocks don't drop (push Up to bring blocks down) + code:1632/90/af + cheat + description:Blocks drop faster + code:162b/fa/3e+162c/70/50+162d/c4/00 + cheat + description:Blocks drop super fast + code:162b/fa/3e+162c/70/80+162d/c4/00 + +cartridge sha256:3f6cdd669637c8a3aaaf02c9ae833e820a3e7f9e882e5cbb246bda5aa616ff87 + name:Quest - Fantasy Challenge (USA) (SGB Enhanced) + cheat + description:Invincibility + code:627d/d2/c3+5e92/3e/c9 + cheat + description:Hit anywhere + code:53ba/28/18+53a7/30/18+539a/30/18 + +cartridge sha256:6242b49e85e9652c278ceae22fd5c888495222b4ba78c0a82bb925f2acf66ac1 + name:Quest RPG - Brian's Journey (USA) + cheat + description:Invincibility + code:46f6/cd/fa+4616/c0/c9 + cheat + description:One hit kills + code:518f/da/c3+519c/da/c3 + +cartridge sha256:b3f2838cb64dfa12f93ab4767c3b0786cba0993015fefe1f592146f9d8f47d40 + name:Radar Mission (USA, Europe) + cheat + description:Game B - Infinite money + code:2333/35/00 + cheat + description:Game B - Move in 1 direction only + code:53cc/35/00 + cheat + description:Game B - Destroyed fleet disappears from radar screen but game doesn't end + code:5cc6/35/00 + cheat + description:Game B - Start with 1 money bag + code:21e0/03/01 + cheat + description:Game B - Start with 1 extra money bag + code:21e0/03/04 + +cartridge sha256:9e30f9c36cfa1bc1fd6f111fa38a43f3c5907c26d81a65309279eec54a3d05d6 + name:Raging Fighter (USA, Europe) + cheat + description:Infinite energy + code:44e0/c1/00+171a/77/00 + cheat + description:Infinite time + code:491f/12/00 + cheat + description:4th difficulty level - go to options, set difficulty, press Left 3 times (won't show anything), then exit + code:51f2/28/3e+51f3/02/04+51f4/34/77 + cheat + description:Start on level 4 - 1P tournament only + code:2e5b/ea/3e+2e5c/68/03+2e5d/c2/00 + cheat + description:Start on final level - 1P tournament only + code:2e5b/ea/3e+2e5c/68/07+2e5d/c2/00 + cheat + description:Start each fight with 10 seconds + code:5a9a/99/10 + cheat + description:Start with 1/2 time + code:5a9a/99/50 + cheat + description:Start with 3/4 time + code:5a9a/99/75 + +cartridge sha256:1a8bfa0e55e89241a9843e440e8e2a93dae906c654378e8b27df27e360de826c + name:Rampage - World Tour (USA, Europe) + cheat + description:Invincibility + code:7a06/01/00 + cheat + description:Knock down buildings with one punch + code:5abc/30/3e+5aba/28/3e + +cartridge sha256:ff3915dab21e648cc8f30b28702db6d6784c8e01792d9a5c17a50a9f5994e48c + name:Rampage 2 - Universal Tour (USA, Europe) + cheat + description:Invincibility + code:478a/38/18+7c7d/01/00+7c28/01/00 + cheat + description:Knock down buildings with one punch + code:6127/30/3e + +cartridge sha256:ad5d681fa599b6cf9dae135c304317ac41f33bee0a5a583d7fa2a178ca66506f + name:Rampart (USA, Europe) + cheat + description:Infinite time - levels don't end, enable at game play screen, disable after battle mode, enable to rebuild castle, disable to go on + code:039c/35/00 + cheat + description:Infinite lives + code:470e/c4/01 + cheat + description:Infinite cannons + code:4eb3/c4/01 + cheat + description:Have 6 seconds to rebuild castle walls + code:4029/fa/3e+402a/e7/09+402b/c5/00 + cheat + description:Have 66 seconds to rebuild castle walls + code:4029/fa/3e+402a/e7/44+402b/c5/00 + cheat + description:Have 118 seconds to rebuild castle walls + code:4029/fa/3e+402a/e7/77+402b/c5/00 + cheat + description:Levels last 10 seconds + code:4040/fa/3e+4041/16/1a+4042/c6/00 + cheat + description:Levels last 25 seconds + code:4040/fa/3e+4041/16/2a+4042/c6/00 + cheat + description:Levels last 50 seconds + code:4040/fa/3e+4041/16/43+4042/c6/00 + +cartridge sha256:9ca5b01d04985e0c83c68d5b434f322d2e7ee494fffed08cd747e8ade1569b0a + name:Rayman (USA) (En,Fr,De,Es,It,Nl) + cheat + description:Get items from anywhere + code:4aad/07/00+6fa0/20/18 + +cartridge sha256:46cfbba977f7d4cb8df51d5cb51f00dc0a4d9c129868a1ed88f2b0fa97454905 + name:Ren & Stimpy Show, The - Space Cadet Adventures (USA) + cheat + description:Infinite lives + code:1754/e0/f0 + cheat + description:Infinite energy except when you fall into pits + code:1733/e0/f0 + cheat + description:Start with 2 life + code:5d2e/02/01 + cheat + description:Start with 6 lives + code:5d2e/02/05 + cheat + description:Start with 9 lives + code:5d2e/02/08 + cheat + description:Start with 5 energy - 1st life only + code:5d32/03/04 + cheat + description:Start with 6 energy - 1st life only + code:5d32/03/05 + cheat + description:Start with 7 energy - 1st life only + code:5d32/03/06 + cheat + description:Start with 4 energy - after 1st life + code:175c/03/04 + cheat + description:Start with 5 energy - after 1st life + code:175c/03/05 + cheat + description:Start with 6 energy - after 1st life + code:175c/03/06 + +cartridge sha256:9a97678cbd8da02c8763e977674e17f460c06ea8b73bad35c52fe6817f506d44 + name:Resident Evil Gaiden (USA) + cheat + description:Invincibility + code:4b18/04/00+4b12/26/00 + cheat + description:Infinite ammo on pick-up + code:4426/c3/00 + cheat + description:Infinite Herbs + code:74e8/35/00 + cheat + description:All Herbs cure poison + code:7490/c8/00 + cheat + description:Rapid fire + code:456b/02/00+41d0/cc/cb + +cartridge sha256:ebe140f2c6dcd4e99192d5676b4cfe443a071daa9ff243a23a26ae98a53fead8 + name:Return of the Ninja (USA) + cheat + description:Invincibility + code:284d/f5/c9 + cheat + description:Hit anywhere + code:48a1/d2/fa+4891/d2/fa + cheat + description:Hit anywhere on bosses + code:1c29/30/3e+1c19/30/3e + cheat + description:Cannot be detected by enemies + code:47ed/30/18 + cheat + description:Can always use special attack + code:1d4f/3c/04 + +cartridge sha256:5d7efe8f937eda0f42836482b728db9be2a5caf95d95b7985387e95b5448e3d3 + name:Rhino Rumble (USA, Europe) + cheat + description:Infinite lives + code:4942/1d/00 + +cartridge sha256:c6d02170734d6b533d4599b6fca10ac83141e5ffe4902c4a98001aa61c00dffc + name:RoboCop 2 (USA, Europe) + cheat + description:Infinite health on scrolling levels + code:159c/c8/c9 + cheat + description:Infinite health on ED-209 (tm) levels + code:54d9/77/af + cheat + description:Infinite lives + code:20c2/35/b6 + cheat + description:Infinite time - except stages 3 and 8 + code:1548/c8/c9 + cheat + description:Start with 2 lives + code:1ae8/04/02 + cheat + description:Start with 5 lives + code:1ae8/04/05 + +cartridge sha256:9fb0e41e4c8afe737a688dbdc1b6f7019874f7e9ef4c0a27cba2b8be329ce45b + name:RoboCop vs. The Terminator (USA) + cheat + description:Infinite energy + code:4e67/ea/fa + cheat + description:Start on level 2 + code:2d7d/00/01 + cheat + description:Start on level 3 + code:2d7d/00/02 + cheat + description:Start on level 4 + code:2d7d/00/03 + cheat + description:Start on level 5 + code:2d7d/00/04 + cheat + description:Start on level 6 + code:2d7d/00/05 + cheat + description:Start with 01010101 points + code:2d5d/2c/01 + cheat + description:Start with very little energy - 1st life + code:2d58/07/01 + cheat + description:Start with more energy - 1st life + code:2d58/07/15 + cheat + description:Start with very little energy - 2nd life + code:4ee0/07/01 + cheat + description:Start with more energy - 2nd life + code:4ee0/07/15 + +cartridge sha256:211362382e3637edece46d5ccd470061466a37cd7794777f140ec3f228166e5a + name:Robopon - Sun Version (USA) (SGB Enhanced) + cheat + description:Walk anywhere + code:61b0/ff/00+546e/20/18 + +cartridge sha256:92e8d1acd4d2d3297a961409d4bb0ed49c784be4a6e91cfceabd05ab11894f3d + name:Roger Clemens' MVP Baseball (USA) + cheat + description:Balls are counted as strikes + code:4fe2/90/00+5113/d0/00+5110/d8/00 + cheat + description:No walks + code:5468/c5/01 + cheat + description:No strikeouts + code:5487/c5/01 + cheat + description:Infinite outs (except strikeouts, base runners will still be taken out) + code:36b4/c5/01 + cheat + description:No outs are called, except strikeouts + code:36af/03/01+3b87/03/01 + cheat + description:No scoring - disable to score runs + code:4946/77/00+4961/77/00 + +cartridge sha256:e3d0b1ddea8b4ada14c3bb5e990171e6b2e26935d9dbc15e5de90fb5f7f9595d + name:Rolan's Curse (USA) + cheat + description:Infinite energy + code:3c96/e0/f0 + cheat + description:Start with 2 energy pts + code:15f5/04/02 + cheat + description:Start with 6 energy pts + code:15f5/04/06 + +cartridge sha256:cf3f8f41498cdd32f5b3ee0cdccde1901b073798f3edac1a7d9ccc0141cb16be + name:Rolan's Curse II (USA) + cheat + description:Infinite HP + code:f000/79/00 + cheat + description:Infinite magic + code:0e01/e0/f0 + cheat + description:Takes 9 MP to use Electric ball + code:5459/01/09 + cheat + description:Takes 2 MP to use Electric ball + code:5459/01/02 + cheat + description:Starts you from a new place with power-ups + code:1372/af/3c + +cartridge sha256:8cebc4b128b79dd1b53a5b5a99450bb2783b86840ec61b22e70245dd6df8c39b + name:R-Type (USA, Europe) + cheat + description:Invincibility + code:1e07/fa/c9 + cheat + description:Hit anywhere + code:2b40/6b/01+2ada/30/18+2adb/2b/29+2b49/79/af + cheat + description:One hit kills + code:079f/38/18+48c1/c2/fa + +cartridge sha256:3d20b3fef48771f0d3ea2cdcf80812b02122a0a04dee0e8c8ae8e3e027f36741 + name:R-Type DX (USA, Europe) + cheat + description:De Souza mode accessible (press left on the game selection screen) + code:413c/04/05 + +cartridge sha256:2b059983d79efc5a4f77b41a4efbad68c65ae259715dc008f20a3c11226a943b + name:R-Type II (Europe) + cheat + description:Invincibility + code:1f3f/fa/c9 + +cartridge sha256:e0a07f84198e062c9ba8d617ef15679ba044f96510e5c62309ea1f743499a2c9 + name:Samurai Shodown (USA, Europe) (SGB Enhanced) + cheat + description:Computer takes all damage, even when you get hit + code:2b60/e6/3e + cheat + description:Infinite time + code:2246/ea/fa + cheat + description:Hit anywhere - both players + code:16c3/20/18 + cheat + description:Blocking disabled - both players + code:4045/c2/fa + cheat + description:Start timer at 30 seconds + code:1f80/4f/3e+1f81/79/1e + cheat + description:Start timer at 46 seconds + code:1f80/4f/3e+1f81/79/2e + cheat + description:Start timer at 62 seconds + code:1f80/4f/3e+1f81/79/3e + cheat + description:Start timer at 78 seconds + code:1f80/4f/3e+1f81/79/4e + cheat + description:Start timer at 94 seconds + code:1f80/4f/3e+1f81/79/5e + cheat + description:Start timer at 110 seconds + code:1f80/4f/3e+1f81/79/6e + cheat + description:Start timer at 126 seconds + code:1f80/4f/3e+1f81/79/7e + cheat + description:Start timer at 142 seconds + code:1f80/4f/3e+1f81/79/8e + cheat + description:Start timer at 158 seconds + code:1f80/4f/3e+1f81/79/9e + cheat + description:Both players start with 1/3 energy + code:1f86/37/11 + cheat + description:Both players start with 2/3 energy + code:1f86/37/21 + cheat + description:Both players start with more energy + code:1f86/37/ff + cheat + description:Always fight Genan Shiranui + code:689a/30/3e+689b/0d/00+689c/f0/e0 + cheat + description:Always fight Galford + code:689a/30/3e+689b/0d/01+689c/f0/e0 + cheat + description:Always fight Haohmaru + code:689a/30/3e+689b/0d/02+689c/f0/e0 + cheat + description:Always fight Ukyo Tachibana + code:689a/30/3e+689b/0d/03+689c/f0/e0 + cheat + description:Always fight Charlotte + code:689a/30/3e+689b/0d/04+689c/f0/e0 + cheat + description:Always fight Tam Tam + code:689a/30/3e+689b/0d/05+689c/f0/e0 + cheat + description:Always fight Earthquake + code:689a/30/3e+689b/0d/06+689c/f0/e0 + cheat + description:Always fight Nakoruru + code:689a/30/3e+689b/0d/07+689c/f0/e0 + cheat + description:Always fight Wan Fan + code:689a/30/3e+689b/0d/08+689c/f0/e0 + cheat + description:Always fight Jubei Yagyo + code:689a/30/3e+689b/0d/09+689c/f0/e0 + cheat + description:Always fight Hanzo Hattori + code:689a/30/3e+689b/0d/0a+689c/f0/e0 + cheat + description:Always fight Kyoshiro Senryo + code:689a/30/3e+689b/0d/0b+689c/f0/e0 + +cartridge sha256:384885e8eb8c7396a8c7df08729f61022cc740b3234a8d35bebe17cc7aef3c71 + name:SeaQuest DSV (USA, Europe) (SGB Enhanced) + cheat + description:Invincibility + code:4e04/3d/00 + cheat + description:Infinite lives + code:71eb/01/00 + cheat + description:Lose most energy after first hit + code:4e04/3d/af + cheat + description:Start with super score + code:2b37/00/03 + cheat + description:Start with very little hull energy + code:31fc/0a/01 + cheat + description:Start with 1/2 hull energy + code:31fc/0a/05 + cheat + description:Start with 3/4 hull energy + code:31fc/0a/07 + cheat + description:Start with 2 lives + code:2b2d/04/01 + cheat + description:Start with 5 lives + code:2b2d/04/04 + cheat + description:Start with 10 lives + code:2b2d/04/09 + cheat + description:Start with 15 lives + code:2b2d/04/0e + +cartridge sha256:52924262f2c60fc1c387a92bfdb43835c84968daf4ba465e7cc6627774e7b8a5 + name:Serpent (USA) + cheat + description:Infinite missiles on pick-up + code:1fb0/c0/00 + cheat + description:Win immediately + code:03b9/c2/c3+050d/d2/fa + cheat + description:Start with 5 missiles + code:27c9/00/05 + cheat + description:Start with 8 missiles + code:27c9/00/08 + cheat + description:Start with 15 missiles + code:27c9/00/0f + cheat + description:Start with smaller tail + code:27c6/28/15 + cheat + description:Start with longer tail + code:27c6/28/40 + +cartridge sha256:c8979ad731912452dabedff2c9fb23b19aa68cfdedbf5e99fec902547ce1bb76 + name:Simpsons, The - Bart & the Beanstalk (USA, Europe) + cheat + description:Invincibility + code:372c/c0/c9 + cheat + description:Infinite energy + code:3742/ea/fa + cheat + description:Infinite lives + code:1283/01/00 + cheat + description:Infinite fire crackers + code:7a60/3d/00 + cheat + description:Start with 1 life + code:01ad/03/00 + cheat + description:Start with 5 lives + code:01ad/03/04 + cheat + description:Start with 10 lives + code:01ad/03/09 + cheat + description:Start with 1/4 energy + code:1637/5f/10 + cheat + description:Start with 1/2 energy + code:1637/5f/30 + cheat + description:Start with 3/4 energy + code:1637/5f/45 + +cartridge sha256:6ecab90879e06226ed6b2f6bdeb2d3ffa0736ee77c2132891083671465dd6934 + name:Simpsons, The - Bart vs. the Juggernauts (USA, Europe) + cheat + description:Infinite time on all games + code:08a6/77/00 + cheat + description:Always qualify with enough money + code:66eb/2a/0a + cheat + description:See end sequence + code:635b/07/04 + cheat + description:Start on week 2 + code:635b/07/02 + cheat + description:Start on week 3 + code:635b/07/03 + cheat + description:Capt. Lance Murdock's Skateboard Bash & Crash - Infinite lives + code:6f82/ea/fa + cheat + description:Capt. Lance Murdock's Skateboard Bash & Crash - Start with 1 life + code:6ea8/07/01 + cheat + description:Capt. Lance Murdock's Skateboard Bash & Crash - Start with 2 lives + code:6ea8/07/02 + cheat + description:Springfield Nuclear Power Plant Bop 'till You Drop - No hits against you + code:78f3/ea/fa + cheat + description:Herman's Military Minefield Mayhem - Infinite hits + code:7bf2/ea/fa + cheat + description:Herman's Military Minefield Mayhem - Infinite runs + code:7284/ea/fa + cheat + description:Kwik-E-Mart Doggie Dodge - Infinite chances + code:6227/ea/fa + cheat + description:Kwik-E-Mart Doggie Dodge - Start with 3 lives + code:5d89/1f/03 + cheat + description:Kwik-E-Mart Doggie Dodge - Start with 6 lives + code:5d89/1f/06 + cheat + description:Kwik-E-Mart Doggie Dodge - Start with 9 lives + code:5d89/1f/09 + +cartridge sha256:534478ebd2558ab6a871540062fadbb0ea27808d7f6860942b2e6805fd15e87b + name:Simpsons Itchy & Scratchy, The - Miniature Golf Madness (USA, Europe) + cheat + description:Invincibility + code:5a07/c8/00 + cheat + description:Invincible after getting hit + code:5a24/35/00 + cheat + description:Infinite lives + code:2a24/01/00 + cheat + description:Always get a hole in one + code:690e/01/00 + cheat + description:Start with 1 life + code:607d/09/00 + cheat + description:Start with 5 lives + code:607d/09/04 + cheat + description:Start with 15 lives + code:607d/09/0e + +cartridge sha256:28b2b87a43285afb3e55a96136f71c6a858b0bbe25caaa59f4ef3a6e6d5f64e8 + name:Smurfs, The (Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:56b1/20/18 + cheat + description:Multi-jump (don't jump off screen) + code:6067/20/18+6068/26/0a+605e/8a/8b + +cartridge sha256:5d9c9ce079923b92034c7c2d172b5abfad9ec37332102cb247ea849393db9a99 + name:Smurfs, The (USA, Europe) (En,Fr,De) (Rev A) (SGB Enhanced) + cheat + description:Invincibility + code:57c3/20/18 + cheat + description:Multi-jump (don't jump off screen) + code:6146/26/0a+6145/20/18+613c/8a/8b + +cartridge sha256:a1e0c6d8385ab8c39569217f28cb335ccac8c85d31e01c9a2343c79494164478 + name:Snoopy - Magic Show (USA, Europe) + cheat + description:Invincibility + code:43d6/20/18 + cheat + description:Start on level 2 + code:273f/ea/3e+2740/7b/02+2741/c3/00 + cheat + description:Start on level 5 + code:273f/ea/3e+2740/7b/05+2741/c3/00 + cheat + description:Start on level 9 + code:273f/ea/3e+2740/7b/09+2741/c3/00 + cheat + description:Start with 22 seconds + code:5849/40/10 + cheat + description:Start with 63 seconds + code:5849/40/3f + cheat + description:Start with 100 seconds + code:5849/40/64 + +cartridge sha256:fece5b09e599c1f8116602fcabd558cc8dbbfe1c6c253853c5e871b0d732c11c + name:SolarStriker (World) + cheat + description:Infinite lives + code:0cd6/35/00 + cheat + description:When you pick up a power-up, go straight to max power + code:1f65/fe/3e+1f66/05/04 + cheat + description:Bullets are mega-powerful, almost invisible, when you pick up a power-up + code:1f65/fe/3e+1f66/05/0b + cheat + description:No loss of power-ups on dying + code:1645/ca/00 + cheat + description:Stay on same level + code:0dee/34/00 + cheat + description:Start with 2 lives + code:05d0/02/01 + cheat + description:Start with 6 lives + code:05d0/02/05 + cheat + description:Start with 10 lives + code:05d0/02/09 + cheat + description:Start on stage 2 + code:050a/01/02 + cheat + description:Start on stage 3 + code:050a/01/03 + cheat + description:Start on stage 4 + code:050a/01/04 + cheat + description:Start on stage 5 + code:050a/01/05 + cheat + description:Start on stage 6 + code:050a/01/06 + +cartridge sha256:b876faa05d3fa8c9e6d2812a7e17cbc8be83463e1d1536f13e9719ba0e7108b5 + name:Solomon's Club (USA) + cheat + description:Invincibility + code:072a/20/18 + cheat + description:Hit anywhere - fireball + code:0663/38/14+0662/30/18 + cheat + description:Always have fireball + code:422a/de/08+4229/20/18 + cheat + description:Items are free + code:1f70/fa/09+1f6f/da/18 + +cartridge sha256:3d6fd2f730d66266215b06c7d40ebd060aca9a48f8117d25a4411fa5d644ff57 + name:Solitaire FunPak (USA, Europe) + cheat + description:Klondike - Move cards to any stack + code:4cd2/20/18+4bb3/20/18+4bb4/09/34+4cf2/cd/fa+4cf1/1d/00 + cheat + description:Freecell - Move cards to any stack + code:4b35/70/6d+4b34/ca/c3+49fe/25/00 + +cartridge sha256:b9b4ee32ab8b74ffd90d7606715893f4b6bd2a3b97c14b2ac2fc6683cfbe1986 + name:Soukoban (Japan) + cheat + description:Walk through walls + code:071a/ca/fa + +cartridge sha256:ed0ab3bfcbc6ac96cc1c8eebb9cdabf0c52e1a562d115eefe47b2078746bc691 + name:Soukoban 2 (Japan) + cheat + description:Walk through walls + code:0827/c2/fa+0803/01/ff + +cartridge sha256:c84accad1cc05913a034ff54bc936a908438c84b0dddce5138d79c11006c9cf2 + name:Space Marauder (USA) + cheat + description:Infinite lives + code:17be/01/00 + cheat + description:Start with 99 lives + code:0ec2/02/99 + +cartridge sha256:6ffe31b21d429801b8e5a460e58bd857e41aef888d19297fc558cf25def0d10d + name:Spanky's Quest (USA) + cheat + description:Infinite lives + code:1060/3d/00 + cheat + description:Mega ball power-ups - hit it with your head once for full power + code:241e/00/07 + cheat + description:Start with 1 life + code:2b96/02/00 + cheat + description:Start with 6 lives + code:2b96/02/05 + cheat + description:Start with 9 lives + code:2b96/02/08 + cheat + description:Start on tower 1, stage 5 (disable after starting stage) + code:2d68/cb/3e+2d69/37/04 + cheat + description:Start on tower 1, stage 10 (disable after starting stage) + code:2d68/cb/3e+2d69/37/09 + cheat + description:Start on tower 1, last stage (disable after starting stage) + code:2d68/cb/3e+2d69/37/0f + +cartridge sha256:7b96653450c5fb4522a77d46ecfa50d479b3dac28bafb1a13e416e43c42caae3 + name:Speedball 2 - Brutal Deluxe (USA, Europe) + cheat + description:Get lots of money + code:4dcd/04/99 + cheat + description:Infinite money + code:3ae4/ea/fa + cheat + description:No timer + code:6ed9/35/00 + cheat + description:Opponents can't score any points except from bounced stones + code:0c30/78/00 + +cartridge sha256:5bfae99484fe74c42b55a0dd8835861cfeb7d05590882aab8f4253e4e7138b92 + name:Speedy Gonzales (USA, Europe) + cheat + description:Infinite lives + code:4ca9/ea/fa + cheat + description:Infinite time + code:4940/ea/fa + cheat + description:Start 1st game with 1 life + code:7a8a/03/00 + cheat + description:Start 1st game with 7 lives + code:7a8a/03/06 + cheat + description:Start 1st game with 10 lives + code:7a8a/03/09 + cheat + description:Start in Forest Zone after entering password 500999 + code:645a/06/02+645b/90/00 + cheat + description:Start in Desert Zone after entering password 500999 + code:645a/06/03+645b/90/00 + cheat + description:Start in County Zone after entering password 500999 + code:645a/06/04+645b/90/00 + cheat + description:Start in Cheese Island Zone after entering password 500999 + code:645a/06/05+645b/90/00 + cheat + description:Start continued games with 1 life + code:4d87/03/00 + cheat + description:Start continued games with 7 lives + code:4d87/03/06 + cheat + description:Start continued games with 10 lives + code:4d87/03/09 + cheat + description:Start with 1/2 time + code:3ef6/09/05 + cheat + description:Start with 3/4 time + code:3ef6/09/07 + +cartridge sha256:290f9d2ebd3221142873aa9650dc3276b577f1cfaf4ea2bc407f66a1ae110139 + name:Speedy Gonzales - Aztec Adventure (USA, Europe) + cheat + description:Invincibility + code:06cd/c0/c9 + cheat + description:Walk on air + code:1ecf/28/3e + +cartridge sha256:89c4151a31f00dc0f20133ee5ec8f71f3023331de93e017e97d66dc497eb2aa9 + name:Spider-Man 2 (USA, Europe) + cheat + description:Infinite lives + code:16fb/ea/fa + cheat + description:Infinite energy + code:16c4/ea/fa + cheat + description:Infinite web power + code:1df6/ea/fa + cheat + description:1 energy point after life lost + code:16ee/ff/01 + cheat + description:Start with 1 life + code:1f78/03/00 + cheat + description:Start with 5 lives + code:1f78/03/04 + cheat + description:Start with 10 lives + code:1f78/03/09 + cheat + description:Start with 1 energy point + code:1f5b/ff/01 + cheat + description:Start with 4 web points - 1st life only + code:1f73/14/04 + cheat + description:Start with 5 web points - 1st life only + code:1f73/14/05 + cheat + description:Start with 9 web points - 1st life only + code:1f73/14/09 + +cartridge sha256:664dae41e2d08070ead51e76c2d6865e52a122566cf79203b7c6c496968ded6e + name:Spider-Man 3 - Invasion of the Spider-Slayers (USA, Europe) + cheat + description:Infinite energy + code:17ec/ea/fa + cheat + description:Infinite lives + code:1825/ea/fa + cheat + description:Need to shoot 1 enemy to clear level 1-1 + code:2e3a/14/01 + cheat + description:Start 1st life with 1/2 energy + code:23ab/ff/72 + cheat + description:Start lives after 1st with 1/2 energy + code:1818/ff/72 + cheat + description:Start 1st level with 1/2 time + code:476f/ea/fa + cheat + description:Start 1st level with 255 seconds on timer + code:2e2d/96/ff + +cartridge sha256:31b92ae1c10e59372e14fe78cda20556d6ceba86930c60cc2a6bab8100f3a4b5 + name:Splitz (Europe) + cheat + description:Infinite time + code:11f5/ea/fa + +cartridge sha256:7275c3af129971c53ce901321f6ca85b414ebd84574c420d66c38aa87c219fe3 + name:Spot - The Cool Adventure (USA) + cheat + description:Infinite energy (hearts) except when you fall off screen + code:390a/ea/fa + cheat + description:Start with 4 lives + code:2576/04/04 + cheat + description:Start with 6 lives + code:2576/04/06 + cheat + description:Start with 9 lives + code:2576/04/09 + cheat + description:Start with 15 lives + code:2576/04/0f + cheat + description:Start with 25 bonus discs + code:2580/00/25 + cheat + description:Start with 59 bonus discs + code:2580/00/50 + cheat + description:Start with 5 energy (easy level) + code:42f7/05/05 + cheat + description:Start with 8 energy (easy level) + code:42f7/05/08 + cheat + description:Start with 10 energy (easy level) + code:42f7/05/08 + cheat + description:Start with 5 energy (hard level) + code:257b/03/05 + cheat + description:Start with 8 energy (hard level) + code:257b/03/08 + cheat + description:Start with 10 energy (hard level) + code:227b/03/08 + +cartridge sha256:966883149824ad2542a03a6402278d1397cdf0cbc0a7ba8410265410426ebfb9 + name:Spud's Adventure (USA) + cheat + description:Infinite lives + code:1267/3d/00 + cheat + description:Begin each new screen with a key-except 1st screen + code:175f/af/00 + cheat + description:1 EXP pt. for killing a bad guy + code:11d1/f0/3e+11d2/df/01 + cheat + description:5 EXP pts. for killing a bad guy + code:11d1/f0/3e+11d2/df/05 + cheat + description:9 EXP pts. for killing a bad guy + code:11d1/f0/3e+11d2/df/09 + cheat + description:Start with 2 life + code:13c8/02/01 + cheat + description:Start with 6 lives + code:13c8/02/05 + cheat + description:Start with 10 lives + code:13c8/02/09 + +cartridge sha256:f0f1f547332965963ae2f8b3f3b5fd62203e0690cc0299d38e1a3aa56f6a263b + name:Spy vs Spy - Operation Boobytrap (USA) + cheat + description:Infinite time + code:52d2/35/00 + cheat + description:Both spies start with 4 energy + code:169e/0a/04 + cheat + description:Both spies start with 6 energy + code:169e/0a/06 + cheat + description:Both spies start with 8 energy + code:169e/0a/08 + cheat + description:After death, start with 4 energy - white spy + code:4d84/0a/04 + cheat + description:After death, start with full energy - white spy + code:4d84/16/08 + cheat + description:No loss of energy during fight - both spies + code:4514/35/00 + cheat + description:Other spy's punches do not affect your energy + code:4503/18/00 + cheat + description:Walking over floor flowers doesn't affect your energy + code:505c/ea/fa + cheat + description:Traps do not affect energy - white spy + code:4a76/02/00 + +cartridge sha256:5b6bdf85e9083f328449b1316f5dd9c2789f4a57bdac5b16d74fe10bbea1b03c + name:Square Deal - The Game of Two-Dimensional Poker (USA) + cheat + description:Infinite time on pause counter + code:1da0/c4/01 + cheat + description:Timer starts at 30 + code:1c83/3c/1e + cheat + description:No time on pause counter + code:1c83/3c/00 + cheat + description:Select up to level 10 in level select + code:24d8/05/0a + cheat + description:Start with 1 replay + code:23af/09/3e+23b0/7e/01 + cheat + description:Start with 3 replays + code:23af/09/3e+23b0/7e/03 + cheat + description:Start with 9 replays + code:23af/09/3e+23b0/7e/09 + +cartridge sha256:2cdf2edac4e6230e063c867c60f92d5bb5f37969a19a32fb65c33fe9fafaa378 + name:Stargate (USA, Europe) + cheat + description:Tile counter doesn't work + code:4822/01/00 + cheat + description:Tiles all look blank but aren't + code:2274/c8/c9 + cheat + description:The bottom of the tiles are always tile one + code:497d/19/0e+497e/4e/01 + cheat + description:The bottom of the tiles are always tile two + code:497d/19/0e+497e/4e/02 + cheat + description:The bottom of the tiles are always tile three + code:497d/19/0e+497e/4e/03 + cheat + description:The bottom of the tiles are always tile four + code:497d/19/0e+497e/4e/04 + cheat + description:The bottom of the tiles are always tile five + code:497d/19/0e+497e/4e/05 + cheat + description:The bottom of the tiles are always tile six + code:497d/19/0e+497e/4e/06 + cheat + description:The bottom of the tiles are always tile seven + code:497d/19/0e+497e/4e/07 + cheat + description:The bottom of the tiles are always tile eight + code:497d/19/0e+497e/4e/08 + cheat + description:The bottom of the tiles are always tile nine + code:497d/19/0e+497e/4e/09 + cheat + description:The bottom of the tiles are always tile ten + code:497d/19/0e+497e/4e/0a + cheat + description:The bottom of the tiles are always tile eleven + code:497d/19/0e+497e/4e/0b + cheat + description:The bottom of the tiles are always tile twelve + code:497d/19/0e+497e/4e/0c + cheat + description:The bottom of the tiles are always smart bomb tiles + code:497d/19/0e+497e/4e/0d + cheat + description:The bottom of the tiles are always digger tiles + code:497d/19/0e+497e/4e/0e + cheat + description:The bottom of the tiles are always tile wildcard tiles + code:497d/19/0e+497e/4e/0f + +cartridge sha256:3123e4bcd304d84819c589775db3bf4a2b4fa6d23209b3da691ea7eda6045037 + name:Star Hawk (Europe) + cheat + description:Infinite lives + code:0a2c/ea/fa + cheat + description:Impenetrable shield + code:08c0/3d/00 + cheat + description:Infinite continues + code:0692/c5/00 + cheat + description:Keep power-ups when you die + code:0f15/ea/fa + cheat + description:Start with 8 lives + code:01c1/03/08 + cheat + description:Start with 10 lives + code:01c1/03/0a + cheat + description:Start with 12 lives + code:01c1/03/0c + +cartridge sha256:2085a11062131fd64c2bc836200a6e203c0bd45909d193c8ad82c0f79f2c025b + name:Star Trek Generations - Beyond the Nexus (USA) (SGB Enhanced) + cheat + description:Almost infinite phasers and shields + code:2256/30/18 + cheat + description:Infinite attempts in sub game + code:73d4/db/01 + cheat + description:Start with very little phasers and shields + code:73f7/64/01 + cheat + description:Start with 1/4 phasers and shields + code:73f7/64/22 + cheat + description:Start with 1/2 phasers and shields + code:73f7/64/3f + cheat + description:Start with 3/4 phasers and shields + code:73f7/64/4f + +cartridge sha256:9c08d6bdf045668d64934c7cc773bb2353ec15e9dc3e3f5d8ea2e02f2a22be40 + name:Star Trek - The Next Generation (USA, Europe) + cheat + description:Infinite shields + code:2427/ea/fa + cheat + description:Damage isn't repaired + code:2113/34/00 + cheat + description:Damage repaired immediately + code:2115/63/00 + cheat + description:Life support starts at 25% power + code:6e16/64/19 + cheat + description:Life support starts at 50% power + code:6e16/64/32 + cheat + description:Life support starts at 75% power + code:6e16/64/4b + cheat + description:Warp drive starts at 25% power + code:6e1a/64/19 + cheat + description:Warp drive starts at 50% power + code:6e1a/64/32 + cheat + description:Warp drive starts at 75% power + code:6e1a/64/4b + cheat + description:Impulse drive starts at 25% power + code:6e1e/64/19 + cheat + description:Impulse drive starts at 50% power + code:6e1e/64/32 + cheat + description:Impulse drive starts at 75% power + code:6e1e/64/4b + cheat + description:Shields start at 25% power + code:6e22/64/19 + cheat + description:Shields start at 50% power + code:6e22/64/32 + cheat + description:Shields start at 75% power + code:6e22/64/4b + cheat + description:Phasers start at 25% power + code:6e26/64/19 + cheat + description:Phasers start at 50% power + code:6e26/64/32 + cheat + description:Phasers start at 75% power + code:6e26/64/4b + cheat + description:Photon Torpedoes start at 25% power + code:6e2a/64/19 + cheat + description:Photon Torpedoes start at 50% power + code:6e2a/64/32 + cheat + description:Photon Torpedoes start at 75% power + code:6e2a/64/4b + cheat + description:Sensors start at 25% power + code:6e2e/64/19 + cheat + description:Sensors start at 50% power + code:6e2e/64/32 + cheat + description:Sensors start at 75% power + code:6e2e/64/4b + cheat + description:Transporter starts at 25% power + code:6e32/64/19 + cheat + description:Transporter starts at 50% power + code:6e32/64/32 + cheat + description:Transporter starts at 75% power + code:6e32/64/4b + +cartridge sha256:9cf6aa2b4d6a4bb877d33bb6131562c9f41deb369d08c5b60266941bb276561f + name:Star Wars (USA) + cheat + description:Infinite energy + code:3b5c/35/c9 + cheat + description:Infinite lives + code:3b6a/ff/00 + cheat + description:Infinite continues + code:12f6/ea/fa + cheat + description:No continues + code:03a2/0a/00 + cheat + description:20 continues + code:03a2/0a/14 + cheat + description:More energy - 1st life only + code:10b7/08/99 + cheat + description:Start with 1/2 energy on all lives except 1st + code:3c12/08/04 + cheat + description:Start with 1 life + code:03b7/03/01 + cheat + description:Start with 6 lives + code:03b7/03/06 + cheat + description:Start with 9 lives + code:03b7/03/09 + +cartridge sha256:a62719fa767547a11ac20e0ad5d1fd43b68f92908a5c81dd3aba95f921458c51 + name:Star Wars - The Empire Strikes Back (USA) + cheat + description:Infinite continues + code:0ea1/3d/00 + cheat + description:Start with all force abilities in inventory - still need to get force power to activate + code:01d7/00/01+01cf/af/00 + +cartridge sha256:5393db89f3763c973438d8a6abd4ff83c404fe6cd58a8041adf2cd6d85535835 + name:Street Fighter Alpha - Warriors' Dreams (USA) + cheat + description:Hit anywhere - both players + code:6f26/c8/00+67e1/c8/00 + +cartridge sha256:8730c69cb2aa82260ac07257e0e29d61f598de2f8fa3e65da1d694790fa5db16 + name:Street Fighter II (USA, Europe) (Rev A) (SGB Enhanced) + cheat + description:Invincibility + code:2a8e/28/18+2a9f/28/18+2ad2/28/18 + cheat + description:Hit anywhere - P1 + code:2ab1/05/00 + cheat + description:Hit anywhere - P2 + code:2a8f/05/00 + cheat + description:Fireball kills + code:7583/15/88 + cheat + description:Nobody takes damage from anything but throws/grabs + code:6924/77/00 + cheat + description:Opponent can't win any normal rounds + code:7b93/c1/00 + cheat + description:Allows you to select a higher skill level + code:5385/06/09 + cheat + description:Fireball doesn't do any damage + code:7583/15/00 + cheat + description:Fireball does more damage + code:7583/15/40 + cheat + description:Player one starts with very little energy + code:63f8/70/01 + cheat + description:Player one starts with 1/4 energy + code:63f8/70/1f + cheat + description:Player one starts with 1/2 energy + code:63f8/70/3a + cheat + description:Player one starts with 3/4 energy + code:63f8/70/52 + cheat + description:Player one starts with more energy + code:63f8/70/ff + cheat + description:Player two starts with very little energy + code:63ff/70/01 + cheat + description:Player two starts with 1/4 energy + code:63ff/70/1f + cheat + description:Player two starts with 1/2 energy + code:63ff/70/3a + cheat + description:Player two starts with 3/4 energy + code:63ff/70/52 + cheat + description:Player two starts with more energy + code:63ff/70/ff + cheat + description:Start with seconds on the timer + code:6461/63/88 + cheat + description:Ryu - Foot sweep doesn't do any damage + code:750b/10/00 + cheat + description:Ryu - Foot sweep does more damage + code:750b/10/40 + cheat + description:Ryu - Foot sweep kills + code:750b/10/88 + cheat + description:Ryu - Crouch punch doesn't do any damage + code:74f7/10/00 + cheat + description:Ryu - Crouch punch does more damage + code:74f7/10/40 + cheat + description:Ryu - Crouch punch kills + code:74f7/10/88 + cheat + description:Ryu - Normal upper cut doesn't do any damage + code:74a7/10/00 + cheat + description:Ryu - Normal upper cut does more damage + code:74a7/10/40 + cheat + description:Ryu - Normal upper cut kills + code:74a7/10/88 + cheat + description:Ryu - Straight punch doesn't do any damage + code:74cf/10/00 + cheat + description:Ryu - Straight punch does more damage + code:74cf/10/40 + cheat + description:Ryu - Straight punch kills + code:74cf/10/88 + cheat + description:Ryu - Standong hack kick doesn't do any damage + code:74bb/0a/00 + cheat + description:Ryu - Standong hack kick does more damage + code:74bb/0a/40 + cheat + description:Ryu - Standong hack kick kills + code:74bb/0a/88 + cheat + description:Ryu - Rolling throw doesn't do any damage + code:75b5/12/00 + cheat + description:Ryu - Rolling throw does more damage + code:75b5/12/40 + cheat + description:Ryu - Rolling throw kills + code:75b5/12/88 + cheat + description:Ryu - Jumping straight up and kicking doesn't do any damage + code:7533/11/00 + cheat + description:Ryu - Jumping straight up and kicking does more damage + code:7533/11/40 + cheat + description:Ryu - Jumping straight up and kicking kills + code:7533/11/88 + cheat + description:Ryu - Standing short kick doesn't do any damage + code:74d9/08/00 + cheat + description:Ryu - Standing short kick does more damage + code:74d9/08/40 + cheat + description:Ryu - Standing short kick kills + code:74d9/08/88 + +cartridge sha256:201aec9eb615f1434100e0db39d6039e3f80670a680b8af9df15915315c170b1 + name:Sumo Fighter (USA) + cheat + description:Infinite energy + code:5ec8/ea/fa + cheat + description:At easy or hard level screen, press down three times then A for super hard mode (makes display look weird) + code:0206/05/09 + cheat + description:Start with 2 energy bars + code:5baf/03/02 + cheat + description:Start with 5 energy bars + code:5baf/03/05 + cheat + description:Start with 8 energy bars + code:5baf/03/08 + cheat + description:Start with 2 lives + code:020b/02/01 + cheat + description:Start with 5 lives + code:020b/02/04 + cheat + description:Start with 8 lives + code:020b/02/07 + +cartridge sha256:79da9658fdd3b92910f0a63ba6c7a45fb680b0e0ebe03ad1ed982d3dc92edae1 + name:Super Battletank - War in the Gulf (USA) + cheat + description:Infinite damage + code:3b00/f0/e0 + cheat + description:Infinite ammo + code:3595/35/00 + cheat + description:Infinite fuel + code:2de1/f0/c9 + cheat + description:Start with 5 shells + code:2e42/32/05 + cheat + description:Start with 99 shells + code:2e42/32/63 + cheat + description:Start with 5 laser shots + code:2e4d/01/05 + cheat + description:Start with 99 laser shots + code:2e4d/01/63 + cheat + description:Start with 5 smoke shots + code:2e58/01/05 + cheat + description:Start with 99 smoke shots + code:2e58/01/63 + cheat + description:Start with 5 bullets + code:2e63/96/05 + cheat + description:Start with 99 bullets + code:2e63/96/63 + cheat + description:Start with very little fuel + code:2e72/ff/15 + +cartridge sha256:fbd32fe43df00f5821f290e0b2010b9944e46fd687eabf34cf78451e4a62be68 + name:Super Bombliss (Japan) (SGB Enhanced) + cheat + description:Drop one piece to clear level + code:4b69/20/3e+4aa2/00/01 + +cartridge sha256:f607ad68fdfd8cbaabe554fea2075050a7055f0fafef9a0fd2825a67b2fd038a + name:Super Breakout (USA) + cheat + description:Paddle hits ball from anywhere (ball goes down the screen at times) + code:0736/d5/3c+0735/da/c3 + +cartridge sha256:be805b8c607bbf1fdaade6345f244da20ba6ca8ac587402445b8f272a0d708d7 + name:Super Breakout! (USA) + cheat + description:Paddle hits ball from anywhere (ball goes down the screen at times) + code:0736/d5/3c+0735/da/c3 + +cartridge sha256:dab87fd694aa1358278b4850371ff1303dea2295b7b7cc14842c969014a73fb1 + name:Super Chase H.Q. (USA, Europe) + cheat + description:Infinite time + code:1678/01/00 + cheat + description:Infinite turbos + code:1767/3d/00 + cheat + description:Turbo boosts last half as long + code:1747/fa/77 + cheat + description:Turbo boosts lasts very short + code:1747/fa/15 + cheat + description:Turbo boosts lasts forever. Disable to fire a turbo boost then enable while turbo boost is going. + code:1714/c4/00 + cheat + description:Start with lots of points + code:4990/f2/f5 + cheat + description:Start with 1 turbo boost + code:50e5/03/01+4908/03/01 + cheat + description:Start with 2 turbo boosts + code:50e5/03/02+4908/03/02 + cheat + description:Start with 5 turbo boosts + code:50e5/03/05+4908/03/05 + cheat + description:Start with 9 turbo boosts + code:50e5/03/09+4908/03/09 + +cartridge sha256:1a3841dfc6ccf87167d7b1f0ce17f3bbf9fd64445611e249f5902e8824e17483 + name:Super Chinese Land (Japan) + cheat + description:Invincibility (blinking) + code:14be/c9/00 + cheat + description:Infinite health + code:450a/1a/7c+450b/77/12 + cheat + description:Infinite lives + code:555a/c9/47 + +cartridge sha256:af5a78f29f7e5e70bfe4d0122bdb99d5d0e38a3e8912ff49c2630c7d6be7db67 + name:Super Mario Bros. Deluxe (USA, Europe) + cheat + description:Invincibility - Star effect + code:01ff/c1/da+01ff/c1/db + cheat + description:Fireballs hit anywhere + code:40bb/28/18+40cb/28/18+2301/da/fa+230f/da/fa + cheat + description:Fireballs go through all enemies and obstacles + code:40bb/28/18+40cb/28/18 + cheat + description:Blocks that contain coins also give a Starman + code:48a3/00/02+4752/40/48+4751/00/b5 + +cartridge sha256:db81dd4acbd0c7a3b9004f169ee278450c764c842ae777abd28073fbedf4078b + name:Super Mario Bros. Deluxe (USA, Europe) (Rev A) + cheat + description:Invincibility - Star effect + code:01ff/c1/da+01ff/c1/db + cheat + description:Fireballs hit anywhere + code:40bb/28/18+40cb/28/18+2301/da/fa+230f/da/fa + cheat + description:Fireballs go through all enemies and obstacles + code:40bb/28/18+40cb/28/18 + cheat + description:Blocks that contain coins also give a Starman + code:48a3/00/02+4752/40/48+4751/00/b5 + +cartridge sha256:c06af1a1c2a804e4169fd9bfd6eee7073545d88c97febc96c345dd10efd77547 + name:Super Mario Bros. Deluxe (USA, Europe) (Rev B) + cheat + description:Invincibility - Star effect + code:01FFDAC1+01FFDBC1 + cheat + description:Fireballs go through all enemies and obstacles + code:40bb/28/18+40cb/28/18 + cheat + description:Blocks that contain coins also give a Starman + code:48a3/00/02+4752/40/48+4751/00/b5 + +cartridge sha256:49fbd2f61f953d5ef28cab73e357e524c3009ad19fcf30f6a9ee0ae273be41dc + name:Super Mario Land (World) (Rev A) + cheat + description:Enable level select + code:04d3/45/00+04aa/d2/c3 + cheat + description:Infinite time (disable at end of stage) + code:5860/01/00 + cheat + description:Always have superballs + code:4a17/c8/00 + cheat + description:Multi-jump + code:49c2/f2/00+49c9/eb/00+49d8/19/00+49e4/08/00+49ae/20/18+4b75/d8/c9+49e7/ea/fa + cheat + description:Disable music + code:6cc3/c8/c9 + cheat + description:Clear level automatically + code:02a7/06/0c+02a6/27/40+02c0/76/40+02c1/23/0c + +cartridge sha256:470d6c45c9bcf7f0397d00c1ae6de727c63dd471049c8eedbefdc540ceea80b4 + name:Super Mario Land (World) + cheat + description:Enable level select + code:04d3/45/00+04aa/d2/c3 + cheat + description:Superballs hit anywhere + code:204b/2d/00+2048/d2/00+2049/2d/e1+204a/2d/e5 + cheat + description:Multi-jump + code:49c2/f2/00+49c9/eb/00+49d8/19/00+49e4/08/00+49ae/20/18+4b75/d8/c9+49e7/ea/fa + cheat + description:Disable music + code:6dbd/c8/c9 + +cartridge sha256:42045a1642f77b568534ab85b9db93c8a33d2b95c38ae84c987f497e8d52f97f + name:Super Mario Land 2 - 6 Golden Coins (USA, Europe) (Rev B) + cheat + description:Infinite time + code:5d8d/01/00 + cheat + description:Always have fireballs + code:32ce/c0/00 + cheat + description:Fireballs hit anywhere + code:304c/7f/4e+3062/7f/64 + +cartridge sha256:30d3316d06710cb94c529c477975cae3b051312b88aca9392888614b1c4b3894 + name:Super Mario Land 2 - 6 Golden Coins (USA, Europe) (Rev A) + cheat + description:Infinite lives + code:3140/01/00 + cheat + description:Infinite time + code:5d8d/01/00 + cheat + description:Timer counts down by 2 + code:5d8d/01/02 + cheat + description:Mushroom turns you into Bunny Mario + code:345b/01/02 + cheat + description:Mushroom turns you into Fire Mario + code:345b/01/03 + cheat + description:Stay as Super Mario when hit + code:31b9/ea/fa + cheat + description:Stay as Fire or Bunny Mario when hit + code:31c8/ea/fa + cheat + description:Hearts (extra life) worth nothing + code:34bb/3c/00 + cheat + description:Play 30 coin game of chance for free + code:745f/30/00 + cheat + description:Play 50 coin game of chance for free + code:7428/50/00 + cheat + description:Play 200 coin game of chance for free + code:73f2/02/00 + cheat + description:Play 999 coin game of chance for free + code:73bb/09/00+73ba/99/00 + cheat + description:Each coin worth 101 + code:1d92/00/01+592b/00/01 + cheat + description:Each coin worth 0 + code:5922/3c/00+1d89/3c/00 + cheat + description:Each defeated enemy worth 2 + code:7321/01/02 + cheat + description:Each defeated enemy worth 5 + code:7321/01/05 + cheat + description:Can re-enter boss levels + code:418d/28/18 + cheat + description:Always have fireballs + code:32cb/c0/00 + cheat + description:Start new game with 1 life instead of 6 + code:4241/05/00 + cheat + description:Start new game with 10 lives instead of 6 + code:4241/05/09 + cheat + description:Start new game with 25 lives instead of 6 + code:4241/05/24 + cheat + description:Start new game with 50 lives instead of 6 + code:4241/05/49 + cheat + description:Start new game with 75 lives instead of 6 + code:4241/05/74 + cheat + description:Start new game with 100 lives instead of 6 + code:4241/05/99 + +cartridge sha256:5450dce1bd0c073964c374b5b5b5729dce8d00f2e807892c34af32b8bce1392e + name:Super Mario Land 2 - 6 Golden Coins (USA, Europe) + cheat + description:Infinite lives + code:3140/01/00 + cheat + description:Infinite time + code:5d8d/01/00 + cheat + description:Fireballs hit anywhere + code:3049/7c/4b+305f/7c/61 + cheat + description:Always have fireballs + code:32cb/c0/00 + +cartridge sha256:91bd1f24827bde4dbb58ead76a8b4e5a507431ec9b6bbc7ef9473b852538a4d5 + name:Super Off Road (USA, Europe) + cheat + description:Infinite money + code:4da2/ea/fa + cheat + description:Infinite tires, nitros, etc. when you buy them + code:233a/35/00 + cheat + description:Start with 2 credits + code:0b87/03/02 + cheat + description:Start with 4 credits + code:0b87/03/04 + cheat + description:Start with 8 credits + code:0b87/03/08 + +cartridge sha256:1c93028e0882746e91721fedda27165281603744afa15f25fd7247d7c04071e8 + name:Survival Kids (USA) (SGB Enhanced) + cheat + description:Walk anywhere + code:276e/20/3e + +cartridge sha256:f522c83d9dc77825a8bd5933e0877173fcb260fe72c5b032ef38b109250a63e9 + name:Swamp Thing (USA, Europe) + cheat + description:Invincibility + code:1285/90/c9 + cheat + description:Infinite lives + code:038f/ea/fa + cheat + description:Infinite environmental meter + code:6fcf/ea/fa + cheat + description:Start with half energy + code:055a/40/20 + cheat + description:Start with 1/2 environmental meter + code:0555/20/10 + +cartridge sha256:3e7a15c930db627b82b83f1e2a499436b0419e4d05b85bdfeb2a475e6a07c9b1 + name:Sword of Hope, The (USA) + cheat + description:Infinite HP + code:4172/c7/00 + cheat + description:Start with 11 dexterity points + code:2abf/05/09 + cheat + description:12 stamina points + code:2ac4/05/09 + cheat + description:Shaman is free + code:34a0/e0/f0 + cheat + description:Forest shop is free + code:3a3c/e0/f0 + +cartridge sha256:f55e542cc82dc5fbefc0fc5f42e95e882fba7895e73a8ff084ce7aa8408bdd85 + name:T2 - The Arcade Game (USA, Europe) + cheat + description:Infinite energy + code:2c9d/e0/f0 + cheat + description:Infinite lives + code:2cab/e0/f0 + cheat + description:Infinite rockets + code:14b8/ea/fa + cheat + description:Infinite continues + code:1d5c/ea/fa + cheat + description:Start with 2 lives + code:0346/05/02 + cheat + description:Start with 4 lives + code:0346/05/04 + cheat + description:Start with 8 lives + code:0346/05/08 + +cartridge sha256:351a3b24efa68f60009bc7e05d554034c8dc3d360d51d7399c80e65370899679 + name:Tail 'Gator (USA, Europe) + cheat + description:Invincibility + code:1baf/28/3e+222d/c2/fa + cheat + description:Hit anywhere + code:51b0/34/00+5234/ca/fa + +cartridge sha256:731385527be39125a2044edbc46da9f5d9bc48cff7e320b213c45d77c5069067 + name:Tarzan (USA, Europe) + cheat + description:Infinite time + code:4086/ea/fa + cheat + description:One hit kills + code:43ed/38/18+4441/38/18 + cheat + description:Multi-jump + code:4784/20/3e + cheat + description:Only one special item needed + code:40bc/3d/af + +cartridge sha256:596787d9f1dfeef0151b20ce330ef78220e041d0a360b34dea75ce21c7cbb889 + name:Taz-Mania (USA, Europe) + cheat + description:Invincibility + code:7365/c0/00 + cheat + description:Infinite spins + code:6c51/ea/fa + cheat + description:Infinite hearts + code:373c/ea/fa + cheat + description:Infinite time + code:76aa/ea/fa + cheat + description:Infinite credits + code:2a48/ea/fa + cheat + description:Don't flash after getting hit + code:6a96/80/00 + cheat + description:Don't flash as long after getting hit + code:6a96/80/11 + cheat + description:Flash longer after getting hit + code:6a96/80/f1 + cheat + description:Start with 1 heart - 1st life + code:076e/03/01 + cheat + description:Start with 5 hearts - 1st life + code:076e/03/05 + cheat + description:Start with 10 hearts - 1st life + code:076e/03/0a + cheat + description:Start timer at 58 seconds + code:7840/19/3e+7841/2a/05 + cheat + description:Start timer at 1 minute 48 seconds + code:7840/19/3e+7841/2a/0a + +cartridge sha256:8b5f65da035664baedd19c55ddfe06682e2dd7d45970bcb10917078c855aa19c + name:Taz-Mania 2 (USA) + cheat + description:Invincibility + code:0108/dc/49 + cheat + description:Infinite health + code:0100/db/60 + cheat + description:Infinite attack + code:0128/d3/ba + cheat + description:Infinite time + code:0138/d3/7d + +cartridge sha256:1f3c9ff627b0445e57a7425bc433c0476a0eeafe25ea5c6522b102d1ef8f875e + name:Tecmo Bowl (USA) + cheat + description:Infinite time + code:5dc9/35/00 + cheat + description:Have 49 downs + code:44d6/04/49 + cheat + description:Have 5 downs + code:44d6/04/05 + cheat + description:8 minutes 30 seconds per quarter + code:44ef/01/08 + cheat + description:6 minutes 30 seconds per quarter + code:44ef/01/06 + cheat + description:1 minutes 30 seconds per quarter + code:44ef/01/01 + +cartridge sha256:f4ef2ca5506f493f48833c16dff5eaa2b18ba488c352ed5bc03059d150e46620 + name:Teenage Mutant Ninja Turtles - Fall of the Foot Clan (USA) + cheat + description:Infinite health + code:0109/c9/81 + cheat + description:Hit anywhere + code:3de2/a1/b8+3e26/a1/b8+3ddf/0e/3e+3e23/0e/3e + +cartridge sha256:b2588721a1a298cfbd1f2fca465ac70f0b2aa488fab8eed1b7f49cac592ac438 + name:Teenage Mutant Ninja Turtles II - Back from the Sewers (USA) + cheat + description:Invincibility + code:564c/30/18+56b4/d0/c9 + cheat + description:Hit anywhere + code:56f1/d0/00 + +cartridge sha256:95c804c1a851b502c15a3418eef75e491aec9371e2fb2a34e4aaa27b37e02023 + name:Teenage Mutant Ninja Turtles III - Radical Rescue (USA) + cheat + description:Invincibility + code:233b/d0/c9+4884/21/c9 + cheat + description:Hit anywhere + code:2247/d0/00+2264/d0/00+22de/d0/00+22fb/d0/00 + +cartridge sha256:cdcb6ba23ea2c32a2af47abb267d8bd065a8bc10777b435de6a9be421e5bf919 + name:Tennis (World) + cheat + description:Neither player scores points - disable to score + code:21da/34/00 + cheat + description:1 game needed to win set + code:209c/07/01 + cheat + description:2 games needed to win set + code:209c/07/02 + cheat + description:3 games needed to win set + code:209c/07/03 + cheat + description:4 games needed to win set + code:209c/07/04 + cheat + description:1st point takes you to 40 points + code:219a/03/01 + cheat + description:2nd point takes you to 40 points + code:219a/03/02 + cheat + description:Neither player can win game + code:2099/34/00+2074/e3/e0+207e/e3/e0 + +cartridge sha256:5fa11359e8147b295bebd1e5631c7b96908c649d9d33fdc45a2dd3de8d69ca73 + name:Terminator 2 - Judgment Day (USA, Europe) + cheat + description:Almost infinite energy + code:1500/ea/c9 + cheat + description:Infinite time in reprogramming stage + code:4103/3d/00 + cheat + description:20 shots kill end of level 1 boss + code:4854/28/14 + cheat + description:10 shots kill end of level 1 boss + code:4854/28/0a + cheat + description:5 shots kill end of level 1 boss + code:4854/28/05 + cheat + description:Start with 1/2 energy + code:2e59/e0/70 + +cartridge sha256:7fde11dd4e594a6905deccd57943d2909ecb37665a030741c42155aeb346323b + name:Tetris (Japan) (En) + cheat + description:Drop a piece on the far left side of the board to clear the section + code:21b9/f7/00 + +cartridge sha256:0d6535aef23969c7e5af2b077acaddb4a445b3d0df7bf34c8acef07b51b015c3 + name:Tetris (World) (Rev A) + cheat + description:Drop a piece on the far left side of the board to clear the section + code:215e/f7/00 + cheat + description:Keep stack displayed while paused + code:1c30/cb/ce + cheat + description:Keep current and next pieces displayed while paused + code:1c53/cd/d9 + cheat + description:Only piece 1 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/00 + cheat + description:Only piece 2 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/04 + cheat + description:Only piece 3 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/08 + cheat + description:Only piece 4 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/0c + cheat + description:Only piece 5 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/10 + cheat + description:Only piece 6 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/14 + cheat + description:Only piece 7 will appear + code:2063/e0/00+2064/ae/3e+2065/7b/18 + +cartridge sha256:d349dc93423c6abcd775d3b6a8797df715a44a42ec837afb21bf17ae43b40a9e + name:Tetris DX (World) (SGB Enhanced) + cheat + description:Drop pieces on the left side of the board to clear lines + code:5a8b/f7/00 + cheat + description:Score increases a lot + code:53c9/86/1f + cheat + description:Swap over next shape to current shape by pressing A + code:57c5/fa/c3+57c6/82/b6+57c7/af/58 + cheat + description:Swap over next shape to current shape by pressing B + code:581e/fa/c3+581f/82/b6+5820/af/58 + cheat + description:Swap over next shape to current shape by pressing select + code:5876/fa/18+5877/87/3e + +cartridge sha256:771d24adf7dd11ff166fc43d3f2be66dd7a24251b8920e813956c62514813051 + name:Tetris 2 (USA) + cheat + description:Drop one piece to clear level + code:5df6/06/00 + cheat + description:No next piece screen + code:58e9/fa/c9 + cheat + description:Blocks come down fast + code:6d64/c6/10+6d62/fa/00+6d63/96/3e + cheat + description:Blocks come down very fast + code:6d64/c6/70+6d62/fa/00+6d63/96/3e + cheat + description:Blocks come down super fast + code:6d64/c6/20+6d62/fa/00+6d63/96/3e + cheat + description:Can select round above 30 on options screen + code:5a4b/d0/00 + cheat + description:In versus mode, no blocks added to top of screen + code:78cb/ea/fa + +cartridge sha256:2c3bc48a4ec9b6c640b83ce6524570f472db329d4a96d0b527b34abd42b7d695 + name:Tetris 2 (USA, Europe) (SGB Enhanced) + cheat + description:Drop one piece to clear level + code:5f67/06/00 + +cartridge sha256:b8765e752153310f835e10d6ceaee80b0e0913cdadf832b9516af8bf974e9666 + name:Tetris Attack (USA) (SGB Enhanced) + cheat + description:Rows clear automatically (except in Puzzle Mode) + code:4734/d9/00 + +cartridge sha256:252e9981ba15054b5b8e2eeab22ccbae7ac3cbe9d7cd7a895c75fb35054717f9 + name:Tetris Attack (USA, Europe) (Rev A) (SGB Enhanced) + cheat + description:Rows clear automatically (except in Puzzle Mode) + code:4732/d9/00 + +cartridge sha256:379f9034b2702f06247e1dd4a6e21d51a76aff84d12ff851e4e962b105094d10 + name:Tiny Toon Adventures 2 - Montana's Movie Madness (USA, Europe) + cheat + description:Invincibility + code:2cda/c2/c3 + cheat + description:Infinite health + code:2d5c/3d/00 + cheat + description:Infinite time + code:4614/3d/00 + cheat + description:Infinite lives + code:2a5e/01/00 + cheat + description:One hit and you die + code:2d53/e0/00 + cheat + description:Don't flash as long after getting hit + code:2d53/e0/3f + cheat + description:Start with 1 heart + code:1966/04/02 + cheat + description:Start with 2 hearts + code:1966/04/03 + cheat + description:Start with 1 life + code:6e1e/02/00 + cheat + description:Start with 5 lives + code:6e1e/02/04 + cheat + description:Start with 10 lives + code:6e1e/02/09 + cheat + description:Start with mega points + code:6e22/af/00 + cheat + description:Start with 100 seconds on the clock + code:6e31/05/01 + cheat + description:Start with 300 seconds on the clock + code:6e31/05/03 + cheat + description:Start with 700 seconds on the clock + code:6e31/05/07 + cheat + description:Start with 900 seconds on the clock + code:6e31/05/09 + +cartridge sha256:fe2f3a9c8af3702b53398fea579951634effbeafaea10865aac8b07d7458e9b1 + name:Tiny Toon Adventures 2 (Japan) + cheat + description:Invincibility + code:2cda/c2/c3 + cheat + description:Infinite health + code:2d5c/3d/00 + cheat + description:Infinite time + code:4614/3d/00 + cheat + description:Infinite lives + code:2a5e/01/00 + cheat + description:One hit and you die + code:2d53/e0/00 + cheat + description:Don't flash as long after getting hit + code:2d53/e0/3f + cheat + description:Start with 1 heart + code:1966/04/02 + cheat + description:Start with 2 hearts + code:1966/04/03 + cheat + description:Start with 1 life + code:6e1e/02/00 + cheat + description:Start with 5 lives + code:6e1e/02/04 + cheat + description:Start with 10 lives + code:6e1e/02/09 + cheat + description:Start with mega points + code:6e22/af/00 + cheat + description:Start with 100 seconds on the clock + code:6e31/05/01 + cheat + description:Start with 300 seconds on the clock + code:6e31/05/03 + cheat + description:Start with 700 seconds on the clock + code:6e31/05/07 + cheat + description:Start with 900 seconds on the clock + code:6e31/05/09 + +cartridge sha256:4d078174031509ca7b63c237e176e9f5c0aed88b42352ad23aee98a777d3a0d7 + name:Titus the Fox to Marrakech and Back (USA, Europe) + cheat + description:Infinite energy until level 3 + code:6e7d/35/00 + cheat + description:Infinite energy from level 3 on + code:6273/35/00 + cheat + description:Infinite lives + code:696a/35/00 + cheat + description:Start 1st life with 1 energy unit + code:53d0/05/01 + cheat + description:Start 1st life with 9 energy units + code:53d0/05/09 + cheat + description:Start with 1 energy unit after 1st life + code:21cf/05/01 + cheat + description:Start with 9 energy units after 1st life + code:21cf/05/09 + cheat + description:Start 1st level with 100-pt. bonus + code:53dc/00/64 + cheat + description:Start 1st level with 250-pt. bonus + code:53dc/00/fa + cheat + description:Start with 1 life + code:53d5/03/01 + cheat + description:Start with 6 lives + code:53d5/03/06 + cheat + description:Start with 9 lives + code:53d5/03/09 + cheat + description:Start on level 1, part 2 + code:03ba/af/00 + +cartridge sha256:17e1629cd8a95ef8d09643d62f7336efa7c0983f03ceda5038632d2125885fa6 + name:Toki Tori (USA, Europe) (En,Ja,Fr,De,Es) + cheat + description:Get eggs from anywhere + code:40ce/27/33+40cd/38/18 + +cartridge sha256:597f70c8d600427fee6f3a3714115bad30b24402dd830c36dc010a7b3a92a7a3 + name:Tom & Jerry (USA, Europe) + cheat + description:Invincibility + code:455c/fa/ea+455a/20/3e + cheat + description:Infinite lives + code:2854/d5/00 + cheat + description:Infinite balls once collected + code:4684/ea/fa + cheat + description:Infinite energy (may have to die once first) + code:2d47/34/00 + cheat + description:Infinite time + code:1c3f/ea/fa+1c43/ea/fa + cheat + description:Moon jump + code:40da/28/3e + cheat + description:Every time you collect one cheese you get 11 (can't go over 100) + code:4067/01/11 + cheat + description:Start with 1 life + code:4f7b/03/01 + cheat + description:Start with 5 lives + code:4f7b/03/05 + +cartridge sha256:bcd52c83f3662165baaeff2527fd221c04b734214d5dacb8cdda6fbcb95fbc3b + name:Tom and Jerry - Frantic Antics! (USA, Europe) + cheat + description:Infinite lives + code:1e39/d3/01 + cheat + description:Infinite lives + code:4ce4/35/00 + cheat + description:Infinite time + code:3143/01/00+3151/01/00 + cheat + description:Don't flash after getting hit + code:7333/78/01 + cheat + description:Flash longer after getting hit + code:7333/78/fa + cheat + description:Start with 1 life + code:390c/03/01 + cheat + description:Start with 5 lives + code:390c/03/05 + cheat + description:Start with 10 lives + code:390c/03/0a + cheat + description:Start with 1 minutes on the timer + code:30de/05/01 + cheat + description:Start with 10 minutes on the timer + code:30de/05/0a + cheat + description:Start with 15 minutes on the timer - ignore counter + code:30de/05/0f + +cartridge sha256:ebcba74ab890e56676a4c1720f89719a489b73c7c688d1fd0c6a98074dc7afeb + name:Tomb Raider (USA, Europe) (En,Fr,De,Es,It) + cheat + description:Invincibility against enemies + code:40f3/28/3e+40f5/35/77 + cheat + description:Hit anywhere + code:5927/65/00 + +cartridge sha256:a75109b2730df5bef628f05660d670f07a1be6c6249d73f7f88375061c3f3bbb + name:Tomb Raider - Curse of the Sword (USA, Europe) + cheat + description:Invincibility + code:41bc/35/77+41ba/28/3e + cheat + description:Hit anywhere (only when standing and not against a wall) + code:5de8/6b/00 + cheat + description:One hit kills + code:5615/77/fe+5614/90/cb + +cartridge sha256:1878a9fa68e052362b0fbb13421db1ae822ffd74b69db34217455f9e43ce61dd + name:Top Gear Pocket (USA) + cheat + description:No slowdown (except for drifting) + code:1f7c/21/c9+1ef2/da/c3 + +cartridge sha256:976b837a48218903e55ae86b943db2a3bf49c1aba0e5d6e135cb2e775416382e + name:Top Gear Pocket 2 (USA) + cheat + description:All cars unlocked + code:4092/c2/c3 + cheat + description:All tracks unlocked + code:11a7/c2/c3 + +cartridge sha256:bb2f56c5035b47183c55b197bc380ea02df00dd733ce732d062f7c7695bd330f + name:Top Gun - Guts & Glory (USA, Europe) + cheat + description:Infinite missiles + code:6424/ea/fa + cheat + description:Infinite lives + code:6859/c4/00 + cheat + description:Start with 1 life (do not alter mission on the first menu screen) + code:2be4/03/01 + cheat + description:Start with 5 lives (do not alter mission on the first menu screen) + code:2be4/03/05 + cheat + description:Start with 10 lives (do not alter mission on the first menu screen) + code:2be4/03/0a + cheat + description:Start on mission 10 (do not alter mission on the first menu screen) + code:6485/ea/00+6486/99/3e+6487/c5/0a + +cartridge sha256:13a6106b5548261764b0f0d676b07265e6ed37b4cf2f85fc763b05dde749eb64 + name:Total Carnage (USA, Europe) + cheat + description:Infinite grenades + code:2228/ea/fa + cheat + description:Infinite lives + code:21ad/3d/00 + cheat + description:Start with very little energy after 1st life + code:21b1/06/02 + cheat + description:Start with mega energy after 1st life + code:21b1/06/99 + cheat + description:Don't take damage from some enemies after getting hit + code:1355/3d/00 + cheat + description:Start with very little energy-1st life + code:4054/06/02 + cheat + description:Start with mega energy-1st life + code:4054/06/99 + cheat + description:Start with 1 life + code:404f/03/00 + cheat + description:Start with 9 lives + code:404f/03/08 + cheat + description:Start with 15 lives + code:404f/03/0f + cheat + description:Start with 33 grenades + code:405f/00/03 + +cartridge sha256:eae3b192006eff607dffdae3d7720af579f85335be81e6cacb55276bfc32424c + name:Track & Field (USA, Europe) + cheat + description:Always have 100% power + code:277f/28/3e+2780/01/00 + cheat + description:Max angle on long jump + code:6d99/80/45 + cheat + description:Max angle on javelin + code:5a1e/80/45 + cheat + description:Max angle on triple jump + code:54d1/80/45 + +cartridge sha256:9047447e6ff5b0b510732befa3f48a464aebfa9ba06274b3cf6120b25e8dd033 + name:Triple Play 2001 (USA, Europe) + cheat + description:Balls are considered strikes + code:73f2/32/00 + +cartridge sha256:3990c42543e74387c30ac935eb45067e291b4a5e93702d5520acd0e91d14f34f + name:Tumble Pop (USA, Europe) + cheat + description:Infinite lives + code:25bc/ea/fa + cheat + description:Only have 2 minutes to complete each screen + code:188a/03/02 + cheat + description:Only have 5 minutes to complete each screen + code:188a/03/05 + cheat + description:Only have 10 minutes to complete each screen + code:188a/03/0a + cheat + description:Start across river from original position + code:1817/00/05 + cheat + description:Start at island castle + code:1817/00/ff + cheat + description:Hold enemies inside gun as long as you want + code:2e68/35/00 + cheat + description:Start with 1 life + code:181c/03/00 + cheat + description:Start with 6 lives + code:181c/03/05 + cheat + description:Start with 9 lives + code:181c/03/08 + +cartridge sha256:954ed263a5133c608636af442c4c0ade7f9b7dfdc768e7bfbf31d2528a8d7796 + name:Turn and Burn (USA) + cheat + description:Infinite missiles + code:2e1c/35/00 + cheat + description:Gun doesn't overheat + code:3151/04/00 + cheat + description:Start with more Aim-54 missiles + code:1299/79/7c + cheat + description:Start with more Aim-9 missiles + code:128b/79/7c + +cartridge sha256:0ca41e5faef09acc0f440ddb57624fb66cfb5f945145b7acc9390dd6ab07803c + name:Turok - Battle of the Bionosaurs (USA, Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:6a9c/c0/c9 + cheat + description:Hit anywhere + code:6494/11/3a+6493/28/18 + cheat + description:Multi-jump + code:5f16/a7/3d+5f15/cb/8b + +cartridge sha256:0e82076895f9aa7f8b787d5c76a33d72394f611bd0ac93ecd550873b7ce21b60 + name:Turok - Rage Wars (USA, Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:0b78/fa/c9 + cheat + description:Infinite ammo + code:509f/77/00 + cheat + description:Hit anywhere + code:4198/20/18+4199/2d/22 + +cartridge sha256:21f2b0f417dd94f8aaa75adf09b849c97780ab9140b1d7d53ed4516f33233037 + name:Turok 2 - Seeds of Evil (USA, Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:4934/28/3e+4d8e/d0/c9 + cheat + description:Hit anywhere (you have to be in line with them on the streets) + code:750c/11/3a+750b/28/18 + cheat + description:Multi-jump + code:4bc5/cb/8b+4bc6/a7/3d + +cartridge sha256:1710b81824ea2044e7c475c3a8befe52fb8ba92f5dfc8866d7362c1e11393859 + name:Turok 3 - Shadow of Oblivion (USA, Europe) (En,Fr,De,Es) + cheat + description:Invincibility + code:43f9/20/18 + cheat + description:Infinite ammo + code:4efd/77/00 + cheat + description:Hit anywhere + code:44a8/ff/6c+4452/59/50+4451/30/18 + +cartridge sha256:9008df8d950b4e6966b38218e43bc3baf9bad91ef44b271b558aee6f38c993d7 + name:Ultima - Runes of Virtue (USA) + cheat + description:Infinite energy + code:05f3/ea/fa+3400/ea/fa + cheat + description:Infinite money + code:0b5b/ea/fa + cheat + description:Walk anywhere + code:2a2b/05/00+2aec/20/18 + cheat + description:Start with dexterity of 10 - Shamino codes only - can't use with Journey Onward option + code:762b/15/10 + cheat + description:Start with dexterity of 30 - Shamino codes only - can't use with Journey Onward option + code:762b/15/30 + cheat + description:Start with dexterity of 50 - Shamino codes only - can't use with Journey Onward option + code:762b/15/50 + cheat + description:Start with strength of 10 - Shamino codes only - can't use with Journey Onward option + code:762c/15/10 + cheat + description:Start with strength of 30 - Shamino codes only - can't use with Journey Onward option + code:762c/15/30 + cheat + description:Start with strength of 50 - Shamino codes only - can't use with Journey Onward option + code:562c/15/50 + cheat + description:Start with IQ of 10 - Shamino codes only - can't use with Journey Onward option + code:762f/15/10 + cheat + description:Start with IQ of 30 - Shamino codes only - can't use with Journey Onward option + code:762f/15/30 + cheat + description:Start with IQ of 50 - Shamino codes only - can't use with Journey Onward option + code:762f/15/50 + cheat + description:Start with 15 coins - Shamino codes only - can't use with Journey Onward option + code:7565/30/15 + cheat + description:Start with 40 coins - Shamino codes only - can't use with Journey Onward option + code:7565/30/40 + cheat + description:Start with 60 coins - Shamino codes only - can't use with Journey Onward option + code:7565/30/60 + cheat + description:No energy replacement - Shamino codes only - can't use with Journey Onward option + code:0c0a/ea/fa + +cartridge sha256:60d23465ffb1a84cb8c72a51146fd3bf2fa2fc323424098d801622e6190af761 + name:Ultima - Runes of Virtue II (USA) + cheat + description:Walk anywhere (player and enemies) + code:19bc/b7/af+1866/ca/c3+19bd/c0/c8 + +cartridge sha256:850a429b64b7ebcb8034da2c25789dff631d64682b1ce65f8de346c9744ae31e + name:Universal Soldier (USA, Europe) + cheat + description:Infinite energy + code:387a/35/00 + cheat + description:Infinite time + code:0a5a/35/00 + cheat + description:Infinite lives + code:03ee/c0/c9 + cheat + description:Fewer enemies on each level + code:1c50/34/00+1c4b/35/00 + cheat + description:Start with 5 lives + code:15d1/03/05 + cheat + description:Start with 7 lives + code:15d1/03/07 + cheat + description:Start with 9 lives + code:15d1/03/09 + cheat + description:Start with 5 power lines + code:16ac/03/05 + cheat + description:Start with 7 power lines + code:16ac/03/07 + cheat + description:Start with 9 power lines + code:16ac/03/09 + +cartridge sha256:102dabffa56271534c651579445c13a375e7978f37bdcccc3271e9320c3710fa + name:Uno (USA) + cheat + description:Place any card on the stack regardless of color + code:5891/ca/fa + +cartridge sha256:56b00fb68b829dabe56e88f3074316ee2f3022a15c6f45bd70bda5e8f62c2e8f + name:Uno - Small World (Japan) + cheat + description:Can place any color card on the stack + code:589f/30/18 + +cartridge sha256:88773be9e71529b35ce03d39f417e866f48df97cdfb894943f729dab7beefb90 + name:Uno 2 - Small World (Japan) (SGB Enhanced) + cheat + description:Place any card on the stack + code:5701/30/18+57b7/30/18 + +cartridge sha256:19e8ccfe0df0647cbd6517a456fcffa39c3a9ecc1e40dd31bd193423b4779020 + name:Velious - Roland no Majuu (Japan) + cheat + description:Invincibility + code:3bb6/ff/00 + cheat + description:Hit anywhere + code:3d5a/af/b7 + cheat + description:Walk through walls + code:038b/28/18 + +cartridge sha256:2b3ed695acb2fcd3aa8159b12373a55b01a72ae3a9e0867ef8446fd8abddec51 + name:Velious II - Fukushuu no Jashin (Japan) + cheat + description:Invincibility + code:3e3c/b7/af + cheat + description:Infinite TP + code:0e01/e0/f0 + cheat + description:Hit anywhere - main weapon + code:3fa7/d0/00+3f98/d8/00+3fa2/d8/00+3f9d/d0/00 + cheat + description:Hit anywhere - sub-weapon + code:3f70/d0/00+3f6b/d8/00+3f66/d0/00+3f61/d8/00 + cheat + description:Walk through walls + code:031d/28/18 + +cartridge sha256:1709e340bc089dc179bbc0c24242c9bd5fab9aa7bd1e57b1328725b9b4787786 + name:Wacky Races (USA) (En,Fr,Es) + cheat + description:Press select during gameplay to skip to the end of race in your current position + code:07d9/0f/00 + cheat + description:View ending (enable before booting the game) + code:018e/ff/fe + +cartridge sha256:1af2d4b29552fb2cf141955e1d77f8dd99e856b1f04fbff5240d5a1c3c2c41bf + name:Wario Blast featuring Bomberman! (USA, Europe) (SGB Enhanced) + cheat + description:Infinite time + code:0a5b/77/00 + cheat + description:Collect up to 8 extra bomb power-ups + code:53f1/04/08 + cheat + description:Extra bomb power-ups don't do anything + code:53ef/77/00 + cheat + description:Explosion expanders don't do anything + code:53d7/77/00 + cheat + description:Start with 300 seconds + code:1f87/01/03 + cheat + description:Start with 4 extra bomb power-ups + code:26c7/01/04 + cheat + description:Start with 4 explosion expander + code:26cb/00/04 + cheat + description:Start on round 3-3 + code:403b/ea/21+4013/af/00 + cheat + description:Start on round 3-Boss + code:403b/ea/21+4013/af/3c + +cartridge sha256:ac1682f17abcf590311a233289ee325214c2d71ab3a5aa175004002d85075e56 + name:Wario Land - Super Mario Land 3 (World) + cheat + description:Don't lose current power-up when you get hit or get a new power-up (switchable) + code:0d63/ea/fa + cheat + description:Most enemies and obstacles are invisible + code:43aa/02/00+36c0/ea/c9 + cheat + description:Multi-jump + code:518e/c2/c4+5193/c2/c4+5196/cb/18+5197/47/11 + cheat + description:Get 10 hearts for killing an enemy + code:03e4/01/10 + cheat + description:Get 25 hearts for killing an enemy + code:03e4/01/25 + cheat + description:Get 50 hearts for killing an enemy + code:03e4/01/50 + cheat + description:Get 99 hearts for killing an enemy + code:03e4/01/99 + cheat + description:Start as Small Wario + code:7b7e/01/00 + cheat + description:Start as Bull Wario + code:7b7e/01/02 + cheat + description:Start as Jet Wario + code:7b7e/01/03 + cheat + description:Start as Dragon Wario + code:7b7e/01/04 + cheat + description:Start with 10 hearts + code:7b7c/00/10 + cheat + description:Start with 25 hearts + code:7b7c/00/25 + cheat + description:Start with 50 hearts + code:7b7c/00/50 + cheat + description:Start with 99 hearts + code:7b7c/00/99 + cheat + description:Start with 10 coins + code:7b7b/00/10 + cheat + description:Start with 25 coins + code:7b7b/00/25 + cheat + description:Start with 50 coins + code:7b7b/00/50 + cheat + description:Start with 99 coins + code:7b7b/00/99 + cheat + description:Start with 10 lives + code:7b7d/05/10 + cheat + description:Start with 25 lives + code:7b7d/05/25 + cheat + description:Start with 50 lives + code:7b7d/05/50 + cheat + description:Start with 99 lives + code:7b7d/05/99 + cheat + description:Start on course 26 + code:7b7f/00/01 + cheat + description:No turbo boost + code:1240/3c/00 + cheat + description:Infinite turbo boost + code:12ca/3d/00 + cheat + description:No lap timer + code:53b7/22/00 + cheat + description:Start with 800cc bike + code:4965/20/3e+4966/03/02+4967/af/00 + cheat + description:Start with 650cc bike + code:4965/20/3e+4966/03/01+4967/af/00 + +cartridge sha256:5c11041f10b7ee96d433ef167dcb331acbf92deece796cdc10eb30ab7da1efee + name:Wave Race (USA, Europe) + cheat + description:Always have Dolphin Power + code:6ffa/20/3e+6fa9/46/00+6fa4/4b/00 + +cartridge sha256:a3bd35fb1d2466868b5308a45e8ad3844925bd5dfa819b27ff67d0391b8e3511 + name:WCW Main Event (USA, Europe) + cheat + description:Infinite time + code:233e/01/00 + cheat + description:One hit kills + code:1606/30/18+1605/90/af + cheat + description:Never regain energy + code:15d9/34/c9 + cheat + description:Computer does massive damage + code:163e/01/09 + cheat + description:Faster timer + code:233e/01/02 + +cartridge sha256:e424a9893faed6a486d66002ed606cf32d68dab71971ec461103396042800b63 + name:Wendy - Every Witch Way (USA, Europe) + cheat + description:Invincibility + code:4177/c0/c9 + cheat + description:Infinite Stars + code:4190/ea/fa + cheat + description:Infinite time + code:7fab/22/00 + cheat + description:Hit anywhere + code:6afa/20/af+6afb/5f/c9 + cheat + description:Shoot 3 projectiles from wand + code:5f9a/c2/c3 + +cartridge sha256:b915f6ffe0dd3ab9fe8972468013334a0c6d3f664982bc8ed8888e54d5bbbebf + name:Who Wants to Be a Millionaire - 2nd Edition (USA) + cheat + description:Always correct + code:18ff/28/18 + +cartridge sha256:db8029c84c99c1bff1724656d0887636497986fac02892f4d4334c60f646c84f + name:Wild Snake (USA) (SGB Enhanced) + cheat + description:Infinite time in King Cobra mode + code:0b1e/ea/fa + cheat + description:All snakes are shorter + code:227e/30/3e+227f/f5/03 + cheat + description:Only plain yellow snakes fall + code:2315/79/3e+2316/a7/01 + cheat + description:Only zig-zag snakes fall + code:2315/79/3e+2316/a7/02 + cheat + description:Only dark dotted snakes fall + code:2315/79/3e+2316/a7/03 + cheat + description:Only light dotted snakes fall + code:2315/79/3e+2316/a7/04 + cheat + description:Only dark striped snakes fall + code:2315/79/3e+2316/a7/05 + cheat + description:Only light striped snakes fall + code:2315/79/3e+2316/a7/06 + cheat + description:Only vertically striped snakes fall + code:2315/79/3e+2316/a7/07 + cheat + description:Only checkered snake snakes fall + code:2315/79/3e+2316/a7/08 + cheat + description:Only skeleton snakes fall + code:2315/79/3e+2316/a7/0a + cheat + description:Only temporarily invisible snakes fall + code:2315/79/3e+2316/a7/0b + cheat + description:Only dark snakes fall + code:2315/79/3e+2316/a7/0c + cheat + description:Only wild snakes fall + code:2315/79/3e+2316/a7/0d + cheat + description:Only king cobra snakes fall + code:2315/79/3e+2316/a7/0e + cheat + description:Collect 1 snake in King Cobra mode and finish level + code:26df/fa/3e+26e1/c8/3e+26e2/3c/30 + cheat + description:Snakes fall very fast + code:4553/fa/3e+4554/4b/01+4555/c6/00 + cheat + description:Snakes fall extremely fast + code:4553/fa/3e+4554/4b/00+4555/c6/00 + cheat + description:Snakes fall slower + code:4553/fa/3e+4554/4b/05+4555/c6/00 + cheat + description:Snakes fall very slow + code:4553/fa/3e+4554/4b/1f+4555/c6/00 + cheat + description:Snakes fall extremely slow + code:4553/fa/3e+4554/4b/af+4555/c6/00 + +cartridge sha256:b396d2a15563b6144630d5ec5f0a8a2928a4b289ca215e6cc581df7a5fe295ff + name:WordZap (USA) + cheat + description:Infinite hints + code:0870/35/00 + cheat + description:Any word is acceptable + code:137d/20/18 + cheat + description:Start with only 1 hint + code:1bc9/04/01 + cheat + description:Start with 5 hints + code:1bc9/04/05 + cheat + description:Start with 9 hints + code:1bc9/04/09 + cheat + description:Start with 1 chance + code:1bce/03/01 + cheat + description:Start with 9 chances + code:1bce/03/09 + +cartridge sha256:439854d8d2ec85bffb171efe3ec0d6ba98fed2443b26053340daaf8190611859 + name:World Bowling (USA) + cheat + description:Always bowl at full power + code:4694/c6/3e+4695/09/ff + cheat + description:Get a spare even if you miss + code:5344/79/3e+5345/90/0a + +cartridge sha256:246d48cb2a6ed53a7cf78d94fc219762aaaea0111467a5fcf415ca76f9170124 + name:World Circuit Series (USA) + cheat + description:No loss of speed on course you take your finger from acceleration button + code:1ca0/3d/00 + cheat + description:No loss of speed when you leave course-except hitting walls + code:1ae2/35/00 + cheat + description:No qualifying timer + code:0384/35/00+0385/c0/c9 + +cartridge sha256:03e6c6bcd5c9942a7fd30917c70524f961e152bdd3b4e70bf1fd9f012635c065 + name:World Heroes 2 Jet (USA, Europe) (SGB Enhanced) + cheat + description:Hit anywhere - both players + code:46a1/ca/fa+452c/20/18 + +cartridge sha256:0ba3d3b9be8c615bd29956887584aff9446a88fb2606bfb8ccc75907164c4cf9 + name:WWF King of the Ring (USA, Europe) + cheat + description:No out of ring timer + code:2c0f/01/00 + +cartridge sha256:770a3c6cd89d34af0d452eb4f52cd5a2f9d2651b9b54b247de349ff701f59a52 + name:WWF Raw (USA, Europe) + cheat + description:Infinite health - P1 + code:0154/cf/10 + cheat + description:No health - P2 + code:0100/cf/4f + +cartridge sha256:e5971b4a0c14a8dc06386844975ea76a65a9f81539e43bbe90a6bed198990b15 + name:WWF WrestleMania 2000 (USA, Europe) + cheat + description:Infinite health - P1 + code:0164/c0/b8 + cheat + description:Infinite health - P2 + code:0184/c0/f9 + cheat + description:No health - P1 + code:0100/c0/b8 + cheat + description:No health - P2 + code:0100/c0/f9 + cheat + description:Always fight in cage + code:0102/c6/94 + cheat + description:Always fight in ring + code:0101/c6/94 + +cartridge sha256:85c5368af171f9c47e02157222f140ad44ee9f9307f31838ffe9430793d80c65 + name:X-Men - Mutant Academy (USA, Europe) + cheat + description:Hit anywhere - both players + code:5465/28/18+5466/01/12+52e6/d0/c9 + +cartridge sha256:e8b42d935ea865f0b00f2a5447c8695799116e33dea30eaec5159ce7df225348 + name:X-Men - Mutant Wars (USA, Europe) + cheat + description:Invincibility + code:1699/30/18 + cheat + description:Hit anywhere + code:15fa/35/00 + cheat + description:One hit kills + code:7225/28/18 + cheat + description:One hit kills - bosses + code:40a4/38/18 + +cartridge sha256:3843f2cdb0746ff0cf7dc97e1aab4fc6a15219e7ac8e1970ead475a835c57aea + name:Xenon 2 - Megablast (USA, Europe) + cheat + description:Invincibility + code:1e50/ea/fa + cheat + description:Infinite energy + code:2416/ea/fa + cheat + description:Infinite lives + code:02eb/ea/fa + cheat + description:Purchases at shop are free + code:36db/21/c9 + cheat + description:When you die you get an awesome ship (for a while) + code:02f4/af/00 + cheat + description:Start with very little energy + code:0308/12/01 + cheat + description:Start with 1/3 energy + code:0308/12/05 + cheat + description:Start with 1/2 energy + code:0308/12/09 + cheat + description:Start with 2,222,222 points + code:0204/af/00 + cheat + description:Start with 1 life + code:3175/05/01 + cheat + description:Start with 5 lives + code:3175/05/05 + cheat + description:Start with 10 lives + code:3175/05/0a + +cartridge sha256:79847fc3769d81c17f95f7d4797b25129c5bf416e9da2a16ab2d09d71e9b9bbe + name:Yogi Bear - Great Balloon Blast (USA) + cheat + description:Power-up after almost every shot + code:77cb/28/00 + cheat + description:Power-up after almost every shot (alt) + code:0928/c9/26 + +cartridge sha256:98fb28e23fa2bdb969317544bf0fd5c24fb377134cac12897b29889bc67f6ca6 + name:Yogi Bear in Yogi Bear's Goldrush (USA) + cheat + description:Power-up after almost every shot + code:77cb/28/00 + +cartridge sha256:a41d3ab34e91fccdf6b4e3a203dbf606d1097b702039fdf2f252cb18c4c9f925 + name:Yoshi (USA) + cheat + description:Always get half egg pieces + code:1afc/11/1d+1afb/38/18+1af8/12/1e + cheat + description:At random intervals, 1 block comes down instead of 2 + code:13bb/7e/00 + cheat + description:When setup screen appears, go to level select, push right once to start on level 6 + code:2c70/fa/3e+2c71/b1/06+2c72/c6/22 + cheat + description:When setup screen appears, go to level select, push right once to start on level 8 + code:2c70/fa/3e+2c71/b1/08+2c72/c6/22 + cheat + description:No timer for game B + code:4c71/34/00 + +cartridge sha256:fb29a19cae1b04bf0f3e20e9f9853d62a5b3bf536c8aece32943442d5bb0a049 + name:Yoshi's Cookie (USA, Europe) + cheat + description:Move one column to clear level + code:13f8/f2/00 + +cartridge sha256:1f6a79c3a548718eea5cf530f30d67f8fd76ee9693cd2da164caef36d310a501 + name:Zen - Intergalactic Ninja (USA) + cheat + description:Infinite lives + code:196d/ea/fa + cheat + description:Infinite energy against bullets and most enemies + code:4336/ea/fa+42a4/ea/fa + cheat + description:Instant staff power-up (hold B) + code:2a3e/05/01 + cheat + description:No energy loss against fire + code:51b1/ea/fa + cheat + description:No energy loss against hang-on enemies + code:2fda/ea/fa + cheat + description:Start lives with 1/2 energy + code:7166/0a/05 + cheat + description:Start each life with 7 energy points + code:7166/0a/07 + cheat + description:Start with 1 life + code:0591/03/01 + cheat + description:Start with 5 lives + code:0591/03/05 + cheat + description:Start with 10 lives + code:0591/03/0a + diff --git a/bsnes/GNUmakefile b/bsnes/GNUmakefile index a30bc625..7586ee79 100644 --- a/bsnes/GNUmakefile +++ b/bsnes/GNUmakefile @@ -34,10 +34,12 @@ else $(error "unsupported platform") endif -objects := libco emulator +objects := libco emulator filter lzma obj/libco.o: ../libco/libco.c obj/emulator.o: emulator/emulator.cpp +obj/filter.o: filter/filter.cpp +obj/lzma.o: lzma/lzma.cpp include sfc/GNUmakefile include gb/GNUmakefile diff --git a/bsnes/target-bsnes/resource/locales/japanese.bml b/bsnes/Locale/Japanese.bml similarity index 100% rename from bsnes/target-bsnes/resource/locales/japanese.bml rename to bsnes/Locale/Japanese.bml diff --git a/bsnes/emulator/emulator.hpp b/bsnes/emulator/emulator.hpp index 0f63807c..e633eb7e 100644 --- a/bsnes/emulator/emulator.hpp +++ b/bsnes/emulator/emulator.hpp @@ -31,7 +31,7 @@ using namespace nall; namespace Emulator { static const string Name = "bsnes"; - static const string Version = "107.3"; + static const string Version = "107.4"; static const string Author = "byuu"; static const string License = "GPLv3"; static const string Website = "https://byuu.org/"; diff --git a/bsnes/emulator/platform.hpp b/bsnes/emulator/platform.hpp index 09288cb5..c427f6c0 100644 --- a/bsnes/emulator/platform.hpp +++ b/bsnes/emulator/platform.hpp @@ -16,7 +16,7 @@ struct Platform { virtual auto path(uint id) -> string { return ""; } virtual auto open(uint id, string name, vfs::file::mode mode, bool required = false) -> vfs::shared::file { return {}; } virtual auto load(uint id, string name, string type, vector options = {}) -> Load { return {}; } - virtual auto videoFrame(const uint32* data, uint pitch, uint width, uint height) -> void {} + virtual auto videoFrame(const uint16* data, uint pitch, uint width, uint height) -> void {} virtual auto audioFrame(const double* samples, uint channels) -> void {} virtual auto inputPoll(uint port, uint device, uint input) -> int16 { return 0; } virtual auto inputRumble(uint port, uint device, uint input, bool enable) -> void {} diff --git a/bsnes/emulator/video/video.cpp b/bsnes/emulator/video/video.cpp index 816f7657..e83ce2db 100644 --- a/bsnes/emulator/video/video.cpp +++ b/bsnes/emulator/video/video.cpp @@ -20,8 +20,6 @@ auto Video::reset(Interface* interface) -> void { width = 0; height = 0; effects.colorBleed = false; - effects.interframeBlending = false; - effects.rotateLeft = false; } auto Video::setPalette() -> void { @@ -85,14 +83,6 @@ auto Video::setEffect(Effect effect, const any& value) -> void { if(effect == Effect::ColorBleed && value.is()) { effects.colorBleed = value.get(); } - - if(effect == Effect::InterframeBlending && value.is()) { - effects.interframeBlending = value.get(); - } - - if(effect == Effect::RotateLeft && value.is()) { - effects.rotateLeft = value.get(); - } } auto Video::createSprite(uint width, uint height) -> shared_pointer { @@ -128,18 +118,9 @@ auto Video::refresh(uint32* input, uint pitch, uint width, uint height) -> void auto source = input + y * pitch; auto target = output + y * width; - if(!effects.interframeBlending) { - for(uint x : range(width)) { - auto color = palette[*source++]; - *target++ = color; - } - } else { - uint32 mask = depth == 30 ? 0x40100401 : 0x01010101; - for(uint x : range(width)) { - auto a = *target; - auto b = palette[*source++]; - *target++ = (a + b - ((a ^ b) & mask)) >> 1; - } + for(uint x : range(width)) { + auto color = palette[*source++]; + *target++ = color; } } @@ -155,18 +136,6 @@ auto Video::refresh(uint32* input, uint pitch, uint width, uint height) -> void } } - if(effects.rotateLeft) { - for(uint y : range(height)) { - auto source = buffer + y * width; - for(uint x : range(width)) { - auto target = rotate + (width - 1 - x) * height + y; - *target = *source++; - } - } - output = rotate; - swap(width, height); - } - for(auto& sprite : sprites) { if(!sprite->visible) continue; @@ -185,7 +154,7 @@ auto Video::refresh(uint32* input, uint pitch, uint width, uint height) -> void } } - platform->videoFrame(output, width * sizeof(uint32), width, height); + platform->videoFrame((const uint16*)output, width * sizeof(uint32), width, height); } } diff --git a/bsnes/emulator/video/video.hpp b/bsnes/emulator/video/video.hpp index 7b57d829..cb0b23e1 100644 --- a/bsnes/emulator/video/video.hpp +++ b/bsnes/emulator/video/video.hpp @@ -9,8 +9,6 @@ struct Sprite; struct Video { enum class Effect : uint { ColorBleed, - InterframeBlending, - RotateLeft, }; ~Video(); @@ -48,8 +46,6 @@ private: struct Effects { bool colorBleed = false; - bool interframeBlending = false; - bool rotateLeft = false; } effects; friend class Sprite; diff --git a/bsnes/filter/2xsai.cpp b/bsnes/filter/2xsai.cpp new file mode 100644 index 00000000..9cc43d1a --- /dev/null +++ b/bsnes/filter/2xsai.cpp @@ -0,0 +1,25 @@ +namespace Filter::_2xSaI { + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +uint32_t temp[512 * 480]; + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + for(unsigned y = 0; y < height; y++) { + const uint16_t *line_in = (const uint16_t*)(((const uint8_t*)input) + pitch * y); + uint32_t *line_out = temp + y * width; + for(unsigned x = 0; x < width; x++) { + line_out[x] = colortable[line_in[x]]; + } + } + + _2xSaI32((unsigned char*)temp, width * sizeof(uint32_t), 0, (unsigned char*)output, outpitch, width, height); +} + +} diff --git a/bsnes/filter/filter.cpp b/bsnes/filter/filter.cpp new file mode 100644 index 00000000..469b9b7f --- /dev/null +++ b/bsnes/filter/filter.cpp @@ -0,0 +1,25 @@ +#include + +#undef register +#define register +#include "sai/sai.cpp" + +uint32_t* colortable; +#include "snes_ntsc/snes_ntsc.h" +#include "snes_ntsc/snes_ntsc.c" + +#include "none.cpp" +#include "scanlines-light.cpp" +#include "scanlines-dark.cpp" +#include "scanlines-black.cpp" +#include "pixellate2x.cpp" +#include "scale2x.cpp" +#include "2xsai.cpp" +#include "super-2xsai.cpp" +#include "super-eagle.cpp" +#include "lq2x.cpp" +#include "hq2x.cpp" +#include "ntsc-rf.cpp" +#include "ntsc-composite.cpp" +#include "ntsc-svideo.cpp" +#include "ntsc-rgb.cpp" diff --git a/bsnes/filter/filter.hpp b/bsnes/filter/filter.hpp new file mode 100644 index 00000000..0b46b512 --- /dev/null +++ b/bsnes/filter/filter.hpp @@ -0,0 +1,123 @@ +#pragma once + +#include + +namespace Filter::None { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::ScanlinesLight { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::ScanlinesDark { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::ScanlinesBlack { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::Pixellate2x { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::Scale2x { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::_2xSaI { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::Super2xSaI { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::SuperEagle { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::LQ2x { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::HQ2x { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::NTSC_RF { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::NTSC_Composite { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::NTSC_SVideo { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} + +namespace Filter::NTSC_RGB { + auto size(uint& width, uint& height) -> void; + auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height + ) -> void; +} diff --git a/bsnes/filter/hq2x.cpp b/bsnes/filter/hq2x.cpp new file mode 100644 index 00000000..8b3691bb --- /dev/null +++ b/bsnes/filter/hq2x.cpp @@ -0,0 +1,200 @@ +namespace Filter::HQ2x { + +enum { + diff_offset = (0x440 << 21) + (0x207 << 11) + 0x407, + diff_mask = (0x380 << 21) + (0x1f0 << 11) + 0x3f0, +}; + +uint32_t *yuvTable; +uint8_t rotate[256]; + +const uint8_t hqTable[256] = { + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 15, 12, 5, 3, 17, 13, + 4, 4, 6, 18, 4, 4, 6, 18, 5, 3, 12, 12, 5, 3, 1, 12, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 17, 13, 5, 3, 16, 14, + 4, 4, 6, 18, 4, 4, 6, 18, 5, 3, 16, 12, 5, 3, 1, 14, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 19, 12, 12, 5, 19, 16, 12, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 12, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 19, 1, 12, 5, 19, 1, 14, + 4, 4, 6, 2, 4, 4, 6, 18, 5, 3, 16, 12, 5, 19, 1, 14, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 15, 12, 5, 3, 17, 13, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 12, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 17, 13, 5, 3, 16, 14, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 13, 5, 3, 1, 14, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 16, 13, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 1, 12, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 16, 12, 5, 3, 1, 14, + 4, 4, 6, 2, 4, 4, 6, 2, 5, 3, 1, 12, 5, 3, 1, 14, +}; + +static void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + yuvTable = new uint32_t[32768]; + + for(unsigned i = 0; i < 32768; i++) { + uint8_t R = (i >> 0) & 31; + uint8_t G = (i >> 5) & 31; + uint8_t B = (i >> 10) & 31; + + //bgr555->bgr888 + double r = (R << 3) | (R >> 2); + double g = (G << 3) | (G >> 2); + double b = (B << 3) | (B >> 2); + + //bgr888->yuv + double y = (r + g + b) * (0.25f * (63.5f / 48.0f)); + double u = ((r - b) * 0.25f + 128.0f) * (7.5f / 7.0f); + double v = ((g * 2.0f - r - b) * 0.125f + 128.0f) * (7.5f / 6.0f); + + yuvTable[i] = ((unsigned)y << 21) + ((unsigned)u << 11) + ((unsigned)v); + } + + //counter-clockwise rotation table; one revolution: + //123 369 12346789 + //4.6 -> 2.8 = + //789 147 36928147 + for(unsigned n = 0; n < 256; n++) { + rotate[n] = ((n >> 2) & 0x11) | ((n << 2) & 0x88) + | ((n & 0x01) << 5) | ((n & 0x08) << 3) + | ((n & 0x10) >> 3) | ((n & 0x80) >> 5); + } +} + +static void terminate() { + delete[] yuvTable; +} + +static bool same(uint16_t x, uint16_t y) { + return !((yuvTable[x] - yuvTable[y] + diff_offset) & diff_mask); +} + +static bool diff(uint32_t x, uint16_t y) { + return ((x - yuvTable[y]) & diff_mask); +} + +static void grow(uint32_t &n) { n |= n << 16; n &= 0x03e07c1f; } +static uint16_t pack(uint32_t n) { n &= 0x03e07c1f; return n | (n >> 16); } + +static uint16_t blend1(uint32_t A, uint32_t B) { + grow(A); grow(B); + return pack((A * 3 + B) >> 2); +} + +static uint16_t blend2(uint32_t A, uint32_t B, uint32_t C) { + grow(A); grow(B); grow(C); + return pack((A * 2 + B + C) >> 2); +} + +static uint16_t blend3(uint32_t A, uint32_t B, uint32_t C) { + grow(A); grow(B); grow(C); + return pack((A * 5 + B * 2 + C) >> 3); +} + +static uint16_t blend4(uint32_t A, uint32_t B, uint32_t C) { + grow(A); grow(B); grow(C); + return pack((A * 6 + B + C) >> 3); +} + +static uint16_t blend5(uint32_t A, uint32_t B, uint32_t C) { + grow(A); grow(B); grow(C); + return pack((A * 2 + (B + C) * 3) >> 3); +} + +static uint16_t blend6(uint32_t A, uint32_t B, uint32_t C) { + grow(A); grow(B); grow(C); + return pack((A * 14 + B + C) >> 4); +} + +static uint16_t blend(unsigned rule, uint16_t E, uint16_t A, uint16_t B, uint16_t D, uint16_t F, uint16_t H) { + switch(rule) { default: + case 0: return E; + case 1: return blend1(E, A); + case 2: return blend1(E, D); + case 3: return blend1(E, B); + case 4: return blend2(E, D, B); + case 5: return blend2(E, A, B); + case 6: return blend2(E, A, D); + case 7: return blend3(E, B, D); + case 8: return blend3(E, D, B); + case 9: return blend4(E, D, B); + case 10: return blend5(E, D, B); + case 11: return blend6(E, D, B); + case 12: return same(B, D) ? blend2(E, D, B) : E; + case 13: return same(B, D) ? blend5(E, D, B) : E; + case 14: return same(B, D) ? blend6(E, D, B) : E; + case 15: return same(B, D) ? blend2(E, D, B) : blend1(E, A); + case 16: return same(B, D) ? blend4(E, D, B) : blend1(E, A); + case 17: return same(B, D) ? blend5(E, D, B) : blend1(E, A); + case 18: return same(B, F) ? blend3(E, B, D) : blend1(E, D); + case 19: return same(D, H) ? blend3(E, D, B) : blend1(E, B); + } +} + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + + pitch >>= 1; + outpitch >>= 2; + + for(uint y = 0; y < height; y++) { + const uint16_t* in = input + y * pitch; + uint32_t* out0 = output + y * outpitch * 2; + uint32_t* out1 = output + y * outpitch * 2 + outpitch; + + int prevline = (y == 0 ? 0 : pitch); + int nextline = (y == height - 1 ? 0 : pitch); + + in++; + *out0++ = 0; *out0++ = 0; + *out1++ = 0; *out1++ = 0; + + for(unsigned x = 1; x < width - 1; x++) { + uint16_t A = *(in - prevline - 1); + uint16_t B = *(in - prevline + 0); + uint16_t C = *(in - prevline + 1); + uint16_t D = *(in - 1); + uint16_t E = *(in + 0); + uint16_t F = *(in + 1); + uint16_t G = *(in + nextline - 1); + uint16_t H = *(in + nextline + 0); + uint16_t I = *(in + nextline + 1); + uint32_t e = yuvTable[E] + diff_offset; + + uint8_t pattern; + pattern = diff(e, A) << 0; + pattern |= diff(e, B) << 1; + pattern |= diff(e, C) << 2; + pattern |= diff(e, D) << 3; + pattern |= diff(e, F) << 4; + pattern |= diff(e, G) << 5; + pattern |= diff(e, H) << 6; + pattern |= diff(e, I) << 7; + + *(out0 + 0) = colortable[blend(hqTable[pattern], E, A, B, D, F, H)]; pattern = rotate[pattern]; + *(out0 + 1) = colortable[blend(hqTable[pattern], E, C, F, B, H, D)]; pattern = rotate[pattern]; + *(out1 + 1) = colortable[blend(hqTable[pattern], E, I, H, F, D, B)]; pattern = rotate[pattern]; + *(out1 + 0) = colortable[blend(hqTable[pattern], E, G, D, H, B, F)]; + + in++; + out0 += 2; + out1 += 2; + } + + in++; + *out0++ = 0; *out0++ = 0; + *out1++ = 0; *out1++ = 0; + } +} + +} diff --git a/bsnes/filter/lq2x.cpp b/bsnes/filter/lq2x.cpp new file mode 100644 index 00000000..31b90e0f --- /dev/null +++ b/bsnes/filter/lq2x.cpp @@ -0,0 +1,46 @@ +namespace Filter::LQ2x { + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + pitch >>= 1; + outpitch >>= 2; + + for(uint y = 0; y < height; y++) { + const uint16_t* in = input + y * pitch; + uint32_t* out0 = output + y * outpitch * 2; + uint32_t* out1 = output + y * outpitch * 2 + outpitch; + + int prevline = (y == 0 ? 0 : pitch); + int nextline = (y == height - 1 ? 0 : pitch); + + for(uint x = 0; x < width; x++) { + uint16_t A = *(in - prevline); + uint16_t B = (x > 0) ? *(in - 1) : *in; + uint16_t C = *in; + uint16_t D = (x < width - 1) ? *(in + 1) : *in; + uint16_t E = *(in++ + nextline); + uint32_t c = colortable[C]; + + if(A != E && B != D) { + *out0++ = (A == B ? colortable[C + A - ((C ^ A) & 0x0421) >> 1] : c); + *out0++ = (A == D ? colortable[C + A - ((C ^ A) & 0x0421) >> 1] : c); + *out1++ = (E == B ? colortable[C + E - ((C ^ E) & 0x0421) >> 1] : c); + *out1++ = (E == D ? colortable[C + E - ((C ^ E) & 0x0421) >> 1] : c); + } else { + *out0++ = c; + *out0++ = c; + *out1++ = c; + *out1++ = c; + } + } + } +} + +} diff --git a/bsnes/filter/none.cpp b/bsnes/filter/none.cpp new file mode 100644 index 00000000..ce148ce0 --- /dev/null +++ b/bsnes/filter/none.cpp @@ -0,0 +1,24 @@ +namespace Filter::None { + +auto size(uint& width, uint& height) -> void { + width = width; + height = height; +} + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + pitch >>= 1; + outpitch >>= 2; + + for(uint y = 0; y < height; y++) { + const uint16_t* in = input + y * pitch; + uint32_t* out = output + y * outpitch; + for(uint x = 0; x < width; x++) { + *out++ = colortable[*in++]; + } + } +} + +} diff --git a/bsnes/filter/ntsc-composite.cpp b/bsnes/filter/ntsc-composite.cpp new file mode 100644 index 00000000..fa171c7a --- /dev/null +++ b/bsnes/filter/ntsc-composite.cpp @@ -0,0 +1,50 @@ +namespace Filter::NTSC_Composite { + +struct snes_ntsc_t *ntsc; +snes_ntsc_setup_t setup; +int burst; +int burst_toggle; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + ntsc = (snes_ntsc_t*)malloc(sizeof *ntsc); + setup = snes_ntsc_composite; + setup.merge_fields = 1; + snes_ntsc_init(ntsc, &setup); + + burst = 0; + burst_toggle = (setup.merge_fields ? 0 : 1); +} + +void terminate() { + if(ntsc) free(ntsc); +} + +auto size(uint& width, uint& height) -> void { + width = SNES_NTSC_OUT_WIDTH(256); + height = height; +} + +auto render( + uint32_t* colortable_, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + colortable = colortable_; + + pitch >>= 1; + outpitch >>= 2; + + if(width <= 256) { + snes_ntsc_blit (ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } else { + snes_ntsc_blit_hires(ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } + + burst ^= burst_toggle; +} + +} diff --git a/bsnes/filter/ntsc-rf.cpp b/bsnes/filter/ntsc-rf.cpp new file mode 100644 index 00000000..675a57c8 --- /dev/null +++ b/bsnes/filter/ntsc-rf.cpp @@ -0,0 +1,50 @@ +namespace Filter::NTSC_RF { + +struct snes_ntsc_t *ntsc; +snes_ntsc_setup_t setup; +int burst; +int burst_toggle; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + ntsc = (snes_ntsc_t*)malloc(sizeof *ntsc); + setup = snes_ntsc_composite; + setup.merge_fields = 0; + snes_ntsc_init(ntsc, &setup); + + burst = 0; + burst_toggle = (setup.merge_fields ? 0 : 1); +} + +void terminate() { + if(ntsc) free(ntsc); +} + +auto size(uint& width, uint& height) -> void { + width = SNES_NTSC_OUT_WIDTH(256); + height = height; +} + +auto render( + uint32_t* colortable_, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + colortable = colortable_; + + pitch >>= 1; + outpitch >>= 2; + + if(width <= 256) { + snes_ntsc_blit (ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } else { + snes_ntsc_blit_hires(ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } + + burst ^= burst_toggle; +} + +} diff --git a/bsnes/filter/ntsc-rgb.cpp b/bsnes/filter/ntsc-rgb.cpp new file mode 100644 index 00000000..effd79d7 --- /dev/null +++ b/bsnes/filter/ntsc-rgb.cpp @@ -0,0 +1,50 @@ +namespace Filter::NTSC_RGB { + +struct snes_ntsc_t *ntsc; +snes_ntsc_setup_t setup; +int burst; +int burst_toggle; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + ntsc = (snes_ntsc_t*)malloc(sizeof *ntsc); + setup = snes_ntsc_rgb; + setup.merge_fields = 1; + snes_ntsc_init(ntsc, &setup); + + burst = 0; + burst_toggle = (setup.merge_fields ? 0 : 1); +} + +void terminate() { + if(ntsc) free(ntsc); +} + +auto size(uint& width, uint& height) -> void { + width = SNES_NTSC_OUT_WIDTH(256); + height = height; +} + +auto render( + uint32_t* colortable_, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + colortable = colortable_; + + pitch >>= 1; + outpitch >>= 2; + + if(width <= 256) { + snes_ntsc_blit (ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } else { + snes_ntsc_blit_hires(ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } + + burst ^= burst_toggle; +} + +} diff --git a/bsnes/filter/ntsc-svideo.cpp b/bsnes/filter/ntsc-svideo.cpp new file mode 100644 index 00000000..e4045b06 --- /dev/null +++ b/bsnes/filter/ntsc-svideo.cpp @@ -0,0 +1,50 @@ +namespace Filter::NTSC_SVideo { + +struct snes_ntsc_t *ntsc; +snes_ntsc_setup_t setup; +int burst; +int burst_toggle; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + ntsc = (snes_ntsc_t*)malloc(sizeof *ntsc); + setup = snes_ntsc_svideo; + setup.merge_fields = 1; + snes_ntsc_init(ntsc, &setup); + + burst = 0; + burst_toggle = (setup.merge_fields ? 0 : 1); +} + +void terminate() { + if(ntsc) free(ntsc); +} + +auto size(uint& width, uint& height) -> void { + width = SNES_NTSC_OUT_WIDTH(256); + height = height; +} + +auto render( + uint32_t* colortable_, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + colortable = colortable_; + + pitch >>= 1; + outpitch >>= 2; + + if(width <= 256) { + snes_ntsc_blit (ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } else { + snes_ntsc_blit_hires(ntsc, input, pitch, burst, width, height, output, outpitch << 2); + } + + burst ^= burst_toggle; +} + +} diff --git a/bsnes/filter/pixellate2x.cpp b/bsnes/filter/pixellate2x.cpp new file mode 100644 index 00000000..ac18fb24 --- /dev/null +++ b/bsnes/filter/pixellate2x.cpp @@ -0,0 +1,40 @@ +namespace Filter::Pixellate2x { + +auto size(uint& width, uint& height) -> void { + width = (width <= 256) ? width * 2 : width; + height = (height <= 240) ? height * 2 : height; +} + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + pitch >>= 1; + outpitch >>= 2; + + uint32_t *out0 = output; + uint32_t *out1 = output + outpitch; + + for(unsigned y = 0; y < height; y++) { + for(unsigned x = 0; x < width; x++) { + uint32_t p = colortable[*input++]; + + *out0++ = p; + if(height <= 240) *out1++ = p; + if(width > 256) continue; + + *out0++ = p; + if(height <= 240) *out1++ = p; + } + + input += pitch - width; + if(height <= 240) { + out0 += outpitch + outpitch - 512; + out1 += outpitch + outpitch - 512; + } else { + out0 += outpitch - 512; + } + } +} + +} diff --git a/bsnes/filter/sai/sai.cpp b/bsnes/filter/sai/sai.cpp new file mode 100644 index 00000000..463326d9 --- /dev/null +++ b/bsnes/filter/sai/sai.cpp @@ -0,0 +1,1175 @@ +#if defined(ENDIAN_MSB) + #define WORDS_BIGENDIAN +#endif + +static uint32_t colorMask = 0xFEFEFE; +static uint32_t lowPixelMask = 0x010101; +static uint32_t qcolorMask = 0xFCFCFC; +static uint32_t qlowpixelMask = 0x030303; +static uint32_t redblueMask = 0xFF00FF; +static uint32_t greenMask = 0xFF00; + +uint32_t qRGB_COLOR_MASK[2] = { 0xFEFEFE, 0xFEFEFE }; + +static inline int GetResult1 (uint32_t A, uint32_t B, uint32_t C, uint32_t D, + uint32_t /* E */) +{ + int x = 0; + int y = 0; + int r = 0; + + if (A == C) + x += 1; + else if (B == C) + y += 1; + if (A == D) + x += 1; + else if (B == D) + y += 1; + if (x <= 1) + r += 1; + if (y <= 1) + r -= 1; + return r; +} + +static inline int GetResult2 (uint32_t A, uint32_t B, uint32_t C, uint32_t D, + uint32_t /* E */) +{ + int x = 0; + int y = 0; + int r = 0; + + if (A == C) + x += 1; + else if (B == C) + y += 1; + if (A == D) + x += 1; + else if (B == D) + y += 1; + if (x <= 1) + r -= 1; + if (y <= 1) + r += 1; + return r; +} + +static inline int GetResult (uint32_t A, uint32_t B, uint32_t C, uint32_t D) +{ + int x = 0; + int y = 0; + int r = 0; + + if (A == C) + x += 1; + else if (B == C) + y += 1; + if (A == D) + x += 1; + else if (B == D) + y += 1; + if (x <= 1) + r += 1; + if (y <= 1) + r -= 1; + return r; +} + +static inline uint32_t INTERPOLATE (uint32_t A, uint32_t B) +{ + if (A != B) { + return (((A & colorMask) >> 1) + ((B & colorMask) >> 1) + + (A & B & lowPixelMask)); + } else + return A; +} + +static inline uint32_t Q_INTERPOLATE (uint32_t A, uint32_t B, uint32_t C, uint32_t D) +{ + register uint32_t x = ((A & qcolorMask) >> 2) + + ((B & qcolorMask) >> 2) + + ((C & qcolorMask) >> 2) + ((D & qcolorMask) >> 2); + register uint32_t y = (A & qlowpixelMask) + + (B & qlowpixelMask) + (C & qlowpixelMask) + (D & qlowpixelMask); + + y = (y >> 2) & qlowpixelMask; + return x + y; +} + +static inline int GetResult1_32 (uint32_t A, uint32_t B, uint32_t C, uint32_t D, + uint32_t /* E */) +{ + int x = 0; + int y = 0; + int r = 0; + + if (A == C) + x += 1; + else if (B == C) + y += 1; + if (A == D) + x += 1; + else if (B == D) + y += 1; + if (x <= 1) + r += 1; + if (y <= 1) + r -= 1; + return r; +} + +static inline int GetResult2_32 (uint32_t A, uint32_t B, uint32_t C, uint32_t D, + uint32_t /* E */) +{ + int x = 0; + int y = 0; + int r = 0; + + if (A == C) + x += 1; + else if (B == C) + y += 1; + if (A == D) + x += 1; + else if (B == D) + y += 1; + if (x <= 1) + r -= 1; + if (y <= 1) + r += 1; + return r; +} + +#define BLUE_MASK565 0x001F001F +#define RED_MASK565 0xF800F800 +#define GREEN_MASK565 0x07E007E0 + +#define BLUE_MASK555 0x001F001F +#define RED_MASK555 0x7C007C00 +#define GREEN_MASK555 0x03E003E0 + +void Super2xSaI (uint8_t *srcPtr, uint32_t srcPitch, + uint8_t *deltaPtr, uint8_t *dstPtr, uint32_t dstPitch, + int width, int height) +{ + uint16_t *bP; + uint8_t *dP; + uint32_t inc_bP; + uint32_t Nextline = srcPitch >> 1; + { + inc_bP = 1; + + for (; height; height--) { + bP = (uint16_t *) srcPtr; + dP = (uint8_t *) dstPtr; + + for (uint32_t finish = width; finish; finish -= inc_bP) { + uint32_t color4, color5, color6; + uint32_t color1, color2, color3; + uint32_t colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, colorS1, colorS2; + uint32_t product1a, product1b, product2a, product2b; + + //--------------------------------------- B1 B2 + // 4 5 6 S2 + // 1 2 3 S1 + // A1 A2 + + colorB0 = *(bP - Nextline - 1); + colorB1 = *(bP - Nextline); + colorB2 = *(bP - Nextline + 1); + colorB3 = *(bP - Nextline + 2); + + color4 = *(bP - 1); + color5 = *(bP); + color6 = *(bP + 1); + colorS2 = *(bP + 2); + + color1 = *(bP + Nextline - 1); + color2 = *(bP + Nextline); + color3 = *(bP + Nextline + 1); + colorS1 = *(bP + Nextline + 2); + + colorA0 = *(bP + Nextline + Nextline - 1); + colorA1 = *(bP + Nextline + Nextline); + colorA2 = *(bP + Nextline + Nextline + 1); + colorA3 = *(bP + Nextline + Nextline + 2); + + //-------------------------------------- + if (color2 == color6 && color5 != color3) { + product2b = product1b = color2; + } else if (color5 == color3 && color2 != color6) { + product2b = product1b = color5; + } else if (color5 == color3 && color2 == color6) { + register int r = 0; + + r += GetResult (color6, color5, color1, colorA1); + r += GetResult (color6, color5, color4, colorB1); + r += GetResult (color6, color5, colorA2, colorS1); + r += GetResult (color6, color5, colorB2, colorS2); + + if (r > 0) + product2b = product1b = color6; + else if (r < 0) + product2b = product1b = color5; + else { + product2b = product1b = INTERPOLATE (color5, color6); + } + } else { + if (color6 == color3 && color3 == colorA1 + && color2 != colorA2 && color3 != colorA0) + product2b = + Q_INTERPOLATE (color3, color3, color3, color2); + else if (color5 == color2 && color2 == colorA2 + && colorA1 != color3 && color2 != colorA3) + product2b = + Q_INTERPOLATE (color2, color2, color2, color3); + else + product2b = INTERPOLATE (color2, color3); + + if (color6 == color3 && color6 == colorB1 + && color5 != colorB2 && color6 != colorB0) + product1b = + Q_INTERPOLATE (color6, color6, color6, color5); + else if (color5 == color2 && color5 == colorB2 + && colorB1 != color6 && color5 != colorB3) + product1b = + Q_INTERPOLATE (color6, color5, color5, color5); + else + product1b = INTERPOLATE (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 + && color5 != colorA2) + product2a = INTERPOLATE (color2, color5); + else + if (color5 == color1 && color6 == color5 + && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE (color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 + && color2 != colorB2) + product1a = INTERPOLATE (color2, color5); + else + if (color4 == color2 && color3 == color2 + && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE (color2, color5); + else + product1a = color5; + +#ifdef WORDS_BIGENDIAN + product1a = (product1a << 16) | product1b; + product2a = (product2a << 16) | product2b; +#else + product1a = product1a | (product1b << 16); + product2a = product2a | (product2b << 16); +#endif + + *((uint32_t *) dP) = product1a; + *((uint32_t *) (dP + dstPitch)) = product2a; + + bP += inc_bP; + dP += sizeof (uint32_t); + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + deltaPtr += srcPitch; + } // endof: for (; height; height--) + } +} + +void Super2xSaI32 (uint8_t *srcPtr, uint32_t srcPitch, + uint8_t * /* deltaPtr */, uint8_t *dstPtr, uint32_t dstPitch, + int width, int height) +{ + uint32_t *bP; + uint32_t *dP; + uint32_t inc_bP; + uint32_t Nextline = srcPitch >> 2; + inc_bP = 1; + + for (; height; height--) { + bP = (uint32_t *) srcPtr; + dP = (uint32_t *) dstPtr; + + for (uint32_t finish = width; finish; finish -= inc_bP) { + uint32_t color4, color5, color6; + uint32_t color1, color2, color3; + uint32_t colorA0, colorA1, colorA2, colorA3, + colorB0, colorB1, colorB2, colorB3, colorS1, colorS2; + uint32_t product1a, product1b, product2a, product2b; + + //--------------------------------------- B1 B2 + // 4 5 6 S2 + // 1 2 3 S1 + // A1 A2 + + colorB0 = *(bP - Nextline - 1); + colorB1 = *(bP - Nextline); + colorB2 = *(bP - Nextline + 1); + colorB3 = *(bP - Nextline + 2); + + color4 = *(bP - 1); + color5 = *(bP); + color6 = *(bP + 1); + colorS2 = *(bP + 2); + + color1 = *(bP + Nextline - 1); + color2 = *(bP + Nextline); + color3 = *(bP + Nextline + 1); + colorS1 = *(bP + Nextline + 2); + + colorA0 = *(bP + Nextline + Nextline - 1); + colorA1 = *(bP + Nextline + Nextline); + colorA2 = *(bP + Nextline + Nextline + 1); + colorA3 = *(bP + Nextline + Nextline + 2); + + //-------------------------------------- + if (color2 == color6 && color5 != color3) { + product2b = product1b = color2; + } else if (color5 == color3 && color2 != color6) { + product2b = product1b = color5; + } else if (color5 == color3 && color2 == color6) { + register int r = 0; + + r += GetResult (color6, color5, color1, colorA1); + r += GetResult (color6, color5, color4, colorB1); + r += GetResult (color6, color5, colorA2, colorS1); + r += GetResult (color6, color5, colorB2, colorS2); + + if (r > 0) + product2b = product1b = color6; + else if (r < 0) + product2b = product1b = color5; + else { + product2b = product1b = INTERPOLATE (color5, color6); + } + } else { + if (color6 == color3 && color3 == colorA1 + && color2 != colorA2 && color3 != colorA0) + product2b = + Q_INTERPOLATE (color3, color3, color3, color2); + else if (color5 == color2 && color2 == colorA2 + && colorA1 != color3 && color2 != colorA3) + product2b = + Q_INTERPOLATE (color2, color2, color2, color3); + else + product2b = INTERPOLATE (color2, color3); + + if (color6 == color3 && color6 == colorB1 + && color5 != colorB2 && color6 != colorB0) + product1b = + Q_INTERPOLATE (color6, color6, color6, color5); + else if (color5 == color2 && color5 == colorB2 + && colorB1 != color6 && color5 != colorB3) + product1b = + Q_INTERPOLATE (color6, color5, color5, color5); + else + product1b = INTERPOLATE (color5, color6); + } + + if (color5 == color3 && color2 != color6 && color4 == color5 + && color5 != colorA2) + product2a = INTERPOLATE (color2, color5); + else + if (color5 == color1 && color6 == color5 + && color4 != color2 && color5 != colorA0) + product2a = INTERPOLATE (color2, color5); + else + product2a = color2; + + if (color2 == color6 && color5 != color3 && color1 == color2 + && color2 != colorB2) + product1a = INTERPOLATE (color2, color5); + else + if (color4 == color2 && color3 == color2 + && color1 != color5 && color2 != colorB0) + product1a = INTERPOLATE (color2, color5); + else + product1a = color5; + *(dP) = product1a; + *(dP+1) = product1b; + *(dP + (dstPitch >> 2)) = product2a; + *(dP + (dstPitch >> 2) + 1) = product2b; + + bP += inc_bP; + dP += 2; + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + // deltaPtr += srcPitch; + } // endof: for (; height; height--) +} + +void SuperEagle (uint8_t *srcPtr, uint32_t srcPitch, uint8_t *deltaPtr, + uint8_t *dstPtr, uint32_t dstPitch, int width, int height) +{ + uint8_t *dP; + uint16_t *bP; + uint16_t *xP; + uint32_t inc_bP; + + { + inc_bP = 1; + + uint32_t Nextline = srcPitch >> 1; + + for (; height; height--) { + bP = (uint16_t *) srcPtr; + xP = (uint16_t *) deltaPtr; + dP = dstPtr; + for (uint32_t finish = width; finish; finish -= inc_bP) { + uint32_t color4, color5, color6; + uint32_t color1, color2, color3; + uint32_t colorA1, colorA2, colorB1, colorB2, colorS1, colorS2; + uint32_t product1a, product1b, product2a, product2b; + + colorB1 = *(bP - Nextline); + colorB2 = *(bP - Nextline + 1); + + color4 = *(bP - 1); + color5 = *(bP); + color6 = *(bP + 1); + colorS2 = *(bP + 2); + + color1 = *(bP + Nextline - 1); + color2 = *(bP + Nextline); + color3 = *(bP + Nextline + 1); + colorS1 = *(bP + Nextline + 2); + + colorA1 = *(bP + Nextline + Nextline); + colorA2 = *(bP + Nextline + Nextline + 1); + + // -------------------------------------- + if (color2 == color6 && color5 != color3) { + product1b = product2a = color2; + if ((color1 == color2) || (color6 == colorB2)) { + product1a = INTERPOLATE (color2, color5); + product1a = INTERPOLATE (color2, product1a); + // product1a = color2; + } else { + product1a = INTERPOLATE (color5, color6); + } + + if ((color6 == colorS2) || (color2 == colorA1)) { + product2b = INTERPOLATE (color2, color3); + product2b = INTERPOLATE (color2, product2b); + // product2b = color2; + } else { + product2b = INTERPOLATE (color2, color3); + } + } else if (color5 == color3 && color2 != color6) { + product2b = product1a = color5; + + if ((colorB1 == color5) || (color3 == colorS1)) { + product1b = INTERPOLATE (color5, color6); + product1b = INTERPOLATE (color5, product1b); + // product1b = color5; + } else { + product1b = INTERPOLATE (color5, color6); + } + + if ((color3 == colorA2) || (color4 == color5)) { + product2a = INTERPOLATE (color5, color2); + product2a = INTERPOLATE (color5, product2a); + // product2a = color5; + } else { + product2a = INTERPOLATE (color2, color3); + } + + } else if (color5 == color3 && color2 == color6) { + register int r = 0; + + r += GetResult (color6, color5, color1, colorA1); + r += GetResult (color6, color5, color4, colorB1); + r += GetResult (color6, color5, colorA2, colorS1); + r += GetResult (color6, color5, colorB2, colorS2); + + if (r > 0) { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE (color5, color6); + } else if (r < 0) { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE (color5, color6); + } else { + product2b = product1a = color5; + product1b = product2a = color2; + } + } else { + product2b = product1a = INTERPOLATE (color2, color6); + product2b = + Q_INTERPOLATE (color3, color3, color3, product2b); + product1a = + Q_INTERPOLATE (color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE (color5, color3); + product2a = + Q_INTERPOLATE (color2, color2, color2, product2a); + product1b = + Q_INTERPOLATE (color6, color6, color6, product1b); + + // product1a = color5; + // product1b = color6; + // product2a = color2; + // product2b = color3; + } +#ifdef WORDS_BIGENDIAN + product1a = (product1a << 16) | product1b; + product2a = (product2a << 16) | product2b; +#else + product1a = product1a | (product1b << 16); + product2a = product2a | (product2b << 16); +#endif + + *((uint32_t *) dP) = product1a; + *((uint32_t *) (dP + dstPitch)) = product2a; + *xP = color5; + + bP += inc_bP; + xP += inc_bP; + dP += sizeof (uint32_t); + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + deltaPtr += srcPitch; + } // endof: for (height; height; height--) + } +} + +void SuperEagle32 (uint8_t *srcPtr, uint32_t srcPitch, uint8_t */*deltaPtr*/, + uint8_t *dstPtr, uint32_t dstPitch, int width, int height) +{ + uint32_t *dP; + uint32_t *bP; + //uint32_t *xP; + uint32_t inc_bP; + + inc_bP = 1; + + uint32_t Nextline = srcPitch >> 2; + + for (; height; height--) { + bP = (uint32_t *) srcPtr; + //xP = (uint32_t *) deltaPtr; + dP = (uint32_t *)dstPtr; + for (uint32_t finish = width; finish; finish -= inc_bP) { + uint32_t color4, color5, color6; + uint32_t color1, color2, color3; + uint32_t colorA1, colorA2, colorB1, colorB2, colorS1, colorS2; + uint32_t product1a, product1b, product2a, product2b; + + colorB1 = *(bP - Nextline); + colorB2 = *(bP - Nextline + 1); + + color4 = *(bP - 1); + color5 = *(bP); + color6 = *(bP + 1); + colorS2 = *(bP + 2); + + color1 = *(bP + Nextline - 1); + color2 = *(bP + Nextline); + color3 = *(bP + Nextline + 1); + colorS1 = *(bP + Nextline + 2); + + colorA1 = *(bP + Nextline + Nextline); + colorA2 = *(bP + Nextline + Nextline + 1); + + // -------------------------------------- + if (color2 == color6 && color5 != color3) { + product1b = product2a = color2; + if ((color1 == color2) || (color6 == colorB2)) { + product1a = INTERPOLATE (color2, color5); + product1a = INTERPOLATE (color2, product1a); + // product1a = color2; + } else { + product1a = INTERPOLATE (color5, color6); + } + + if ((color6 == colorS2) || (color2 == colorA1)) { + product2b = INTERPOLATE (color2, color3); + product2b = INTERPOLATE (color2, product2b); + // product2b = color2; + } else { + product2b = INTERPOLATE (color2, color3); + } + } else if (color5 == color3 && color2 != color6) { + product2b = product1a = color5; + + if ((colorB1 == color5) || (color3 == colorS1)) { + product1b = INTERPOLATE (color5, color6); + product1b = INTERPOLATE (color5, product1b); + // product1b = color5; + } else { + product1b = INTERPOLATE (color5, color6); + } + + if ((color3 == colorA2) || (color4 == color5)) { + product2a = INTERPOLATE (color5, color2); + product2a = INTERPOLATE (color5, product2a); + // product2a = color5; + } else { + product2a = INTERPOLATE (color2, color3); + } + + } else if (color5 == color3 && color2 == color6) { + register int r = 0; + + r += GetResult (color6, color5, color1, colorA1); + r += GetResult (color6, color5, color4, colorB1); + r += GetResult (color6, color5, colorA2, colorS1); + r += GetResult (color6, color5, colorB2, colorS2); + + if (r > 0) { + product1b = product2a = color2; + product1a = product2b = INTERPOLATE (color5, color6); + } else if (r < 0) { + product2b = product1a = color5; + product1b = product2a = INTERPOLATE (color5, color6); + } else { + product2b = product1a = color5; + product1b = product2a = color2; + } + } else { + product2b = product1a = INTERPOLATE (color2, color6); + product2b = + Q_INTERPOLATE (color3, color3, color3, product2b); + product1a = + Q_INTERPOLATE (color5, color5, color5, product1a); + + product2a = product1b = INTERPOLATE (color5, color3); + product2a = + Q_INTERPOLATE (color2, color2, color2, product2a); + product1b = + Q_INTERPOLATE (color6, color6, color6, product1b); + + // product1a = color5; + // product1b = color6; + // product2a = color2; + // product2b = color3; + } + *(dP) = product1a; + *(dP+1) = product1b; + *(dP + (dstPitch >> 2)) = product2a; + *(dP + (dstPitch >> 2) +1) = product2b; + //*xP = color5; + + bP += inc_bP; + //xP += inc_bP; + dP += 2; + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + //deltaPtr += srcPitch; + } // endof: for (height; height; height--) +} + +void _2xSaI (uint8_t *srcPtr, uint32_t srcPitch, uint8_t *deltaPtr, + uint8_t *dstPtr, uint32_t dstPitch, int width, int height) +{ + uint8_t *dP; + uint16_t *bP; + uint32_t inc_bP; + + { + inc_bP = 1; + + uint32_t Nextline = srcPitch >> 1; + + for (; height; height--) { + bP = (uint16_t *) srcPtr; + dP = dstPtr; + + for (uint32_t finish = width; finish; finish -= inc_bP) { + + register uint32_t colorA, colorB; + uint32_t colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + + colorM, colorN, colorO, colorP; + uint32_t product, product1, product2; + + //--------------------------------------- + // Map of the pixels: I|E F|J + // G|A B|K + // H|C D|L + // M|N O|P + colorI = *(bP - Nextline - 1); + colorE = *(bP - Nextline); + colorF = *(bP - Nextline + 1); + colorJ = *(bP - Nextline + 2); + + colorG = *(bP - 1); + colorA = *(bP); + colorB = *(bP + 1); + colorK = *(bP + 2); + + colorH = *(bP + Nextline - 1); + colorC = *(bP + Nextline); + colorD = *(bP + Nextline + 1); + colorL = *(bP + Nextline + 2); + + colorM = *(bP + Nextline + Nextline - 1); + colorN = *(bP + Nextline + Nextline); + colorO = *(bP + Nextline + Nextline + 1); + colorP = *(bP + Nextline + Nextline + 2); + + if ((colorA == colorD) && (colorB != colorC)) { + if (((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) + && (colorB != colorE) && (colorB == colorJ))) { + product = colorA; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if (((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) + && (colorG != colorC) && (colorC == colorM))) { + product1 = colorA; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + product2 = colorA; + } else if ((colorB == colorC) && (colorA != colorD)) { + if (((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) + && (colorA != colorF) && (colorA == colorI))) { + product = colorB; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if (((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) + && (colorA != colorH) && (colorA == colorI))) { + product1 = colorC; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + product2 = colorB; + } else if ((colorA == colorD) && (colorB == colorC)) { + if (colorA == colorB) { + product = colorA; + product1 = colorA; + product2 = colorA; + } else { + register int r = 0; + + product1 = INTERPOLATE (colorA, colorC); + product = INTERPOLATE (colorA, colorB); + + r += + GetResult1 (colorA, colorB, colorG, colorE, + colorI); + r += + GetResult2 (colorB, colorA, colorK, colorF, + colorJ); + r += + GetResult2 (colorB, colorA, colorH, colorN, + colorM); + r += + GetResult1 (colorA, colorB, colorL, colorO, + colorP); + + if (r > 0) + product2 = colorA; + else if (r < 0) + product2 = colorB; + else { + product2 = + Q_INTERPOLATE (colorA, colorB, colorC, + colorD); + } + } + } else { + product2 = Q_INTERPOLATE (colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) + && (colorB != colorE) && (colorB == colorJ)) { + product = colorA; + } else if ((colorB == colorE) && (colorB == colorD) + && (colorA != colorF) && (colorA == colorI)) { + product = colorB; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) + && (colorG != colorC) && (colorC == colorM)) { + product1 = colorA; + } else if ((colorC == colorG) && (colorC == colorD) + && (colorA != colorH) && (colorA == colorI)) { + product1 = colorC; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + } + +#ifdef WORDS_BIGENDIAN + product = (colorA << 16) | product ; + product1 = (product1 << 16) | product2 ; +#else + product = colorA | (product << 16); + product1 = product1 | (product2 << 16); +#endif + *((int32_t *) dP) = product; + *((uint32_t *) (dP + dstPitch)) = product1; + + bP += inc_bP; + dP += sizeof (uint32_t); + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + deltaPtr += srcPitch; + } // endof: for (height; height; height--) + } +} + +void _2xSaI32 (uint8_t *srcPtr, uint32_t srcPitch, uint8_t * /* deltaPtr */, + uint8_t *dstPtr, uint32_t dstPitch, int width, int height) +{ + uint32_t *dP; + uint32_t *bP; + uint32_t inc_bP = 1; + + uint32_t Nextline = srcPitch >> 2; + + for (; height; height--) { + bP = (uint32_t *) srcPtr; + dP = (uint32_t *) dstPtr; + + for (uint32_t finish = width; finish; finish -= inc_bP) { + register uint32_t colorA, colorB; + uint32_t colorC, colorD, + colorE, colorF, colorG, colorH, + colorI, colorJ, colorK, colorL, + + colorM, colorN, colorO, colorP; + uint32_t product, product1, product2; + + //--------------------------------------- + // Map of the pixels: I|E F|J + // G|A B|K + // H|C D|L + // M|N O|P + colorI = *(bP - Nextline - 1); + colorE = *(bP - Nextline); + colorF = *(bP - Nextline + 1); + colorJ = *(bP - Nextline + 2); + + colorG = *(bP - 1); + colorA = *(bP); + colorB = *(bP + 1); + colorK = *(bP + 2); + + colorH = *(bP + Nextline - 1); + colorC = *(bP + Nextline); + colorD = *(bP + Nextline + 1); + colorL = *(bP + Nextline + 2); + + colorM = *(bP + Nextline + Nextline - 1); + colorN = *(bP + Nextline + Nextline); + colorO = *(bP + Nextline + Nextline + 1); + colorP = *(bP + Nextline + Nextline + 2); + + if ((colorA == colorD) && (colorB != colorC)) { + if (((colorA == colorE) && (colorB == colorL)) || + ((colorA == colorC) && (colorA == colorF) + && (colorB != colorE) && (colorB == colorJ))) { + product = colorA; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if (((colorA == colorG) && (colorC == colorO)) || + ((colorA == colorB) && (colorA == colorH) + && (colorG != colorC) && (colorC == colorM))) { + product1 = colorA; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + product2 = colorA; + } else if ((colorB == colorC) && (colorA != colorD)) { + if (((colorB == colorF) && (colorA == colorH)) || + ((colorB == colorE) && (colorB == colorD) + && (colorA != colorF) && (colorA == colorI))) { + product = colorB; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if (((colorC == colorH) && (colorA == colorF)) || + ((colorC == colorG) && (colorC == colorD) + && (colorA != colorH) && (colorA == colorI))) { + product1 = colorC; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + product2 = colorB; + } else if ((colorA == colorD) && (colorB == colorC)) { + if (colorA == colorB) { + product = colorA; + product1 = colorA; + product2 = colorA; + } else { + register int r = 0; + + product1 = INTERPOLATE (colorA, colorC); + product = INTERPOLATE (colorA, colorB); + + r += + GetResult1 (colorA, colorB, colorG, colorE, + colorI); + r += + GetResult2 (colorB, colorA, colorK, colorF, + colorJ); + r += + GetResult2 (colorB, colorA, colorH, colorN, + colorM); + r += + GetResult1 (colorA, colorB, colorL, colorO, + colorP); + + if (r > 0) + product2 = colorA; + else if (r < 0) + product2 = colorB; + else { + product2 = + Q_INTERPOLATE (colorA, colorB, colorC, + colorD); + } + } + } else { + product2 = Q_INTERPOLATE (colorA, colorB, colorC, colorD); + + if ((colorA == colorC) && (colorA == colorF) + && (colorB != colorE) && (colorB == colorJ)) { + product = colorA; + } else if ((colorB == colorE) && (colorB == colorD) + && (colorA != colorF) && (colorA == colorI)) { + product = colorB; + } else { + product = INTERPOLATE (colorA, colorB); + } + + if ((colorA == colorB) && (colorA == colorH) + && (colorG != colorC) && (colorC == colorM)) { + product1 = colorA; + } else if ((colorC == colorG) && (colorC == colorD) + && (colorA != colorH) && (colorA == colorI)) { + product1 = colorC; + } else { + product1 = INTERPOLATE (colorA, colorC); + } + } + *(dP) = colorA; + *(dP + 1) = product; + *(dP + (dstPitch >> 2)) = product1; + *(dP + (dstPitch >> 2) + 1) = product2; + + bP += inc_bP; + dP += 2; + } // end of for ( finish= width etc..) + + srcPtr += srcPitch; + dstPtr += dstPitch << 1; + // deltaPtr += srcPitch; + } // endof: for (height; height; height--) +} + +static uint32_t Bilinear (uint32_t A, uint32_t B, uint32_t x) +{ + unsigned long areaA, areaB; + unsigned long result; + + if (A == B) + return A; + + areaB = (x >> 11) & 0x1f; // reduce 16 bit fraction to 5 bits + areaA = 0x20 - areaB; + + A = (A & redblueMask) | ((A & greenMask) << 16); + B = (B & redblueMask) | ((B & greenMask) << 16); + + result = ((areaA * A) + (areaB * B)) >> 5; + + return (result & redblueMask) | ((result >> 16) & greenMask); +} + +static uint32_t Bilinear4 (uint32_t A, uint32_t B, uint32_t C, uint32_t D, uint32_t x, + uint32_t y) +{ + unsigned long areaA, areaB, areaC, areaD; + unsigned long result, xy; + + x = (x >> 11) & 0x1f; + y = (y >> 11) & 0x1f; + xy = (x * y) >> 5; + + A = (A & redblueMask) | ((A & greenMask) << 16); + B = (B & redblueMask) | ((B & greenMask) << 16); + C = (C & redblueMask) | ((C & greenMask) << 16); + D = (D & redblueMask) | ((D & greenMask) << 16); + + areaA = 0x20 + xy - x - y; + areaB = x - xy; + areaC = y - xy; + areaD = xy; + + result = ((areaA * A) + (areaB * B) + (areaC * C) + (areaD * D)) >> 5; + + return (result & redblueMask) | ((result >> 16) & greenMask); +} + +void Scale_2xSaI (uint8_t *srcPtr, uint32_t srcPitch, uint8_t * /* deltaPtr */, + uint8_t *dstPtr, uint32_t dstPitch, + uint32_t dstWidth, uint32_t dstHeight, int width, int height) +{ + uint8_t *dP; + uint16_t *bP; + + uint32_t w; + uint32_t h; + uint32_t dw; + uint32_t dh; + uint32_t hfinish; + uint32_t wfinish; + + uint32_t Nextline = srcPitch >> 1; + + wfinish = (width - 1) << 16; // convert to fixed point + dw = wfinish / (dstWidth - 1); + hfinish = (height - 1) << 16; // convert to fixed point + dh = hfinish / (dstHeight - 1); + + for (h = 0; h < hfinish; h += dh) { + uint32_t y1, y2; + + y1 = h & 0xffff; // fraction part of fixed point + bP = (uint16_t *) (srcPtr + ((h >> 16) * srcPitch)); + dP = dstPtr; + y2 = 0x10000 - y1; + + w = 0; + + for (; w < wfinish;) { + uint32_t A, B, C, D; + uint32_t E, F, G, H; + uint32_t I, J, K, L; + uint32_t x1, x2, a1, f1, f2; + uint32_t position, product1; + + position = w >> 16; + A = bP[position]; // current pixel + B = bP[position + 1]; // next pixel + C = bP[position + Nextline]; + D = bP[position + Nextline + 1]; + E = bP[position - Nextline]; + F = bP[position - Nextline + 1]; + G = bP[position - 1]; + H = bP[position + Nextline - 1]; + I = bP[position + 2]; + J = bP[position + Nextline + 2]; + K = bP[position + Nextline + Nextline]; + L = bP[position + Nextline + Nextline + 1]; + + x1 = w & 0xffff; // fraction part of fixed point + x2 = 0x10000 - x1; + + /*0*/ + if (A == B && C == D && A == C) + product1 = A; + else /*1*/ if (A == D && B != C) { + f1 = (x1 >> 1) + (0x10000 >> 2); + f2 = (y1 >> 1) + (0x10000 >> 2); + if (y1 <= f1 && A == J && A != E) // close to B + { + a1 = f1 - y1; + product1 = Bilinear (A, B, a1); + } else if (y1 >= f1 && A == G && A != L) // close to C + { + a1 = y1 - f1; + product1 = Bilinear (A, C, a1); + } + else if (x1 >= f2 && A == E && A != J) // close to B + { + a1 = x1 - f2; + product1 = Bilinear (A, B, a1); + } + else if (x1 <= f2 && A == L && A != G) // close to C + { + a1 = f2 - x1; + product1 = Bilinear (A, C, a1); + } + else if (y1 >= x1) // close to C + { + a1 = y1 - x1; + product1 = Bilinear (A, C, a1); + } + else if (y1 <= x1) // close to B + { + a1 = x1 - y1; + product1 = Bilinear (A, B, a1); + } + } + else + /*2*/ + if (B == C && A != D) + { + f1 = (x1 >> 1) + (0x10000 >> 2); + f2 = (y1 >> 1) + (0x10000 >> 2); + if (y2 >= f1 && B == H && B != F) // close to A + { + a1 = y2 - f1; + product1 = Bilinear (B, A, a1); + } + else if (y2 <= f1 && B == I && B != K) // close to D + { + a1 = f1 - y2; + product1 = Bilinear (B, D, a1); + } + else if (x2 >= f2 && B == F && B != H) // close to A + { + a1 = x2 - f2; + product1 = Bilinear (B, A, a1); + } + else if (x2 <= f2 && B == K && B != I) // close to D + { + a1 = f2 - x2; + product1 = Bilinear (B, D, a1); + } + else if (y2 >= x1) // close to A + { + a1 = y2 - x1; + product1 = Bilinear (B, A, a1); + } + else if (y2 <= x1) // close to D + { + a1 = x1 - y2; + product1 = Bilinear (B, D, a1); + } + } + /*3*/ + else + { + product1 = Bilinear4 (A, B, C, D, x1, y1); + } + + //end First Pixel + *(uint32_t *) dP = product1; + dP += 2; + w += dw; + } + dstPtr += dstPitch; + } +} diff --git a/bsnes/filter/scale2x.cpp b/bsnes/filter/scale2x.cpp new file mode 100644 index 00000000..6a0dc6ac --- /dev/null +++ b/bsnes/filter/scale2x.cpp @@ -0,0 +1,46 @@ +namespace Filter::Scale2x { + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + pitch >>= 1; + outpitch >>= 2; + + for(uint y = 0; y < height; y++) { + const uint16_t* in = input + y * pitch; + uint32_t* out0 = output + y * outpitch * 2; + uint32_t* out1 = output + y * outpitch * 2 + outpitch; + + int prevline = (y == 0 ? 0 : pitch); + int nextline = (y == height - 1 ? 0 : pitch); + + for(unsigned x = 0; x < width; x++) { + uint16_t A = *(in - prevline); + uint16_t B = (x > 0) ? *(in - 1) : *in; + uint16_t C = *in; + uint16_t D = (x < width - 1) ? *(in + 1) : *in; + uint16_t E = *(in++ + nextline); + uint32_t c = colortable[C]; + + if(A != E && B != D) { + *out0++ = (A == B ? colortable[A] : c); + *out0++ = (A == D ? colortable[A] : c); + *out1++ = (E == B ? colortable[E] : c); + *out1++ = (E == D ? colortable[E] : c); + } else { + *out0++ = c; + *out0++ = c; + *out1++ = c; + *out1++ = c; + } + } + } +} + +} diff --git a/bsnes/filter/scanlines-black.cpp b/bsnes/filter/scanlines-black.cpp new file mode 100644 index 00000000..d007a5e1 --- /dev/null +++ b/bsnes/filter/scanlines-black.cpp @@ -0,0 +1,28 @@ +namespace Filter::ScanlinesBlack { + +auto size(uint& width, uint& height) -> void { + width = width; + height = height * 2; +} + +auto render( + uint32_t* palette, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + pitch >>= 1; + outpitch >>= 2; + + for(unsigned y = 0; y < height; y++) { + const uint16_t *in = input + y * pitch; + uint32_t *out0 = output + y * outpitch * 2; + uint32_t *out1 = output + y * outpitch * 2 + outpitch; + + for(unsigned x = 0; x < width; x++) { + uint16_t color = *in++; + *out0++ = palette[color]; + *out1++ = 0; + } + } +} + +} diff --git a/bsnes/filter/scanlines-dark.cpp b/bsnes/filter/scanlines-dark.cpp new file mode 100644 index 00000000..e41bb366 --- /dev/null +++ b/bsnes/filter/scanlines-dark.cpp @@ -0,0 +1,48 @@ +namespace Filter::ScanlinesDark { + +uint16_t adjust[32768]; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + for(unsigned i = 0; i < 32768; i++) { + uint8_t r = (i >> 10) & 31; + uint8_t g = (i >> 5) & 31; + uint8_t b = (i >> 0) & 31; + r *= 0.333; + g *= 0.333; + b *= 0.333; + adjust[i] = (r << 10) + (g << 5) + (b << 0); + } +} + +auto size(uint& width, uint& height) -> void { + width = width; + height = height * 2; +} + +auto render( + uint32_t* palette, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + + pitch >>= 1; + outpitch >>= 2; + + for(unsigned y = 0; y < height; y++) { + const uint16_t *in = input + y * pitch; + uint32_t *out0 = output + y * outpitch * 2; + uint32_t *out1 = output + y * outpitch * 2 + outpitch; + + for(unsigned x = 0; x < width; x++) { + uint16_t color = *in++; + *out0++ = palette[color]; + *out1++ = palette[adjust[color]]; + } + } +} + +} diff --git a/bsnes/filter/scanlines-light.cpp b/bsnes/filter/scanlines-light.cpp new file mode 100644 index 00000000..aefcd3a9 --- /dev/null +++ b/bsnes/filter/scanlines-light.cpp @@ -0,0 +1,48 @@ +namespace Filter::ScanlinesLight { + +uint16_t adjust[32768]; + +void initialize() { + static bool initialized = false; + if(initialized == true) return; + initialized = true; + + for(unsigned i = 0; i < 32768; i++) { + uint8_t r = (i >> 10) & 31; + uint8_t g = (i >> 5) & 31; + uint8_t b = (i >> 0) & 31; + r *= 0.666; + g *= 0.666; + b *= 0.666; + adjust[i] = (r << 10) + (g << 5) + (b << 0); + } +} + +auto size(uint& width, uint& height) -> void { + width = width; + height = height * 2; +} + +auto render( + uint32_t* palette, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + initialize(); + + pitch >>= 1; + outpitch >>= 2; + + for(unsigned y = 0; y < height; y++) { + const uint16_t *in = input + y * pitch; + uint32_t *out0 = output + y * outpitch * 2; + uint32_t *out1 = output + y * outpitch * 2 + outpitch; + + for(unsigned x = 0; x < width; x++) { + uint16_t color = *in++; + *out0++ = palette[color]; + *out1++ = palette[adjust[color]]; + } + } +} + +} diff --git a/bsnes/filter/snes_ntsc/snes_ntsc.c b/bsnes/filter/snes_ntsc/snes_ntsc.c new file mode 100644 index 00000000..f622baf8 --- /dev/null +++ b/bsnes/filter/snes_ntsc/snes_ntsc.c @@ -0,0 +1,251 @@ +/* snes_ntsc 0.2.2. http://www.slack.net/~ant/ */ + +#include "snes_ntsc.h" + +/* Copyright (C) 2006-2007 Shay Green. This module is free software; you +can redistribute it and/or modify it under the terms of the GNU Lesser +General Public License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +snes_ntsc_setup_t const snes_ntsc_monochrome = { 0,-1, 0, 0,.2, 0,.2,-.2,-.2,-1, 1, 0, 0 }; +snes_ntsc_setup_t const snes_ntsc_composite = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }; +snes_ntsc_setup_t const snes_ntsc_svideo = { 0, 0, 0, 0,.2, 0,.2, -1, -1, 0, 1, 0, 0 }; +snes_ntsc_setup_t const snes_ntsc_rgb = { 0, 0, 0, 0,.2, 0,.7, -1, -1,-1, 1, 0, 0 }; + +#define alignment_count 3 +#define burst_count 3 +#define rescale_in 8 +#define rescale_out 7 + +#define artifacts_mid 1.0f +#define fringing_mid 1.0f +#define std_decoder_hue 0 + +#define rgb_bits 7 /* half normal range to allow for doubled hires pixels */ +#define gamma_size 32 + +#include "snes_ntsc_impl.h" + +/* 3 input pixels -> 8 composite samples */ +pixel_info_t const snes_ntsc_pixels [alignment_count] = { + { PIXEL_OFFSET( -4, -9 ), { 1, 1, .6667f, 0 } }, + { PIXEL_OFFSET( -2, -7 ), { .3333f, 1, 1, .3333f } }, + { PIXEL_OFFSET( 0, -5 ), { 0, .6667f, 1, 1 } }, +}; + +static void merge_kernel_fields( snes_ntsc_rgb_t* io ) +{ + int n; + for ( n = burst_size; n; --n ) + { + snes_ntsc_rgb_t p0 = io [burst_size * 0] + rgb_bias; + snes_ntsc_rgb_t p1 = io [burst_size * 1] + rgb_bias; + snes_ntsc_rgb_t p2 = io [burst_size * 2] + rgb_bias; + /* merge colors without losing precision */ + io [burst_size * 0] = + ((p0 + p1 - ((p0 ^ p1) & snes_ntsc_rgb_builder)) >> 1) - rgb_bias; + io [burst_size * 1] = + ((p1 + p2 - ((p1 ^ p2) & snes_ntsc_rgb_builder)) >> 1) - rgb_bias; + io [burst_size * 2] = + ((p2 + p0 - ((p2 ^ p0) & snes_ntsc_rgb_builder)) >> 1) - rgb_bias; + ++io; + } +} + +static void correct_errors( snes_ntsc_rgb_t color, snes_ntsc_rgb_t* out ) +{ + int n; + for ( n = burst_count; n; --n ) + { + unsigned i; + for ( i = 0; i < rgb_kernel_size / 2; i++ ) + { + snes_ntsc_rgb_t error = color - + out [i ] - out [(i+12)%14+14] - out [(i+10)%14+28] - + out [i + 7] - out [i + 5 +14] - out [i + 3 +28]; + DISTRIBUTE_ERROR( i+3+28, i+5+14, i+7 ); + } + out += alignment_count * rgb_kernel_size; + } +} + +void snes_ntsc_init( snes_ntsc_t* ntsc, snes_ntsc_setup_t const* setup ) +{ + int merge_fields; + int entry; + init_t impl; + if ( !setup ) + setup = &snes_ntsc_composite; + init( &impl, setup ); + + merge_fields = setup->merge_fields; + if ( setup->artifacts <= -1 && setup->fringing <= -1 ) + merge_fields = 1; + + for ( entry = 0; entry < snes_ntsc_palette_size; entry++ ) + { + /* Reduce number of significant bits of source color. Clearing the + low bits of R and B were least notictable. Modifying green was too + noticeable. */ + int ir = entry >> 8 & 0x1E; + int ig = entry >> 4 & 0x1F; + int ib = entry << 1 & 0x1E; + + #if SNES_NTSC_BSNES_COLORTBL + if ( setup->bsnes_colortbl ) + { + int bgr15 = (ib << 10) | (ig << 5) | ir; + unsigned long rgb16 = setup->bsnes_colortbl [bgr15]; + ir = rgb16 >> 11 & 0x1E; + ig = rgb16 >> 6 & 0x1F; + ib = rgb16 & 0x1E; + } + #endif + + { + float rr = impl.to_float [ir]; + float gg = impl.to_float [ig]; + float bb = impl.to_float [ib]; + + float y, i, q = RGB_TO_YIQ( rr, gg, bb, y, i ); + + int r, g, b = YIQ_TO_RGB( y, i, q, impl.to_rgb, int, r, g ); + snes_ntsc_rgb_t rgb = PACK_RGB( r, g, b ); + + snes_ntsc_rgb_t* out = ntsc->table [entry]; + gen_kernel( &impl, y, i, q, out ); + if ( merge_fields ) + merge_kernel_fields( out ); + correct_errors( rgb, out ); + } + } +} + +#ifndef SNES_NTSC_NO_BLITTERS + +void snes_ntsc_blit( snes_ntsc_t const* ntsc, SNES_NTSC_IN_T const* input, long in_row_width, + int burst_phase, int in_width, int in_height, void* rgb_out, long out_pitch ) +{ + int chunk_count = (in_width - 1) / snes_ntsc_in_chunk; + for ( ; in_height; --in_height ) + { + SNES_NTSC_IN_T const* line_in = input; + SNES_NTSC_BEGIN_ROW( ntsc, burst_phase, + snes_ntsc_black, snes_ntsc_black, SNES_NTSC_ADJ_IN( *line_in ) ); + snes_ntsc_out_t* restrict line_out = (snes_ntsc_out_t*) rgb_out; + int n; + ++line_in; + + for ( n = chunk_count; n; --n ) + { + /* order of input and output pixels must not be altered */ + SNES_NTSC_COLOR_IN( 0, SNES_NTSC_ADJ_IN( line_in [0] ) ); + SNES_NTSC_RGB_OUT( 0, line_out [0], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 1, line_out [1], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 1, SNES_NTSC_ADJ_IN( line_in [1] ) ); + SNES_NTSC_RGB_OUT( 2, line_out [2], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 3, line_out [3], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 2, SNES_NTSC_ADJ_IN( line_in [2] ) ); + SNES_NTSC_RGB_OUT( 4, line_out [4], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 5, line_out [5], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 6, line_out [6], SNES_NTSC_OUT_DEPTH ); + + line_in += 3; + line_out += 7; + } + + /* finish final pixels */ + SNES_NTSC_COLOR_IN( 0, snes_ntsc_black ); + SNES_NTSC_RGB_OUT( 0, line_out [0], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 1, line_out [1], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 1, snes_ntsc_black ); + SNES_NTSC_RGB_OUT( 2, line_out [2], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 3, line_out [3], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 2, snes_ntsc_black ); + SNES_NTSC_RGB_OUT( 4, line_out [4], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 5, line_out [5], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_RGB_OUT( 6, line_out [6], SNES_NTSC_OUT_DEPTH ); + + burst_phase = (burst_phase + 1) % snes_ntsc_burst_count; + input += in_row_width; + rgb_out = (char*) rgb_out + out_pitch; + } +} + +void snes_ntsc_blit_hires( snes_ntsc_t const* ntsc, SNES_NTSC_IN_T const* input, long in_row_width, + int burst_phase, int in_width, int in_height, void* rgb_out, long out_pitch ) +{ + int chunk_count = (in_width - 2) / (snes_ntsc_in_chunk * 2); + for ( ; in_height; --in_height ) + { + SNES_NTSC_IN_T const* line_in = input; + SNES_NTSC_HIRES_ROW( ntsc, burst_phase, + snes_ntsc_black, snes_ntsc_black, snes_ntsc_black, + SNES_NTSC_ADJ_IN( line_in [0] ), + SNES_NTSC_ADJ_IN( line_in [1] ) ); + snes_ntsc_out_t* restrict line_out = (snes_ntsc_out_t*) rgb_out; + int n; + line_in += 2; + + for ( n = chunk_count; n; --n ) + { + /* twice as many input pixels per chunk */ + SNES_NTSC_COLOR_IN( 0, SNES_NTSC_ADJ_IN( line_in [0] ) ); + SNES_NTSC_HIRES_OUT( 0, line_out [0], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 1, SNES_NTSC_ADJ_IN( line_in [1] ) ); + SNES_NTSC_HIRES_OUT( 1, line_out [1], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 2, SNES_NTSC_ADJ_IN( line_in [2] ) ); + SNES_NTSC_HIRES_OUT( 2, line_out [2], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 3, SNES_NTSC_ADJ_IN( line_in [3] ) ); + SNES_NTSC_HIRES_OUT( 3, line_out [3], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 4, SNES_NTSC_ADJ_IN( line_in [4] ) ); + SNES_NTSC_HIRES_OUT( 4, line_out [4], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 5, SNES_NTSC_ADJ_IN( line_in [5] ) ); + SNES_NTSC_HIRES_OUT( 5, line_out [5], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_HIRES_OUT( 6, line_out [6], SNES_NTSC_OUT_DEPTH ); + + line_in += 6; + line_out += 7; + } + + SNES_NTSC_COLOR_IN( 0, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 0, line_out [0], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 1, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 1, line_out [1], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 2, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 2, line_out [2], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 3, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 3, line_out [3], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 4, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 4, line_out [4], SNES_NTSC_OUT_DEPTH ); + + SNES_NTSC_COLOR_IN( 5, snes_ntsc_black ); + SNES_NTSC_HIRES_OUT( 5, line_out [5], SNES_NTSC_OUT_DEPTH ); + SNES_NTSC_HIRES_OUT( 6, line_out [6], SNES_NTSC_OUT_DEPTH ); + + burst_phase = (burst_phase + 1) % snes_ntsc_burst_count; + input += in_row_width; + rgb_out = (char*) rgb_out + out_pitch; + } +} + +#endif diff --git a/bsnes/filter/snes_ntsc/snes_ntsc.h b/bsnes/filter/snes_ntsc/snes_ntsc.h new file mode 100644 index 00000000..fff97ecd --- /dev/null +++ b/bsnes/filter/snes_ntsc/snes_ntsc.h @@ -0,0 +1,228 @@ +/* SNES NTSC video filter */ + +/* snes_ntsc 0.2.2 */ +#ifndef SNES_NTSC_H +#define SNES_NTSC_H + +#include "snes_ntsc_config.h" + +#ifdef __cplusplus + extern "C" { +#endif + +/* Image parameters, ranging from -1.0 to 1.0. Actual internal values shown +in parenthesis and should remain fairly stable in future versions. */ +typedef struct snes_ntsc_setup_t +{ + /* Basic parameters */ + double hue; /* -1 = -180 degrees +1 = +180 degrees */ + double saturation; /* -1 = grayscale (0.0) +1 = oversaturated colors (2.0) */ + double contrast; /* -1 = dark (0.5) +1 = light (1.5) */ + double brightness; /* -1 = dark (0.5) +1 = light (1.5) */ + double sharpness; /* edge contrast enhancement/blurring */ + + /* Advanced parameters */ + double gamma; /* -1 = dark (1.5) +1 = light (0.5) */ + double resolution; /* image resolution */ + double artifacts; /* artifacts caused by color changes */ + double fringing; /* color artifacts caused by brightness changes */ + double bleed; /* color bleed (color resolution reduction) */ + int merge_fields; /* if 1, merges even and odd fields together to reduce flicker */ + float const* decoder_matrix; /* optional RGB decoder matrix, 6 elements */ + + unsigned long const* bsnes_colortbl; /* undocumented; set to 0 */ +} snes_ntsc_setup_t; + +/* Video format presets */ +extern snes_ntsc_setup_t const snes_ntsc_composite; /* color bleeding + artifacts */ +extern snes_ntsc_setup_t const snes_ntsc_svideo; /* color bleeding only */ +extern snes_ntsc_setup_t const snes_ntsc_rgb; /* crisp image */ +extern snes_ntsc_setup_t const snes_ntsc_monochrome;/* desaturated + artifacts */ + +/* Initializes and adjusts parameters. Can be called multiple times on the same +snes_ntsc_t object. Can pass NULL for either parameter. */ +typedef struct snes_ntsc_t snes_ntsc_t; +void snes_ntsc_init( snes_ntsc_t* ntsc, snes_ntsc_setup_t const* setup ); + +/* Filters one or more rows of pixels. Input pixel format is set by SNES_NTSC_IN_FORMAT +and output RGB depth is set by SNES_NTSC_OUT_DEPTH. Both default to 16-bit RGB. +In_row_width is the number of pixels to get to the next input row. Out_pitch +is the number of *bytes* to get to the next output row. */ +void snes_ntsc_blit( snes_ntsc_t const* ntsc, SNES_NTSC_IN_T const* input, + long in_row_width, int burst_phase, int in_width, int in_height, + void* rgb_out, long out_pitch ); + +void snes_ntsc_blit_hires( snes_ntsc_t const* ntsc, SNES_NTSC_IN_T const* input, + long in_row_width, int burst_phase, int in_width, int in_height, + void* rgb_out, long out_pitch ); + +/* Number of output pixels written by low-res blitter for given input width. Width +might be rounded down slightly; use SNES_NTSC_IN_WIDTH() on result to find rounded +value. Guaranteed not to round 256 down at all. */ +#define SNES_NTSC_OUT_WIDTH( in_width ) \ + ((((in_width) - 1) / snes_ntsc_in_chunk + 1) * snes_ntsc_out_chunk) + +/* Number of low-res input pixels that will fit within given output width. Might be +rounded down slightly; use SNES_NTSC_OUT_WIDTH() on result to find rounded +value. */ +#define SNES_NTSC_IN_WIDTH( out_width ) \ + (((out_width) / snes_ntsc_out_chunk - 1) * snes_ntsc_in_chunk + 1) + + +/* Interface for user-defined custom blitters */ + +enum { snes_ntsc_in_chunk = 3 }; /* number of input pixels read per chunk */ +enum { snes_ntsc_out_chunk = 7 }; /* number of output pixels generated per chunk */ +enum { snes_ntsc_black = 0 }; /* palette index for black */ +enum { snes_ntsc_burst_count = 3 }; /* burst phase cycles through 0, 1, and 2 */ + +/* Begins outputting row and starts three pixels. First pixel will be cut off a bit. +Use snes_ntsc_black for unused pixels. Declares variables, so must be before first +statement in a block (unless you're using C++). */ +#define SNES_NTSC_BEGIN_ROW( ntsc, burst, pixel0, pixel1, pixel2 ) \ + char const* ktable = \ + (char const*) (ntsc)->table + burst * (snes_ntsc_burst_size * sizeof (snes_ntsc_rgb_t));\ + SNES_NTSC_BEGIN_ROW_6_( pixel0, pixel1, pixel2, SNES_NTSC_IN_FORMAT, ktable ) + +/* Begins input pixel */ +#define SNES_NTSC_COLOR_IN( index, color ) \ + SNES_NTSC_COLOR_IN_( index, color, SNES_NTSC_IN_FORMAT, ktable ) + +/* Generates output pixel. Bits can be 24, 16, 15, 14, 32 (treated as 24), or 0: +24: RRRRRRRR GGGGGGGG BBBBBBBB (8-8-8 RGB) +16: RRRRRGGG GGGBBBBB (5-6-5 RGB) +15: RRRRRGG GGGBBBBB (5-5-5 RGB) +14: BBBBBGG GGGRRRRR (5-5-5 BGR, native SNES format) + 0: xxxRRRRR RRRxxGGG GGGGGxxB BBBBBBBx (native internal format; x = junk bits) */ +#define SNES_NTSC_RGB_OUT( index, rgb_out, bits ) \ + SNES_NTSC_RGB_OUT_14_( index, rgb_out, bits, 1 ) + +/* Hires equivalents */ +#define SNES_NTSC_HIRES_ROW( ntsc, burst, pixel1, pixel2, pixel3, pixel4, pixel5 ) \ + char const* ktable = \ + (char const*) (ntsc)->table + burst * (snes_ntsc_burst_size * sizeof (snes_ntsc_rgb_t));\ + unsigned const snes_ntsc_pixel1_ = (pixel1);\ + snes_ntsc_rgb_t const* kernel1 = SNES_NTSC_IN_FORMAT( ktable, snes_ntsc_pixel1_ );\ + unsigned const snes_ntsc_pixel2_ = (pixel2);\ + snes_ntsc_rgb_t const* kernel2 = SNES_NTSC_IN_FORMAT( ktable, snes_ntsc_pixel2_ );\ + unsigned const snes_ntsc_pixel3_ = (pixel3);\ + snes_ntsc_rgb_t const* kernel3 = SNES_NTSC_IN_FORMAT( ktable, snes_ntsc_pixel3_ );\ + unsigned const snes_ntsc_pixel4_ = (pixel4);\ + snes_ntsc_rgb_t const* kernel4 = SNES_NTSC_IN_FORMAT( ktable, snes_ntsc_pixel4_ );\ + unsigned const snes_ntsc_pixel5_ = (pixel5);\ + snes_ntsc_rgb_t const* kernel5 = SNES_NTSC_IN_FORMAT( ktable, snes_ntsc_pixel5_ );\ + snes_ntsc_rgb_t const* kernel0 = kernel1;\ + snes_ntsc_rgb_t const* kernelx0;\ + snes_ntsc_rgb_t const* kernelx1 = kernel1;\ + snes_ntsc_rgb_t const* kernelx2 = kernel1;\ + snes_ntsc_rgb_t const* kernelx3 = kernel1;\ + snes_ntsc_rgb_t const* kernelx4 = kernel1;\ + snes_ntsc_rgb_t const* kernelx5 = kernel1 + +#define SNES_NTSC_HIRES_OUT( x, rgb_out, bits ) {\ + snes_ntsc_rgb_t raw_ =\ + kernel0 [ x ] + kernel2 [(x+5)%7+14] + kernel4 [(x+3)%7+28] +\ + kernelx0 [(x+7)%7+7] + kernelx2 [(x+5)%7+21] + kernelx4 [(x+3)%7+35] +\ + kernel1 [(x+6)%7 ] + kernel3 [(x+4)%7+14] + kernel5 [(x+2)%7+28] +\ + kernelx1 [(x+6)%7+7] + kernelx3 [(x+4)%7+21] + kernelx5 [(x+2)%7+35];\ + SNES_NTSC_CLAMP_( raw_, 0 );\ + SNES_NTSC_RGB_OUT_( rgb_out, (bits), 0 );\ +} + + +/* private */ +enum { snes_ntsc_entry_size = 128 }; +enum { snes_ntsc_palette_size = 0x2000 }; +typedef unsigned long snes_ntsc_rgb_t; +struct snes_ntsc_t { + snes_ntsc_rgb_t table [snes_ntsc_palette_size] [snes_ntsc_entry_size]; +}; +enum { snes_ntsc_burst_size = snes_ntsc_entry_size / snes_ntsc_burst_count }; + +#define SNES_NTSC_RGB16( ktable, n ) \ + (snes_ntsc_rgb_t const*) (ktable + ((n & 0x001E) | (n >> 1 & 0x03E0) | (n >> 2 & 0x3C00)) * \ + (snes_ntsc_entry_size / 2 * sizeof (snes_ntsc_rgb_t))) + +#define SNES_NTSC_BGR15( ktable, n ) \ + (snes_ntsc_rgb_t const*) (ktable + ((n << 9 & 0x3C00) | (n & 0x03E0) | (n >> 10 & 0x001E)) * \ + (snes_ntsc_entry_size / 2 * sizeof (snes_ntsc_rgb_t))) + +/* common 3->7 ntsc macros */ +#define SNES_NTSC_BEGIN_ROW_6_( pixel0, pixel1, pixel2, ENTRY, table ) \ + unsigned const snes_ntsc_pixel0_ = (pixel0);\ + snes_ntsc_rgb_t const* kernel0 = ENTRY( table, snes_ntsc_pixel0_ );\ + unsigned const snes_ntsc_pixel1_ = (pixel1);\ + snes_ntsc_rgb_t const* kernel1 = ENTRY( table, snes_ntsc_pixel1_ );\ + unsigned const snes_ntsc_pixel2_ = (pixel2);\ + snes_ntsc_rgb_t const* kernel2 = ENTRY( table, snes_ntsc_pixel2_ );\ + snes_ntsc_rgb_t const* kernelx0;\ + snes_ntsc_rgb_t const* kernelx1 = kernel0;\ + snes_ntsc_rgb_t const* kernelx2 = kernel0 + +#define SNES_NTSC_RGB_OUT_14_( x, rgb_out, bits, shift ) {\ + snes_ntsc_rgb_t raw_ =\ + kernel0 [x ] + kernel1 [(x+12)%7+14] + kernel2 [(x+10)%7+28] +\ + kernelx0 [(x+7)%14] + kernelx1 [(x+ 5)%7+21] + kernelx2 [(x+ 3)%7+35];\ + SNES_NTSC_CLAMP_( raw_, shift );\ + SNES_NTSC_RGB_OUT_( rgb_out, bits, shift );\ +} + +/* common ntsc macros */ +#define snes_ntsc_rgb_builder ((1L << 21) | (1 << 11) | (1 << 1)) +#define snes_ntsc_clamp_mask (snes_ntsc_rgb_builder * 3 / 2) +#define snes_ntsc_clamp_add (snes_ntsc_rgb_builder * 0x101) +#define SNES_NTSC_CLAMP_( io, shift ) {\ + snes_ntsc_rgb_t sub = (io) >> (9-(shift)) & snes_ntsc_clamp_mask;\ + snes_ntsc_rgb_t clamp = snes_ntsc_clamp_add - sub;\ + io |= clamp;\ + clamp -= sub;\ + io &= clamp;\ +} + +#define SNES_NTSC_COLOR_IN_( index, color, ENTRY, table ) {\ + unsigned color_;\ + kernelx##index = kernel##index;\ + kernel##index = (color_ = (color), ENTRY( table, color_ ));\ +} + +/* x is always zero except in snes_ntsc library */ +/* original routine */ +/* +#define SNES_NTSC_RGB_OUT_( rgb_out, bits, x ) {\ + if ( bits == 16 )\ + rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\ + if ( bits == 24 || bits == 32 )\ + rgb_out = (raw_>>(5-x)&0xFF0000)|(raw_>>(3-x)&0xFF00)|(raw_>>(1-x)&0xFF);\ + if ( bits == 15 )\ + rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\ + if ( bits == 14 )\ + rgb_out = (raw_>>(24-x)& 0x001F)|(raw_>>(9-x)&0x03E0)|(raw_<<(6+x)&0x7C00);\ + if ( bits == 0 )\ + rgb_out = raw_ << x;\ +} +*/ + +/* custom bsnes routine -- hooks into bsnes colortable */ +#define SNES_NTSC_RGB_OUT_( rgb_out, bits, x ) {\ + if ( bits == 16 ) {\ + rgb_out = (raw_>>(13-x)& 0xF800)|(raw_>>(8-x)&0x07E0)|(raw_>>(4-x)&0x001F);\ + rgb_out = ((rgb_out&0xf800)>>11)|((rgb_out&0x07c0)>>1)|((rgb_out&0x001f)<<10);\ + rgb_out = colortable[rgb_out];\ + } else if ( bits == 24 || bits == 32 ) {\ + rgb_out = (raw_>>(5-x)&0xFF0000)|(raw_>>(3-x)&0xFF00)|(raw_>>(1-x)&0xFF);\ + rgb_out = ((rgb_out&0xf80000)>>19)|((rgb_out&0x00f800)>>6)|((rgb_out&0x0000f8)<<7);\ + rgb_out = colortable[rgb_out];\ + } else if ( bits == 15 ) {\ + rgb_out = (raw_>>(14-x)& 0x7C00)|(raw_>>(9-x)&0x03E0)|(raw_>>(4-x)&0x001F);\ + rgb_out = ((rgb_out&0x7c00)>>10)|((rgb_out&0x03e0))|((rgb_out&0x001f)<<10);\ + rgb_out = colortable[rgb_out];\ + } else {\ + rgb_out = raw_ << x;\ + }\ +} + +#ifdef __cplusplus + } +#endif + +#endif diff --git a/bsnes/filter/snes_ntsc/snes_ntsc_config.h b/bsnes/filter/snes_ntsc/snes_ntsc_config.h new file mode 100644 index 00000000..7ab94c2c --- /dev/null +++ b/bsnes/filter/snes_ntsc/snes_ntsc_config.h @@ -0,0 +1,26 @@ +/* Configure library by modifying this file */ + +#ifndef SNES_NTSC_CONFIG_H +#define SNES_NTSC_CONFIG_H + +/* Format of source pixels */ +/* #define SNES_NTSC_IN_FORMAT SNES_NTSC_RGB16 */ +#define SNES_NTSC_IN_FORMAT SNES_NTSC_BGR15 + +/* The following affect the built-in blitter only; a custom blitter can +handle things however it wants. */ + +/* Bits per pixel of output. Can be 15, 16, 32, or 24 (same as 32). */ +#define SNES_NTSC_OUT_DEPTH 32 + +/* Type of input pixel values */ +#define SNES_NTSC_IN_T unsigned short + +/* Each raw pixel input value is passed through this. You might want to mask +the pixel index if you use the high bits as flags, etc. */ +#define SNES_NTSC_ADJ_IN( in ) in + +/* For each pixel, this is the basic operation: +output_color = SNES_NTSC_ADJ_IN( SNES_NTSC_IN_T ) */ + +#endif diff --git a/bsnes/filter/snes_ntsc/snes_ntsc_impl.h b/bsnes/filter/snes_ntsc/snes_ntsc_impl.h new file mode 100644 index 00000000..1d7adc78 --- /dev/null +++ b/bsnes/filter/snes_ntsc/snes_ntsc_impl.h @@ -0,0 +1,439 @@ +/* snes_ntsc 0.2.2. http://www.slack.net/~ant/ */ + +/* Common implementation of NTSC filters */ + +#include +#include + +/* Copyright (C) 2006 Shay Green. This module is free software; you +can redistribute it and/or modify it under the terms of the GNU Lesser +General Public License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. This +module is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. You should have received a copy of the GNU Lesser General Public +License along with this module; if not, write to the Free Software Foundation, +Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#define DISABLE_CORRECTION 0 + +#undef PI +#define PI 3.14159265358979323846f + +#ifndef LUMA_CUTOFF + #define LUMA_CUTOFF 0.20 +#endif +#ifndef gamma_size + #define gamma_size 1 +#endif +#ifndef rgb_bits + #define rgb_bits 8 +#endif +#ifndef artifacts_max + #define artifacts_max (artifacts_mid * 1.5f) +#endif +#ifndef fringing_max + #define fringing_max (fringing_mid * 2) +#endif +#ifndef STD_HUE_CONDITION + #define STD_HUE_CONDITION( setup ) 1 +#endif + +#define ext_decoder_hue (std_decoder_hue + 15) +#define rgb_unit (1 << rgb_bits) +#define rgb_offset (rgb_unit * 2 + 0.5f) + +enum { burst_size = snes_ntsc_entry_size / burst_count }; +enum { kernel_half = 16 }; +enum { kernel_size = kernel_half * 2 + 1 }; + +typedef struct init_t +{ + float to_rgb [burst_count * 6]; + float to_float [gamma_size]; + float contrast; + float brightness; + float artifacts; + float fringing; + float kernel [rescale_out * kernel_size * 2]; +} init_t; + +#define ROTATE_IQ( i, q, sin_b, cos_b ) {\ + float t;\ + t = i * cos_b - q * sin_b;\ + q = i * sin_b + q * cos_b;\ + i = t;\ +} + +static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup ) +{ +#if rescale_out > 1 + float kernels [kernel_size * 2]; +#else + float* const kernels = impl->kernel; +#endif + + /* generate luma (y) filter using sinc kernel */ + { + /* sinc with rolloff (dsf) */ + float const rolloff = 1 + (float) setup->sharpness * (float) 0.032; + float const maxh = 32; + float const pow_a_n = (float) pow( rolloff, maxh ); + float sum; + int i; + /* quadratic mapping to reduce negative (blurring) range */ + float to_angle = (float) setup->resolution + 1; + to_angle = PI / maxh * (float) LUMA_CUTOFF * (to_angle * to_angle + 1); + + kernels [kernel_size * 3 / 2] = maxh; /* default center value */ + for ( i = 0; i < kernel_half * 2 + 1; i++ ) + { + int x = i - kernel_half; + float angle = x * to_angle; + /* instability occurs at center point with rolloff very close to 1.0 */ + if ( x || pow_a_n > (float) 1.056 || pow_a_n < (float) 0.981 ) + { + float rolloff_cos_a = rolloff * (float) cos( angle ); + float num = 1 - rolloff_cos_a - + pow_a_n * (float) cos( maxh * angle ) + + pow_a_n * rolloff * (float) cos( (maxh - 1) * angle ); + float den = 1 - rolloff_cos_a - rolloff_cos_a + rolloff * rolloff; + float dsf = num / den; + kernels [kernel_size * 3 / 2 - kernel_half + i] = dsf - (float) 0.5; + } + } + + /* apply blackman window and find sum */ + sum = 0; + for ( i = 0; i < kernel_half * 2 + 1; i++ ) + { + float x = PI * 2 / (kernel_half * 2) * i; + float blackman = 0.42f - 0.5f * (float) cos( x ) + 0.08f * (float) cos( x * 2 ); + sum += (kernels [kernel_size * 3 / 2 - kernel_half + i] *= blackman); + } + + /* normalize kernel */ + sum = 1.0f / sum; + for ( i = 0; i < kernel_half * 2 + 1; i++ ) + { + int x = kernel_size * 3 / 2 - kernel_half + i; + kernels [x] *= sum; + assert( kernels [x] == kernels [x] ); /* catch numerical instability */ + } + } + + /* generate chroma (iq) filter using gaussian kernel */ + { + float const cutoff_factor = -0.03125f; + float cutoff = (float) setup->bleed; + int i; + + if ( cutoff < 0 ) + { + /* keep extreme value accessible only near upper end of scale (1.0) */ + cutoff *= cutoff; + cutoff *= cutoff; + cutoff *= cutoff; + cutoff *= -30.0f / 0.65f; + } + cutoff = cutoff_factor - 0.65f * cutoff_factor * cutoff; + + for ( i = -kernel_half; i <= kernel_half; i++ ) + kernels [kernel_size / 2 + i] = (float) exp( i * i * cutoff ); + + /* normalize even and odd phases separately */ + for ( i = 0; i < 2; i++ ) + { + float sum = 0; + int x; + for ( x = i; x < kernel_size; x += 2 ) + sum += kernels [x]; + + sum = 1.0f / sum; + for ( x = i; x < kernel_size; x += 2 ) + { + kernels [x] *= sum; + assert( kernels [x] == kernels [x] ); /* catch numerical instability */ + } + } + } + + /* + printf( "luma:\n" ); + for ( i = kernel_size; i < kernel_size * 2; i++ ) + printf( "%f\n", kernels [i] ); + printf( "chroma:\n" ); + for ( i = 0; i < kernel_size; i++ ) + printf( "%f\n", kernels [i] ); + */ + + /* generate linear rescale kernels */ + #if rescale_out > 1 + { + float weight = 1.0f; + float* out = impl->kernel; + int n = rescale_out; + do + { + float remain = 0; + int i; + weight -= 1.0f / rescale_in; + for ( i = 0; i < kernel_size * 2; i++ ) + { + float cur = kernels [i]; + float m = cur * weight; + *out++ = m + remain; + remain = cur - m; + } + } + while ( --n ); + } + #endif +} + +static float const default_decoder [6] = + { 0.956f, 0.621f, -0.272f, -0.647f, -1.105f, 1.702f }; + +static void init( init_t* impl, snes_ntsc_setup_t const* setup ) +{ + impl->brightness = (float) setup->brightness * (0.5f * rgb_unit) + rgb_offset; + impl->contrast = (float) setup->contrast * (0.5f * rgb_unit) + rgb_unit; + #ifdef default_palette_contrast + if ( !setup->palette ) + impl->contrast *= default_palette_contrast; + #endif + + impl->artifacts = (float) setup->artifacts; + if ( impl->artifacts > 0 ) + impl->artifacts *= artifacts_max - artifacts_mid; + impl->artifacts = impl->artifacts * artifacts_mid + artifacts_mid; + + impl->fringing = (float) setup->fringing; + if ( impl->fringing > 0 ) + impl->fringing *= fringing_max - fringing_mid; + impl->fringing = impl->fringing * fringing_mid + fringing_mid; + + init_filters( impl, setup ); + + /* generate gamma table */ + if ( gamma_size > 1 ) + { + float const to_float = 1.0f / (gamma_size - (gamma_size > 1)); + float const gamma = 1.1333f - (float) setup->gamma * 0.5f; + /* match common PC's 2.2 gamma to TV's 2.65 gamma */ + int i; + for ( i = 0; i < gamma_size; i++ ) + impl->to_float [i] = + (float) pow( i * to_float, gamma ) * impl->contrast + impl->brightness; + } + + /* setup decoder matricies */ + { + float hue = (float) setup->hue * PI + PI / 180 * ext_decoder_hue; + float sat = (float) setup->saturation + 1; + float const* decoder = setup->decoder_matrix; + if ( !decoder ) + { + decoder = default_decoder; + if ( STD_HUE_CONDITION( setup ) ) + hue += PI / 180 * (std_decoder_hue - ext_decoder_hue); + } + + { + float s = (float) sin( hue ) * sat; + float c = (float) cos( hue ) * sat; + float* out = impl->to_rgb; + int n; + + n = burst_count; + do + { + float const* in = decoder; + int n = 3; + do + { + float i = *in++; + float q = *in++; + *out++ = i * c - q * s; + *out++ = i * s + q * c; + } + while ( --n ); + if ( burst_count <= 1 ) + break; + ROTATE_IQ( s, c, 0.866025f, -0.5f ); /* +120 degrees */ + } + while ( --n ); + } + } +} + +/* kernel generation */ + +#define RGB_TO_YIQ( r, g, b, y, i ) (\ + (y = (r) * 0.299f + (g) * 0.587f + (b) * 0.114f),\ + (i = (r) * 0.596f - (g) * 0.275f - (b) * 0.321f),\ + ((r) * 0.212f - (g) * 0.523f + (b) * 0.311f)\ +) + +#define YIQ_TO_RGB( y, i, q, to_rgb, type, r, g ) (\ + r = (type) (y + to_rgb [0] * i + to_rgb [1] * q),\ + g = (type) (y + to_rgb [2] * i + to_rgb [3] * q),\ + (type) (y + to_rgb [4] * i + to_rgb [5] * q)\ +) + +#define PACK_RGB( r, g, b ) ((r) << 21 | (g) << 11 | (b) << 1) + +enum { rgb_kernel_size = burst_size / alignment_count }; +enum { rgb_bias = rgb_unit * 2 * snes_ntsc_rgb_builder }; + +typedef struct pixel_info_t +{ + int offset; + float negate; + float kernel [4]; +} pixel_info_t; + +#if rescale_in > 1 + #define PIXEL_OFFSET_( ntsc, scaled ) \ + (kernel_size / 2 + ntsc + (scaled != 0) + (rescale_out - scaled) % rescale_out + \ + (kernel_size * 2 * scaled)) + + #define PIXEL_OFFSET( ntsc, scaled ) \ + PIXEL_OFFSET_( ((ntsc) - (scaled) / rescale_out * rescale_in),\ + (((scaled) + rescale_out * 10) % rescale_out) ),\ + (1.0f - (((ntsc) + 100) & 2)) +#else + #define PIXEL_OFFSET( ntsc, scaled ) \ + (kernel_size / 2 + (ntsc) - (scaled)),\ + (1.0f - (((ntsc) + 100) & 2)) +#endif + +extern pixel_info_t const snes_ntsc_pixels [alignment_count]; + +/* Generate pixel at all burst phases and column alignments */ +static void gen_kernel( init_t* impl, float y, float i, float q, snes_ntsc_rgb_t* out ) +{ + /* generate for each scanline burst phase */ + float const* to_rgb = impl->to_rgb; + int burst_remain = burst_count; + y -= rgb_offset; + do + { + /* Encode yiq into *two* composite signals (to allow control over artifacting). + Convolve these with kernels which: filter respective components, apply + sharpening, and rescale horizontally. Convert resulting yiq to rgb and pack + into integer. Based on algorithm by NewRisingSun. */ + pixel_info_t const* pixel = snes_ntsc_pixels; + int alignment_remain = alignment_count; + do + { + /* negate is -1 when composite starts at odd multiple of 2 */ + float const yy = y * impl->fringing * pixel->negate; + float const ic0 = (i + yy) * pixel->kernel [0]; + float const qc1 = (q + yy) * pixel->kernel [1]; + float const ic2 = (i - yy) * pixel->kernel [2]; + float const qc3 = (q - yy) * pixel->kernel [3]; + + float const factor = impl->artifacts * pixel->negate; + float const ii = i * factor; + float const yc0 = (y + ii) * pixel->kernel [0]; + float const yc2 = (y - ii) * pixel->kernel [2]; + + float const qq = q * factor; + float const yc1 = (y + qq) * pixel->kernel [1]; + float const yc3 = (y - qq) * pixel->kernel [3]; + + float const* k = &impl->kernel [pixel->offset]; + int n; + ++pixel; + for ( n = rgb_kernel_size; n; --n ) + { + float i = k[0]*ic0 + k[2]*ic2; + float q = k[1]*qc1 + k[3]*qc3; + float y = k[kernel_size+0]*yc0 + k[kernel_size+1]*yc1 + + k[kernel_size+2]*yc2 + k[kernel_size+3]*yc3 + rgb_offset; + if ( rescale_out <= 1 ) + k--; + else if ( k < &impl->kernel [kernel_size * 2 * (rescale_out - 1)] ) + k += kernel_size * 2 - 1; + else + k -= kernel_size * 2 * (rescale_out - 1) + 2; + { + int r, g, b = YIQ_TO_RGB( y, i, q, to_rgb, int, r, g ); + *out++ = PACK_RGB( r, g, b ) - rgb_bias; + } + } + } + while ( alignment_count > 1 && --alignment_remain ); + + if ( burst_count <= 1 ) + break; + + to_rgb += 6; + + ROTATE_IQ( i, q, -0.866025f, -0.5f ); /* -120 degrees */ + } + while ( --burst_remain ); +} + +static void correct_errors( snes_ntsc_rgb_t color, snes_ntsc_rgb_t* out ); + +#if DISABLE_CORRECTION + #define CORRECT_ERROR( a ) { out [i] += rgb_bias; } + #define DISTRIBUTE_ERROR( a, b, c ) { out [i] += rgb_bias; } +#else + #define CORRECT_ERROR( a ) { out [a] += error; } + #define DISTRIBUTE_ERROR( a, b, c ) {\ + snes_ntsc_rgb_t fourth = (error + 2 * snes_ntsc_rgb_builder) >> 2;\ + fourth &= (rgb_bias >> 1) - snes_ntsc_rgb_builder;\ + fourth -= rgb_bias >> 2;\ + out [a] += fourth;\ + out [b] += fourth;\ + out [c] += fourth;\ + out [i] += error - (fourth * 3);\ + } +#endif + +#define RGB_PALETTE_OUT( rgb, out_ )\ +{\ + unsigned char* out = (out_);\ + snes_ntsc_rgb_t clamped = (rgb);\ + SNES_NTSC_CLAMP_( clamped, (8 - rgb_bits) );\ + out [0] = (unsigned char) (clamped >> 21);\ + out [1] = (unsigned char) (clamped >> 11);\ + out [2] = (unsigned char) (clamped >> 1);\ +} + +/* blitter related */ + +#ifndef restrict + #if defined (__GNUC__) + #define restrict __restrict__ + #elif defined (_MSC_VER) && _MSC_VER > 1300 + #define restrict __restrict + #else + /* no support for restricted pointers */ + #define restrict + #endif +#endif + +#include + +#if SNES_NTSC_OUT_DEPTH <= 16 + #if USHRT_MAX == 0xFFFF + typedef unsigned short snes_ntsc_out_t; + #else + #error "Need 16-bit int type" + #endif + +#else + #if UINT_MAX == 0xFFFFFFFF + typedef unsigned int snes_ntsc_out_t; + #elif ULONG_MAX == 0xFFFFFFFF + typedef unsigned long snes_ntsc_out_t; + #else + #error "Need 32-bit int type" + #endif + +#endif diff --git a/bsnes/filter/super-2xsai.cpp b/bsnes/filter/super-2xsai.cpp new file mode 100644 index 00000000..c760f8be --- /dev/null +++ b/bsnes/filter/super-2xsai.cpp @@ -0,0 +1,25 @@ +namespace Filter::Super2xSaI { + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +uint32_t temp[512 * 480]; + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + for(unsigned y = 0; y < height; y++) { + const uint16_t *line_in = (const uint16_t*)(((const uint8_t*)input) + pitch * y); + uint32_t *line_out = temp + y * width; + for(unsigned x = 0; x < width; x++) { + line_out[x] = colortable[line_in[x]]; + } + } + + Super2xSaI32((unsigned char*)temp, width * sizeof(uint32_t), 0, (unsigned char*)output, outpitch, width, height); +} + +} diff --git a/bsnes/filter/super-eagle.cpp b/bsnes/filter/super-eagle.cpp new file mode 100644 index 00000000..90eb8757 --- /dev/null +++ b/bsnes/filter/super-eagle.cpp @@ -0,0 +1,25 @@ +namespace Filter::SuperEagle { + +auto size(uint& width, uint& height) -> void { + width *= 2; + height *= 2; +} + +uint32_t temp[512 * 480]; + +auto render( + uint32_t* colortable, uint32_t* output, uint outpitch, + const uint16_t* input, uint pitch, uint width, uint height +) -> void { + for(unsigned y = 0; y < height; y++) { + const uint16_t *line_in = (const uint16_t*)(((const uint8_t*)input) + pitch * y); + uint32_t *line_out = temp + y * width; + for(unsigned x = 0; x < width; x++) { + line_out[x] = colortable[line_in[x]]; + } + } + + SuperEagle32((unsigned char*)temp, width * sizeof(uint32_t), 0, (unsigned char*)output, outpitch, width, height); +} + +} diff --git a/bsnes/gb/interface/game-boy-color.cpp b/bsnes/gb/interface/game-boy-color.cpp index 645d6dac..edacf495 100644 --- a/bsnes/gb/interface/game-boy-color.cpp +++ b/bsnes/gb/interface/game-boy-color.cpp @@ -15,15 +15,6 @@ auto GameBoyColorInterface::color(uint32 color) -> uint64 { uint64_t G = image::normalize(g, 5, 16); uint64_t B = image::normalize(b, 5, 16); - if(settings.colorEmulation) { - R = (r * 26 + g * 4 + b * 2); - G = ( g * 24 + b * 8); - B = (r * 6 + g * 4 + b * 22); - R = image::normalize(min(960, R), 10, 16); - G = image::normalize(min(960, G), 10, 16); - B = image::normalize(min(960, B), 10, 16); - } - return R << 32 | G << 16 | B << 0; } diff --git a/bsnes/gb/interface/game-boy.cpp b/bsnes/gb/interface/game-boy.cpp index cd02025e..76fd1ae0 100644 --- a/bsnes/gb/interface/game-boy.cpp +++ b/bsnes/gb/interface/game-boy.cpp @@ -7,39 +7,8 @@ auto GameBoyInterface::information() -> Information { } auto GameBoyInterface::color(uint32 color) -> uint64 { - if(!settings.colorEmulation) { - uint64 L = image::normalize(3 - color, 2, 16); - return L << 32 | L << 16 | L << 0; - } else { - #define DMG_PALETTE_GREEN - //#define DMG_PALETTE_YELLOW - //#define DMG_PALETTE_WHITE - - const uint16 monochrome[4][3] = { - #if defined(DMG_PALETTE_GREEN) - {0xaeae, 0xd9d9, 0x2727}, - {0x5858, 0xa0a0, 0x2828}, - {0x2020, 0x6262, 0x2929}, - {0x1a1a, 0x4545, 0x2a2a}, - #elif defined(DMG_PALETTE_YELLOW) - {0xffff, 0xf7f7, 0x7b7b}, - {0xb5b5, 0xaeae, 0x4a4a}, - {0x6b6b, 0x6969, 0x3131}, - {0x2121, 0x2020, 0x1010}, - #elif defined(DMG_PALETTE_WHITE) - {0xffff, 0xffff, 0xffff}, - {0xaaaa, 0xaaaa, 0xaaaa}, - {0x5555, 0x5555, 0x5555}, - {0x0000, 0x0000, 0x0000}, - #endif - }; - - uint64 R = monochrome[color][0]; - uint64 G = monochrome[color][1]; - uint64 B = monochrome[color][2]; - - return R << 32 | G << 16 | B << 0; - } + uint64 L = image::normalize(3 - color, 2, 16); + return L << 32 | L << 16 | L << 0; } auto GameBoyInterface::load() -> bool { diff --git a/bsnes/gb/interface/interface.cpp b/bsnes/gb/interface/interface.cpp index 8e612b14..8f6d6fc5 100644 --- a/bsnes/gb/interface/interface.cpp +++ b/bsnes/gb/interface/interface.cpp @@ -3,7 +3,6 @@ namespace GameBoy { SuperGameBoyInterface* superGameBoy = nullptr; -Settings settings; #include "game-boy.cpp" #include "game-boy-color.cpp" @@ -110,32 +109,14 @@ auto Interface::cheats(const vector& list) -> void { } auto Interface::cap(const string& name) -> bool { - if(name == "Blur Emulation") return true; - if(name == "Color Emulation") return true; return false; } auto Interface::get(const string& name) -> any { - if(name == "Blur Emulation") return settings.blurEmulation; - if(name == "Color Emulation") return settings.colorEmulation; return {}; } auto Interface::set(const string& name, const any& value) -> bool { - if(name == "Blur Emulation" && value.is()) { - settings.blurEmulation = value.get(); - if(Model::SuperGameBoy()) return true; - Emulator::video.setEffect(Emulator::Video::Effect::InterframeBlending, settings.blurEmulation); - return true; - } - - if(name == "Color Emulation" && value.is()) { - settings.colorEmulation = value.get(); - if(Model::SuperGameBoy()) return true; - Emulator::video.setPalette(); - return true; - } - return false; } diff --git a/bsnes/gb/interface/interface.hpp b/bsnes/gb/interface/interface.hpp index 4d611161..0eb238e4 100644 --- a/bsnes/gb/interface/interface.hpp +++ b/bsnes/gb/interface/interface.hpp @@ -74,12 +74,6 @@ struct SuperGameBoyInterface { virtual auto joypWrite(bool p15, bool p14) -> void = 0; }; -struct Settings { - bool blurEmulation = true; - bool colorEmulation = true; -}; - extern SuperGameBoyInterface* superGameBoy; -extern Settings settings; } diff --git a/bsnes/gb/system/system.cpp b/bsnes/gb/system/system.cpp index f511e28a..287e60dc 100644 --- a/bsnes/gb/system/system.cpp +++ b/bsnes/gb/system/system.cpp @@ -85,8 +85,6 @@ auto System::power() -> void { if(model() != Model::SuperGameBoy) { Emulator::video.reset(interface); Emulator::video.setPalette(); - Emulator::video.setEffect(Emulator::Video::Effect::InterframeBlending, settings.blurEmulation); - Emulator::audio.reset(interface); } diff --git a/bsnes/lzma/7z.h b/bsnes/lzma/7z.h new file mode 100644 index 00000000..82813c29 --- /dev/null +++ b/bsnes/lzma/7z.h @@ -0,0 +1,202 @@ +/* 7z.h -- 7z interface +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_H +#define __7Z_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define k7zStartHeaderSize 0x20 +#define k7zSignatureSize 6 + +extern const Byte k7zSignature[k7zSignatureSize]; + +typedef struct +{ + const Byte *Data; + size_t Size; +} CSzData; + +/* CSzCoderInfo & CSzFolder support only default methods */ + +typedef struct +{ + size_t PropsOffset; + UInt32 MethodID; + Byte NumStreams; + Byte PropsSize; +} CSzCoderInfo; + +typedef struct +{ + UInt32 InIndex; + UInt32 OutIndex; +} CSzBond; + +#define SZ_NUM_CODERS_IN_FOLDER_MAX 4 +#define SZ_NUM_BONDS_IN_FOLDER_MAX 3 +#define SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX 4 + +typedef struct +{ + UInt32 NumCoders; + UInt32 NumBonds; + UInt32 NumPackStreams; + UInt32 UnpackStream; + UInt32 PackStreams[SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX]; + CSzBond Bonds[SZ_NUM_BONDS_IN_FOLDER_MAX]; + CSzCoderInfo Coders[SZ_NUM_CODERS_IN_FOLDER_MAX]; +} CSzFolder; + + +SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd); + +typedef struct +{ + UInt32 Low; + UInt32 High; +} CNtfsFileTime; + +typedef struct +{ + Byte *Defs; /* MSB 0 bit numbering */ + UInt32 *Vals; +} CSzBitUi32s; + +typedef struct +{ + Byte *Defs; /* MSB 0 bit numbering */ + // UInt64 *Vals; + CNtfsFileTime *Vals; +} CSzBitUi64s; + +#define SzBitArray_Check(p, i) (((p)[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) + +#define SzBitWithVals_Check(p, i) ((p)->Defs && ((p)->Defs[(i) >> 3] & (0x80 >> ((i) & 7))) != 0) + +typedef struct +{ + UInt32 NumPackStreams; + UInt32 NumFolders; + + UInt64 *PackPositions; // NumPackStreams + 1 + CSzBitUi32s FolderCRCs; // NumFolders + + size_t *FoCodersOffsets; // NumFolders + 1 + UInt32 *FoStartPackStreamIndex; // NumFolders + 1 + UInt32 *FoToCoderUnpackSizes; // NumFolders + 1 + Byte *FoToMainUnpackSizeIndex; // NumFolders + UInt64 *CoderUnpackSizes; // for all coders in all folders + + Byte *CodersData; +} CSzAr; + +UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex); + +SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, + ILookInStream *stream, UInt64 startPos, + Byte *outBuffer, size_t outSize, + ISzAllocPtr allocMain); + +typedef struct +{ + CSzAr db; + + UInt64 startPosAfterHeader; + UInt64 dataPos; + + UInt32 NumFiles; + + UInt64 *UnpackPositions; // NumFiles + 1 + // Byte *IsEmptyFiles; + Byte *IsDirs; + CSzBitUi32s CRCs; + + CSzBitUi32s Attribs; + // CSzBitUi32s Parents; + CSzBitUi64s MTime; + CSzBitUi64s CTime; + + UInt32 *FolderToFile; // NumFolders + 1 + UInt32 *FileToFolder; // NumFiles + + size_t *FileNameOffsets; /* in 2-byte steps */ + Byte *FileNames; /* UTF-16-LE */ +} CSzArEx; + +#define SzArEx_IsDir(p, i) (SzBitArray_Check((p)->IsDirs, i)) + +#define SzArEx_GetFileSize(p, i) ((p)->UnpackPositions[(i) + 1] - (p)->UnpackPositions[i]) + +void SzArEx_Init(CSzArEx *p); +void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc); +UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder); +int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize); + +/* +if dest == NULL, the return value specifies the required size of the buffer, + in 16-bit characters, including the null-terminating character. +if dest != NULL, the return value specifies the number of 16-bit characters that + are written to the dest, including the null-terminating character. */ + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest); + +/* +size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex); +UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest); +*/ + + + +/* + SzArEx_Extract extracts file from archive + + *outBuffer must be 0 before first call for each new archive. + + Extracting cache: + If you need to decompress more than one file, you can send + these values from previous call: + *blockIndex, + *outBuffer, + *outBufferSize + You can consider "*outBuffer" as cache of solid block. If your archive is solid, + it will increase decompression speed. + + If you use external function, you can declare these 3 cache variables + (blockIndex, outBuffer, outBufferSize) as static in that external function. + + Free *outBuffer and set *outBuffer to 0, if you want to flush cache. +*/ + +SRes SzArEx_Extract( + const CSzArEx *db, + ILookInStream *inStream, + UInt32 fileIndex, /* index of file */ + UInt32 *blockIndex, /* index of solid block */ + Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ + size_t *outBufferSize, /* buffer size for output buffer */ + size_t *offset, /* offset of stream for required file in *outBuffer */ + size_t *outSizeProcessed, /* size of file in *outBuffer */ + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp); + + +/* +SzArEx_Open Errors: +SZ_ERROR_NO_ARCHIVE +SZ_ERROR_ARCHIVE +SZ_ERROR_UNSUPPORTED +SZ_ERROR_MEM +SZ_ERROR_CRC +SZ_ERROR_INPUT_EOF +SZ_ERROR_FAIL +*/ + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, + ISzAllocPtr allocMain, ISzAllocPtr allocTemp); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zAlloc.c b/bsnes/lzma/7zAlloc.c new file mode 100644 index 00000000..ea32809c --- /dev/null +++ b/bsnes/lzma/7zAlloc.c @@ -0,0 +1,80 @@ +/* 7zAlloc.c -- Allocation functions +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zAlloc.h" + +/* #define _SZ_ALLOC_DEBUG */ +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ + +#ifdef _SZ_ALLOC_DEBUG + +#ifdef _WIN32 +#include +#endif + +#include +int g_allocCount = 0; +int g_allocCountTemp = 0; + +#endif + +void *SzAlloc(ISzAllocPtr p, size_t size) +{ + UNUSED_VAR(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc %10u bytes; count = %10d", (unsigned)size, g_allocCount); + g_allocCount++; + #endif + return malloc(size); +} + +void SzFree(ISzAllocPtr p, void *address) +{ + UNUSED_VAR(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCount--; + fprintf(stderr, "\nFree; count = %10d", g_allocCount); + } + #endif + free(address); +} + +void *SzAllocTemp(ISzAllocPtr p, size_t size) +{ + UNUSED_VAR(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_temp %10u bytes; count = %10d", (unsigned)size, g_allocCountTemp); + g_allocCountTemp++; + #ifdef _WIN32 + return HeapAlloc(GetProcessHeap(), 0, size); + #endif + #endif + return malloc(size); +} + +void SzFreeTemp(ISzAllocPtr p, void *address) +{ + UNUSED_VAR(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCountTemp--; + fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); + } + #ifdef _WIN32 + HeapFree(GetProcessHeap(), 0, address); + return; + #endif + #endif + free(address); +} diff --git a/bsnes/lzma/7zAlloc.h b/bsnes/lzma/7zAlloc.h new file mode 100644 index 00000000..c0f89d73 --- /dev/null +++ b/bsnes/lzma/7zAlloc.h @@ -0,0 +1,19 @@ +/* 7zAlloc.h -- Allocation functions +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_ALLOC_H +#define __7Z_ALLOC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +void *SzAlloc(ISzAllocPtr p, size_t size); +void SzFree(ISzAllocPtr p, void *address); + +void *SzAllocTemp(ISzAllocPtr p, size_t size); +void SzFreeTemp(ISzAllocPtr p, void *address); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zArcIn.c b/bsnes/lzma/7zArcIn.c new file mode 100644 index 00000000..68cc12ff --- /dev/null +++ b/bsnes/lzma/7zArcIn.c @@ -0,0 +1,1771 @@ +/* 7zArcIn.c -- 7z Input functions +2018-12-31 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7z.h" +#include "7zBuf.h" +#include "7zCrc.h" +#include "CpuArch.h" + +#define MY_ALLOC(T, p, size, alloc) { \ + if ((p = (T *)ISzAlloc_Alloc(alloc, (size) * sizeof(T))) == NULL) return SZ_ERROR_MEM; } + +#define MY_ALLOC_ZE(T, p, size, alloc) { if ((size) == 0) p = NULL; else MY_ALLOC(T, p, size, alloc) } + +#define MY_ALLOC_AND_CPY(to, size, from, alloc) \ + { MY_ALLOC(Byte, to, size, alloc); memcpy(to, from, size); } + +#define MY_ALLOC_ZE_AND_CPY(to, size, from, alloc) \ + { if ((size) == 0) to = NULL; else { MY_ALLOC_AND_CPY(to, size, from, alloc) } } + +#define k7zMajorVersion 0 + +enum EIdEnum +{ + k7zIdEnd, + k7zIdHeader, + k7zIdArchiveProperties, + k7zIdAdditionalStreamsInfo, + k7zIdMainStreamsInfo, + k7zIdFilesInfo, + k7zIdPackInfo, + k7zIdUnpackInfo, + k7zIdSubStreamsInfo, + k7zIdSize, + k7zIdCRC, + k7zIdFolder, + k7zIdCodersUnpackSize, + k7zIdNumUnpackStream, + k7zIdEmptyStream, + k7zIdEmptyFile, + k7zIdAnti, + k7zIdName, + k7zIdCTime, + k7zIdATime, + k7zIdMTime, + k7zIdWinAttrib, + k7zIdComment, + k7zIdEncodedHeader, + k7zIdStartPos, + k7zIdDummy + // k7zNtSecure, + // k7zParent, + // k7zIsReal +}; + +const Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; + +#define SzBitUi32s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } + +static SRes SzBitUi32s_Alloc(CSzBitUi32s *p, size_t num, ISzAllocPtr alloc) +{ + if (num == 0) + { + p->Defs = NULL; + p->Vals = NULL; + } + else + { + MY_ALLOC(Byte, p->Defs, (num + 7) >> 3, alloc); + MY_ALLOC(UInt32, p->Vals, num, alloc); + } + return SZ_OK; +} + +void SzBitUi32s_Free(CSzBitUi32s *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; + ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; +} + +#define SzBitUi64s_Init(p) { (p)->Defs = NULL; (p)->Vals = NULL; } + +void SzBitUi64s_Free(CSzBitUi64s *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Defs); p->Defs = NULL; + ISzAlloc_Free(alloc, p->Vals); p->Vals = NULL; +} + + +static void SzAr_Init(CSzAr *p) +{ + p->NumPackStreams = 0; + p->NumFolders = 0; + + p->PackPositions = NULL; + SzBitUi32s_Init(&p->FolderCRCs); + + p->FoCodersOffsets = NULL; + p->FoStartPackStreamIndex = NULL; + p->FoToCoderUnpackSizes = NULL; + p->FoToMainUnpackSizeIndex = NULL; + p->CoderUnpackSizes = NULL; + + p->CodersData = NULL; +} + +static void SzAr_Free(CSzAr *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->PackPositions); + SzBitUi32s_Free(&p->FolderCRCs, alloc); + + ISzAlloc_Free(alloc, p->FoCodersOffsets); + ISzAlloc_Free(alloc, p->FoStartPackStreamIndex); + ISzAlloc_Free(alloc, p->FoToCoderUnpackSizes); + ISzAlloc_Free(alloc, p->FoToMainUnpackSizeIndex); + ISzAlloc_Free(alloc, p->CoderUnpackSizes); + + ISzAlloc_Free(alloc, p->CodersData); + + SzAr_Init(p); +} + + +void SzArEx_Init(CSzArEx *p) +{ + SzAr_Init(&p->db); + + p->NumFiles = 0; + p->dataPos = 0; + + p->UnpackPositions = NULL; + p->IsDirs = NULL; + + p->FolderToFile = NULL; + p->FileToFolder = NULL; + + p->FileNameOffsets = NULL; + p->FileNames = NULL; + + SzBitUi32s_Init(&p->CRCs); + SzBitUi32s_Init(&p->Attribs); + // SzBitUi32s_Init(&p->Parents); + SzBitUi64s_Init(&p->MTime); + SzBitUi64s_Init(&p->CTime); +} + +void SzArEx_Free(CSzArEx *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->UnpackPositions); + ISzAlloc_Free(alloc, p->IsDirs); + + ISzAlloc_Free(alloc, p->FolderToFile); + ISzAlloc_Free(alloc, p->FileToFolder); + + ISzAlloc_Free(alloc, p->FileNameOffsets); + ISzAlloc_Free(alloc, p->FileNames); + + SzBitUi32s_Free(&p->CRCs, alloc); + SzBitUi32s_Free(&p->Attribs, alloc); + // SzBitUi32s_Free(&p->Parents, alloc); + SzBitUi64s_Free(&p->MTime, alloc); + SzBitUi64s_Free(&p->CTime, alloc); + + SzAr_Free(&p->db, alloc); + SzArEx_Init(p); +} + + +static int TestSignatureCandidate(const Byte *testBytes) +{ + unsigned i; + for (i = 0; i < k7zSignatureSize; i++) + if (testBytes[i] != k7zSignature[i]) + return 0; + return 1; +} + +#define SzData_Clear(p) { (p)->Data = NULL; (p)->Size = 0; } + +#define SZ_READ_BYTE_SD(_sd_, dest) if ((_sd_)->Size == 0) return SZ_ERROR_ARCHIVE; (_sd_)->Size--; dest = *(_sd_)->Data++; +#define SZ_READ_BYTE(dest) SZ_READ_BYTE_SD(sd, dest) +#define SZ_READ_BYTE_2(dest) if (sd.Size == 0) return SZ_ERROR_ARCHIVE; sd.Size--; dest = *sd.Data++; + +#define SKIP_DATA(sd, size) { sd->Size -= (size_t)(size); sd->Data += (size_t)(size); } +#define SKIP_DATA2(sd, size) { sd.Size -= (size_t)(size); sd.Data += (size_t)(size); } + +#define SZ_READ_32(dest) if (sd.Size < 4) return SZ_ERROR_ARCHIVE; \ + dest = GetUi32(sd.Data); SKIP_DATA2(sd, 4); + +static MY_NO_INLINE SRes ReadNumber(CSzData *sd, UInt64 *value) +{ + Byte firstByte, mask; + unsigned i; + UInt32 v; + + SZ_READ_BYTE(firstByte); + if ((firstByte & 0x80) == 0) + { + *value = firstByte; + return SZ_OK; + } + SZ_READ_BYTE(v); + if ((firstByte & 0x40) == 0) + { + *value = (((UInt32)firstByte & 0x3F) << 8) | v; + return SZ_OK; + } + SZ_READ_BYTE(mask); + *value = v | ((UInt32)mask << 8); + mask = 0x20; + for (i = 2; i < 8; i++) + { + Byte b; + if ((firstByte & mask) == 0) + { + UInt64 highPart = (unsigned)firstByte & (unsigned)(mask - 1); + *value |= (highPart << (8 * i)); + return SZ_OK; + } + SZ_READ_BYTE(b); + *value |= ((UInt64)b << (8 * i)); + mask >>= 1; + } + return SZ_OK; +} + + +static MY_NO_INLINE SRes SzReadNumber32(CSzData *sd, UInt32 *value) +{ + Byte firstByte; + UInt64 value64; + if (sd->Size == 0) + return SZ_ERROR_ARCHIVE; + firstByte = *sd->Data; + if ((firstByte & 0x80) == 0) + { + *value = firstByte; + sd->Data++; + sd->Size--; + return SZ_OK; + } + RINOK(ReadNumber(sd, &value64)); + if (value64 >= (UInt32)0x80000000 - 1) + return SZ_ERROR_UNSUPPORTED; + if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 4))) + return SZ_ERROR_UNSUPPORTED; + *value = (UInt32)value64; + return SZ_OK; +} + +#define ReadID(sd, value) ReadNumber(sd, value) + +static SRes SkipData(CSzData *sd) +{ + UInt64 size; + RINOK(ReadNumber(sd, &size)); + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA(sd, size); + return SZ_OK; +} + +static SRes WaitId(CSzData *sd, UInt32 id) +{ + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == id) + return SZ_OK; + if (type == k7zIdEnd) + return SZ_ERROR_ARCHIVE; + RINOK(SkipData(sd)); + } +} + +static SRes RememberBitVector(CSzData *sd, UInt32 numItems, const Byte **v) +{ + UInt32 numBytes = (numItems + 7) >> 3; + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + *v = sd->Data; + SKIP_DATA(sd, numBytes); + return SZ_OK; +} + +static UInt32 CountDefinedBits(const Byte *bits, UInt32 numItems) +{ + Byte b = 0; + unsigned m = 0; + UInt32 sum = 0; + for (; numItems != 0; numItems--) + { + if (m == 0) + { + b = *bits++; + m = 8; + } + m--; + sum += ((b >> m) & 1); + } + return sum; +} + +static MY_NO_INLINE SRes ReadBitVector(CSzData *sd, UInt32 numItems, Byte **v, ISzAllocPtr alloc) +{ + Byte allAreDefined; + Byte *v2; + UInt32 numBytes = (numItems + 7) >> 3; + *v = NULL; + SZ_READ_BYTE(allAreDefined); + if (numBytes == 0) + return SZ_OK; + if (allAreDefined == 0) + { + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + MY_ALLOC_AND_CPY(*v, numBytes, sd->Data, alloc); + SKIP_DATA(sd, numBytes); + return SZ_OK; + } + MY_ALLOC(Byte, *v, numBytes, alloc); + v2 = *v; + memset(v2, 0xFF, (size_t)numBytes); + { + unsigned numBits = (unsigned)numItems & 7; + if (numBits != 0) + v2[(size_t)numBytes - 1] = (Byte)((((UInt32)1 << numBits) - 1) << (8 - numBits)); + } + return SZ_OK; +} + +static MY_NO_INLINE SRes ReadUi32s(CSzData *sd2, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) +{ + UInt32 i; + CSzData sd; + UInt32 *vals; + const Byte *defs; + MY_ALLOC_ZE(UInt32, crcs->Vals, numItems, alloc); + sd = *sd2; + defs = crcs->Defs; + vals = crcs->Vals; + for (i = 0; i < numItems; i++) + if (SzBitArray_Check(defs, i)) + { + SZ_READ_32(vals[i]); + } + else + vals[i] = 0; + *sd2 = sd; + return SZ_OK; +} + +static SRes ReadBitUi32s(CSzData *sd, UInt32 numItems, CSzBitUi32s *crcs, ISzAllocPtr alloc) +{ + SzBitUi32s_Free(crcs, alloc); + RINOK(ReadBitVector(sd, numItems, &crcs->Defs, alloc)); + return ReadUi32s(sd, numItems, crcs, alloc); +} + +static SRes SkipBitUi32s(CSzData *sd, UInt32 numItems) +{ + Byte allAreDefined; + UInt32 numDefined = numItems; + SZ_READ_BYTE(allAreDefined); + if (!allAreDefined) + { + size_t numBytes = (numItems + 7) >> 3; + if (numBytes > sd->Size) + return SZ_ERROR_ARCHIVE; + numDefined = CountDefinedBits(sd->Data, numItems); + SKIP_DATA(sd, numBytes); + } + if (numDefined > (sd->Size >> 2)) + return SZ_ERROR_ARCHIVE; + SKIP_DATA(sd, (size_t)numDefined * 4); + return SZ_OK; +} + +static SRes ReadPackInfo(CSzAr *p, CSzData *sd, ISzAllocPtr alloc) +{ + RINOK(SzReadNumber32(sd, &p->NumPackStreams)); + + RINOK(WaitId(sd, k7zIdSize)); + MY_ALLOC(UInt64, p->PackPositions, (size_t)p->NumPackStreams + 1, alloc); + { + UInt64 sum = 0; + UInt32 i; + UInt32 numPackStreams = p->NumPackStreams; + for (i = 0; i < numPackStreams; i++) + { + UInt64 packSize; + p->PackPositions[i] = sum; + RINOK(ReadNumber(sd, &packSize)); + sum += packSize; + if (sum < packSize) + return SZ_ERROR_ARCHIVE; + } + p->PackPositions[i] = sum; + } + + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + return SZ_OK; + if (type == k7zIdCRC) + { + /* CRC of packed streams is unused now */ + RINOK(SkipBitUi32s(sd, p->NumPackStreams)); + continue; + } + RINOK(SkipData(sd)); + } +} + +/* +static SRes SzReadSwitch(CSzData *sd) +{ + Byte external; + RINOK(SzReadByte(sd, &external)); + return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; +} +*/ + +#define k_NumCodersStreams_in_Folder_MAX (SZ_NUM_BONDS_IN_FOLDER_MAX + SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) + +SRes SzGetNextFolderItem(CSzFolder *f, CSzData *sd) +{ + UInt32 numCoders, i; + UInt32 numInStreams = 0; + const Byte *dataStart = sd->Data; + + f->NumCoders = 0; + f->NumBonds = 0; + f->NumPackStreams = 0; + f->UnpackStream = 0; + + RINOK(SzReadNumber32(sd, &numCoders)); + if (numCoders == 0 || numCoders > SZ_NUM_CODERS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (i = 0; i < numCoders; i++) + { + Byte mainByte; + CSzCoderInfo *coder = f->Coders + i; + unsigned idSize, j; + UInt64 id; + + SZ_READ_BYTE(mainByte); + if ((mainByte & 0xC0) != 0) + return SZ_ERROR_UNSUPPORTED; + + idSize = (unsigned)(mainByte & 0xF); + if (idSize > sizeof(id)) + return SZ_ERROR_UNSUPPORTED; + if (idSize > sd->Size) + return SZ_ERROR_ARCHIVE; + id = 0; + for (j = 0; j < idSize; j++) + { + id = ((id << 8) | *sd->Data); + sd->Data++; + sd->Size--; + } + if (id > (UInt32)0xFFFFFFFF) + return SZ_ERROR_UNSUPPORTED; + coder->MethodID = (UInt32)id; + + coder->NumStreams = 1; + coder->PropsOffset = 0; + coder->PropsSize = 0; + + if ((mainByte & 0x10) != 0) + { + UInt32 numStreams; + + RINOK(SzReadNumber32(sd, &numStreams)); + if (numStreams > k_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + coder->NumStreams = (Byte)numStreams; + + RINOK(SzReadNumber32(sd, &numStreams)); + if (numStreams != 1) + return SZ_ERROR_UNSUPPORTED; + } + + numInStreams += coder->NumStreams; + + if (numInStreams > k_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + + if ((mainByte & 0x20) != 0) + { + UInt32 propsSize = 0; + RINOK(SzReadNumber32(sd, &propsSize)); + if (propsSize > sd->Size) + return SZ_ERROR_ARCHIVE; + if (propsSize >= 0x80) + return SZ_ERROR_UNSUPPORTED; + coder->PropsOffset = sd->Data - dataStart; + coder->PropsSize = (Byte)propsSize; + sd->Data += (size_t)propsSize; + sd->Size -= (size_t)propsSize; + } + } + + /* + if (numInStreams == 1 && numCoders == 1) + { + f->NumPackStreams = 1; + f->PackStreams[0] = 0; + } + else + */ + { + Byte streamUsed[k_NumCodersStreams_in_Folder_MAX]; + UInt32 numBonds, numPackStreams; + + numBonds = numCoders - 1; + if (numInStreams < numBonds) + return SZ_ERROR_ARCHIVE; + if (numBonds > SZ_NUM_BONDS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + f->NumBonds = numBonds; + + numPackStreams = numInStreams - numBonds; + if (numPackStreams > SZ_NUM_PACK_STREAMS_IN_FOLDER_MAX) + return SZ_ERROR_UNSUPPORTED; + f->NumPackStreams = numPackStreams; + + for (i = 0; i < numInStreams; i++) + streamUsed[i] = False; + + if (numBonds != 0) + { + Byte coderUsed[SZ_NUM_CODERS_IN_FOLDER_MAX]; + + for (i = 0; i < numCoders; i++) + coderUsed[i] = False; + + for (i = 0; i < numBonds; i++) + { + CSzBond *bp = f->Bonds + i; + + RINOK(SzReadNumber32(sd, &bp->InIndex)); + if (bp->InIndex >= numInStreams || streamUsed[bp->InIndex]) + return SZ_ERROR_ARCHIVE; + streamUsed[bp->InIndex] = True; + + RINOK(SzReadNumber32(sd, &bp->OutIndex)); + if (bp->OutIndex >= numCoders || coderUsed[bp->OutIndex]) + return SZ_ERROR_ARCHIVE; + coderUsed[bp->OutIndex] = True; + } + + for (i = 0; i < numCoders; i++) + if (!coderUsed[i]) + { + f->UnpackStream = i; + break; + } + + if (i == numCoders) + return SZ_ERROR_ARCHIVE; + } + + if (numPackStreams == 1) + { + for (i = 0; i < numInStreams; i++) + if (!streamUsed[i]) + break; + if (i == numInStreams) + return SZ_ERROR_ARCHIVE; + f->PackStreams[0] = i; + } + else + for (i = 0; i < numPackStreams; i++) + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + f->PackStreams[i] = index; + } + } + + f->NumCoders = numCoders; + + return SZ_OK; +} + + +static MY_NO_INLINE SRes SkipNumbers(CSzData *sd2, UInt32 num) +{ + CSzData sd; + sd = *sd2; + for (; num != 0; num--) + { + Byte firstByte, mask; + unsigned i; + SZ_READ_BYTE_2(firstByte); + if ((firstByte & 0x80) == 0) + continue; + if ((firstByte & 0x40) == 0) + { + if (sd.Size == 0) + return SZ_ERROR_ARCHIVE; + sd.Size--; + sd.Data++; + continue; + } + mask = 0x20; + for (i = 2; i < 8 && (firstByte & mask) != 0; i++) + mask >>= 1; + if (i > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, i); + } + *sd2 = sd; + return SZ_OK; +} + + +#define k_Scan_NumCoders_MAX 64 +#define k_Scan_NumCodersStreams_in_Folder_MAX 64 + + +static SRes ReadUnpackInfo(CSzAr *p, + CSzData *sd2, + UInt32 numFoldersMax, + const CBuf *tempBufs, UInt32 numTempBufs, + ISzAllocPtr alloc) +{ + CSzData sd; + + UInt32 fo, numFolders, numCodersOutStreams, packStreamIndex; + const Byte *startBufPtr; + Byte external; + + RINOK(WaitId(sd2, k7zIdFolder)); + + RINOK(SzReadNumber32(sd2, &numFolders)); + if (numFolders > numFoldersMax) + return SZ_ERROR_UNSUPPORTED; + p->NumFolders = numFolders; + + SZ_READ_BYTE_SD(sd2, external); + if (external == 0) + sd = *sd2; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd2, &index)); + if (index >= numTempBufs) + return SZ_ERROR_ARCHIVE; + sd.Data = tempBufs[index].data; + sd.Size = tempBufs[index].size; + } + + MY_ALLOC(size_t, p->FoCodersOffsets, (size_t)numFolders + 1, alloc); + MY_ALLOC(UInt32, p->FoStartPackStreamIndex, (size_t)numFolders + 1, alloc); + MY_ALLOC(UInt32, p->FoToCoderUnpackSizes, (size_t)numFolders + 1, alloc); + MY_ALLOC_ZE(Byte, p->FoToMainUnpackSizeIndex, (size_t)numFolders, alloc); + + startBufPtr = sd.Data; + + packStreamIndex = 0; + numCodersOutStreams = 0; + + for (fo = 0; fo < numFolders; fo++) + { + UInt32 numCoders, ci, numInStreams = 0; + + p->FoCodersOffsets[fo] = sd.Data - startBufPtr; + + RINOK(SzReadNumber32(&sd, &numCoders)); + if (numCoders == 0 || numCoders > k_Scan_NumCoders_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (ci = 0; ci < numCoders; ci++) + { + Byte mainByte; + unsigned idSize; + UInt32 coderInStreams; + + SZ_READ_BYTE_2(mainByte); + if ((mainByte & 0xC0) != 0) + return SZ_ERROR_UNSUPPORTED; + idSize = (mainByte & 0xF); + if (idSize > 8) + return SZ_ERROR_UNSUPPORTED; + if (idSize > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, idSize); + + coderInStreams = 1; + + if ((mainByte & 0x10) != 0) + { + UInt32 coderOutStreams; + RINOK(SzReadNumber32(&sd, &coderInStreams)); + RINOK(SzReadNumber32(&sd, &coderOutStreams)); + if (coderInStreams > k_Scan_NumCodersStreams_in_Folder_MAX || coderOutStreams != 1) + return SZ_ERROR_UNSUPPORTED; + } + + numInStreams += coderInStreams; + + if ((mainByte & 0x20) != 0) + { + UInt32 propsSize; + RINOK(SzReadNumber32(&sd, &propsSize)); + if (propsSize > sd.Size) + return SZ_ERROR_ARCHIVE; + SKIP_DATA2(sd, propsSize); + } + } + + { + UInt32 indexOfMainStream = 0; + UInt32 numPackStreams = 1; + + if (numCoders != 1 || numInStreams != 1) + { + Byte streamUsed[k_Scan_NumCodersStreams_in_Folder_MAX]; + Byte coderUsed[k_Scan_NumCoders_MAX]; + + UInt32 i; + UInt32 numBonds = numCoders - 1; + if (numInStreams < numBonds) + return SZ_ERROR_ARCHIVE; + + if (numInStreams > k_Scan_NumCodersStreams_in_Folder_MAX) + return SZ_ERROR_UNSUPPORTED; + + for (i = 0; i < numInStreams; i++) + streamUsed[i] = False; + for (i = 0; i < numCoders; i++) + coderUsed[i] = False; + + for (i = 0; i < numBonds; i++) + { + UInt32 index; + + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numCoders || coderUsed[index]) + return SZ_ERROR_ARCHIVE; + coderUsed[index] = True; + } + + numPackStreams = numInStreams - numBonds; + + if (numPackStreams != 1) + for (i = 0; i < numPackStreams; i++) + { + UInt32 index; + RINOK(SzReadNumber32(&sd, &index)); + if (index >= numInStreams || streamUsed[index]) + return SZ_ERROR_ARCHIVE; + streamUsed[index] = True; + } + + for (i = 0; i < numCoders; i++) + if (!coderUsed[i]) + { + indexOfMainStream = i; + break; + } + + if (i == numCoders) + return SZ_ERROR_ARCHIVE; + } + + p->FoStartPackStreamIndex[fo] = packStreamIndex; + p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; + p->FoToMainUnpackSizeIndex[fo] = (Byte)indexOfMainStream; + numCodersOutStreams += numCoders; + if (numCodersOutStreams < numCoders) + return SZ_ERROR_UNSUPPORTED; + if (numPackStreams > p->NumPackStreams - packStreamIndex) + return SZ_ERROR_ARCHIVE; + packStreamIndex += numPackStreams; + } + } + + p->FoToCoderUnpackSizes[fo] = numCodersOutStreams; + + { + size_t dataSize = sd.Data - startBufPtr; + p->FoStartPackStreamIndex[fo] = packStreamIndex; + p->FoCodersOffsets[fo] = dataSize; + MY_ALLOC_ZE_AND_CPY(p->CodersData, dataSize, startBufPtr, alloc); + } + + if (external != 0) + { + if (sd.Size != 0) + return SZ_ERROR_ARCHIVE; + sd = *sd2; + } + + RINOK(WaitId(&sd, k7zIdCodersUnpackSize)); + + MY_ALLOC_ZE(UInt64, p->CoderUnpackSizes, (size_t)numCodersOutStreams, alloc); + { + UInt32 i; + for (i = 0; i < numCodersOutStreams; i++) + { + RINOK(ReadNumber(&sd, p->CoderUnpackSizes + i)); + } + } + + for (;;) + { + UInt64 type; + RINOK(ReadID(&sd, &type)); + if (type == k7zIdEnd) + { + *sd2 = sd; + return SZ_OK; + } + if (type == k7zIdCRC) + { + RINOK(ReadBitUi32s(&sd, numFolders, &p->FolderCRCs, alloc)); + continue; + } + RINOK(SkipData(&sd)); + } +} + + +UInt64 SzAr_GetFolderUnpackSize(const CSzAr *p, UInt32 folderIndex) +{ + return p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex] + p->FoToMainUnpackSizeIndex[folderIndex]]; +} + + +typedef struct +{ + UInt32 NumTotalSubStreams; + UInt32 NumSubDigests; + CSzData sdNumSubStreams; + CSzData sdSizes; + CSzData sdCRCs; +} CSubStreamInfo; + + +static SRes ReadSubStreamsInfo(CSzAr *p, CSzData *sd, CSubStreamInfo *ssi) +{ + UInt64 type = 0; + UInt32 numSubDigests = 0; + UInt32 numFolders = p->NumFolders; + UInt32 numUnpackStreams = numFolders; + UInt32 numUnpackSizesInData = 0; + + for (;;) + { + RINOK(ReadID(sd, &type)); + if (type == k7zIdNumUnpackStream) + { + UInt32 i; + ssi->sdNumSubStreams.Data = sd->Data; + numUnpackStreams = 0; + numSubDigests = 0; + for (i = 0; i < numFolders; i++) + { + UInt32 numStreams; + RINOK(SzReadNumber32(sd, &numStreams)); + if (numUnpackStreams > numUnpackStreams + numStreams) + return SZ_ERROR_UNSUPPORTED; + numUnpackStreams += numStreams; + if (numStreams != 0) + numUnpackSizesInData += (numStreams - 1); + if (numStreams != 1 || !SzBitWithVals_Check(&p->FolderCRCs, i)) + numSubDigests += numStreams; + } + ssi->sdNumSubStreams.Size = sd->Data - ssi->sdNumSubStreams.Data; + continue; + } + if (type == k7zIdCRC || type == k7zIdSize || type == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + + if (!ssi->sdNumSubStreams.Data) + { + numSubDigests = numFolders; + if (p->FolderCRCs.Defs) + numSubDigests = numFolders - CountDefinedBits(p->FolderCRCs.Defs, numFolders); + } + + ssi->NumTotalSubStreams = numUnpackStreams; + ssi->NumSubDigests = numSubDigests; + + if (type == k7zIdSize) + { + ssi->sdSizes.Data = sd->Data; + RINOK(SkipNumbers(sd, numUnpackSizesInData)); + ssi->sdSizes.Size = sd->Data - ssi->sdSizes.Data; + RINOK(ReadID(sd, &type)); + } + + for (;;) + { + if (type == k7zIdEnd) + return SZ_OK; + if (type == k7zIdCRC) + { + ssi->sdCRCs.Data = sd->Data; + RINOK(SkipBitUi32s(sd, numSubDigests)); + ssi->sdCRCs.Size = sd->Data - ssi->sdCRCs.Data; + } + else + { + RINOK(SkipData(sd)); + } + RINOK(ReadID(sd, &type)); + } +} + +static SRes SzReadStreamsInfo(CSzAr *p, + CSzData *sd, + UInt32 numFoldersMax, const CBuf *tempBufs, UInt32 numTempBufs, + UInt64 *dataOffset, + CSubStreamInfo *ssi, + ISzAllocPtr alloc) +{ + UInt64 type; + + SzData_Clear(&ssi->sdSizes); + SzData_Clear(&ssi->sdCRCs); + SzData_Clear(&ssi->sdNumSubStreams); + + *dataOffset = 0; + RINOK(ReadID(sd, &type)); + if (type == k7zIdPackInfo) + { + RINOK(ReadNumber(sd, dataOffset)); + RINOK(ReadPackInfo(p, sd, alloc)); + RINOK(ReadID(sd, &type)); + } + if (type == k7zIdUnpackInfo) + { + RINOK(ReadUnpackInfo(p, sd, numFoldersMax, tempBufs, numTempBufs, alloc)); + RINOK(ReadID(sd, &type)); + } + if (type == k7zIdSubStreamsInfo) + { + RINOK(ReadSubStreamsInfo(p, sd, ssi)); + RINOK(ReadID(sd, &type)); + } + else + { + ssi->NumTotalSubStreams = p->NumFolders; + // ssi->NumSubDigests = 0; + } + + return (type == k7zIdEnd ? SZ_OK : SZ_ERROR_UNSUPPORTED); +} + +static SRes SzReadAndDecodePackedStreams( + ILookInStream *inStream, + CSzData *sd, + CBuf *tempBufs, + UInt32 numFoldersMax, + UInt64 baseOffset, + CSzAr *p, + ISzAllocPtr allocTemp) +{ + UInt64 dataStartPos; + UInt32 fo; + CSubStreamInfo ssi; + + RINOK(SzReadStreamsInfo(p, sd, numFoldersMax, NULL, 0, &dataStartPos, &ssi, allocTemp)); + + dataStartPos += baseOffset; + if (p->NumFolders == 0) + return SZ_ERROR_ARCHIVE; + + for (fo = 0; fo < p->NumFolders; fo++) + Buf_Init(tempBufs + fo); + + for (fo = 0; fo < p->NumFolders; fo++) + { + CBuf *tempBuf = tempBufs + fo; + UInt64 unpackSize = SzAr_GetFolderUnpackSize(p, fo); + if ((size_t)unpackSize != unpackSize) + return SZ_ERROR_MEM; + if (!Buf_Create(tempBuf, (size_t)unpackSize, allocTemp)) + return SZ_ERROR_MEM; + } + + for (fo = 0; fo < p->NumFolders; fo++) + { + const CBuf *tempBuf = tempBufs + fo; + RINOK(LookInStream_SeekTo(inStream, dataStartPos)); + RINOK(SzAr_DecodeFolder(p, fo, inStream, dataStartPos, tempBuf->data, tempBuf->size, allocTemp)); + } + + return SZ_OK; +} + +static SRes SzReadFileNames(const Byte *data, size_t size, UInt32 numFiles, size_t *offsets) +{ + size_t pos = 0; + *offsets++ = 0; + if (numFiles == 0) + return (size == 0) ? SZ_OK : SZ_ERROR_ARCHIVE; + if (size < 2) + return SZ_ERROR_ARCHIVE; + if (data[size - 2] != 0 || data[size - 1] != 0) + return SZ_ERROR_ARCHIVE; + do + { + const Byte *p; + if (pos == size) + return SZ_ERROR_ARCHIVE; + for (p = data + pos; + #ifdef _WIN32 + *(const UInt16 *)p != 0 + #else + p[0] != 0 || p[1] != 0 + #endif + ; p += 2); + pos = p - data + 2; + *offsets++ = (pos >> 1); + } + while (--numFiles); + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static MY_NO_INLINE SRes ReadTime(CSzBitUi64s *p, UInt32 num, + CSzData *sd2, + const CBuf *tempBufs, UInt32 numTempBufs, + ISzAllocPtr alloc) +{ + CSzData sd; + UInt32 i; + CNtfsFileTime *vals; + Byte *defs; + Byte external; + + RINOK(ReadBitVector(sd2, num, &p->Defs, alloc)); + + SZ_READ_BYTE_SD(sd2, external); + if (external == 0) + sd = *sd2; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd2, &index)); + if (index >= numTempBufs) + return SZ_ERROR_ARCHIVE; + sd.Data = tempBufs[index].data; + sd.Size = tempBufs[index].size; + } + + MY_ALLOC_ZE(CNtfsFileTime, p->Vals, num, alloc); + vals = p->Vals; + defs = p->Defs; + for (i = 0; i < num; i++) + if (SzBitArray_Check(defs, i)) + { + if (sd.Size < 8) + return SZ_ERROR_ARCHIVE; + vals[i].Low = GetUi32(sd.Data); + vals[i].High = GetUi32(sd.Data + 4); + SKIP_DATA2(sd, 8); + } + else + vals[i].High = vals[i].Low = 0; + + if (external == 0) + *sd2 = sd; + + return SZ_OK; +} + + +#define NUM_ADDITIONAL_STREAMS_MAX 8 + + +static SRes SzReadHeader2( + CSzArEx *p, /* allocMain */ + CSzData *sd, + ILookInStream *inStream, + CBuf *tempBufs, UInt32 *numTempBufs, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp + ) +{ + CSubStreamInfo ssi; + +{ + UInt64 type; + + SzData_Clear(&ssi.sdSizes); + SzData_Clear(&ssi.sdCRCs); + SzData_Clear(&ssi.sdNumSubStreams); + + ssi.NumSubDigests = 0; + ssi.NumTotalSubStreams = 0; + + RINOK(ReadID(sd, &type)); + + if (type == k7zIdArchiveProperties) + { + for (;;) + { + UInt64 type2; + RINOK(ReadID(sd, &type2)); + if (type2 == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdAdditionalStreamsInfo) + { + CSzAr tempAr; + SRes res; + + SzAr_Init(&tempAr); + res = SzReadAndDecodePackedStreams(inStream, sd, tempBufs, NUM_ADDITIONAL_STREAMS_MAX, + p->startPosAfterHeader, &tempAr, allocTemp); + *numTempBufs = tempAr.NumFolders; + SzAr_Free(&tempAr, allocTemp); + + if (res != SZ_OK) + return res; + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdMainStreamsInfo) + { + RINOK(SzReadStreamsInfo(&p->db, sd, (UInt32)1 << 30, tempBufs, *numTempBufs, + &p->dataPos, &ssi, allocMain)); + p->dataPos += p->startPosAfterHeader; + RINOK(ReadID(sd, &type)); + } + + if (type == k7zIdEnd) + { + return SZ_OK; + } + + if (type != k7zIdFilesInfo) + return SZ_ERROR_ARCHIVE; +} + +{ + UInt32 numFiles = 0; + UInt32 numEmptyStreams = 0; + const Byte *emptyStreams = NULL; + const Byte *emptyFiles = NULL; + + RINOK(SzReadNumber32(sd, &numFiles)); + p->NumFiles = numFiles; + + for (;;) + { + UInt64 type; + UInt64 size; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + break; + RINOK(ReadNumber(sd, &size)); + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + + if (type >= ((UInt32)1 << 8)) + { + SKIP_DATA(sd, size); + } + else switch ((unsigned)type) + { + case k7zIdName: + { + size_t namesSize; + const Byte *namesData; + Byte external; + + SZ_READ_BYTE(external); + if (external == 0) + { + namesSize = (size_t)size - 1; + namesData = sd->Data; + } + else + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= *numTempBufs) + return SZ_ERROR_ARCHIVE; + namesData = (tempBufs)[index].data; + namesSize = (tempBufs)[index].size; + } + + if ((namesSize & 1) != 0) + return SZ_ERROR_ARCHIVE; + MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); + MY_ALLOC_ZE_AND_CPY(p->FileNames, namesSize, namesData, allocMain); + RINOK(SzReadFileNames(p->FileNames, namesSize, numFiles, p->FileNameOffsets)) + if (external == 0) + { + SKIP_DATA(sd, namesSize); + } + break; + } + case k7zIdEmptyStream: + { + RINOK(RememberBitVector(sd, numFiles, &emptyStreams)); + numEmptyStreams = CountDefinedBits(emptyStreams, numFiles); + emptyFiles = NULL; + break; + } + case k7zIdEmptyFile: + { + RINOK(RememberBitVector(sd, numEmptyStreams, &emptyFiles)); + break; + } + case k7zIdWinAttrib: + { + Byte external; + CSzData sdSwitch; + CSzData *sdPtr; + SzBitUi32s_Free(&p->Attribs, allocMain); + RINOK(ReadBitVector(sd, numFiles, &p->Attribs.Defs, allocMain)); + + SZ_READ_BYTE(external); + if (external == 0) + sdPtr = sd; + else + { + UInt32 index; + RINOK(SzReadNumber32(sd, &index)); + if (index >= *numTempBufs) + return SZ_ERROR_ARCHIVE; + sdSwitch.Data = (tempBufs)[index].data; + sdSwitch.Size = (tempBufs)[index].size; + sdPtr = &sdSwitch; + } + RINOK(ReadUi32s(sdPtr, numFiles, &p->Attribs, allocMain)); + break; + } + /* + case k7zParent: + { + SzBitUi32s_Free(&p->Parents, allocMain); + RINOK(ReadBitVector(sd, numFiles, &p->Parents.Defs, allocMain)); + RINOK(SzReadSwitch(sd)); + RINOK(ReadUi32s(sd, numFiles, &p->Parents, allocMain)); + break; + } + */ + case k7zIdMTime: RINOK(ReadTime(&p->MTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; + case k7zIdCTime: RINOK(ReadTime(&p->CTime, numFiles, sd, tempBufs, *numTempBufs, allocMain)); break; + default: + { + SKIP_DATA(sd, size); + } + } + } + + if (numFiles - numEmptyStreams != ssi.NumTotalSubStreams) + return SZ_ERROR_ARCHIVE; + + for (;;) + { + UInt64 type; + RINOK(ReadID(sd, &type)); + if (type == k7zIdEnd) + break; + RINOK(SkipData(sd)); + } + + { + UInt32 i; + UInt32 emptyFileIndex = 0; + UInt32 folderIndex = 0; + UInt32 remSubStreams = 0; + UInt32 numSubStreams = 0; + UInt64 unpackPos = 0; + const Byte *digestsDefs = NULL; + const Byte *digestsVals = NULL; + UInt32 digestsValsIndex = 0; + UInt32 digestIndex; + Byte allDigestsDefined = 0; + Byte isDirMask = 0; + Byte crcMask = 0; + Byte mask = 0x80; + + MY_ALLOC(UInt32, p->FolderToFile, p->db.NumFolders + 1, allocMain); + MY_ALLOC_ZE(UInt32, p->FileToFolder, p->NumFiles, allocMain); + MY_ALLOC(UInt64, p->UnpackPositions, p->NumFiles + 1, allocMain); + MY_ALLOC_ZE(Byte, p->IsDirs, (p->NumFiles + 7) >> 3, allocMain); + + RINOK(SzBitUi32s_Alloc(&p->CRCs, p->NumFiles, allocMain)); + + if (ssi.sdCRCs.Size != 0) + { + SZ_READ_BYTE_SD(&ssi.sdCRCs, allDigestsDefined); + if (allDigestsDefined) + digestsVals = ssi.sdCRCs.Data; + else + { + size_t numBytes = (ssi.NumSubDigests + 7) >> 3; + digestsDefs = ssi.sdCRCs.Data; + digestsVals = digestsDefs + numBytes; + } + } + + digestIndex = 0; + + for (i = 0; i < numFiles; i++, mask >>= 1) + { + if (mask == 0) + { + UInt32 byteIndex = (i - 1) >> 3; + p->IsDirs[byteIndex] = isDirMask; + p->CRCs.Defs[byteIndex] = crcMask; + isDirMask = 0; + crcMask = 0; + mask = 0x80; + } + + p->UnpackPositions[i] = unpackPos; + p->CRCs.Vals[i] = 0; + + if (emptyStreams && SzBitArray_Check(emptyStreams, i)) + { + if (emptyFiles) + { + if (!SzBitArray_Check(emptyFiles, emptyFileIndex)) + isDirMask |= mask; + emptyFileIndex++; + } + else + isDirMask |= mask; + if (remSubStreams == 0) + { + p->FileToFolder[i] = (UInt32)-1; + continue; + } + } + + if (remSubStreams == 0) + { + for (;;) + { + if (folderIndex >= p->db.NumFolders) + return SZ_ERROR_ARCHIVE; + p->FolderToFile[folderIndex] = i; + numSubStreams = 1; + if (ssi.sdNumSubStreams.Data) + { + RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); + } + remSubStreams = numSubStreams; + if (numSubStreams != 0) + break; + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + unpackPos += folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + } + + folderIndex++; + } + } + + p->FileToFolder[i] = folderIndex; + + if (emptyStreams && SzBitArray_Check(emptyStreams, i)) + continue; + + if (--remSubStreams == 0) + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + UInt64 startFolderUnpackPos = p->UnpackPositions[p->FolderToFile[folderIndex]]; + if (folderUnpackSize < unpackPos - startFolderUnpackPos) + return SZ_ERROR_ARCHIVE; + unpackPos = startFolderUnpackPos + folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + + if (numSubStreams == 1 && SzBitWithVals_Check(&p->db.FolderCRCs, i)) + { + p->CRCs.Vals[i] = p->db.FolderCRCs.Vals[folderIndex]; + crcMask |= mask; + } + else if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) + { + p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); + digestsValsIndex++; + crcMask |= mask; + } + + folderIndex++; + } + else + { + UInt64 v; + RINOK(ReadNumber(&ssi.sdSizes, &v)); + unpackPos += v; + if (unpackPos < v) + return SZ_ERROR_ARCHIVE; + if (allDigestsDefined || (digestsDefs && SzBitArray_Check(digestsDefs, digestIndex))) + { + p->CRCs.Vals[i] = GetUi32(digestsVals + (size_t)digestsValsIndex * 4); + digestsValsIndex++; + crcMask |= mask; + } + } + } + + if (mask != 0x80) + { + UInt32 byteIndex = (i - 1) >> 3; + p->IsDirs[byteIndex] = isDirMask; + p->CRCs.Defs[byteIndex] = crcMask; + } + + p->UnpackPositions[i] = unpackPos; + + if (remSubStreams != 0) + return SZ_ERROR_ARCHIVE; + + for (;;) + { + p->FolderToFile[folderIndex] = i; + if (folderIndex >= p->db.NumFolders) + break; + if (!ssi.sdNumSubStreams.Data) + return SZ_ERROR_ARCHIVE; + RINOK(SzReadNumber32(&ssi.sdNumSubStreams, &numSubStreams)); + if (numSubStreams != 0) + return SZ_ERROR_ARCHIVE; + /* + { + UInt64 folderUnpackSize = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + unpackPos += folderUnpackSize; + if (unpackPos < folderUnpackSize) + return SZ_ERROR_ARCHIVE; + } + */ + folderIndex++; + } + + if (ssi.sdNumSubStreams.Data && ssi.sdNumSubStreams.Size != 0) + return SZ_ERROR_ARCHIVE; + } +} + return SZ_OK; +} + + +static SRes SzReadHeader( + CSzArEx *p, + CSzData *sd, + ILookInStream *inStream, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + UInt32 i; + UInt32 numTempBufs = 0; + SRes res; + CBuf tempBufs[NUM_ADDITIONAL_STREAMS_MAX]; + + for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) + Buf_Init(tempBufs + i); + + res = SzReadHeader2(p, sd, inStream, + tempBufs, &numTempBufs, + allocMain, allocTemp); + + for (i = 0; i < NUM_ADDITIONAL_STREAMS_MAX; i++) + Buf_Free(tempBufs + i, allocTemp); + + RINOK(res); + + if (sd->Size != 0) + return SZ_ERROR_FAIL; + + return res; +} + +static SRes SzArEx_Open2( + CSzArEx *p, + ILookInStream *inStream, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + Byte header[k7zStartHeaderSize]; + Int64 startArcPos; + UInt64 nextHeaderOffset, nextHeaderSize; + size_t nextHeaderSizeT; + UInt32 nextHeaderCRC; + CBuf buf; + SRes res; + + startArcPos = 0; + RINOK(ILookInStream_Seek(inStream, &startArcPos, SZ_SEEK_CUR)); + + RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); + + if (!TestSignatureCandidate(header)) + return SZ_ERROR_NO_ARCHIVE; + if (header[6] != k7zMajorVersion) + return SZ_ERROR_UNSUPPORTED; + + nextHeaderOffset = GetUi64(header + 12); + nextHeaderSize = GetUi64(header + 20); + nextHeaderCRC = GetUi32(header + 28); + + p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; + + if (CrcCalc(header + 12, 20) != GetUi32(header + 8)) + return SZ_ERROR_CRC; + + nextHeaderSizeT = (size_t)nextHeaderSize; + if (nextHeaderSizeT != nextHeaderSize) + return SZ_ERROR_MEM; + if (nextHeaderSizeT == 0) + return SZ_OK; + if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize || + nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize) + return SZ_ERROR_NO_ARCHIVE; + + { + Int64 pos = 0; + RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END)); + if ((UInt64)pos < startArcPos + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) + return SZ_ERROR_INPUT_EOF; + } + + RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); + + if (!Buf_Create(&buf, nextHeaderSizeT, allocTemp)) + return SZ_ERROR_MEM; + + res = LookInStream_Read(inStream, buf.data, nextHeaderSizeT); + + if (res == SZ_OK) + { + res = SZ_ERROR_ARCHIVE; + if (CrcCalc(buf.data, nextHeaderSizeT) == nextHeaderCRC) + { + CSzData sd; + UInt64 type; + sd.Data = buf.data; + sd.Size = buf.size; + + res = ReadID(&sd, &type); + + if (res == SZ_OK && type == k7zIdEncodedHeader) + { + CSzAr tempAr; + CBuf tempBuf; + Buf_Init(&tempBuf); + + SzAr_Init(&tempAr); + res = SzReadAndDecodePackedStreams(inStream, &sd, &tempBuf, 1, p->startPosAfterHeader, &tempAr, allocTemp); + SzAr_Free(&tempAr, allocTemp); + + if (res != SZ_OK) + { + Buf_Free(&tempBuf, allocTemp); + } + else + { + Buf_Free(&buf, allocTemp); + buf.data = tempBuf.data; + buf.size = tempBuf.size; + sd.Data = buf.data; + sd.Size = buf.size; + res = ReadID(&sd, &type); + } + } + + if (res == SZ_OK) + { + if (type == k7zIdHeader) + { + /* + CSzData sd2; + unsigned ttt; + for (ttt = 0; ttt < 40000; ttt++) + { + SzArEx_Free(p, allocMain); + sd2 = sd; + res = SzReadHeader(p, &sd2, inStream, allocMain, allocTemp); + if (res != SZ_OK) + break; + } + */ + res = SzReadHeader(p, &sd, inStream, allocMain, allocTemp); + } + else + res = SZ_ERROR_UNSUPPORTED; + } + } + } + + Buf_Free(&buf, allocTemp); + return res; +} + + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, + ISzAllocPtr allocMain, ISzAllocPtr allocTemp) +{ + SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); + if (res != SZ_OK) + SzArEx_Free(p, allocMain); + return res; +} + + +SRes SzArEx_Extract( + const CSzArEx *p, + ILookInStream *inStream, + UInt32 fileIndex, + UInt32 *blockIndex, + Byte **tempBuf, + size_t *outBufferSize, + size_t *offset, + size_t *outSizeProcessed, + ISzAllocPtr allocMain, + ISzAllocPtr allocTemp) +{ + UInt32 folderIndex = p->FileToFolder[fileIndex]; + SRes res = SZ_OK; + + *offset = 0; + *outSizeProcessed = 0; + + if (folderIndex == (UInt32)-1) + { + ISzAlloc_Free(allocMain, *tempBuf); + *blockIndex = folderIndex; + *tempBuf = NULL; + *outBufferSize = 0; + return SZ_OK; + } + + if (*tempBuf == NULL || *blockIndex != folderIndex) + { + UInt64 unpackSizeSpec = SzAr_GetFolderUnpackSize(&p->db, folderIndex); + /* + UInt64 unpackSizeSpec = + p->UnpackPositions[p->FolderToFile[(size_t)folderIndex + 1]] - + p->UnpackPositions[p->FolderToFile[folderIndex]]; + */ + size_t unpackSize = (size_t)unpackSizeSpec; + + if (unpackSize != unpackSizeSpec) + return SZ_ERROR_MEM; + *blockIndex = folderIndex; + ISzAlloc_Free(allocMain, *tempBuf); + *tempBuf = NULL; + + if (res == SZ_OK) + { + *outBufferSize = unpackSize; + if (unpackSize != 0) + { + *tempBuf = (Byte *)ISzAlloc_Alloc(allocMain, unpackSize); + if (*tempBuf == NULL) + res = SZ_ERROR_MEM; + } + + if (res == SZ_OK) + { + res = SzAr_DecodeFolder(&p->db, folderIndex, + inStream, p->dataPos, *tempBuf, unpackSize, allocTemp); + } + } + } + + if (res == SZ_OK) + { + UInt64 unpackPos = p->UnpackPositions[fileIndex]; + *offset = (size_t)(unpackPos - p->UnpackPositions[p->FolderToFile[folderIndex]]); + *outSizeProcessed = (size_t)(p->UnpackPositions[(size_t)fileIndex + 1] - unpackPos); + if (*offset + *outSizeProcessed > *outBufferSize) + return SZ_ERROR_FAIL; + if (SzBitWithVals_Check(&p->CRCs, fileIndex)) + if (CrcCalc(*tempBuf + *offset, *outSizeProcessed) != p->CRCs.Vals[fileIndex]) + res = SZ_ERROR_CRC; + } + + return res; +} + + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest) +{ + size_t offs = p->FileNameOffsets[fileIndex]; + size_t len = p->FileNameOffsets[fileIndex + 1] - offs; + if (dest != 0) + { + size_t i; + const Byte *src = p->FileNames + offs * 2; + for (i = 0; i < len; i++) + dest[i] = GetUi16(src + i * 2); + } + return len; +} + +/* +size_t SzArEx_GetFullNameLen(const CSzArEx *p, size_t fileIndex) +{ + size_t len; + if (!p->FileNameOffsets) + return 1; + len = 0; + for (;;) + { + UInt32 parent = (UInt32)(Int32)-1; + len += p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + if SzBitWithVals_Check(&p->Parents, fileIndex) + parent = p->Parents.Vals[fileIndex]; + if (parent == (UInt32)(Int32)-1) + return len; + fileIndex = parent; + } +} + +UInt16 *SzArEx_GetFullNameUtf16_Back(const CSzArEx *p, size_t fileIndex, UInt16 *dest) +{ + BoolInt needSlash; + if (!p->FileNameOffsets) + { + *(--dest) = 0; + return dest; + } + needSlash = False; + for (;;) + { + UInt32 parent = (UInt32)(Int32)-1; + size_t curLen = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + SzArEx_GetFileNameUtf16(p, fileIndex, dest - curLen); + if (needSlash) + *(dest - 1) = '/'; + needSlash = True; + dest -= curLen; + + if SzBitWithVals_Check(&p->Parents, fileIndex) + parent = p->Parents.Vals[fileIndex]; + if (parent == (UInt32)(Int32)-1) + return dest; + fileIndex = parent; + } +} +*/ diff --git a/bsnes/lzma/7zBuf.c b/bsnes/lzma/7zBuf.c new file mode 100644 index 00000000..438bba68 --- /dev/null +++ b/bsnes/lzma/7zBuf.c @@ -0,0 +1,36 @@ +/* 7zBuf.c -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zBuf.h" + +void Buf_Init(CBuf *p) +{ + p->data = 0; + p->size = 0; +} + +int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc) +{ + p->size = 0; + if (size == 0) + { + p->data = 0; + return 1; + } + p->data = (Byte *)ISzAlloc_Alloc(alloc, size); + if (p->data) + { + p->size = size; + return 1; + } + return 0; +} + +void Buf_Free(CBuf *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->data); + p->data = 0; + p->size = 0; +} diff --git a/bsnes/lzma/7zBuf.h b/bsnes/lzma/7zBuf.h new file mode 100644 index 00000000..5942d6e6 --- /dev/null +++ b/bsnes/lzma/7zBuf.h @@ -0,0 +1,35 @@ +/* 7zBuf.h -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_BUF_H +#define __7Z_BUF_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef struct +{ + Byte *data; + size_t size; +} CBuf; + +void Buf_Init(CBuf *p); +int Buf_Create(CBuf *p, size_t size, ISzAllocPtr alloc); +void Buf_Free(CBuf *p, ISzAllocPtr alloc); + +typedef struct +{ + Byte *data; + size_t size; + size_t pos; +} CDynBuf; + +void DynBuf_Construct(CDynBuf *p); +void DynBuf_SeekToBeg(CDynBuf *p); +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc); +void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zBuf2.c b/bsnes/lzma/7zBuf2.c new file mode 100644 index 00000000..49b4343b --- /dev/null +++ b/bsnes/lzma/7zBuf2.c @@ -0,0 +1,52 @@ +/* 7zBuf2.c -- Byte Buffer +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zBuf.h" + +void DynBuf_Construct(CDynBuf *p) +{ + p->data = 0; + p->size = 0; + p->pos = 0; +} + +void DynBuf_SeekToBeg(CDynBuf *p) +{ + p->pos = 0; +} + +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAllocPtr alloc) +{ + if (size > p->size - p->pos) + { + size_t newSize = p->pos + size; + Byte *data; + newSize += newSize / 4; + data = (Byte *)ISzAlloc_Alloc(alloc, newSize); + if (!data) + return 0; + p->size = newSize; + if (p->pos != 0) + memcpy(data, p->data, p->pos); + ISzAlloc_Free(alloc, p->data); + p->data = data; + } + if (size != 0) + { + memcpy(p->data + p->pos, buf, size); + p->pos += size; + } + return 1; +} + +void DynBuf_Free(CDynBuf *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->data); + p->data = 0; + p->size = 0; + p->pos = 0; +} diff --git a/bsnes/lzma/7zCrc.c b/bsnes/lzma/7zCrc.c new file mode 100644 index 00000000..40ab7595 --- /dev/null +++ b/bsnes/lzma/7zCrc.c @@ -0,0 +1,128 @@ +/* 7zCrc.c -- CRC32 init +2017-06-06 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zCrc.h" +#include "CpuArch.h" + +#define kCrcPoly 0xEDB88320 + +#ifdef MY_CPU_LE + #define CRC_NUM_TABLES 8 +#else + #define CRC_NUM_TABLES 9 + + #define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) + + UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table); + UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table); +#endif + +#ifndef MY_CPU_BE + UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table); + UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); +#endif + +typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table); + +CRC_FUNC g_CrcUpdateT4; +CRC_FUNC g_CrcUpdateT8; +CRC_FUNC g_CrcUpdate; + +UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) +{ + return g_CrcUpdate(v, data, size, g_CrcTable); +} + +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) +{ + return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL; +} + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + const Byte *pEnd = p + size; + for (; p != pEnd; p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +void MY_FAST_CALL CrcGenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt32 r = i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); + g_CrcTable[i] = r; + } + for (i = 256; i < 256 * CRC_NUM_TABLES; i++) + { + UInt32 r = g_CrcTable[(size_t)i - 256]; + g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); + } + + #if CRC_NUM_TABLES < 4 + + g_CrcUpdate = CrcUpdateT1; + + #else + + #ifdef MY_CPU_LE + + g_CrcUpdateT4 = CrcUpdateT4; + g_CrcUpdate = CrcUpdateT4; + + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT8; + + #ifdef MY_CPU_X86_OR_AMD64 + if (!CPU_Is_InOrder()) + #endif + g_CrcUpdate = CrcUpdateT8; + #endif + + #else + { + #ifndef MY_CPU_BE + UInt32 k = 0x01020304; + const Byte *p = (const Byte *)&k; + if (p[0] == 4 && p[1] == 3) + { + g_CrcUpdateT4 = CrcUpdateT4; + g_CrcUpdate = CrcUpdateT4; + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT8; + g_CrcUpdate = CrcUpdateT8; + #endif + } + else if (p[0] != 1 || p[1] != 2) + g_CrcUpdate = CrcUpdateT1; + else + #endif + { + for (i = 256 * CRC_NUM_TABLES - 1; i >= 256; i--) + { + UInt32 x = g_CrcTable[(size_t)i - 256]; + g_CrcTable[i] = CRC_UINT32_SWAP(x); + } + g_CrcUpdateT4 = CrcUpdateT1_BeT4; + g_CrcUpdate = CrcUpdateT1_BeT4; + #if CRC_NUM_TABLES >= 8 + g_CrcUpdateT8 = CrcUpdateT1_BeT8; + g_CrcUpdate = CrcUpdateT1_BeT8; + #endif + } + } + #endif + + #endif +} diff --git a/bsnes/lzma/7zCrc.h b/bsnes/lzma/7zCrc.h new file mode 100644 index 00000000..3b045940 --- /dev/null +++ b/bsnes/lzma/7zCrc.h @@ -0,0 +1,25 @@ +/* 7zCrc.h -- CRC32 calculation +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __7Z_CRC_H +#define __7Z_CRC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +extern UInt32 g_CrcTable[]; + +/* Call CrcGenerateTable one time before other CRC functions */ +void MY_FAST_CALL CrcGenerateTable(void); + +#define CRC_INIT_VAL 0xFFFFFFFF +#define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) +#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zCrcOpt.c b/bsnes/lzma/7zCrcOpt.c new file mode 100644 index 00000000..2ee0de84 --- /dev/null +++ b/bsnes/lzma/7zCrcOpt.c @@ -0,0 +1,115 @@ +/* 7zCrcOpt.c -- CRC32 calculation +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifndef MY_CPU_BE + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + (table + 0x300)[((v ) & 0xFF)] + ^ (table + 0x200)[((v >> 8) & 0xFF)] + ^ (table + 0x100)[((v >> 16) & 0xFF)] + ^ (table + 0x000)[((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 8; size -= 8, p += 8) + { + UInt32 d; + v ^= *(const UInt32 *)p; + v = + (table + 0x700)[((v ) & 0xFF)] + ^ (table + 0x600)[((v >> 8) & 0xFF)] + ^ (table + 0x500)[((v >> 16) & 0xFF)] + ^ (table + 0x400)[((v >> 24))]; + d = *((const UInt32 *)p + 1); + v ^= + (table + 0x300)[((d ) & 0xFF)] + ^ (table + 0x200)[((d >> 8) & 0xFF)] + ^ (table + 0x100)[((d >> 16) & 0xFF)] + ^ (table + 0x000)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +#endif + + +#ifndef MY_CPU_LE + +#define CRC_UINT32_SWAP(v) ((v >> 24) | ((v >> 8) & 0xFF00) | ((v << 8) & 0xFF0000) | (v << 24)) + +#define CRC_UPDATE_BYTE_2_BE(crc, b) (table[(((crc) >> 24) ^ (b))] ^ ((crc) << 8)) + +UInt32 MY_FAST_CALL CrcUpdateT1_BeT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT32_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + (table + 0x000)[((v ) & 0xFF)] + ^ (table + 0x100)[((v >> 8) & 0xFF)] + ^ (table + 0x200)[((v >> 16) & 0xFF)] + ^ (table + 0x300)[((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT32_SWAP(v); +} + +UInt32 MY_FAST_CALL CrcUpdateT1_BeT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT32_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 7) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 8; size -= 8, p += 8) + { + UInt32 d; + v ^= *(const UInt32 *)p; + v = + (table + 0x400)[((v ) & 0xFF)] + ^ (table + 0x500)[((v >> 8) & 0xFF)] + ^ (table + 0x600)[((v >> 16) & 0xFF)] + ^ (table + 0x700)[((v >> 24))]; + d = *((const UInt32 *)p + 1); + v ^= + (table + 0x000)[((d ) & 0xFF)] + ^ (table + 0x100)[((d >> 8) & 0xFF)] + ^ (table + 0x200)[((d >> 16) & 0xFF)] + ^ (table + 0x300)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT32_SWAP(v); +} + +#endif diff --git a/bsnes/lzma/7zDec.c b/bsnes/lzma/7zDec.c new file mode 100644 index 00000000..2a7b0903 --- /dev/null +++ b/bsnes/lzma/7zDec.c @@ -0,0 +1,591 @@ +/* 7zDec.c -- Decoding from 7z folder +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define _7ZIP_PPMD_SUPPPORT */ + +#include "7z.h" +#include "7zCrc.h" + +#include "Bcj2.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "LzmaDec.h" +#include "Lzma2Dec.h" +#ifdef _7ZIP_PPMD_SUPPPORT +#include "Ppmd7.h" +#endif + +#define k_Copy 0 +#define k_Delta 3 +#define k_LZMA2 0x21 +#define k_LZMA 0x30101 +#define k_BCJ 0x3030103 +#define k_BCJ2 0x303011B +#define k_PPC 0x3030205 +#define k_IA64 0x3030401 +#define k_ARM 0x3030501 +#define k_ARMT 0x3030701 +#define k_SPARC 0x3030805 + + +#ifdef _7ZIP_PPMD_SUPPPORT + +#define k_PPMD 0x30401 + +typedef struct +{ + IByteIn vt; + const Byte *cur; + const Byte *end; + const Byte *begin; + UInt64 processed; + BoolInt extra; + SRes res; + const ILookInStream *inStream; +} CByteInToLook; + +static Byte ReadByte(const IByteIn *pp) +{ + CByteInToLook *p = CONTAINER_FROM_VTBL(pp, CByteInToLook, vt); + if (p->cur != p->end) + return *p->cur++; + if (p->res == SZ_OK) + { + size_t size = p->cur - p->begin; + p->processed += size; + p->res = ILookInStream_Skip(p->inStream, size); + size = (1 << 25); + p->res = ILookInStream_Look(p->inStream, (const void **)&p->begin, &size); + p->cur = p->begin; + p->end = p->begin + size; + if (size != 0) + return *p->cur++;; + } + p->extra = True; + return 0; +} + +static SRes SzDecodePpmd(const Byte *props, unsigned propsSize, UInt64 inSize, const ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CPpmd7 ppmd; + CByteInToLook s; + SRes res = SZ_OK; + + s.vt.Read = ReadByte; + s.inStream = inStream; + s.begin = s.end = s.cur = NULL; + s.extra = False; + s.res = SZ_OK; + s.processed = 0; + + if (propsSize != 5) + return SZ_ERROR_UNSUPPORTED; + + { + unsigned order = props[0]; + UInt32 memSize = GetUi32(props + 1); + if (order < PPMD7_MIN_ORDER || + order > PPMD7_MAX_ORDER || + memSize < PPMD7_MIN_MEM_SIZE || + memSize > PPMD7_MAX_MEM_SIZE) + return SZ_ERROR_UNSUPPORTED; + Ppmd7_Construct(&ppmd); + if (!Ppmd7_Alloc(&ppmd, memSize, allocMain)) + return SZ_ERROR_MEM; + Ppmd7_Init(&ppmd, order); + } + { + CPpmd7z_RangeDec rc; + Ppmd7z_RangeDec_CreateVTable(&rc); + rc.Stream = &s.vt; + if (!Ppmd7z_RangeDec_Init(&rc)) + res = SZ_ERROR_DATA; + else if (s.extra) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else + { + SizeT i; + for (i = 0; i < outSize; i++) + { + int sym = Ppmd7_DecodeSymbol(&ppmd, &rc.vt); + if (s.extra || sym < 0) + break; + outBuffer[i] = (Byte)sym; + } + if (i != outSize) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else if (s.processed + (s.cur - s.begin) != inSize || !Ppmd7z_RangeDec_IsFinishedOK(&rc)) + res = SZ_ERROR_DATA; + } + } + Ppmd7_Free(&ppmd, allocMain); + return res; +} + +#endif + + +static SRes SzDecodeLzma(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CLzmaDec state; + SRes res = SZ_OK; + + LzmaDec_Construct(&state); + RINOK(LzmaDec_AllocateProbs(&state, props, propsSize, allocMain)); + state.dic = outBuffer; + state.dicBufSize = outSize; + LzmaDec_Init(&state); + + for (;;) + { + const void *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = ILookInStream_Look(inStream, &inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos; + ELzmaStatus status; + res = LzmaDec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (outSize != state.dicPos || inSize != 0) + res = SZ_ERROR_DATA; + break; + } + + if (outSize == state.dicPos && inSize == 0 && status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) + break; + + if (inProcessed == 0 && dicPos == state.dicPos) + { + res = SZ_ERROR_DATA; + break; + } + + res = ILookInStream_Skip(inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + LzmaDec_FreeProbs(&state, allocMain); + return res; +} + + +#ifndef _7Z_NO_METHOD_LZMA2 + +static SRes SzDecodeLzma2(const Byte *props, unsigned propsSize, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain) +{ + CLzma2Dec state; + SRes res = SZ_OK; + + Lzma2Dec_Construct(&state); + if (propsSize != 1) + return SZ_ERROR_DATA; + RINOK(Lzma2Dec_AllocateProbs(&state, props[0], allocMain)); + state.decoder.dic = outBuffer; + state.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&state); + + for (;;) + { + const void *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = ILookInStream_Look(inStream, &inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.decoder.dicPos; + ELzmaStatus status; + res = Lzma2Dec_DecodeToDic(&state, outSize, (const Byte *)inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (outSize != state.decoder.dicPos || inSize != 0) + res = SZ_ERROR_DATA; + break; + } + + if (inProcessed == 0 && dicPos == state.decoder.dicPos) + { + res = SZ_ERROR_DATA; + break; + } + + res = ILookInStream_Skip(inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + Lzma2Dec_FreeProbs(&state, allocMain); + return res; +} + +#endif + + +static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) +{ + while (inSize > 0) + { + const void *inBuf; + size_t curSize = (1 << 18); + if (curSize > inSize) + curSize = (size_t)inSize; + RINOK(ILookInStream_Look(inStream, &inBuf, &curSize)); + if (curSize == 0) + return SZ_ERROR_INPUT_EOF; + memcpy(outBuffer, inBuf, curSize); + outBuffer += curSize; + inSize -= curSize; + RINOK(ILookInStream_Skip(inStream, curSize)); + } + return SZ_OK; +} + +static BoolInt IS_MAIN_METHOD(UInt32 m) +{ + switch (m) + { + case k_Copy: + case k_LZMA: + #ifndef _7Z_NO_METHOD_LZMA2 + case k_LZMA2: + #endif + #ifdef _7ZIP_PPMD_SUPPPORT + case k_PPMD: + #endif + return True; + } + return False; +} + +static BoolInt IS_SUPPORTED_CODER(const CSzCoderInfo *c) +{ + return + c->NumStreams == 1 + /* && c->MethodID <= (UInt32)0xFFFFFFFF */ + && IS_MAIN_METHOD((UInt32)c->MethodID); +} + +#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumStreams == 4) + +static SRes CheckSupportedFolder(const CSzFolder *f) +{ + if (f->NumCoders < 1 || f->NumCoders > 4) + return SZ_ERROR_UNSUPPORTED; + if (!IS_SUPPORTED_CODER(&f->Coders[0])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumCoders == 1) + { + if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBonds != 0) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + + + #ifndef _7Z_NO_METHODS_FILTERS + + if (f->NumCoders == 2) + { + const CSzCoderInfo *c = &f->Coders[1]; + if ( + /* c->MethodID > (UInt32)0xFFFFFFFF || */ + c->NumStreams != 1 + || f->NumPackStreams != 1 + || f->PackStreams[0] != 0 + || f->NumBonds != 1 + || f->Bonds[0].InIndex != 1 + || f->Bonds[0].OutIndex != 0) + return SZ_ERROR_UNSUPPORTED; + switch ((UInt32)c->MethodID) + { + case k_Delta: + case k_BCJ: + case k_PPC: + case k_IA64: + case k_SPARC: + case k_ARM: + case k_ARMT: + break; + default: + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; + } + + #endif + + + if (f->NumCoders == 4) + { + if (!IS_SUPPORTED_CODER(&f->Coders[1]) + || !IS_SUPPORTED_CODER(&f->Coders[2]) + || !IS_BCJ2(&f->Coders[3])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumPackStreams != 4 + || f->PackStreams[0] != 2 + || f->PackStreams[1] != 6 + || f->PackStreams[2] != 1 + || f->PackStreams[3] != 0 + || f->NumBonds != 3 + || f->Bonds[0].InIndex != 5 || f->Bonds[0].OutIndex != 0 + || f->Bonds[1].InIndex != 4 || f->Bonds[1].OutIndex != 1 + || f->Bonds[2].InIndex != 3 || f->Bonds[2].OutIndex != 2) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + + return SZ_ERROR_UNSUPPORTED; +} + +#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; + +static SRes SzFolder_Decode2(const CSzFolder *folder, + const Byte *propsData, + const UInt64 *unpackSizes, + const UInt64 *packPositions, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, SizeT outSize, ISzAllocPtr allocMain, + Byte *tempBuf[]) +{ + UInt32 ci; + SizeT tempSizes[3] = { 0, 0, 0}; + SizeT tempSize3 = 0; + Byte *tempBuf3 = 0; + + RINOK(CheckSupportedFolder(folder)); + + for (ci = 0; ci < folder->NumCoders; ci++) + { + const CSzCoderInfo *coder = &folder->Coders[ci]; + + if (IS_MAIN_METHOD((UInt32)coder->MethodID)) + { + UInt32 si = 0; + UInt64 offset; + UInt64 inSize; + Byte *outBufCur = outBuffer; + SizeT outSizeCur = outSize; + if (folder->NumCoders == 4) + { + UInt32 indices[] = { 3, 2, 0 }; + UInt64 unpackSize = unpackSizes[ci]; + si = indices[ci]; + if (ci < 2) + { + Byte *temp; + outSizeCur = (SizeT)unpackSize; + if (outSizeCur != unpackSize) + return SZ_ERROR_MEM; + temp = (Byte *)ISzAlloc_Alloc(allocMain, outSizeCur); + if (!temp && outSizeCur != 0) + return SZ_ERROR_MEM; + outBufCur = tempBuf[1 - ci] = temp; + tempSizes[1 - ci] = outSizeCur; + } + else if (ci == 2) + { + if (unpackSize > outSize) /* check it */ + return SZ_ERROR_PARAM; + tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); + tempSize3 = outSizeCur = (SizeT)unpackSize; + } + else + return SZ_ERROR_UNSUPPORTED; + } + offset = packPositions[si]; + inSize = packPositions[(size_t)si + 1] - offset; + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + + if (coder->MethodID == k_Copy) + { + if (inSize != outSizeCur) /* check it */ + return SZ_ERROR_DATA; + RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); + } + else if (coder->MethodID == k_LZMA) + { + RINOK(SzDecodeLzma(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #ifndef _7Z_NO_METHOD_LZMA2 + else if (coder->MethodID == k_LZMA2) + { + RINOK(SzDecodeLzma2(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #endif + #ifdef _7ZIP_PPMD_SUPPPORT + else if (coder->MethodID == k_PPMD) + { + RINOK(SzDecodePpmd(propsData + coder->PropsOffset, coder->PropsSize, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + #endif + else + return SZ_ERROR_UNSUPPORTED; + } + else if (coder->MethodID == k_BCJ2) + { + UInt64 offset = packPositions[1]; + UInt64 s3Size = packPositions[2] - offset; + + if (ci != 3) + return SZ_ERROR_UNSUPPORTED; + + tempSizes[2] = (SizeT)s3Size; + if (tempSizes[2] != s3Size) + return SZ_ERROR_MEM; + tempBuf[2] = (Byte *)ISzAlloc_Alloc(allocMain, tempSizes[2]); + if (!tempBuf[2] && tempSizes[2] != 0) + return SZ_ERROR_MEM; + + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + RINOK(SzDecodeCopy(s3Size, inStream, tempBuf[2])); + + if ((tempSizes[0] & 3) != 0 || + (tempSizes[1] & 3) != 0 || + tempSize3 + tempSizes[0] + tempSizes[1] != outSize) + return SZ_ERROR_DATA; + + { + CBcj2Dec p; + + p.bufs[0] = tempBuf3; p.lims[0] = tempBuf3 + tempSize3; + p.bufs[1] = tempBuf[0]; p.lims[1] = tempBuf[0] + tempSizes[0]; + p.bufs[2] = tempBuf[1]; p.lims[2] = tempBuf[1] + tempSizes[1]; + p.bufs[3] = tempBuf[2]; p.lims[3] = tempBuf[2] + tempSizes[2]; + + p.dest = outBuffer; + p.destLim = outBuffer + outSize; + + Bcj2Dec_Init(&p); + RINOK(Bcj2Dec_Decode(&p)); + + { + unsigned i; + for (i = 0; i < 4; i++) + if (p.bufs[i] != p.lims[i]) + return SZ_ERROR_DATA; + + if (!Bcj2Dec_IsFinished(&p)) + return SZ_ERROR_DATA; + + if (p.dest != p.destLim + || p.state != BCJ2_STREAM_MAIN) + return SZ_ERROR_DATA; + } + } + } + #ifndef _7Z_NO_METHODS_FILTERS + else if (ci == 1) + { + if (coder->MethodID == k_Delta) + { + if (coder->PropsSize != 1) + return SZ_ERROR_UNSUPPORTED; + { + Byte state[DELTA_STATE_SIZE]; + Delta_Init(state); + Delta_Decode(state, (unsigned)(propsData[coder->PropsOffset]) + 1, outBuffer, outSize); + } + } + else + { + if (coder->PropsSize != 0) + return SZ_ERROR_UNSUPPORTED; + switch (coder->MethodID) + { + case k_BCJ: + { + UInt32 state; + x86_Convert_Init(state); + x86_Convert(outBuffer, outSize, 0, &state, 0); + break; + } + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(SPARC) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + default: + return SZ_ERROR_UNSUPPORTED; + } + } + } + #endif + else + return SZ_ERROR_UNSUPPORTED; + } + + return SZ_OK; +} + + +SRes SzAr_DecodeFolder(const CSzAr *p, UInt32 folderIndex, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, size_t outSize, + ISzAllocPtr allocMain) +{ + SRes res; + CSzFolder folder; + CSzData sd; + + const Byte *data = p->CodersData + p->FoCodersOffsets[folderIndex]; + sd.Data = data; + sd.Size = p->FoCodersOffsets[(size_t)folderIndex + 1] - p->FoCodersOffsets[folderIndex]; + + res = SzGetNextFolderItem(&folder, &sd); + + if (res != SZ_OK) + return res; + + if (sd.Size != 0 + || folder.UnpackStream != p->FoToMainUnpackSizeIndex[folderIndex] + || outSize != SzAr_GetFolderUnpackSize(p, folderIndex)) + return SZ_ERROR_FAIL; + { + unsigned i; + Byte *tempBuf[3] = { 0, 0, 0}; + + res = SzFolder_Decode2(&folder, data, + &p->CoderUnpackSizes[p->FoToCoderUnpackSizes[folderIndex]], + p->PackPositions + p->FoStartPackStreamIndex[folderIndex], + inStream, startPos, + outBuffer, (SizeT)outSize, allocMain, tempBuf); + + for (i = 0; i < 3; i++) + ISzAlloc_Free(allocMain, tempBuf[i]); + + if (res == SZ_OK) + if (SzBitWithVals_Check(&p->FolderCRCs, folderIndex)) + if (CrcCalc(outBuffer, outSize) != p->FolderCRCs.Vals[folderIndex]) + res = SZ_ERROR_CRC; + + return res; + } +} diff --git a/bsnes/lzma/7zFile.c b/bsnes/lzma/7zFile.c new file mode 100644 index 00000000..e486901e --- /dev/null +++ b/bsnes/lzma/7zFile.c @@ -0,0 +1,286 @@ +/* 7zFile.c -- File IO +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zFile.h" + +#ifndef USE_WINDOWS_FILE + +#ifndef UNDER_CE +#include +#endif + +#else + +/* + ReadFile and WriteFile functions in Windows have BUG: + If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) + from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES + (Insufficient system resources exist to complete the requested service). + Probably in some version of Windows there are problems with other sizes: + for 32 MB (maybe also for 16 MB). + And message can be "Network connection was lost" +*/ + +#define kChunkSizeMax (1 << 22) + +#endif + +void File_Construct(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + p->handle = INVALID_HANDLE_VALUE; + #else + p->file = NULL; + #endif +} + +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +static WRes File_Open(CSzFile *p, const char *name, int writeMode) +{ + #ifdef USE_WINDOWS_FILE + p->handle = CreateFileA(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); + #else + p->file = fopen(name, writeMode ? "wb+" : "rb"); + return (p->file != 0) ? 0 : + #ifdef UNDER_CE + 2; /* ENOENT */ + #else + errno; + #endif + #endif +} + +WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); } +WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); } +#endif + +#ifdef USE_WINDOWS_FILE +static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode) +{ + p->handle = CreateFileW(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); +} +WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); } +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); } +#endif + +WRes File_Close(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + if (p->handle != INVALID_HANDLE_VALUE) + { + if (!CloseHandle(p->handle)) + return GetLastError(); + p->handle = INVALID_HANDLE_VALUE; + } + #else + if (p->file != NULL) + { + int res = fclose(p->file); + if (res != 0) + return res; + p->file = NULL; + } + #endif + return 0; +} + +WRes File_Read(CSzFile *p, void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fread(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Write(CSzFile *p, const void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fwrite(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) +{ + #ifdef USE_WINDOWS_FILE + + LARGE_INTEGER value; + DWORD moveMethod; + value.LowPart = (DWORD)*pos; + value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */ + switch (origin) + { + case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break; + case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break; + case SZ_SEEK_END: moveMethod = FILE_END; break; + default: return ERROR_INVALID_PARAMETER; + } + value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod); + if (value.LowPart == 0xFFFFFFFF) + { + WRes res = GetLastError(); + if (res != NO_ERROR) + return res; + } + *pos = ((Int64)value.HighPart << 32) | value.LowPart; + return 0; + + #else + + int moveMethod; + int res; + switch (origin) + { + case SZ_SEEK_SET: moveMethod = SEEK_SET; break; + case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break; + case SZ_SEEK_END: moveMethod = SEEK_END; break; + default: return 1; + } + res = fseek(p->file, (long)*pos, moveMethod); + *pos = ftell(p->file); + return res; + + #endif +} + +WRes File_GetLength(CSzFile *p, UInt64 *length) +{ + #ifdef USE_WINDOWS_FILE + + DWORD sizeHigh; + DWORD sizeLow = GetFileSize(p->handle, &sizeHigh); + if (sizeLow == 0xFFFFFFFF) + { + DWORD res = GetLastError(); + if (res != NO_ERROR) + return res; + } + *length = (((UInt64)sizeHigh) << 32) + sizeLow; + return 0; + + #else + + long pos = ftell(p->file); + int res = fseek(p->file, 0, SEEK_END); + *length = ftell(p->file); + fseek(p->file, pos, SEEK_SET); + return res; + + #endif +} + + +/* ---------- FileSeqInStream ---------- */ + +static SRes FileSeqInStream_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CFileSeqInStream *p = CONTAINER_FROM_VTBL(pp, CFileSeqInStream, vt); + return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ; +} + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p) +{ + p->vt.Read = FileSeqInStream_Read; +} + + +/* ---------- FileInStream ---------- */ + +static SRes FileInStream_Read(const ISeekInStream *pp, void *buf, size_t *size) +{ + CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); + return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ; +} + +static SRes FileInStream_Seek(const ISeekInStream *pp, Int64 *pos, ESzSeek origin) +{ + CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); + return File_Seek(&p->file, pos, origin); +} + +void FileInStream_CreateVTable(CFileInStream *p) +{ + p->vt.Read = FileInStream_Read; + p->vt.Seek = FileInStream_Seek; +} + + +/* ---------- FileOutStream ---------- */ + +static size_t FileOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CFileOutStream *p = CONTAINER_FROM_VTBL(pp, CFileOutStream, vt); + File_Write(&p->file, data, &size); + return size; +} + +void FileOutStream_CreateVTable(CFileOutStream *p) +{ + p->vt.Write = FileOutStream_Write; +} diff --git a/bsnes/lzma/7zFile.h b/bsnes/lzma/7zFile.h new file mode 100644 index 00000000..7e263bea --- /dev/null +++ b/bsnes/lzma/7zFile.h @@ -0,0 +1,83 @@ +/* 7zFile.h -- File IO +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_FILE_H +#define __7Z_FILE_H + +#ifdef _WIN32 +#define USE_WINDOWS_FILE +#endif + +#ifdef USE_WINDOWS_FILE +#include +#else +#include +#endif + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* ---------- File ---------- */ + +typedef struct +{ + #ifdef USE_WINDOWS_FILE + HANDLE handle; + #else + FILE *file; + #endif +} CSzFile; + +void File_Construct(CSzFile *p); +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +WRes InFile_Open(CSzFile *p, const char *name); +WRes OutFile_Open(CSzFile *p, const char *name); +#endif +#ifdef USE_WINDOWS_FILE +WRes InFile_OpenW(CSzFile *p, const WCHAR *name); +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); +#endif +WRes File_Close(CSzFile *p); + +/* reads max(*size, remain file's size) bytes */ +WRes File_Read(CSzFile *p, void *data, size_t *size); + +/* writes *size bytes */ +WRes File_Write(CSzFile *p, const void *data, size_t *size); + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin); +WRes File_GetLength(CSzFile *p, UInt64 *length); + + +/* ---------- FileInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + CSzFile file; +} CFileSeqInStream; + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p); + + +typedef struct +{ + ISeekInStream vt; + CSzFile file; +} CFileInStream; + +void FileInStream_CreateVTable(CFileInStream *p); + + +typedef struct +{ + ISeqOutStream vt; + CSzFile file; +} CFileOutStream; + +void FileOutStream_CreateVTable(CFileOutStream *p); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zStream.c b/bsnes/lzma/7zStream.c new file mode 100644 index 00000000..579741fa --- /dev/null +++ b/bsnes/lzma/7zStream.c @@ -0,0 +1,176 @@ +/* 7zStream.c -- 7z Stream functions +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zTypes.h" + +SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(ISeqInStream_Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size) +{ + return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf) +{ + size_t processed = 1; + RINOK(ISeqInStream_Read(stream, buf, &processed)); + return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; +} + + + +SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset) +{ + Int64 t = offset; + return ILookInStream_Seek(stream, &t, SZ_SEEK_SET); +} + +SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size) +{ + const void *lookBuf; + if (*size == 0) + return SZ_OK; + RINOK(ILookInStream_Look(stream, &lookBuf, size)); + memcpy(buf, lookBuf, *size); + return ILookInStream_Skip(stream, *size); +} + +SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(ILookInStream_Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size) +{ + return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + + + +#define GET_LookToRead2 CLookToRead2 *p = CONTAINER_FROM_VTBL(pp, CLookToRead2, vt); + +static SRes LookToRead2_Look_Lookahead(const ILookInStream *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + GET_LookToRead2 + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size != 0) + { + p->pos = 0; + p->size = 0; + size2 = p->bufSize; + res = ISeekInStream_Read(p->realStream, p->buf, &size2); + p->size = size2; + } + if (*size > size2) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead2_Look_Exact(const ILookInStream *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + GET_LookToRead2 + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size != 0) + { + p->pos = 0; + p->size = 0; + if (*size > p->bufSize) + *size = p->bufSize; + res = ISeekInStream_Read(p->realStream, p->buf, size); + size2 = p->size = *size; + } + if (*size > size2) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead2_Skip(const ILookInStream *pp, size_t offset) +{ + GET_LookToRead2 + p->pos += offset; + return SZ_OK; +} + +static SRes LookToRead2_Read(const ILookInStream *pp, void *buf, size_t *size) +{ + GET_LookToRead2 + size_t rem = p->size - p->pos; + if (rem == 0) + return ISeekInStream_Read(p->realStream, buf, size); + if (rem > *size) + rem = *size; + memcpy(buf, p->buf + p->pos, rem); + p->pos += rem; + *size = rem; + return SZ_OK; +} + +static SRes LookToRead2_Seek(const ILookInStream *pp, Int64 *pos, ESzSeek origin) +{ + GET_LookToRead2 + p->pos = p->size = 0; + return ISeekInStream_Seek(p->realStream, pos, origin); +} + +void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead) +{ + p->vt.Look = lookahead ? + LookToRead2_Look_Lookahead : + LookToRead2_Look_Exact; + p->vt.Skip = LookToRead2_Skip; + p->vt.Read = LookToRead2_Read; + p->vt.Seek = LookToRead2_Seek; +} + + + +static SRes SecToLook_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CSecToLook *p = CONTAINER_FROM_VTBL(pp, CSecToLook, vt); + return LookInStream_LookRead(p->realStream, buf, size); +} + +void SecToLook_CreateVTable(CSecToLook *p) +{ + p->vt.Read = SecToLook_Read; +} + +static SRes SecToRead_Read(const ISeqInStream *pp, void *buf, size_t *size) +{ + CSecToRead *p = CONTAINER_FROM_VTBL(pp, CSecToRead, vt); + return ILookInStream_Read(p->realStream, buf, size); +} + +void SecToRead_CreateVTable(CSecToRead *p) +{ + p->vt.Read = SecToRead_Read; +} diff --git a/bsnes/lzma/7zTypes.h b/bsnes/lzma/7zTypes.h new file mode 100644 index 00000000..593f5aa2 --- /dev/null +++ b/bsnes/lzma/7zTypes.h @@ -0,0 +1,375 @@ +/* 7zTypes.h -- Basic types +2018-08-04 : Igor Pavlov : Public domain */ + +#ifndef __7Z_TYPES_H +#define __7Z_TYPES_H + +#ifdef _WIN32 +/* #include */ +#endif + +#include + +#ifndef EXTERN_C_BEGIN +#ifdef __cplusplus +#define EXTERN_C_BEGIN extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C_BEGIN +#define EXTERN_C_END +#endif +#endif + +EXTERN_C_BEGIN + +#define SZ_OK 0 + +#define SZ_ERROR_DATA 1 +#define SZ_ERROR_MEM 2 +#define SZ_ERROR_CRC 3 +#define SZ_ERROR_UNSUPPORTED 4 +#define SZ_ERROR_PARAM 5 +#define SZ_ERROR_INPUT_EOF 6 +#define SZ_ERROR_OUTPUT_EOF 7 +#define SZ_ERROR_READ 8 +#define SZ_ERROR_WRITE 9 +#define SZ_ERROR_PROGRESS 10 +#define SZ_ERROR_FAIL 11 +#define SZ_ERROR_THREAD 12 + +#define SZ_ERROR_ARCHIVE 16 +#define SZ_ERROR_NO_ARCHIVE 17 + +typedef int SRes; + + +#ifdef _WIN32 + +/* typedef DWORD WRes; */ +typedef unsigned WRes; +#define MY_SRes_HRESULT_FROM_WRes(x) HRESULT_FROM_WIN32(x) + +#else + +typedef int WRes; +#define MY__FACILITY_WIN32 7 +#define MY__FACILITY__WRes MY__FACILITY_WIN32 +#define MY_SRes_HRESULT_FROM_WRes(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (MY__FACILITY__WRes << 16) | 0x80000000))) + +#endif + + +#ifndef RINOK +#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } +#endif + +typedef unsigned char Byte; +typedef short Int16; +typedef unsigned short UInt16; + +#ifdef _LZMA_UINT32_IS_ULONG +typedef long Int32; +typedef unsigned long UInt32; +#else +typedef int Int32; +typedef unsigned int UInt32; +#endif + +#ifdef _SZ_NO_INT_64 + +/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. + NOTES: Some code will work incorrectly in that case! */ + +typedef long Int64; +typedef unsigned long UInt64; + +#else + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#define UINT64_CONST(n) n +#else +typedef long long int Int64; +typedef unsigned long long int UInt64; +#define UINT64_CONST(n) n ## ULL +#endif + +#endif + +#ifdef _LZMA_NO_SYSTEM_SIZE_T +typedef UInt32 SizeT; +#else +typedef size_t SizeT; +#endif + +typedef int BoolInt; +/* typedef BoolInt Bool; */ +#define True 1 +#define False 0 + + +#ifdef _WIN32 +#define MY_STD_CALL __stdcall +#else +#define MY_STD_CALL +#endif + +#ifdef _MSC_VER + +#if _MSC_VER >= 1300 +#define MY_NO_INLINE __declspec(noinline) +#else +#define MY_NO_INLINE +#endif + +#define MY_FORCE_INLINE __forceinline + +#define MY_CDECL __cdecl +#define MY_FAST_CALL __fastcall + +#else + +#define MY_NO_INLINE +#define MY_FORCE_INLINE +#define MY_CDECL +#define MY_FAST_CALL + +/* inline keyword : for C++ / C99 */ + +/* GCC, clang: */ +/* +#if defined (__GNUC__) && (__GNUC__ >= 4) +#define MY_FORCE_INLINE __attribute__((always_inline)) +#define MY_NO_INLINE __attribute__((noinline)) +#endif +*/ + +#endif + + +/* The following interfaces use first parameter as pointer to structure */ + +typedef struct IByteIn IByteIn; +struct IByteIn +{ + Byte (*Read)(const IByteIn *p); /* reads one byte, returns 0 in case of EOF or error */ +}; +#define IByteIn_Read(p) (p)->Read(p) + + +typedef struct IByteOut IByteOut; +struct IByteOut +{ + void (*Write)(const IByteOut *p, Byte b); +}; +#define IByteOut_Write(p, b) (p)->Write(p, b) + + +typedef struct ISeqInStream ISeqInStream; +struct ISeqInStream +{ + SRes (*Read)(const ISeqInStream *p, void *buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) < input(*size)) is allowed */ +}; +#define ISeqInStream_Read(p, buf, size) (p)->Read(p, buf, size) + +/* it can return SZ_ERROR_INPUT_EOF */ +SRes SeqInStream_Read(const ISeqInStream *stream, void *buf, size_t size); +SRes SeqInStream_Read2(const ISeqInStream *stream, void *buf, size_t size, SRes errorType); +SRes SeqInStream_ReadByte(const ISeqInStream *stream, Byte *buf); + + +typedef struct ISeqOutStream ISeqOutStream; +struct ISeqOutStream +{ + size_t (*Write)(const ISeqOutStream *p, const void *buf, size_t size); + /* Returns: result - the number of actually written bytes. + (result < size) means error */ +}; +#define ISeqOutStream_Write(p, buf, size) (p)->Write(p, buf, size) + +typedef enum +{ + SZ_SEEK_SET = 0, + SZ_SEEK_CUR = 1, + SZ_SEEK_END = 2 +} ESzSeek; + + +typedef struct ISeekInStream ISeekInStream; +struct ISeekInStream +{ + SRes (*Read)(const ISeekInStream *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ + SRes (*Seek)(const ISeekInStream *p, Int64 *pos, ESzSeek origin); +}; +#define ISeekInStream_Read(p, buf, size) (p)->Read(p, buf, size) +#define ISeekInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin) + + +typedef struct ILookInStream ILookInStream; +struct ILookInStream +{ + SRes (*Look)(const ILookInStream *p, const void **buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) > input(*size)) is not allowed + (output(*size) < input(*size)) is allowed */ + SRes (*Skip)(const ILookInStream *p, size_t offset); + /* offset must be <= output(*size) of Look */ + + SRes (*Read)(const ILookInStream *p, void *buf, size_t *size); + /* reads directly (without buffer). It's same as ISeqInStream::Read */ + SRes (*Seek)(const ILookInStream *p, Int64 *pos, ESzSeek origin); +}; + +#define ILookInStream_Look(p, buf, size) (p)->Look(p, buf, size) +#define ILookInStream_Skip(p, offset) (p)->Skip(p, offset) +#define ILookInStream_Read(p, buf, size) (p)->Read(p, buf, size) +#define ILookInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin) + + +SRes LookInStream_LookRead(const ILookInStream *stream, void *buf, size_t *size); +SRes LookInStream_SeekTo(const ILookInStream *stream, UInt64 offset); + +/* reads via ILookInStream::Read */ +SRes LookInStream_Read2(const ILookInStream *stream, void *buf, size_t size, SRes errorType); +SRes LookInStream_Read(const ILookInStream *stream, void *buf, size_t size); + + + +typedef struct +{ + ILookInStream vt; + const ISeekInStream *realStream; + + size_t pos; + size_t size; /* it's data size */ + + /* the following variables must be set outside */ + Byte *buf; + size_t bufSize; +} CLookToRead2; + +void LookToRead2_CreateVTable(CLookToRead2 *p, int lookahead); + +#define LookToRead2_Init(p) { (p)->pos = (p)->size = 0; } + + +typedef struct +{ + ISeqInStream vt; + const ILookInStream *realStream; +} CSecToLook; + +void SecToLook_CreateVTable(CSecToLook *p); + + + +typedef struct +{ + ISeqInStream vt; + const ILookInStream *realStream; +} CSecToRead; + +void SecToRead_CreateVTable(CSecToRead *p); + + +typedef struct ICompressProgress ICompressProgress; + +struct ICompressProgress +{ + SRes (*Progress)(const ICompressProgress *p, UInt64 inSize, UInt64 outSize); + /* Returns: result. (result != SZ_OK) means break. + Value (UInt64)(Int64)-1 for size means unknown value. */ +}; +#define ICompressProgress_Progress(p, inSize, outSize) (p)->Progress(p, inSize, outSize) + + + +typedef struct ISzAlloc ISzAlloc; +typedef const ISzAlloc * ISzAllocPtr; + +struct ISzAlloc +{ + void *(*Alloc)(ISzAllocPtr p, size_t size); + void (*Free)(ISzAllocPtr p, void *address); /* address can be 0 */ +}; + +#define ISzAlloc_Alloc(p, size) (p)->Alloc(p, size) +#define ISzAlloc_Free(p, a) (p)->Free(p, a) + +/* deprecated */ +#define IAlloc_Alloc(p, size) ISzAlloc_Alloc(p, size) +#define IAlloc_Free(p, a) ISzAlloc_Free(p, a) + + + + + +#ifndef MY_offsetof + #ifdef offsetof + #define MY_offsetof(type, m) offsetof(type, m) + /* + #define MY_offsetof(type, m) FIELD_OFFSET(type, m) + */ + #else + #define MY_offsetof(type, m) ((size_t)&(((type *)0)->m)) + #endif +#endif + + + +#ifndef MY_container_of + +/* +#define MY_container_of(ptr, type, m) container_of(ptr, type, m) +#define MY_container_of(ptr, type, m) CONTAINING_RECORD(ptr, type, m) +#define MY_container_of(ptr, type, m) ((type *)((char *)(ptr) - offsetof(type, m))) +#define MY_container_of(ptr, type, m) (&((type *)0)->m == (ptr), ((type *)(((char *)(ptr)) - MY_offsetof(type, m)))) +*/ + +/* + GCC shows warning: "perhaps the 'offsetof' macro was used incorrectly" + GCC 3.4.4 : classes with constructor + GCC 4.8.1 : classes with non-public variable members" +*/ + +#define MY_container_of(ptr, type, m) ((type *)((char *)(1 ? (ptr) : &((type *)0)->m) - MY_offsetof(type, m))) + + +#endif + +#define CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) ((type *)(ptr)) + +/* +#define CONTAINER_FROM_VTBL(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) +*/ +#define CONTAINER_FROM_VTBL(ptr, type, m) MY_container_of(ptr, type, m) + +#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL_SIMPLE(ptr, type, m) +/* +#define CONTAINER_FROM_VTBL_CLS(ptr, type, m) CONTAINER_FROM_VTBL(ptr, type, m) +*/ + + + +#ifdef _WIN32 + +#define CHAR_PATH_SEPARATOR '\\' +#define WCHAR_PATH_SEPARATOR L'\\' +#define STRING_PATH_SEPARATOR "\\" +#define WSTRING_PATH_SEPARATOR L"\\" + +#else + +#define CHAR_PATH_SEPARATOR '/' +#define WCHAR_PATH_SEPARATOR L'/' +#define STRING_PATH_SEPARATOR "/" +#define WSTRING_PATH_SEPARATOR L"/" + +#endif + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/7zVersion.h b/bsnes/lzma/7zVersion.h new file mode 100644 index 00000000..0074c64b --- /dev/null +++ b/bsnes/lzma/7zVersion.h @@ -0,0 +1,27 @@ +#define MY_VER_MAJOR 19 +#define MY_VER_MINOR 00 +#define MY_VER_BUILD 0 +#define MY_VERSION_NUMBERS "19.00" +#define MY_VERSION MY_VERSION_NUMBERS + +#ifdef MY_CPU_NAME + #define MY_VERSION_CPU MY_VERSION " (" MY_CPU_NAME ")" +#else + #define MY_VERSION_CPU MY_VERSION +#endif + +#define MY_DATE "2019-02-21" +#undef MY_COPYRIGHT +#undef MY_VERSION_COPYRIGHT_DATE +#define MY_AUTHOR_NAME "Igor Pavlov" +#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" +#define MY_COPYRIGHT_CR "Copyright (c) 1999-2018 Igor Pavlov" + +#ifdef USE_COPYRIGHT_CR + #define MY_COPYRIGHT MY_COPYRIGHT_CR +#else + #define MY_COPYRIGHT MY_COPYRIGHT_PD +#endif + +#define MY_COPYRIGHT_DATE MY_COPYRIGHT " : " MY_DATE +#define MY_VERSION_COPYRIGHT_DATE MY_VERSION_CPU " : " MY_COPYRIGHT " : " MY_DATE diff --git a/bsnes/lzma/7zVersion.rc b/bsnes/lzma/7zVersion.rc new file mode 100644 index 00000000..6ed26de7 --- /dev/null +++ b/bsnes/lzma/7zVersion.rc @@ -0,0 +1,55 @@ +#define MY_VS_FFI_FILEFLAGSMASK 0x0000003FL +#define MY_VOS_NT_WINDOWS32 0x00040004L +#define MY_VOS_CE_WINDOWS32 0x00050004L + +#define MY_VFT_APP 0x00000001L +#define MY_VFT_DLL 0x00000002L + +// #include + +#ifndef MY_VERSION +#include "7zVersion.h" +#endif + +#define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0 + +#ifdef DEBUG +#define DBG_FL VS_FF_DEBUG +#else +#define DBG_FL 0 +#endif + +#define MY_VERSION_INFO(fileType, descr, intName, origName) \ +LANGUAGE 9, 1 \ +1 VERSIONINFO \ + FILEVERSION MY_VER \ + PRODUCTVERSION MY_VER \ + FILEFLAGSMASK MY_VS_FFI_FILEFLAGSMASK \ + FILEFLAGS DBG_FL \ + FILEOS MY_VOS_NT_WINDOWS32 \ + FILETYPE fileType \ + FILESUBTYPE 0x0L \ +BEGIN \ + BLOCK "StringFileInfo" \ + BEGIN \ + BLOCK "040904b0" \ + BEGIN \ + VALUE "CompanyName", "Igor Pavlov" \ + VALUE "FileDescription", descr \ + VALUE "FileVersion", MY_VERSION \ + VALUE "InternalName", intName \ + VALUE "LegalCopyright", MY_COPYRIGHT \ + VALUE "OriginalFilename", origName \ + VALUE "ProductName", "7-Zip" \ + VALUE "ProductVersion", MY_VERSION \ + END \ + END \ + BLOCK "VarFileInfo" \ + BEGIN \ + VALUE "Translation", 0x409, 1200 \ + END \ +END + +#define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(MY_VFT_APP, descr, intName, intName ".exe") + +#define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(MY_VFT_DLL, descr, intName, intName ".dll") diff --git a/bsnes/lzma/Aes.c b/bsnes/lzma/Aes.c new file mode 100644 index 00000000..8f7d50ea --- /dev/null +++ b/bsnes/lzma/Aes.c @@ -0,0 +1,306 @@ +/* Aes.c -- AES encryption / decryption +2017-01-24 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Aes.h" +#include "CpuArch.h" + +static UInt32 T[256 * 4]; +static const Byte Sbox[256] = { + 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, + 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, + 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, + 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, + 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, + 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, + 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, + 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, + 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, + 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, + 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, + 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, + 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, + 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; + +void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); + +void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); + +AES_CODE_FUNC g_AesCbc_Encode; +AES_CODE_FUNC g_AesCbc_Decode; +AES_CODE_FUNC g_AesCtr_Code; + +static UInt32 D[256 * 4]; +static Byte InvS[256]; + +static const Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 }; + +#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF) + +#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24)) + +#define gb0(x) ( (x) & 0xFF) +#define gb1(x) (((x) >> ( 8)) & 0xFF) +#define gb2(x) (((x) >> (16)) & 0xFF) +#define gb3(x) (((x) >> (24))) + +#define gb(n, x) gb ## n(x) + +#define TT(x) (T + (x << 8)) +#define DD(x) (D + (x << 8)) + + +void AesGenTables(void) +{ + unsigned i; + for (i = 0; i < 256; i++) + InvS[Sbox[i]] = (Byte)i; + + for (i = 0; i < 256; i++) + { + { + UInt32 a1 = Sbox[i]; + UInt32 a2 = xtime(a1); + UInt32 a3 = a2 ^ a1; + TT(0)[i] = Ui32(a2, a1, a1, a3); + TT(1)[i] = Ui32(a3, a2, a1, a1); + TT(2)[i] = Ui32(a1, a3, a2, a1); + TT(3)[i] = Ui32(a1, a1, a3, a2); + } + { + UInt32 a1 = InvS[i]; + UInt32 a2 = xtime(a1); + UInt32 a4 = xtime(a2); + UInt32 a8 = xtime(a4); + UInt32 a9 = a8 ^ a1; + UInt32 aB = a8 ^ a2 ^ a1; + UInt32 aD = a8 ^ a4 ^ a1; + UInt32 aE = a8 ^ a4 ^ a2; + DD(0)[i] = Ui32(aE, a9, aD, aB); + DD(1)[i] = Ui32(aB, aE, a9, aD); + DD(2)[i] = Ui32(aD, aB, aE, a9); + DD(3)[i] = Ui32(a9, aD, aB, aE); + } + } + + g_AesCbc_Encode = AesCbc_Encode; + g_AesCbc_Decode = AesCbc_Decode; + g_AesCtr_Code = AesCtr_Code; + + #ifdef MY_CPU_X86_OR_AMD64 + if (CPU_Is_Aes_Supported()) + { + g_AesCbc_Encode = AesCbc_Encode_Intel; + g_AesCbc_Decode = AesCbc_Decode_Intel; + g_AesCtr_Code = AesCtr_Code_Intel; + } + #endif +} + + +#define HT(i, x, s) TT(x)[gb(x, s[(i + x) & 3])] + +#define HT4(m, i, s, p) m[i] = \ + HT(i, 0, s) ^ \ + HT(i, 1, s) ^ \ + HT(i, 2, s) ^ \ + HT(i, 3, s) ^ w[p + i] + +#define HT16(m, s, p) \ + HT4(m, 0, s, p); \ + HT4(m, 1, s, p); \ + HT4(m, 2, s, p); \ + HT4(m, 3, s, p); \ + +#define FT(i, x) Sbox[gb(x, m[(i + x) & 3])] +#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i]; + + +#define HD(i, x, s) DD(x)[gb(x, s[(i - x) & 3])] + +#define HD4(m, i, s, p) m[i] = \ + HD(i, 0, s) ^ \ + HD(i, 1, s) ^ \ + HD(i, 2, s) ^ \ + HD(i, 3, s) ^ w[p + i]; + +#define HD16(m, s, p) \ + HD4(m, 0, s, p); \ + HD4(m, 1, s, p); \ + HD4(m, 2, s, p); \ + HD4(m, 3, s, p); \ + +#define FD(i, x) InvS[gb(x, m[(i - x) & 3])] +#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i]; + +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, wSize; + wSize = keySize + 28; + keySize /= 4; + w[0] = ((UInt32)keySize / 2) + 3; + w += 4; + + for (i = 0; i < keySize; i++, key += 4) + w[i] = GetUi32(key); + + for (; i < wSize; i++) + { + UInt32 t = w[(size_t)i - 1]; + unsigned rem = i % keySize; + if (rem == 0) + t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); + else if (keySize > 6 && rem == 4) + t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]); + w[i] = w[i - keySize] ^ t; + } +} + +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, num; + Aes_SetKey_Enc(w, key, keySize); + num = keySize + 20; + w += 8; + for (i = 0; i < num; i++) + { + UInt32 r = w[i]; + w[i] = + DD(0)[Sbox[gb0(r)]] ^ + DD(1)[Sbox[gb1(r)]] ^ + DD(2)[Sbox[gb2(r)]] ^ + DD(3)[Sbox[gb3(r)]]; + } +} + +/* Aes_Encode and Aes_Decode functions work with little-endian words. + src and dest are pointers to 4 UInt32 words. + src and dest can point to same block */ + +static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + w += 4; + for (;;) + { + HT16(m, s, 0); + if (--numRounds2 == 0) + break; + HT16(s, m, 4); + w += 8; + } + w += 4; + FT4(0); FT4(1); FT4(2); FT4(3); +} + +static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4 + numRounds2 * 8; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + for (;;) + { + w -= 8; + HD16(m, s, 4); + if (--numRounds2 == 0) + break; + HD16(s, m, 0); + } + FD4(0); FD4(1); FD4(2); FD4(3); +} + +void AesCbc_Init(UInt32 *p, const Byte *iv) +{ + unsigned i; + for (i = 0; i < 4; i++) + p[i] = GetUi32(iv + i * 4); +} + +void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + p[0] ^= GetUi32(data); + p[1] ^= GetUi32(data + 4); + p[2] ^= GetUi32(data + 8); + p[3] ^= GetUi32(data + 12); + + Aes_Encode(p + 4, p, p); + + SetUi32(data, p[0]); + SetUi32(data + 4, p[1]); + SetUi32(data + 8, p[2]); + SetUi32(data + 12, p[3]); + } +} + +void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks) +{ + UInt32 in[4], out[4]; + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + in[0] = GetUi32(data); + in[1] = GetUi32(data + 4); + in[2] = GetUi32(data + 8); + in[3] = GetUi32(data + 12); + + Aes_Decode(p + 4, out, in); + + SetUi32(data, p[0] ^ out[0]); + SetUi32(data + 4, p[1] ^ out[1]); + SetUi32(data + 8, p[2] ^ out[2]); + SetUi32(data + 12, p[3] ^ out[3]); + + p[0] = in[0]; + p[1] = in[1]; + p[2] = in[2]; + p[3] = in[3]; + } +} + +void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--) + { + UInt32 temp[4]; + unsigned i; + + if (++p[0] == 0) + p[1]++; + + Aes_Encode(p + 4, temp, p); + + for (i = 0; i < 4; i++, data += 4) + { + UInt32 t = temp[i]; + + #ifdef MY_CPU_LE_UNALIGN + *((UInt32 *)data) ^= t; + #else + data[0] ^= (t & 0xFF); + data[1] ^= ((t >> 8) & 0xFF); + data[2] ^= ((t >> 16) & 0xFF); + data[3] ^= ((t >> 24)); + #endif + } + } +} diff --git a/bsnes/lzma/Aes.h b/bsnes/lzma/Aes.h new file mode 100644 index 00000000..381e979d --- /dev/null +++ b/bsnes/lzma/Aes.h @@ -0,0 +1,38 @@ +/* Aes.h -- AES encryption / decryption +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __AES_H +#define __AES_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define AES_BLOCK_SIZE 16 + +/* Call AesGenTables one time before other AES functions */ +void AesGenTables(void); + +/* UInt32 pointers must be 16-byte aligned */ + +/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */ +#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4) + +/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */ +/* keySize = 16 or 24 or 32 (bytes) */ +typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize); + +/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */ +void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */ +/* data - 16-byte aligned pointer to data */ +/* numBlocks - the number of 16-byte blocks in data array */ +typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks); +extern AES_CODE_FUNC g_AesCbc_Encode; +extern AES_CODE_FUNC g_AesCbc_Decode; +extern AES_CODE_FUNC g_AesCtr_Code; + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/AesOpt.c b/bsnes/lzma/AesOpt.c new file mode 100644 index 00000000..0e7f49a1 --- /dev/null +++ b/bsnes/lzma/AesOpt.c @@ -0,0 +1,184 @@ +/* AesOpt.c -- Intel's AES +2017-06-08 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 +#if (_MSC_VER > 1500) || (_MSC_FULL_VER >= 150030729) +#define USE_INTEL_AES +#endif +#endif + +#ifdef USE_INTEL_AES + +#include + +void MY_FAST_CALL AesCbc_Encode_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i m = *p; + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p + 3; + m = _mm_xor_si128(m, *data); + m = _mm_xor_si128(m, p[2]); + do + { + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenc_si128(m, w[1]); + w += 2; + } + while (--numRounds2 != 0); + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenclast_si128(m, w[1]); + *data = m; + } + *p = m; +} + +#define NUM_WAYS 3 + +#define AES_OP_W(op, n) { \ + const __m128i t = w[n]; \ + m0 = op(m0, t); \ + m1 = op(m1, t); \ + m2 = op(m2, t); \ + } + +#define AES_DEC(n) AES_OP_W(_mm_aesdec_si128, n) +#define AES_DEC_LAST(n) AES_OP_W(_mm_aesdeclast_si128, n) +#define AES_ENC(n) AES_OP_W(_mm_aesenc_si128, n) +#define AES_ENC_LAST(n) AES_OP_W(_mm_aesenclast_si128, n) + +void MY_FAST_CALL AesCbc_Decode_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i iv = *p; + for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1); + const __m128i *w = p + numRounds2 * 2; + __m128i m0, m1, m2; + { + const __m128i t = w[2]; + m0 = _mm_xor_si128(t, data[0]); + m1 = _mm_xor_si128(t, data[1]); + m2 = _mm_xor_si128(t, data[2]); + } + numRounds2--; + do + { + AES_DEC(1) + AES_DEC(0) + w -= 2; + } + while (--numRounds2 != 0); + AES_DEC(1) + AES_DEC_LAST(0) + + { + __m128i t; + t = _mm_xor_si128(m0, iv); iv = data[0]; data[0] = t; + t = _mm_xor_si128(m1, iv); iv = data[1]; data[1] = t; + t = _mm_xor_si128(m2, iv); iv = data[2]; data[2] = t; + } + } + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1); + const __m128i *w = p + numRounds2 * 2; + __m128i m = _mm_xor_si128(w[2], *data); + numRounds2--; + do + { + m = _mm_aesdec_si128(m, w[1]); + m = _mm_aesdec_si128(m, w[0]); + w -= 2; + } + while (--numRounds2 != 0); + m = _mm_aesdec_si128(m, w[1]); + m = _mm_aesdeclast_si128(m, w[0]); + + m = _mm_xor_si128(m, iv); + iv = *data; + *data = m; + } + *p = iv; +} + +void MY_FAST_CALL AesCtr_Code_Intel(__m128i *p, __m128i *data, size_t numBlocks) +{ + __m128i ctr = *p; + __m128i one; + one.m128i_u64[0] = 1; + one.m128i_u64[1] = 0; + for (; numBlocks >= NUM_WAYS; numBlocks -= NUM_WAYS, data += NUM_WAYS) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p; + __m128i m0, m1, m2; + { + const __m128i t = w[2]; + ctr = _mm_add_epi64(ctr, one); m0 = _mm_xor_si128(ctr, t); + ctr = _mm_add_epi64(ctr, one); m1 = _mm_xor_si128(ctr, t); + ctr = _mm_add_epi64(ctr, one); m2 = _mm_xor_si128(ctr, t); + } + w += 3; + do + { + AES_ENC(0) + AES_ENC(1) + w += 2; + } + while (--numRounds2 != 0); + AES_ENC(0) + AES_ENC_LAST(1) + data[0] = _mm_xor_si128(data[0], m0); + data[1] = _mm_xor_si128(data[1], m1); + data[2] = _mm_xor_si128(data[2], m2); + } + for (; numBlocks != 0; numBlocks--, data++) + { + UInt32 numRounds2 = *(const UInt32 *)(p + 1) - 1; + const __m128i *w = p; + __m128i m; + ctr = _mm_add_epi64(ctr, one); + m = _mm_xor_si128(ctr, p[2]); + w += 3; + do + { + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenc_si128(m, w[1]); + w += 2; + } + while (--numRounds2 != 0); + m = _mm_aesenc_si128(m, w[0]); + m = _mm_aesenclast_si128(m, w[1]); + *data = _mm_xor_si128(*data, m); + } + *p = ctr; +} + +#else + +void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); + +void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCbc_Encode(p, data, numBlocks); +} + +void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCbc_Decode(p, data, numBlocks); +} + +void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *p, Byte *data, size_t numBlocks) +{ + AesCtr_Code(p, data, numBlocks); +} + +#endif diff --git a/bsnes/lzma/Alloc.c b/bsnes/lzma/Alloc.c new file mode 100644 index 00000000..30b499e5 --- /dev/null +++ b/bsnes/lzma/Alloc.c @@ -0,0 +1,455 @@ +/* Alloc.c -- Memory allocation functions +2018-04-27 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#ifdef _WIN32 +#include +#endif +#include + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG + +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; + + +#define CONVERT_INT_TO_STR(charType, tempSize) \ + unsigned char temp[tempSize]; unsigned i = 0; \ + while (val >= 10) { temp[i++] = (unsigned char)('0' + (unsigned)(val % 10)); val /= 10; } \ + *s++ = (charType)('0' + (unsigned)val); \ + while (i != 0) { i--; *s++ = temp[i]; } \ + *s = 0; + +static void ConvertUInt64ToString(UInt64 val, char *s) +{ + CONVERT_INT_TO_STR(char, 24); +} + +#define GET_HEX_CHAR(t) ((char)(((t < 10) ? ('0' + t) : ('A' + (t - 10))))) + +static void ConvertUInt64ToHex(UInt64 val, char *s) +{ + UInt64 v = val; + unsigned i; + for (i = 1;; i++) + { + v >>= 4; + if (v == 0) + break; + } + s[i] = 0; + do + { + unsigned t = (unsigned)(val & 0xF); + val >>= 4; + s[--i] = GET_HEX_CHAR(t); + } + while (i); +} + +#define DEBUG_OUT_STREAM stderr + +static void Print(const char *s) +{ + fputs(s, DEBUG_OUT_STREAM); +} + +static void PrintAligned(const char *s, size_t align) +{ + size_t len = strlen(s); + for(;;) + { + fputc(' ', DEBUG_OUT_STREAM); + if (len >= align) + break; + ++len; + } + Print(s); +} + +static void PrintLn() +{ + Print("\n"); +} + +static void PrintHex(UInt64 v, size_t align) +{ + char s[32]; + ConvertUInt64ToHex(v, s); + PrintAligned(s, align); +} + +static void PrintDec(UInt64 v, size_t align) +{ + char s[32]; + ConvertUInt64ToString(v, s); + PrintAligned(s, align); +} + +static void PrintAddr(void *p) +{ + PrintHex((UInt64)(size_t)(ptrdiff_t)p, 12); +} + + +#define PRINT_ALLOC(name, cnt, size, ptr) \ + Print(name " "); \ + PrintDec(cnt++, 10); \ + PrintHex(size, 10); \ + PrintAddr(ptr); \ + PrintLn(); + +#define PRINT_FREE(name, cnt, ptr) if (ptr) { \ + Print(name " "); \ + PrintDec(--cnt, 10); \ + PrintAddr(ptr); \ + PrintLn(); } + +#else + +#define PRINT_ALLOC(name, cnt, size, ptr) +#define PRINT_FREE(name, cnt, ptr) +#define Print(s) +#define PrintLn() +#define PrintHex(v, align) +#define PrintDec(v, align) +#define PrintAddr(p) + +#endif + + + +void *MyAlloc(size_t size) +{ + if (size == 0) + return NULL; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + PRINT_ALLOC("Alloc ", g_allocCount, size, p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + PRINT_FREE("Free ", g_allocCount, address); + + free(address); +} + +#ifdef _WIN32 + +void *MidAlloc(size_t size) +{ + if (size == 0) + return NULL; + + PRINT_ALLOC("Alloc-Mid", g_allocCountMid, size, NULL); + + return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); +} + +void MidFree(void *address) +{ + PRINT_FREE("Free-Mid", g_allocCountMid, address); + + if (!address) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#ifndef MEM_LARGE_PAGES +#undef _7ZIP_LARGE_PAGES +#endif + +#ifdef _7ZIP_LARGE_PAGES +SIZE_T g_LargePageSize = 0; +typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); +#endif + +void SetLargePageSize() +{ + #ifdef _7ZIP_LARGE_PAGES + SIZE_T size; + GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); + if (!largePageMinimum) + return; + size = largePageMinimum(); + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return NULL; + + PRINT_ALLOC("Alloc-Big", g_allocCountBig, size, NULL); + + #ifdef _7ZIP_LARGE_PAGES + { + SIZE_T ps = g_LargePageSize; + if (ps != 0 && ps <= (1 << 30) && size > (ps / 2)) + { + size_t size2; + ps--; + size2 = (size + ps) & ~ps; + if (size2 >= size) + { + void *res = VirtualAlloc(NULL, size2, MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); + if (res) + return res; + } + } + } + #endif + + return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); +} + +void BigFree(void *address) +{ + PRINT_FREE("Free-Big", g_allocCountBig, address); + + if (!address) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#endif + + +static void *SzAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); } +static void SzFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MyFree(address); } +const ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +static void *SzMidAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return MidAlloc(size); } +static void SzMidFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); MidFree(address); } +const ISzAlloc g_MidAlloc = { SzMidAlloc, SzMidFree }; + +static void *SzBigAlloc(ISzAllocPtr p, size_t size) { UNUSED_VAR(p); return BigAlloc(size); } +static void SzBigFree(ISzAllocPtr p, void *address) { UNUSED_VAR(p); BigFree(address); } +const ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + + +/* + uintptr_t : C99 (optional) + : unsupported in VS6 +*/ + +#ifdef _WIN32 + typedef UINT_PTR UIntPtr; +#else + /* + typedef uintptr_t UIntPtr; + */ + typedef ptrdiff_t UIntPtr; +#endif + + +#define ADJUST_ALLOC_SIZE 0 +/* +#define ADJUST_ALLOC_SIZE (sizeof(void *) - 1) +*/ +/* + Use (ADJUST_ALLOC_SIZE = (sizeof(void *) - 1)), if + MyAlloc() can return address that is NOT multiple of sizeof(void *). +*/ + + +/* +#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((char *)(p) - ((size_t)(UIntPtr)(p) & ((align) - 1)))) +*/ +#define MY_ALIGN_PTR_DOWN(p, align) ((void *)((((UIntPtr)(p)) & ~((UIntPtr)(align) - 1)))) + +#define MY_ALIGN_PTR_UP_PLUS(p, align) MY_ALIGN_PTR_DOWN(((char *)(p) + (align) + ADJUST_ALLOC_SIZE), align) + + +#if (_POSIX_C_SOURCE >= 200112L) && !defined(_WIN32) + #define USE_posix_memalign +#endif + +/* + This posix_memalign() is for test purposes only. + We also need special Free() function instead of free(), + if this posix_memalign() is used. +*/ + +/* +static int posix_memalign(void **ptr, size_t align, size_t size) +{ + size_t newSize = size + align; + void *p; + void *pAligned; + *ptr = NULL; + if (newSize < size) + return 12; // ENOMEM + p = MyAlloc(newSize); + if (!p) + return 12; // ENOMEM + pAligned = MY_ALIGN_PTR_UP_PLUS(p, align); + ((void **)pAligned)[-1] = p; + *ptr = pAligned; + return 0; +} +*/ + +/* + ALLOC_ALIGN_SIZE >= sizeof(void *) + ALLOC_ALIGN_SIZE >= cache_line_size +*/ + +#define ALLOC_ALIGN_SIZE ((size_t)1 << 7) + +static void *SzAlignedAlloc(ISzAllocPtr pp, size_t size) +{ + #ifndef USE_posix_memalign + + void *p; + void *pAligned; + size_t newSize; + UNUSED_VAR(pp); + + /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned + block to prevent cache line sharing with another allocated blocks */ + + newSize = size + ALLOC_ALIGN_SIZE * 1 + ADJUST_ALLOC_SIZE; + if (newSize < size) + return NULL; + + p = MyAlloc(newSize); + + if (!p) + return NULL; + pAligned = MY_ALIGN_PTR_UP_PLUS(p, ALLOC_ALIGN_SIZE); + + Print(" size="); PrintHex(size, 8); + Print(" a_size="); PrintHex(newSize, 8); + Print(" ptr="); PrintAddr(p); + Print(" a_ptr="); PrintAddr(pAligned); + PrintLn(); + + ((void **)pAligned)[-1] = p; + + return pAligned; + + #else + + void *p; + UNUSED_VAR(pp); + if (posix_memalign(&p, ALLOC_ALIGN_SIZE, size)) + return NULL; + + Print(" posix_memalign="); PrintAddr(p); + PrintLn(); + + return p; + + #endif +} + + +static void SzAlignedFree(ISzAllocPtr pp, void *address) +{ + UNUSED_VAR(pp); + #ifndef USE_posix_memalign + if (address) + MyFree(((void **)address)[-1]); + #else + free(address); + #endif +} + + +const ISzAlloc g_AlignedAlloc = { SzAlignedAlloc, SzAlignedFree }; + + + +#define MY_ALIGN_PTR_DOWN_1(p) MY_ALIGN_PTR_DOWN(p, sizeof(void *)) + +/* we align ptr to support cases where CAlignOffsetAlloc::offset is not multiply of sizeof(void *) */ +#define REAL_BLOCK_PTR_VAR(p) ((void **)MY_ALIGN_PTR_DOWN_1(p))[-1] +/* +#define REAL_BLOCK_PTR_VAR(p) ((void **)(p))[-1] +*/ + +static void *AlignOffsetAlloc_Alloc(ISzAllocPtr pp, size_t size) +{ + CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); + void *adr; + void *pAligned; + size_t newSize; + size_t extra; + size_t alignSize = (size_t)1 << p->numAlignBits; + + if (alignSize < sizeof(void *)) + alignSize = sizeof(void *); + + if (p->offset >= alignSize) + return NULL; + + /* also we can allocate additional dummy ALLOC_ALIGN_SIZE bytes after aligned + block to prevent cache line sharing with another allocated blocks */ + extra = p->offset & (sizeof(void *) - 1); + newSize = size + alignSize + extra + ADJUST_ALLOC_SIZE; + if (newSize < size) + return NULL; + + adr = ISzAlloc_Alloc(p->baseAlloc, newSize); + + if (!adr) + return NULL; + + pAligned = (char *)MY_ALIGN_PTR_DOWN((char *)adr + + alignSize - p->offset + extra + ADJUST_ALLOC_SIZE, alignSize) + p->offset; + + PrintLn(); + Print("- Aligned: "); + Print(" size="); PrintHex(size, 8); + Print(" a_size="); PrintHex(newSize, 8); + Print(" ptr="); PrintAddr(adr); + Print(" a_ptr="); PrintAddr(pAligned); + PrintLn(); + + REAL_BLOCK_PTR_VAR(pAligned) = adr; + + return pAligned; +} + + +static void AlignOffsetAlloc_Free(ISzAllocPtr pp, void *address) +{ + if (address) + { + CAlignOffsetAlloc *p = CONTAINER_FROM_VTBL(pp, CAlignOffsetAlloc, vt); + PrintLn(); + Print("- Aligned Free: "); + PrintLn(); + ISzAlloc_Free(p->baseAlloc, REAL_BLOCK_PTR_VAR(address)); + } +} + + +void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p) +{ + p->vt.Alloc = AlignOffsetAlloc_Alloc; + p->vt.Free = AlignOffsetAlloc_Free; +} diff --git a/bsnes/lzma/Alloc.h b/bsnes/lzma/Alloc.h new file mode 100644 index 00000000..3d796e5e --- /dev/null +++ b/bsnes/lzma/Alloc.h @@ -0,0 +1,51 @@ +/* Alloc.h -- Memory allocation functions +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __COMMON_ALLOC_H +#define __COMMON_ALLOC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +void *MyAlloc(size_t size); +void MyFree(void *address); + +#ifdef _WIN32 + +void SetLargePageSize(); + +void *MidAlloc(size_t size); +void MidFree(void *address); +void *BigAlloc(size_t size); +void BigFree(void *address); + +#else + +#define MidAlloc(size) MyAlloc(size) +#define MidFree(address) MyFree(address) +#define BigAlloc(size) MyAlloc(size) +#define BigFree(address) MyFree(address) + +#endif + +extern const ISzAlloc g_Alloc; +extern const ISzAlloc g_BigAlloc; +extern const ISzAlloc g_MidAlloc; +extern const ISzAlloc g_AlignedAlloc; + + +typedef struct +{ + ISzAlloc vt; + ISzAllocPtr baseAlloc; + unsigned numAlignBits; /* ((1 << numAlignBits) >= sizeof(void *)) */ + size_t offset; /* (offset == (k * sizeof(void *)) && offset < (1 << numAlignBits) */ +} CAlignOffsetAlloc; + +void AlignOffsetAlloc_CreateVTable(CAlignOffsetAlloc *p); + + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Bcj2.c b/bsnes/lzma/Bcj2.c new file mode 100644 index 00000000..da93985c --- /dev/null +++ b/bsnes/lzma/Bcj2.c @@ -0,0 +1,257 @@ +/* Bcj2.c -- BCJ2 Decoder (Converter for x86 code) +2018-04-28 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Bcj2.h" +#include "CpuArch.h" + +#define CProb UInt16 + +#define kTopValue ((UInt32)1 << 24) +#define kNumModelBits 11 +#define kBitModelTotal (1 << kNumModelBits) +#define kNumMoveBits 5 + +#define _IF_BIT_0 ttt = *prob; bound = (p->range >> kNumModelBits) * ttt; if (p->code < bound) +#define _UPDATE_0 p->range = bound; *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define _UPDATE_1 p->range -= bound; p->code -= bound; *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); + +void Bcj2Dec_Init(CBcj2Dec *p) +{ + unsigned i; + + p->state = BCJ2_DEC_STATE_OK; + p->ip = 0; + p->temp[3] = 0; + p->range = 0; + p->code = 0; + for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) + p->probs[i] = kBitModelTotal >> 1; +} + +SRes Bcj2Dec_Decode(CBcj2Dec *p) +{ + if (p->range <= 5) + { + p->state = BCJ2_DEC_STATE_OK; + for (; p->range != 5; p->range++) + { + if (p->range == 1 && p->code != 0) + return SZ_ERROR_DATA; + + if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + return SZ_OK; + } + + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + if (p->code == 0xFFFFFFFF) + return SZ_ERROR_DATA; + + p->range = 0xFFFFFFFF; + } + else if (p->state >= BCJ2_DEC_STATE_ORIG_0) + { + while (p->state <= BCJ2_DEC_STATE_ORIG_3) + { + Byte *dest = p->dest; + if (dest == p->destLim) + return SZ_OK; + *dest = p->temp[(size_t)p->state - BCJ2_DEC_STATE_ORIG_0]; + p->state++; + p->dest = dest + 1; + } + } + + /* + if (BCJ2_IS_32BIT_STREAM(p->state)) + { + const Byte *cur = p->bufs[p->state]; + if (cur == p->lims[p->state]) + return SZ_OK; + p->bufs[p->state] = cur + 4; + + { + UInt32 val; + Byte *dest; + SizeT rem; + + p->ip += 4; + val = GetBe32(cur) - p->ip; + dest = p->dest; + rem = p->destLim - dest; + if (rem < 4) + { + SizeT i; + SetUi32(p->temp, val); + for (i = 0; i < rem; i++) + dest[i] = p->temp[i]; + p->dest = dest + rem; + p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; + return SZ_OK; + } + SetUi32(dest, val); + p->temp[3] = (Byte)(val >> 24); + p->dest = dest + 4; + p->state = BCJ2_DEC_STATE_OK; + } + } + */ + + for (;;) + { + if (BCJ2_IS_32BIT_STREAM(p->state)) + p->state = BCJ2_DEC_STATE_OK; + else + { + if (p->range < kTopValue) + { + if (p->bufs[BCJ2_STREAM_RC] == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + return SZ_OK; + } + p->range <<= 8; + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + { + const Byte *src = p->bufs[BCJ2_STREAM_MAIN]; + const Byte *srcLim; + Byte *dest; + SizeT num = p->lims[BCJ2_STREAM_MAIN] - src; + + if (num == 0) + { + p->state = BCJ2_STREAM_MAIN; + return SZ_OK; + } + + dest = p->dest; + if (num > (SizeT)(p->destLim - dest)) + { + num = p->destLim - dest; + if (num == 0) + { + p->state = BCJ2_DEC_STATE_ORIG; + return SZ_OK; + } + } + + srcLim = src + num; + + if (p->temp[3] == 0x0F && (src[0] & 0xF0) == 0x80) + *dest = src[0]; + else for (;;) + { + Byte b = *src; + *dest = b; + if (b != 0x0F) + { + if ((b & 0xFE) == 0xE8) + break; + dest++; + if (++src != srcLim) + continue; + break; + } + dest++; + if (++src == srcLim) + break; + if ((*src & 0xF0) != 0x80) + continue; + *dest = *src; + break; + } + + num = src - p->bufs[BCJ2_STREAM_MAIN]; + + if (src == srcLim) + { + p->temp[3] = src[-1]; + p->bufs[BCJ2_STREAM_MAIN] = src; + p->ip += (UInt32)num; + p->dest += num; + p->state = + p->bufs[BCJ2_STREAM_MAIN] == + p->lims[BCJ2_STREAM_MAIN] ? + (unsigned)BCJ2_STREAM_MAIN : + (unsigned)BCJ2_DEC_STATE_ORIG; + return SZ_OK; + } + + { + UInt32 bound, ttt; + CProb *prob; + Byte b = src[0]; + Byte prev = (Byte)(num == 0 ? p->temp[3] : src[-1]); + + p->temp[3] = b; + p->bufs[BCJ2_STREAM_MAIN] = src + 1; + num++; + p->ip += (UInt32)num; + p->dest += num; + + prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)prev : (b == 0xE9 ? 1 : 0)); + + _IF_BIT_0 + { + _UPDATE_0 + continue; + } + _UPDATE_1 + + } + } + } + + { + UInt32 val; + unsigned cj = (p->temp[3] == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; + const Byte *cur = p->bufs[cj]; + Byte *dest; + SizeT rem; + + if (cur == p->lims[cj]) + { + p->state = cj; + break; + } + + val = GetBe32(cur); + p->bufs[cj] = cur + 4; + + p->ip += 4; + val -= p->ip; + dest = p->dest; + rem = p->destLim - dest; + + if (rem < 4) + { + p->temp[0] = (Byte)val; if (rem > 0) dest[0] = (Byte)val; val >>= 8; + p->temp[1] = (Byte)val; if (rem > 1) dest[1] = (Byte)val; val >>= 8; + p->temp[2] = (Byte)val; if (rem > 2) dest[2] = (Byte)val; val >>= 8; + p->temp[3] = (Byte)val; + p->dest = dest + rem; + p->state = BCJ2_DEC_STATE_ORIG_0 + (unsigned)rem; + break; + } + + SetUi32(dest, val); + p->temp[3] = (Byte)(val >> 24); + p->dest = dest + 4; + } + } + + if (p->range < kTopValue && p->bufs[BCJ2_STREAM_RC] != p->lims[BCJ2_STREAM_RC]) + { + p->range <<= 8; + p->code = (p->code << 8) | *(p->bufs[BCJ2_STREAM_RC])++; + } + + return SZ_OK; +} diff --git a/bsnes/lzma/Bcj2.h b/bsnes/lzma/Bcj2.h new file mode 100644 index 00000000..68893d2d --- /dev/null +++ b/bsnes/lzma/Bcj2.h @@ -0,0 +1,146 @@ +/* Bcj2.h -- BCJ2 Converter for x86 code +2014-11-10 : Igor Pavlov : Public domain */ + +#ifndef __BCJ2_H +#define __BCJ2_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define BCJ2_NUM_STREAMS 4 + +enum +{ + BCJ2_STREAM_MAIN, + BCJ2_STREAM_CALL, + BCJ2_STREAM_JUMP, + BCJ2_STREAM_RC +}; + +enum +{ + BCJ2_DEC_STATE_ORIG_0 = BCJ2_NUM_STREAMS, + BCJ2_DEC_STATE_ORIG_1, + BCJ2_DEC_STATE_ORIG_2, + BCJ2_DEC_STATE_ORIG_3, + + BCJ2_DEC_STATE_ORIG, + BCJ2_DEC_STATE_OK +}; + +enum +{ + BCJ2_ENC_STATE_ORIG = BCJ2_NUM_STREAMS, + BCJ2_ENC_STATE_OK +}; + + +#define BCJ2_IS_32BIT_STREAM(s) ((s) == BCJ2_STREAM_CALL || (s) == BCJ2_STREAM_JUMP) + +/* +CBcj2Dec / CBcj2Enc +bufs sizes: + BUF_SIZE(n) = lims[n] - bufs[n] +bufs sizes for BCJ2_STREAM_CALL and BCJ2_STREAM_JUMP must be mutliply of 4: + (BUF_SIZE(BCJ2_STREAM_CALL) & 3) == 0 + (BUF_SIZE(BCJ2_STREAM_JUMP) & 3) == 0 +*/ + +/* +CBcj2Dec: +dest is allowed to overlap with bufs[BCJ2_STREAM_MAIN], with the following conditions: + bufs[BCJ2_STREAM_MAIN] >= dest && + bufs[BCJ2_STREAM_MAIN] - dest >= tempReserv + + BUF_SIZE(BCJ2_STREAM_CALL) + + BUF_SIZE(BCJ2_STREAM_JUMP) + tempReserv = 0 : for first call of Bcj2Dec_Decode + tempReserv = 4 : for any other calls of Bcj2Dec_Decode + overlap with offset = 1 is not allowed +*/ + +typedef struct +{ + const Byte *bufs[BCJ2_NUM_STREAMS]; + const Byte *lims[BCJ2_NUM_STREAMS]; + Byte *dest; + const Byte *destLim; + + unsigned state; /* BCJ2_STREAM_MAIN has more priority than BCJ2_STATE_ORIG */ + + UInt32 ip; + Byte temp[4]; + UInt32 range; + UInt32 code; + UInt16 probs[2 + 256]; +} CBcj2Dec; + +void Bcj2Dec_Init(CBcj2Dec *p); + +/* Returns: SZ_OK or SZ_ERROR_DATA */ +SRes Bcj2Dec_Decode(CBcj2Dec *p); + +#define Bcj2Dec_IsFinished(_p_) ((_p_)->code == 0) + + + +typedef enum +{ + BCJ2_ENC_FINISH_MODE_CONTINUE, + BCJ2_ENC_FINISH_MODE_END_BLOCK, + BCJ2_ENC_FINISH_MODE_END_STREAM +} EBcj2Enc_FinishMode; + +typedef struct +{ + Byte *bufs[BCJ2_NUM_STREAMS]; + const Byte *lims[BCJ2_NUM_STREAMS]; + const Byte *src; + const Byte *srcLim; + + unsigned state; + EBcj2Enc_FinishMode finishMode; + + Byte prevByte; + + Byte cache; + UInt32 range; + UInt64 low; + UInt64 cacheSize; + + UInt32 ip; + + /* 32-bit ralative offset in JUMP/CALL commands is + - (mod 4 GB) in 32-bit mode + - signed Int32 in 64-bit mode + We use (mod 4 GB) check for fileSize. + Use fileSize up to 2 GB, if you want to support 32-bit and 64-bit code conversion. */ + UInt32 fileIp; + UInt32 fileSize; /* (fileSize <= ((UInt32)1 << 31)), 0 means no_limit */ + UInt32 relatLimit; /* (relatLimit <= ((UInt32)1 << 31)), 0 means desable_conversion */ + + UInt32 tempTarget; + unsigned tempPos; + Byte temp[4 * 2]; + + unsigned flushPos; + + UInt16 probs[2 + 256]; +} CBcj2Enc; + +void Bcj2Enc_Init(CBcj2Enc *p); +void Bcj2Enc_Encode(CBcj2Enc *p); + +#define Bcj2Enc_Get_InputData_Size(p) ((SizeT)((p)->srcLim - (p)->src) + (p)->tempPos) +#define Bcj2Enc_IsFinished(p) ((p)->flushPos == 5) + + +#define BCJ2_RELAT_LIMIT_NUM_BITS 26 +#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS) + +/* limit for CBcj2Enc::fileSize variable */ +#define BCJ2_FileSize_MAX ((UInt32)1 << 31) + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Bcj2Enc.c b/bsnes/lzma/Bcj2Enc.c new file mode 100644 index 00000000..7a02ecde --- /dev/null +++ b/bsnes/lzma/Bcj2Enc.c @@ -0,0 +1,311 @@ +/* Bcj2Enc.c -- BCJ2 Encoder (Converter for x86 code) +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +/* #define SHOW_STAT */ + +#ifdef SHOW_STAT +#include +#define PRF(x) x +#else +#define PRF(x) +#endif + +#include + +#include "Bcj2.h" +#include "CpuArch.h" + +#define CProb UInt16 + +#define kTopValue ((UInt32)1 << 24) +#define kNumModelBits 11 +#define kBitModelTotal (1 << kNumModelBits) +#define kNumMoveBits 5 + +void Bcj2Enc_Init(CBcj2Enc *p) +{ + unsigned i; + + p->state = BCJ2_ENC_STATE_OK; + p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; + + p->prevByte = 0; + + p->cache = 0; + p->range = 0xFFFFFFFF; + p->low = 0; + p->cacheSize = 1; + + p->ip = 0; + + p->fileIp = 0; + p->fileSize = 0; + p->relatLimit = BCJ2_RELAT_LIMIT; + + p->tempPos = 0; + + p->flushPos = 0; + + for (i = 0; i < sizeof(p->probs) / sizeof(p->probs[0]); i++) + p->probs[i] = kBitModelTotal >> 1; +} + +static BoolInt MY_FAST_CALL RangeEnc_ShiftLow(CBcj2Enc *p) +{ + if ((UInt32)p->low < (UInt32)0xFF000000 || (UInt32)(p->low >> 32) != 0) + { + Byte *buf = p->bufs[BCJ2_STREAM_RC]; + do + { + if (buf == p->lims[BCJ2_STREAM_RC]) + { + p->state = BCJ2_STREAM_RC; + p->bufs[BCJ2_STREAM_RC] = buf; + return True; + } + *buf++ = (Byte)(p->cache + (Byte)(p->low >> 32)); + p->cache = 0xFF; + } + while (--p->cacheSize); + p->bufs[BCJ2_STREAM_RC] = buf; + p->cache = (Byte)((UInt32)p->low >> 24); + } + p->cacheSize++; + p->low = (UInt32)p->low << 8; + return False; +} + +static void Bcj2Enc_Encode_2(CBcj2Enc *p) +{ + if (BCJ2_IS_32BIT_STREAM(p->state)) + { + Byte *cur = p->bufs[p->state]; + if (cur == p->lims[p->state]) + return; + SetBe32(cur, p->tempTarget); + p->bufs[p->state] = cur + 4; + } + + p->state = BCJ2_ENC_STATE_ORIG; + + for (;;) + { + if (p->range < kTopValue) + { + if (RangeEnc_ShiftLow(p)) + return; + p->range <<= 8; + } + + { + { + const Byte *src = p->src; + const Byte *srcLim; + Byte *dest; + SizeT num = p->srcLim - src; + + if (p->finishMode == BCJ2_ENC_FINISH_MODE_CONTINUE) + { + if (num <= 4) + return; + num -= 4; + } + else if (num == 0) + break; + + dest = p->bufs[BCJ2_STREAM_MAIN]; + if (num > (SizeT)(p->lims[BCJ2_STREAM_MAIN] - dest)) + { + num = p->lims[BCJ2_STREAM_MAIN] - dest; + if (num == 0) + { + p->state = BCJ2_STREAM_MAIN; + return; + } + } + + srcLim = src + num; + + if (p->prevByte == 0x0F && (src[0] & 0xF0) == 0x80) + *dest = src[0]; + else for (;;) + { + Byte b = *src; + *dest = b; + if (b != 0x0F) + { + if ((b & 0xFE) == 0xE8) + break; + dest++; + if (++src != srcLim) + continue; + break; + } + dest++; + if (++src == srcLim) + break; + if ((*src & 0xF0) != 0x80) + continue; + *dest = *src; + break; + } + + num = src - p->src; + + if (src == srcLim) + { + p->prevByte = src[-1]; + p->bufs[BCJ2_STREAM_MAIN] = dest; + p->src = src; + p->ip += (UInt32)num; + continue; + } + + { + Byte context = (Byte)(num == 0 ? p->prevByte : src[-1]); + BoolInt needConvert; + + p->bufs[BCJ2_STREAM_MAIN] = dest + 1; + p->ip += (UInt32)num + 1; + src++; + + needConvert = False; + + if ((SizeT)(p->srcLim - src) >= 4) + { + UInt32 relatVal = GetUi32(src); + if ((p->fileSize == 0 || (UInt32)(p->ip + 4 + relatVal - p->fileIp) < p->fileSize) + && ((relatVal + p->relatLimit) >> 1) < p->relatLimit) + needConvert = True; + } + + { + UInt32 bound; + unsigned ttt; + Byte b = src[-1]; + CProb *prob = p->probs + (unsigned)(b == 0xE8 ? 2 + (unsigned)context : (b == 0xE9 ? 1 : 0)); + + ttt = *prob; + bound = (p->range >> kNumModelBits) * ttt; + + if (!needConvert) + { + p->range = bound; + *prob = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); + p->src = src; + p->prevByte = b; + continue; + } + + p->low += bound; + p->range -= bound; + *prob = (CProb)(ttt - (ttt >> kNumMoveBits)); + + { + UInt32 relatVal = GetUi32(src); + UInt32 absVal; + p->ip += 4; + absVal = p->ip + relatVal; + p->prevByte = src[3]; + src += 4; + p->src = src; + { + unsigned cj = (b == 0xE8) ? BCJ2_STREAM_CALL : BCJ2_STREAM_JUMP; + Byte *cur = p->bufs[cj]; + if (cur == p->lims[cj]) + { + p->state = cj; + p->tempTarget = absVal; + return; + } + SetBe32(cur, absVal); + p->bufs[cj] = cur + 4; + } + } + } + } + } + } + } + + if (p->finishMode != BCJ2_ENC_FINISH_MODE_END_STREAM) + return; + + for (; p->flushPos < 5; p->flushPos++) + if (RangeEnc_ShiftLow(p)) + return; + p->state = BCJ2_ENC_STATE_OK; +} + + +void Bcj2Enc_Encode(CBcj2Enc *p) +{ + PRF(printf("\n")); + PRF(printf("---- ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + if (p->tempPos != 0) + { + unsigned extra = 0; + + for (;;) + { + const Byte *src = p->src; + const Byte *srcLim = p->srcLim; + EBcj2Enc_FinishMode finishMode = p->finishMode; + + p->src = p->temp; + p->srcLim = p->temp + p->tempPos; + if (src != srcLim) + p->finishMode = BCJ2_ENC_FINISH_MODE_CONTINUE; + + PRF(printf(" ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + Bcj2Enc_Encode_2(p); + + { + unsigned num = (unsigned)(p->src - p->temp); + unsigned tempPos = p->tempPos - num; + unsigned i; + p->tempPos = tempPos; + for (i = 0; i < tempPos; i++) + p->temp[i] = p->temp[(size_t)i + num]; + + p->src = src; + p->srcLim = srcLim; + p->finishMode = finishMode; + + if (p->state != BCJ2_ENC_STATE_ORIG || src == srcLim) + return; + + if (extra >= tempPos) + { + p->src = src - tempPos; + p->tempPos = 0; + break; + } + + p->temp[tempPos] = src[0]; + p->tempPos = tempPos + 1; + p->src = src + 1; + extra++; + } + } + } + + PRF(printf("++++ ip = %8d tempPos = %8d src = %8d\n", p->ip, p->tempPos, p->srcLim - p->src)); + + Bcj2Enc_Encode_2(p); + + if (p->state == BCJ2_ENC_STATE_ORIG) + { + const Byte *src = p->src; + unsigned rem = (unsigned)(p->srcLim - src); + unsigned i; + for (i = 0; i < rem; i++) + p->temp[i] = src[i]; + p->tempPos = rem; + p->src = src + rem; + } +} diff --git a/bsnes/lzma/Bra.c b/bsnes/lzma/Bra.c new file mode 100644 index 00000000..cbdcb290 --- /dev/null +++ b/bsnes/lzma/Bra.c @@ -0,0 +1,230 @@ +/* Bra.c -- Converters for RISC code +2017-04-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" +#include "Bra.h" + +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip += 4; + p = data; + lim = data + size; + + if (encoding) + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + if (p[-1] == 0xEB) + break; + } + { + UInt32 v = GetUi32(p - 4); + v <<= 2; + v += ip + (UInt32)(p - data); + v >>= 2; + v &= 0x00FFFFFF; + v |= 0xEB000000; + SetUi32(p - 4, v); + } + } + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + if (p[-1] == 0xEB) + break; + } + { + UInt32 v = GetUi32(p - 4); + v <<= 2; + v -= ip + (UInt32)(p - data); + v >>= 2; + v &= 0x00FFFFFF; + v |= 0xEB000000; + SetUi32(p - 4, v); + } + } +} + + +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)1; + p = data; + lim = data + size - 4; + + if (encoding) + + for (;;) + { + UInt32 b1; + for (;;) + { + UInt32 b3; + if (p > lim) + return p - data; + b1 = p[1]; + b3 = p[3]; + p += 2; + b1 ^= 8; + if ((b3 & b1) >= 0xF8) + break; + } + { + UInt32 v = + ((UInt32)b1 << 19) + + (((UInt32)p[1] & 0x7) << 8) + + (((UInt32)p[-2] << 11)) + + (p[0]); + + p += 2; + { + UInt32 cur = (ip + (UInt32)(p - data)) >> 1; + v += cur; + } + + p[-4] = (Byte)(v >> 11); + p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); + p[-2] = (Byte)v; + p[-1] = (Byte)(0xF8 | (v >> 8)); + } + } + + for (;;) + { + UInt32 b1; + for (;;) + { + UInt32 b3; + if (p > lim) + return p - data; + b1 = p[1]; + b3 = p[3]; + p += 2; + b1 ^= 8; + if ((b3 & b1) >= 0xF8) + break; + } + { + UInt32 v = + ((UInt32)b1 << 19) + + (((UInt32)p[1] & 0x7) << 8) + + (((UInt32)p[-2] << 11)) + + (p[0]); + + p += 2; + { + UInt32 cur = (ip + (UInt32)(p - data)) >> 1; + v -= cur; + } + + /* + SetUi16(p - 4, (UInt16)(((v >> 11) & 0x7FF) | 0xF000)); + SetUi16(p - 2, (UInt16)(v | 0xF800)); + */ + + p[-4] = (Byte)(v >> 11); + p[-3] = (Byte)(0xF0 | ((v >> 19) & 0x7)); + p[-2] = (Byte)v; + p[-1] = (Byte)(0xF8 | (v >> 8)); + } + } +} + + +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip -= 4; + p = data; + lim = data + size; + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + p += 4; + /* if ((v & 0xFC000003) == 0x48000001) */ + if ((p[-4] & 0xFC) == 0x48 && (p[-1] & 3) == 1) + break; + } + { + UInt32 v = GetBe32(p - 4); + if (encoding) + v += ip + (UInt32)(p - data); + else + v -= ip + (UInt32)(p - data); + v &= 0x03FFFFFF; + v |= 0x48000000; + SetBe32(p - 4, v); + } + } +} + + +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + Byte *p; + const Byte *lim; + size &= ~(size_t)3; + ip -= 4; + p = data; + lim = data + size; + + for (;;) + { + for (;;) + { + if (p >= lim) + return p - data; + /* + v = GetBe32(p); + p += 4; + m = v + ((UInt32)5 << 29); + m ^= (UInt32)7 << 29; + m += (UInt32)1 << 22; + if ((m & ((UInt32)0x1FF << 23)) == 0) + break; + */ + p += 4; + if ((p[-4] == 0x40 && (p[-3] & 0xC0) == 0) || + (p[-4] == 0x7F && (p[-3] >= 0xC0))) + break; + } + { + UInt32 v = GetBe32(p - 4); + v <<= 2; + if (encoding) + v += ip + (UInt32)(p - data); + else + v -= ip + (UInt32)(p - data); + + v &= 0x01FFFFFF; + v -= (UInt32)1 << 24; + v ^= 0xFF000000; + v >>= 2; + v |= 0x40000000; + SetBe32(p - 4, v); + } + } +} diff --git a/bsnes/lzma/Bra.h b/bsnes/lzma/Bra.h new file mode 100644 index 00000000..aba8dce1 --- /dev/null +++ b/bsnes/lzma/Bra.h @@ -0,0 +1,64 @@ +/* Bra.h -- Branch converters for executables +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __BRA_H +#define __BRA_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* +These functions convert relative addresses to absolute addresses +in CALL instructions to increase the compression ratio. + + In: + data - data buffer + size - size of data + ip - current virtual Instruction Pinter (IP) value + state - state variable for x86 converter + encoding - 0 (for decoding), 1 (for encoding) + + Out: + state - state variable for x86 converter + + Returns: + The number of processed bytes. If you call these functions with multiple calls, + you must start next call with first byte after block of processed bytes. + + Type Endian Alignment LookAhead + + x86 little 1 4 + ARMT little 2 2 + ARM little 4 0 + PPC big 4 0 + SPARC big 4 0 + IA64 little 16 0 + + size must be >= Alignment + LookAhead, if it's not last block. + If (size < Alignment + LookAhead), converter returns 0. + + Example: + + UInt32 ip = 0; + for () + { + ; size must be >= Alignment + LookAhead, if it's not last block + SizeT processed = Convert(data, size, ip, 1); + data += processed; + size -= processed; + ip += processed; + } +*/ + +#define x86_Convert_Init(state) { state = 0; } +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Bra86.c b/bsnes/lzma/Bra86.c new file mode 100644 index 00000000..a6463c63 --- /dev/null +++ b/bsnes/lzma/Bra86.c @@ -0,0 +1,82 @@ +/* Bra86.c -- Converter for x86 code (BCJ) +2017-04-03 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Bra.h" + +#define Test86MSByte(b) ((((b) + 1) & 0xFE) == 0) + +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) +{ + SizeT pos = 0; + UInt32 mask = *state & 7; + if (size < 5) + return 0; + size -= 4; + ip += 5; + + for (;;) + { + Byte *p = data + pos; + const Byte *limit = data + size; + for (; p < limit; p++) + if ((*p & 0xFE) == 0xE8) + break; + + { + SizeT d = (SizeT)(p - data - pos); + pos = (SizeT)(p - data); + if (p >= limit) + { + *state = (d > 2 ? 0 : mask >> (unsigned)d); + return pos; + } + if (d > 2) + mask = 0; + else + { + mask >>= (unsigned)d; + if (mask != 0 && (mask > 4 || mask == 3 || Test86MSByte(p[(size_t)(mask >> 1) + 1]))) + { + mask = (mask >> 1) | 4; + pos++; + continue; + } + } + } + + if (Test86MSByte(p[4])) + { + UInt32 v = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); + UInt32 cur = ip + (UInt32)pos; + pos += 5; + if (encoding) + v += cur; + else + v -= cur; + if (mask != 0) + { + unsigned sh = (mask & 6) << 2; + if (Test86MSByte((Byte)(v >> sh))) + { + v ^= (((UInt32)0x100 << sh) - 1); + if (encoding) + v += cur; + else + v -= cur; + } + mask = 0; + } + p[1] = (Byte)v; + p[2] = (Byte)(v >> 8); + p[3] = (Byte)(v >> 16); + p[4] = (Byte)(0 - ((v >> 24) & 1)); + } + else + { + mask = (mask >> 1) | 4; + pos++; + } + } +} diff --git a/bsnes/lzma/BraIA64.c b/bsnes/lzma/BraIA64.c new file mode 100644 index 00000000..2656907a --- /dev/null +++ b/bsnes/lzma/BraIA64.c @@ -0,0 +1,53 @@ +/* BraIA64.c -- Converter for IA-64 code +2017-01-26 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" +#include "Bra.h" + +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 16) + return 0; + size -= 16; + i = 0; + do + { + unsigned m = ((UInt32)0x334B0000 >> (data[i] & 0x1E)) & 3; + if (m) + { + m++; + do + { + Byte *p = data + (i + (size_t)m * 5 - 8); + if (((p[3] >> m) & 15) == 5 + && (((p[-1] | ((UInt32)p[0] << 8)) >> m) & 0x70) == 0) + { + unsigned raw = GetUi32(p); + unsigned v = raw >> m; + v = (v & 0xFFFFF) | ((v & (1 << 23)) >> 3); + + v <<= 4; + if (encoding) + v += ip + (UInt32)i; + else + v -= ip + (UInt32)i; + v >>= 4; + + v &= 0x1FFFFF; + v += 0x700000; + v &= 0x8FFFFF; + raw &= ~((UInt32)0x8FFFFF << m); + raw |= (v << m); + SetUi32(p, raw); + } + } + while (++m <= 4); + } + i += 16; + } + while (i <= size); + return i; +} diff --git a/bsnes/lzma/Compiler.h b/bsnes/lzma/Compiler.h new file mode 100644 index 00000000..c788648c --- /dev/null +++ b/bsnes/lzma/Compiler.h @@ -0,0 +1,33 @@ +/* Compiler.h +2017-04-03 : Igor Pavlov : Public domain */ + +#ifndef __7Z_COMPILER_H +#define __7Z_COMPILER_H + +#ifdef _MSC_VER + + #ifdef UNDER_CE + #define RPC_NO_WINDOWS_H + /* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */ + #pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union + #pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int + #endif + + #if _MSC_VER >= 1300 + #pragma warning(disable : 4996) // This function or variable may be unsafe + #else + #pragma warning(disable : 4511) // copy constructor could not be generated + #pragma warning(disable : 4512) // assignment operator could not be generated + #pragma warning(disable : 4514) // unreferenced inline function has been removed + #pragma warning(disable : 4702) // unreachable code + #pragma warning(disable : 4710) // not inlined + #pragma warning(disable : 4714) // function marked as __forceinline not inlined + #pragma warning(disable : 4786) // identifier was truncated to '255' characters in the debug information + #endif + +#endif + +#define UNUSED_VAR(x) (void)x; +/* #define UNUSED_VAR(x) x=x; */ + +#endif diff --git a/bsnes/lzma/CpuArch.c b/bsnes/lzma/CpuArch.c new file mode 100644 index 00000000..ff1890e7 --- /dev/null +++ b/bsnes/lzma/CpuArch.c @@ -0,0 +1,218 @@ +/* CpuArch.c -- CPU specific code +2018-02-18: Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 + +#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) +#define USE_ASM +#endif + +#if !defined(USE_ASM) && _MSC_VER >= 1500 +#include +#endif + +#if defined(USE_ASM) && !defined(MY_CPU_AMD64) +static UInt32 CheckFlag(UInt32 flag) +{ + #ifdef _MSC_VER + __asm pushfd; + __asm pop EAX; + __asm mov EDX, EAX; + __asm xor EAX, flag; + __asm push EAX; + __asm popfd; + __asm pushfd; + __asm pop EAX; + __asm xor EAX, EDX; + __asm push EDX; + __asm popfd; + __asm and flag, EAX; + #else + __asm__ __volatile__ ( + "pushf\n\t" + "pop %%EAX\n\t" + "movl %%EAX,%%EDX\n\t" + "xorl %0,%%EAX\n\t" + "push %%EAX\n\t" + "popf\n\t" + "pushf\n\t" + "pop %%EAX\n\t" + "xorl %%EDX,%%EAX\n\t" + "push %%EDX\n\t" + "popf\n\t" + "andl %%EAX, %0\n\t": + "=c" (flag) : "c" (flag) : + "%eax", "%edx"); + #endif + return flag; +} +#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; +#else +#define CHECK_CPUID_IS_SUPPORTED +#endif + +void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) +{ + #ifdef USE_ASM + + #ifdef _MSC_VER + + UInt32 a2, b2, c2, d2; + __asm xor EBX, EBX; + __asm xor ECX, ECX; + __asm xor EDX, EDX; + __asm mov EAX, function; + __asm cpuid; + __asm mov a2, EAX; + __asm mov b2, EBX; + __asm mov c2, ECX; + __asm mov d2, EDX; + + *a = a2; + *b = b2; + *c = c2; + *d = d2; + + #else + + __asm__ __volatile__ ( + #if defined(MY_CPU_AMD64) && defined(__PIC__) + "mov %%rbx, %%rdi;" + "cpuid;" + "xchg %%rbx, %%rdi;" + : "=a" (*a) , + "=D" (*b) , + #elif defined(MY_CPU_X86) && defined(__PIC__) + "mov %%ebx, %%edi;" + "cpuid;" + "xchgl %%ebx, %%edi;" + : "=a" (*a) , + "=D" (*b) , + #else + "cpuid" + : "=a" (*a) , + "=b" (*b) , + #endif + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + + #endif + + #else + + int CPUInfo[4]; + __cpuid(CPUInfo, function); + *a = CPUInfo[0]; + *b = CPUInfo[1]; + *c = CPUInfo[2]; + *d = CPUInfo[3]; + + #endif +} + +BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p) +{ + CHECK_CPUID_IS_SUPPORTED + MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); + MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); + return True; +} + +static const UInt32 kVendors[][3] = +{ + { 0x756E6547, 0x49656E69, 0x6C65746E}, + { 0x68747541, 0x69746E65, 0x444D4163}, + { 0x746E6543, 0x48727561, 0x736C7561} +}; + +int x86cpuid_GetFirm(const Cx86cpuid *p) +{ + unsigned i; + for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) + { + const UInt32 *v = kVendors[i]; + if (v[0] == p->vendor[0] && + v[1] == p->vendor[1] && + v[2] == p->vendor[2]) + return (int)i; + } + return -1; +} + +BoolInt CPU_Is_InOrder() +{ + Cx86cpuid p; + int firm; + UInt32 family, model; + if (!x86cpuid_CheckAndRead(&p)) + return True; + + family = x86cpuid_GetFamily(p.ver); + model = x86cpuid_GetModel(p.ver); + + firm = x86cpuid_GetFirm(&p); + + switch (firm) + { + case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && ( + /* In-Order Atom CPU */ + model == 0x1C /* 45 nm, N4xx, D4xx, N5xx, D5xx, 230, 330 */ + || model == 0x26 /* 45 nm, Z6xx */ + || model == 0x27 /* 32 nm, Z2460 */ + || model == 0x35 /* 32 nm, Z2760 */ + || model == 0x36 /* 32 nm, N2xxx, D2xxx */ + ))); + case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); + case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); + } + return True; +} + +#if !defined(MY_CPU_AMD64) && defined(_WIN32) +#include +static BoolInt CPU_Sys_Is_SSE_Supported() +{ + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi)) + return False; + return (vi.dwMajorVersion >= 5); +} +#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False; +#else +#define CHECK_SYS_SSE_SUPPORT +#endif + +BoolInt CPU_Is_Aes_Supported() +{ + Cx86cpuid p; + CHECK_SYS_SSE_SUPPORT + if (!x86cpuid_CheckAndRead(&p)) + return False; + return (p.c >> 25) & 1; +} + +BoolInt CPU_IsSupported_PageGB() +{ + Cx86cpuid cpuid; + if (!x86cpuid_CheckAndRead(&cpuid)) + return False; + { + UInt32 d[4] = { 0 }; + MyCPUID(0x80000000, &d[0], &d[1], &d[2], &d[3]); + if (d[0] < 0x80000001) + return False; + } + { + UInt32 d[4] = { 0 }; + MyCPUID(0x80000001, &d[0], &d[1], &d[2], &d[3]); + return (d[3] >> 26) & 1; + } +} + +#endif diff --git a/bsnes/lzma/CpuArch.h b/bsnes/lzma/CpuArch.h new file mode 100644 index 00000000..5f74c1c0 --- /dev/null +++ b/bsnes/lzma/CpuArch.h @@ -0,0 +1,336 @@ +/* CpuArch.h -- CPU specific code +2018-02-18 : Igor Pavlov : Public domain */ + +#ifndef __CPU_ARCH_H +#define __CPU_ARCH_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* +MY_CPU_LE means that CPU is LITTLE ENDIAN. +MY_CPU_BE means that CPU is BIG ENDIAN. +If MY_CPU_LE and MY_CPU_BE are not defined, we don't know about ENDIANNESS of platform. + +MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. +*/ + +#if defined(_M_X64) \ + || defined(_M_AMD64) \ + || defined(__x86_64__) \ + || defined(__AMD64__) \ + || defined(__amd64__) + #define MY_CPU_AMD64 + #ifdef __ILP32__ + #define MY_CPU_NAME "x32" + #else + #define MY_CPU_NAME "x64" + #endif + #define MY_CPU_64BIT +#endif + + +#if defined(_M_IX86) \ + || defined(__i386__) + #define MY_CPU_X86 + #define MY_CPU_NAME "x86" + #define MY_CPU_32BIT +#endif + + +#if defined(_M_ARM64) \ + || defined(__AARCH64EL__) \ + || defined(__AARCH64EB__) \ + || defined(__aarch64__) + #define MY_CPU_ARM64 + #define MY_CPU_NAME "arm64" + #define MY_CPU_64BIT +#endif + + +#if defined(_M_ARM) \ + || defined(_M_ARM_NT) \ + || defined(_M_ARMT) \ + || defined(__arm__) \ + || defined(__thumb__) \ + || defined(__ARMEL__) \ + || defined(__ARMEB__) \ + || defined(__THUMBEL__) \ + || defined(__THUMBEB__) + #define MY_CPU_ARM + #define MY_CPU_NAME "arm" + #define MY_CPU_32BIT +#endif + + +#if defined(_M_IA64) \ + || defined(__ia64__) + #define MY_CPU_IA64 + #define MY_CPU_NAME "ia64" + #define MY_CPU_64BIT +#endif + + +#if defined(__mips64) \ + || defined(__mips64__) \ + || (defined(__mips) && (__mips == 64 || __mips == 4 || __mips == 3)) + #define MY_CPU_NAME "mips64" + #define MY_CPU_64BIT +#elif defined(__mips__) + #define MY_CPU_NAME "mips" + /* #define MY_CPU_32BIT */ +#endif + + +#if defined(__ppc64__) \ + || defined(__powerpc64__) + #ifdef __ILP32__ + #define MY_CPU_NAME "ppc64-32" + #else + #define MY_CPU_NAME "ppc64" + #endif + #define MY_CPU_64BIT +#elif defined(__ppc__) \ + || defined(__powerpc__) + #define MY_CPU_NAME "ppc" + #define MY_CPU_32BIT +#endif + + +#if defined(__sparc64__) + #define MY_CPU_NAME "sparc64" + #define MY_CPU_64BIT +#elif defined(__sparc__) + #define MY_CPU_NAME "sparc" + /* #define MY_CPU_32BIT */ +#endif + + +#if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) +#define MY_CPU_X86_OR_AMD64 +#endif + + +#ifdef _WIN32 + + #ifdef MY_CPU_ARM + #define MY_CPU_ARM_LE + #endif + + #ifdef MY_CPU_ARM64 + #define MY_CPU_ARM64_LE + #endif + + #ifdef _M_IA64 + #define MY_CPU_IA64_LE + #endif + +#endif + + +#if defined(MY_CPU_X86_OR_AMD64) \ + || defined(MY_CPU_ARM_LE) \ + || defined(MY_CPU_ARM64_LE) \ + || defined(MY_CPU_IA64_LE) \ + || defined(__LITTLE_ENDIAN__) \ + || defined(__ARMEL__) \ + || defined(__THUMBEL__) \ + || defined(__AARCH64EL__) \ + || defined(__MIPSEL__) \ + || defined(__MIPSEL) \ + || defined(_MIPSEL) \ + || defined(__BFIN__) \ + || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)) + #define MY_CPU_LE +#endif + +#if defined(__BIG_ENDIAN__) \ + || defined(__ARMEB__) \ + || defined(__THUMBEB__) \ + || defined(__AARCH64EB__) \ + || defined(__MIPSEB__) \ + || defined(__MIPSEB) \ + || defined(_MIPSEB) \ + || defined(__m68k__) \ + || defined(__s390__) \ + || defined(__s390x__) \ + || defined(__zarch__) \ + || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) + #define MY_CPU_BE +#endif + + +#if defined(MY_CPU_LE) && defined(MY_CPU_BE) + #error Stop_Compiling_Bad_Endian +#endif + + +#if defined(MY_CPU_32BIT) && defined(MY_CPU_64BIT) + #error Stop_Compiling_Bad_32_64_BIT +#endif + + +#ifndef MY_CPU_NAME + #ifdef MY_CPU_LE + #define MY_CPU_NAME "LE" + #elif defined(MY_CPU_BE) + #define MY_CPU_NAME "BE" + #else + /* + #define MY_CPU_NAME "" + */ + #endif +#endif + + + + + +#ifdef MY_CPU_LE + #if defined(MY_CPU_X86_OR_AMD64) \ + || defined(MY_CPU_ARM64) \ + || defined(__ARM_FEATURE_UNALIGNED) + #define MY_CPU_LE_UNALIGN + #endif +#endif + + +#ifdef MY_CPU_LE_UNALIGN + +#define GetUi16(p) (*(const UInt16 *)(const void *)(p)) +#define GetUi32(p) (*(const UInt32 *)(const void *)(p)) +#define GetUi64(p) (*(const UInt64 *)(const void *)(p)) + +#define SetUi16(p, v) { *(UInt16 *)(p) = (v); } +#define SetUi32(p, v) { *(UInt32 *)(p) = (v); } +#define SetUi64(p, v) { *(UInt64 *)(p) = (v); } + +#else + +#define GetUi16(p) ( (UInt16) ( \ + ((const Byte *)(p))[0] | \ + ((UInt16)((const Byte *)(p))[1] << 8) )) + +#define GetUi32(p) ( \ + ((const Byte *)(p))[0] | \ + ((UInt32)((const Byte *)(p))[1] << 8) | \ + ((UInt32)((const Byte *)(p))[2] << 16) | \ + ((UInt32)((const Byte *)(p))[3] << 24)) + +#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) + +#define SetUi16(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)_vvv_; \ + _ppp_[1] = (Byte)(_vvv_ >> 8); } + +#define SetUi32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)_vvv_; \ + _ppp_[1] = (Byte)(_vvv_ >> 8); \ + _ppp_[2] = (Byte)(_vvv_ >> 16); \ + _ppp_[3] = (Byte)(_vvv_ >> 24); } + +#define SetUi64(p, v) { Byte *_ppp2_ = (Byte *)(p); UInt64 _vvv2_ = (v); \ + SetUi32(_ppp2_ , (UInt32)_vvv2_); \ + SetUi32(_ppp2_ + 4, (UInt32)(_vvv2_ >> 32)); } + +#endif + +#ifdef __has_builtin + #define MY__has_builtin(x) __has_builtin(x) +#else + #define MY__has_builtin(x) 0 +#endif + +#if defined(MY_CPU_LE_UNALIGN) && /* defined(_WIN64) && */ (_MSC_VER >= 1300) + +/* Note: we use bswap instruction, that is unsupported in 386 cpu */ + +#include + +#pragma intrinsic(_byteswap_ushort) +#pragma intrinsic(_byteswap_ulong) +#pragma intrinsic(_byteswap_uint64) + +/* #define GetBe16(p) _byteswap_ushort(*(const UInt16 *)(const Byte *)(p)) */ +#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p)) +#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p)) + +#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = _byteswap_ulong(v) + +#elif defined(MY_CPU_LE_UNALIGN) && ( \ + (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) \ + || (defined(__clang__) && MY__has_builtin(__builtin_bswap16)) ) + +/* #define GetBe16(p) __builtin_bswap16(*(const UInt16 *)(const Byte *)(p)) */ +#define GetBe32(p) __builtin_bswap32(*(const UInt32 *)(const Byte *)(p)) +#define GetBe64(p) __builtin_bswap64(*(const UInt64 *)(const Byte *)(p)) + +#define SetBe32(p, v) (*(UInt32 *)(void *)(p)) = __builtin_bswap32(v) + +#else + +#define GetBe32(p) ( \ + ((UInt32)((const Byte *)(p))[0] << 24) | \ + ((UInt32)((const Byte *)(p))[1] << 16) | \ + ((UInt32)((const Byte *)(p))[2] << 8) | \ + ((const Byte *)(p))[3] ) + +#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) + +#define SetBe32(p, v) { Byte *_ppp_ = (Byte *)(p); UInt32 _vvv_ = (v); \ + _ppp_[0] = (Byte)(_vvv_ >> 24); \ + _ppp_[1] = (Byte)(_vvv_ >> 16); \ + _ppp_[2] = (Byte)(_vvv_ >> 8); \ + _ppp_[3] = (Byte)_vvv_; } + +#endif + + +#ifndef GetBe16 + +#define GetBe16(p) ( (UInt16) ( \ + ((UInt16)((const Byte *)(p))[0] << 8) | \ + ((const Byte *)(p))[1] )) + +#endif + + + +#ifdef MY_CPU_X86_OR_AMD64 + +typedef struct +{ + UInt32 maxFunc; + UInt32 vendor[3]; + UInt32 ver; + UInt32 b; + UInt32 c; + UInt32 d; +} Cx86cpuid; + +enum +{ + CPU_FIRM_INTEL, + CPU_FIRM_AMD, + CPU_FIRM_VIA +}; + +void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d); + +BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p); +int x86cpuid_GetFirm(const Cx86cpuid *p); + +#define x86cpuid_GetFamily(ver) (((ver >> 16) & 0xFF0) | ((ver >> 8) & 0xF)) +#define x86cpuid_GetModel(ver) (((ver >> 12) & 0xF0) | ((ver >> 4) & 0xF)) +#define x86cpuid_GetStepping(ver) (ver & 0xF) + +BoolInt CPU_Is_InOrder(); +BoolInt CPU_Is_Aes_Supported(); +BoolInt CPU_IsSupported_PageGB(); + +#endif + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Delta.c b/bsnes/lzma/Delta.c new file mode 100644 index 00000000..6cbbe460 --- /dev/null +++ b/bsnes/lzma/Delta.c @@ -0,0 +1,64 @@ +/* Delta.c -- Delta converter +2009-05-26 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Delta.h" + +void Delta_Init(Byte *state) +{ + unsigned i; + for (i = 0; i < DELTA_STATE_SIZE; i++) + state[i] = 0; +} + +static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) +{ + unsigned i; + for (i = 0; i < size; i++) + dest[i] = src[i]; +} + +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + Byte b = data[i]; + data[i] = (Byte)(b - buf[j]); + buf[j] = b; + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} + +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + buf[j] = data[i] = (Byte)(buf[j] + data[i]); + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} diff --git a/bsnes/lzma/Delta.h b/bsnes/lzma/Delta.h new file mode 100644 index 00000000..e59d5a25 --- /dev/null +++ b/bsnes/lzma/Delta.h @@ -0,0 +1,19 @@ +/* Delta.h -- Delta converter +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __DELTA_H +#define __DELTA_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define DELTA_STATE_SIZE 256 + +void Delta_Init(Byte *state); +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/DllSecur.c b/bsnes/lzma/DllSecur.c new file mode 100644 index 00000000..19a22a9f --- /dev/null +++ b/bsnes/lzma/DllSecur.c @@ -0,0 +1,108 @@ +/* DllSecur.c -- DLL loading security +2018-02-21 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#ifdef _WIN32 + +#include + +#include "DllSecur.h" + +#ifndef UNDER_CE + +typedef BOOL (WINAPI *Func_SetDefaultDllDirectories)(DWORD DirectoryFlags); + +#define MY_LOAD_LIBRARY_SEARCH_USER_DIRS 0x400 +#define MY_LOAD_LIBRARY_SEARCH_SYSTEM32 0x800 + +static const char * const g_Dlls = + #ifndef _CONSOLE + "UXTHEME\0" + #endif + "USERENV\0" + "SETUPAPI\0" + "APPHELP\0" + "PROPSYS\0" + "DWMAPI\0" + "CRYPTBASE\0" + "OLEACC\0" + "CLBCATQ\0" + "VERSION\0" + ; + +#endif + +void My_SetDefaultDllDirectories() +{ + #ifndef UNDER_CE + + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + GetVersionEx(&vi); + if (!GetVersionEx(&vi) || vi.dwMajorVersion != 6 || vi.dwMinorVersion != 0) + { + Func_SetDefaultDllDirectories setDllDirs = (Func_SetDefaultDllDirectories) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "SetDefaultDllDirectories"); + if (setDllDirs) + if (setDllDirs(MY_LOAD_LIBRARY_SEARCH_SYSTEM32 | MY_LOAD_LIBRARY_SEARCH_USER_DIRS)) + return; + } + + #endif +} + + +void LoadSecurityDlls() +{ + #ifndef UNDER_CE + + wchar_t buf[MAX_PATH + 100]; + + { + // at Vista (ver 6.0) : CoCreateInstance(CLSID_ShellLink, ...) doesn't work after SetDefaultDllDirectories() : Check it ??? + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi) || vi.dwMajorVersion != 6 || vi.dwMinorVersion != 0) + { + Func_SetDefaultDllDirectories setDllDirs = (Func_SetDefaultDllDirectories) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "SetDefaultDllDirectories"); + if (setDllDirs) + if (setDllDirs(MY_LOAD_LIBRARY_SEARCH_SYSTEM32 | MY_LOAD_LIBRARY_SEARCH_USER_DIRS)) + return; + } + } + + { + unsigned len = GetSystemDirectoryW(buf, MAX_PATH + 2); + if (len == 0 || len > MAX_PATH) + return; + } + { + const char *dll; + unsigned pos = (unsigned)lstrlenW(buf); + + if (buf[pos - 1] != '\\') + buf[pos++] = '\\'; + + for (dll = g_Dlls; dll[0] != 0;) + { + unsigned k = 0; + for (;;) + { + char c = *dll++; + buf[pos + k] = (Byte)c; + k++; + if (c == 0) + break; + } + + lstrcatW(buf, L".dll"); + LoadLibraryExW(buf, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + } + } + + #endif +} + +#endif diff --git a/bsnes/lzma/DllSecur.h b/bsnes/lzma/DllSecur.h new file mode 100644 index 00000000..4c113568 --- /dev/null +++ b/bsnes/lzma/DllSecur.h @@ -0,0 +1,20 @@ +/* DllSecur.h -- DLL loading for security +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __DLL_SECUR_H +#define __DLL_SECUR_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#ifdef _WIN32 + +void My_SetDefaultDllDirectories(); +void LoadSecurityDlls(); + +#endif + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/LzFind.c b/bsnes/lzma/LzFind.c new file mode 100644 index 00000000..4eefc17d --- /dev/null +++ b/bsnes/lzma/LzFind.c @@ -0,0 +1,1127 @@ +/* LzFind.c -- Match finder for LZ algorithms +2018-07-08 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "LzFind.h" +#include "LzHash.h" + +#define kEmptyHashValue 0 +#define kMaxValForNormalize ((UInt32)0xFFFFFFFF) +#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ +#define kNormalizeMask (~(UInt32)(kNormalizeStepMin - 1)) +#define kMaxHistorySize ((UInt32)7 << 29) + +#define kStartMaxLen 3 + +static void LzInWindow_Free(CMatchFinder *p, ISzAllocPtr alloc) +{ + if (!p->directInput) + { + ISzAlloc_Free(alloc, p->bufferBase); + p->bufferBase = NULL; + } +} + +/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ + +static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAllocPtr alloc) +{ + UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; + if (p->directInput) + { + p->blockSize = blockSize; + return 1; + } + if (!p->bufferBase || p->blockSize != blockSize) + { + LzInWindow_Free(p, alloc); + p->blockSize = blockSize; + p->bufferBase = (Byte *)ISzAlloc_Alloc(alloc, (size_t)blockSize); + } + return (p->bufferBase != NULL); +} + +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } + +UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } + +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue) +{ + p->posLimit -= subValue; + p->pos -= subValue; + p->streamPos -= subValue; +} + +static void MatchFinder_ReadBlock(CMatchFinder *p) +{ + if (p->streamEndWasReached || p->result != SZ_OK) + return; + + /* We use (p->streamPos - p->pos) value. (p->streamPos < p->pos) is allowed. */ + + if (p->directInput) + { + UInt32 curSize = 0xFFFFFFFF - (p->streamPos - p->pos); + if (curSize > p->directInputRem) + curSize = (UInt32)p->directInputRem; + p->directInputRem -= curSize; + p->streamPos += curSize; + if (p->directInputRem == 0) + p->streamEndWasReached = 1; + return; + } + + for (;;) + { + Byte *dest = p->buffer + (p->streamPos - p->pos); + size_t size = (p->bufferBase + p->blockSize - dest); + if (size == 0) + return; + + p->result = ISeqInStream_Read(p->stream, dest, &size); + if (p->result != SZ_OK) + return; + if (size == 0) + { + p->streamEndWasReached = 1; + return; + } + p->streamPos += (UInt32)size; + if (p->streamPos - p->pos > p->keepSizeAfter) + return; + } +} + +void MatchFinder_MoveBlock(CMatchFinder *p) +{ + memmove(p->bufferBase, + p->buffer - p->keepSizeBefore, + (size_t)(p->streamPos - p->pos) + p->keepSizeBefore); + p->buffer = p->bufferBase + p->keepSizeBefore; +} + +int MatchFinder_NeedMove(CMatchFinder *p) +{ + if (p->directInput) + return 0; + /* if (p->streamEndWasReached) return 0; */ + return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); +} + +void MatchFinder_ReadIfRequired(CMatchFinder *p) +{ + if (p->streamEndWasReached) + return; + if (p->keepSizeAfter >= p->streamPos - p->pos) + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) +{ + if (MatchFinder_NeedMove(p)) + MatchFinder_MoveBlock(p); + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_SetDefaultSettings(CMatchFinder *p) +{ + p->cutValue = 32; + p->btMode = 1; + p->numHashBytes = 4; + p->bigHash = 0; +} + +#define kCrcPoly 0xEDB88320 + +void MatchFinder_Construct(CMatchFinder *p) +{ + unsigned i; + p->bufferBase = NULL; + p->directInput = 0; + p->hash = NULL; + p->expectedDataSize = (UInt64)(Int64)-1; + MatchFinder_SetDefaultSettings(p); + + for (i = 0; i < 256; i++) + { + UInt32 r = (UInt32)i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ((UInt32)0 - (r & 1))); + p->crc[i] = r; + } +} + +static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->hash); + p->hash = NULL; +} + +void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc) +{ + MatchFinder_FreeThisClassMemory(p, alloc); + LzInWindow_Free(p, alloc); +} + +static CLzRef* AllocRefs(size_t num, ISzAllocPtr alloc) +{ + size_t sizeInBytes = (size_t)num * sizeof(CLzRef); + if (sizeInBytes / sizeof(CLzRef) != num) + return NULL; + return (CLzRef *)ISzAlloc_Alloc(alloc, sizeInBytes); +} + +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAllocPtr alloc) +{ + UInt32 sizeReserv; + + if (historySize > kMaxHistorySize) + { + MatchFinder_Free(p, alloc); + return 0; + } + + sizeReserv = historySize >> 1; + if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3; + else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2; + + sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); + + p->keepSizeBefore = historySize + keepAddBufferBefore + 1; + p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; + + /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ + + if (LzInWindow_Create(p, sizeReserv, alloc)) + { + UInt32 newCyclicBufferSize = historySize + 1; + UInt32 hs; + p->matchMaxLen = matchMaxLen; + { + p->fixedHashSize = 0; + if (p->numHashBytes == 2) + hs = (1 << 16) - 1; + else + { + hs = historySize; + if (hs > p->expectedDataSize) + hs = (UInt32)p->expectedDataSize; + if (hs != 0) + hs--; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; /* don't change it! It's required for Deflate */ + if (hs > (1 << 24)) + { + if (p->numHashBytes == 3) + hs = (1 << 24) - 1; + else + hs >>= 1; + /* if (bigHash) mode, GetHeads4b() in LzFindMt.c needs (hs >= ((1 << 24) - 1))) */ + } + } + p->hashMask = hs; + hs++; + if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; + if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; + if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; + hs += p->fixedHashSize; + } + + { + size_t newSize; + size_t numSons; + p->historySize = historySize; + p->hashSizeSum = hs; + p->cyclicBufferSize = newCyclicBufferSize; + + numSons = newCyclicBufferSize; + if (p->btMode) + numSons <<= 1; + newSize = hs + numSons; + + if (p->hash && p->numRefs == newSize) + return 1; + + MatchFinder_FreeThisClassMemory(p, alloc); + p->numRefs = newSize; + p->hash = AllocRefs(newSize, alloc); + + if (p->hash) + { + p->son = p->hash + p->hashSizeSum; + return 1; + } + } + } + + MatchFinder_Free(p, alloc); + return 0; +} + +static void MatchFinder_SetLimits(CMatchFinder *p) +{ + UInt32 limit = kMaxValForNormalize - p->pos; + UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; + + if (limit2 < limit) + limit = limit2; + limit2 = p->streamPos - p->pos; + + if (limit2 <= p->keepSizeAfter) + { + if (limit2 > 0) + limit2 = 1; + } + else + limit2 -= p->keepSizeAfter; + + if (limit2 < limit) + limit = limit2; + + { + UInt32 lenLimit = p->streamPos - p->pos; + if (lenLimit > p->matchMaxLen) + lenLimit = p->matchMaxLen; + p->lenLimit = lenLimit; + } + p->posLimit = p->pos + limit; +} + + +void MatchFinder_Init_LowHash(CMatchFinder *p) +{ + size_t i; + CLzRef *items = p->hash; + size_t numItems = p->fixedHashSize; + for (i = 0; i < numItems; i++) + items[i] = kEmptyHashValue; +} + + +void MatchFinder_Init_HighHash(CMatchFinder *p) +{ + size_t i; + CLzRef *items = p->hash + p->fixedHashSize; + size_t numItems = (size_t)p->hashMask + 1; + for (i = 0; i < numItems; i++) + items[i] = kEmptyHashValue; +} + + +void MatchFinder_Init_3(CMatchFinder *p, int readData) +{ + p->cyclicBufferPos = 0; + p->buffer = p->bufferBase; + p->pos = + p->streamPos = p->cyclicBufferSize; + p->result = SZ_OK; + p->streamEndWasReached = 0; + + if (readData) + MatchFinder_ReadBlock(p); + + MatchFinder_SetLimits(p); +} + + +void MatchFinder_Init(CMatchFinder *p) +{ + MatchFinder_Init_HighHash(p); + MatchFinder_Init_LowHash(p); + MatchFinder_Init_3(p, True); +} + + +static UInt32 MatchFinder_GetSubValue(CMatchFinder *p) +{ + return (p->pos - p->historySize - 1) & kNormalizeMask; +} + +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems) +{ + size_t i; + for (i = 0; i < numItems; i++) + { + UInt32 value = items[i]; + if (value <= subValue) + value = kEmptyHashValue; + else + value -= subValue; + items[i] = value; + } +} + +static void MatchFinder_Normalize(CMatchFinder *p) +{ + UInt32 subValue = MatchFinder_GetSubValue(p); + MatchFinder_Normalize3(subValue, p->hash, p->numRefs); + MatchFinder_ReduceOffsets(p, subValue); +} + + +MY_NO_INLINE +static void MatchFinder_CheckLimits(CMatchFinder *p) +{ + if (p->pos == kMaxValForNormalize) + MatchFinder_Normalize(p); + if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) + MatchFinder_CheckAndMoveAndRead(p); + if (p->cyclicBufferPos == p->cyclicBufferSize) + p->cyclicBufferPos = 0; + MatchFinder_SetLimits(p); +} + + +/* + (lenLimit > maxLen) +*/ +MY_FORCE_INLINE +static UInt32 * Hc_GetMatchesSpec(unsigned lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, unsigned maxLen) +{ + /* + son[_cyclicBufferPos] = curMatch; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + return distances; + { + const Byte *pb = cur - delta; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + if (pb[maxLen] == cur[maxLen] && *pb == *cur) + { + UInt32 len = 0; + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + maxLen = len; + *distances++ = len; + *distances++ = delta - 1; + if (len == lenLimit) + return distances; + } + } + } + } + */ + + const Byte *lim = cur + lenLimit; + son[_cyclicBufferPos] = curMatch; + do + { + UInt32 delta = pos - curMatch; + if (delta >= _cyclicBufferSize) + break; + { + ptrdiff_t diff; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + diff = (ptrdiff_t)0 - delta; + if (cur[maxLen] == cur[maxLen + diff]) + { + const Byte *c = cur; + while (*c == c[diff]) + { + if (++c == lim) + { + distances[0] = (UInt32)(lim - cur); + distances[1] = delta - 1; + return distances + 2; + } + } + { + unsigned len = (unsigned)(c - cur); + if (maxLen < len) + { + maxLen = len; + distances[0] = (UInt32)len; + distances[1] = delta - 1; + distances += 2; + } + } + } + } + } + while (--cutValue); + + return distances; +} + + +MY_FORCE_INLINE +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); + unsigned len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return distances; + } + { + CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + unsigned len = (len0 < len1 ? len0 : len1); + UInt32 pair0 = pair[0]; + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + maxLen = (UInt32)len; + *distances++ = (UInt32)len; + *distances++ = delta - 1; + if (len == lenLimit) + { + *ptr1 = pair0; + *ptr0 = pair[1]; + return distances; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) +{ + CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); + unsigned len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return; + } + { + CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + unsigned len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + { + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +#define MOVE_POS \ + ++p->cyclicBufferPos; \ + p->buffer++; \ + if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); + +#define MOVE_POS_RET MOVE_POS return (UInt32)offset; + +static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } + +#define GET_MATCHES_HEADER2(minLen, ret_op) \ + unsigned lenLimit; UInt32 hv; const Byte *cur; UInt32 curMatch; \ + lenLimit = (unsigned)p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ + cur = p->buffer; + +#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) +#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) + +#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue + +#define GET_MATCHES_FOOTER(offset, maxLen) \ + offset = (unsigned)(GetMatchesSpec1((UInt32)lenLimit, curMatch, MF_PARAMS(p), \ + distances + offset, (UInt32)maxLen) - distances); MOVE_POS_RET; + +#define SKIP_FOOTER \ + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; + +#define UPDATE_maxLen { \ + ptrdiff_t diff = (ptrdiff_t)0 - d2; \ + const Byte *c = cur + maxLen; \ + const Byte *lim = cur + lenLimit; \ + for (; c != lim; c++) if (*(c + diff) != *c) break; \ + maxLen = (unsigned)(c - cur); } + +static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 1) +} + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 2) +} + +static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, d2, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(3) + + HASH3_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash[h2]; + + curMatch = (hash + kFix3HashSize)[hv]; + + hash[h2] = pos; + (hash + kFix3HashSize)[hv] = pos; + + maxLen = 2; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + UPDATE_maxLen + distances[0] = (UInt32)maxLen; + distances[1] = d2 - 1; + offset = 2; + if (maxLen == lenLimit) + { + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + + curMatch = (hash + kFix4HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + maxLen = 2; + distances[0] = 2; + distances[1] = d2 - 1; + offset = 2; + } + + if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + maxLen = 3; + distances[(size_t)offset + 1] = d3 - 1; + offset += 2; + d2 = d3; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = (UInt32)maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec((UInt32)lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + if (maxLen < 3) + maxLen = 3; + + GET_MATCHES_FOOTER(offset, maxLen) +} + +/* +static UInt32 Bt5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos; + UInt32 *hash; + GET_MATCHES_HEADER(5) + + HASH5_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + d4 = pos - (hash + kFix4HashSize)[h4]; + + curMatch = (hash + kFix5HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[h4] = pos; + (hash + kFix5HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = d2 - 1; + offset = 2; + if (*(cur - d2 + 2) == cur[2]) + distances[0] = maxLen = 3; + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[2] = maxLen = 3; + distances[3] = d3 - 1; + offset = 4; + d2 = d3; + } + } + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[0] = maxLen = 3; + distances[1] = d3 - 1; + offset = 2; + d2 = d3; + } + + if (d2 != d4 && d4 < p->cyclicBufferSize + && *(cur - d4) == *cur + && *(cur - d4 + 3) == *(cur + 3)) + { + maxLen = 4; + distances[(size_t)offset + 1] = d4 - 1; + offset += 2; + d2 = d4; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + + if (maxLen < 4) + maxLen = 4; + + GET_MATCHES_FOOTER(offset, maxLen) +} +*/ + +static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, d2, d3, pos; + unsigned maxLen, offset; + UInt32 *hash; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + curMatch = (hash + kFix4HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + maxLen = 2; + distances[0] = 2; + distances[1] = d2 - 1; + offset = 2; + } + + if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + maxLen = 3; + distances[(size_t)offset + 1] = d3 - 1; + offset += 2; + d2 = d3; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = (UInt32)maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + + if (maxLen < 3) + maxLen = 3; + + offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} + +/* +static UInt32 Hc5_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 h2, h3, h4, d2, d3, d4, maxLen, offset, pos + UInt32 *hash; + GET_MATCHES_HEADER(5) + + HASH5_CALC; + + hash = p->hash; + pos = p->pos; + + d2 = pos - hash [h2]; + d3 = pos - (hash + kFix3HashSize)[h3]; + d4 = pos - (hash + kFix4HashSize)[h4]; + + curMatch = (hash + kFix5HashSize)[hv]; + + hash [h2] = pos; + (hash + kFix3HashSize)[h3] = pos; + (hash + kFix4HashSize)[h4] = pos; + (hash + kFix5HashSize)[hv] = pos; + + maxLen = 0; + offset = 0; + + if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = d2 - 1; + offset = 2; + if (*(cur - d2 + 2) == cur[2]) + distances[0] = maxLen = 3; + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[2] = maxLen = 3; + distances[3] = d3 - 1; + offset = 4; + d2 = d3; + } + } + else if (d3 < p->cyclicBufferSize && *(cur - d3) == *cur) + { + distances[0] = maxLen = 3; + distances[1] = d3 - 1; + offset = 2; + d2 = d3; + } + + if (d2 != d4 && d4 < p->cyclicBufferSize + && *(cur - d4) == *cur + && *(cur - d4 + 3) == *(cur + 3)) + { + maxLen = 4; + distances[(size_t)offset + 1] = d4 - 1; + offset += 2; + d2 = d4; + } + + if (offset != 0) + { + UPDATE_maxLen + distances[(size_t)offset - 2] = maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + + if (maxLen < 4) + maxLen = 4; + + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} +*/ + +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + unsigned offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + offset = (unsigned)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances, 2) - (distances)); + MOVE_POS_RET +} + +static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2; + UInt32 *hash; + SKIP_HEADER(3) + HASH3_CALC; + hash = p->hash; + curMatch = (hash + kFix3HashSize)[hv]; + hash[h2] = + (hash + kFix3HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3; + UInt32 *hash; + SKIP_HEADER(4) + HASH4_CALC; + hash = p->hash; + curMatch = (hash + kFix4HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +/* +static void Bt5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3, h4; + UInt32 *hash; + SKIP_HEADER(5) + HASH5_CALC; + hash = p->hash; + curMatch = (hash + kFix5HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[h4] = + (hash + kFix5HashSize)[hv] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} +*/ + +static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3; + UInt32 *hash; + SKIP_HEADER(4) + HASH4_CALC; + hash = p->hash; + curMatch = (hash + kFix4HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +/* +static void Hc5_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 h2, h3, h4; + UInt32 *hash; + SKIP_HEADER(5) + HASH5_CALC; + hash = p->hash; + curMatch = hash + kFix5HashSize)[hv]; + hash [h2] = + (hash + kFix3HashSize)[h3] = + (hash + kFix4HashSize)[h4] = + (hash + kFix5HashSize)[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} +*/ + +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hv]; + p->hash[hv] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinder_Init; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; + if (!p->btMode) + { + /* if (p->numHashBytes <= 4) */ + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; + } + /* + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc5_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc5_MatchFinder_Skip; + } + */ + } + else if (p->numHashBytes == 2) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; + } + else if (p->numHashBytes == 3) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; + } + else /* if (p->numHashBytes == 4) */ + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; + } + /* + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt5_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt5_MatchFinder_Skip; + } + */ +} diff --git a/bsnes/lzma/LzFind.h b/bsnes/lzma/LzFind.h new file mode 100644 index 00000000..c77added --- /dev/null +++ b/bsnes/lzma/LzFind.h @@ -0,0 +1,121 @@ +/* LzFind.h -- Match finder for LZ algorithms +2017-06-10 : Igor Pavlov : Public domain */ + +#ifndef __LZ_FIND_H +#define __LZ_FIND_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef UInt32 CLzRef; + +typedef struct _CMatchFinder +{ + Byte *buffer; + UInt32 pos; + UInt32 posLimit; + UInt32 streamPos; + UInt32 lenLimit; + + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ + + Byte streamEndWasReached; + Byte btMode; + Byte bigHash; + Byte directInput; + + UInt32 matchMaxLen; + CLzRef *hash; + CLzRef *son; + UInt32 hashMask; + UInt32 cutValue; + + Byte *bufferBase; + ISeqInStream *stream; + + UInt32 blockSize; + UInt32 keepSizeBefore; + UInt32 keepSizeAfter; + + UInt32 numHashBytes; + size_t directInputRem; + UInt32 historySize; + UInt32 fixedHashSize; + UInt32 hashSizeSum; + SRes result; + UInt32 crc[256]; + size_t numRefs; + + UInt64 expectedDataSize; +} CMatchFinder; + +#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) + +#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) + +#define Inline_MatchFinder_IsFinishedOK(p) \ + ((p)->streamEndWasReached \ + && (p)->streamPos == (p)->pos \ + && (!(p)->directInput || (p)->directInputRem == 0)) + +int MatchFinder_NeedMove(CMatchFinder *p); +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); +void MatchFinder_MoveBlock(CMatchFinder *p); +void MatchFinder_ReadIfRequired(CMatchFinder *p); + +void MatchFinder_Construct(CMatchFinder *p); + +/* Conditions: + historySize <= 3 GB + keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB +*/ +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAllocPtr alloc); +void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc); +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems); +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue); + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *distances, UInt32 maxLen); + +/* +Conditions: + Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. + Mf_GetPointerToCurrentPos_Func's result must be used only before any other function +*/ + +typedef void (*Mf_Init_Func)(void *object); +typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); +typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); +typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances); +typedef void (*Mf_Skip_Func)(void *object, UInt32); + +typedef struct _IMatchFinder +{ + Mf_Init_Func Init; + Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; + Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; + Mf_GetMatches_Func GetMatches; + Mf_Skip_Func Skip; +} IMatchFinder; + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); + +void MatchFinder_Init_LowHash(CMatchFinder *p); +void MatchFinder_Init_HighHash(CMatchFinder *p); +void MatchFinder_Init_3(CMatchFinder *p, int readData); +void MatchFinder_Init(CMatchFinder *p); + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/LzFindMt.c b/bsnes/lzma/LzFindMt.c new file mode 100644 index 00000000..df32146f --- /dev/null +++ b/bsnes/lzma/LzFindMt.c @@ -0,0 +1,853 @@ +/* LzFindMt.c -- multithreaded Match finder for LZ algorithms +2018-12-29 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "LzHash.h" + +#include "LzFindMt.h" + +static void MtSync_Construct(CMtSync *p) +{ + p->wasCreated = False; + p->csWasInitialized = False; + p->csWasEntered = False; + Thread_Construct(&p->thread); + Event_Construct(&p->canStart); + Event_Construct(&p->wasStarted); + Event_Construct(&p->wasStopped); + Semaphore_Construct(&p->freeSemaphore); + Semaphore_Construct(&p->filledSemaphore); +} + +static void MtSync_GetNextBlock(CMtSync *p) +{ + if (p->needStart) + { + p->numProcessedBlocks = 1; + p->needStart = False; + p->stopWriting = False; + p->exit = False; + Event_Reset(&p->wasStarted); + Event_Reset(&p->wasStopped); + + Event_Set(&p->canStart); + Event_Wait(&p->wasStarted); + + // if (mt) MatchFinder_Init_LowHash(mt->MatchFinder); + } + else + { + CriticalSection_Leave(&p->cs); + p->csWasEntered = False; + p->numProcessedBlocks++; + Semaphore_Release1(&p->freeSemaphore); + } + Semaphore_Wait(&p->filledSemaphore); + CriticalSection_Enter(&p->cs); + p->csWasEntered = True; +} + +/* MtSync_StopWriting must be called if Writing was started */ + +static void MtSync_StopWriting(CMtSync *p) +{ + UInt32 myNumBlocks = p->numProcessedBlocks; + if (!Thread_WasCreated(&p->thread) || p->needStart) + return; + p->stopWriting = True; + if (p->csWasEntered) + { + CriticalSection_Leave(&p->cs); + p->csWasEntered = False; + } + Semaphore_Release1(&p->freeSemaphore); + + Event_Wait(&p->wasStopped); + + while (myNumBlocks++ != p->numProcessedBlocks) + { + Semaphore_Wait(&p->filledSemaphore); + Semaphore_Release1(&p->freeSemaphore); + } + p->needStart = True; +} + +static void MtSync_Destruct(CMtSync *p) +{ + if (Thread_WasCreated(&p->thread)) + { + MtSync_StopWriting(p); + p->exit = True; + if (p->needStart) + Event_Set(&p->canStart); + Thread_Wait(&p->thread); + Thread_Close(&p->thread); + } + if (p->csWasInitialized) + { + CriticalSection_Delete(&p->cs); + p->csWasInitialized = False; + } + + Event_Close(&p->canStart); + Event_Close(&p->wasStarted); + Event_Close(&p->wasStopped); + Semaphore_Close(&p->freeSemaphore); + Semaphore_Close(&p->filledSemaphore); + + p->wasCreated = False; +} + +#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; } + +static SRes MtSync_Create2(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj, UInt32 numBlocks) +{ + if (p->wasCreated) + return SZ_OK; + + RINOK_THREAD(CriticalSection_Init(&p->cs)); + p->csWasInitialized = True; + + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canStart)); + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStarted)); + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStopped)); + + RINOK_THREAD(Semaphore_Create(&p->freeSemaphore, numBlocks, numBlocks)); + RINOK_THREAD(Semaphore_Create(&p->filledSemaphore, 0, numBlocks)); + + p->needStart = True; + + RINOK_THREAD(Thread_Create(&p->thread, startAddress, obj)); + p->wasCreated = True; + return SZ_OK; +} + +static SRes MtSync_Create(CMtSync *p, THREAD_FUNC_TYPE startAddress, void *obj, UInt32 numBlocks) +{ + SRes res = MtSync_Create2(p, startAddress, obj, numBlocks); + if (res != SZ_OK) + MtSync_Destruct(p); + return res; +} + +void MtSync_Init(CMtSync *p) { p->needStart = True; } + +#define kMtMaxValForNormalize 0xFFFFFFFF + +#define DEF_GetHeads2(name, v, action) \ + static void GetHeads ## name(const Byte *p, UInt32 pos, \ + UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc) \ + { action; for (; numHeads != 0; numHeads--) { \ + const UInt32 value = (v); p++; *heads++ = pos - hash[value]; hash[value] = pos++; } } + +#define DEF_GetHeads(name, v) DEF_GetHeads2(name, v, ;) + +DEF_GetHeads2(2, (p[0] | ((UInt32)p[1] << 8)), UNUSED_VAR(hashMask); UNUSED_VAR(crc); ) +DEF_GetHeads(3, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8)) & hashMask) +DEF_GetHeads(4, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5)) & hashMask) +DEF_GetHeads(4b, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ ((UInt32)p[3] << 16)) & hashMask) +/* DEF_GetHeads(5, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5) ^ (crc[p[4]] << 3)) & hashMask) */ + +static void HashThreadFunc(CMatchFinderMt *mt) +{ + CMtSync *p = &mt->hashSync; + for (;;) + { + UInt32 numProcessedBlocks = 0; + Event_Wait(&p->canStart); + Event_Set(&p->wasStarted); + + MatchFinder_Init_HighHash(mt->MatchFinder); + + for (;;) + { + if (p->exit) + return; + if (p->stopWriting) + { + p->numProcessedBlocks = numProcessedBlocks; + Event_Set(&p->wasStopped); + break; + } + + { + CMatchFinder *mf = mt->MatchFinder; + if (MatchFinder_NeedMove(mf)) + { + CriticalSection_Enter(&mt->btSync.cs); + CriticalSection_Enter(&mt->hashSync.cs); + { + const Byte *beforePtr = Inline_MatchFinder_GetPointerToCurrentPos(mf); + ptrdiff_t offset; + MatchFinder_MoveBlock(mf); + offset = beforePtr - Inline_MatchFinder_GetPointerToCurrentPos(mf); + mt->pointerToCurPos -= offset; + mt->buffer -= offset; + } + CriticalSection_Leave(&mt->btSync.cs); + CriticalSection_Leave(&mt->hashSync.cs); + continue; + } + + Semaphore_Wait(&p->freeSemaphore); + + MatchFinder_ReadIfRequired(mf); + if (mf->pos > (kMtMaxValForNormalize - kMtHashBlockSize)) + { + UInt32 subValue = (mf->pos - mf->historySize - 1); + MatchFinder_ReduceOffsets(mf, subValue); + MatchFinder_Normalize3(subValue, mf->hash + mf->fixedHashSize, (size_t)mf->hashMask + 1); + } + { + UInt32 *heads = mt->hashBuf + ((numProcessedBlocks++) & kMtHashNumBlocksMask) * kMtHashBlockSize; + UInt32 num = mf->streamPos - mf->pos; + heads[0] = 2; + heads[1] = num; + if (num >= mf->numHashBytes) + { + num = num - mf->numHashBytes + 1; + if (num > kMtHashBlockSize - 2) + num = kMtHashBlockSize - 2; + mt->GetHeadsFunc(mf->buffer, mf->pos, mf->hash + mf->fixedHashSize, mf->hashMask, heads + 2, num, mf->crc); + heads[0] = 2 + num; + } + mf->pos += num; + mf->buffer += num; + } + } + + Semaphore_Release1(&p->filledSemaphore); + } + } +} + +static void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p) +{ + MtSync_GetNextBlock(&p->hashSync); + p->hashBufPosLimit = p->hashBufPos = ((p->hashSync.numProcessedBlocks - 1) & kMtHashNumBlocksMask) * kMtHashBlockSize; + p->hashBufPosLimit += p->hashBuf[p->hashBufPos++]; + p->hashNumAvail = p->hashBuf[p->hashBufPos++]; +} + +#define kEmptyHashValue 0 + +#define MFMT_GM_INLINE + +#ifdef MFMT_GM_INLINE + +/* + we use size_t for _cyclicBufferPos instead of UInt32 + to eliminate "movsx" BUG in old MSVC x64 compiler. +*/ + +MY_NO_INLINE +static UInt32 *GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CLzRef *son, + size_t _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *distances, UInt32 _maxLen, const UInt32 *hash, const UInt32 *limit, UInt32 size, UInt32 *posRes) +{ + do + { + UInt32 *_distances = ++distances; + UInt32 delta = *hash++; + + CLzRef *ptr0 = son + ((size_t)_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + ((size_t)_cyclicBufferPos << 1); + unsigned len0 = 0, len1 = 0; + UInt32 cutValue = _cutValue; + unsigned maxLen = (unsigned)_maxLen; + + /* + if (size > 1) + { + UInt32 delta = *hash; + if (delta < _cyclicBufferSize) + { + UInt32 cyc1 = _cyclicBufferPos + 1; + CLzRef *pair = son + ((size_t)(cyc1 - delta + ((delta > cyc1) ? _cyclicBufferSize : 0)) << 1); + Byte b = *(cur + 1 - delta); + _distances[0] = pair[0]; + _distances[1] = b; + } + } + */ + if (cutValue == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + } + else + for(;;) + { + { + CLzRef *pair = son + ((size_t)(_cyclicBufferPos - delta + ((_cyclicBufferPos < delta) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + unsigned len = (len0 < len1 ? len0 : len1); + UInt32 pair0 = *pair; + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + maxLen = len; + *distances++ = (UInt32)len; + *distances++ = delta - 1; + if (len == lenLimit) + { + UInt32 pair1 = pair[1]; + *ptr1 = pair0; + *ptr0 = pair1; + break; + } + } + } + { + UInt32 curMatch = pos - delta; + // delta = pos - *pair; + // delta = pos - pair[((UInt32)pb[len] - (UInt32)cur[len]) >> 31]; + if (pb[len] < cur[len]) + { + delta = pos - pair[1]; + *ptr1 = curMatch; + ptr1 = pair + 1; + len1 = len; + } + else + { + delta = pos - *pair; + *ptr0 = curMatch; + ptr0 = pair; + len0 = len; + } + } + } + if (--cutValue == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + break; + } + } + pos++; + _cyclicBufferPos++; + cur++; + { + UInt32 num = (UInt32)(distances - _distances); + _distances[-1] = num; + } + } + while (distances < limit && --size != 0); + *posRes = pos; + return distances; +} + +#endif + + + +static void BtGetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + UInt32 numProcessed = 0; + UInt32 curPos = 2; + UInt32 limit = kMtBtBlockSize - (p->matchMaxLen * 2); // * 2 + + distances[1] = p->hashNumAvail; + + while (curPos < limit) + { + if (p->hashBufPos == p->hashBufPosLimit) + { + MatchFinderMt_GetNextBlock_Hash(p); + distances[1] = numProcessed + p->hashNumAvail; + if (p->hashNumAvail >= p->numHashBytes) + continue; + distances[0] = curPos + p->hashNumAvail; + distances += curPos; + for (; p->hashNumAvail != 0; p->hashNumAvail--) + *distances++ = 0; + return; + } + { + UInt32 size = p->hashBufPosLimit - p->hashBufPos; + UInt32 lenLimit = p->matchMaxLen; + UInt32 pos = p->pos; + UInt32 cyclicBufferPos = p->cyclicBufferPos; + if (lenLimit >= p->hashNumAvail) + lenLimit = p->hashNumAvail; + { + UInt32 size2 = p->hashNumAvail - lenLimit + 1; + if (size2 < size) + size = size2; + size2 = p->cyclicBufferSize - cyclicBufferPos; + if (size2 < size) + size = size2; + } + + #ifndef MFMT_GM_INLINE + while (curPos < limit && size-- != 0) + { + UInt32 *startDistances = distances + curPos; + UInt32 num = (UInt32)(GetMatchesSpec1(lenLimit, pos - p->hashBuf[p->hashBufPos++], + pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue, + startDistances + 1, p->numHashBytes - 1) - startDistances); + *startDistances = num - 1; + curPos += num; + cyclicBufferPos++; + pos++; + p->buffer++; + } + #else + { + UInt32 posRes; + curPos = (UInt32)(GetMatchesSpecN(lenLimit, pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue, + distances + curPos, p->numHashBytes - 1, p->hashBuf + p->hashBufPos, + distances + limit, + size, &posRes) - distances); + p->hashBufPos += posRes - pos; + cyclicBufferPos += posRes - pos; + p->buffer += posRes - pos; + pos = posRes; + } + #endif + + numProcessed += pos - p->pos; + p->hashNumAvail -= pos - p->pos; + p->pos = pos; + if (cyclicBufferPos == p->cyclicBufferSize) + cyclicBufferPos = 0; + p->cyclicBufferPos = cyclicBufferPos; + } + } + + distances[0] = curPos; +} + +static void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex) +{ + CMtSync *sync = &p->hashSync; + if (!sync->needStart) + { + CriticalSection_Enter(&sync->cs); + sync->csWasEntered = True; + } + + BtGetMatches(p, p->btBuf + (globalBlockIndex & kMtBtNumBlocksMask) * kMtBtBlockSize); + + if (p->pos > kMtMaxValForNormalize - kMtBtBlockSize) + { + UInt32 subValue = p->pos - p->cyclicBufferSize; + MatchFinder_Normalize3(subValue, p->son, (size_t)p->cyclicBufferSize * 2); + p->pos -= subValue; + } + + if (!sync->needStart) + { + CriticalSection_Leave(&sync->cs); + sync->csWasEntered = False; + } +} + +void BtThreadFunc(CMatchFinderMt *mt) +{ + CMtSync *p = &mt->btSync; + for (;;) + { + UInt32 blockIndex = 0; + Event_Wait(&p->canStart); + Event_Set(&p->wasStarted); + for (;;) + { + if (p->exit) + return; + if (p->stopWriting) + { + p->numProcessedBlocks = blockIndex; + MtSync_StopWriting(&mt->hashSync); + Event_Set(&p->wasStopped); + break; + } + Semaphore_Wait(&p->freeSemaphore); + BtFillBlock(mt, blockIndex++); + Semaphore_Release1(&p->filledSemaphore); + } + } +} + +void MatchFinderMt_Construct(CMatchFinderMt *p) +{ + p->hashBuf = NULL; + MtSync_Construct(&p->hashSync); + MtSync_Construct(&p->btSync); +} + +static void MatchFinderMt_FreeMem(CMatchFinderMt *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->hashBuf); + p->hashBuf = NULL; +} + +void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAllocPtr alloc) +{ + MtSync_Destruct(&p->hashSync); + MtSync_Destruct(&p->btSync); + MatchFinderMt_FreeMem(p, alloc); +} + +#define kHashBufferSize (kMtHashBlockSize * kMtHashNumBlocks) +#define kBtBufferSize (kMtBtBlockSize * kMtBtNumBlocks) + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; } +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE BtThreadFunc2(void *p) +{ + Byte allocaDummy[0x180]; + unsigned i = 0; + for (i = 0; i < 16; i++) + allocaDummy[i] = (Byte)0; + if (allocaDummy[0] == 0) + BtThreadFunc((CMatchFinderMt *)p); + return 0; +} + +SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore, + UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAllocPtr alloc) +{ + CMatchFinder *mf = p->MatchFinder; + p->historySize = historySize; + if (kMtBtBlockSize <= matchMaxLen * 4) + return SZ_ERROR_PARAM; + if (!p->hashBuf) + { + p->hashBuf = (UInt32 *)ISzAlloc_Alloc(alloc, (kHashBufferSize + kBtBufferSize) * sizeof(UInt32)); + if (!p->hashBuf) + return SZ_ERROR_MEM; + p->btBuf = p->hashBuf + kHashBufferSize; + } + keepAddBufferBefore += (kHashBufferSize + kBtBufferSize); + keepAddBufferAfter += kMtHashBlockSize; + if (!MatchFinder_Create(mf, historySize, keepAddBufferBefore, matchMaxLen, keepAddBufferAfter, alloc)) + return SZ_ERROR_MEM; + + RINOK(MtSync_Create(&p->hashSync, HashThreadFunc2, p, kMtHashNumBlocks)); + RINOK(MtSync_Create(&p->btSync, BtThreadFunc2, p, kMtBtNumBlocks)); + return SZ_OK; +} + +/* Call it after ReleaseStream / SetStream */ +static void MatchFinderMt_Init(CMatchFinderMt *p) +{ + CMatchFinder *mf = p->MatchFinder; + + p->btBufPos = + p->btBufPosLimit = 0; + p->hashBufPos = + p->hashBufPosLimit = 0; + + /* Init without data reading. We don't want to read data in this thread */ + MatchFinder_Init_3(mf, False); + MatchFinder_Init_LowHash(mf); + + p->pointerToCurPos = Inline_MatchFinder_GetPointerToCurrentPos(mf); + p->btNumAvailBytes = 0; + p->lzPos = p->historySize + 1; + + p->hash = mf->hash; + p->fixedHashSize = mf->fixedHashSize; + p->crc = mf->crc; + + p->son = mf->son; + p->matchMaxLen = mf->matchMaxLen; + p->numHashBytes = mf->numHashBytes; + p->pos = mf->pos; + p->buffer = mf->buffer; + p->cyclicBufferPos = mf->cyclicBufferPos; + p->cyclicBufferSize = mf->cyclicBufferSize; + p->cutValue = mf->cutValue; +} + +/* ReleaseStream is required to finish multithreading */ +void MatchFinderMt_ReleaseStream(CMatchFinderMt *p) +{ + MtSync_StopWriting(&p->btSync); + /* p->MatchFinder->ReleaseStream(); */ +} + +static void MatchFinderMt_Normalize(CMatchFinderMt *p) +{ + MatchFinder_Normalize3(p->lzPos - p->historySize - 1, p->hash, p->fixedHashSize); + p->lzPos = p->historySize + 1; +} + +static void MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p) +{ + UInt32 blockIndex; + MtSync_GetNextBlock(&p->btSync); + blockIndex = ((p->btSync.numProcessedBlocks - 1) & kMtBtNumBlocksMask); + p->btBufPosLimit = p->btBufPos = blockIndex * kMtBtBlockSize; + p->btBufPosLimit += p->btBuf[p->btBufPos++]; + p->btNumAvailBytes = p->btBuf[p->btBufPos++]; + if (p->lzPos >= kMtMaxValForNormalize - kMtBtBlockSize) + MatchFinderMt_Normalize(p); +} + +static const Byte * MatchFinderMt_GetPointerToCurrentPos(CMatchFinderMt *p) +{ + return p->pointerToCurPos; +} + +#define GET_NEXT_BLOCK_IF_REQUIRED if (p->btBufPos == p->btBufPosLimit) MatchFinderMt_GetNextBlock_Bt(p); + +static UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p) +{ + GET_NEXT_BLOCK_IF_REQUIRED; + return p->btNumAvailBytes; +} + +static UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 h2, curMatch2; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH2_CALC + + curMatch2 = hash[h2]; + hash[h2] = lzPos; + + if (curMatch2 >= matchMinPos) + if (cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + *distances++ = 2; + *distances++ = lzPos - curMatch2 - 1; + } + + return distances; +} + +static UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 h2, h3, curMatch2, curMatch3; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH3_CALC + + curMatch2 = hash[ h2]; + curMatch3 = (hash + kFix3HashSize)[h3]; + + hash[ h2] = lzPos; + (hash + kFix3HashSize)[h3] = lzPos; + + if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch2 - 1; + if (cur[(ptrdiff_t)curMatch2 - lzPos + 2] == cur[2]) + { + distances[0] = 3; + return distances + 2; + } + distances[0] = 2; + distances += 2; + } + + if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0]) + { + *distances++ = 3; + *distances++ = lzPos - curMatch3 - 1; + } + + return distances; +} + +/* +static UInt32 *MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 h2, h3, h4, curMatch2, curMatch3, curMatch4; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH4_CALC + + curMatch2 = hash[ h2]; + curMatch3 = (hash + kFix3HashSize)[h3]; + curMatch4 = (hash + kFix4HashSize)[h4]; + + hash[ h2] = lzPos; + (hash + kFix3HashSize)[h3] = lzPos; + (hash + kFix4HashSize)[h4] = lzPos; + + if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch2 - 1; + if (cur[(ptrdiff_t)curMatch2 - lzPos + 2] == cur[2]) + { + distances[0] = (cur[(ptrdiff_t)curMatch2 - lzPos + 3] == cur[3]) ? 4 : 3; + return distances + 2; + } + distances[0] = 2; + distances += 2; + } + + if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch3 - 1; + if (cur[(ptrdiff_t)curMatch3 - lzPos + 3] == cur[3]) + { + distances[0] = 4; + return distances + 2; + } + distances[0] = 3; + distances += 2; + } + + if (curMatch4 >= matchMinPos) + if ( + cur[(ptrdiff_t)curMatch4 - lzPos] == cur[0] && + cur[(ptrdiff_t)curMatch4 - lzPos + 3] == cur[3] + ) + { + *distances++ = 4; + *distances++ = lzPos - curMatch4 - 1; + } + + return distances; +} +*/ + +#define INCREASE_LZ_POS p->lzPos++; p->pointerToCurPos++; + +static UInt32 MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + const UInt32 *btBuf = p->btBuf + p->btBufPos; + UInt32 len = *btBuf++; + p->btBufPos += 1 + len; + p->btNumAvailBytes--; + { + UInt32 i; + for (i = 0; i < len; i += 2) + { + UInt32 v0 = btBuf[0]; + UInt32 v1 = btBuf[1]; + btBuf += 2; + distances[0] = v0; + distances[1] = v1; + distances += 2; + } + } + INCREASE_LZ_POS + return len; +} + +static UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + const UInt32 *btBuf = p->btBuf + p->btBufPos; + UInt32 len = *btBuf++; + p->btBufPos += 1 + len; + + if (len == 0) + { + /* change for bt5 ! */ + if (p->btNumAvailBytes-- >= 4) + len = (UInt32)(p->MixMatchesFunc(p, p->lzPos - p->historySize, distances) - (distances)); + } + else + { + /* Condition: there are matches in btBuf with length < p->numHashBytes */ + UInt32 *distances2; + p->btNumAvailBytes--; + distances2 = p->MixMatchesFunc(p, p->lzPos - btBuf[1], distances); + do + { + UInt32 v0 = btBuf[0]; + UInt32 v1 = btBuf[1]; + btBuf += 2; + distances2[0] = v0; + distances2[1] = v1; + distances2 += 2; + } + while ((len -= 2) != 0); + len = (UInt32)(distances2 - (distances)); + } + INCREASE_LZ_POS + return len; +} + +#define SKIP_HEADER2_MT do { GET_NEXT_BLOCK_IF_REQUIRED +#define SKIP_HEADER_MT(n) SKIP_HEADER2_MT if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash; +#define SKIP_FOOTER_MT } INCREASE_LZ_POS p->btBufPos += p->btBuf[p->btBufPos] + 1; } while (--num != 0); + +static void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER2_MT { p->btNumAvailBytes--; + SKIP_FOOTER_MT +} + +static void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(2) + UInt32 h2; + MT_HASH2_CALC + hash[h2] = p->lzPos; + SKIP_FOOTER_MT +} + +static void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(3) + UInt32 h2, h3; + MT_HASH3_CALC + (hash + kFix3HashSize)[h3] = + hash[ h2] = + p->lzPos; + SKIP_FOOTER_MT +} + +/* +static void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(4) + UInt32 h2, h3, h4; + MT_HASH4_CALC + (hash + kFix4HashSize)[h4] = + (hash + kFix3HashSize)[h3] = + hash[ h2] = + p->lzPos; + SKIP_FOOTER_MT +} +*/ + +void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinderMt_Init; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinderMt_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinderMt_GetPointerToCurrentPos; + vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt_GetMatches; + + switch (p->MatchFinder->numHashBytes) + { + case 2: + p->GetHeadsFunc = GetHeads2; + p->MixMatchesFunc = (Mf_Mix_Matches)NULL; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt0_Skip; + vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt2_GetMatches; + break; + case 3: + p->GetHeadsFunc = GetHeads3; + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches2; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt2_Skip; + break; + default: + /* case 4: */ + p->GetHeadsFunc = p->MatchFinder->bigHash ? GetHeads4b : GetHeads4; + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches3; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt3_Skip; + break; + /* + default: + p->GetHeadsFunc = GetHeads5; + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches4; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt4_Skip; + break; + */ + } +} diff --git a/bsnes/lzma/LzFindMt.h b/bsnes/lzma/LzFindMt.h new file mode 100644 index 00000000..fdd17008 --- /dev/null +++ b/bsnes/lzma/LzFindMt.h @@ -0,0 +1,101 @@ +/* LzFindMt.h -- multithreaded Match finder for LZ algorithms +2018-07-04 : Igor Pavlov : Public domain */ + +#ifndef __LZ_FIND_MT_H +#define __LZ_FIND_MT_H + +#include "LzFind.h" +#include "Threads.h" + +EXTERN_C_BEGIN + +#define kMtHashBlockSize (1 << 13) +#define kMtHashNumBlocks (1 << 3) +#define kMtHashNumBlocksMask (kMtHashNumBlocks - 1) + +#define kMtBtBlockSize (1 << 14) +#define kMtBtNumBlocks (1 << 6) +#define kMtBtNumBlocksMask (kMtBtNumBlocks - 1) + +typedef struct _CMtSync +{ + BoolInt wasCreated; + BoolInt needStart; + BoolInt exit; + BoolInt stopWriting; + + CThread thread; + CAutoResetEvent canStart; + CAutoResetEvent wasStarted; + CAutoResetEvent wasStopped; + CSemaphore freeSemaphore; + CSemaphore filledSemaphore; + BoolInt csWasInitialized; + BoolInt csWasEntered; + CCriticalSection cs; + UInt32 numProcessedBlocks; +} CMtSync; + +typedef UInt32 * (*Mf_Mix_Matches)(void *p, UInt32 matchMinPos, UInt32 *distances); + +/* kMtCacheLineDummy must be >= size_of_CPU_cache_line */ +#define kMtCacheLineDummy 128 + +typedef void (*Mf_GetHeads)(const Byte *buffer, UInt32 pos, + UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc); + +typedef struct _CMatchFinderMt +{ + /* LZ */ + const Byte *pointerToCurPos; + UInt32 *btBuf; + UInt32 btBufPos; + UInt32 btBufPosLimit; + UInt32 lzPos; + UInt32 btNumAvailBytes; + + UInt32 *hash; + UInt32 fixedHashSize; + UInt32 historySize; + const UInt32 *crc; + + Mf_Mix_Matches MixMatchesFunc; + + /* LZ + BT */ + CMtSync btSync; + Byte btDummy[kMtCacheLineDummy]; + + /* BT */ + UInt32 *hashBuf; + UInt32 hashBufPos; + UInt32 hashBufPosLimit; + UInt32 hashNumAvail; + + CLzRef *son; + UInt32 matchMaxLen; + UInt32 numHashBytes; + UInt32 pos; + const Byte *buffer; + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be historySize + 1 */ + UInt32 cutValue; + + /* BT + Hash */ + CMtSync hashSync; + /* Byte hashDummy[kMtCacheLineDummy]; */ + + /* Hash */ + Mf_GetHeads GetHeadsFunc; + CMatchFinder *MatchFinder; +} CMatchFinderMt; + +void MatchFinderMt_Construct(CMatchFinderMt *p); +void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAllocPtr alloc); +SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore, + UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAllocPtr alloc); +void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable); +void MatchFinderMt_ReleaseStream(CMatchFinderMt *p); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/LzHash.h b/bsnes/lzma/LzHash.h new file mode 100644 index 00000000..21914440 --- /dev/null +++ b/bsnes/lzma/LzHash.h @@ -0,0 +1,57 @@ +/* LzHash.h -- HASH functions for LZ algorithms +2015-04-12 : Igor Pavlov : Public domain */ + +#ifndef __LZ_HASH_H +#define __LZ_HASH_H + +#define kHash2Size (1 << 10) +#define kHash3Size (1 << 16) +#define kHash4Size (1 << 20) + +#define kFix3HashSize (kHash2Size) +#define kFix4HashSize (kHash2Size + kHash3Size) +#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) + +#define HASH2_CALC hv = cur[0] | ((UInt32)cur[1] << 8); + +#define HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + hv = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } + +#define HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + hv = (temp ^ (p->crc[cur[3]] << 5)) & p->hashMask; } + +#define HASH5_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + temp ^= (p->crc[cur[3]] << 5); \ + h4 = temp & (kHash4Size - 1); \ + hv = (temp ^ (p->crc[cur[4]] << 3)) & p->hashMask; } + +/* #define HASH_ZIP_CALC hv = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ +#define HASH_ZIP_CALC hv = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; + + +#define MT_HASH2_CALC \ + h2 = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); + +#define MT_HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + h3 = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } + +#define MT_HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + h2 = temp & (kHash2Size - 1); \ + temp ^= ((UInt32)cur[2] << 8); \ + h3 = temp & (kHash3Size - 1); \ + h4 = (temp ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } + +#endif diff --git a/bsnes/lzma/Lzma2Dec.c b/bsnes/lzma/Lzma2Dec.c new file mode 100644 index 00000000..2e631051 --- /dev/null +++ b/bsnes/lzma/Lzma2Dec.c @@ -0,0 +1,488 @@ +/* Lzma2Dec.c -- LZMA2 Decoder +2019-02-02 : Igor Pavlov : Public domain */ + +/* #define SHOW_DEBUG_INFO */ + +#include "Precomp.h" + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#include + +#include "Lzma2Dec.h" + +/* +00000000 - End of data +00000001 U U - Uncompressed, reset dic, need reset state and set new prop +00000010 U U - Uncompressed, no reset +100uuuuu U U P P - LZMA, no reset +101uuuuu U U P P - LZMA, reset state +110uuuuu U U P P S - LZMA, reset state + set new prop +111uuuuu U U P P S - LZMA, reset state + set new prop, reset dic + + u, U - Unpack Size + P - Pack Size + S - Props +*/ + +#define LZMA2_CONTROL_COPY_RESET_DIC 1 + +#define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & (1 << 7)) == 0) + +#define LZMA2_LCLP_MAX 4 +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +typedef enum +{ + LZMA2_STATE_CONTROL, + LZMA2_STATE_UNPACK0, + LZMA2_STATE_UNPACK1, + LZMA2_STATE_PACK0, + LZMA2_STATE_PACK1, + LZMA2_STATE_PROP, + LZMA2_STATE_DATA, + LZMA2_STATE_DATA_CONT, + LZMA2_STATE_FINISHED, + LZMA2_STATE_ERROR +} ELzma2State; + +static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) +{ + UInt32 dicSize; + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); + props[0] = (Byte)LZMA2_LCLP_MAX; + props[1] = (Byte)(dicSize); + props[2] = (Byte)(dicSize >> 8); + props[3] = (Byte)(dicSize >> 16); + props[4] = (Byte)(dicSize >> 24); + return SZ_OK; +} + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +void Lzma2Dec_Init(CLzma2Dec *p) +{ + p->state = LZMA2_STATE_CONTROL; + p->needInitLevel = 0xE0; + p->isExtraMode = False; + p->unpackSize = 0; + + // p->decoder.dicPos = 0; // we can use it instead of full init + LzmaDec_Init(&p->decoder); +} + +static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) +{ + switch (p->state) + { + case LZMA2_STATE_CONTROL: + p->isExtraMode = False; + p->control = b; + PRF(printf("\n %8X", (unsigned)p->decoder.dicPos)); + PRF(printf(" %02X", (unsigned)b)); + if (b == 0) + return LZMA2_STATE_FINISHED; + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (b == LZMA2_CONTROL_COPY_RESET_DIC) + p->needInitLevel = 0xC0; + else if (b > 2 || p->needInitLevel == 0xE0) + return LZMA2_STATE_ERROR; + } + else + { + if (b < p->needInitLevel) + return LZMA2_STATE_ERROR; + p->needInitLevel = 0; + p->unpackSize = (UInt32)(b & 0x1F) << 16; + } + return LZMA2_STATE_UNPACK0; + + case LZMA2_STATE_UNPACK0: + p->unpackSize |= (UInt32)b << 8; + return LZMA2_STATE_UNPACK1; + + case LZMA2_STATE_UNPACK1: + p->unpackSize |= (UInt32)b; + p->unpackSize++; + PRF(printf(" %7u", (unsigned)p->unpackSize)); + return LZMA2_IS_UNCOMPRESSED_STATE(p) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; + + case LZMA2_STATE_PACK0: + p->packSize = (UInt32)b << 8; + return LZMA2_STATE_PACK1; + + case LZMA2_STATE_PACK1: + p->packSize |= (UInt32)b; + p->packSize++; + // if (p->packSize < 5) return LZMA2_STATE_ERROR; + PRF(printf(" %5u", (unsigned)p->packSize)); + return (p->control & 0x40) ? LZMA2_STATE_PROP : LZMA2_STATE_DATA; + + case LZMA2_STATE_PROP: + { + unsigned lc, lp; + if (b >= (9 * 5 * 5)) + return LZMA2_STATE_ERROR; + lc = b % 9; + b /= 9; + p->decoder.prop.pb = (Byte)(b / 5); + lp = b % 5; + if (lc + lp > LZMA2_LCLP_MAX) + return LZMA2_STATE_ERROR; + p->decoder.prop.lc = (Byte)lc; + p->decoder.prop.lp = (Byte)lp; + return LZMA2_STATE_DATA; + } + } + return LZMA2_STATE_ERROR; +} + +static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) +{ + memcpy(p->dic + p->dicPos, src, size); + p->dicPos += size; + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) + p->checkDicSize = p->prop.dicSize; + p->processedPos += (UInt32)size; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState); + + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->state != LZMA2_STATE_ERROR) + { + SizeT dicPos; + + if (p->state == LZMA2_STATE_FINISHED) + { + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + } + + dicPos = p->decoder.dicPos; + + if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->state = Lzma2Dec_UpdateState(p, *src++); + if (dicPos == dicLimit && p->state != LZMA2_STATE_FINISHED) + break; + continue; + } + + { + SizeT inCur = inSize - *srcLen; + SizeT outCur = dicLimit - dicPos; + ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; + + if (outCur >= p->unpackSize) + { + outCur = (SizeT)p->unpackSize; + curFinishMode = LZMA_FINISH_END; + } + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (inCur == 0) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + if (p->state == LZMA2_STATE_DATA) + { + BoolInt initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); + LzmaDec_InitDicAndState(&p->decoder, initDic, False); + } + + if (inCur > outCur) + inCur = outCur; + if (inCur == 0) + break; + + LzmaDec_UpdateWithUncompressed(&p->decoder, src, inCur); + + src += inCur; + *srcLen += inCur; + p->unpackSize -= (UInt32)inCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + SRes res; + + if (p->state == LZMA2_STATE_DATA) + { + BoolInt initDic = (p->control >= 0xE0); + BoolInt initState = (p->control >= 0xA0); + LzmaDec_InitDicAndState(&p->decoder, initDic, initState); + p->state = LZMA2_STATE_DATA_CONT; + } + + if (inCur > p->packSize) + inCur = (SizeT)p->packSize; + + res = LzmaDec_DecodeToDic(&p->decoder, dicPos + outCur, src, &inCur, curFinishMode, status); + + src += inCur; + *srcLen += inCur; + p->packSize -= (UInt32)inCur; + outCur = p->decoder.dicPos - dicPos; + p->unpackSize -= (UInt32)outCur; + + if (res != 0) + break; + + if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (p->packSize == 0) + break; + return SZ_OK; + } + + if (inCur == 0 && outCur == 0) + { + if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + || p->unpackSize != 0 + || p->packSize != 0) + break; + p->state = LZMA2_STATE_CONTROL; + } + + *status = LZMA_STATUS_NOT_SPECIFIED; + } + } + } + + *status = LZMA_STATUS_NOT_SPECIFIED; + p->state = LZMA2_STATE_ERROR; + return SZ_ERROR_DATA; +} + + + + +ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, + SizeT outSize, + const Byte *src, SizeT *srcLen, + int checkFinishBlock) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + + while (p->state != LZMA2_STATE_ERROR) + { + if (p->state == LZMA2_STATE_FINISHED) + return (ELzma2ParseStatus)LZMA_STATUS_FINISHED_WITH_MARK; + + if (outSize == 0 && !checkFinishBlock) + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + (*srcLen)++; + + p->state = Lzma2Dec_UpdateState(p, *src++); + + if (p->state == LZMA2_STATE_UNPACK0) + { + // if (p->decoder.dicPos != 0) + if (p->control == LZMA2_CONTROL_COPY_RESET_DIC || p->control >= 0xE0) + return LZMA2_PARSE_STATUS_NEW_BLOCK; + // if (outSize == 0) return LZMA_STATUS_NOT_FINISHED; + } + + // The following code can be commented. + // It's not big problem, if we read additional input bytes. + // It will be stopped later in LZMA2_STATE_DATA / LZMA2_STATE_DATA_CONT state. + + if (outSize == 0 && p->state != LZMA2_STATE_FINISHED) + { + // checkFinishBlock is true. So we expect that block must be finished, + // We can return LZMA_STATUS_NOT_SPECIFIED or LZMA_STATUS_NOT_FINISHED here + // break; + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + } + + if (p->state == LZMA2_STATE_DATA) + return LZMA2_PARSE_STATUS_NEW_CHUNK; + + continue; + } + + if (outSize == 0) + return (ELzma2ParseStatus)LZMA_STATUS_NOT_FINISHED; + + { + SizeT inCur = inSize - *srcLen; + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (inCur == 0) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + if (inCur > p->unpackSize) + inCur = p->unpackSize; + if (inCur > outSize) + inCur = outSize; + p->decoder.dicPos += inCur; + src += inCur; + *srcLen += inCur; + outSize -= inCur; + p->unpackSize -= (UInt32)inCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + p->isExtraMode = True; + + if (inCur == 0) + { + if (p->packSize != 0) + return (ELzma2ParseStatus)LZMA_STATUS_NEEDS_MORE_INPUT; + } + else if (p->state == LZMA2_STATE_DATA) + { + p->state = LZMA2_STATE_DATA_CONT; + if (*src != 0) + { + // first byte of lzma chunk must be Zero + *srcLen += 1; + p->packSize--; + break; + } + } + + if (inCur > p->packSize) + inCur = (SizeT)p->packSize; + + src += inCur; + *srcLen += inCur; + p->packSize -= (UInt32)inCur; + + if (p->packSize == 0) + { + SizeT rem = outSize; + if (rem > p->unpackSize) + rem = p->unpackSize; + p->decoder.dicPos += rem; + p->unpackSize -= (UInt32)rem; + outSize -= rem; + if (p->unpackSize == 0) + p->state = LZMA2_STATE_CONTROL; + } + } + } + } + + p->state = LZMA2_STATE_ERROR; + return (ELzma2ParseStatus)LZMA_STATUS_NOT_SPECIFIED; +} + + + + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen, inSize = *srcLen; + *srcLen = *destLen = 0; + + for (;;) + { + SizeT inCur = inSize, outCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + + if (p->decoder.dicPos == p->decoder.dicBufSize) + p->decoder.dicPos = 0; + dicPos = p->decoder.dicPos; + curFinishMode = LZMA_FINISH_ANY; + outCur = p->decoder.dicBufSize - dicPos; + + if (outCur >= outSize) + { + outCur = outSize; + curFinishMode = finishMode; + } + + res = Lzma2Dec_DecodeToDic(p, dicPos + outCur, src, &inCur, curFinishMode, status); + + src += inCur; + inSize -= inCur; + *srcLen += inCur; + outCur = p->decoder.dicPos - dicPos; + memcpy(dest, p->decoder.dic + dicPos, outCur); + dest += outCur; + outSize -= outCur; + *destLen += outCur; + if (res != 0) + return res; + if (outCur == 0 || outSize == 0) + return SZ_OK; + } +} + + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc) +{ + CLzma2Dec p; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + Lzma2Dec_Construct(&p); + RINOK(Lzma2Dec_AllocateProbs(&p, prop, alloc)); + p.decoder.dic = dest; + p.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&p); + *srcLen = inSize; + res = Lzma2Dec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + *destLen = p.decoder.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + Lzma2Dec_FreeProbs(&p, alloc); + return res; +} diff --git a/bsnes/lzma/Lzma2Dec.h b/bsnes/lzma/Lzma2Dec.h new file mode 100644 index 00000000..da503872 --- /dev/null +++ b/bsnes/lzma/Lzma2Dec.h @@ -0,0 +1,120 @@ +/* Lzma2Dec.h -- LZMA2 Decoder +2018-02-19 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_H +#define __LZMA2_DEC_H + +#include "LzmaDec.h" + +EXTERN_C_BEGIN + +/* ---------- State Interface ---------- */ + +typedef struct +{ + unsigned state; + Byte control; + Byte needInitLevel; + Byte isExtraMode; + Byte _pad_; + UInt32 packSize; + UInt32 unpackSize; + CLzmaDec decoder; +} CLzma2Dec; + +#define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) +#define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc) +#define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc) + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAllocPtr alloc); +void Lzma2Dec_Init(CLzma2Dec *p); + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen or dicLimit). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + SZ_ERROR_DATA - Data error +*/ + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- LZMA2 block and chunk parsing ---------- */ + +/* +Lzma2Dec_Parse() parses compressed data stream up to next independent block or next chunk data. +It can return LZMA_STATUS_* code or LZMA2_PARSE_STATUS_* code: + - LZMA2_PARSE_STATUS_NEW_BLOCK - there is new block, and 1 additional byte (control byte of next block header) was read from input. + - LZMA2_PARSE_STATUS_NEW_CHUNK - there is new chunk, and only lzma2 header of new chunk was read. + CLzma2Dec::unpackSize contains unpack size of that chunk +*/ + +typedef enum +{ +/* + LZMA_STATUS_NOT_SPECIFIED // data error + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED // + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK // unused +*/ + LZMA2_PARSE_STATUS_NEW_BLOCK = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + 1, + LZMA2_PARSE_STATUS_NEW_CHUNK +} ELzma2ParseStatus; + +ELzma2ParseStatus Lzma2Dec_Parse(CLzma2Dec *p, + SizeT outSize, // output size + const Byte *src, SizeT *srcLen, + int checkFinishBlock // set (checkFinishBlock = 1), if it must read full input data, if decoder.dicPos reaches blockMax position. + ); + +/* +LZMA2 parser doesn't decode LZMA chunks, so we must read + full input LZMA chunk to decode some part of LZMA chunk. + +Lzma2Dec_GetUnpackExtra() returns the value that shows + max possible number of output bytes that can be output by decoder + at current input positon. +*/ + +#define Lzma2Dec_GetUnpackExtra(p) ((p)->isExtraMode ? (p)->unpackSize : 0); + + +/* ---------- One Call Interface ---------- */ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Lzma2DecMt.c b/bsnes/lzma/Lzma2DecMt.c new file mode 100644 index 00000000..87d5567a --- /dev/null +++ b/bsnes/lzma/Lzma2DecMt.c @@ -0,0 +1,1082 @@ +/* Lzma2DecMt.c -- LZMA2 Decoder Multi-thread +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +// #define SHOW_DEBUG_INFO + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#define PRF_STR(s) PRF(printf("\n" s "\n")) +#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) +#define PRF_STR_INT_2(s, d1, d2) PRF(printf("\n" s " %d %d\n", (unsigned)d1, (unsigned)d2)) + +// #define _7ZIP_ST + +#include "Alloc.h" + +#include "Lzma2Dec.h" +#include "Lzma2DecMt.h" + +#ifndef _7ZIP_ST +#include "MtDec.h" +#endif + + +#define LZMA2DECMT_OUT_BLOCK_MAX_DEFAULT (1 << 28) + +void Lzma2DecMtProps_Init(CLzma2DecMtProps *p) +{ + p->inBufSize_ST = 1 << 20; + p->outStep_ST = 1 << 20; + + #ifndef _7ZIP_ST + p->numThreads = 1; + p->inBufSize_MT = 1 << 18; + p->outBlockMax = LZMA2DECMT_OUT_BLOCK_MAX_DEFAULT; + p->inBlockMax = p->outBlockMax + p->outBlockMax / 16; + #endif +} + + + +#ifndef _7ZIP_ST + +/* ---------- CLzma2DecMtThread ---------- */ + +typedef struct +{ + CLzma2Dec dec; + Byte dec_created; + Byte needInit; + + Byte *outBuf; + size_t outBufSize; + + EMtDecParseState state; + ELzma2ParseStatus parseStatus; + + size_t inPreSize; + size_t outPreSize; + + size_t inCodeSize; + size_t outCodeSize; + SRes codeRes; + + CAlignOffsetAlloc alloc; + + Byte mtPad[1 << 7]; +} CLzma2DecMtThread; + +#endif + + +/* ---------- CLzma2DecMt ---------- */ + +typedef struct +{ + // ISzAllocPtr alloc; + ISzAllocPtr allocMid; + + CAlignOffsetAlloc alignOffsetAlloc; + CLzma2DecMtProps props; + Byte prop; + + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + + BoolInt finishMode; + BoolInt outSize_Defined; + UInt64 outSize; + + UInt64 outProcessed; + UInt64 inProcessed; + BoolInt readWasFinished; + SRes readRes; + + Byte *inBuf; + size_t inBufSize; + Byte dec_created; + CLzma2Dec dec; + + size_t inPos; + size_t inLim; + + #ifndef _7ZIP_ST + UInt64 outProcessed_Parse; + BoolInt mtc_WasConstructed; + CMtDec mtc; + CLzma2DecMtThread coders[MTDEC__THREADS_MAX]; + #endif + +} CLzma2DecMt; + + + +CLzma2DecMtHandle Lzma2DecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid) +{ + CLzma2DecMt *p = (CLzma2DecMt *)ISzAlloc_Alloc(alloc, sizeof(CLzma2DecMt)); + if (!p) + return NULL; + + // p->alloc = alloc; + p->allocMid = allocMid; + + AlignOffsetAlloc_CreateVTable(&p->alignOffsetAlloc); + p->alignOffsetAlloc.numAlignBits = 7; + p->alignOffsetAlloc.offset = 0; + p->alignOffsetAlloc.baseAlloc = alloc; + + p->inBuf = NULL; + p->inBufSize = 0; + p->dec_created = False; + + // Lzma2DecMtProps_Init(&p->props); + + #ifndef _7ZIP_ST + p->mtc_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + t->dec_created = False; + t->outBuf = NULL; + t->outBufSize = 0; + } + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void Lzma2DecMt_FreeOutBufs(CLzma2DecMt *p) +{ + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + if (t->outBuf) + { + ISzAlloc_Free(p->allocMid, t->outBuf); + t->outBuf = NULL; + t->outBufSize = 0; + } + } +} + +#endif + + +static void Lzma2DecMt_FreeSt(CLzma2DecMt *p) +{ + if (p->dec_created) + { + Lzma2Dec_Free(&p->dec, &p->alignOffsetAlloc.vt); + p->dec_created = False; + } + if (p->inBuf) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBuf = NULL; + } + p->inBufSize = 0; +} + + +void Lzma2DecMt_Destroy(CLzma2DecMtHandle pp) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + + Lzma2DecMt_FreeSt(p); + + #ifndef _7ZIP_ST + + if (p->mtc_WasConstructed) + { + MtDec_Destruct(&p->mtc); + p->mtc_WasConstructed = False; + } + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CLzma2DecMtThread *t = &p->coders[i]; + if (t->dec_created) + { + // we don't need to free dict here + Lzma2Dec_FreeProbs(&t->dec, &t->alloc.vt); // p->alloc !!! + t->dec_created = False; + } + } + } + Lzma2DecMt_FreeOutBufs(p); + + #endif + + ISzAlloc_Free(p->alignOffsetAlloc.baseAlloc, pp); +} + + + +#ifndef _7ZIP_ST + +static void Lzma2DecMt_MtCallback_Parse(void *obj, unsigned coderIndex, CMtDecCallbackInfo *cc) +{ + CLzma2DecMt *me = (CLzma2DecMt *)obj; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + + PRF_STR_INT_2("Parse", coderIndex, cc->srcSize); + + cc->state = MTDEC_PARSE_CONTINUE; + + if (cc->startCall) + { + if (!t->dec_created) + { + Lzma2Dec_Construct(&t->dec); + t->dec_created = True; + AlignOffsetAlloc_CreateVTable(&t->alloc); + { + /* (1 << 12) is expected size of one way in data cache. + We optimize alignment for cache line size of 128 bytes and smaller */ + const unsigned kNumAlignBits = 12; + const unsigned kNumCacheLineBits = 7; /* <= kNumAlignBits */ + t->alloc.numAlignBits = kNumAlignBits; + t->alloc.offset = ((UInt32)coderIndex * ((1 << 11) + (1 << 8) + (1 << 6))) & ((1 << kNumAlignBits) - (1 << kNumCacheLineBits)); + t->alloc.baseAlloc = me->alignOffsetAlloc.baseAlloc; + } + } + Lzma2Dec_Init(&t->dec); + + t->inPreSize = 0; + t->outPreSize = 0; + // t->blockWasFinished = False; + // t->finishedWithMark = False; + t->parseStatus = (ELzma2ParseStatus)LZMA_STATUS_NOT_SPECIFIED; + t->state = MTDEC_PARSE_CONTINUE; + + t->inCodeSize = 0; + t->outCodeSize = 0; + t->codeRes = SZ_OK; + + // (cc->srcSize == 0) is allowed + } + + { + ELzma2ParseStatus status; + BoolInt overflow; + UInt32 unpackRem = 0; + + int checkFinishBlock = True; + size_t limit = me->props.outBlockMax; + if (me->outSize_Defined) + { + UInt64 rem = me->outSize - me->outProcessed_Parse; + if (limit >= rem) + { + limit = (size_t)rem; + if (!me->finishMode) + checkFinishBlock = False; + } + } + + // checkFinishBlock = False, if we want to decode partial data + // that must be finished at position <= outBlockMax. + + { + const SizeT srcOrig = cc->srcSize; + SizeT srcSize_Point = 0; + SizeT dicPos_Point = 0; + + cc->srcSize = 0; + overflow = False; + + for (;;) + { + SizeT srcCur = srcOrig - cc->srcSize; + + status = Lzma2Dec_Parse(&t->dec, + limit - t->dec.decoder.dicPos, + cc->src + cc->srcSize, &srcCur, + checkFinishBlock); + + cc->srcSize += srcCur; + + if (status == LZMA2_PARSE_STATUS_NEW_CHUNK) + { + if (t->dec.unpackSize > me->props.outBlockMax - t->dec.decoder.dicPos) + { + overflow = True; + break; + } + continue; + } + + if (status == LZMA2_PARSE_STATUS_NEW_BLOCK) + { + if (t->dec.decoder.dicPos == 0) + continue; + // we decode small blocks in one thread + if (t->dec.decoder.dicPos >= (1 << 14)) + break; + dicPos_Point = t->dec.decoder.dicPos; + srcSize_Point = cc->srcSize; + continue; + } + + if ((int)status == LZMA_STATUS_NOT_FINISHED && checkFinishBlock + // && limit == t->dec.decoder.dicPos + // && limit == me->props.outBlockMax + ) + { + overflow = True; + break; + } + + unpackRem = Lzma2Dec_GetUnpackExtra(&t->dec); + break; + } + + if (dicPos_Point != 0 + && (int)status != LZMA2_PARSE_STATUS_NEW_BLOCK + && (int)status != LZMA_STATUS_FINISHED_WITH_MARK + && (int)status != LZMA_STATUS_NOT_SPECIFIED) + { + // we revert to latest newBlock state + status = LZMA2_PARSE_STATUS_NEW_BLOCK; + unpackRem = 0; + t->dec.decoder.dicPos = dicPos_Point; + cc->srcSize = srcSize_Point; + overflow = False; + } + } + + t->inPreSize += cc->srcSize; + t->parseStatus = status; + + if (overflow) + cc->state = MTDEC_PARSE_OVERFLOW; + else + { + size_t dicPos = t->dec.decoder.dicPos; + + if ((int)status != LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (status == LZMA2_PARSE_STATUS_NEW_BLOCK) + { + cc->state = MTDEC_PARSE_NEW; + cc->srcSize--; // we don't need control byte of next block + t->inPreSize--; + } + else + { + cc->state = MTDEC_PARSE_END; + if ((int)status != LZMA_STATUS_FINISHED_WITH_MARK) + { + // (status == LZMA_STATUS_NOT_SPECIFIED) + // (status == LZMA_STATUS_NOT_FINISHED) + if (unpackRem != 0) + { + /* we also reserve space for max possible number of output bytes of current LZMA chunk */ + SizeT rem = limit - dicPos; + if (rem > unpackRem) + rem = unpackRem; + dicPos += rem; + } + } + } + + me->outProcessed_Parse += dicPos; + } + + cc->outPos = dicPos; + t->outPreSize = (size_t)dicPos; + } + + t->state = cc->state; + return; + } +} + + +static SRes Lzma2DecMt_MtCallback_PreCode(void *pp, unsigned coderIndex) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + Byte *dest = t->outBuf; + + if (t->inPreSize == 0) + { + t->codeRes = SZ_ERROR_DATA; + return t->codeRes; + } + + if (!dest || t->outBufSize < t->outPreSize) + { + if (dest) + { + ISzAlloc_Free(me->allocMid, dest); + t->outBuf = NULL; + t->outBufSize = 0; + } + + dest = (Byte *)ISzAlloc_Alloc(me->allocMid, t->outPreSize + // + (1 << 28) + ); + // Sleep(200); + if (!dest) + return SZ_ERROR_MEM; + t->outBuf = dest; + t->outBufSize = t->outPreSize; + } + + t->dec.decoder.dic = dest; + t->dec.decoder.dicBufSize = t->outPreSize; + + t->needInit = True; + + return Lzma2Dec_AllocateProbs(&t->dec, me->prop, &t->alloc.vt); // alloc.vt +} + + +static SRes Lzma2DecMt_MtCallback_Code(void *pp, unsigned coderIndex, + const Byte *src, size_t srcSize, int srcFinished, + // int finished, int blockFinished, + UInt64 *inCodePos, UInt64 *outCodePos, int *stop) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + CLzma2DecMtThread *t = &me->coders[coderIndex]; + + UNUSED_VAR(srcFinished) + + PRF_STR_INT_2("Code", coderIndex, srcSize); + + *inCodePos = t->inCodeSize; + *outCodePos = 0; + *stop = True; + + if (t->needInit) + { + Lzma2Dec_Init(&t->dec); + t->needInit = False; + } + + { + ELzmaStatus status; + size_t srcProcessed = srcSize; + BoolInt blockWasFinished = + ((int)t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + || t->parseStatus == LZMA2_PARSE_STATUS_NEW_BLOCK); + + SRes res = Lzma2Dec_DecodeToDic(&t->dec, + t->outPreSize, + src, &srcProcessed, + blockWasFinished ? LZMA_FINISH_END : LZMA_FINISH_ANY, + &status); + + t->codeRes = res; + + t->inCodeSize += srcProcessed; + *inCodePos = t->inCodeSize; + t->outCodeSize = t->dec.decoder.dicPos; + *outCodePos = t->dec.decoder.dicPos; + + if (res != SZ_OK) + return res; + + if (srcProcessed == srcSize) + *stop = False; + + if (blockWasFinished) + { + if (srcSize != srcProcessed) + return SZ_ERROR_FAIL; + + if (t->inPreSize == t->inCodeSize) + { + if (t->outPreSize != t->outCodeSize) + return SZ_ERROR_FAIL; + *stop = True; + } + } + else + { + if (t->outPreSize == t->outCodeSize) + *stop = True; + } + + return SZ_OK; + } +} + + +#define LZMA2DECMT_STREAM_WRITE_STEP (1 << 24) + +static SRes Lzma2DecMt_MtCallback_Write(void *pp, unsigned coderIndex, + BoolInt needWriteToStream, + const Byte *src, size_t srcSize, + BoolInt *needContinue, BoolInt *canRecode) +{ + CLzma2DecMt *me = (CLzma2DecMt *)pp; + const CLzma2DecMtThread *t = &me->coders[coderIndex]; + size_t size = t->outCodeSize; + const Byte *data = t->outBuf; + BoolInt needContinue2 = True; + + PRF_STR_INT_2("Write", coderIndex, srcSize); + + *needContinue = False; + *canRecode = True; + UNUSED_VAR(src) + UNUSED_VAR(srcSize) + + if ( + // t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + t->state == MTDEC_PARSE_OVERFLOW + || t->state == MTDEC_PARSE_END) + needContinue2 = False; + + + if (!needWriteToStream) + return SZ_OK; + + me->mtc.inProcessed += t->inCodeSize; + + if (t->codeRes == SZ_OK) + if ((int)t->parseStatus == LZMA_STATUS_FINISHED_WITH_MARK + || t->parseStatus == LZMA2_PARSE_STATUS_NEW_BLOCK) + if (t->outPreSize != t->outCodeSize + || t->inPreSize != t->inCodeSize) + return SZ_ERROR_FAIL; + + *canRecode = False; + + if (me->outStream) + { + for (;;) + { + size_t cur = size; + size_t written; + if (cur > LZMA2DECMT_STREAM_WRITE_STEP) + cur = LZMA2DECMT_STREAM_WRITE_STEP; + + written = ISeqOutStream_Write(me->outStream, data, cur); + + me->outProcessed += written; + // me->mtc.writtenTotal += written; + if (written != cur) + return SZ_ERROR_WRITE; + data += cur; + size -= cur; + if (size == 0) + { + *needContinue = needContinue2; + return SZ_OK; + } + RINOK(MtProgress_ProgressAdd(&me->mtc.mtProgress, 0, 0)); + } + } + + return SZ_ERROR_FAIL; + /* + if (size > me->outBufSize) + return SZ_ERROR_OUTPUT_EOF; + memcpy(me->outBuf, data, size); + me->outBufSize -= size; + me->outBuf += size; + *needContinue = needContinue2; + return SZ_OK; + */ +} + +#endif + + +static SRes Lzma2Dec_Prepare_ST(CLzma2DecMt *p) +{ + if (!p->dec_created) + { + Lzma2Dec_Construct(&p->dec); + p->dec_created = True; + } + + RINOK(Lzma2Dec_Allocate(&p->dec, p->prop, &p->alignOffsetAlloc.vt)); + + if (!p->inBuf || p->inBufSize != p->props.inBufSize_ST) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBufSize = 0; + p->inBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.inBufSize_ST); + if (!p->inBuf) + return SZ_ERROR_MEM; + p->inBufSize = p->props.inBufSize_ST; + } + + Lzma2Dec_Init(&p->dec); + + return SZ_OK; +} + + +static SRes Lzma2Dec_Decode_ST(CLzma2DecMt *p + #ifndef _7ZIP_ST + , BoolInt tMode + #endif + ) +{ + SizeT wrPos; + size_t inPos, inLim; + const Byte *inData; + UInt64 inPrev, outPrev; + + CLzma2Dec *dec; + + #ifndef _7ZIP_ST + if (tMode) + { + Lzma2DecMt_FreeOutBufs(p); + tMode = MtDec_PrepareRead(&p->mtc); + } + #endif + + RINOK(Lzma2Dec_Prepare_ST(p)); + + dec = &p->dec; + + inPrev = p->inProcessed; + outPrev = p->outProcessed; + + inPos = 0; + inLim = 0; + inData = NULL; + wrPos = dec->decoder.dicPos; + + for (;;) + { + SizeT dicPos; + SizeT size; + ELzmaFinishMode finishMode; + SizeT inProcessed; + ELzmaStatus status; + SRes res; + + SizeT outProcessed; + BoolInt outFinished; + BoolInt needStop; + + if (inPos == inLim) + { + #ifndef _7ZIP_ST + if (tMode) + { + inData = MtDec_Read(&p->mtc, &inLim); + inPos = 0; + if (inData) + continue; + tMode = False; + inLim = 0; + } + #endif + + if (!p->readWasFinished) + { + inPos = 0; + inLim = p->inBufSize; + inData = p->inBuf; + p->readRes = ISeqInStream_Read(p->inStream, (void *)inData, &inLim); + // p->readProcessed += inLim; + // inLim -= 5; p->readWasFinished = True; // for test + if (inLim == 0 || p->readRes != SZ_OK) + p->readWasFinished = True; + } + } + + dicPos = dec->decoder.dicPos; + { + SizeT next = dec->decoder.dicBufSize; + if (next - wrPos > p->props.outStep_ST) + next = wrPos + p->props.outStep_ST; + size = next - dicPos; + } + + finishMode = LZMA_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (size >= rem) + { + size = (SizeT)rem; + if (p->finishMode) + finishMode = LZMA_FINISH_END; + } + } + + inProcessed = inLim - inPos; + + res = Lzma2Dec_DecodeToDic(dec, dicPos + size, inData + inPos, &inProcessed, finishMode, &status); + + inPos += inProcessed; + p->inProcessed += inProcessed; + outProcessed = dec->decoder.dicPos - dicPos; + p->outProcessed += outProcessed; + + outFinished = (p->outSize_Defined && p->outSize <= p->outProcessed); + + needStop = (res != SZ_OK + || (inProcessed == 0 && outProcessed == 0) + || status == LZMA_STATUS_FINISHED_WITH_MARK + || (!p->finishMode && outFinished)); + + if (needStop || outProcessed >= size) + { + SRes res2; + { + size_t writeSize = dec->decoder.dicPos - wrPos; + size_t written = ISeqOutStream_Write(p->outStream, dec->decoder.dic + wrPos, writeSize); + res2 = (written == writeSize) ? SZ_OK : SZ_ERROR_WRITE; + } + + if (dec->decoder.dicPos == dec->decoder.dicBufSize) + dec->decoder.dicPos = 0; + wrPos = dec->decoder.dicPos; + + RINOK(res2); + + if (needStop) + { + if (res != SZ_OK) + return res; + + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + { + if (p->finishMode) + { + if (p->outSize_Defined && p->outSize != p->outProcessed) + return SZ_ERROR_DATA; + } + return SZ_OK; + } + + if (!p->finishMode && outFinished) + return SZ_OK; + + if (status == LZMA_STATUS_NEEDS_MORE_INPUT) + return SZ_ERROR_INPUT_EOF; + + return SZ_ERROR_DATA; + } + } + + if (p->progress) + { + UInt64 inDelta = p->inProcessed - inPrev; + UInt64 outDelta = p->outProcessed - outPrev; + if (inDelta >= (1 << 22) || outDelta >= (1 << 22)) + { + RINOK(ICompressProgress_Progress(p->progress, p->inProcessed, p->outProcessed)); + inPrev = p->inProcessed; + outPrev = p->outProcessed; + } + } + } +} + + + +SRes Lzma2DecMt_Decode(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + ISeqOutStream *outStream, const UInt64 *outDataSize, int finishMode, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + UInt64 *inProcessed, + // UInt64 *outProcessed, + int *isMT, + ICompressProgress *progress) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + #ifndef _7ZIP_ST + BoolInt tMode; + #endif + + *inProcessed = 0; + + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + + p->prop = prop; + p->props = *props; + + p->inStream = inStream; + p->outStream = outStream; + p->progress = progress; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + p->finishMode = finishMode; + + p->outProcessed = 0; + p->inProcessed = 0; + + p->readWasFinished = False; + + *isMT = False; + + + #ifndef _7ZIP_ST + + tMode = False; + + // p->mtc.parseRes = SZ_OK; + + // p->mtc.numFilledThreads = 0; + // p->mtc.crossStart = 0; + // p->mtc.crossEnd = 0; + // p->mtc.allocError_for_Read_BlockIndex = 0; + // p->mtc.isAllocError = False; + + if (p->props.numThreads > 1) + { + IMtDecCallback vt; + + Lzma2DecMt_FreeSt(p); + + p->outProcessed_Parse = 0; + + if (!p->mtc_WasConstructed) + { + p->mtc_WasConstructed = True; + MtDec_Construct(&p->mtc); + } + + p->mtc.progress = progress; + p->mtc.inStream = inStream; + + // p->outBuf = NULL; + // p->outBufSize = 0; + /* + if (!outStream) + { + // p->outBuf = outBuf; + // p->outBufSize = *outBufSize; + // *outBufSize = 0; + return SZ_ERROR_PARAM; + } + */ + + // p->mtc.inBlockMax = p->props.inBlockMax; + p->mtc.alloc = &p->alignOffsetAlloc.vt; + // p->alignOffsetAlloc.baseAlloc; + // p->mtc.inData = inData; + // p->mtc.inDataSize = inDataSize; + p->mtc.mtCallback = &vt; + p->mtc.mtCallbackObject = p; + + p->mtc.inBufSize = p->props.inBufSize_MT; + + p->mtc.numThreadsMax = p->props.numThreads; + + *isMT = True; + + vt.Parse = Lzma2DecMt_MtCallback_Parse; + vt.PreCode = Lzma2DecMt_MtCallback_PreCode; + vt.Code = Lzma2DecMt_MtCallback_Code; + vt.Write = Lzma2DecMt_MtCallback_Write; + + { + BoolInt needContinue = False; + + SRes res = MtDec_Code(&p->mtc); + + /* + if (!outStream) + *outBufSize = p->outBuf - outBuf; + */ + + *inProcessed = p->mtc.inProcessed; + + needContinue = False; + + if (res == SZ_OK) + { + if (p->mtc.mtProgress.res != SZ_OK) + res = p->mtc.mtProgress.res; + else + needContinue = p->mtc.needContinue; + } + + if (!needContinue) + { + if (res == SZ_OK) + return p->mtc.readRes; + return res; + } + + tMode = True; + p->readRes = p->mtc.readRes; + p->readWasFinished = p->mtc.readWasFinished; + p->inProcessed = p->mtc.inProcessed; + + PRF_STR("----- decoding ST -----"); + } + } + + #endif + + + *isMT = False; + + { + SRes res = Lzma2Dec_Decode_ST(p + #ifndef _7ZIP_ST + , tMode + #endif + ); + + *inProcessed = p->inProcessed; + + // res = SZ_OK; // for test + if (res == SZ_OK && p->readRes != SZ_OK) + res = p->readRes; + + /* + #ifndef _7ZIP_ST + if (res == SZ_OK && tMode && p->mtc.parseRes != SZ_OK) + res = p->mtc.parseRes; + #endif + */ + + return res; + } +} + + +/* ---------- Read from CLzma2DecMtHandle Interface ---------- */ + +SRes Lzma2DecMt_Init(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqInStream *inStream) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + + p->prop = prop; + p->props = *props; + + p->inStream = inStream; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + p->finishMode = finishMode; + + p->outProcessed = 0; + p->inProcessed = 0; + + p->inPos = 0; + p->inLim = 0; + + return Lzma2Dec_Prepare_ST(p); +} + + +SRes Lzma2DecMt_Read(CLzma2DecMtHandle pp, + Byte *data, size_t *outSize, + UInt64 *inStreamProcessed) +{ + CLzma2DecMt *p = (CLzma2DecMt *)pp; + ELzmaFinishMode finishMode; + SRes readRes; + size_t size = *outSize; + + *outSize = 0; + *inStreamProcessed = 0; + + finishMode = LZMA_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (size >= rem) + { + size = (size_t)rem; + if (p->finishMode) + finishMode = LZMA_FINISH_END; + } + } + + readRes = SZ_OK; + + for (;;) + { + SizeT inCur; + SizeT outCur; + ELzmaStatus status; + SRes res; + + if (p->inPos == p->inLim && readRes == SZ_OK) + { + p->inPos = 0; + p->inLim = p->props.inBufSize_ST; + readRes = ISeqInStream_Read(p->inStream, p->inBuf, &p->inLim); + } + + inCur = p->inLim - p->inPos; + outCur = size; + + res = Lzma2Dec_DecodeToBuf(&p->dec, data, &outCur, + p->inBuf + p->inPos, &inCur, finishMode, &status); + + p->inPos += inCur; + p->inProcessed += inCur; + *inStreamProcessed += inCur; + p->outProcessed += outCur; + *outSize += outCur; + size -= outCur; + data += outCur; + + if (res != 0) + return res; + + /* + if (status == LZMA_STATUS_FINISHED_WITH_MARK) + return readRes; + + if (size == 0 && status != LZMA_STATUS_NEEDS_MORE_INPUT) + { + if (p->finishMode && p->outSize_Defined && p->outProcessed >= p->outSize) + return SZ_ERROR_DATA; + return readRes; + } + */ + + if (inCur == 0 && outCur == 0) + return readRes; + } +} diff --git a/bsnes/lzma/Lzma2DecMt.h b/bsnes/lzma/Lzma2DecMt.h new file mode 100644 index 00000000..96f89a3c --- /dev/null +++ b/bsnes/lzma/Lzma2DecMt.h @@ -0,0 +1,79 @@ +/* Lzma2DecMt.h -- LZMA2 Decoder Multi-thread +2018-02-17 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_MT_H +#define __LZMA2_DEC_MT_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +typedef struct +{ + size_t inBufSize_ST; + size_t outStep_ST; + + #ifndef _7ZIP_ST + unsigned numThreads; + size_t inBufSize_MT; + size_t outBlockMax; + size_t inBlockMax; + #endif +} CLzma2DecMtProps; + +/* init to single-thread mode */ +void Lzma2DecMtProps_Init(CLzma2DecMtProps *p); + + +/* ---------- CLzma2DecMtHandle Interface ---------- */ + +/* Lzma2DecMt_ * functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + // SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzma2DecMtHandle; + +CLzma2DecMtHandle Lzma2DecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid); +void Lzma2DecMt_Destroy(CLzma2DecMtHandle p); + +SRes Lzma2DecMt_Decode(CLzma2DecMtHandle p, + Byte prop, + const CLzma2DecMtProps *props, + ISeqOutStream *outStream, + const UInt64 *outDataSize, // NULL means undefined + int finishMode, // 0 - partial unpacking is allowed, 1 - if lzma2 stream must be finished + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + + // out variables: + UInt64 *inProcessed, + int *isMT, /* out: (*isMT == 0), if single thread decoding was used */ + + // UInt64 *outProcessed, + ICompressProgress *progress); + + +/* ---------- Read from CLzma2DecMtHandle Interface ---------- */ + +SRes Lzma2DecMt_Init(CLzma2DecMtHandle pp, + Byte prop, + const CLzma2DecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqInStream *inStream); + +SRes Lzma2DecMt_Read(CLzma2DecMtHandle pp, + Byte *data, size_t *outSize, + UInt64 *inStreamProcessed); + + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Lzma2Enc.c b/bsnes/lzma/Lzma2Enc.c new file mode 100644 index 00000000..d5414775 --- /dev/null +++ b/bsnes/lzma/Lzma2Enc.c @@ -0,0 +1,803 @@ +/* Lzma2Enc.c -- LZMA2 Encoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define _7ZIP_ST */ + +#include "Lzma2Enc.h" + +#ifndef _7ZIP_ST +#include "MtCoder.h" +#else +#define MTCODER__THREADS_MAX 1 +#endif + +#define LZMA2_CONTROL_LZMA (1 << 7) +#define LZMA2_CONTROL_COPY_NO_RESET 2 +#define LZMA2_CONTROL_COPY_RESET_DIC 1 +#define LZMA2_CONTROL_EOF 0 + +#define LZMA2_LCLP_MAX 4 + +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#define LZMA2_PACK_SIZE_MAX (1 << 16) +#define LZMA2_COPY_CHUNK_SIZE LZMA2_PACK_SIZE_MAX +#define LZMA2_UNPACK_SIZE_MAX (1 << 21) +#define LZMA2_KEEP_WINDOW_SIZE LZMA2_UNPACK_SIZE_MAX + +#define LZMA2_CHUNK_SIZE_COMPRESSED_MAX ((1 << 16) + 16) + + +#define PRF(x) /* x */ + + +/* ---------- CLimitedSeqInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *realStream; + UInt64 limit; + UInt64 processed; + int finished; +} CLimitedSeqInStream; + +static void LimitedSeqInStream_Init(CLimitedSeqInStream *p) +{ + p->limit = (UInt64)(Int64)-1; + p->processed = 0; + p->finished = 0; +} + +static SRes LimitedSeqInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CLimitedSeqInStream *p = CONTAINER_FROM_VTBL(pp, CLimitedSeqInStream, vt); + size_t size2 = *size; + SRes res = SZ_OK; + + if (p->limit != (UInt64)(Int64)-1) + { + UInt64 rem = p->limit - p->processed; + if (size2 > rem) + size2 = (size_t)rem; + } + if (size2 != 0) + { + res = ISeqInStream_Read(p->realStream, data, &size2); + p->finished = (size2 == 0 ? 1 : 0); + p->processed += size2; + } + *size = size2; + return res; +} + + +/* ---------- CLzma2EncInt ---------- */ + +typedef struct +{ + CLzmaEncHandle enc; + Byte propsAreSet; + Byte propsByte; + Byte needInitState; + Byte needInitProp; + UInt64 srcPos; +} CLzma2EncInt; + + +static SRes Lzma2EncInt_InitStream(CLzma2EncInt *p, const CLzma2EncProps *props) +{ + if (!p->propsAreSet) + { + SizeT propsSize = LZMA_PROPS_SIZE; + Byte propsEncoded[LZMA_PROPS_SIZE]; + RINOK(LzmaEnc_SetProps(p->enc, &props->lzmaProps)); + RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize)); + p->propsByte = propsEncoded[0]; + p->propsAreSet = True; + } + return SZ_OK; +} + +static void Lzma2EncInt_InitBlock(CLzma2EncInt *p) +{ + p->srcPos = 0; + p->needInitState = True; + p->needInitProp = True; +} + + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize); +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp); +void LzmaEnc_Finish(CLzmaEncHandle pp); +void LzmaEnc_SaveState(CLzmaEncHandle pp); +void LzmaEnc_RestoreState(CLzmaEncHandle pp); + +/* +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp); +*/ + +static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf, + size_t *packSizeRes, ISeqOutStream *outStream) +{ + size_t packSizeLimit = *packSizeRes; + size_t packSize = packSizeLimit; + UInt32 unpackSize = LZMA2_UNPACK_SIZE_MAX; + unsigned lzHeaderSize = 5 + (p->needInitProp ? 1 : 0); + BoolInt useCopyBlock; + SRes res; + + *packSizeRes = 0; + if (packSize < lzHeaderSize) + return SZ_ERROR_OUTPUT_EOF; + packSize -= lzHeaderSize; + + LzmaEnc_SaveState(p->enc); + res = LzmaEnc_CodeOneMemBlock(p->enc, p->needInitState, + outBuf + lzHeaderSize, &packSize, LZMA2_PACK_SIZE_MAX, &unpackSize); + + PRF(printf("\npackSize = %7d unpackSize = %7d ", packSize, unpackSize)); + + if (unpackSize == 0) + return res; + + if (res == SZ_OK) + useCopyBlock = (packSize + 2 >= unpackSize || packSize > (1 << 16)); + else + { + if (res != SZ_ERROR_OUTPUT_EOF) + return res; + res = SZ_OK; + useCopyBlock = True; + } + + if (useCopyBlock) + { + size_t destPos = 0; + PRF(printf("################# COPY ")); + + while (unpackSize > 0) + { + UInt32 u = (unpackSize < LZMA2_COPY_CHUNK_SIZE) ? unpackSize : LZMA2_COPY_CHUNK_SIZE; + if (packSizeLimit - destPos < u + 3) + return SZ_ERROR_OUTPUT_EOF; + outBuf[destPos++] = (Byte)(p->srcPos == 0 ? LZMA2_CONTROL_COPY_RESET_DIC : LZMA2_CONTROL_COPY_NO_RESET); + outBuf[destPos++] = (Byte)((u - 1) >> 8); + outBuf[destPos++] = (Byte)(u - 1); + memcpy(outBuf + destPos, LzmaEnc_GetCurBuf(p->enc) - unpackSize, u); + unpackSize -= u; + destPos += u; + p->srcPos += u; + + if (outStream) + { + *packSizeRes += destPos; + if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + destPos = 0; + } + else + *packSizeRes = destPos; + /* needInitState = True; */ + } + + LzmaEnc_RestoreState(p->enc); + return SZ_OK; + } + + { + size_t destPos = 0; + UInt32 u = unpackSize - 1; + UInt32 pm = (UInt32)(packSize - 1); + unsigned mode = (p->srcPos == 0) ? 3 : (p->needInitState ? (p->needInitProp ? 2 : 1) : 0); + + PRF(printf(" ")); + + outBuf[destPos++] = (Byte)(LZMA2_CONTROL_LZMA | (mode << 5) | ((u >> 16) & 0x1F)); + outBuf[destPos++] = (Byte)(u >> 8); + outBuf[destPos++] = (Byte)u; + outBuf[destPos++] = (Byte)(pm >> 8); + outBuf[destPos++] = (Byte)pm; + + if (p->needInitProp) + outBuf[destPos++] = p->propsByte; + + p->needInitProp = False; + p->needInitState = False; + destPos += packSize; + p->srcPos += unpackSize; + + if (outStream) + if (ISeqOutStream_Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + + *packSizeRes = destPos; + return SZ_OK; + } +} + + +/* ---------- Lzma2 Props ---------- */ + +void Lzma2EncProps_Init(CLzma2EncProps *p) +{ + LzmaEncProps_Init(&p->lzmaProps); + p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO; + p->numBlockThreads_Reduced = -1; + p->numBlockThreads_Max = -1; + p->numTotalThreads = -1; +} + +void Lzma2EncProps_Normalize(CLzma2EncProps *p) +{ + UInt64 fileSize; + int t1, t1n, t2, t2r, t3; + { + CLzmaEncProps lzmaProps = p->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + t1n = lzmaProps.numThreads; + } + + t1 = p->lzmaProps.numThreads; + t2 = p->numBlockThreads_Max; + t3 = p->numTotalThreads; + + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + + if (t3 <= 0) + { + if (t2 <= 0) + t2 = 1; + t3 = t1n * t2; + } + else if (t2 <= 0) + { + t2 = t3 / t1n; + if (t2 == 0) + { + t1 = 1; + t2 = t3; + } + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + } + else if (t1 <= 0) + { + t1 = t3 / t2; + if (t1 == 0) + t1 = 1; + } + else + t3 = t1n * t2; + + p->lzmaProps.numThreads = t1; + + t2r = t2; + + fileSize = p->lzmaProps.reduceSize; + + if ( p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && p->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO + && (p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) + p->lzmaProps.reduceSize = p->blockSize; + + LzmaEncProps_Normalize(&p->lzmaProps); + + p->lzmaProps.reduceSize = fileSize; + + t1 = p->lzmaProps.numThreads; + + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + { + t2r = t2 = 1; + t3 = t1; + } + else if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO && t2 <= 1) + { + /* if there is no block multi-threading, we use SOLID block */ + p->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; + } + else + { + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + { + const UInt32 kMinSize = (UInt32)1 << 20; + const UInt32 kMaxSize = (UInt32)1 << 28; + const UInt32 dictSize = p->lzmaProps.dictSize; + UInt64 blockSize = (UInt64)dictSize << 2; + if (blockSize < kMinSize) blockSize = kMinSize; + if (blockSize > kMaxSize) blockSize = kMaxSize; + if (blockSize < dictSize) blockSize = dictSize; + blockSize += (kMinSize - 1); + blockSize &= ~(UInt64)(kMinSize - 1); + p->blockSize = blockSize; + } + + if (t2 > 1 && fileSize != (UInt64)(Int64)-1) + { + UInt64 numBlocks = fileSize / p->blockSize; + if (numBlocks * p->blockSize != fileSize) + numBlocks++; + if (numBlocks < (unsigned)t2) + { + t2r = (unsigned)numBlocks; + if (t2r == 0) + t2r = 1; + t3 = t1 * t2r; + } + } + } + + p->numBlockThreads_Max = t2; + p->numBlockThreads_Reduced = t2r; + p->numTotalThreads = t3; +} + + +static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize) +{ + return (p && ICompressProgress_Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK; +} + + +/* ---------- Lzma2 ---------- */ + +typedef struct +{ + Byte propEncoded; + CLzma2EncProps props; + UInt64 expectedDataSize; + + Byte *tempBufLzma; + + ISzAllocPtr alloc; + ISzAllocPtr allocBig; + + CLzma2EncInt coders[MTCODER__THREADS_MAX]; + + #ifndef _7ZIP_ST + + ISeqOutStream *outStream; + Byte *outBuf; + size_t outBuf_Rem; /* remainder in outBuf */ + + size_t outBufSize; /* size of allocated outBufs[i] */ + size_t outBufsDataSizes[MTCODER__BLOCKS_MAX]; + BoolInt mtCoder_WasConstructed; + CMtCoder mtCoder; + Byte *outBufs[MTCODER__BLOCKS_MAX]; + + #endif + +} CLzma2Enc; + + + +CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzma2Enc *p = (CLzma2Enc *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Enc)); + if (!p) + return NULL; + Lzma2EncProps_Init(&p->props); + Lzma2EncProps_Normalize(&p->props); + p->expectedDataSize = (UInt64)(Int64)-1; + p->tempBufLzma = NULL; + p->alloc = alloc; + p->allocBig = allocBig; + { + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + p->coders[i].enc = NULL; + } + + #ifndef _7ZIP_ST + p->mtCoder_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + p->outBufs[i] = NULL; + p->outBufSize = 0; + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void Lzma2Enc_FreeOutBufs(CLzma2Enc *p) +{ + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + if (p->outBufs[i]) + { + ISzAlloc_Free(p->alloc, p->outBufs[i]); + p->outBufs[i] = NULL; + } + p->outBufSize = 0; +} + +#endif + + +void Lzma2Enc_Destroy(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + { + CLzma2EncInt *t = &p->coders[i]; + if (t->enc) + { + LzmaEnc_Destroy(t->enc, p->alloc, p->allocBig); + t->enc = NULL; + } + } + + + #ifndef _7ZIP_ST + if (p->mtCoder_WasConstructed) + { + MtCoder_Destruct(&p->mtCoder); + p->mtCoder_WasConstructed = False; + } + Lzma2Enc_FreeOutBufs(p); + #endif + + ISzAlloc_Free(p->alloc, p->tempBufLzma); + p->tempBufLzma = NULL; + + ISzAlloc_Free(p->alloc, pp); +} + + +SRes Lzma2Enc_SetProps(CLzma2EncHandle pp, const CLzma2EncProps *props) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + CLzmaEncProps lzmaProps = props->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + if (lzmaProps.lc + lzmaProps.lp > LZMA2_LCLP_MAX) + return SZ_ERROR_PARAM; + p->props = *props; + Lzma2EncProps_Normalize(&p->props); + return SZ_OK; +} + + +void Lzma2Enc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + p->expectedDataSize = expectedDataSiize; +} + + +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + UInt32 dicSize = LzmaEncProps_GetDictSize(&p->props.lzmaProps); + for (i = 0; i < 40; i++) + if (dicSize <= LZMA2_DIC_SIZE_FROM_PROP(i)) + break; + return (Byte)i; +} + + +static SRes Lzma2Enc_EncodeMt1( + CLzma2Enc *me, + CLzma2EncInt *p, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + int finished, + ICompressProgress *progress) +{ + UInt64 unpackTotal = 0; + UInt64 packTotal = 0; + size_t outLim = 0; + CLimitedSeqInStream limitedInStream; + + if (outBuf) + { + outLim = *outBufSize; + *outBufSize = 0; + } + + if (!p->enc) + { + p->propsAreSet = False; + p->enc = LzmaEnc_Create(me->alloc); + if (!p->enc) + return SZ_ERROR_MEM; + } + + limitedInStream.realStream = inStream; + if (inStream) + { + limitedInStream.vt.Read = LimitedSeqInStream_Read; + } + + if (!outBuf) + { + // outStream version works only in one thread. So we use CLzma2Enc::tempBufLzma + if (!me->tempBufLzma) + { + me->tempBufLzma = (Byte *)ISzAlloc_Alloc(me->alloc, LZMA2_CHUNK_SIZE_COMPRESSED_MAX); + if (!me->tempBufLzma) + return SZ_ERROR_MEM; + } + } + + RINOK(Lzma2EncInt_InitStream(p, &me->props)); + + for (;;) + { + SRes res = SZ_OK; + size_t inSizeCur = 0; + + Lzma2EncInt_InitBlock(p); + + LimitedSeqInStream_Init(&limitedInStream); + limitedInStream.limit = me->props.blockSize; + + if (inStream) + { + UInt64 expected = (UInt64)(Int64)-1; + // inStream version works only in one thread. So we use CLzma2Enc::expectedDataSize + if (me->expectedDataSize != (UInt64)(Int64)-1 + && me->expectedDataSize >= unpackTotal) + expected = me->expectedDataSize - unpackTotal; + if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && expected > me->props.blockSize) + expected = (size_t)me->props.blockSize; + + LzmaEnc_SetDataSize(p->enc, expected); + + RINOK(LzmaEnc_PrepareForLzma2(p->enc, + &limitedInStream.vt, + LZMA2_KEEP_WINDOW_SIZE, + me->alloc, + me->allocBig)); + } + else + { + inSizeCur = inDataSize - (size_t)unpackTotal; + if (me->props.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + && inSizeCur > me->props.blockSize) + inSizeCur = (size_t)me->props.blockSize; + + // LzmaEnc_SetDataSize(p->enc, inSizeCur); + + RINOK(LzmaEnc_MemPrepare(p->enc, + inData + (size_t)unpackTotal, inSizeCur, + LZMA2_KEEP_WINDOW_SIZE, + me->alloc, + me->allocBig)); + } + + for (;;) + { + size_t packSize = LZMA2_CHUNK_SIZE_COMPRESSED_MAX; + if (outBuf) + packSize = outLim - (size_t)packTotal; + + res = Lzma2EncInt_EncodeSubblock(p, + outBuf ? outBuf + (size_t)packTotal : me->tempBufLzma, &packSize, + outBuf ? NULL : outStream); + + if (res != SZ_OK) + break; + + packTotal += packSize; + if (outBuf) + *outBufSize = (size_t)packTotal; + + res = Progress(progress, unpackTotal + p->srcPos, packTotal); + if (res != SZ_OK) + break; + + /* + if (LzmaEnc_GetNumAvailableBytes(p->enc) == 0) + break; + */ + + if (packSize == 0) + break; + } + + LzmaEnc_Finish(p->enc); + + unpackTotal += p->srcPos; + + RINOK(res); + + if (p->srcPos != (inStream ? limitedInStream.processed : inSizeCur)) + return SZ_ERROR_FAIL; + + if (inStream ? limitedInStream.finished : (unpackTotal == inDataSize)) + { + if (finished) + { + if (outBuf) + { + size_t destPos = *outBufSize; + if (destPos >= outLim) + return SZ_ERROR_OUTPUT_EOF; + outBuf[destPos] = 0; + *outBufSize = destPos + 1; + } + else + { + Byte b = 0; + if (ISeqOutStream_Write(outStream, &b, 1) != 1) + return SZ_ERROR_WRITE; + } + } + return SZ_OK; + } + } +} + + + +#ifndef _7ZIP_ST + +static SRes Lzma2Enc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, + const Byte *src, size_t srcSize, int finished) +{ + CLzma2Enc *me = (CLzma2Enc *)pp; + size_t destSize = me->outBufSize; + SRes res; + CMtProgressThunk progressThunk; + + Byte *dest = me->outBufs[outBufIndex]; + + me->outBufsDataSizes[outBufIndex] = 0; + + if (!dest) + { + dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); + if (!dest) + return SZ_ERROR_MEM; + me->outBufs[outBufIndex] = dest; + } + + MtProgressThunk_CreateVTable(&progressThunk); + progressThunk.mtProgress = &me->mtCoder.mtProgress; + progressThunk.inSize = 0; + progressThunk.outSize = 0; + + res = Lzma2Enc_EncodeMt1(me, + &me->coders[coderIndex], + NULL, dest, &destSize, + NULL, src, srcSize, + finished, + &progressThunk.vt); + + me->outBufsDataSizes[outBufIndex] = destSize; + + return res; +} + + +static SRes Lzma2Enc_MtCallback_Write(void *pp, unsigned outBufIndex) +{ + CLzma2Enc *me = (CLzma2Enc *)pp; + size_t size = me->outBufsDataSizes[outBufIndex]; + const Byte *data = me->outBufs[outBufIndex]; + + if (me->outStream) + return ISeqOutStream_Write(me->outStream, data, size) == size ? SZ_OK : SZ_ERROR_WRITE; + + if (size > me->outBuf_Rem) + return SZ_ERROR_OUTPUT_EOF; + memcpy(me->outBuf, data, size); + me->outBuf_Rem -= size; + me->outBuf += size; + return SZ_OK; +} + +#endif + + + +SRes Lzma2Enc_Encode2(CLzma2EncHandle pp, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + ICompressProgress *progress) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + + if (inStream && inData) + return SZ_ERROR_PARAM; + + if (outStream && outBuf) + return SZ_ERROR_PARAM; + + { + unsigned i; + for (i = 0; i < MTCODER__THREADS_MAX; i++) + p->coders[i].propsAreSet = False; + } + + #ifndef _7ZIP_ST + + if (p->props.numBlockThreads_Reduced > 1) + { + IMtCoderCallback2 vt; + + if (!p->mtCoder_WasConstructed) + { + p->mtCoder_WasConstructed = True; + MtCoder_Construct(&p->mtCoder); + } + + vt.Code = Lzma2Enc_MtCallback_Code; + vt.Write = Lzma2Enc_MtCallback_Write; + + p->outStream = outStream; + p->outBuf = NULL; + p->outBuf_Rem = 0; + if (!outStream) + { + p->outBuf = outBuf; + p->outBuf_Rem = *outBufSize; + *outBufSize = 0; + } + + p->mtCoder.allocBig = p->allocBig; + p->mtCoder.progress = progress; + p->mtCoder.inStream = inStream; + p->mtCoder.inData = inData; + p->mtCoder.inDataSize = inDataSize; + p->mtCoder.mtCallback = &vt; + p->mtCoder.mtCallbackObject = p; + + p->mtCoder.blockSize = (size_t)p->props.blockSize; + if (p->mtCoder.blockSize != p->props.blockSize) + return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ + + { + size_t destBlockSize = p->mtCoder.blockSize + (p->mtCoder.blockSize >> 10) + 16; + if (destBlockSize < p->mtCoder.blockSize) + return SZ_ERROR_PARAM; + if (p->outBufSize != destBlockSize) + Lzma2Enc_FreeOutBufs(p); + p->outBufSize = destBlockSize; + } + + p->mtCoder.numThreadsMax = p->props.numBlockThreads_Max; + p->mtCoder.expectedDataSize = p->expectedDataSize; + + { + SRes res = MtCoder_Code(&p->mtCoder); + if (!outStream) + *outBufSize = p->outBuf - outBuf; + return res; + } + } + + #endif + + + return Lzma2Enc_EncodeMt1(p, + &p->coders[0], + outStream, outBuf, outBufSize, + inStream, inData, inDataSize, + True, /* finished */ + progress); +} diff --git a/bsnes/lzma/Lzma2Enc.h b/bsnes/lzma/Lzma2Enc.h new file mode 100644 index 00000000..65f2dd14 --- /dev/null +++ b/bsnes/lzma/Lzma2Enc.h @@ -0,0 +1,55 @@ +/* Lzma2Enc.h -- LZMA2 Encoder +2017-07-27 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_ENC_H +#define __LZMA2_ENC_H + +#include "LzmaEnc.h" + +EXTERN_C_BEGIN + +#define LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO 0 +#define LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID ((UInt64)(Int64)-1) + +typedef struct +{ + CLzmaEncProps lzmaProps; + UInt64 blockSize; + int numBlockThreads_Reduced; + int numBlockThreads_Max; + int numTotalThreads; +} CLzma2EncProps; + +void Lzma2EncProps_Init(CLzma2EncProps *p); +void Lzma2EncProps_Normalize(CLzma2EncProps *p); + +/* ---------- CLzmaEnc2Handle Interface ---------- */ + +/* Lzma2Enc_* functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzma2EncHandle; + +CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); +void Lzma2Enc_Destroy(CLzma2EncHandle p); +SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props); +void Lzma2Enc_SetDataSize(CLzma2EncHandle p, UInt64 expectedDataSiize); +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p); +SRes Lzma2Enc_Encode2(CLzma2EncHandle p, + ISeqOutStream *outStream, + Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + const Byte *inData, size_t inDataSize, + ICompressProgress *progress); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Lzma86.h b/bsnes/lzma/Lzma86.h new file mode 100644 index 00000000..83057e59 --- /dev/null +++ b/bsnes/lzma/Lzma86.h @@ -0,0 +1,111 @@ +/* Lzma86.h -- LZMA + x86 (BCJ) Filter +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __LZMA86_H +#define __LZMA86_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define LZMA86_SIZE_OFFSET (1 + 5) +#define LZMA86_HEADER_SIZE (LZMA86_SIZE_OFFSET + 8) + +/* +It's an example for LZMA + x86 Filter use. +You can use .lzma86 extension, if you write that stream to file. +.lzma86 header adds one additional byte to standard .lzma header. +.lzma86 header (14 bytes): + Offset Size Description + 0 1 = 0 - no filter, pure LZMA + = 1 - x86 filter + LZMA + 1 1 lc, lp and pb in encoded form + 2 4 dictSize (little endian) + 6 8 uncompressed size (little endian) + + +Lzma86_Encode +------------- +level - compression level: 0 <= level <= 9, the default value for "level" is 5. + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes, for level = 5. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + For better compression ratio dictSize must be >= inSize. + +filterMode: + SZ_FILTER_NO - no Filter + SZ_FILTER_YES - x86 Filter + SZ_FILTER_AUTO - it tries both alternatives to select best. + Encoder will use 2 or 3 passes: + 2 passes when FILTER_NO provides better compression. + 3 passes when FILTER_YES provides better compression. + +Lzma86Encode allocates Data with MyAlloc functions. +RAM Requirements for compressing: + RamSize = dictionarySize * 11.5 + 6MB + FilterBlockSize + filterMode FilterBlockSize + SZ_FILTER_NO 0 + SZ_FILTER_YES inSize + SZ_FILTER_AUTO inSize + + +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +enum ESzFilterMode +{ + SZ_FILTER_NO, + SZ_FILTER_YES, + SZ_FILTER_AUTO +}; + +SRes Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode); + + +/* +Lzma86_GetUnpackSize: + In: + src - input data + srcLen - input data size + Out: + unpackSize - size of uncompressed stream + Return code: + SZ_OK - OK + SZ_ERROR_INPUT_EOF - Error in headers +*/ + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize); + +/* +Lzma86_Decode: + In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size + Out: + destLen - processed output size + srcLen - processed input size + Return code: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - unsupported file + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer +*/ + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Lzma86Dec.c b/bsnes/lzma/Lzma86Dec.c new file mode 100644 index 00000000..20ac5e7a --- /dev/null +++ b/bsnes/lzma/Lzma86Dec.c @@ -0,0 +1,54 @@ +/* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder +2016-05-16 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Lzma86.h" + +#include "Alloc.h" +#include "Bra.h" +#include "LzmaDec.h" + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize) +{ + unsigned i; + if (srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + *unpackSize = 0; + for (i = 0; i < sizeof(UInt64); i++) + *unpackSize += ((UInt64)src[LZMA86_SIZE_OFFSET + i]) << (8 * i); + return SZ_OK; +} + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) +{ + SRes res; + int useFilter; + SizeT inSizePure; + ELzmaStatus status; + + if (*srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + + useFilter = src[0]; + + if (useFilter > 1) + { + *destLen = 0; + return SZ_ERROR_UNSUPPORTED; + } + + inSizePure = *srcLen - LZMA86_HEADER_SIZE; + res = LzmaDecode(dest, destLen, src + LZMA86_HEADER_SIZE, &inSizePure, + src + 1, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &status, &g_Alloc); + *srcLen = inSizePure + LZMA86_HEADER_SIZE; + if (res != SZ_OK) + return res; + if (useFilter == 1) + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(dest, *destLen, 0, &x86State, 0); + } + return SZ_OK; +} diff --git a/bsnes/lzma/Lzma86Enc.c b/bsnes/lzma/Lzma86Enc.c new file mode 100644 index 00000000..8d35e6dc --- /dev/null +++ b/bsnes/lzma/Lzma86Enc.c @@ -0,0 +1,106 @@ +/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "Lzma86.h" + +#include "Alloc.h" +#include "Bra.h" +#include "LzmaEnc.h" + +#define SZE_OUT_OVERFLOW SZE_DATA_ERROR + +int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode) +{ + size_t outSize2 = *destLen; + Byte *filteredStream; + BoolInt useFilter; + int mainResult = SZ_ERROR_OUTPUT_EOF; + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + + *destLen = 0; + if (outSize2 < LZMA86_HEADER_SIZE) + return SZ_ERROR_OUTPUT_EOF; + + { + int i; + UInt64 t = srcLen; + for (i = 0; i < 8; i++, t >>= 8) + dest[LZMA86_SIZE_OFFSET + i] = (Byte)t; + } + + filteredStream = 0; + useFilter = (filterMode != SZ_FILTER_NO); + if (useFilter) + { + if (srcLen != 0) + { + filteredStream = (Byte *)MyAlloc(srcLen); + if (filteredStream == 0) + return SZ_ERROR_MEM; + memcpy(filteredStream, src, srcLen); + } + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(filteredStream, srcLen, 0, &x86State, 1); + } + } + + { + size_t minSize = 0; + BoolInt bestIsFiltered = False; + + /* passes for SZ_FILTER_AUTO: + 0 - BCJ + LZMA + 1 - LZMA + 2 - BCJ + LZMA agaian, if pass 0 (BCJ + LZMA) is better. + */ + int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1; + + int i; + for (i = 0; i < numPasses; i++) + { + size_t outSizeProcessed = outSize2 - LZMA86_HEADER_SIZE; + size_t outPropsSize = 5; + SRes curRes; + BoolInt curModeIsFiltered = (numPasses > 1 && i == numPasses - 1); + if (curModeIsFiltered && !bestIsFiltered) + break; + if (useFilter && i == 0) + curModeIsFiltered = True; + + curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed, + curModeIsFiltered ? filteredStream : src, srcLen, + &props, dest + 1, &outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); + + if (curRes != SZ_ERROR_OUTPUT_EOF) + { + if (curRes != SZ_OK) + { + mainResult = curRes; + break; + } + if (outSizeProcessed <= minSize || mainResult != SZ_OK) + { + minSize = outSizeProcessed; + bestIsFiltered = curModeIsFiltered; + mainResult = SZ_OK; + } + } + } + dest[0] = (Byte)(bestIsFiltered ? 1 : 0); + *destLen = LZMA86_HEADER_SIZE + minSize; + } + if (useFilter) + MyFree(filteredStream); + return mainResult; +} diff --git a/bsnes/lzma/LzmaDec.c b/bsnes/lzma/LzmaDec.c new file mode 100644 index 00000000..4d157641 --- /dev/null +++ b/bsnes/lzma/LzmaDec.c @@ -0,0 +1,1185 @@ +/* LzmaDec.c -- LZMA Decoder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #include "CpuArch.h" */ +#include "LzmaDec.h" + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } + +#define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); } + +#define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \ + { UPDATE_0(p + i); A0; } else \ + { UPDATE_1(p + i); A1; } +#define REV_BIT_VAR( p, i, m) REV_BIT(p, i, i += m; m += m, m += m; i += m; ) +#define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m; , i += m * 2; ) +#define REV_BIT_LAST( p, i, m) REV_BIT(p, i, i -= m , ; ) + +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMAL_LITER_DEC TREE_GET_BIT(prob, symbol) +#define MATCHED_LITER_DEC \ + matchByte += matchByte; \ + bit = offs; \ + offs &= matchByte; \ + probLit = prob + (offs + bit + symbol); \ + GET_BIT2(probLit, symbol, offs ^= bit; , ;) + + + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \ + { UPDATE_0_CHECK; i += m; m += m; } else \ + { UPDATE_1_CHECK; m += m; i += m; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenLow 0 +#define LenHigh (LenLow + 2 * (kNumPosStatesMax << kLenNumLowBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + +#define LenChoice LenLow +#define LenChoice2 (LenLow + (1 << kLenNumLowBits)) + +#define kNumStates 12 +#define kNumStates2 16 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols * 2 + kLenNumHighSymbols) + +/* External ASM code needs same CLzmaProb array layout. So don't change it. */ + +/* (probs_1664) is faster and better for code size at some platforms */ +/* +#ifdef MY_CPU_X86_OR_AMD64 +*/ +#define kStartOffset 1664 +#define GET_PROBS p->probs_1664 +/* +#define GET_PROBS p->probs + kStartOffset +#else +#define kStartOffset 0 +#define GET_PROBS p->probs +#endif +*/ + +#define SpecPos (-kStartOffset) +#define IsRep0Long (SpecPos + kNumFullDistances) +#define RepLenCoder (IsRep0Long + (kNumStates2 << kNumPosBitsMax)) +#define LenCoder (RepLenCoder + kNumLenProbs) +#define IsMatch (LenCoder + kNumLenProbs) +#define Align (IsMatch + (kNumStates2 << kNumPosBitsMax)) +#define IsRep (Align + kAlignTableSize) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define PosSlot (IsRepG2 + kNumStates) +#define Literal (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define NUM_BASE_PROBS (Literal + kStartOffset) + +#if Align != 0 && kStartOffset != 0 + #error Stop_Compiling_Bad_LZMA_kAlign +#endif + +#if NUM_BASE_PROBS != 1984 + #error Stop_Compiling_Bad_LZMA_PROBS +#endif + + +#define LZMA_LIT_SIZE 0x300 + +#define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + + +#define CALC_POS_STATE(processedPos, pbMask) (((processedPos) & (pbMask)) << 4) +#define COMBINED_PS_STATE (posState + state) +#define GET_LEN_STATE (posState) + +#define LZMA_DIC_MIN (1 << 12) + +/* +p->remainLen : shows status of LZMA decoder: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : need init range coder + = kMatchSpecLenStart + 2 : need init range coder and state +*/ + +/* ---------- LZMA_DECODE_REAL ---------- */ +/* +LzmaDec_DecodeReal_3() can be implemented in external ASM file. +3 - is the code compatibility version of that function for check at link time. +*/ + +#define LZMA_DECODE_REAL LzmaDec_DecodeReal_3 + +/* +LZMA_DECODE_REAL() +In: + RangeCoder is normalized + if (p->dicPos == limit) + { + LzmaDec_TryDummy() was called before to exclude LITERAL and MATCH-REP cases. + So first symbol can be only MATCH-NON-REP. And if that MATCH-NON-REP symbol + is not END_OF_PAYALOAD_MARKER, then function returns error code. + } + +Processing: + first LZMA symbol will be decoded in any case + All checks for limits are at the end of main loop, + It will decode new LZMA-symbols while (p->buf < bufLimit && dicPos < limit), + RangeCoder is still without last normalization when (p->buf < bufLimit) is being checked. + +Out: + RangeCoder is normalized + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished +*/ + + +#ifdef _LZMA_DEC_OPT + +int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit); + +#else + +static +int MY_FAST_CALL LZMA_DECODE_REAL(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = GET_PROBS; + unsigned state = (unsigned)p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lc = p->prop.lc; + unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc); + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = CALC_POS_STATE(processedPos, pbMask); + + prob = probs + IsMatch + COMBINED_PS_STATE; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (processedPos != 0 || checkDicSize != 0) + prob += (UInt32)3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc); + processedPos++; + + if (state < kNumLitStates) + { + state -= (state < 4) ? state : 3; + symbol = 1; + #ifdef _LZMA_SIZE_OPT + do { NORMAL_LITER_DEC } while (symbol < 0x100); + #else + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + NORMAL_LITER_DEC + #endif + } + else + { + unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + unsigned offs = 0x100; + state -= (state < 10) ? 3 : 6; + symbol = 1; + #ifdef _LZMA_SIZE_OPT + do + { + unsigned bit; + CLzmaProb *probLit; + MATCHED_LITER_DEC + } + while (symbol < 0x100); + #else + { + unsigned bit; + CLzmaProb *probLit; + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + MATCHED_LITER_DEC + } + #endif + } + + dic[dicPos++] = (Byte)symbol; + continue; + } + + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + /* + // that case was checked before with kBadRepCode + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + */ + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + COMBINED_PS_STATE; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + + #ifdef _LZMA_SIZE_OPT + { + unsigned lim, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE; + offset = 0; + lim = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + offset = kLenNumLowSymbols; + lim = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols * 2; + lim = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, lim, len); + len += offset; + } + #else + { + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE; + len = 1; + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + len -= 8; + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + len = 1; + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + TREE_GET_BIT(probLen, len); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + TREE_DECODE(probLen, (1 << kLenNumHighBits), len); + len += kLenNumLowSymbols * 2; + } + } + } + #endif + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + unsigned numDirectBits = (unsigned)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos; + { + UInt32 m = 1; + distance++; + do + { + REV_BIT_VAR(prob, distance, m); + } + while (--numDirectBits); + distance -= m; + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + REV_BIT_CONST(prob, i, 1); + REV_BIT_CONST(prob, i, 2); + REV_BIT_CONST(prob, i, 4); + REV_BIT_LAST (prob, i, 8); + distance |= i; + } + if (distance == (UInt32)0xFFFFFFFF) + { + len = kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + if (distance >= (checkDicSize == 0 ? processedPos: checkDicSize)) + { + p->dicPos = dicPos; + return SZ_ERROR_DATA; + } + } + + len += kMatchMinLen; + + { + SizeT rem; + unsigned curLen; + SizeT pos; + + if ((rem = limit - dicPos) == 0) + { + p->dicPos = dicPos; + return SZ_ERROR_DATA; + } + + curLen = ((rem < len) ? (unsigned)rem : len); + pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0); + + processedPos += (UInt32)curLen; + + len -= curLen; + if (curLen <= dicBufSize - pos) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += (SizeT)curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + + NORMALIZE; + + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = (UInt32)len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = (UInt32)state; + + return SZ_OK; +} +#endif + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = (unsigned)p->remainLen; + SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */ + SizeT rem = limit - dicPos; + if (rem < len) + len = (unsigned)(rem); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += (UInt32)len; + p->remainLen -= (UInt32)len; + while (len != 0) + { + len--; + dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + + +#define kRange0 0xFFFFFFFF +#define kBound0 ((kRange0 >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)) +#define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1))) +#if kBadRepCode != (0xC0000000 - 0x400) + #error Stop_Compiling_Bad_LZMA_Check +#endif + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + + if (p->processedPos == 0) + if (p->code >= kBadRepCode) + return SZ_ERROR_DATA; + } + + RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit)); + + if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + const CLzmaProb *probs = GET_PROBS; + unsigned state = (unsigned)p->state; + ELzmaDummy res; + + { + const CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1); + + prob = probs + IsMatch + COMBINED_PS_STATE; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += ((UInt32)LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + (p->dicPos < p->reps[0] ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + const CLzmaProb *probLit; + matchByte += matchByte; + bit = offs; + offs &= matchByte; + probLit = prob + (offs + bit + symbol); + GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ; ) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + COMBINED_PS_STATE; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + const CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + GET_LEN_STATE; + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols * 2; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + unsigned numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits); + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + unsigned m = 1; + do + { + REV_BIT_CHECK(prob, i, m); + } + while (--numDirectBits); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +void LzmaDec_InitDicAndState(CLzmaDec *p, BoolInt initDic, BoolInt initState) +{ + p->remainLen = kMatchSpecLenStart + 1; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->remainLen = kMatchSpecLenStart + 2; + } + if (initState) + p->remainLen = kMatchSpecLenStart + 2; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + + *status = LZMA_STATUS_NOT_SPECIFIED; + + if (p->remainLen > kMatchSpecLenStart) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize != 0 && p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + p->code = + ((UInt32)p->tempBuf[1] << 24) + | ((UInt32)p->tempBuf[2] << 16) + | ((UInt32)p->tempBuf[3] << 8) + | ((UInt32)p->tempBuf[4]); + p->range = 0xFFFFFFFF; + p->tempBufSize = 0; + + if (p->remainLen > kMatchSpecLenStart + 1) + { + SizeT numProbs = LzmaProps_GetNumProbs(&p->prop); + SizeT i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + } + + p->remainLen = 0; + } + + LzmaDec_WriteRem(p, dicLimit); + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow = 0; + + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT)rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += (SizeT)lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + + { + unsigned kkk = (unsigned)(p->buf - p->tempBuf); + if (rem < kkk) + return SZ_ERROR_FAIL; /* some internal error */ + rem -= kkk; + if (lookAhead < rem) + return SZ_ERROR_FAIL; /* some internal error */ + lookAhead -= rem; + } + (*srcLen) += (SizeT)lookAhead; + src += lookAhead; + inSize -= (SizeT)lookAhead; + p->tempBufSize = 0; + } + } + + if (p->code != 0) + return SZ_ERROR_DATA; + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->probs); + p->probs = NULL; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->dic); + p->dic = NULL; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = (Byte)(d % 9); + d /= 9; + p->pb = (Byte)(d / 5); + p->lp = (Byte)(d % 5); + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAllocPtr alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (!p->probs || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)ISzAlloc_Alloc(alloc, numProbs * sizeof(CLzmaProb)); + if (!p->probs) + return SZ_ERROR_MEM; + p->probs_1664 = p->probs + 1664; + p->numProbs = numProbs; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + + { + UInt32 dictSize = propNew.dicSize; + SizeT mask = ((UInt32)1 << 12) - 1; + if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1; + else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;; + dicBufSize = ((SizeT)dictSize + mask) & ~mask; + if (dicBufSize < dictSize) + dicBufSize = dictSize; + } + + if (!p->dic || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)ISzAlloc_Alloc(alloc, dicBufSize); + if (!p->dic) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAllocPtr alloc) +{ + CLzmaDec p; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + LzmaDec_Construct(&p); + RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc)); + p.dic = dest; + p.dicBufSize = outSize; + LzmaDec_Init(&p); + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + *destLen = p.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/bsnes/lzma/LzmaDec.h b/bsnes/lzma/LzmaDec.h new file mode 100644 index 00000000..28ce60c3 --- /dev/null +++ b/bsnes/lzma/LzmaDec.h @@ -0,0 +1,234 @@ +/* LzmaDec.h -- LZMA Decoder +2018-04-21 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_DEC_H +#define __LZMA_DEC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +typedef +#ifdef _LZMA_PROB32 + UInt32 +#else + UInt16 +#endif + CLzmaProb; + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + Byte lc; + Byte lp; + Byte pb; + Byte _pad_; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + /* Don't change this structure. ASM code can use it. */ + CLzmaProps prop; + CLzmaProb *probs; + CLzmaProb *probs_1664; + Byte *dic; + SizeT dicBufSize; + SizeT dicPos; + const Byte *buf; + UInt32 range; + UInt32 code; + UInt32 processedPos; + UInt32 checkDicSize; + UInt32 reps[4]; + UInt32 state; + UInt32 remainLen; + + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = NULL; (p)->probs = NULL; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + - Stream with end mark. That end mark adds about 6 bytes to compressed size. + - Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc); + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc); +void LzmaDec_Free(CLzmaDec *p, ISzAllocPtr alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Construct() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAllocPtr alloc); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/LzmaEnc.c b/bsnes/lzma/LzmaEnc.c new file mode 100644 index 00000000..14086fc4 --- /dev/null +++ b/bsnes/lzma/LzmaEnc.c @@ -0,0 +1,2976 @@ +/* LzmaEnc.c -- LZMA Encoder +2019-01-10: Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +/* #define SHOW_STAT */ +/* #define SHOW_STAT2 */ + +#if defined(SHOW_STAT) || defined(SHOW_STAT2) +#include +#endif + +#include "LzmaEnc.h" + +#include "LzFind.h" +#ifndef _7ZIP_ST +#include "LzFindMt.h" +#endif + +#ifdef SHOW_STAT +static unsigned g_STAT_OFFSET = 0; +#endif + +#define kLzmaMaxHistorySize ((UInt32)3 << 29) +/* #define kLzmaMaxHistorySize ((UInt32)7 << 29) */ + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 +#define kProbInitValue (kBitModelTotal >> 1) + +#define kNumMoveReducingBits 4 +#define kNumBitPriceShiftBits 4 +#define kBitPrice (1 << kNumBitPriceShiftBits) + +#define REP_LEN_COUNT 64 + +void LzmaEncProps_Init(CLzmaEncProps *p) +{ + p->level = 5; + p->dictSize = p->mc = 0; + p->reduceSize = (UInt64)(Int64)-1; + p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; + p->writeEndMark = 0; +} + +void LzmaEncProps_Normalize(CLzmaEncProps *p) +{ + int level = p->level; + if (level < 0) level = 5; + p->level = level; + + if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level <= 7 ? (1 << 25) : (1 << 26))); + if (p->dictSize > p->reduceSize) + { + unsigned i; + UInt32 reduceSize = (UInt32)p->reduceSize; + for (i = 11; i <= 30; i++) + { + if (reduceSize <= ((UInt32)2 << i)) { p->dictSize = ((UInt32)2 << i); break; } + if (reduceSize <= ((UInt32)3 << i)) { p->dictSize = ((UInt32)3 << i); break; } + } + } + + if (p->lc < 0) p->lc = 3; + if (p->lp < 0) p->lp = 0; + if (p->pb < 0) p->pb = 2; + + if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); + if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); + if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); + if (p->numHashBytes < 0) p->numHashBytes = 4; + if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); + + if (p->numThreads < 0) + p->numThreads = + #ifndef _7ZIP_ST + ((p->btMode && p->algo) ? 2 : 1); + #else + 1; + #endif +} + +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) +{ + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + return props.dictSize; +} + +#if (_MSC_VER >= 1400) +/* BSR code is fast for some new CPUs */ +/* #define LZMA_LOG_BSR */ +#endif + +#ifdef LZMA_LOG_BSR + +#define kDicLogSizeMaxCompress 32 + +#define BSR2_RET(pos, res) { unsigned long zz; _BitScanReverse(&zz, (pos)); res = (zz + zz) + ((pos >> (zz - 1)) & 1); } + +static unsigned GetPosSlot1(UInt32 pos) +{ + unsigned res; + BSR2_RET(pos, res); + return res; +} +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } + +#else + +#define kNumLogBits (9 + sizeof(size_t) / 2) +/* #define kNumLogBits (11 + sizeof(size_t) / 8 * 3) */ + +#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) + +static void LzmaEnc_FastPosInit(Byte *g_FastPos) +{ + unsigned slot; + g_FastPos[0] = 0; + g_FastPos[1] = 1; + g_FastPos += 2; + + for (slot = 2; slot < kNumLogBits * 2; slot++) + { + size_t k = ((size_t)1 << ((slot >> 1) - 1)); + size_t j; + for (j = 0; j < k; j++) + g_FastPos[j] = (Byte)slot; + g_FastPos += k; + } +} + +/* we can use ((limit - pos) >> 31) only if (pos < ((UInt32)1 << 31)) */ +/* +#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } +*/ + +/* +#define BSR2_RET(pos, res) { unsigned zz = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits)) - 1) - (pos >> 6)) >> 31))); \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } +*/ + +#define BSR2_RET(pos, res) { unsigned zz = (pos < (1 << (kNumLogBits + 6))) ? 6 : 6 + kNumLogBits - 1; \ + res = p->g_FastPos[pos >> zz] + (zz * 2); } + +/* +#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ + p->g_FastPos[pos >> 6] + 12 : \ + p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } +*/ + +#define GetPosSlot1(pos) p->g_FastPos[pos] +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos & (kNumFullDistances - 1)]; else BSR2_RET(pos, res); } + +#endif + + +#define LZMA_NUM_REPS 4 + +typedef UInt16 CState; +typedef UInt16 CExtra; + +typedef struct +{ + UInt32 price; + CState state; + CExtra extra; + // 0 : normal + // 1 : LIT : MATCH + // > 1 : MATCH (extra-1) : LIT : REP0 (len) + UInt32 len; + UInt32 dist; + UInt32 reps[LZMA_NUM_REPS]; +} COptimal; + + +// 18.06 +#define kNumOpts (1 << 11) +#define kPackReserve (kNumOpts * 8) +// #define kNumOpts (1 << 12) +// #define kPackReserve (1 + kNumOpts * 2) + +#define kNumLenToPosStates 4 +#define kNumPosSlotBits 6 +#define kDicLogSizeMin 0 +#define kDicLogSizeMax 32 +#define kDistTableSizeMax (kDicLogSizeMax * 2) + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) +#define kAlignMask (kAlignTableSize - 1) + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +typedef +#ifdef _LZMA_PROB32 + UInt32 +#else + UInt16 +#endif + CLzmaProb; + +#define LZMA_PB_MAX 4 +#define LZMA_LC_MAX 8 +#define LZMA_LP_MAX 4 + +#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) +#define kLenNumSymbolsTotal (kLenNumLowSymbols * 2 + kLenNumHighSymbols) + +#define LZMA_MATCH_LEN_MIN 2 +#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) + +#define kNumStates 12 + + +typedef struct +{ + CLzmaProb low[LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)]; + CLzmaProb high[kLenNumHighSymbols]; +} CLenEnc; + + +typedef struct +{ + unsigned tableSize; + UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; + // UInt32 prices1[LZMA_NUM_PB_STATES_MAX][kLenNumLowSymbols * 2]; + // UInt32 prices2[kLenNumSymbolsTotal]; +} CLenPriceEnc; + +#define GET_PRICE_LEN(p, posState, len) \ + ((p)->prices[posState][(size_t)(len) - LZMA_MATCH_LEN_MIN]) + +/* +#define GET_PRICE_LEN(p, posState, len) \ + ((p)->prices2[(size_t)(len) - 2] + ((p)->prices1[posState][((len) - 2) & (kLenNumLowSymbols * 2 - 1)] & (((len) - 2 - kLenNumLowSymbols * 2) >> 9))) +*/ + +typedef struct +{ + UInt32 range; + unsigned cache; + UInt64 low; + UInt64 cacheSize; + Byte *buf; + Byte *bufLim; + Byte *bufBase; + ISeqOutStream *outStream; + UInt64 processed; + SRes res; +} CRangeEnc; + + +typedef struct +{ + CLzmaProb *litProbs; + + unsigned state; + UInt32 reps[LZMA_NUM_REPS]; + + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances]; + + CLenEnc lenProbs; + CLenEnc repLenProbs; + +} CSaveState; + + +typedef UInt32 CProbPrice; + + +typedef struct +{ + void *matchFinderObj; + IMatchFinder matchFinder; + + unsigned optCur; + unsigned optEnd; + + unsigned longestMatchLen; + unsigned numPairs; + UInt32 numAvail; + + unsigned state; + unsigned numFastBytes; + unsigned additionalOffset; + UInt32 reps[LZMA_NUM_REPS]; + unsigned lpMask, pbMask; + CLzmaProb *litProbs; + CRangeEnc rc; + + UInt32 backRes; + + unsigned lc, lp, pb; + unsigned lclp; + + BoolInt fastMode; + BoolInt writeEndMark; + BoolInt finished; + BoolInt multiThread; + BoolInt needInit; + // BoolInt _maxMode; + + UInt64 nowPos64; + + unsigned matchPriceCount; + // unsigned alignPriceCount; + int repLenEncCounter; + + unsigned distTableSize; + + UInt32 dictSize; + SRes result; + + #ifndef _7ZIP_ST + BoolInt mtMode; + // begin of CMatchFinderMt is used in LZ thread + CMatchFinderMt matchFinderMt; + // end of CMatchFinderMt is used in BT and HASH threads + #endif + + CMatchFinder matchFinderBase; + + #ifndef _7ZIP_ST + Byte pad[128]; + #endif + + // LZ thread + CProbPrice ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + + UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; + + UInt32 alignPrices[kAlignTableSize]; + UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; + UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; + + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances]; + + CLenEnc lenProbs; + CLenEnc repLenProbs; + + #ifndef LZMA_LOG_BSR + Byte g_FastPos[1 << kNumLogBits]; + #endif + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + COptimal opt[kNumOpts]; + + CSaveState saveState; + + #ifndef _7ZIP_ST + Byte pad2[128]; + #endif +} CLzmaEnc; + + + +#define COPY_ARR(dest, src, arr) memcpy(dest->arr, src->arr, sizeof(src->arr)); + +void LzmaEnc_SaveState(CLzmaEncHandle pp) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CSaveState *dest = &p->saveState; + + dest->state = p->state; + + dest->lenProbs = p->lenProbs; + dest->repLenProbs = p->repLenProbs; + + COPY_ARR(dest, p, reps); + + COPY_ARR(dest, p, posAlignEncoder); + COPY_ARR(dest, p, isRep); + COPY_ARR(dest, p, isRepG0); + COPY_ARR(dest, p, isRepG1); + COPY_ARR(dest, p, isRepG2); + COPY_ARR(dest, p, isMatch); + COPY_ARR(dest, p, isRep0Long); + COPY_ARR(dest, p, posSlotEncoder); + COPY_ARR(dest, p, posEncoders); + + memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << p->lclp) * sizeof(CLzmaProb)); +} + + +void LzmaEnc_RestoreState(CLzmaEncHandle pp) +{ + CLzmaEnc *dest = (CLzmaEnc *)pp; + const CSaveState *p = &dest->saveState; + + dest->state = p->state; + + dest->lenProbs = p->lenProbs; + dest->repLenProbs = p->repLenProbs; + + COPY_ARR(dest, p, reps); + + COPY_ARR(dest, p, posAlignEncoder); + COPY_ARR(dest, p, isRep); + COPY_ARR(dest, p, isRepG0); + COPY_ARR(dest, p, isRepG1); + COPY_ARR(dest, p, isRepG2); + COPY_ARR(dest, p, isMatch); + COPY_ARR(dest, p, isRep0Long); + COPY_ARR(dest, p, posSlotEncoder); + COPY_ARR(dest, p, posEncoders); + + memcpy(dest->litProbs, p->litProbs, ((UInt32)0x300 << dest->lclp) * sizeof(CLzmaProb)); +} + + + +SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + + if (props.lc > LZMA_LC_MAX + || props.lp > LZMA_LP_MAX + || props.pb > LZMA_PB_MAX + || props.dictSize > ((UInt64)1 << kDicLogSizeMaxCompress) + || props.dictSize > kLzmaMaxHistorySize) + return SZ_ERROR_PARAM; + + p->dictSize = props.dictSize; + { + unsigned fb = props.fb; + if (fb < 5) + fb = 5; + if (fb > LZMA_MATCH_LEN_MAX) + fb = LZMA_MATCH_LEN_MAX; + p->numFastBytes = fb; + } + p->lc = props.lc; + p->lp = props.lp; + p->pb = props.pb; + p->fastMode = (props.algo == 0); + // p->_maxMode = True; + p->matchFinderBase.btMode = (Byte)(props.btMode ? 1 : 0); + { + unsigned numHashBytes = 4; + if (props.btMode) + { + if (props.numHashBytes < 2) + numHashBytes = 2; + else if (props.numHashBytes < 4) + numHashBytes = props.numHashBytes; + } + p->matchFinderBase.numHashBytes = numHashBytes; + } + + p->matchFinderBase.cutValue = props.mc; + + p->writeEndMark = props.writeEndMark; + + #ifndef _7ZIP_ST + /* + if (newMultiThread != _multiThread) + { + ReleaseMatchFinder(); + _multiThread = newMultiThread; + } + */ + p->multiThread = (props.numThreads > 1); + #endif + + return SZ_OK; +} + + +void LzmaEnc_SetDataSize(CLzmaEncHandle pp, UInt64 expectedDataSiize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.expectedDataSize = expectedDataSiize; +} + + +#define kState_Start 0 +#define kState_LitAfterMatch 4 +#define kState_LitAfterRep 5 +#define kState_MatchAfterLit 7 +#define kState_RepAfterLit 8 + +static const Byte kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; +static const Byte kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; +static const Byte kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; +static const Byte kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; + +#define IsLitState(s) ((s) < 7) +#define GetLenToPosState2(len) (((len) < kNumLenToPosStates - 1) ? (len) : kNumLenToPosStates - 1) +#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) + +#define kInfinityPrice (1 << 30) + +static void RangeEnc_Construct(CRangeEnc *p) +{ + p->outStream = NULL; + p->bufBase = NULL; +} + +#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) +#define RangeEnc_GetProcessed_sizet(p) ((size_t)(p)->processed + ((p)->buf - (p)->bufBase) + (size_t)(p)->cacheSize) + +#define RC_BUF_SIZE (1 << 16) + +static int RangeEnc_Alloc(CRangeEnc *p, ISzAllocPtr alloc) +{ + if (!p->bufBase) + { + p->bufBase = (Byte *)ISzAlloc_Alloc(alloc, RC_BUF_SIZE); + if (!p->bufBase) + return 0; + p->bufLim = p->bufBase + RC_BUF_SIZE; + } + return 1; +} + +static void RangeEnc_Free(CRangeEnc *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->bufBase); + p->bufBase = 0; +} + +static void RangeEnc_Init(CRangeEnc *p) +{ + /* Stream.Init(); */ + p->range = 0xFFFFFFFF; + p->cache = 0; + p->low = 0; + p->cacheSize = 0; + + p->buf = p->bufBase; + + p->processed = 0; + p->res = SZ_OK; +} + +MY_NO_INLINE static void RangeEnc_FlushStream(CRangeEnc *p) +{ + size_t num; + if (p->res != SZ_OK) + return; + num = p->buf - p->bufBase; + if (num != ISeqOutStream_Write(p->outStream, p->bufBase, num)) + p->res = SZ_ERROR_WRITE; + p->processed += num; + p->buf = p->bufBase; +} + +MY_NO_INLINE static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) +{ + UInt32 low = (UInt32)p->low; + unsigned high = (unsigned)(p->low >> 32); + p->low = (UInt32)(low << 8); + if (low < (UInt32)0xFF000000 || high != 0) + { + { + Byte *buf = p->buf; + *buf++ = (Byte)(p->cache + high); + p->cache = (unsigned)(low >> 24); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + if (p->cacheSize == 0) + return; + } + high += 0xFF; + for (;;) + { + Byte *buf = p->buf; + *buf++ = (Byte)(high); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + if (--p->cacheSize == 0) + return; + } + } + p->cacheSize++; +} + +static void RangeEnc_FlushData(CRangeEnc *p) +{ + int i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + +#define RC_NORM(p) if (range < kTopValue) { range <<= 8; RangeEnc_ShiftLow(p); } + +#define RC_BIT_PRE(p, prob) \ + ttt = *(prob); \ + newBound = (range >> kNumBitModelTotalBits) * ttt; + +// #define _LZMA_ENC_USE_BRANCH + +#ifdef _LZMA_ENC_USE_BRANCH + +#define RC_BIT(p, prob, bit) { \ + RC_BIT_PRE(p, prob) \ + if (bit == 0) { range = newBound; ttt += (kBitModelTotal - ttt) >> kNumMoveBits; } \ + else { (p)->low += newBound; range -= newBound; ttt -= ttt >> kNumMoveBits; } \ + *(prob) = (CLzmaProb)ttt; \ + RC_NORM(p) \ + } + +#else + +#define RC_BIT(p, prob, bit) { \ + UInt32 mask; \ + RC_BIT_PRE(p, prob) \ + mask = 0 - (UInt32)bit; \ + range &= mask; \ + mask &= newBound; \ + range -= mask; \ + (p)->low += mask; \ + mask = (UInt32)bit - 1; \ + range += newBound & mask; \ + mask &= (kBitModelTotal - ((1 << kNumMoveBits) - 1)); \ + mask += ((1 << kNumMoveBits) - 1); \ + ttt += (Int32)(mask - ttt) >> kNumMoveBits; \ + *(prob) = (CLzmaProb)ttt; \ + RC_NORM(p) \ + } + +#endif + + + + +#define RC_BIT_0_BASE(p, prob) \ + range = newBound; *(prob) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); + +#define RC_BIT_1_BASE(p, prob) \ + range -= newBound; (p)->low += newBound; *(prob) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); \ + +#define RC_BIT_0(p, prob) \ + RC_BIT_0_BASE(p, prob) \ + RC_NORM(p) + +#define RC_BIT_1(p, prob) \ + RC_BIT_1_BASE(p, prob) \ + RC_NORM(p) + +static void RangeEnc_EncodeBit_0(CRangeEnc *p, CLzmaProb *prob) +{ + UInt32 range, ttt, newBound; + range = p->range; + RC_BIT_PRE(p, prob) + RC_BIT_0(p, prob) + p->range = range; +} + +static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym) +{ + UInt32 range = p->range; + sym |= 0x100; + do + { + UInt32 ttt, newBound; + // RangeEnc_EncodeBit(p, probs + (sym >> 8), (sym >> 7) & 1); + CLzmaProb *prob = probs + (sym >> 8); + UInt32 bit = (sym >> 7) & 1; + sym <<= 1; + RC_BIT(p, prob, bit); + } + while (sym < 0x10000); + p->range = range; +} + +static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte) +{ + UInt32 range = p->range; + UInt32 offs = 0x100; + sym |= 0x100; + do + { + UInt32 ttt, newBound; + CLzmaProb *prob; + UInt32 bit; + matchByte <<= 1; + // RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (sym >> 8)), (sym >> 7) & 1); + prob = probs + (offs + (matchByte & offs) + (sym >> 8)); + bit = (sym >> 7) & 1; + sym <<= 1; + offs &= ~(matchByte ^ sym); + RC_BIT(p, prob, bit); + } + while (sym < 0x10000); + p->range = range; +} + + + +static void LzmaEnc_InitPriceTables(CProbPrice *ProbPrices) +{ + UInt32 i; + for (i = 0; i < (kBitModelTotal >> kNumMoveReducingBits); i++) + { + const unsigned kCyclesBits = kNumBitPriceShiftBits; + UInt32 w = (i << kNumMoveReducingBits) + (1 << (kNumMoveReducingBits - 1)); + unsigned bitCount = 0; + unsigned j; + for (j = 0; j < kCyclesBits; j++) + { + w = w * w; + bitCount <<= 1; + while (w >= ((UInt32)1 << 16)) + { + w >>= 1; + bitCount++; + } + } + ProbPrices[i] = (CProbPrice)((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); + // printf("\n%3d: %5d", i, ProbPrices[i]); + } +} + + +#define GET_PRICE(prob, bit) \ + p->ProbPrices[((prob) ^ (unsigned)(((-(int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICEa(prob, bit) \ + ProbPrices[((prob) ^ (unsigned)((-((int)(bit))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +#define GET_PRICEa_0(prob) ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICEa_1(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + + +static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices) +{ + UInt32 price = 0; + sym |= 0x100; + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[sym], bit); + } + while (sym >= 2); + return price; +} + + +static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const CProbPrice *ProbPrices) +{ + UInt32 price = 0; + UInt32 offs = 0x100; + sym |= 0x100; + do + { + matchByte <<= 1; + price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1); + sym <<= 1; + offs &= ~(matchByte ^ sym); + } + while (sym < 0x10000); + return price; +} + + +static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym) +{ + UInt32 range = rc->range; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + unsigned bit = sym & 1; + // RangeEnc_EncodeBit(rc, probs + m, bit); + sym >>= 1; + RC_BIT(rc, probs + m, bit); + m = (m << 1) | bit; + } + while (--numBits); + rc->range = range; +} + + + +static void LenEnc_Init(CLenEnc *p) +{ + unsigned i; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << (kLenNumLowBits + 1)); i++) + p->low[i] = kProbInitValue; + for (i = 0; i < kLenNumHighSymbols; i++) + p->high[i] = kProbInitValue; +} + +static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, unsigned sym, unsigned posState) +{ + UInt32 range, ttt, newBound; + CLzmaProb *probs = p->low; + range = rc->range; + RC_BIT_PRE(rc, probs); + if (sym >= kLenNumLowSymbols) + { + RC_BIT_1(rc, probs); + probs += kLenNumLowSymbols; + RC_BIT_PRE(rc, probs); + if (sym >= kLenNumLowSymbols * 2) + { + RC_BIT_1(rc, probs); + rc->range = range; + // RcTree_Encode(rc, p->high, kLenNumHighBits, sym - kLenNumLowSymbols * 2); + LitEnc_Encode(rc, p->high, sym - kLenNumLowSymbols * 2); + return; + } + sym -= kLenNumLowSymbols; + } + + // RcTree_Encode(rc, probs + (posState << kLenNumLowBits), kLenNumLowBits, sym); + { + unsigned m; + unsigned bit; + RC_BIT_0(rc, probs); + probs += (posState << (1 + kLenNumLowBits)); + bit = (sym >> 2) ; RC_BIT(rc, probs + 1, bit); m = (1 << 1) + bit; + bit = (sym >> 1) & 1; RC_BIT(rc, probs + m, bit); m = (m << 1) + bit; + bit = sym & 1; RC_BIT(rc, probs + m, bit); + rc->range = range; + } +} + +static void SetPrices_3(const CLzmaProb *probs, UInt32 startPrice, UInt32 *prices, const CProbPrice *ProbPrices) +{ + unsigned i; + for (i = 0; i < 8; i += 2) + { + UInt32 price = startPrice; + UInt32 prob; + price += GET_PRICEa(probs[1 ], (i >> 2)); + price += GET_PRICEa(probs[2 + (i >> 2)], (i >> 1) & 1); + prob = probs[4 + (i >> 1)]; + prices[i ] = price + GET_PRICEa_0(prob); + prices[i + 1] = price + GET_PRICEa_1(prob); + } +} + + +MY_NO_INLINE static void MY_FAST_CALL LenPriceEnc_UpdateTables( + CLenPriceEnc *p, + unsigned numPosStates, + const CLenEnc *enc, + const CProbPrice *ProbPrices) +{ + UInt32 b; + + { + unsigned prob = enc->low[0]; + UInt32 a, c; + unsigned posState; + b = GET_PRICEa_1(prob); + a = GET_PRICEa_0(prob); + c = b + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); + for (posState = 0; posState < numPosStates; posState++) + { + UInt32 *prices = p->prices[posState]; + const CLzmaProb *probs = enc->low + (posState << (1 + kLenNumLowBits)); + SetPrices_3(probs, a, prices, ProbPrices); + SetPrices_3(probs + kLenNumLowSymbols, c, prices + kLenNumLowSymbols, ProbPrices); + } + } + + /* + { + unsigned i; + UInt32 b; + a = GET_PRICEa_0(enc->low[0]); + for (i = 0; i < kLenNumLowSymbols; i++) + p->prices2[i] = a; + a = GET_PRICEa_1(enc->low[0]); + b = a + GET_PRICEa_0(enc->low[kLenNumLowSymbols]); + for (i = kLenNumLowSymbols; i < kLenNumLowSymbols * 2; i++) + p->prices2[i] = b; + a += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); + } + */ + + // p->counter = numSymbols; + // p->counter = 64; + + { + unsigned i = p->tableSize; + + if (i > kLenNumLowSymbols * 2) + { + const CLzmaProb *probs = enc->high; + UInt32 *prices = p->prices[0] + kLenNumLowSymbols * 2; + i -= kLenNumLowSymbols * 2 - 1; + i >>= 1; + b += GET_PRICEa_1(enc->low[kLenNumLowSymbols]); + do + { + /* + p->prices2[i] = a + + // RcTree_GetPrice(enc->high, kLenNumHighBits, i - kLenNumLowSymbols * 2, ProbPrices); + LitEnc_GetPrice(probs, i - kLenNumLowSymbols * 2, ProbPrices); + */ + // UInt32 price = a + RcTree_GetPrice(probs, kLenNumHighBits - 1, sym, ProbPrices); + unsigned sym = --i + (1 << (kLenNumHighBits - 1)); + UInt32 price = b; + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[sym], bit); + } + while (sym >= 2); + + { + unsigned prob = probs[(size_t)i + (1 << (kLenNumHighBits - 1))]; + prices[(size_t)i * 2 ] = price + GET_PRICEa_0(prob); + prices[(size_t)i * 2 + 1] = price + GET_PRICEa_1(prob); + } + } + while (i); + + { + unsigned posState; + size_t num = (p->tableSize - kLenNumLowSymbols * 2) * sizeof(p->prices[0][0]); + for (posState = 1; posState < numPosStates; posState++) + memcpy(p->prices[posState] + kLenNumLowSymbols * 2, p->prices[0] + kLenNumLowSymbols * 2, num); + } + } + } +} + +/* + #ifdef SHOW_STAT + g_STAT_OFFSET += num; + printf("\n MovePos %u", num); + #endif +*/ + +#define MOVE_POS(p, num) { \ + p->additionalOffset += (num); \ + p->matchFinder.Skip(p->matchFinderObj, (UInt32)(num)); } + + +static unsigned ReadMatchDistances(CLzmaEnc *p, unsigned *numPairsRes) +{ + unsigned numPairs; + + p->additionalOffset++; + p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); + numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); + *numPairsRes = numPairs; + + #ifdef SHOW_STAT + printf("\n i = %u numPairs = %u ", g_STAT_OFFSET, numPairs / 2); + g_STAT_OFFSET++; + { + unsigned i; + for (i = 0; i < numPairs; i += 2) + printf("%2u %6u | ", p->matches[i], p->matches[i + 1]); + } + #endif + + if (numPairs == 0) + return 0; + { + unsigned len = p->matches[(size_t)numPairs - 2]; + if (len != p->numFastBytes) + return len; + { + UInt32 numAvail = p->numAvail; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + { + const Byte *p1 = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + const Byte *p2 = p1 + len; + ptrdiff_t dif = (ptrdiff_t)-1 - p->matches[(size_t)numPairs - 1]; + const Byte *lim = p1 + numAvail; + for (; p2 != lim && *p2 == p2[dif]; p2++) + {} + return (unsigned)(p2 - p1); + } + } + } +} + +#define MARK_LIT ((UInt32)(Int32)-1) + +#define MakeAs_Lit(p) { (p)->dist = MARK_LIT; (p)->extra = 0; } +#define MakeAs_ShortRep(p) { (p)->dist = 0; (p)->extra = 0; } +#define IsShortRep(p) ((p)->dist == 0) + + +#define GetPrice_ShortRep(p, state, posState) \ + ( GET_PRICE_0(p->isRepG0[state]) + GET_PRICE_0(p->isRep0Long[state][posState])) + +#define GetPrice_Rep_0(p, state, posState) ( \ + GET_PRICE_1(p->isMatch[state][posState]) \ + + GET_PRICE_1(p->isRep0Long[state][posState])) \ + + GET_PRICE_1(p->isRep[state]) \ + + GET_PRICE_0(p->isRepG0[state]) + +MY_FORCE_INLINE +static UInt32 GetPrice_PureRep(const CLzmaEnc *p, unsigned repIndex, size_t state, size_t posState) +{ + UInt32 price; + UInt32 prob = p->isRepG0[state]; + if (repIndex == 0) + { + price = GET_PRICE_0(prob); + price += GET_PRICE_1(p->isRep0Long[state][posState]); + } + else + { + price = GET_PRICE_1(prob); + prob = p->isRepG1[state]; + if (repIndex == 1) + price += GET_PRICE_0(prob); + else + { + price += GET_PRICE_1(prob); + price += GET_PRICE(p->isRepG2[state], repIndex - 2); + } + } + return price; +} + + +static unsigned Backward(CLzmaEnc *p, unsigned cur) +{ + unsigned wr = cur + 1; + p->optEnd = wr; + + for (;;) + { + UInt32 dist = p->opt[cur].dist; + unsigned len = (unsigned)p->opt[cur].len; + unsigned extra = (unsigned)p->opt[cur].extra; + cur -= len; + + if (extra) + { + wr--; + p->opt[wr].len = (UInt32)len; + cur -= extra; + len = extra; + if (extra == 1) + { + p->opt[wr].dist = dist; + dist = MARK_LIT; + } + else + { + p->opt[wr].dist = 0; + len--; + wr--; + p->opt[wr].dist = MARK_LIT; + p->opt[wr].len = 1; + } + } + + if (cur == 0) + { + p->backRes = dist; + p->optCur = wr; + return len; + } + + wr--; + p->opt[wr].dist = dist; + p->opt[wr].len = (UInt32)len; + } +} + + + +#define LIT_PROBS(pos, prevByte) \ + (p->litProbs + (UInt32)3 * (((((pos) << 8) + (prevByte)) & p->lpMask) << p->lc)) + + +static unsigned GetOptimum(CLzmaEnc *p, UInt32 position) +{ + unsigned last, cur; + UInt32 reps[LZMA_NUM_REPS]; + unsigned repLens[LZMA_NUM_REPS]; + UInt32 *matches; + + { + UInt32 numAvail; + unsigned numPairs, mainLen, repMaxIndex, i, posState; + UInt32 matchPrice, repMatchPrice; + const Byte *data; + Byte curByte, matchByte; + + p->optCur = p->optEnd = 0; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLen; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + if (numAvail < 2) + { + p->backRes = MARK_LIT; + return 1; + } + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repMaxIndex = 0; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len; + const Byte *data2; + reps[i] = p->reps[i]; + data2 = data - reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + { + repLens[i] = 0; + continue; + } + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + repLens[i] = len; + if (len > repLens[repMaxIndex]) + repMaxIndex = i; + } + + if (repLens[repMaxIndex] >= p->numFastBytes) + { + unsigned len; + p->backRes = (UInt32)repMaxIndex; + len = repLens[repMaxIndex]; + MOVE_POS(p, len - 1) + return len; + } + + matches = p->matches; + + if (mainLen >= p->numFastBytes) + { + p->backRes = matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; + MOVE_POS(p, mainLen - 1) + return mainLen; + } + + curByte = *data; + matchByte = *(data - reps[0]); + + last = repLens[repMaxIndex]; + if (last <= mainLen) + last = mainLen; + + if (last < 2 && curByte != matchByte) + { + p->backRes = MARK_LIT; + return 1; + } + + p->opt[0].state = (CState)p->state; + + posState = (position & p->pbMask); + + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + + (!IsLitState(p->state) ? + LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + MakeAs_Lit(&p->opt[1]); + + matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); + + // 18.06 + if (matchByte == curByte && repLens[0] == 0) + { + UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, p->state, posState); + if (shortRepPrice < p->opt[1].price) + { + p->opt[1].price = shortRepPrice; + MakeAs_ShortRep(&p->opt[1]); + } + if (last < 2) + { + p->backRes = p->opt[1].dist; + return 1; + } + } + + p->opt[1].len = 1; + + p->opt[0].reps[0] = reps[0]; + p->opt[0].reps[1] = reps[1]; + p->opt[0].reps[2] = reps[2]; + p->opt[0].reps[3] = reps[3]; + + // ---------- REP ---------- + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned repLen = repLens[i]; + UInt32 price; + if (repLen < 2) + continue; + price = repMatchPrice + GetPrice_PureRep(p, i, p->state, posState); + do + { + UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, repLen); + COptimal *opt = &p->opt[repLen]; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)repLen; + opt->dist = (UInt32)i; + opt->extra = 0; + } + } + while (--repLen >= 2); + } + + + // ---------- MATCH ---------- + { + unsigned len = repLens[0] + 1; + if (len <= mainLen) + { + unsigned offs = 0; + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); + + if (len < 2) + len = 2; + else + while (len > matches[offs]) + offs += 2; + + for (; ; len++) + { + COptimal *opt; + UInt32 dist = matches[(size_t)offs + 1]; + UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); + unsigned lenToPosState = GetLenToPosState(len); + + if (dist < kNumFullDistances) + price += p->distancesPrices[lenToPosState][dist & (kNumFullDistances - 1)]; + else + { + unsigned slot; + GetPosSlot2(dist, slot); + price += p->alignPrices[dist & kAlignMask]; + price += p->posSlotPrices[lenToPosState][slot]; + } + + opt = &p->opt[len]; + + if (price < opt->price) + { + opt->price = price; + opt->len = (UInt32)len; + opt->dist = dist + LZMA_NUM_REPS; + opt->extra = 0; + } + + if (len == matches[offs]) + { + offs += 2; + if (offs == numPairs) + break; + } + } + } + } + + + cur = 0; + + #ifdef SHOW_STAT2 + /* if (position >= 0) */ + { + unsigned i; + printf("\n pos = %4X", position); + for (i = cur; i <= last; i++) + printf("\nprice[%4X] = %u", position - cur + i, p->opt[i].price); + } + #endif + } + + + + // ---------- Optimal Parsing ---------- + + for (;;) + { + unsigned numAvail; + UInt32 numAvailFull; + unsigned newLen, numPairs, prev, state, posState, startLen; + UInt32 litPrice, matchPrice, repMatchPrice; + BoolInt nextIsLit; + Byte curByte, matchByte; + const Byte *data; + COptimal *curOpt, *nextOpt; + + if (++cur == last) + break; + + // 18.06 + if (cur >= kNumOpts - 64) + { + unsigned j, best; + UInt32 price = p->opt[cur].price; + best = cur; + for (j = cur + 1; j <= last; j++) + { + UInt32 price2 = p->opt[j].price; + if (price >= price2) + { + price = price2; + best = j; + } + } + { + unsigned delta = best - cur; + if (delta != 0) + { + MOVE_POS(p, delta); + } + } + cur = best; + break; + } + + newLen = ReadMatchDistances(p, &numPairs); + + if (newLen >= p->numFastBytes) + { + p->numPairs = numPairs; + p->longestMatchLen = newLen; + break; + } + + curOpt = &p->opt[cur]; + + position++; + + // we need that check here, if skip_items in p->opt are possible + /* + if (curOpt->price >= kInfinityPrice) + continue; + */ + + prev = cur - curOpt->len; + + if (curOpt->len == 1) + { + state = (unsigned)p->opt[prev].state; + if (IsShortRep(curOpt)) + state = kShortRepNextStates[state]; + else + state = kLiteralNextStates[state]; + } + else + { + const COptimal *prevOpt; + UInt32 b0; + UInt32 dist = curOpt->dist; + + if (curOpt->extra) + { + prev -= (unsigned)curOpt->extra; + state = kState_RepAfterLit; + if (curOpt->extra == 1) + state = (dist < LZMA_NUM_REPS ? kState_RepAfterLit : kState_MatchAfterLit); + } + else + { + state = (unsigned)p->opt[prev].state; + if (dist < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + + prevOpt = &p->opt[prev]; + b0 = prevOpt->reps[0]; + + if (dist < LZMA_NUM_REPS) + { + if (dist == 0) + { + reps[0] = b0; + reps[1] = prevOpt->reps[1]; + reps[2] = prevOpt->reps[2]; + reps[3] = prevOpt->reps[3]; + } + else + { + reps[1] = b0; + b0 = prevOpt->reps[1]; + if (dist == 1) + { + reps[0] = b0; + reps[2] = prevOpt->reps[2]; + reps[3] = prevOpt->reps[3]; + } + else + { + reps[2] = b0; + reps[0] = prevOpt->reps[dist]; + reps[3] = prevOpt->reps[dist ^ 1]; + } + } + } + else + { + reps[0] = (dist - LZMA_NUM_REPS + 1); + reps[1] = b0; + reps[2] = prevOpt->reps[1]; + reps[3] = prevOpt->reps[2]; + } + } + + curOpt->state = (CState)state; + curOpt->reps[0] = reps[0]; + curOpt->reps[1] = reps[1]; + curOpt->reps[2] = reps[2]; + curOpt->reps[3] = reps[3]; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + curByte = *data; + matchByte = *(data - reps[0]); + + posState = (position & p->pbMask); + + /* + The order of Price checks: + < LIT + <= SHORT_REP + < LIT : REP_0 + < REP [ : LIT : REP_0 ] + < MATCH [ : LIT : REP_0 ] + */ + + { + UInt32 curPrice = curOpt->price; + unsigned prob = p->isMatch[state][posState]; + matchPrice = curPrice + GET_PRICE_1(prob); + litPrice = curPrice + GET_PRICE_0(prob); + } + + nextOpt = &p->opt[(size_t)cur + 1]; + nextIsLit = False; + + // here we can allow skip_items in p->opt, if we don't check (nextOpt->price < kInfinityPrice) + // 18.new.06 + if ((nextOpt->price < kInfinityPrice + // && !IsLitState(state) + && matchByte == curByte) + || litPrice > nextOpt->price + ) + litPrice = 0; + else + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + litPrice += (!IsLitState(state) ? + LitEnc_Matched_GetPrice(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + + if (litPrice < nextOpt->price) + { + nextOpt->price = litPrice; + nextOpt->len = 1; + MakeAs_Lit(nextOpt); + nextIsLit = True; + } + } + + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); + + numAvailFull = p->numAvail; + { + unsigned temp = kNumOpts - 1 - cur; + if (numAvailFull > temp) + numAvailFull = (UInt32)temp; + } + + // 18.06 + // ---------- SHORT_REP ---------- + if (IsLitState(state)) // 18.new + if (matchByte == curByte) + if (repMatchPrice < nextOpt->price) // 18.new + // if (numAvailFull < 2 || data[1] != *(data - reps[0] + 1)) + if ( + // nextOpt->price >= kInfinityPrice || + nextOpt->len < 2 // we can check nextOpt->len, if skip items are not allowed in p->opt + || (nextOpt->dist != 0 + // && nextOpt->extra <= 1 // 17.old + ) + ) + { + UInt32 shortRepPrice = repMatchPrice + GetPrice_ShortRep(p, state, posState); + // if (shortRepPrice <= nextOpt->price) // 17.old + if (shortRepPrice < nextOpt->price) // 18.new + { + nextOpt->price = shortRepPrice; + nextOpt->len = 1; + MakeAs_ShortRep(nextOpt); + nextIsLit = False; + } + } + + if (numAvailFull < 2) + continue; + numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); + + // numAvail <= p->numFastBytes + + // ---------- LIT : REP_0 ---------- + + if (!nextIsLit + && litPrice != 0 // 18.new + && matchByte != curByte + && numAvailFull > 2) + { + const Byte *data2 = data - reps[0]; + if (data[1] == data2[1] && data[2] == data2[2]) + { + unsigned len; + unsigned limit = p->numFastBytes + 1; + if (limit > numAvailFull) + limit = numAvailFull; + for (len = 3; len < limit && data[len] == data2[len]; len++) + {} + + { + unsigned state2 = kLiteralNextStates[state]; + unsigned posState2 = (position + 1) & p->pbMask; + UInt32 price = litPrice + GetPrice_Rep_0(p, state2, posState2); + { + unsigned offset = cur + len; + + if (last < offset) + last = offset; + + // do + { + UInt32 price2; + COptimal *opt; + len--; + // price2 = price + GetPrice_Len_Rep_0(p, len, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len); + + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len; + opt->dist = 0; + opt->extra = 1; + } + } + // while (len >= 3); + } + } + } + } + + startLen = 2; /* speed optimization */ + + { + // ---------- REP ---------- + unsigned repIndex = 0; // 17.old + // unsigned repIndex = IsLitState(state) ? 0 : 1; // 18.notused + for (; repIndex < LZMA_NUM_REPS; repIndex++) + { + unsigned len; + UInt32 price; + const Byte *data2 = data - reps[repIndex]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + + // if (len < startLen) continue; // 18.new: speed optimization + + { + unsigned offset = cur + len; + if (last < offset) + last = offset; + } + { + unsigned len2 = len; + price = repMatchPrice + GetPrice_PureRep(p, repIndex, state, posState); + do + { + UInt32 price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState, len2); + COptimal *opt = &p->opt[cur + len2]; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->dist = (UInt32)repIndex; + opt->extra = 0; + } + } + while (--len2 >= 2); + } + + if (repIndex == 0) startLen = len + 1; // 17.old + // startLen = len + 1; // 18.new + + /* if (_maxMode) */ + { + // ---------- REP : LIT : REP_0 ---------- + // numFastBytes + 1 + numFastBytes + + unsigned len2 = len + 1; + unsigned limit = len2 + p->numFastBytes; + if (limit > numAvailFull) + limit = numAvailFull; + + len2 += 2; + if (len2 <= limit) + if (data[len2 - 2] == data2[len2 - 2]) + if (data[len2 - 1] == data2[len2 - 1]) + { + unsigned state2 = kRepNextStates[state]; + unsigned posState2 = (position + len) & p->pbMask; + price += GET_PRICE_LEN(&p->repLenEnc, posState, len) + + GET_PRICE_0(p->isMatch[state2][posState2]) + + LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), + data[len], data2[len], p->ProbPrices); + + // state2 = kLiteralNextStates[state2]; + state2 = kState_LitAfterRep; + posState2 = (posState2 + 1) & p->pbMask; + + + price += GetPrice_Rep_0(p, state2, posState2); + + for (; len2 < limit && data[len2] == data2[len2]; len2++) + {} + + len2 -= len; + // if (len2 >= 3) + { + { + unsigned offset = cur + len + len2; + + if (last < offset) + last = offset; + // do + { + UInt32 price2; + COptimal *opt; + len2--; + // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); + + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->extra = (CExtra)(len + 1); + opt->dist = (UInt32)repIndex; + } + } + // while (len2 >= 3); + } + } + } + } + } + } + + + // ---------- MATCH ---------- + /* for (unsigned len = 2; len <= newLen; len++) */ + if (newLen > numAvail) + { + newLen = numAvail; + for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); + matches[numPairs] = (UInt32)newLen; + numPairs += 2; + } + + // startLen = 2; /* speed optimization */ + + if (newLen >= startLen) + { + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); + UInt32 dist; + unsigned offs, posSlot, len; + + { + unsigned offset = cur + newLen; + if (last < offset) + last = offset; + } + + offs = 0; + while (startLen > matches[offs]) + offs += 2; + dist = matches[(size_t)offs + 1]; + + // if (dist >= kNumFullDistances) + GetPosSlot2(dist, posSlot); + + for (len = /*2*/ startLen; ; len++) + { + UInt32 price = normalMatchPrice + GET_PRICE_LEN(&p->lenEnc, posState, len); + { + COptimal *opt; + unsigned lenNorm = len - 2; + lenNorm = GetLenToPosState2(lenNorm); + if (dist < kNumFullDistances) + price += p->distancesPrices[lenNorm][dist & (kNumFullDistances - 1)]; + else + price += p->posSlotPrices[lenNorm][posSlot] + p->alignPrices[dist & kAlignMask]; + + opt = &p->opt[cur + len]; + if (price < opt->price) + { + opt->price = price; + opt->len = (UInt32)len; + opt->dist = dist + LZMA_NUM_REPS; + opt->extra = 0; + } + } + + if (len == matches[offs]) + { + // if (p->_maxMode) { + // MATCH : LIT : REP_0 + + const Byte *data2 = data - dist - 1; + unsigned len2 = len + 1; + unsigned limit = len2 + p->numFastBytes; + if (limit > numAvailFull) + limit = numAvailFull; + + len2 += 2; + if (len2 <= limit) + if (data[len2 - 2] == data2[len2 - 2]) + if (data[len2 - 1] == data2[len2 - 1]) + { + for (; len2 < limit && data[len2] == data2[len2]; len2++) + {} + + len2 -= len; + + // if (len2 >= 3) + { + unsigned state2 = kMatchNextStates[state]; + unsigned posState2 = (position + len) & p->pbMask; + unsigned offset; + price += GET_PRICE_0(p->isMatch[state2][posState2]); + price += LitEnc_Matched_GetPrice(LIT_PROBS(position + len, data[(size_t)len - 1]), + data[len], data2[len], p->ProbPrices); + + // state2 = kLiteralNextStates[state2]; + state2 = kState_LitAfterMatch; + + posState2 = (posState2 + 1) & p->pbMask; + price += GetPrice_Rep_0(p, state2, posState2); + + offset = cur + len + len2; + + if (last < offset) + last = offset; + // do + { + UInt32 price2; + COptimal *opt; + len2--; + // price2 = price + GetPrice_Len_Rep_0(p, len2, state2, posState2); + price2 = price + GET_PRICE_LEN(&p->repLenEnc, posState2, len2); + opt = &p->opt[offset]; + // offset--; + if (price2 < opt->price) + { + opt->price = price2; + opt->len = (UInt32)len2; + opt->extra = (CExtra)(len + 1); + opt->dist = dist + LZMA_NUM_REPS; + } + } + // while (len2 >= 3); + } + + } + + offs += 2; + if (offs == numPairs) + break; + dist = matches[(size_t)offs + 1]; + // if (dist >= kNumFullDistances) + GetPosSlot2(dist, posSlot); + } + } + } + } + + do + p->opt[last].price = kInfinityPrice; + while (--last); + + return Backward(p, cur); +} + + + +#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) + + + +static unsigned GetOptimumFast(CLzmaEnc *p) +{ + UInt32 numAvail, mainDist; + unsigned mainLen, numPairs, repIndex, repLen, i; + const Byte *data; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLen; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + p->backRes = MARK_LIT; + if (numAvail < 2) + return 1; + // if (mainLen < 2 && p->state == 0) return 1; // 18.06.notused + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repLen = repIndex = 0; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len; + const Byte *data2 = data - p->reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (len = 2; len < numAvail && data[len] == data2[len]; len++) + {} + if (len >= p->numFastBytes) + { + p->backRes = (UInt32)i; + MOVE_POS(p, len - 1) + return len; + } + if (len > repLen) + { + repIndex = i; + repLen = len; + } + } + + if (mainLen >= p->numFastBytes) + { + p->backRes = p->matches[(size_t)numPairs - 1] + LZMA_NUM_REPS; + MOVE_POS(p, mainLen - 1) + return mainLen; + } + + mainDist = 0; /* for GCC */ + + if (mainLen >= 2) + { + mainDist = p->matches[(size_t)numPairs - 1]; + while (numPairs > 2) + { + UInt32 dist2; + if (mainLen != p->matches[(size_t)numPairs - 4] + 1) + break; + dist2 = p->matches[(size_t)numPairs - 3]; + if (!ChangePair(dist2, mainDist)) + break; + numPairs -= 2; + mainLen--; + mainDist = dist2; + } + if (mainLen == 2 && mainDist >= 0x80) + mainLen = 1; + } + + if (repLen >= 2) + if ( repLen + 1 >= mainLen + || (repLen + 2 >= mainLen && mainDist >= (1 << 9)) + || (repLen + 3 >= mainLen && mainDist >= (1 << 15))) + { + p->backRes = (UInt32)repIndex; + MOVE_POS(p, repLen - 1) + return repLen; + } + + if (mainLen < 2 || numAvail <= 2) + return 1; + + { + unsigned len1 = ReadMatchDistances(p, &p->numPairs); + p->longestMatchLen = len1; + + if (len1 >= 2) + { + UInt32 newDist = p->matches[(size_t)p->numPairs - 1]; + if ( (len1 >= mainLen && newDist < mainDist) + || (len1 == mainLen + 1 && !ChangePair(mainDist, newDist)) + || (len1 > mainLen + 1) + || (len1 + 1 >= mainLen && mainLen >= 3 && ChangePair(newDist, mainDist))) + return 1; + } + } + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + unsigned len, limit; + const Byte *data2 = data - p->reps[i]; + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + limit = mainLen - 1; + for (len = 2;; len++) + { + if (len >= limit) + return 1; + if (data[len] != data2[len]) + break; + } + } + + p->backRes = mainDist + LZMA_NUM_REPS; + if (mainLen != 2) + { + MOVE_POS(p, mainLen - 2) + } + return mainLen; +} + + + + +static void WriteEndMarker(CLzmaEnc *p, unsigned posState) +{ + UInt32 range; + range = p->rc.range; + { + UInt32 ttt, newBound; + CLzmaProb *prob = &p->isMatch[p->state][posState]; + RC_BIT_PRE(&p->rc, prob) + RC_BIT_1(&p->rc, prob) + prob = &p->isRep[p->state]; + RC_BIT_PRE(&p->rc, prob) + RC_BIT_0(&p->rc, prob) + } + p->state = kMatchNextStates[p->state]; + + p->rc.range = range; + LenEnc_Encode(&p->lenProbs, &p->rc, 0, posState); + range = p->rc.range; + + { + // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[0], (1 << kNumPosSlotBits) - 1); + CLzmaProb *probs = p->posSlotEncoder[0]; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + RC_BIT_PRE(p, probs + m) + RC_BIT_1(&p->rc, probs + m); + m = (m << 1) + 1; + } + while (m < (1 << kNumPosSlotBits)); + } + { + // RangeEnc_EncodeDirectBits(&p->rc, ((UInt32)1 << (30 - kNumAlignBits)) - 1, 30 - kNumAlignBits); UInt32 range = p->range; + unsigned numBits = 30 - kNumAlignBits; + do + { + range >>= 1; + p->rc.low += range; + RC_NORM(&p->rc) + } + while (--numBits); + } + + { + // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); + CLzmaProb *probs = p->posAlignEncoder; + unsigned m = 1; + do + { + UInt32 ttt, newBound; + RC_BIT_PRE(p, probs + m) + RC_BIT_1(&p->rc, probs + m); + m = (m << 1) + 1; + } + while (m < kAlignTableSize); + } + p->rc.range = range; +} + + +static SRes CheckErrors(CLzmaEnc *p) +{ + if (p->result != SZ_OK) + return p->result; + if (p->rc.res != SZ_OK) + p->result = SZ_ERROR_WRITE; + if (p->matchFinderBase.result != SZ_OK) + p->result = SZ_ERROR_READ; + if (p->result != SZ_OK) + p->finished = True; + return p->result; +} + + +MY_NO_INLINE static SRes Flush(CLzmaEnc *p, UInt32 nowPos) +{ + /* ReleaseMFStream(); */ + p->finished = True; + if (p->writeEndMark) + WriteEndMarker(p, nowPos & p->pbMask); + RangeEnc_FlushData(&p->rc); + RangeEnc_FlushStream(&p->rc); + return CheckErrors(p); +} + + +MY_NO_INLINE static void FillAlignPrices(CLzmaEnc *p) +{ + unsigned i; + const CProbPrice *ProbPrices = p->ProbPrices; + const CLzmaProb *probs = p->posAlignEncoder; + // p->alignPriceCount = 0; + for (i = 0; i < kAlignTableSize / 2; i++) + { + UInt32 price = 0; + unsigned sym = i; + unsigned m = 1; + unsigned bit; + UInt32 prob; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[m], bit); m = (m << 1) + bit; + prob = probs[m]; + p->alignPrices[i ] = price + GET_PRICEa_0(prob); + p->alignPrices[i + 8] = price + GET_PRICEa_1(prob); + // p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); + } +} + + +MY_NO_INLINE static void FillDistancesPrices(CLzmaEnc *p) +{ + // int y; for (y = 0; y < 100; y++) { + + UInt32 tempPrices[kNumFullDistances]; + unsigned i, lps; + + const CProbPrice *ProbPrices = p->ProbPrices; + p->matchPriceCount = 0; + + for (i = kStartPosModelIndex / 2; i < kNumFullDistances / 2; i++) + { + unsigned posSlot = GetPosSlot1(i); + unsigned footerBits = (posSlot >> 1) - 1; + unsigned base = ((2 | (posSlot & 1)) << footerBits); + const CLzmaProb *probs = p->posEncoders + (size_t)base * 2; + // tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base, footerBits, i - base, p->ProbPrices); + UInt32 price = 0; + unsigned m = 1; + unsigned sym = i; + unsigned offset = (unsigned)1 << footerBits; + base += i; + + if (footerBits) + do + { + unsigned bit = sym & 1; + sym >>= 1; + price += GET_PRICEa(probs[m], bit); + m = (m << 1) + bit; + } + while (--footerBits); + + { + unsigned prob = probs[m]; + tempPrices[base ] = price + GET_PRICEa_0(prob); + tempPrices[base + offset] = price + GET_PRICEa_1(prob); + } + } + + for (lps = 0; lps < kNumLenToPosStates; lps++) + { + unsigned slot; + unsigned distTableSize2 = (p->distTableSize + 1) >> 1; + UInt32 *posSlotPrices = p->posSlotPrices[lps]; + const CLzmaProb *probs = p->posSlotEncoder[lps]; + + for (slot = 0; slot < distTableSize2; slot++) + { + // posSlotPrices[slot] = RcTree_GetPrice(encoder, kNumPosSlotBits, slot, p->ProbPrices); + UInt32 price; + unsigned bit; + unsigned sym = slot + (1 << (kNumPosSlotBits - 1)); + unsigned prob; + bit = sym & 1; sym >>= 1; price = GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + bit = sym & 1; sym >>= 1; price += GET_PRICEa(probs[sym], bit); + prob = probs[(size_t)slot + (1 << (kNumPosSlotBits - 1))]; + posSlotPrices[(size_t)slot * 2 ] = price + GET_PRICEa_0(prob); + posSlotPrices[(size_t)slot * 2 + 1] = price + GET_PRICEa_1(prob); + } + + { + UInt32 delta = ((UInt32)((kEndPosModelIndex / 2 - 1) - kNumAlignBits) << kNumBitPriceShiftBits); + for (slot = kEndPosModelIndex / 2; slot < distTableSize2; slot++) + { + posSlotPrices[(size_t)slot * 2 ] += delta; + posSlotPrices[(size_t)slot * 2 + 1] += delta; + delta += ((UInt32)1 << kNumBitPriceShiftBits); + } + } + + { + UInt32 *dp = p->distancesPrices[lps]; + + dp[0] = posSlotPrices[0]; + dp[1] = posSlotPrices[1]; + dp[2] = posSlotPrices[2]; + dp[3] = posSlotPrices[3]; + + for (i = 4; i < kNumFullDistances; i += 2) + { + UInt32 slotPrice = posSlotPrices[GetPosSlot1(i)]; + dp[i ] = slotPrice + tempPrices[i]; + dp[i + 1] = slotPrice + tempPrices[i + 1]; + } + } + } + // } +} + + + +void LzmaEnc_Construct(CLzmaEnc *p) +{ + RangeEnc_Construct(&p->rc); + MatchFinder_Construct(&p->matchFinderBase); + + #ifndef _7ZIP_ST + MatchFinderMt_Construct(&p->matchFinderMt); + p->matchFinderMt.MatchFinder = &p->matchFinderBase; + #endif + + { + CLzmaEncProps props; + LzmaEncProps_Init(&props); + LzmaEnc_SetProps(p, &props); + } + + #ifndef LZMA_LOG_BSR + LzmaEnc_FastPosInit(p->g_FastPos); + #endif + + LzmaEnc_InitPriceTables(p->ProbPrices); + p->litProbs = NULL; + p->saveState.litProbs = NULL; + +} + +CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc) +{ + void *p; + p = ISzAlloc_Alloc(alloc, sizeof(CLzmaEnc)); + if (p) + LzmaEnc_Construct((CLzmaEnc *)p); + return p; +} + +void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->litProbs); + ISzAlloc_Free(alloc, p->saveState.litProbs); + p->litProbs = NULL; + p->saveState.litProbs = NULL; +} + +void LzmaEnc_Destruct(CLzmaEnc *p, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + #ifndef _7ZIP_ST + MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); + #endif + + MatchFinder_Free(&p->matchFinderBase, allocBig); + LzmaEnc_FreeLits(p, alloc); + RangeEnc_Free(&p->rc, alloc); +} + +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); + ISzAlloc_Free(alloc, p); +} + + +static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, UInt32 maxPackSize, UInt32 maxUnpackSize) +{ + UInt32 nowPos32, startPos32; + if (p->needInit) + { + p->matchFinder.Init(p->matchFinderObj); + p->needInit = 0; + } + + if (p->finished) + return p->result; + RINOK(CheckErrors(p)); + + nowPos32 = (UInt32)p->nowPos64; + startPos32 = nowPos32; + + if (p->nowPos64 == 0) + { + unsigned numPairs; + Byte curByte; + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + return Flush(p, nowPos32); + ReadMatchDistances(p, &numPairs); + RangeEnc_EncodeBit_0(&p->rc, &p->isMatch[kState_Start][0]); + // p->state = kLiteralNextStates[p->state]; + curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset); + LitEnc_Encode(&p->rc, p->litProbs, curByte); + p->additionalOffset--; + nowPos32++; + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) + + for (;;) + { + UInt32 dist; + unsigned len, posState; + UInt32 range, ttt, newBound; + CLzmaProb *probs; + + if (p->fastMode) + len = GetOptimumFast(p); + else + { + unsigned oci = p->optCur; + if (p->optEnd == oci) + len = GetOptimum(p, nowPos32); + else + { + const COptimal *opt = &p->opt[oci]; + len = opt->len; + p->backRes = opt->dist; + p->optCur = oci + 1; + } + } + + posState = (unsigned)nowPos32 & p->pbMask; + range = p->rc.range; + probs = &p->isMatch[p->state][posState]; + + RC_BIT_PRE(&p->rc, probs) + + dist = p->backRes; + + #ifdef SHOW_STAT2 + printf("\n pos = %6X, len = %3u pos = %6u", nowPos32, len, dist); + #endif + + if (dist == MARK_LIT) + { + Byte curByte; + const Byte *data; + unsigned state; + + RC_BIT_0(&p->rc, probs); + p->rc.range = range; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; + probs = LIT_PROBS(nowPos32, *(data - 1)); + curByte = *data; + state = p->state; + p->state = kLiteralNextStates[state]; + if (IsLitState(state)) + LitEnc_Encode(&p->rc, probs, curByte); + else + LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0])); + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRep[p->state]; + RC_BIT_PRE(&p->rc, probs) + + if (dist < LZMA_NUM_REPS) + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG0[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 0) + { + RC_BIT_0(&p->rc, probs); + probs = &p->isRep0Long[p->state][posState]; + RC_BIT_PRE(&p->rc, probs) + if (len != 1) + { + RC_BIT_1_BASE(&p->rc, probs); + } + else + { + RC_BIT_0_BASE(&p->rc, probs); + p->state = kShortRepNextStates[p->state]; + } + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG1[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 1) + { + RC_BIT_0_BASE(&p->rc, probs); + dist = p->reps[1]; + } + else + { + RC_BIT_1(&p->rc, probs); + probs = &p->isRepG2[p->state]; + RC_BIT_PRE(&p->rc, probs) + if (dist == 2) + { + RC_BIT_0_BASE(&p->rc, probs); + dist = p->reps[2]; + } + else + { + RC_BIT_1_BASE(&p->rc, probs); + dist = p->reps[3]; + p->reps[3] = p->reps[2]; + } + p->reps[2] = p->reps[1]; + } + p->reps[1] = p->reps[0]; + p->reps[0] = dist; + } + + RC_NORM(&p->rc) + + p->rc.range = range; + + if (len != 1) + { + LenEnc_Encode(&p->repLenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); + --p->repLenEncCounter; + p->state = kRepNextStates[p->state]; + } + } + else + { + unsigned posSlot; + RC_BIT_0(&p->rc, probs); + p->rc.range = range; + p->state = kMatchNextStates[p->state]; + + LenEnc_Encode(&p->lenProbs, &p->rc, len - LZMA_MATCH_LEN_MIN, posState); + // --p->lenEnc.counter; + + dist -= LZMA_NUM_REPS; + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + p->reps[1] = p->reps[0]; + p->reps[0] = dist + 1; + + p->matchPriceCount++; + GetPosSlot(dist, posSlot); + // RcTree_Encode_PosSlot(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], posSlot); + { + UInt32 sym = (UInt32)posSlot + (1 << kNumPosSlotBits); + range = p->rc.range; + probs = p->posSlotEncoder[GetLenToPosState(len)]; + do + { + CLzmaProb *prob = probs + (sym >> kNumPosSlotBits); + UInt32 bit = (sym >> (kNumPosSlotBits - 1)) & 1; + sym <<= 1; + RC_BIT(&p->rc, prob, bit); + } + while (sym < (1 << kNumPosSlotBits * 2)); + p->rc.range = range; + } + + if (dist >= kStartPosModelIndex) + { + unsigned footerBits = ((posSlot >> 1) - 1); + + if (dist < kNumFullDistances) + { + unsigned base = ((2 | (posSlot & 1)) << footerBits); + RcTree_ReverseEncode(&p->rc, p->posEncoders + base, footerBits, (unsigned)(dist /* - base */)); + } + else + { + UInt32 pos2 = (dist | 0xF) << (32 - footerBits); + range = p->rc.range; + // RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); + /* + do + { + range >>= 1; + p->rc.low += range & (0 - ((dist >> --footerBits) & 1)); + RC_NORM(&p->rc) + } + while (footerBits > kNumAlignBits); + */ + do + { + range >>= 1; + p->rc.low += range & (0 - (pos2 >> 31)); + pos2 += pos2; + RC_NORM(&p->rc) + } + while (pos2 != 0xF0000000); + + + // RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); + + { + unsigned m = 1; + unsigned bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; dist >>= 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); m = (m << 1) + bit; + bit = dist & 1; RC_BIT(&p->rc, p->posAlignEncoder + m, bit); + p->rc.range = range; + // p->alignPriceCount++; + } + } + } + } + } + + nowPos32 += (UInt32)len; + p->additionalOffset -= len; + + if (p->additionalOffset == 0) + { + UInt32 processed; + + if (!p->fastMode) + { + /* + if (p->alignPriceCount >= 16) // kAlignTableSize + FillAlignPrices(p); + if (p->matchPriceCount >= 128) + FillDistancesPrices(p); + if (p->lenEnc.counter <= 0) + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + */ + if (p->matchPriceCount >= 64) + { + FillAlignPrices(p); + // { int y; for (y = 0; y < 100; y++) { + FillDistancesPrices(p); + // }} + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + } + if (p->repLenEncCounter <= 0) + { + p->repLenEncCounter = REP_LEN_COUNT; + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); + } + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + break; + processed = nowPos32 - startPos32; + + if (maxPackSize) + { + if (processed + kNumOpts + 300 >= maxUnpackSize + || RangeEnc_GetProcessed_sizet(&p->rc) + kPackReserve >= maxPackSize) + break; + } + else if (processed >= (1 << 17)) + { + p->nowPos64 += nowPos32 - startPos32; + return CheckErrors(p); + } + } + } + + p->nowPos64 += nowPos32 - startPos32; + return Flush(p, nowPos32); +} + + + +#define kBigHashDicLimit ((UInt32)1 << 24) + +static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + UInt32 beforeSize = kNumOpts; + if (!RangeEnc_Alloc(&p->rc, alloc)) + return SZ_ERROR_MEM; + + #ifndef _7ZIP_ST + p->mtMode = (p->multiThread && !p->fastMode && (p->matchFinderBase.btMode != 0)); + #endif + + { + unsigned lclp = p->lc + p->lp; + if (!p->litProbs || !p->saveState.litProbs || p->lclp != lclp) + { + LzmaEnc_FreeLits(p, alloc); + p->litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); + p->saveState.litProbs = (CLzmaProb *)ISzAlloc_Alloc(alloc, ((UInt32)0x300 << lclp) * sizeof(CLzmaProb)); + if (!p->litProbs || !p->saveState.litProbs) + { + LzmaEnc_FreeLits(p, alloc); + return SZ_ERROR_MEM; + } + p->lclp = lclp; + } + } + + p->matchFinderBase.bigHash = (Byte)(p->dictSize > kBigHashDicLimit ? 1 : 0); + + if (beforeSize + p->dictSize < keepWindowSize) + beforeSize = keepWindowSize - p->dictSize; + + #ifndef _7ZIP_ST + if (p->mtMode) + { + RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, + LZMA_MATCH_LEN_MAX + + 1 /* 18.04 */ + , allocBig)); + p->matchFinderObj = &p->matchFinderMt; + p->matchFinderBase.bigHash = (Byte)( + (p->dictSize > kBigHashDicLimit && p->matchFinderBase.hashMask >= 0xFFFFFF) ? 1 : 0); + MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); + } + else + #endif + { + if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) + return SZ_ERROR_MEM; + p->matchFinderObj = &p->matchFinderBase; + MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); + } + + return SZ_OK; +} + +void LzmaEnc_Init(CLzmaEnc *p) +{ + unsigned i; + p->state = 0; + p->reps[0] = + p->reps[1] = + p->reps[2] = + p->reps[3] = 1; + + RangeEnc_Init(&p->rc); + + for (i = 0; i < (1 << kNumAlignBits); i++) + p->posAlignEncoder[i] = kProbInitValue; + + for (i = 0; i < kNumStates; i++) + { + unsigned j; + for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) + { + p->isMatch[i][j] = kProbInitValue; + p->isRep0Long[i][j] = kProbInitValue; + } + p->isRep[i] = kProbInitValue; + p->isRepG0[i] = kProbInitValue; + p->isRepG1[i] = kProbInitValue; + p->isRepG2[i] = kProbInitValue; + } + + { + for (i = 0; i < kNumLenToPosStates; i++) + { + CLzmaProb *probs = p->posSlotEncoder[i]; + unsigned j; + for (j = 0; j < (1 << kNumPosSlotBits); j++) + probs[j] = kProbInitValue; + } + } + { + for (i = 0; i < kNumFullDistances; i++) + p->posEncoders[i] = kProbInitValue; + } + + { + UInt32 num = (UInt32)0x300 << (p->lp + p->lc); + UInt32 k; + CLzmaProb *probs = p->litProbs; + for (k = 0; k < num; k++) + probs[k] = kProbInitValue; + } + + + LenEnc_Init(&p->lenProbs); + LenEnc_Init(&p->repLenProbs); + + p->optEnd = 0; + p->optCur = 0; + + { + for (i = 0; i < kNumOpts; i++) + p->opt[i].price = kInfinityPrice; + } + + p->additionalOffset = 0; + + p->pbMask = (1 << p->pb) - 1; + p->lpMask = ((UInt32)0x100 << p->lp) - ((unsigned)0x100 >> p->lc); +} + + +void LzmaEnc_InitPrices(CLzmaEnc *p) +{ + if (!p->fastMode) + { + FillDistancesPrices(p); + FillAlignPrices(p); + } + + p->lenEnc.tableSize = + p->repLenEnc.tableSize = + p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; + + p->repLenEncCounter = REP_LEN_COUNT; + + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, &p->lenProbs, p->ProbPrices); + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, &p->repLenProbs, p->ProbPrices); +} + +static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + unsigned i; + for (i = kEndPosModelIndex / 2; i < kDicLogSizeMax; i++) + if (p->dictSize <= ((UInt32)1 << i)) + break; + p->distTableSize = i * 2; + + p->finished = False; + p->result = SZ_OK; + RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + p->nowPos64 = 0; + return SZ_OK; +} + +static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + p->rc.outStream = outStream; + return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); +} + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, + ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) +{ + p->matchFinderBase.directInput = 1; + p->matchFinderBase.bufferBase = (Byte *)src; + p->matchFinderBase.directInputRem = srcLen; +} + +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + LzmaEnc_SetInputBuf(p, src, srcLen); + p->needInit = 1; + + LzmaEnc_SetDataSize(pp, srcLen); + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +void LzmaEnc_Finish(CLzmaEncHandle pp) +{ + #ifndef _7ZIP_ST + CLzmaEnc *p = (CLzmaEnc *)pp; + if (p->mtMode) + MatchFinderMt_ReleaseStream(&p->matchFinderMt); + #else + UNUSED_VAR(pp); + #endif +} + + +typedef struct +{ + ISeqOutStream vt; + Byte *data; + SizeT rem; + BoolInt overflow; +} CLzmaEnc_SeqOutStreamBuf; + +static size_t SeqOutStreamBuf_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CLzmaEnc_SeqOutStreamBuf *p = CONTAINER_FROM_VTBL(pp, CLzmaEnc_SeqOutStreamBuf, vt); + if (p->rem < size) + { + size = p->rem; + p->overflow = True; + } + memcpy(p->data, data, size); + p->rem -= size; + p->data += size; + return size; +} + + +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); +} + + +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; +} + + +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + UInt64 nowPos64; + SRes res; + CLzmaEnc_SeqOutStreamBuf outStream; + + outStream.vt.Write = SeqOutStreamBuf_Write; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = False; + p->finished = False; + p->result = SZ_OK; + + if (reInit) + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + + nowPos64 = p->nowPos64; + RangeEnc_Init(&p->rc); + p->rc.outStream = &outStream.vt; + + if (desiredPackSize == 0) + return SZ_ERROR_OUTPUT_EOF; + + res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); + + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + + return res; +} + + +static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) +{ + SRes res = SZ_OK; + + #ifndef _7ZIP_ST + Byte allocaDummy[0x300]; + allocaDummy[0] = 0; + allocaDummy[1] = allocaDummy[0]; + #endif + + for (;;) + { + res = LzmaEnc_CodeOneBlock(p, 0, 0); + if (res != SZ_OK || p->finished) + break; + if (progress) + { + res = ICompressProgress_Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); + if (res != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } + } + } + + LzmaEnc_Finish(p); + + /* + if (res == SZ_OK && !Inline_MatchFinder_IsFinishedOK(&p->matchFinderBase)) + res = SZ_ERROR_FAIL; + } + */ + + return res; +} + + +SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, + ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig)); + return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); +} + + +SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + unsigned i; + UInt32 dictSize = p->dictSize; + if (*size < LZMA_PROPS_SIZE) + return SZ_ERROR_PARAM; + *size = LZMA_PROPS_SIZE; + props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); + + if (dictSize >= ((UInt32)1 << 22)) + { + UInt32 kDictMask = ((UInt32)1 << 20) - 1; + if (dictSize < (UInt32)0xFFFFFFFF - kDictMask) + dictSize = (dictSize + kDictMask) & ~kDictMask; + } + else for (i = 11; i <= 30; i++) + { + if (dictSize <= ((UInt32)2 << i)) { dictSize = (2 << i); break; } + if (dictSize <= ((UInt32)3 << i)) { dictSize = (3 << i); break; } + } + + for (i = 0; i < 4; i++) + props[1 + i] = (Byte)(dictSize >> (8 * i)); + return SZ_OK; +} + + +unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle pp) +{ + return ((CLzmaEnc *)pp)->writeEndMark; +} + + +SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + SRes res; + CLzmaEnc *p = (CLzmaEnc *)pp; + + CLzmaEnc_SeqOutStreamBuf outStream; + + outStream.vt.Write = SeqOutStreamBuf_Write; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = writeEndMark; + p->rc.outStream = &outStream.vt; + + res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig); + + if (res == SZ_OK) + { + res = LzmaEnc_Encode2(p, progress); + if (res == SZ_OK && p->nowPos64 != srcLen) + res = SZ_ERROR_FAIL; + } + + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + return res; +} + + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); + SRes res; + if (!p) + return SZ_ERROR_MEM; + + res = LzmaEnc_SetProps(p, props); + if (res == SZ_OK) + { + res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); + if (res == SZ_OK) + res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, + writeEndMark, progress, alloc, allocBig); + } + + LzmaEnc_Destroy(p, alloc, allocBig); + return res; +} diff --git a/bsnes/lzma/LzmaEnc.h b/bsnes/lzma/LzmaEnc.h new file mode 100644 index 00000000..c9938f04 --- /dev/null +++ b/bsnes/lzma/LzmaEnc.h @@ -0,0 +1,76 @@ +/* LzmaEnc.h -- LZMA Encoder +2017-07-27 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_ENC_H +#define __LZMA_ENC_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaEncProps +{ + int level; /* 0 <= level <= 9 */ + UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version + (1 << 12) <= dictSize <= (3 << 29) for 64-bit version + default = (1 << 24) */ + int lc; /* 0 <= lc <= 8, default = 3 */ + int lp; /* 0 <= lp <= 4, default = 0 */ + int pb; /* 0 <= pb <= 4, default = 2 */ + int algo; /* 0 - fast, 1 - normal, default = 1 */ + int fb; /* 5 <= fb <= 273, default = 32 */ + int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ + int numHashBytes; /* 2, 3 or 4, default = 4 */ + UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ + unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ + int numThreads; /* 1 or 2, default = 2 */ + + UInt64 reduceSize; /* estimated size of data that will be compressed. default = (UInt64)(Int64)-1. + Encoder uses this value to reduce dictionary size */ +} CLzmaEncProps; + +void LzmaEncProps_Init(CLzmaEncProps *p); +void LzmaEncProps_Normalize(CLzmaEncProps *p); +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); + + +/* ---------- CLzmaEncHandle Interface ---------- */ + +/* LzmaEnc* functions can return the following exit codes: +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - ISeqOutStream write callback error + SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - error in multithreading functions (only for Mt version) +*/ + +typedef void * CLzmaEncHandle; + +CLzmaEncHandle LzmaEnc_Create(ISzAllocPtr alloc); +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAllocPtr alloc, ISzAllocPtr allocBig); + +SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); +void LzmaEnc_SetDataSize(CLzmaEncHandle p, UInt64 expectedDataSiize); +SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); +unsigned LzmaEnc_IsWriteEndMark(CLzmaEncHandle p); + +SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); +SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); + + +/* ---------- One Call Interface ---------- */ + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAllocPtr alloc, ISzAllocPtr allocBig); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/LzmaLib.c b/bsnes/lzma/LzmaLib.c new file mode 100644 index 00000000..c10cf1a0 --- /dev/null +++ b/bsnes/lzma/LzmaLib.c @@ -0,0 +1,40 @@ +/* LzmaLib.c -- LZMA library wrapper +2015-06-13 : Igor Pavlov : Public domain */ + +#include "Alloc.h" +#include "LzmaDec.h" +#include "LzmaEnc.h" +#include "LzmaLib.h" + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* use (1 << N) or (3 << N). 4 KB < dictSize <= 128 MB */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ +) +{ + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + props.lc = lc; + props.lp = lp; + props.pb = pb; + props.fb = fb; + props.numThreads = numThreads; + + return LzmaEncode(dest, destLen, src, srcLen, &props, outProps, outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); +} + + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t *srcLen, + const unsigned char *props, size_t propsSize) +{ + ELzmaStatus status; + return LzmaDecode(dest, destLen, src, srcLen, props, (unsigned)propsSize, LZMA_FINISH_ANY, &status, &g_Alloc); +} diff --git a/bsnes/lzma/LzmaLib.h b/bsnes/lzma/LzmaLib.h new file mode 100644 index 00000000..5c35e536 --- /dev/null +++ b/bsnes/lzma/LzmaLib.h @@ -0,0 +1,131 @@ +/* LzmaLib.h -- LZMA library interface +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_LIB_H +#define __LZMA_LIB_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define MY_STDAPI int MY_STD_CALL + +#define LZMA_PROPS_SIZE 5 + +/* +RAM requirements for LZMA: + for compression: (dictSize * 11.5 + 6 MB) + state_size + for decompression: dictSize + state_size + state_size = (4 + (1.5 << (lc + lp))) KB + by default (lc=3, lp=0), state_size = 16 KB. + +LZMA properties (5 bytes) format + Offset Size Description + 0 1 lc, lp and pb in encoded form. + 1 4 dictSize (little endian). +*/ + +/* +LzmaCompress +------------ + +outPropsSize - + In: the pointer to the size of outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + Out: the pointer to the size of written properties in outProps buffer; *outPropsSize = LZMA_PROPS_SIZE = 5. + + LZMA Encoder will use defult values for any parameter, if it is + -1 for any from: level, loc, lp, pb, fb, numThreads + 0 for dictSize + +level - compression level: 0 <= level <= 9; + + level dictSize algo fb + 0: 16 KB 0 32 + 1: 64 KB 0 32 + 2: 256 KB 0 32 + 3: 1 MB 0 32 + 4: 4 MB 0 32 + 5: 16 MB 1 32 + 6: 32 MB 1 32 + 7+: 64 MB 1 64 + + The default value for "level" is 5. + + algo = 0 means fast method + algo = 1 means normal method + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + +lc - The number of literal context bits (high bits of previous literal). + It can be in the range from 0 to 8. The default value is 3. + Sometimes lc=4 gives the gain for big files. + +lp - The number of literal pos bits (low bits of current position for literals). + It can be in the range from 0 to 4. The default value is 0. + The lp switch is intended for periodical data when the period is equal to 2^lp. + For example, for 32-bit (4 bytes) periodical data you can use lp=2. Often it's + better to set lc=0, if you change lp switch. + +pb - The number of pos bits (low bits of current position). + It can be in the range from 0 to 4. The default value is 2. + The pb switch is intended for periodical data when the period is equal 2^pb. + +fb - Word size (the number of fast bytes). + It can be in the range from 5 to 273. The default value is 32. + Usually, a big number gives a little bit better compression ratio and + slower compression process. + +numThreads - The number of thereads. 1 or 2. The default value is 2. + Fast mode (algo = 0) can use only 1 thread. + +Out: + destLen - processed output size +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +MY_STDAPI LzmaCompress(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, + unsigned char *outProps, size_t *outPropsSize, /* *outPropsSize must be = 5 */ + int level, /* 0 <= level <= 9, default = 5 */ + unsigned dictSize, /* default = (1 << 24) */ + int lc, /* 0 <= lc <= 8, default = 3 */ + int lp, /* 0 <= lp <= 4, default = 0 */ + int pb, /* 0 <= pb <= 4, default = 2 */ + int fb, /* 5 <= fb <= 273, default = 32 */ + int numThreads /* 1 or 2, default = 2 */ + ); + +/* +LzmaUncompress +-------------- +In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size +Out: + destLen - processed output size + srcLen - processed input size +Returns: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation arror + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer (src) +*/ + +MY_STDAPI LzmaUncompress(unsigned char *dest, size_t *destLen, const unsigned char *src, SizeT *srcLen, + const unsigned char *props, size_t propsSize); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/MtCoder.c b/bsnes/lzma/MtCoder.c new file mode 100644 index 00000000..5667f2d5 --- /dev/null +++ b/bsnes/lzma/MtCoder.c @@ -0,0 +1,601 @@ +/* MtCoder.c -- Multi-thread Coder +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "MtCoder.h" + +#ifndef _7ZIP_ST + +SRes MtProgressThunk_Progress(const ICompressProgress *pp, UInt64 inSize, UInt64 outSize) +{ + CMtProgressThunk *thunk = CONTAINER_FROM_VTBL(pp, CMtProgressThunk, vt); + UInt64 inSize2 = 0; + UInt64 outSize2 = 0; + if (inSize != (UInt64)(Int64)-1) + { + inSize2 = inSize - thunk->inSize; + thunk->inSize = inSize; + } + if (outSize != (UInt64)(Int64)-1) + { + outSize2 = outSize - thunk->outSize; + thunk->outSize = outSize; + } + return MtProgress_ProgressAdd(thunk->mtProgress, inSize2, outSize2); +} + + +void MtProgressThunk_CreateVTable(CMtProgressThunk *p) +{ + p->vt.Progress = MtProgressThunk_Progress; +} + + + +#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; } + + +static WRes ArEvent_OptCreate_And_Reset(CEvent *p) +{ + if (Event_IsCreated(p)) + return Event_Reset(p); + return AutoResetEvent_CreateNotSignaled(p); +} + + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp); + + +static SRes MtCoderThread_CreateAndStart(CMtCoderThread *t) +{ + WRes wres = ArEvent_OptCreate_And_Reset(&t->startEvent); + if (wres == 0) + { + t->stop = False; + if (!Thread_WasCreated(&t->thread)) + wres = Thread_Create(&t->thread, ThreadFunc, t); + if (wres == 0) + wres = Event_Set(&t->startEvent); + } + if (wres == 0) + return SZ_OK; + return MY_SRes_HRESULT_FROM_WRes(wres); +} + + +static void MtCoderThread_Destruct(CMtCoderThread *t) +{ + if (Thread_WasCreated(&t->thread)) + { + t->stop = 1; + Event_Set(&t->startEvent); + Thread_Wait(&t->thread); + Thread_Close(&t->thread); + } + + Event_Close(&t->startEvent); + + if (t->inBuf) + { + ISzAlloc_Free(t->mtCoder->allocBig, t->inBuf); + t->inBuf = NULL; + } +} + + + +static SRes FullRead(ISeqInStream *stream, Byte *data, size_t *processedSize) +{ + size_t size = *processedSize; + *processedSize = 0; + while (size != 0) + { + size_t cur = size; + SRes res = ISeqInStream_Read(stream, data, &cur); + *processedSize += cur; + data += cur; + size -= cur; + RINOK(res); + if (cur == 0) + return SZ_OK; + } + return SZ_OK; +} + + +/* + ThreadFunc2() returns: + SZ_OK - in all normal cases (even for stream error or memory allocation error) + SZ_ERROR_THREAD - in case of failure in system synch function +*/ + +static SRes ThreadFunc2(CMtCoderThread *t) +{ + CMtCoder *mtc = t->mtCoder; + + for (;;) + { + unsigned bi; + SRes res; + SRes res2; + BoolInt finished; + unsigned bufIndex; + size_t size; + const Byte *inData; + UInt64 readProcessed = 0; + + RINOK_THREAD(Event_Wait(&mtc->readEvent)) + + /* after Event_Wait(&mtc->readEvent) we must call Event_Set(&mtc->readEvent) in any case to unlock another threads */ + + if (mtc->stopReading) + { + return Event_Set(&mtc->readEvent) == 0 ? SZ_OK : SZ_ERROR_THREAD; + } + + res = MtProgress_GetError(&mtc->mtProgress); + + size = 0; + inData = NULL; + finished = True; + + if (res == SZ_OK) + { + size = mtc->blockSize; + if (mtc->inStream) + { + if (!t->inBuf) + { + t->inBuf = (Byte *)ISzAlloc_Alloc(mtc->allocBig, mtc->blockSize); + if (!t->inBuf) + res = SZ_ERROR_MEM; + } + if (res == SZ_OK) + { + res = FullRead(mtc->inStream, t->inBuf, &size); + readProcessed = mtc->readProcessed + size; + mtc->readProcessed = readProcessed; + } + if (res != SZ_OK) + { + mtc->readRes = res; + /* after reading error - we can stop encoding of previous blocks */ + MtProgress_SetError(&mtc->mtProgress, res); + } + else + finished = (size != mtc->blockSize); + } + else + { + size_t rem; + readProcessed = mtc->readProcessed; + rem = mtc->inDataSize - (size_t)readProcessed; + if (size > rem) + size = rem; + inData = mtc->inData + (size_t)readProcessed; + readProcessed += size; + mtc->readProcessed = readProcessed; + finished = (mtc->inDataSize == (size_t)readProcessed); + } + } + + /* we must get some block from blocksSemaphore before Event_Set(&mtc->readEvent) */ + + res2 = SZ_OK; + + if (Semaphore_Wait(&mtc->blocksSemaphore) != 0) + { + res2 = SZ_ERROR_THREAD; + if (res == SZ_OK) + { + res = res2; + // MtProgress_SetError(&mtc->mtProgress, res); + } + } + + bi = mtc->blockIndex; + + if (++mtc->blockIndex >= mtc->numBlocksMax) + mtc->blockIndex = 0; + + bufIndex = (unsigned)(int)-1; + + if (res == SZ_OK) + res = MtProgress_GetError(&mtc->mtProgress); + + if (res != SZ_OK) + finished = True; + + if (!finished) + { + if (mtc->numStartedThreads < mtc->numStartedThreadsLimit + && mtc->expectedDataSize != readProcessed) + { + res = MtCoderThread_CreateAndStart(&mtc->threads[mtc->numStartedThreads]); + if (res == SZ_OK) + mtc->numStartedThreads++; + else + { + MtProgress_SetError(&mtc->mtProgress, res); + finished = True; + } + } + } + + if (finished) + mtc->stopReading = True; + + RINOK_THREAD(Event_Set(&mtc->readEvent)) + + if (res2 != SZ_OK) + return res2; + + if (res == SZ_OK) + { + CriticalSection_Enter(&mtc->cs); + bufIndex = mtc->freeBlockHead; + mtc->freeBlockHead = mtc->freeBlockList[bufIndex]; + CriticalSection_Leave(&mtc->cs); + + res = mtc->mtCallback->Code(mtc->mtCallbackObject, t->index, bufIndex, + mtc->inStream ? t->inBuf : inData, size, finished); + + // MtProgress_Reinit(&mtc->mtProgress, t->index); + + if (res != SZ_OK) + MtProgress_SetError(&mtc->mtProgress, res); + } + + { + CMtCoderBlock *block = &mtc->blocks[bi]; + block->res = res; + block->bufIndex = bufIndex; + block->finished = finished; + } + + #ifdef MTCODER__USE_WRITE_THREAD + RINOK_THREAD(Event_Set(&mtc->writeEvents[bi])) + #else + { + unsigned wi; + { + CriticalSection_Enter(&mtc->cs); + wi = mtc->writeIndex; + if (wi == bi) + mtc->writeIndex = (unsigned)(int)-1; + else + mtc->ReadyBlocks[bi] = True; + CriticalSection_Leave(&mtc->cs); + } + + if (wi != bi) + { + if (res != SZ_OK || finished) + return 0; + continue; + } + + if (mtc->writeRes != SZ_OK) + res = mtc->writeRes; + + for (;;) + { + if (res == SZ_OK && bufIndex != (unsigned)(int)-1) + { + res = mtc->mtCallback->Write(mtc->mtCallbackObject, bufIndex); + if (res != SZ_OK) + { + mtc->writeRes = res; + MtProgress_SetError(&mtc->mtProgress, res); + } + } + + if (++wi >= mtc->numBlocksMax) + wi = 0; + { + BoolInt isReady; + + CriticalSection_Enter(&mtc->cs); + + if (bufIndex != (unsigned)(int)-1) + { + mtc->freeBlockList[bufIndex] = mtc->freeBlockHead; + mtc->freeBlockHead = bufIndex; + } + + isReady = mtc->ReadyBlocks[wi]; + + if (isReady) + mtc->ReadyBlocks[wi] = False; + else + mtc->writeIndex = wi; + + CriticalSection_Leave(&mtc->cs); + + RINOK_THREAD(Semaphore_Release1(&mtc->blocksSemaphore)) + + if (!isReady) + break; + } + + { + CMtCoderBlock *block = &mtc->blocks[wi]; + if (res == SZ_OK && block->res != SZ_OK) + res = block->res; + bufIndex = block->bufIndex; + finished = block->finished; + } + } + } + #endif + + if (finished || res != SZ_OK) + return 0; + } +} + + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp) +{ + CMtCoderThread *t = (CMtCoderThread *)pp; + for (;;) + { + if (Event_Wait(&t->startEvent) != 0) + return SZ_ERROR_THREAD; + if (t->stop) + return 0; + { + SRes res = ThreadFunc2(t); + CMtCoder *mtc = t->mtCoder; + if (res != SZ_OK) + { + MtProgress_SetError(&mtc->mtProgress, res); + } + + #ifndef MTCODER__USE_WRITE_THREAD + { + unsigned numFinished = (unsigned)InterlockedIncrement(&mtc->numFinishedThreads); + if (numFinished == mtc->numStartedThreads) + if (Event_Set(&mtc->finishedEvent) != 0) + return SZ_ERROR_THREAD; + } + #endif + } + } +} + + + +void MtCoder_Construct(CMtCoder *p) +{ + unsigned i; + + p->blockSize = 0; + p->numThreadsMax = 0; + p->expectedDataSize = (UInt64)(Int64)-1; + + p->inStream = NULL; + p->inData = NULL; + p->inDataSize = 0; + + p->progress = NULL; + p->allocBig = NULL; + + p->mtCallback = NULL; + p->mtCallbackObject = NULL; + + p->allocatedBufsSize = 0; + + Event_Construct(&p->readEvent); + Semaphore_Construct(&p->blocksSemaphore); + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + { + CMtCoderThread *t = &p->threads[i]; + t->mtCoder = p; + t->index = i; + t->inBuf = NULL; + t->stop = False; + Event_Construct(&t->startEvent); + Thread_Construct(&t->thread); + } + + #ifdef MTCODER__USE_WRITE_THREAD + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + Event_Construct(&p->writeEvents[i]); + #else + Event_Construct(&p->finishedEvent); + #endif + + CriticalSection_Init(&p->cs); + CriticalSection_Init(&p->mtProgress.cs); +} + + + + +static void MtCoder_Free(CMtCoder *p) +{ + unsigned i; + + /* + p->stopReading = True; + if (Event_IsCreated(&p->readEvent)) + Event_Set(&p->readEvent); + */ + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + MtCoderThread_Destruct(&p->threads[i]); + + Event_Close(&p->readEvent); + Semaphore_Close(&p->blocksSemaphore); + + #ifdef MTCODER__USE_WRITE_THREAD + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + Event_Close(&p->writeEvents[i]); + #else + Event_Close(&p->finishedEvent); + #endif +} + + +void MtCoder_Destruct(CMtCoder *p) +{ + MtCoder_Free(p); + + CriticalSection_Delete(&p->cs); + CriticalSection_Delete(&p->mtProgress.cs); +} + + +SRes MtCoder_Code(CMtCoder *p) +{ + unsigned numThreads = p->numThreadsMax; + unsigned numBlocksMax; + unsigned i; + SRes res = SZ_OK; + + if (numThreads > MTCODER__THREADS_MAX) + numThreads = MTCODER__THREADS_MAX; + numBlocksMax = MTCODER__GET_NUM_BLOCKS_FROM_THREADS(numThreads); + + if (p->blockSize < ((UInt32)1 << 26)) numBlocksMax++; + if (p->blockSize < ((UInt32)1 << 24)) numBlocksMax++; + if (p->blockSize < ((UInt32)1 << 22)) numBlocksMax++; + + if (numBlocksMax > MTCODER__BLOCKS_MAX) + numBlocksMax = MTCODER__BLOCKS_MAX; + + if (p->blockSize != p->allocatedBufsSize) + { + for (i = 0; i < MTCODER__THREADS_MAX; i++) + { + CMtCoderThread *t = &p->threads[i]; + if (t->inBuf) + { + ISzAlloc_Free(p->allocBig, t->inBuf); + t->inBuf = NULL; + } + } + p->allocatedBufsSize = p->blockSize; + } + + p->readRes = SZ_OK; + + MtProgress_Init(&p->mtProgress, p->progress); + + #ifdef MTCODER__USE_WRITE_THREAD + for (i = 0; i < numBlocksMax; i++) + { + RINOK_THREAD(ArEvent_OptCreate_And_Reset(&p->writeEvents[i])); + } + #else + RINOK_THREAD(ArEvent_OptCreate_And_Reset(&p->finishedEvent)); + #endif + + { + RINOK_THREAD(ArEvent_OptCreate_And_Reset(&p->readEvent)); + + if (Semaphore_IsCreated(&p->blocksSemaphore)) + { + RINOK_THREAD(Semaphore_Close(&p->blocksSemaphore)); + } + RINOK_THREAD(Semaphore_Create(&p->blocksSemaphore, numBlocksMax, numBlocksMax)); + } + + for (i = 0; i < MTCODER__BLOCKS_MAX - 1; i++) + p->freeBlockList[i] = i + 1; + p->freeBlockList[MTCODER__BLOCKS_MAX - 1] = (unsigned)(int)-1; + p->freeBlockHead = 0; + + p->readProcessed = 0; + p->blockIndex = 0; + p->numBlocksMax = numBlocksMax; + p->stopReading = False; + + #ifndef MTCODER__USE_WRITE_THREAD + p->writeIndex = 0; + p->writeRes = SZ_OK; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + p->ReadyBlocks[i] = False; + p->numFinishedThreads = 0; + #endif + + p->numStartedThreadsLimit = numThreads; + p->numStartedThreads = 0; + + // for (i = 0; i < numThreads; i++) + { + CMtCoderThread *nextThread = &p->threads[p->numStartedThreads++]; + RINOK(MtCoderThread_CreateAndStart(nextThread)); + } + + RINOK_THREAD(Event_Set(&p->readEvent)) + + #ifdef MTCODER__USE_WRITE_THREAD + { + unsigned bi = 0; + + for (;; bi++) + { + if (bi >= numBlocksMax) + bi = 0; + + RINOK_THREAD(Event_Wait(&p->writeEvents[bi])) + + { + const CMtCoderBlock *block = &p->blocks[bi]; + unsigned bufIndex = block->bufIndex; + BoolInt finished = block->finished; + if (res == SZ_OK && block->res != SZ_OK) + res = block->res; + + if (bufIndex != (unsigned)(int)-1) + { + if (res == SZ_OK) + { + res = p->mtCallback->Write(p->mtCallbackObject, bufIndex); + if (res != SZ_OK) + MtProgress_SetError(&p->mtProgress, res); + } + + CriticalSection_Enter(&p->cs); + { + p->freeBlockList[bufIndex] = p->freeBlockHead; + p->freeBlockHead = bufIndex; + } + CriticalSection_Leave(&p->cs); + } + + RINOK_THREAD(Semaphore_Release1(&p->blocksSemaphore)) + + if (finished) + break; + } + } + } + #else + { + WRes wres = Event_Wait(&p->finishedEvent); + res = MY_SRes_HRESULT_FROM_WRes(wres); + } + #endif + + if (res == SZ_OK) + res = p->readRes; + + if (res == SZ_OK) + res = p->mtProgress.res; + + #ifndef MTCODER__USE_WRITE_THREAD + if (res == SZ_OK) + res = p->writeRes; + #endif + + if (res != SZ_OK) + MtCoder_Free(p); + return res; +} + +#endif diff --git a/bsnes/lzma/MtCoder.h b/bsnes/lzma/MtCoder.h new file mode 100644 index 00000000..603329d3 --- /dev/null +++ b/bsnes/lzma/MtCoder.h @@ -0,0 +1,141 @@ +/* MtCoder.h -- Multi-thread Coder +2018-07-04 : Igor Pavlov : Public domain */ + +#ifndef __MT_CODER_H +#define __MT_CODER_H + +#include "MtDec.h" + +EXTERN_C_BEGIN + +/* + if ( defined MTCODER__USE_WRITE_THREAD) : main thread writes all data blocks to output stream + if (not defined MTCODER__USE_WRITE_THREAD) : any coder thread can write data blocks to output stream +*/ +/* #define MTCODER__USE_WRITE_THREAD */ + +#ifndef _7ZIP_ST + #define MTCODER__GET_NUM_BLOCKS_FROM_THREADS(numThreads) ((numThreads) + (numThreads) / 8 + 1) + #define MTCODER__THREADS_MAX 64 + #define MTCODER__BLOCKS_MAX (MTCODER__GET_NUM_BLOCKS_FROM_THREADS(MTCODER__THREADS_MAX) + 3) +#else + #define MTCODER__THREADS_MAX 1 + #define MTCODER__BLOCKS_MAX 1 +#endif + + +#ifndef _7ZIP_ST + + +typedef struct +{ + ICompressProgress vt; + CMtProgress *mtProgress; + UInt64 inSize; + UInt64 outSize; +} CMtProgressThunk; + +void MtProgressThunk_CreateVTable(CMtProgressThunk *p); + +#define MtProgressThunk_Init(p) { (p)->inSize = 0; (p)->outSize = 0; } + + +struct _CMtCoder; + + +typedef struct +{ + struct _CMtCoder *mtCoder; + unsigned index; + int stop; + Byte *inBuf; + + CAutoResetEvent startEvent; + CThread thread; +} CMtCoderThread; + + +typedef struct +{ + SRes (*Code)(void *p, unsigned coderIndex, unsigned outBufIndex, + const Byte *src, size_t srcSize, int finished); + SRes (*Write)(void *p, unsigned outBufIndex); +} IMtCoderCallback2; + + +typedef struct +{ + SRes res; + unsigned bufIndex; + BoolInt finished; +} CMtCoderBlock; + + +typedef struct _CMtCoder +{ + /* input variables */ + + size_t blockSize; /* size of input block */ + unsigned numThreadsMax; + UInt64 expectedDataSize; + + ISeqInStream *inStream; + const Byte *inData; + size_t inDataSize; + + ICompressProgress *progress; + ISzAllocPtr allocBig; + + IMtCoderCallback2 *mtCallback; + void *mtCallbackObject; + + + /* internal variables */ + + size_t allocatedBufsSize; + + CAutoResetEvent readEvent; + CSemaphore blocksSemaphore; + + BoolInt stopReading; + SRes readRes; + + #ifdef MTCODER__USE_WRITE_THREAD + CAutoResetEvent writeEvents[MTCODER__BLOCKS_MAX]; + #else + CAutoResetEvent finishedEvent; + SRes writeRes; + unsigned writeIndex; + Byte ReadyBlocks[MTCODER__BLOCKS_MAX]; + LONG numFinishedThreads; + #endif + + unsigned numStartedThreadsLimit; + unsigned numStartedThreads; + + unsigned numBlocksMax; + unsigned blockIndex; + UInt64 readProcessed; + + CCriticalSection cs; + + unsigned freeBlockHead; + unsigned freeBlockList[MTCODER__BLOCKS_MAX]; + + CMtProgress mtProgress; + CMtCoderBlock blocks[MTCODER__BLOCKS_MAX]; + CMtCoderThread threads[MTCODER__THREADS_MAX]; +} CMtCoder; + + +void MtCoder_Construct(CMtCoder *p); +void MtCoder_Destruct(CMtCoder *p); +SRes MtCoder_Code(CMtCoder *p); + + +#endif + + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/MtDec.c b/bsnes/lzma/MtDec.c new file mode 100644 index 00000000..25a8b046 --- /dev/null +++ b/bsnes/lzma/MtDec.c @@ -0,0 +1,1138 @@ +/* MtDec.c -- Multi-thread Decoder +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +// #define SHOW_DEBUG_INFO + +// #include + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) + +#include "MtDec.h" + +#ifndef _7ZIP_ST + +void MtProgress_Init(CMtProgress *p, ICompressProgress *progress) +{ + p->progress = progress; + p->res = SZ_OK; + p->totalInSize = 0; + p->totalOutSize = 0; +} + + +SRes MtProgress_Progress_ST(CMtProgress *p) +{ + if (p->res == SZ_OK && p->progress) + if (ICompressProgress_Progress(p->progress, p->totalInSize, p->totalOutSize) != SZ_OK) + p->res = SZ_ERROR_PROGRESS; + return p->res; +} + + +SRes MtProgress_ProgressAdd(CMtProgress *p, UInt64 inSize, UInt64 outSize) +{ + SRes res; + CriticalSection_Enter(&p->cs); + + p->totalInSize += inSize; + p->totalOutSize += outSize; + if (p->res == SZ_OK && p->progress) + if (ICompressProgress_Progress(p->progress, p->totalInSize, p->totalOutSize) != SZ_OK) + p->res = SZ_ERROR_PROGRESS; + res = p->res; + + CriticalSection_Leave(&p->cs); + return res; +} + + +SRes MtProgress_GetError(CMtProgress *p) +{ + SRes res; + CriticalSection_Enter(&p->cs); + res = p->res; + CriticalSection_Leave(&p->cs); + return res; +} + + +void MtProgress_SetError(CMtProgress *p, SRes res) +{ + CriticalSection_Enter(&p->cs); + if (p->res == SZ_OK) + p->res = res; + CriticalSection_Leave(&p->cs); +} + + +#define RINOK_THREAD(x) RINOK(x) + + +static WRes ArEvent_OptCreate_And_Reset(CEvent *p) +{ + if (Event_IsCreated(p)) + return Event_Reset(p); + return AutoResetEvent_CreateNotSignaled(p); +} + + +struct __CMtDecBufLink +{ + struct __CMtDecBufLink *next; + void *pad[3]; +}; + +typedef struct __CMtDecBufLink CMtDecBufLink; + +#define MTDEC__LINK_DATA_OFFSET sizeof(CMtDecBufLink) +#define MTDEC__DATA_PTR_FROM_LINK(link) ((Byte *)(link) + MTDEC__LINK_DATA_OFFSET) + + + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp); + + +static WRes MtDecThread_CreateEvents(CMtDecThread *t) +{ + WRes wres = ArEvent_OptCreate_And_Reset(&t->canWrite); + if (wres == 0) + { + wres = ArEvent_OptCreate_And_Reset(&t->canRead); + if (wres == 0) + return SZ_OK; + } + return wres; +} + + +static SRes MtDecThread_CreateAndStart(CMtDecThread *t) +{ + WRes wres = MtDecThread_CreateEvents(t); + // wres = 17; // for test + if (wres == 0) + { + if (Thread_WasCreated(&t->thread)) + return SZ_OK; + wres = Thread_Create(&t->thread, ThreadFunc, t); + if (wres == 0) + return SZ_OK; + } + return MY_SRes_HRESULT_FROM_WRes(wres); +} + + +void MtDecThread_FreeInBufs(CMtDecThread *t) +{ + if (t->inBuf) + { + void *link = t->inBuf; + t->inBuf = NULL; + do + { + void *next = ((CMtDecBufLink *)link)->next; + ISzAlloc_Free(t->mtDec->alloc, link); + link = next; + } + while (link); + } +} + + +static void MtDecThread_CloseThread(CMtDecThread *t) +{ + if (Thread_WasCreated(&t->thread)) + { + Event_Set(&t->canWrite); /* we can disable it. There are no threads waiting canWrite in normal cases */ + Event_Set(&t->canRead); + Thread_Wait(&t->thread); + Thread_Close(&t->thread); + } + + Event_Close(&t->canRead); + Event_Close(&t->canWrite); +} + +static void MtDec_CloseThreads(CMtDec *p) +{ + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + MtDecThread_CloseThread(&p->threads[i]); +} + +static void MtDecThread_Destruct(CMtDecThread *t) +{ + MtDecThread_CloseThread(t); + MtDecThread_FreeInBufs(t); +} + + + +static SRes FullRead(ISeqInStream *stream, Byte *data, size_t *processedSize) +{ + size_t size = *processedSize; + *processedSize = 0; + while (size != 0) + { + size_t cur = size; + SRes res = ISeqInStream_Read(stream, data, &cur); + *processedSize += cur; + data += cur; + size -= cur; + RINOK(res); + if (cur == 0) + return SZ_OK; + } + return SZ_OK; +} + + +static SRes MtDec_GetError_Spec(CMtDec *p, UInt64 interruptIndex, BoolInt *wasInterrupted) +{ + SRes res; + CriticalSection_Enter(&p->mtProgress.cs); + *wasInterrupted = (p->needInterrupt && interruptIndex > p->interruptIndex); + res = p->mtProgress.res; + CriticalSection_Leave(&p->mtProgress.cs); + return res; +} + +static SRes MtDec_Progress_GetError_Spec(CMtDec *p, UInt64 inSize, UInt64 outSize, UInt64 interruptIndex, BoolInt *wasInterrupted) +{ + SRes res; + CriticalSection_Enter(&p->mtProgress.cs); + + p->mtProgress.totalInSize += inSize; + p->mtProgress.totalOutSize += outSize; + if (p->mtProgress.res == SZ_OK && p->mtProgress.progress) + if (ICompressProgress_Progress(p->mtProgress.progress, p->mtProgress.totalInSize, p->mtProgress.totalOutSize) != SZ_OK) + p->mtProgress.res = SZ_ERROR_PROGRESS; + + *wasInterrupted = (p->needInterrupt && interruptIndex > p->interruptIndex); + res = p->mtProgress.res; + + CriticalSection_Leave(&p->mtProgress.cs); + + return res; +} + +static void MtDec_Interrupt(CMtDec *p, UInt64 interruptIndex) +{ + CriticalSection_Enter(&p->mtProgress.cs); + if (!p->needInterrupt || interruptIndex < p->interruptIndex) + { + p->interruptIndex = interruptIndex; + p->needInterrupt = True; + } + CriticalSection_Leave(&p->mtProgress.cs); +} + +Byte *MtDec_GetCrossBuff(CMtDec *p) +{ + Byte *cr = p->crossBlock; + if (!cr) + { + cr = (Byte *)ISzAlloc_Alloc(p->alloc, MTDEC__LINK_DATA_OFFSET + p->inBufSize); + if (!cr) + return NULL; + p->crossBlock = cr; + } + return MTDEC__DATA_PTR_FROM_LINK(cr); +} + + +/* + ThreadFunc2() returns: + 0 - in all normal cases (even for stream error or memory allocation error) + (!= 0) - WRes error return by system threading function +*/ + +// #define MTDEC_ProgessStep (1 << 22) +#define MTDEC_ProgessStep (1 << 0) + +static WRes ThreadFunc2(CMtDecThread *t) +{ + CMtDec *p = t->mtDec; + + PRF_STR_INT("ThreadFunc2", t->index); + + // SetThreadAffinityMask(GetCurrentThread(), 1 << t->index); + + for (;;) + { + SRes res, codeRes; + BoolInt wasInterrupted, isAllocError, overflow, finish; + SRes threadingErrorSRes; + BoolInt needCode, needWrite, needContinue; + + size_t inDataSize_Start; + UInt64 inDataSize; + // UInt64 inDataSize_Full; + + UInt64 blockIndex; + + UInt64 inPrev = 0; + UInt64 outPrev = 0; + UInt64 inCodePos; + UInt64 outCodePos; + + Byte *afterEndData = NULL; + size_t afterEndData_Size = 0; + + BoolInt canCreateNewThread = False; + // CMtDecCallbackInfo parse; + CMtDecThread *nextThread; + + PRF_STR_INT("Event_Wait(&t->canRead)", t->index); + + RINOK_THREAD(Event_Wait(&t->canRead)); + if (p->exitThread) + return 0; + + PRF_STR_INT("after Event_Wait(&t->canRead)", t->index); + + // if (t->index == 3) return 19; // for test + + blockIndex = p->blockIndex++; + + // PRF(printf("\ncanRead\n")) + + res = MtDec_Progress_GetError_Spec(p, 0, 0, blockIndex, &wasInterrupted); + + finish = p->readWasFinished; + needCode = False; + needWrite = False; + isAllocError = False; + overflow = False; + + inDataSize_Start = 0; + inDataSize = 0; + // inDataSize_Full = 0; + + if (res == SZ_OK && !wasInterrupted) + { + // if (p->inStream) + { + CMtDecBufLink *prev = NULL; + CMtDecBufLink *link = (CMtDecBufLink *)t->inBuf; + size_t crossSize = p->crossEnd - p->crossStart; + + PRF(printf("\ncrossSize = %d\n", crossSize)); + + for (;;) + { + if (!link) + { + link = (CMtDecBufLink *)ISzAlloc_Alloc(p->alloc, MTDEC__LINK_DATA_OFFSET + p->inBufSize); + if (!link) + { + finish = True; + // p->allocError_for_Read_BlockIndex = blockIndex; + isAllocError = True; + break; + } + link->next = NULL; + if (prev) + { + // static unsigned g_num = 0; + // printf("\n%6d : %x", ++g_num, (unsigned)(size_t)((Byte *)link - (Byte *)prev)); + prev->next = link; + } + else + t->inBuf = (void *)link; + } + + { + Byte *data = MTDEC__DATA_PTR_FROM_LINK(link); + Byte *parseData = data; + size_t size; + + if (crossSize != 0) + { + inDataSize = crossSize; + // inDataSize_Full = inDataSize; + inDataSize_Start = crossSize; + size = crossSize; + parseData = MTDEC__DATA_PTR_FROM_LINK(p->crossBlock) + p->crossStart; + PRF(printf("\ncross : crossStart = %7d crossEnd = %7d finish = %1d", + (int)p->crossStart, (int)p->crossEnd, (int)finish)); + } + else + { + size = p->inBufSize; + + res = FullRead(p->inStream, data, &size); + + // size = 10; // test + + inDataSize += size; + // inDataSize_Full = inDataSize; + if (!prev) + inDataSize_Start = size; + + p->readProcessed += size; + finish = (size != p->inBufSize); + if (finish) + p->readWasFinished = True; + + // res = E_INVALIDARG; // test + + if (res != SZ_OK) + { + // PRF(printf("\nRead error = %d\n", res)) + // we want to decode all data before error + p->readRes = res; + // p->readError_BlockIndex = blockIndex; + p->readWasFinished = True; + finish = True; + res = SZ_OK; + // break; + } + + if (inDataSize - inPrev >= MTDEC_ProgessStep) + { + res = MtDec_Progress_GetError_Spec(p, 0, 0, blockIndex, &wasInterrupted); + if (res != SZ_OK || wasInterrupted) + break; + inPrev = inDataSize; + } + } + + { + CMtDecCallbackInfo parse; + + parse.startCall = (prev == NULL); + parse.src = parseData; + parse.srcSize = size; + parse.srcFinished = finish; + parse.canCreateNewThread = True; + + // PRF(printf("\nParse size = %d\n", (unsigned)size)) + + p->mtCallback->Parse(p->mtCallbackObject, t->index, &parse); + + needWrite = True; + canCreateNewThread = parse.canCreateNewThread; + + // printf("\n\n%12I64u %12I64u", (UInt64)p->mtProgress.totalInSize, (UInt64)p->mtProgress.totalOutSize); + + if ( + // parseRes != SZ_OK || + // inDataSize - (size - parse.srcSize) > p->inBlockMax + // || + parse.state == MTDEC_PARSE_OVERFLOW + // || wasInterrupted + ) + { + // Overflow or Parse error - switch from MT decoding to ST decoding + finish = True; + overflow = True; + + { + PRF(printf("\n Overflow")); + // PRF(printf("\nisBlockFinished = %d", (unsigned)parse.blockWasFinished)); + PRF(printf("\n inDataSize = %d", (unsigned)inDataSize)); + } + + if (crossSize != 0) + memcpy(data, parseData, size); + p->crossStart = 0; + p->crossEnd = 0; + break; + } + + if (crossSize != 0) + { + memcpy(data, parseData, parse.srcSize); + p->crossStart += parse.srcSize; + } + + if (parse.state != MTDEC_PARSE_CONTINUE || finish) + { + // we don't need to parse in current thread anymore + + if (parse.state == MTDEC_PARSE_END) + finish = True; + + needCode = True; + // p->crossFinished = finish; + + if (parse.srcSize == size) + { + // full parsed - no cross transfer + p->crossStart = 0; + p->crossEnd = 0; + break; + } + + if (parse.state == MTDEC_PARSE_END) + { + p->crossStart = 0; + p->crossEnd = 0; + + if (crossSize != 0) + memcpy(data + parse.srcSize, parseData + parse.srcSize, size - parse.srcSize); // we need all data + afterEndData_Size = size - parse.srcSize; + afterEndData = parseData + parse.srcSize; + + // we reduce data size to required bytes (parsed only) + inDataSize -= (size - parse.srcSize); + if (!prev) + inDataSize_Start = parse.srcSize; + break; + } + + { + // partial parsed - need cross transfer + if (crossSize != 0) + inDataSize = parse.srcSize; // it's only parsed now + else + { + // partial parsed - is not in initial cross block - we need to copy new data to cross block + Byte *cr = MtDec_GetCrossBuff(p); + if (!cr) + { + { + PRF(printf("\ncross alloc error error\n")); + // res = SZ_ERROR_MEM; + finish = True; + // p->allocError_for_Read_BlockIndex = blockIndex; + isAllocError = True; + break; + } + } + + { + size_t crSize = size - parse.srcSize; + inDataSize -= crSize; + p->crossEnd = crSize; + p->crossStart = 0; + memcpy(cr, parseData + parse.srcSize, crSize); + } + } + + // inDataSize_Full = inDataSize; + if (!prev) + inDataSize_Start = parse.srcSize; // it's partial size (parsed only) + + finish = False; + break; + } + } + + if (parse.srcSize != size) + { + res = SZ_ERROR_FAIL; + PRF(printf("\nfinished error SZ_ERROR_FAIL = %d\n", res)); + break; + } + } + } + + prev = link; + link = link->next; + + if (crossSize != 0) + { + crossSize = 0; + p->crossStart = 0; + p->crossEnd = 0; + } + } + } + + if (res == SZ_OK) + res = MtDec_GetError_Spec(p, blockIndex, &wasInterrupted); + } + + codeRes = SZ_OK; + + if (res == SZ_OK && needCode && !wasInterrupted) + { + codeRes = p->mtCallback->PreCode(p->mtCallbackObject, t->index); + if (codeRes != SZ_OK) + { + needCode = False; + finish = True; + // SZ_ERROR_MEM is expected error here. + // if (codeRes == SZ_ERROR_MEM) - we will try single-thread decoding later. + // if (codeRes != SZ_ERROR_MEM) - we can stop decoding or try single-thread decoding. + } + } + + if (res != SZ_OK || wasInterrupted) + finish = True; + + nextThread = NULL; + threadingErrorSRes = SZ_OK; + + if (!finish) + { + if (p->numStartedThreads < p->numStartedThreads_Limit && canCreateNewThread) + { + SRes res2 = MtDecThread_CreateAndStart(&p->threads[p->numStartedThreads]); + if (res2 == SZ_OK) + { + // if (p->numStartedThreads % 1000 == 0) PRF(printf("\n numStartedThreads=%d\n", p->numStartedThreads)); + p->numStartedThreads++; + } + else + { + PRF(printf("\nERROR: numStartedThreads=%d\n", p->numStartedThreads)); + if (p->numStartedThreads == 1) + { + // if only one thread is possible, we leave muti-threading code + finish = True; + needCode = False; + threadingErrorSRes = res2; + } + else + p->numStartedThreads_Limit = p->numStartedThreads; + } + } + + if (!finish) + { + unsigned nextIndex = t->index + 1; + nextThread = &p->threads[nextIndex >= p->numStartedThreads ? 0 : nextIndex]; + RINOK_THREAD(Event_Set(&nextThread->canRead)) + // We have started executing for new iteration (with next thread) + // And that next thread now is responsible for possible exit from decoding (threading_code) + } + } + + // each call of Event_Set(&nextThread->canRead) must be followed by call of Event_Set(&nextThread->canWrite) + // if ( !finish ) we must call Event_Set(&nextThread->canWrite) in any case + // if ( finish ) we switch to single-thread mode and there are 2 ways at the end of current iteration (current block): + // - if (needContinue) after Write(&needContinue), we restore decoding with new iteration + // - otherwise we stop decoding and exit from ThreadFunc2() + + // Don't change (finish) variable in the further code + + + // ---------- CODE ---------- + + inPrev = 0; + outPrev = 0; + inCodePos = 0; + outCodePos = 0; + + if (res == SZ_OK && needCode && codeRes == SZ_OK) + { + BoolInt isStartBlock = True; + CMtDecBufLink *link = (CMtDecBufLink *)t->inBuf; + + for (;;) + { + size_t inSize; + int stop; + + if (isStartBlock) + inSize = inDataSize_Start; + else + { + UInt64 rem = inDataSize - inCodePos; + inSize = p->inBufSize; + if (inSize > rem) + inSize = (size_t)rem; + } + + inCodePos += inSize; + stop = True; + + codeRes = p->mtCallback->Code(p->mtCallbackObject, t->index, + (const Byte *)MTDEC__DATA_PTR_FROM_LINK(link), inSize, + (inCodePos == inDataSize), // srcFinished + &inCodePos, &outCodePos, &stop); + + if (codeRes != SZ_OK) + { + PRF(printf("\nCode Interrupt error = %x\n", codeRes)); + // we interrupt only later blocks + MtDec_Interrupt(p, blockIndex); + break; + } + + if (stop || inCodePos == inDataSize) + break; + + { + const UInt64 inDelta = inCodePos - inPrev; + const UInt64 outDelta = outCodePos - outPrev; + if (inDelta >= MTDEC_ProgessStep || outDelta >= MTDEC_ProgessStep) + { + // Sleep(1); + res = MtDec_Progress_GetError_Spec(p, inDelta, outDelta, blockIndex, &wasInterrupted); + if (res != SZ_OK || wasInterrupted) + break; + inPrev = inCodePos; + outPrev = outCodePos; + } + } + + link = link->next; + isStartBlock = False; + } + } + + + // ---------- WRITE ---------- + + RINOK_THREAD(Event_Wait(&t->canWrite)); + + { + BoolInt isErrorMode = False; + BoolInt canRecode = True; + BoolInt needWriteToStream = needWrite; + + if (p->exitThread) return 0; // it's never executed in normal cases + + if (p->wasInterrupted) + wasInterrupted = True; + else + { + if (codeRes != SZ_OK) // || !needCode // check it !!! + { + p->wasInterrupted = True; + p->codeRes = codeRes; + if (codeRes == SZ_ERROR_MEM) + isAllocError = True; + } + + if (threadingErrorSRes) + { + p->wasInterrupted = True; + p->threadingErrorSRes = threadingErrorSRes; + needWriteToStream = False; + } + if (isAllocError) + { + p->wasInterrupted = True; + p->isAllocError = True; + needWriteToStream = False; + } + if (overflow) + { + p->wasInterrupted = True; + p->overflow = True; + needWriteToStream = False; + } + } + + if (needCode) + { + if (wasInterrupted) + { + inCodePos = 0; + outCodePos = 0; + } + { + const UInt64 inDelta = inCodePos - inPrev; + const UInt64 outDelta = outCodePos - outPrev; + // if (inDelta != 0 || outDelta != 0) + res = MtProgress_ProgressAdd(&p->mtProgress, inDelta, outDelta); + } + } + + needContinue = (!finish); + + // if (res == SZ_OK && needWrite && !wasInterrupted) + if (needWrite) + { + // p->inProcessed += inCodePos; + + res = p->mtCallback->Write(p->mtCallbackObject, t->index, + res == SZ_OK && needWriteToStream && !wasInterrupted, // needWrite + afterEndData, afterEndData_Size, + &needContinue, + &canRecode); + + // res= E_INVALIDARG; // for test + + PRF(printf("\nAfter Write needContinue = %d\n", (unsigned)needContinue)); + PRF(printf("\nprocessed = %d\n", (unsigned)p->inProcessed)); + + if (res != SZ_OK) + { + PRF(printf("\nWrite error = %d\n", res)); + isErrorMode = True; + p->wasInterrupted = True; + } + if (res != SZ_OK + || (!needContinue && !finish)) + { + PRF(printf("\nWrite Interrupt error = %x\n", res)); + MtDec_Interrupt(p, blockIndex); + } + } + + if (canRecode) + if (!needCode + || res != SZ_OK + || p->wasInterrupted + || codeRes != SZ_OK + || wasInterrupted + || p->numFilledThreads != 0 + || isErrorMode) + { + if (p->numFilledThreads == 0) + p->filledThreadStart = t->index; + if (inDataSize != 0 || !finish) + { + t->inDataSize_Start = inDataSize_Start; + t->inDataSize = inDataSize; + p->numFilledThreads++; + } + PRF(printf("\np->numFilledThreads = %d\n", p->numFilledThreads)); + PRF(printf("p->filledThreadStart = %d\n", p->filledThreadStart)); + } + + if (!finish) + { + RINOK_THREAD(Event_Set(&nextThread->canWrite)); + } + else + { + if (needContinue) + { + // we restore decoding with new iteration + RINOK_THREAD(Event_Set(&p->threads[0].canWrite)); + } + else + { + // we exit from decoding + if (t->index == 0) + return SZ_OK; + p->exitThread = True; + } + RINOK_THREAD(Event_Set(&p->threads[0].canRead)); + } + } + } +} + +#ifdef _WIN32 +#define USE_ALLOCA +#endif + +#ifdef USE_ALLOCA +#ifdef _WIN32 +#include +#else +#include +#endif +#endif + + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc1(void *pp) +{ + WRes res; + + CMtDecThread *t = (CMtDecThread *)pp; + CMtDec *p; + + // fprintf(stdout, "\n%d = %p\n", t->index, &t); + + res = ThreadFunc2(t); + p = t->mtDec; + if (res == 0) + return p->exitThreadWRes; + { + // it's unexpected situation for some threading function error + if (p->exitThreadWRes == 0) + p->exitThreadWRes = res; + PRF(printf("\nthread exit error = %d\n", res)); + p->exitThread = True; + Event_Set(&p->threads[0].canRead); + Event_Set(&p->threads[0].canWrite); + MtProgress_SetError(&p->mtProgress, MY_SRes_HRESULT_FROM_WRes(res)); + } + return res; +} + +static MY_NO_INLINE THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp) +{ + CMtDecThread *t = (CMtDecThread *)pp; + + // fprintf(stderr, "\n%d = %p - before", t->index, &t); + #ifdef USE_ALLOCA + t->allocaPtr = alloca(t->index * 128); + #endif + return ThreadFunc1(pp); +} + + +int MtDec_PrepareRead(CMtDec *p) +{ + if (p->crossBlock && p->crossStart == p->crossEnd) + { + ISzAlloc_Free(p->alloc, p->crossBlock); + p->crossBlock = NULL; + } + + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + if (i > p->numStartedThreads + || p->numFilledThreads <= + (i >= p->filledThreadStart ? + i - p->filledThreadStart : + i + p->numStartedThreads - p->filledThreadStart)) + MtDecThread_FreeInBufs(&p->threads[i]); + } + + return (p->numFilledThreads != 0) || (p->crossStart != p->crossEnd); +} + + +const Byte *MtDec_Read(CMtDec *p, size_t *inLim) +{ + while (p->numFilledThreads != 0) + { + CMtDecThread *t = &p->threads[p->filledThreadStart]; + + if (*inLim != 0) + { + { + void *link = t->inBuf; + void *next = ((CMtDecBufLink *)link)->next; + ISzAlloc_Free(p->alloc, link); + t->inBuf = next; + } + + if (t->inDataSize == 0) + { + MtDecThread_FreeInBufs(t); + if (--p->numFilledThreads == 0) + break; + if (++p->filledThreadStart == p->numStartedThreads) + p->filledThreadStart = 0; + t = &p->threads[p->filledThreadStart]; + } + } + + { + size_t lim = t->inDataSize_Start; + if (lim != 0) + t->inDataSize_Start = 0; + else + { + UInt64 rem = t->inDataSize; + lim = p->inBufSize; + if (lim > rem) + lim = (size_t)rem; + } + t->inDataSize -= lim; + *inLim = lim; + return (const Byte *)MTDEC__DATA_PTR_FROM_LINK(t->inBuf); + } + } + + { + size_t crossSize = p->crossEnd - p->crossStart; + if (crossSize != 0) + { + const Byte *data = MTDEC__DATA_PTR_FROM_LINK(p->crossBlock) + p->crossStart; + *inLim = crossSize; + p->crossStart = 0; + p->crossEnd = 0; + return data; + } + *inLim = 0; + if (p->crossBlock) + { + ISzAlloc_Free(p->alloc, p->crossBlock); + p->crossBlock = NULL; + } + return NULL; + } +} + + +void MtDec_Construct(CMtDec *p) +{ + unsigned i; + + p->inBufSize = (size_t)1 << 18; + + p->numThreadsMax = 0; + + p->inStream = NULL; + + // p->inData = NULL; + // p->inDataSize = 0; + + p->crossBlock = NULL; + p->crossStart = 0; + p->crossEnd = 0; + + p->numFilledThreads = 0; + + p->progress = NULL; + p->alloc = NULL; + + p->mtCallback = NULL; + p->mtCallbackObject = NULL; + + p->allocatedBufsSize = 0; + + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CMtDecThread *t = &p->threads[i]; + t->mtDec = p; + t->index = i; + t->inBuf = NULL; + Event_Construct(&t->canRead); + Event_Construct(&t->canWrite); + Thread_Construct(&t->thread); + } + + // Event_Construct(&p->finishedEvent); + + CriticalSection_Init(&p->mtProgress.cs); +} + + +static void MtDec_Free(CMtDec *p) +{ + unsigned i; + + p->exitThread = True; + + for (i = 0; i < MTDEC__THREADS_MAX; i++) + MtDecThread_Destruct(&p->threads[i]); + + // Event_Close(&p->finishedEvent); + + if (p->crossBlock) + { + ISzAlloc_Free(p->alloc, p->crossBlock); + p->crossBlock = NULL; + } +} + + +void MtDec_Destruct(CMtDec *p) +{ + MtDec_Free(p); + + CriticalSection_Delete(&p->mtProgress.cs); +} + + +SRes MtDec_Code(CMtDec *p) +{ + unsigned i; + + p->inProcessed = 0; + + p->blockIndex = 1; // it must be larger than not_defined index (0) + p->isAllocError = False; + p->overflow = False; + p->threadingErrorSRes = SZ_OK; + + p->needContinue = True; + + p->readWasFinished = False; + p->needInterrupt = False; + p->interruptIndex = (UInt64)(Int64)-1; + + p->readProcessed = 0; + p->readRes = SZ_OK; + p->codeRes = SZ_OK; + p->wasInterrupted = False; + + p->crossStart = 0; + p->crossEnd = 0; + + p->filledThreadStart = 0; + p->numFilledThreads = 0; + + { + unsigned numThreads = p->numThreadsMax; + if (numThreads > MTDEC__THREADS_MAX) + numThreads = MTDEC__THREADS_MAX; + p->numStartedThreads_Limit = numThreads; + p->numStartedThreads = 0; + } + + if (p->inBufSize != p->allocatedBufsSize) + { + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CMtDecThread *t = &p->threads[i]; + if (t->inBuf) + MtDecThread_FreeInBufs(t); + } + if (p->crossBlock) + { + ISzAlloc_Free(p->alloc, p->crossBlock); + p->crossBlock = NULL; + } + + p->allocatedBufsSize = p->inBufSize; + } + + MtProgress_Init(&p->mtProgress, p->progress); + + // RINOK_THREAD(ArEvent_OptCreate_And_Reset(&p->finishedEvent)); + p->exitThread = False; + p->exitThreadWRes = 0; + + { + WRes wres; + WRes sres; + CMtDecThread *nextThread = &p->threads[p->numStartedThreads++]; + // wres = MtDecThread_CreateAndStart(nextThread); + wres = MtDecThread_CreateEvents(nextThread); + if (wres == 0) { wres = Event_Set(&nextThread->canWrite); + if (wres == 0) { wres = Event_Set(&nextThread->canRead); + if (wres == 0) { wres = ThreadFunc(nextThread); + if (wres != 0) + { + p->needContinue = False; + MtDec_CloseThreads(p); + }}}} + + // wres = 17; // for test + // wres = Event_Wait(&p->finishedEvent); + + sres = MY_SRes_HRESULT_FROM_WRes(wres); + + if (sres != 0) + p->threadingErrorSRes = sres; + + if ( + // wres == 0 + // wres != 0 + // || p->mtc.codeRes == SZ_ERROR_MEM + p->isAllocError + || p->threadingErrorSRes != SZ_OK + || p->overflow) + { + // p->needContinue = True; + } + else + p->needContinue = False; + + if (p->needContinue) + return SZ_OK; + + // if (sres != SZ_OK) + return sres; + // return E_FAIL; + } +} + +#endif diff --git a/bsnes/lzma/MtDec.h b/bsnes/lzma/MtDec.h new file mode 100644 index 00000000..9864cc87 --- /dev/null +++ b/bsnes/lzma/MtDec.h @@ -0,0 +1,201 @@ +/* MtDec.h -- Multi-thread Decoder +2018-07-04 : Igor Pavlov : Public domain */ + +#ifndef __MT_DEC_H +#define __MT_DEC_H + +#include "7zTypes.h" + +#ifndef _7ZIP_ST +#include "Threads.h" +#endif + +EXTERN_C_BEGIN + +#ifndef _7ZIP_ST + +#ifndef _7ZIP_ST + #define MTDEC__THREADS_MAX 32 +#else + #define MTDEC__THREADS_MAX 1 +#endif + + +typedef struct +{ + ICompressProgress *progress; + SRes res; + UInt64 totalInSize; + UInt64 totalOutSize; + CCriticalSection cs; +} CMtProgress; + +void MtProgress_Init(CMtProgress *p, ICompressProgress *progress); +SRes MtProgress_Progress_ST(CMtProgress *p); +SRes MtProgress_ProgressAdd(CMtProgress *p, UInt64 inSize, UInt64 outSize); +SRes MtProgress_GetError(CMtProgress *p); +void MtProgress_SetError(CMtProgress *p, SRes res); + +struct _CMtDec; + +typedef struct +{ + struct _CMtDec *mtDec; + unsigned index; + void *inBuf; + + size_t inDataSize_Start; // size of input data in start block + UInt64 inDataSize; // total size of input data in all blocks + + CThread thread; + CAutoResetEvent canRead; + CAutoResetEvent canWrite; + void *allocaPtr; +} CMtDecThread; + +void MtDecThread_FreeInBufs(CMtDecThread *t); + + +typedef enum +{ + MTDEC_PARSE_CONTINUE, // continue this block with more input data + MTDEC_PARSE_OVERFLOW, // MT buffers overflow, need switch to single-thread + MTDEC_PARSE_NEW, // new block + MTDEC_PARSE_END // end of block threading. But we still can return to threading after Write(&needContinue) +} EMtDecParseState; + +typedef struct +{ + // in + int startCall; + const Byte *src; + size_t srcSize; + // in : (srcSize == 0) is allowed + // out : it's allowed to return less that actually was used ? + int srcFinished; + + // out + EMtDecParseState state; + BoolInt canCreateNewThread; + UInt64 outPos; // check it (size_t) +} CMtDecCallbackInfo; + + +typedef struct +{ + void (*Parse)(void *p, unsigned coderIndex, CMtDecCallbackInfo *ci); + + // PreCode() and Code(): + // (SRes_return_result != SZ_OK) means stop decoding, no need another blocks + SRes (*PreCode)(void *p, unsigned coderIndex); + SRes (*Code)(void *p, unsigned coderIndex, + const Byte *src, size_t srcSize, int srcFinished, + UInt64 *inCodePos, UInt64 *outCodePos, int *stop); + // stop - means stop another Code calls + + + /* Write() must be called, if Parse() was called + set (needWrite) if + { + && (was not interrupted by progress) + && (was not interrupted in previous block) + } + + out: + if (*needContinue), decoder still need to continue decoding with new iteration, + even after MTDEC_PARSE_END + if (*canRecode), we didn't flush current block data, so we still can decode current block later. + */ + SRes (*Write)(void *p, unsigned coderIndex, + BoolInt needWriteToStream, + const Byte *src, size_t srcSize, + // int srcFinished, + BoolInt *needContinue, + BoolInt *canRecode); +} IMtDecCallback; + + + +typedef struct _CMtDec +{ + /* input variables */ + + size_t inBufSize; /* size of input block */ + unsigned numThreadsMax; + // size_t inBlockMax; + unsigned numThreadsMax_2; + + ISeqInStream *inStream; + // const Byte *inData; + // size_t inDataSize; + + ICompressProgress *progress; + ISzAllocPtr alloc; + + IMtDecCallback *mtCallback; + void *mtCallbackObject; + + + /* internal variables */ + + size_t allocatedBufsSize; + + BoolInt exitThread; + WRes exitThreadWRes; + + UInt64 blockIndex; + BoolInt isAllocError; + BoolInt overflow; + SRes threadingErrorSRes; + + BoolInt needContinue; + + // CAutoResetEvent finishedEvent; + + SRes readRes; + SRes codeRes; + + BoolInt wasInterrupted; + + unsigned numStartedThreads_Limit; + unsigned numStartedThreads; + + Byte *crossBlock; + size_t crossStart; + size_t crossEnd; + UInt64 readProcessed; + BoolInt readWasFinished; + UInt64 inProcessed; + + unsigned filledThreadStart; + unsigned numFilledThreads; + + #ifndef _7ZIP_ST + BoolInt needInterrupt; + UInt64 interruptIndex; + CMtProgress mtProgress; + CMtDecThread threads[MTDEC__THREADS_MAX]; + #endif +} CMtDec; + + +void MtDec_Construct(CMtDec *p); +void MtDec_Destruct(CMtDec *p); + +/* +MtDec_Code() returns: + SZ_OK - in most cases + MY_SRes_HRESULT_FROM_WRes(WRes_error) - in case of unexpected error in threading function +*/ + +SRes MtDec_Code(CMtDec *p); +Byte *MtDec_GetCrossBuff(CMtDec *p); + +int MtDec_PrepareRead(CMtDec *p); +const Byte *MtDec_Read(CMtDec *p, size_t *inLim); + +#endif + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Ppmd.h b/bsnes/lzma/Ppmd.h new file mode 100644 index 00000000..4b994152 --- /dev/null +++ b/bsnes/lzma/Ppmd.h @@ -0,0 +1,85 @@ +/* Ppmd.h -- PPMD codec common code +2017-04-03 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#ifndef __PPMD_H +#define __PPMD_H + +#include "CpuArch.h" + +EXTERN_C_BEGIN + +#ifdef MY_CPU_32BIT + #define PPMD_32BIT +#endif + +#define PPMD_INT_BITS 7 +#define PPMD_PERIOD_BITS 7 +#define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS)) + +#define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift)) +#define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2) +#define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob)) +#define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob)) + +#define PPMD_N1 4 +#define PPMD_N2 4 +#define PPMD_N3 4 +#define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4) +#define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4) + +#pragma pack(push, 1) +/* Most compilers works OK here even without #pragma pack(push, 1), but some GCC compilers need it. */ + +/* SEE-contexts for PPM-contexts with masked symbols */ +typedef struct +{ + UInt16 Summ; /* Freq */ + Byte Shift; /* Speed of Freq change; low Shift is for fast change */ + Byte Count; /* Count to next change of Shift */ +} CPpmd_See; + +#define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ + { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); } + +typedef struct +{ + Byte Symbol; + Byte Freq; + UInt16 SuccessorLow; + UInt16 SuccessorHigh; +} CPpmd_State; + +#pragma pack(pop) + +typedef + #ifdef PPMD_32BIT + CPpmd_State * + #else + UInt32 + #endif + CPpmd_State_Ref; + +typedef + #ifdef PPMD_32BIT + void * + #else + UInt32 + #endif + CPpmd_Void_Ref; + +typedef + #ifdef PPMD_32BIT + Byte * + #else + UInt32 + #endif + CPpmd_Byte_Ref; + +#define PPMD_SetAllBitsIn256Bytes(p) \ + { size_t z; for (z = 0; z < 256 / sizeof(p[0]); z += 8) { \ + p[z+7] = p[z+6] = p[z+5] = p[z+4] = p[z+3] = p[z+2] = p[z+1] = p[z+0] = ~(size_t)0; }} + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Ppmd7.c b/bsnes/lzma/Ppmd7.c new file mode 100644 index 00000000..80e7de9a --- /dev/null +++ b/bsnes/lzma/Ppmd7.c @@ -0,0 +1,712 @@ +/* Ppmd7.c -- PPMdH codec +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include + +#include "Ppmd7.h" + +const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(size_t)(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd7_Context *)Ppmd7_GetContext(p, ref)) +#define STATS(ctx) Ppmd7_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd7Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +typedef CPpmd7_Context * CTX_PTR; + +struct CPpmd7_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Node_ * + #else + UInt32 + #endif + CPpmd7_Node_Ref; + +typedef struct CPpmd7_Node_ +{ + UInt16 Stamp; /* must be at offset 0 as CPpmd7_Context::NumStats. Stamp=0 means free */ + UInt16 NU; + CPpmd7_Node_Ref Next; /* must be at offset >= 4 */ + CPpmd7_Node_Ref Prev; +} CPpmd7_Node; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd7_Node *)(p->Base + (offs))) +#endif + +void Ppmd7_Construct(CPpmd7 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while (--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 3; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 256; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 2; + } + + memset(p->HB2Flag, 0, 0x40); + memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40); +} + +void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->Base); + p->Size = 0; + p->Base = 0; +} + +BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc) +{ + if (!p->Base || p->Size != size) + { + size_t size2; + Ppmd7_Free(p, alloc); + size2 = 0 + #ifndef PPMD_32BIT + + UNIT_SIZE + #endif + ; + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)ISzAlloc_Alloc(alloc, p->AlignOffset + size + size2)) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd7 *p, void *node, unsigned indx) +{ + *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; + p->FreeList[indx] = REF(node); +} + +static void *RemoveNode(CPpmd7 *p, unsigned indx) +{ + CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); + p->FreeList[indx] = *node; + return node; +} + +static void SplitBlock(CPpmd7 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd7 *p) +{ + #ifdef PPMD_32BIT + CPpmd7_Node headItem; + CPpmd7_Node_Ref head = &headItem; + #else + CPpmd7_Node_Ref head = p->AlignOffset + p->Size; + #endif + + CPpmd7_Node_Ref n = head; + unsigned i; + + p->GlueCount = 255; + + /* create doubly-linked list of free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + UInt16 nu = I2U(i); + CPpmd7_Node_Ref next = (CPpmd7_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd7_Node *node = NODE(next); + node->Next = n; + n = NODE(n)->Prev = next; + next = *(const CPpmd7_Node_Ref *)node; + node->Stamp = 0; + node->NU = (UInt16)nu; + } + } + NODE(head)->Stamp = 1; + NODE(head)->Next = n; + NODE(n)->Prev = head; + if (p->LoUnit != p->HiUnit) + ((CPpmd7_Node *)p->LoUnit)->Stamp = 1; + + /* Glue free blocks */ + while (n != head) + { + CPpmd7_Node *node = NODE(n); + UInt32 nu = (UInt32)node->NU; + for (;;) + { + CPpmd7_Node *node2 = NODE(n) + nu; + nu += node2->NU; + if (node2->Stamp != 0 || nu >= 0x10000) + break; + NODE(node2->Prev)->Next = node2->Next; + NODE(node2->Next)->Prev = node2->Prev; + node->NU = (UInt16)nu; + } + n = node->Next; + } + + /* Fill lists of free blocks */ + for (n = NODE(head)->Next; n != head;) + { + CPpmd7_Node *node = NODE(n); + unsigned nu; + CPpmd7_Node_Ref next = node->Next; + for (nu = node->NU; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + n = next; + } +} + +static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd7 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while (--n); } + +static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +static void RestartModel(CPpmd7 *p) +{ + unsigned i, k, m; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + p->Text = p->Base + p->AlignOffset; + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 256; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = 0; i < 128; i++) + for (k = 0; k < 8; k++) + { + UInt16 *dest = p->BinSumm[i] + k; + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 2)); + for (m = 0; m < 64; m += 8) + dest[m] = val; + } + + for (i = 0; i < 25; i++) + for (k = 0; k < 16; k++) + { + CPpmd_See *s = &p->See[i][k]; + s->Summ = (UInt16)((5 * i + 10) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 4; + } +} + +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder) +{ + p->MaxOrder = maxOrder; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static CTX_PTR CreateSuccessors(CPpmd7 *p, BoolInt skip) +{ + CPpmd_State upState; + CTX_PTR c = p->MinContext; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + CPpmd_State *ps[PPMD7_MAX_ORDER]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (c->NumStats != 1) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + } + else + s = ONE_STATE(c); + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd7_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + + if (c->NumStats == 1) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 1; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static void UpdateModel(CPpmd7 *p) +{ + CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); + CTX_PTR c; + unsigned s0, ns; + + if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) + { + c = SUFFIX(p->MinContext); + + if (c->NumStats == 1) + { + CPpmd_State *s = ONE_STATE(c); + if (s->Freq < 32) + s->Freq++; + } + else + { + CPpmd_State *s = STATS(c); + if (s->Symbol != p->FoundState->Symbol) + { + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s[0].Freq >= s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + s--; + } + } + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + } + + if (p->OrderFall == 0) + { + p->MinContext = p->MaxContext = CreateSuccessors(p, True); + if (p->MinContext == 0) + { + RestartModel(p); + return; + } + SetSuccessor(p->FoundState, REF(p->MinContext)); + return; + } + + *p->Text++ = p->FoundState->Symbol; + successor = REF(p->Text); + if (p->Text >= p->UnitsStart) + { + RestartModel(p); + return; + } + + if (fSuccessor) + { + if (fSuccessor <= successor) + { + CTX_PTR cs = CreateSuccessors(p, False); + if (cs == NULL) + { + RestartModel(p); + return; + } + fSuccessor = REF(cs); + } + if (--p->OrderFall == 0) + { + successor = fSuccessor; + p->Text -= (p->MaxContext != p->MinContext); + } + } + else + { + SetSuccessor(p->FoundState, successor); + fSuccessor = REF(p->MinContext); + } + + s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); + + for (c = p->MaxContext; c != p->MinContext; c = SUFFIX(c)) + { + unsigned ns1; + UInt32 cf, sf; + if ((ns1 = c->NumStats) != 1) + { + if ((ns1 & 1) == 0) + { + /* Expand for one UNIT */ + unsigned oldNU = ns1 >> 1; + unsigned i = U2I(oldNU); + if (i != U2I((size_t)oldNU + 1)) + { + void *ptr = AllocUnits(p, i + 1); + void *oldPtr; + if (!ptr) + { + RestartModel(p); + return; + } + oldPtr = STATS(c); + MyMem12Cpy(ptr, oldPtr, oldNU); + InsertNode(p, oldPtr, i); + c->Stats = STATS_REF(ptr); + } + } + c->SummFreq = (UInt16)(c->SummFreq + (2 * ns1 < ns) + 2 * ((4 * ns1 <= ns) & (c->SummFreq <= 8 * ns1))); + } + else + { + CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); + if (!s) + { + RestartModel(p); + return; + } + *s = *ONE_STATE(c); + c->Stats = REF(s); + if (s->Freq < MAX_FREQ / 4 - 1) + s->Freq <<= 1; + else + s->Freq = MAX_FREQ - 4; + c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); + } + cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); + sf = (UInt32)s0 + c->SummFreq; + if (cf < 6 * sf) + { + cf = 1 + (cf > sf) + (cf >= 4 * sf); + c->SummFreq += 3; + } + else + { + cf = 4 + (cf >= 9 * sf) + (cf >= 12 * sf) + (cf >= 15 * sf); + c->SummFreq = (UInt16)(c->SummFreq + cf); + } + { + CPpmd_State *s = STATS(c) + ns1; + SetSuccessor(s, successor); + s->Symbol = p->FoundState->Symbol; + s->Freq = (Byte)cf; + c->NumStats = (UInt16)(ns1 + 1); + } + } + p->MaxContext = p->MinContext = CTX(fSuccessor); +} + +static void Rescale(CPpmd7 *p) +{ + unsigned i, adder, sumFreq, escFreq; + CPpmd_State *stats = STATS(p->MinContext); + CPpmd_State *s = p->FoundState; + { + CPpmd_State tmp = *s; + for (; s != stats; s--) + s[0] = s[-1]; + *s = tmp; + } + escFreq = p->MinContext->SummFreq - s->Freq; + s->Freq += 4; + adder = (p->OrderFall != 0); + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq = s->Freq; + + i = p->MinContext->NumStats - 1; + do + { + escFreq -= (++s)->Freq; + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq += s->Freq; + if (s[0].Freq > s[-1].Freq) + { + CPpmd_State *s1 = s; + CPpmd_State tmp = *s1; + do + s1[0] = s1[-1]; + while (--s1 != stats && tmp.Freq > s1[-1].Freq); + *s1 = tmp; + } + } + while (--i); + + if (s->Freq == 0) + { + unsigned numStats = p->MinContext->NumStats; + unsigned n0, n1; + do { i++; } while ((--s)->Freq == 0); + escFreq += i; + p->MinContext->NumStats = (UInt16)(p->MinContext->NumStats - i); + if (p->MinContext->NumStats == 1) + { + CPpmd_State tmp = *stats; + do + { + tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); + escFreq >>= 1; + } + while (escFreq > 1); + InsertNode(p, stats, U2I(((numStats + 1) >> 1))); + *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; + return; + } + n0 = (numStats + 1) >> 1; + n1 = (p->MinContext->NumStats + 1) >> 1; + if (n0 != n1) + p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); + } + p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); + p->FoundState = STATS(p->MinContext); +} + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) +{ + CPpmd_See *see; + unsigned nonMasked = p->MinContext->NumStats - numMasked; + if (p->MinContext->NumStats != 256) + { + see = p->See[(unsigned)p->NS2Indx[(size_t)nonMasked - 1]] + + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + + 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (unsigned)(numMasked > nonMasked) + + p->HiBitsFlag; + { + unsigned r = (see->Summ >> see->Shift); + see->Summ = (UInt16)(see->Summ - r); + *escFreq = r + (r == 0); + } + } + else + { + see = &p->DummySee; + *escFreq = 1; + } + return see; +} + +static void NextContext(CPpmd7 *p) +{ + CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); + if (p->OrderFall == 0 && (Byte *)c > p->Text) + p->MinContext = p->MaxContext = c; + else + UpdateModel(p); +} + +void Ppmd7_Update1(CPpmd7 *p) +{ + CPpmd_State *s = p->FoundState; + s->Freq += 4; + p->MinContext->SummFreq += 4; + if (s[0].Freq > s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + p->FoundState = --s; + if (s->Freq > MAX_FREQ) + Rescale(p); + } + NextContext(p); +} + +void Ppmd7_Update1_0(CPpmd7 *p) +{ + p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); + p->RunLength += p->PrevSuccess; + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + NextContext(p); +} + +void Ppmd7_UpdateBin(CPpmd7 *p) +{ + p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); + p->PrevSuccess = 1; + p->RunLength++; + NextContext(p); +} + +void Ppmd7_Update2(CPpmd7 *p) +{ + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + p->RunLength = p->InitRL; + UpdateModel(p); +} diff --git a/bsnes/lzma/Ppmd7.h b/bsnes/lzma/Ppmd7.h new file mode 100644 index 00000000..cce93f12 --- /dev/null +++ b/bsnes/lzma/Ppmd7.h @@ -0,0 +1,142 @@ +/* Ppmd7.h -- PPMdH compression codec +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +/* This code supports virtual RangeDecoder and includes the implementation +of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. +If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ + +#ifndef __PPMD7_H +#define __PPMD7_H + +#include "Ppmd.h" + +EXTERN_C_BEGIN + +#define PPMD7_MIN_ORDER 2 +#define PPMD7_MAX_ORDER 64 + +#define PPMD7_MIN_MEM_SIZE (1 << 11) +#define PPMD7_MAX_MEM_SIZE (0xFFFFFFFF - 12 * 3) + +struct CPpmd7_Context_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Context_ * + #else + UInt32 + #endif + CPpmd7_Context_Ref; + +typedef struct CPpmd7_Context_ +{ + UInt16 NumStats; + UInt16 SummFreq; + CPpmd_State_Ref Stats; + CPpmd7_Context_Ref Suffix; +} CPpmd7_Context; + +#define Ppmd7Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) + +typedef struct +{ + CPpmd7_Context *MinContext, *MaxContext; + CPpmd_State *FoundState; + unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder, HiBitsFlag; + Int32 RunLength, InitRL; /* must be 32-bit at least */ + + UInt32 Size; + UInt32 GlueCount; + Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; + UInt32 AlignOffset; + + Byte Indx2Units[PPMD_NUM_INDEXES]; + Byte Units2Indx[128]; + CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; + Byte NS2Indx[256], NS2BSIndx[256], HB2Flag[256]; + CPpmd_See DummySee, See[25][16]; + UInt16 BinSumm[128][64]; +} CPpmd7; + +void Ppmd7_Construct(CPpmd7 *p); +BoolInt Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAllocPtr alloc); +void Ppmd7_Free(CPpmd7 *p, ISzAllocPtr alloc); +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder); +#define Ppmd7_WasAllocated(p) ((p)->Base != NULL) + + +/* ---------- Internal Functions ---------- */ + +extern const Byte PPMD7_kExpEscape[16]; + +#ifdef PPMD_32BIT + #define Ppmd7_GetPtr(p, ptr) (ptr) + #define Ppmd7_GetContext(p, ptr) (ptr) + #define Ppmd7_GetStats(p, ctx) ((ctx)->Stats) +#else + #define Ppmd7_GetPtr(p, offs) ((void *)((p)->Base + (offs))) + #define Ppmd7_GetContext(p, offs) ((CPpmd7_Context *)Ppmd7_GetPtr((p), (offs))) + #define Ppmd7_GetStats(p, ctx) ((CPpmd_State *)Ppmd7_GetPtr((p), ((ctx)->Stats))) +#endif + +void Ppmd7_Update1(CPpmd7 *p); +void Ppmd7_Update1_0(CPpmd7 *p); +void Ppmd7_Update2(CPpmd7 *p); +void Ppmd7_UpdateBin(CPpmd7 *p); + +#define Ppmd7_GetBinSumm(p) \ + &p->BinSumm[(size_t)(unsigned)Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ + p->NS2BSIndx[(size_t)Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ + (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ + 2 * p->HB2Flag[(unsigned)Ppmd7Context_OneState(p->MinContext)->Symbol] + \ + ((p->RunLength >> 26) & 0x20)] + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); + + +/* ---------- Decode ---------- */ + +typedef struct IPpmd7_RangeDec IPpmd7_RangeDec; + +struct IPpmd7_RangeDec +{ + UInt32 (*GetThreshold)(const IPpmd7_RangeDec *p, UInt32 total); + void (*Decode)(const IPpmd7_RangeDec *p, UInt32 start, UInt32 size); + UInt32 (*DecodeBit)(const IPpmd7_RangeDec *p, UInt32 size0); +}; + +typedef struct +{ + IPpmd7_RangeDec vt; + UInt32 Range; + UInt32 Code; + IByteIn *Stream; +} CPpmd7z_RangeDec; + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p); +BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p); +#define Ppmd7z_RangeDec_IsFinishedOK(p) ((p)->Code == 0) + +int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc); + + +/* ---------- Encode ---------- */ + +typedef struct +{ + UInt64 Low; + UInt32 Range; + Byte Cache; + UInt64 CacheSize; + IByteOut *Stream; +} CPpmd7z_RangeEnc; + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p); +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p); + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Ppmd7Dec.c b/bsnes/lzma/Ppmd7Dec.c new file mode 100644 index 00000000..20264071 --- /dev/null +++ b/bsnes/lzma/Ppmd7Dec.c @@ -0,0 +1,191 @@ +/* Ppmd7Dec.c -- PPMdH Decoder +2018-07-04 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +BoolInt Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p) +{ + unsigned i; + p->Code = 0; + p->Range = 0xFFFFFFFF; + if (IByteIn_Read(p->Stream) != 0) + return False; + for (i = 0; i < 4; i++) + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + return (p->Code < 0xFFFFFFFF); +} + +#define GET_Ppmd7z_RangeDec CPpmd7z_RangeDec *p = CONTAINER_FROM_VTBL(pp, CPpmd7z_RangeDec, vt); + +static UInt32 Range_GetThreshold(const IPpmd7_RangeDec *pp, UInt32 total) +{ + GET_Ppmd7z_RangeDec + return p->Code / (p->Range /= total); +} + +static void Range_Normalize(CPpmd7z_RangeDec *p) +{ + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + p->Range <<= 8; + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | IByteIn_Read(p->Stream); + p->Range <<= 8; + } + } +} + +static void Range_Decode(const IPpmd7_RangeDec *pp, UInt32 start, UInt32 size) +{ + GET_Ppmd7z_RangeDec + p->Code -= start * p->Range; + p->Range *= size; + Range_Normalize(p); +} + +static UInt32 Range_DecodeBit(const IPpmd7_RangeDec *pp, UInt32 size0) +{ + GET_Ppmd7z_RangeDec + UInt32 newBound = (p->Range >> 14) * size0; + UInt32 symbol; + if (p->Code < newBound) + { + symbol = 0; + p->Range = newBound; + } + else + { + symbol = 1; + p->Code -= newBound; + p->Range -= newBound; + } + Range_Normalize(p); + return symbol; +} + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p) +{ + p->vt.GetThreshold = Range_GetThreshold; + p->vt.Decode = Range_Decode; + p->vt.DecodeBit = Range_DecodeBit; +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +int Ppmd7_DecodeSymbol(CPpmd7 *p, const IPpmd7_RangeDec *rc) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + unsigned i; + UInt32 count, hiCnt; + if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) + { + Byte symbol; + rc->Decode(rc, 0, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1_0(p); + return symbol; + } + p->PrevSuccess = 0; + i = p->MinContext->NumStats - 1; + do + { + if ((hiCnt += (++s)->Freq) > count) + { + Byte symbol; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1(p); + return symbol; + } + } + while (--i); + if (count >= p->MinContext->SummFreq) + return -2; + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt); + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + if (rc->DecodeBit(rc, *prob) == 0) + { + Byte symbol; + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))->Symbol; + Ppmd7_UpdateBin(p); + return symbol; + } + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(Ppmd7Context_OneState(p->MinContext)->Symbol) = 0; + p->PrevSuccess = 0; + } + for (;;) + { + CPpmd_State *ps[256], *s; + UInt32 freqSum, count, hiCnt; + CPpmd_See *see; + unsigned i, num, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return -1; + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + hiCnt = 0; + s = Ppmd7_GetStats(p, p->MinContext); + i = 0; + num = p->MinContext->NumStats - numMasked; + do + { + int k = (int)(MASK(s->Symbol)); + hiCnt += (s->Freq & k); + ps[i] = s++; + i -= k; + } + while (i != num); + + see = Ppmd7_MakeEscFreq(p, numMasked, &freqSum); + freqSum += hiCnt; + count = rc->GetThreshold(rc, freqSum); + + if (count < hiCnt) + { + Byte symbol; + CPpmd_State **pps = ps; + for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); + s = *pps; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + Ppmd_See_Update(see); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update2(p); + return symbol; + } + if (count >= freqSum) + return -2; + rc->Decode(rc, hiCnt, freqSum - hiCnt); + see->Summ = (UInt16)(see->Summ + freqSum); + do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); + } +} diff --git a/bsnes/lzma/Ppmd7Enc.c b/bsnes/lzma/Ppmd7Enc.c new file mode 100644 index 00000000..a74d3002 --- /dev/null +++ b/bsnes/lzma/Ppmd7Enc.c @@ -0,0 +1,187 @@ +/* Ppmd7Enc.c -- PPMdH Encoder +2017-04-03 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Precomp.h" + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p) +{ + p->Low = 0; + p->Range = 0xFFFFFFFF; + p->Cache = 0; + p->CacheSize = 1; +} + +static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) +{ + if ((UInt32)p->Low < (UInt32)0xFF000000 || (unsigned)(p->Low >> 32) != 0) + { + Byte temp = p->Cache; + do + { + IByteOut_Write(p->Stream, (Byte)(temp + (Byte)(p->Low >> 32))); + temp = 0xFF; + } + while (--p->CacheSize != 0); + p->Cache = (Byte)((UInt32)p->Low >> 24); + } + p->CacheSize++; + p->Low = (UInt32)p->Low << 8; +} + +static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) +{ + p->Low += start * (p->Range /= total); + p->Range *= size; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_0(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + p->Range = (p->Range >> 14) * size0; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_1(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + UInt32 newBound = (p->Range >> 14) * size0; + p->Low += newBound; + p->Range -= newBound; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p) +{ + unsigned i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + UInt32 sum; + unsigned i; + if (s->Symbol == symbol) + { + RangeEnc_Encode(rc, 0, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1_0(p); + return; + } + p->PrevSuccess = 0; + sum = s->Freq; + i = p->MinContext->NumStats - 1; + do + { + if ((++s)->Symbol == symbol) + { + RangeEnc_Encode(rc, sum, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1(p); + return; + } + sum += s->Freq; + } + while (--i); + + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + RangeEnc_Encode(rc, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + CPpmd_State *s = Ppmd7Context_OneState(p->MinContext); + if (s->Symbol == symbol) + { + RangeEnc_EncodeBit_0(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + p->FoundState = s; + Ppmd7_UpdateBin(p); + return; + } + else + { + RangeEnc_EncodeBit_1(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + p->PrevSuccess = 0; + } + } + for (;;) + { + UInt32 escFreq; + CPpmd_See *see; + CPpmd_State *s; + UInt32 sum; + unsigned i, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return; /* EndMarker (symbol = -1) */ + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + + see = Ppmd7_MakeEscFreq(p, numMasked, &escFreq); + s = Ppmd7_GetStats(p, p->MinContext); + sum = 0; + i = p->MinContext->NumStats; + do + { + int cur = s->Symbol; + if (cur == symbol) + { + UInt32 low = sum; + CPpmd_State *s1 = s; + do + { + sum += (s->Freq & (int)(MASK(s->Symbol))); + s++; + } + while (--i); + RangeEnc_Encode(rc, low, s1->Freq, sum + escFreq); + Ppmd_See_Update(see); + p->FoundState = s1; + Ppmd7_Update2(p); + return; + } + sum += (s->Freq & (int)(MASK(cur))); + MASK(cur) = 0; + s++; + } + while (--i); + + RangeEnc_Encode(rc, sum, escFreq, sum + escFreq); + see->Summ = (UInt16)(see->Summ + sum + escFreq); + } +} diff --git a/bsnes/lzma/Precomp.h b/bsnes/lzma/Precomp.h new file mode 100644 index 00000000..edb58144 --- /dev/null +++ b/bsnes/lzma/Precomp.h @@ -0,0 +1,10 @@ +/* Precomp.h -- StdAfx +2013-11-12 : Igor Pavlov : Public domain */ + +#ifndef __7Z_PRECOMP_H +#define __7Z_PRECOMP_H + +#include "Compiler.h" +/* #include "7zTypes.h" */ + +#endif diff --git a/bsnes/lzma/RotateDefs.h b/bsnes/lzma/RotateDefs.h new file mode 100644 index 00000000..6c790e79 --- /dev/null +++ b/bsnes/lzma/RotateDefs.h @@ -0,0 +1,30 @@ +/* RotateDefs.h -- Rotate functions +2015-03-25 : Igor Pavlov : Public domain */ + +#ifndef __ROTATE_DEFS_H +#define __ROTATE_DEFS_H + +#ifdef _MSC_VER + +#include + +/* don't use _rotl with MINGW. It can insert slow call to function. */ + +/* #if (_MSC_VER >= 1200) */ +#pragma intrinsic(_rotl) +#pragma intrinsic(_rotr) +/* #endif */ + +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +/* new compilers can translate these macros to fast commands. */ + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif diff --git a/bsnes/lzma/Sha256.c b/bsnes/lzma/Sha256.c new file mode 100644 index 00000000..90994e5a --- /dev/null +++ b/bsnes/lzma/Sha256.c @@ -0,0 +1,248 @@ +/* Crypto/Sha256.c -- SHA-256 Hash +2017-04-03 : Igor Pavlov : Public domain +This code is based on public domain code from Wei Dai's Crypto++ library. */ + +#include "Precomp.h" + +#include + +#include "CpuArch.h" +#include "RotateDefs.h" +#include "Sha256.h" + +/* define it for speed optimization */ +#ifndef _SFX +#define _SHA256_UNROLL +#define _SHA256_UNROLL2 +#endif + +/* #define _SHA256_UNROLL2 */ + +void Sha256_Init(CSha256 *p) +{ + p->state[0] = 0x6a09e667; + p->state[1] = 0xbb67ae85; + p->state[2] = 0x3c6ef372; + p->state[3] = 0xa54ff53a; + p->state[4] = 0x510e527f; + p->state[5] = 0x9b05688c; + p->state[6] = 0x1f83d9ab; + p->state[7] = 0x5be0cd19; + p->count = 0; +} + +#define S0(x) (rotrFixed(x, 2) ^ rotrFixed(x,13) ^ rotrFixed(x, 22)) +#define S1(x) (rotrFixed(x, 6) ^ rotrFixed(x,11) ^ rotrFixed(x, 25)) +#define s0(x) (rotrFixed(x, 7) ^ rotrFixed(x,18) ^ (x >> 3)) +#define s1(x) (rotrFixed(x,17) ^ rotrFixed(x,19) ^ (x >> 10)) + +#define blk0(i) (W[i]) +#define blk2(i) (W[i] += s1(W[((i)-2)&15]) + W[((i)-7)&15] + s0(W[((i)-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#ifdef _SHA256_UNROLL2 + +#define R(a,b,c,d,e,f,g,h, i) \ + h += S1(e) + Ch(e,f,g) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ + d += h; \ + h += S0(a) + Maj(a, b, c) + +#define RX_8(i) \ + R(a,b,c,d,e,f,g,h, i); \ + R(h,a,b,c,d,e,f,g, i+1); \ + R(g,h,a,b,c,d,e,f, i+2); \ + R(f,g,h,a,b,c,d,e, i+3); \ + R(e,f,g,h,a,b,c,d, i+4); \ + R(d,e,f,g,h,a,b,c, i+5); \ + R(c,d,e,f,g,h,a,b, i+6); \ + R(b,c,d,e,f,g,h,a, i+7) + +#define RX_16 RX_8(0); RX_8(8); + +#else + +#define a(i) T[(0-(i))&7] +#define b(i) T[(1-(i))&7] +#define c(i) T[(2-(i))&7] +#define d(i) T[(3-(i))&7] +#define e(i) T[(4-(i))&7] +#define f(i) T[(5-(i))&7] +#define g(i) T[(6-(i))&7] +#define h(i) T[(7-(i))&7] + +#define R(i) \ + h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[(i)+(size_t)(j)] + (j ? blk2(i) : blk0(i)); \ + d(i) += h(i); \ + h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) \ + +#ifdef _SHA256_UNROLL + +#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7); +#define RX_16 RX_8(0); RX_8(8); + +#else + +#define RX_16 unsigned i; for (i = 0; i < 16; i++) { R(i); } + +#endif + +#endif + +static const UInt32 K[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +static void Sha256_WriteByteBlock(CSha256 *p) +{ + UInt32 W[16]; + unsigned j; + UInt32 *state; + + #ifdef _SHA256_UNROLL2 + UInt32 a,b,c,d,e,f,g,h; + #else + UInt32 T[8]; + #endif + + for (j = 0; j < 16; j += 4) + { + const Byte *ccc = p->buffer + j * 4; + W[j ] = GetBe32(ccc); + W[j + 1] = GetBe32(ccc + 4); + W[j + 2] = GetBe32(ccc + 8); + W[j + 3] = GetBe32(ccc + 12); + } + + state = p->state; + + #ifdef _SHA256_UNROLL2 + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + #else + for (j = 0; j < 8; j++) + T[j] = state[j]; + #endif + + for (j = 0; j < 64; j += 16) + { + RX_16 + } + + #ifdef _SHA256_UNROLL2 + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + #else + for (j = 0; j < 8; j++) + state[j] += T[j]; + #endif + + /* Wipe variables */ + /* memset(W, 0, sizeof(W)); */ + /* memset(T, 0, sizeof(T)); */ +} + +#undef S0 +#undef S1 +#undef s0 +#undef s1 + +void Sha256_Update(CSha256 *p, const Byte *data, size_t size) +{ + if (size == 0) + return; + + { + unsigned pos = (unsigned)p->count & 0x3F; + unsigned num; + + p->count += size; + + num = 64 - pos; + if (num > size) + { + memcpy(p->buffer + pos, data, size); + return; + } + + size -= num; + memcpy(p->buffer + pos, data, num); + data += num; + } + + for (;;) + { + Sha256_WriteByteBlock(p); + if (size < 64) + break; + size -= 64; + memcpy(p->buffer, data, 64); + data += 64; + } + + if (size != 0) + memcpy(p->buffer, data, size); +} + +void Sha256_Final(CSha256 *p, Byte *digest) +{ + unsigned pos = (unsigned)p->count & 0x3F; + unsigned i; + + p->buffer[pos++] = 0x80; + + while (pos != (64 - 8)) + { + pos &= 0x3F; + if (pos == 0) + Sha256_WriteByteBlock(p); + p->buffer[pos++] = 0; + } + + { + UInt64 numBits = (p->count << 3); + SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32)); + SetBe32(p->buffer + 64 - 4, (UInt32)(numBits)); + } + + Sha256_WriteByteBlock(p); + + for (i = 0; i < 8; i += 2) + { + UInt32 v0 = p->state[i]; + UInt32 v1 = p->state[i + 1]; + SetBe32(digest , v0); + SetBe32(digest + 4, v1); + digest += 8; + } + + Sha256_Init(p); +} diff --git a/bsnes/lzma/Sha256.h b/bsnes/lzma/Sha256.h new file mode 100644 index 00000000..7f17ccf9 --- /dev/null +++ b/bsnes/lzma/Sha256.h @@ -0,0 +1,26 @@ +/* Sha256.h -- SHA-256 Hash +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __CRYPTO_SHA256_H +#define __CRYPTO_SHA256_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +#define SHA256_DIGEST_SIZE 32 + +typedef struct +{ + UInt32 state[8]; + UInt64 count; + Byte buffer[64]; +} CSha256; + +void Sha256_Init(CSha256 *p); +void Sha256_Update(CSha256 *p, const Byte *data, size_t size); +void Sha256_Final(CSha256 *p, Byte *digest); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Sort.c b/bsnes/lzma/Sort.c new file mode 100644 index 00000000..73dcbf05 --- /dev/null +++ b/bsnes/lzma/Sort.c @@ -0,0 +1,141 @@ +/* Sort.c -- Sort functions +2014-04-05 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "Sort.h" + +#define HeapSortDown(p, k, size, temp) \ + { for (;;) { \ + size_t s = (k << 1); \ + if (s > size) break; \ + if (s < size && p[s + 1] > p[s]) s++; \ + if (temp >= p[s]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSort(UInt32 *p, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt32 temp = p[i]; + size_t k = i; + HeapSortDown(p, k, size, temp) + } + while (--i != 0); + } + /* + do + { + size_t k = 1; + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortDown(p, k, size, temp) + } + while (size > 1); + */ + while (size > 3) + { + UInt32 temp = p[size]; + size_t k = (p[3] > p[2]) ? 3 : 2; + p[size--] = p[1]; + p[1] = p[k]; + HeapSortDown(p, k, size, temp) + } + { + UInt32 temp = p[size]; + p[size] = p[1]; + if (size > 2 && p[2] < temp) + { + p[1] = p[2]; + p[2] = temp; + } + else + p[1] = temp; + } +} + +void HeapSort64(UInt64 *p, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt64 temp = p[i]; + size_t k = i; + HeapSortDown(p, k, size, temp) + } + while (--i != 0); + } + /* + do + { + size_t k = 1; + UInt64 temp = p[size]; + p[size--] = p[1]; + HeapSortDown(p, k, size, temp) + } + while (size > 1); + */ + while (size > 3) + { + UInt64 temp = p[size]; + size_t k = (p[3] > p[2]) ? 3 : 2; + p[size--] = p[1]; + p[1] = p[k]; + HeapSortDown(p, k, size, temp) + } + { + UInt64 temp = p[size]; + p[size] = p[1]; + if (size > 2 && p[2] < temp) + { + p[1] = p[2]; + p[2] = temp; + } + else + p[1] = temp; + } +} + +/* +#define HeapSortRefDown(p, vals, n, size, temp) \ + { size_t k = n; UInt32 val = vals[temp]; for (;;) { \ + size_t s = (k << 1); \ + if (s > size) break; \ + if (s < size && vals[p[s + 1]] > vals[p[s]]) s++; \ + if (val >= vals[p[s]]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size) +{ + if (size <= 1) + return; + p--; + { + size_t i = size / 2; + do + { + UInt32 temp = p[i]; + HeapSortRefDown(p, vals, i, size, temp); + } + while (--i != 0); + } + do + { + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortRefDown(p, vals, 1, size, temp); + } + while (size > 1); +} +*/ diff --git a/bsnes/lzma/Sort.h b/bsnes/lzma/Sort.h new file mode 100644 index 00000000..7209d782 --- /dev/null +++ b/bsnes/lzma/Sort.h @@ -0,0 +1,18 @@ +/* Sort.h -- Sort functions +2014-04-05 : Igor Pavlov : Public domain */ + +#ifndef __7Z_SORT_H +#define __7Z_SORT_H + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +void HeapSort(UInt32 *p, size_t size); +void HeapSort64(UInt64 *p, size_t size); + +/* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Threads.c b/bsnes/lzma/Threads.c new file mode 100644 index 00000000..8fd86f22 --- /dev/null +++ b/bsnes/lzma/Threads.c @@ -0,0 +1,95 @@ +/* Threads.c -- multithreading library +2017-06-26 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#ifndef UNDER_CE +#include +#endif + +#include "Threads.h" + +static WRes GetError() +{ + DWORD res = GetLastError(); + return res ? (WRes)res : 1; +} + +static WRes HandleToWRes(HANDLE h) { return (h != NULL) ? 0 : GetError(); } +static WRes BOOLToWRes(BOOL v) { return v ? 0 : GetError(); } + +WRes HandlePtr_Close(HANDLE *p) +{ + if (*p != NULL) + { + if (!CloseHandle(*p)) + return GetError(); + *p = NULL; + } + return 0; +} + +WRes Handle_WaitObject(HANDLE h) { return (WRes)WaitForSingleObject(h, INFINITE); } + +WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param) +{ + /* Windows Me/98/95: threadId parameter may not be NULL in _beginthreadex/CreateThread functions */ + + #ifdef UNDER_CE + + DWORD threadId; + *p = CreateThread(0, 0, func, param, 0, &threadId); + + #else + + unsigned threadId; + *p = (HANDLE)_beginthreadex(NULL, 0, func, param, 0, &threadId); + + #endif + + /* maybe we must use errno here, but probably GetLastError() is also OK. */ + return HandleToWRes(*p); +} + +static WRes Event_Create(CEvent *p, BOOL manualReset, int signaled) +{ + *p = CreateEvent(NULL, manualReset, (signaled ? TRUE : FALSE), NULL); + return HandleToWRes(*p); +} + +WRes Event_Set(CEvent *p) { return BOOLToWRes(SetEvent(*p)); } +WRes Event_Reset(CEvent *p) { return BOOLToWRes(ResetEvent(*p)); } + +WRes ManualResetEvent_Create(CManualResetEvent *p, int signaled) { return Event_Create(p, TRUE, signaled); } +WRes AutoResetEvent_Create(CAutoResetEvent *p, int signaled) { return Event_Create(p, FALSE, signaled); } +WRes ManualResetEvent_CreateNotSignaled(CManualResetEvent *p) { return ManualResetEvent_Create(p, 0); } +WRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *p) { return AutoResetEvent_Create(p, 0); } + + +WRes Semaphore_Create(CSemaphore *p, UInt32 initCount, UInt32 maxCount) +{ + *p = CreateSemaphore(NULL, (LONG)initCount, (LONG)maxCount, NULL); + return HandleToWRes(*p); +} + +static WRes Semaphore_Release(CSemaphore *p, LONG releaseCount, LONG *previousCount) + { return BOOLToWRes(ReleaseSemaphore(*p, releaseCount, previousCount)); } +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 num) + { return Semaphore_Release(p, (LONG)num, NULL); } +WRes Semaphore_Release1(CSemaphore *p) { return Semaphore_ReleaseN(p, 1); } + +WRes CriticalSection_Init(CCriticalSection *p) +{ + /* InitializeCriticalSection can raise only STATUS_NO_MEMORY exception */ + #ifdef _MSC_VER + __try + #endif + { + InitializeCriticalSection(p); + /* InitializeCriticalSectionAndSpinCount(p, 0); */ + } + #ifdef _MSC_VER + __except (EXCEPTION_EXECUTE_HANDLER) { return 1; } + #endif + return 0; +} diff --git a/bsnes/lzma/Threads.h b/bsnes/lzma/Threads.h new file mode 100644 index 00000000..f913241a --- /dev/null +++ b/bsnes/lzma/Threads.h @@ -0,0 +1,68 @@ +/* Threads.h -- multithreading library +2017-06-18 : Igor Pavlov : Public domain */ + +#ifndef __7Z_THREADS_H +#define __7Z_THREADS_H + +#ifdef _WIN32 +#include +#endif + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +WRes HandlePtr_Close(HANDLE *h); +WRes Handle_WaitObject(HANDLE h); + +typedef HANDLE CThread; +#define Thread_Construct(p) *(p) = NULL +#define Thread_WasCreated(p) (*(p) != NULL) +#define Thread_Close(p) HandlePtr_Close(p) +#define Thread_Wait(p) Handle_WaitObject(*(p)) + +typedef +#ifdef UNDER_CE + DWORD +#else + unsigned +#endif + THREAD_FUNC_RET_TYPE; + +#define THREAD_FUNC_CALL_TYPE MY_STD_CALL +#define THREAD_FUNC_DECL THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE +typedef THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE * THREAD_FUNC_TYPE)(void *); +WRes Thread_Create(CThread *p, THREAD_FUNC_TYPE func, LPVOID param); + +typedef HANDLE CEvent; +typedef CEvent CAutoResetEvent; +typedef CEvent CManualResetEvent; +#define Event_Construct(p) *(p) = NULL +#define Event_IsCreated(p) (*(p) != NULL) +#define Event_Close(p) HandlePtr_Close(p) +#define Event_Wait(p) Handle_WaitObject(*(p)) +WRes Event_Set(CEvent *p); +WRes Event_Reset(CEvent *p); +WRes ManualResetEvent_Create(CManualResetEvent *p, int signaled); +WRes ManualResetEvent_CreateNotSignaled(CManualResetEvent *p); +WRes AutoResetEvent_Create(CAutoResetEvent *p, int signaled); +WRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *p); + +typedef HANDLE CSemaphore; +#define Semaphore_Construct(p) *(p) = NULL +#define Semaphore_IsCreated(p) (*(p) != NULL) +#define Semaphore_Close(p) HandlePtr_Close(p) +#define Semaphore_Wait(p) Handle_WaitObject(*(p)) +WRes Semaphore_Create(CSemaphore *p, UInt32 initCount, UInt32 maxCount); +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 num); +WRes Semaphore_Release1(CSemaphore *p); + +typedef CRITICAL_SECTION CCriticalSection; +WRes CriticalSection_Init(CCriticalSection *p); +#define CriticalSection_Delete(p) DeleteCriticalSection(p) +#define CriticalSection_Enter(p) EnterCriticalSection(p) +#define CriticalSection_Leave(p) LeaveCriticalSection(p) + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/Xz.c b/bsnes/lzma/Xz.c new file mode 100644 index 00000000..7e061d6e --- /dev/null +++ b/bsnes/lzma/Xz.c @@ -0,0 +1,90 @@ +/* Xz.c - Xz +2017-05-12 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" +#include "XzCrc64.h" + +const Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 }; +/* const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' }; */ + +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v) +{ + unsigned i = 0; + do + { + buf[i++] = (Byte)((v & 0x7F) | 0x80); + v >>= 7; + } + while (v != 0); + buf[(size_t)i - 1] &= 0x7F; + return i; +} + +void Xz_Construct(CXzStream *p) +{ + p->numBlocks = 0; + p->blocks = NULL; + p->flags = 0; +} + +void Xz_Free(CXzStream *p, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, p->blocks); + p->numBlocks = 0; + p->blocks = NULL; +} + +unsigned XzFlags_GetCheckSize(CXzStreamFlags f) +{ + unsigned t = XzFlags_GetCheckType(f); + return (t == 0) ? 0 : (4 << ((t - 1) / 3)); +} + +void XzCheck_Init(CXzCheck *p, unsigned mode) +{ + p->mode = mode; + switch (mode) + { + case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break; + case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break; + case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break; + } +} + +void XzCheck_Update(CXzCheck *p, const void *data, size_t size) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break; + case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break; + case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break; + } +} + +int XzCheck_Final(CXzCheck *p, Byte *digest) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: + SetUi32(digest, CRC_GET_DIGEST(p->crc)); + break; + case XZ_CHECK_CRC64: + { + int i; + UInt64 v = CRC64_GET_DIGEST(p->crc64); + for (i = 0; i < 8; i++, v >>= 8) + digest[i] = (Byte)(v & 0xFF); + break; + } + case XZ_CHECK_SHA256: + Sha256_Final(&p->sha, digest); + break; + default: + return 0; + } + return 1; +} diff --git a/bsnes/lzma/Xz.h b/bsnes/lzma/Xz.h new file mode 100644 index 00000000..fad56a3f --- /dev/null +++ b/bsnes/lzma/Xz.h @@ -0,0 +1,460 @@ +/* Xz.h - Xz interface +2018-07-04 : Igor Pavlov : Public domain */ + +#ifndef __XZ_H +#define __XZ_H + +#include "Sha256.h" + +EXTERN_C_BEGIN + +#define XZ_ID_Subblock 1 +#define XZ_ID_Delta 3 +#define XZ_ID_X86 4 +#define XZ_ID_PPC 5 +#define XZ_ID_IA64 6 +#define XZ_ID_ARM 7 +#define XZ_ID_ARMT 8 +#define XZ_ID_SPARC 9 +#define XZ_ID_LZMA2 0x21 + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value); +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v); + +/* ---------- xz block ---------- */ + +#define XZ_BLOCK_HEADER_SIZE_MAX 1024 + +#define XZ_NUM_FILTERS_MAX 4 +#define XZ_BF_NUM_FILTERS_MASK 3 +#define XZ_BF_PACK_SIZE (1 << 6) +#define XZ_BF_UNPACK_SIZE (1 << 7) + +#define XZ_FILTER_PROPS_SIZE_MAX 20 + +typedef struct +{ + UInt64 id; + UInt32 propsSize; + Byte props[XZ_FILTER_PROPS_SIZE_MAX]; +} CXzFilter; + +typedef struct +{ + UInt64 packSize; + UInt64 unpackSize; + Byte flags; + CXzFilter filters[XZ_NUM_FILTERS_MAX]; +} CXzBlock; + +#define XzBlock_GetNumFilters(p) (((p)->flags & XZ_BF_NUM_FILTERS_MASK) + 1) +#define XzBlock_HasPackSize(p) (((p)->flags & XZ_BF_PACK_SIZE) != 0) +#define XzBlock_HasUnpackSize(p) (((p)->flags & XZ_BF_UNPACK_SIZE) != 0) +#define XzBlock_HasUnsupportedFlags(p) (((p)->flags & ~(XZ_BF_NUM_FILTERS_MASK | XZ_BF_PACK_SIZE | XZ_BF_UNPACK_SIZE)) != 0) + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header); +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes); + +/* ---------- xz stream ---------- */ + +#define XZ_SIG_SIZE 6 +#define XZ_FOOTER_SIG_SIZE 2 + +extern const Byte XZ_SIG[XZ_SIG_SIZE]; + +/* +extern const Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE]; +*/ + +#define XZ_FOOTER_SIG_0 'Y' +#define XZ_FOOTER_SIG_1 'Z' + +#define XZ_STREAM_FLAGS_SIZE 2 +#define XZ_STREAM_CRC_SIZE 4 + +#define XZ_STREAM_HEADER_SIZE (XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE) +#define XZ_STREAM_FOOTER_SIZE (XZ_FOOTER_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE + 4) + +#define XZ_CHECK_MASK 0xF +#define XZ_CHECK_NO 0 +#define XZ_CHECK_CRC32 1 +#define XZ_CHECK_CRC64 4 +#define XZ_CHECK_SHA256 10 + +typedef struct +{ + unsigned mode; + UInt32 crc; + UInt64 crc64; + CSha256 sha; +} CXzCheck; + +void XzCheck_Init(CXzCheck *p, unsigned mode); +void XzCheck_Update(CXzCheck *p, const void *data, size_t size); +int XzCheck_Final(CXzCheck *p, Byte *digest); + +typedef UInt16 CXzStreamFlags; + +#define XzFlags_IsSupported(f) ((f) <= XZ_CHECK_MASK) +#define XzFlags_GetCheckType(f) ((f) & XZ_CHECK_MASK) +#define XzFlags_HasDataCrc32(f) (Xz_GetCheckType(f) == XZ_CHECK_CRC32) +unsigned XzFlags_GetCheckSize(CXzStreamFlags f); + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf); +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream); + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; +} CXzBlockSizes; + +typedef struct +{ + CXzStreamFlags flags; + size_t numBlocks; + CXzBlockSizes *blocks; + UInt64 startOffset; +} CXzStream; + +void Xz_Construct(CXzStream *p); +void Xz_Free(CXzStream *p, ISzAllocPtr alloc); + +#define XZ_SIZE_OVERFLOW ((UInt64)(Int64)-1) + +UInt64 Xz_GetUnpackSize(const CXzStream *p); +UInt64 Xz_GetPackSize(const CXzStream *p); + +typedef struct +{ + size_t num; + size_t numAllocated; + CXzStream *streams; +} CXzs; + +void Xzs_Construct(CXzs *p); +void Xzs_Free(CXzs *p, ISzAllocPtr alloc); +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *inStream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc); + +UInt64 Xzs_GetNumBlocks(const CXzs *p); +UInt64 Xzs_GetUnpackSize(const CXzs *p); + + +// ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder + +typedef enum +{ + CODER_STATUS_NOT_SPECIFIED, /* use main error code instead */ + CODER_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + CODER_STATUS_NOT_FINISHED, /* stream was not finished */ + CODER_STATUS_NEEDS_MORE_INPUT /* you must provide more input bytes */ +} ECoderStatus; + + +// ECoderFinishMode values are identical to ELzmaFinishMode + +typedef enum +{ + CODER_FINISH_ANY, /* finish at any point */ + CODER_FINISH_END /* block must be finished at the end */ +} ECoderFinishMode; + + +typedef struct _IStateCoder +{ + void *p; + void (*Free)(void *p, ISzAllocPtr alloc); + SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAllocPtr alloc); + void (*Init)(void *p); + SRes (*Code2)(void *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished, + ECoderStatus *status); + SizeT (*Filter)(void *p, Byte *data, SizeT size); +} IStateCoder; + + + +#define MIXCODER_NUM_FILTERS_MAX 4 + +typedef struct +{ + ISzAllocPtr alloc; + Byte *buf; + unsigned numCoders; + + Byte *outBuf; + size_t outBufSize; + size_t outWritten; // is equal to lzmaDecoder.dicPos (in outBuf mode) + BoolInt wasFinished; + SRes res; + ECoderStatus status; + // BoolInt SingleBufMode; + + int finished[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t pos[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t size[MIXCODER_NUM_FILTERS_MAX - 1]; + UInt64 ids[MIXCODER_NUM_FILTERS_MAX]; + SRes results[MIXCODER_NUM_FILTERS_MAX]; + IStateCoder coders[MIXCODER_NUM_FILTERS_MAX]; +} CMixCoder; + + +typedef enum +{ + XZ_STATE_STREAM_HEADER, + XZ_STATE_STREAM_INDEX, + XZ_STATE_STREAM_INDEX_CRC, + XZ_STATE_STREAM_FOOTER, + XZ_STATE_STREAM_PADDING, + XZ_STATE_BLOCK_HEADER, + XZ_STATE_BLOCK, + XZ_STATE_BLOCK_FOOTER +} EXzState; + + +typedef struct +{ + EXzState state; + UInt32 pos; + unsigned alignPos; + unsigned indexPreSize; + + CXzStreamFlags streamFlags; + + UInt32 blockHeaderSize; + UInt64 packSize; + UInt64 unpackSize; + + UInt64 numBlocks; // number of finished blocks in current stream + UInt64 indexSize; + UInt64 indexPos; + UInt64 padSize; + + UInt64 numStartedStreams; + UInt64 numFinishedStreams; + UInt64 numTotalBlocks; + + UInt32 crc; + CMixCoder decoder; + CXzBlock block; + CXzCheck check; + CSha256 sha; + + BoolInt parseMode; + BoolInt headerParsedOk; + BoolInt decodeToStreamSignature; + unsigned decodeOnlyOneBlock; + + Byte *outBuf; + size_t outBufSize; + size_t outDataWritten; // the size of data in (outBuf) that were fully unpacked + + Byte shaDigest[SHA256_DIGEST_SIZE]; + Byte buf[XZ_BLOCK_HEADER_SIZE_MAX]; +} CXzUnpacker; + +/* alloc : aligned for cache line allocation is better */ +void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc); +void XzUnpacker_Init(CXzUnpacker *p); +void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize); +void XzUnpacker_Free(CXzUnpacker *p); + +/* + XzUnpacker + The sequence for decoding functions: + { + XzUnpacker_Construct() + [Decoding_Calls] + XzUnpacker_Free() + } + + [Decoding_Calls] + + There are 3 types of interfaces for [Decoding_Calls] calls: + + Interface-1 : Partial output buffers: + { + XzUnpacker_Init() + for() + XzUnpacker_Code(); + } + + Interface-2 : Direct output buffer: + Use it, if you know exact size of decoded data, and you need + whole xz unpacked data in one output buffer. + xz unpacker doesn't allocate additional buffer for lzma2 dictionary in that mode. + { + XzUnpacker_Init() + XzUnpacker_SetOutBufMode(); // to set output buffer and size + for() + XzUnpacker_Code(); // (dest = NULL) in XzUnpacker_Code() + } + + Interface-3 : Direct output buffer : One call full decoding + It unpacks whole input buffer to output buffer in one call. + It uses Interface-2 internally. + { + XzUnpacker_CodeFull() + } +*/ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + CODER_FINISH_ANY - use smallest number of input bytes + CODER_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + CODER_STATUS_NOT_FINISHED, + CODER_STATUS_NEEDS_MORE_INPUT - maybe there are more xz streams, + call XzUnpacker_IsStreamWasFinished to check that current stream was finished + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_DATA - Data error + SZ_ERROR_UNSUPPORTED - Unsupported method or method properties + SZ_ERROR_CRC - CRC error + // SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). + + SZ_ERROR_NO_ARCHIVE - the error with xz Stream Header with one of the following reasons: + - xz Stream Signature failure + - CRC32 of xz Stream Header is failed + - The size of Stream padding is not multiple of four bytes. + It's possible to get that error, if xz stream was finished and the stream + contains some another data. In that case you can call XzUnpacker_GetExtraSize() + function to get real size of xz stream. +*/ + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcFinished, + ECoderFinishMode finishMode, ECoderStatus *status); + +SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, + ECoderFinishMode finishMode, ECoderStatus *status); + +BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p); + +/* +XzUnpacker_GetExtraSize() returns then number of uncofirmed bytes, + if it's in (XZ_STATE_STREAM_HEADER) state or in (XZ_STATE_STREAM_PADDING) state. +These bytes can be some bytes after xz archive, or +it can be start of new xz stream. + +Call XzUnpacker_GetExtraSize() after XzUnpacker_Code() function to detect real size of +xz stream in two cases, if XzUnpacker_Code() returns: + res == SZ_OK && status == CODER_STATUS_NEEDS_MORE_INPUT + res == SZ_ERROR_NO_ARCHIVE +*/ + +UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p); + + +/* + for random block decoding: + XzUnpacker_Init(); + set CXzUnpacker::streamFlags + XzUnpacker_PrepareToRandomBlockDecoding() + loop + { + XzUnpacker_Code() + XzUnpacker_IsBlockFinished() + } +*/ + +void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p); +BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p); + +#define XzUnpacker_GetPackSizeForIndex(p) ((p)->packSize + (p)->blockHeaderSize + XzFlags_GetCheckSize((p)->streamFlags)) + + + +/* ---------- Multi Threading Decoding ---------- */ + + +typedef struct +{ + size_t inBufSize_ST; + size_t outStep_ST; + BoolInt ignoreErrors; + + #ifndef _7ZIP_ST + unsigned numThreads; + size_t inBufSize_MT; + size_t memUseMax; + #endif +} CXzDecMtProps; + +void XzDecMtProps_Init(CXzDecMtProps *p); + + +typedef void * CXzDecMtHandle; + +/* + alloc : XzDecMt uses CAlignOffsetAlloc for addresses allocated by (alloc). + allocMid : for big allocations, aligned allocation is better +*/ + +CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid); +void XzDecMt_Destroy(CXzDecMtHandle p); + + +typedef struct +{ + Byte UnpackSize_Defined; + Byte NumStreams_Defined; + Byte NumBlocks_Defined; + + Byte DataAfterEnd; + Byte DecodingTruncated; // Decoding was Truncated, we need only partial output data + + UInt64 InSize; // pack size processed + UInt64 OutSize; + + UInt64 NumStreams; + UInt64 NumBlocks; + + SRes DecodeRes; + SRes ReadRes; + SRes ProgressRes; + SRes CombinedRes; + SRes CombinedRes_Type; + +} CXzStatInfo; + +void XzStatInfo_Clear(CXzStatInfo *p); + +/* +XzDecMt_Decode() +SRes: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_NO_ARCHIVE - is not xz archive + SZ_ERROR_ARCHIVE - Headers error + SZ_ERROR_DATA - Data Error + SZ_ERROR_CRC - CRC Error + SZ_ERROR_INPUT_EOF - it needs more input data + SZ_ERROR_WRITE - ISeqOutStream error + (SZ_ERROR_READ) - ISeqInStream errors + (SZ_ERROR_PROGRESS) - ICompressProgress errors + // SZ_ERROR_THREAD - error in multi-threading functions + MY_SRes_HRESULT_FROM_WRes(WRes_error) - error in multi-threading function +*/ + +SRes XzDecMt_Decode(CXzDecMtHandle p, + const CXzDecMtProps *props, + const UInt64 *outDataSize, // NULL means undefined + int finishMode, // 0 - partial unpacking is allowed, 1 - xz stream(s) must be finished + ISeqOutStream *outStream, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + CXzStatInfo *stat, + int *isMT, // 0 means that ST (Single-Thread) version was used + ICompressProgress *progress); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/XzCrc64.c b/bsnes/lzma/XzCrc64.c new file mode 100644 index 00000000..e9ca9ec2 --- /dev/null +++ b/bsnes/lzma/XzCrc64.c @@ -0,0 +1,86 @@ +/* XzCrc64.c -- CRC64 calculation +2017-05-23 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "XzCrc64.h" +#include "CpuArch.h" + +#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42) + +#ifdef MY_CPU_LE + #define CRC64_NUM_TABLES 4 +#else + #define CRC64_NUM_TABLES 5 + #define CRC_UINT64_SWAP(v) \ + ((v >> 56) \ + | ((v >> 40) & ((UInt64)0xFF << 8)) \ + | ((v >> 24) & ((UInt64)0xFF << 16)) \ + | ((v >> 8) & ((UInt64)0xFF << 24)) \ + | ((v << 8) & ((UInt64)0xFF << 32)) \ + | ((v << 24) & ((UInt64)0xFF << 40)) \ + | ((v << 40) & ((UInt64)0xFF << 48)) \ + | ((v << 56))) + + UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table); +#endif + +#ifndef MY_CPU_BE + UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table); +#endif + +typedef UInt64 (MY_FAST_CALL *CRC64_FUNC)(UInt64 v, const void *data, size_t size, const UInt64 *table); + +static CRC64_FUNC g_Crc64Update; +UInt64 g_Crc64Table[256 * CRC64_NUM_TABLES]; + +UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size) +{ + return g_Crc64Update(v, data, size, g_Crc64Table); +} + +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size) +{ + return g_Crc64Update(CRC64_INIT_VAL, data, size, g_Crc64Table) ^ CRC64_INIT_VAL; +} + +void MY_FAST_CALL Crc64GenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt64 r = i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrc64Poly & ((UInt64)0 - (r & 1))); + g_Crc64Table[i] = r; + } + for (i = 256; i < 256 * CRC64_NUM_TABLES; i++) + { + UInt64 r = g_Crc64Table[(size_t)i - 256]; + g_Crc64Table[i] = g_Crc64Table[r & 0xFF] ^ (r >> 8); + } + + #ifdef MY_CPU_LE + + g_Crc64Update = XzCrc64UpdateT4; + + #else + { + #ifndef MY_CPU_BE + UInt32 k = 1; + if (*(const Byte *)&k == 1) + g_Crc64Update = XzCrc64UpdateT4; + else + #endif + { + for (i = 256 * CRC64_NUM_TABLES - 1; i >= 256; i--) + { + UInt64 x = g_Crc64Table[(size_t)i - 256]; + g_Crc64Table[i] = CRC_UINT64_SWAP(x); + } + g_Crc64Update = XzCrc64UpdateT1_BeT4; + } + } + #endif +} diff --git a/bsnes/lzma/XzCrc64.h b/bsnes/lzma/XzCrc64.h new file mode 100644 index 00000000..71b10d57 --- /dev/null +++ b/bsnes/lzma/XzCrc64.h @@ -0,0 +1,26 @@ +/* XzCrc64.h -- CRC64 calculation +2013-01-18 : Igor Pavlov : Public domain */ + +#ifndef __XZ_CRC64_H +#define __XZ_CRC64_H + +#include + +#include "7zTypes.h" + +EXTERN_C_BEGIN + +extern UInt64 g_Crc64Table[]; + +void MY_FAST_CALL Crc64GenerateTable(void); + +#define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) +#define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) +#define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/XzCrc64Opt.c b/bsnes/lzma/XzCrc64Opt.c new file mode 100644 index 00000000..9273465d --- /dev/null +++ b/bsnes/lzma/XzCrc64Opt.c @@ -0,0 +1,69 @@ +/* XzCrc64Opt.c -- CRC64 calculation +2017-06-30 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include "CpuArch.h" + +#ifndef MY_CPU_BE + +#define CRC64_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL XzCrc64UpdateT4(UInt64 v, const void *data, size_t size, const UInt64 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC64_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + UInt32 d = (UInt32)v ^ *(const UInt32 *)p; + v = (v >> 32) + ^ (table + 0x300)[((d ) & 0xFF)] + ^ (table + 0x200)[((d >> 8) & 0xFF)] + ^ (table + 0x100)[((d >> 16) & 0xFF)] + ^ (table + 0x000)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC64_UPDATE_BYTE_2(v, *p); + return v; +} + +#endif + + +#ifndef MY_CPU_LE + +#define CRC_UINT64_SWAP(v) \ + ((v >> 56) \ + | ((v >> 40) & ((UInt64)0xFF << 8)) \ + | ((v >> 24) & ((UInt64)0xFF << 16)) \ + | ((v >> 8) & ((UInt64)0xFF << 24)) \ + | ((v << 8) & ((UInt64)0xFF << 32)) \ + | ((v << 24) & ((UInt64)0xFF << 40)) \ + | ((v << 40) & ((UInt64)0xFF << 48)) \ + | ((v << 56))) + +#define CRC64_UPDATE_BYTE_2_BE(crc, b) (table[(Byte)((crc) >> 56) ^ (b)] ^ ((crc) << 8)) + +UInt64 MY_FAST_CALL XzCrc64UpdateT1_BeT4(UInt64 v, const void *data, size_t size, const UInt64 *table) +{ + const Byte *p = (const Byte *)data; + table += 0x100; + v = CRC_UINT64_SWAP(v); + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC64_UPDATE_BYTE_2_BE(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + UInt32 d = (UInt32)(v >> 32) ^ *(const UInt32 *)p; + v = (v << 32) + ^ (table + 0x000)[((d ) & 0xFF)] + ^ (table + 0x100)[((d >> 8) & 0xFF)] + ^ (table + 0x200)[((d >> 16) & 0xFF)] + ^ (table + 0x300)[((d >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC64_UPDATE_BYTE_2_BE(v, *p); + return CRC_UINT64_SWAP(v); +} + +#endif diff --git a/bsnes/lzma/XzDec.c b/bsnes/lzma/XzDec.c new file mode 100644 index 00000000..4f532720 --- /dev/null +++ b/bsnes/lzma/XzDec.c @@ -0,0 +1,2766 @@ +/* XzDec.c -- Xz Decode +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +// #include + +// #define XZ_DUMP + +/* #define XZ_DUMP */ + +#ifdef XZ_DUMP +#include +#endif + +// #define SHOW_DEBUG_INFO + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#define PRF_STR(s) PRF(printf("\n" s "\n")) +#define PRF_STR_INT(s, d) PRF(printf("\n" s " %d\n", (unsigned)d)) + +#include +#include + +#include "7zCrc.h" +#include "Alloc.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "Lzma2Dec.h" + +// #define USE_SUBBLOCK + +#ifdef USE_SUBBLOCK +#include "Bcj3Dec.c" +#include "SbDec.h" +#endif + +#include "Xz.h" + +#define XZ_CHECK_SIZE_MAX 64 + +#define CODER_BUF_SIZE ((size_t)1 << 17) + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) +{ + unsigned i, limit; + *value = 0; + limit = (maxSize > 9) ? 9 : (unsigned)maxSize; + + for (i = 0; i < limit;) + { + Byte b = p[i]; + *value |= (UInt64)(b & 0x7F) << (7 * i++); + if ((b & 0x80) == 0) + return (b == 0 && i != 1) ? 0 : i; + } + return 0; +} + +/* ---------- BraState ---------- */ + +#define BRA_BUF_SIZE (1 << 14) + +typedef struct +{ + size_t bufPos; + size_t bufConv; + size_t bufTotal; + + int encodeMode; + + UInt32 methodId; + UInt32 delta; + UInt32 ip; + UInt32 x86State; + Byte deltaState[DELTA_STATE_SIZE]; + + Byte buf[BRA_BUF_SIZE]; +} CBraState; + +static void BraState_Free(void *pp, ISzAllocPtr alloc) +{ + ISzAlloc_Free(alloc, pp); +} + +static SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + CBraState *p = ((CBraState *)pp); + UNUSED_VAR(alloc); + p->ip = 0; + if (p->methodId == XZ_ID_Delta) + { + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + p->delta = (unsigned)props[0] + 1; + } + else + { + if (propSize == 4) + { + UInt32 v = GetUi32(props); + switch (p->methodId) + { + case XZ_ID_PPC: + case XZ_ID_ARM: + case XZ_ID_SPARC: + if ((v & 3) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_ARMT: + if ((v & 1) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_IA64: + if ((v & 0xF) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + } + p->ip = v; + } + else if (propSize != 0) + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; +} + +static void BraState_Init(void *pp) +{ + CBraState *p = ((CBraState *)pp); + p->bufPos = p->bufConv = p->bufTotal = 0; + x86_Convert_Init(p->x86State); + if (p->methodId == XZ_ID_Delta) + Delta_Init(p->deltaState); +} + + +#define CASE_BRA_CONV(isa) case XZ_ID_ ## isa: size = isa ## _Convert(data, size, p->ip, p->encodeMode); break; + +static SizeT BraState_Filter(void *pp, Byte *data, SizeT size) +{ + CBraState *p = ((CBraState *)pp); + switch (p->methodId) + { + case XZ_ID_Delta: + if (p->encodeMode) + Delta_Encode(p->deltaState, p->delta, data, size); + else + Delta_Decode(p->deltaState, p->delta, data, size); + break; + case XZ_ID_X86: + size = x86_Convert(data, size, p->ip, &p->x86State, p->encodeMode); + break; + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + CASE_BRA_CONV(SPARC) + } + p->ip += (UInt32)size; + return size; +} + + +static SRes BraState_Code2(void *pp, + Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, + // int *wasFinished + ECoderStatus *status) +{ + CBraState *p = ((CBraState *)pp); + SizeT destRem = *destLen; + SizeT srcRem = *srcLen; + UNUSED_VAR(finishMode); + + *destLen = 0; + *srcLen = 0; + // *wasFinished = False; + *status = CODER_STATUS_NOT_FINISHED; + + while (destRem > 0) + { + if (p->bufPos != p->bufConv) + { + size_t size = p->bufConv - p->bufPos; + if (size > destRem) + size = destRem; + memcpy(dest, p->buf + p->bufPos, size); + p->bufPos += size; + *destLen += size; + dest += size; + destRem -= size; + continue; + } + + p->bufTotal -= p->bufPos; + memmove(p->buf, p->buf + p->bufPos, p->bufTotal); + p->bufPos = 0; + p->bufConv = 0; + { + size_t size = BRA_BUF_SIZE - p->bufTotal; + if (size > srcRem) + size = srcRem; + memcpy(p->buf + p->bufTotal, src, size); + *srcLen += size; + src += size; + srcRem -= size; + p->bufTotal += size; + } + if (p->bufTotal == 0) + break; + + p->bufConv = BraState_Filter(pp, p->buf, p->bufTotal); + + if (p->bufConv == 0) + { + if (!srcWasFinished) + break; + p->bufConv = p->bufTotal; + } + } + + if (p->bufTotal == p->bufPos && srcRem == 0 && srcWasFinished) + { + *status = CODER_STATUS_FINISHED_WITH_MARK; + // *wasFinished = 1; + } + + return SZ_OK; +} + + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc) +{ + CBraState *decoder; + if (id < XZ_ID_Delta || id > XZ_ID_SPARC) + return SZ_ERROR_UNSUPPORTED; + decoder = (CBraState *)p->p; + if (!decoder) + { + decoder = (CBraState *)ISzAlloc_Alloc(alloc, sizeof(CBraState)); + if (!decoder) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = BraState_Free; + p->SetProps = BraState_SetProps; + p->Init = BraState_Init; + p->Code2 = BraState_Code2; + p->Filter = BraState_Filter; + } + decoder->methodId = (UInt32)id; + decoder->encodeMode = encodeMode; + return SZ_OK; +} + + + +/* ---------- SbState ---------- */ + +#ifdef USE_SUBBLOCK + +static void SbState_Free(void *pp, ISzAllocPtr alloc) +{ + CSbDec *p = (CSbDec *)pp; + SbDec_Free(p); + ISzAlloc_Free(alloc, pp); +} + +static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + UNUSED_VAR(pp); + UNUSED_VAR(props); + UNUSED_VAR(alloc); + return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static void SbState_Init(void *pp) +{ + SbDec_Init((CSbDec *)pp); +} + +static SRes SbState_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished + ECoderStatus *status) +{ + CSbDec *p = (CSbDec *)pp; + SRes res; + UNUSED_VAR(srcWasFinished); + p->dest = dest; + p->destLen = *destLen; + p->src = src; + p->srcLen = *srcLen; + p->finish = finishMode; /* change it */ + res = SbDec_Decode((CSbDec *)pp); + *destLen -= p->destLen; + *srcLen -= p->srcLen; + // *wasFinished = (*destLen == 0 && *srcLen == 0); /* change it */ + *status = (*destLen == 0 && *srcLen == 0) ? + CODER_STATUS_FINISHED_WITH_MARK : + CODER_STATUS_NOT_FINISHED; + return res; +} + +static SRes SbState_SetFromMethod(IStateCoder *p, ISzAllocPtr alloc) +{ + CSbDec *decoder = (CSbDec *)p->p; + if (!decoder) + { + decoder = (CSbDec *)ISzAlloc_Alloc(alloc, sizeof(CSbDec)); + if (!decoder) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = SbState_Free; + p->SetProps = SbState_SetProps; + p->Init = SbState_Init; + p->Code2 = SbState_Code2; + p->Filter = NULL; + } + SbDec_Construct(decoder); + SbDec_SetAlloc(decoder, alloc); + return SZ_OK; +} + +#endif + + + +/* ---------- Lzma2 ---------- */ + +typedef struct +{ + CLzma2Dec decoder; + BoolInt outBufMode; +} CLzma2Dec_Spec; + + +static void Lzma2State_Free(void *pp, ISzAllocPtr alloc) +{ + CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; + if (p->outBufMode) + Lzma2Dec_FreeProbs(&p->decoder, alloc); + else + Lzma2Dec_Free(&p->decoder, alloc); + ISzAlloc_Free(alloc, pp); +} + +static SRes Lzma2State_SetProps(void *pp, const Byte *props, size_t propSize, ISzAllocPtr alloc) +{ + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + { + CLzma2Dec_Spec *p = (CLzma2Dec_Spec *)pp; + if (p->outBufMode) + return Lzma2Dec_AllocateProbs(&p->decoder, props[0], alloc); + else + return Lzma2Dec_Allocate(&p->decoder, props[0], alloc); + } +} + +static void Lzma2State_Init(void *pp) +{ + Lzma2Dec_Init(&((CLzma2Dec_Spec *)pp)->decoder); +} + + +/* + if (outBufMode), then (dest) is not used. Use NULL. + Data is unpacked to (spec->decoder.decoder.dic) output buffer. +*/ + +static SRes Lzma2State_Code2(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, + // int *wasFinished, + ECoderStatus *status) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)pp; + ELzmaStatus status2; + /* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */ + SRes res; + UNUSED_VAR(srcWasFinished); + if (spec->outBufMode) + { + SizeT dicPos = spec->decoder.decoder.dicPos; + SizeT dicLimit = dicPos + *destLen; + res = Lzma2Dec_DecodeToDic(&spec->decoder, dicLimit, src, srcLen, (ELzmaFinishMode)finishMode, &status2); + *destLen = spec->decoder.decoder.dicPos - dicPos; + } + else + res = Lzma2Dec_DecodeToBuf(&spec->decoder, dest, destLen, src, srcLen, (ELzmaFinishMode)finishMode, &status2); + // *wasFinished = (status2 == LZMA_STATUS_FINISHED_WITH_MARK); + // ECoderStatus values are identical to ELzmaStatus values of LZMA2 decoder + *status = (ECoderStatus)status2; + return res; +} + + +static SRes Lzma2State_SetFromMethod(IStateCoder *p, Byte *outBuf, size_t outBufSize, ISzAllocPtr alloc) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; + if (!spec) + { + spec = (CLzma2Dec_Spec *)ISzAlloc_Alloc(alloc, sizeof(CLzma2Dec_Spec)); + if (!spec) + return SZ_ERROR_MEM; + p->p = spec; + p->Free = Lzma2State_Free; + p->SetProps = Lzma2State_SetProps; + p->Init = Lzma2State_Init; + p->Code2 = Lzma2State_Code2; + p->Filter = NULL; + Lzma2Dec_Construct(&spec->decoder); + } + spec->outBufMode = False; + if (outBuf) + { + spec->outBufMode = True; + spec->decoder.decoder.dic = outBuf; + spec->decoder.decoder.dicBufSize = outBufSize; + } + return SZ_OK; +} + + +static SRes Lzma2State_ResetOutBuf(IStateCoder *p, Byte *outBuf, size_t outBufSize) +{ + CLzma2Dec_Spec *spec = (CLzma2Dec_Spec *)p->p; + if ((spec->outBufMode && !outBuf) || (!spec->outBufMode && outBuf)) + return SZ_ERROR_FAIL; + if (outBuf) + { + spec->decoder.decoder.dic = outBuf; + spec->decoder.decoder.dicBufSize = outBufSize; + } + return SZ_OK; +} + + + +static void MixCoder_Construct(CMixCoder *p, ISzAllocPtr alloc) +{ + unsigned i; + p->alloc = alloc; + p->buf = NULL; + p->numCoders = 0; + + p->outBufSize = 0; + p->outBuf = NULL; + // p->SingleBufMode = False; + + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + p->coders[i].p = NULL; +} + + +static void MixCoder_Free(CMixCoder *p) +{ + unsigned i; + p->numCoders = 0; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + { + IStateCoder *sc = &p->coders[i]; + if (sc->p) + { + sc->Free(sc->p, p->alloc); + sc->p = NULL; + } + } + if (p->buf) + { + ISzAlloc_Free(p->alloc, p->buf); + p->buf = NULL; /* 9.31: the BUG was fixed */ + } +} + +static void MixCoder_Init(CMixCoder *p) +{ + unsigned i; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX - 1; i++) + { + p->size[i] = 0; + p->pos[i] = 0; + p->finished[i] = 0; + } + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + coder->Init(coder->p); + p->results[i] = SZ_OK; + } + p->outWritten = 0; + p->wasFinished = False; + p->res = SZ_OK; + p->status = CODER_STATUS_NOT_SPECIFIED; +} + + +static SRes MixCoder_SetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) +{ + IStateCoder *sc = &p->coders[coderIndex]; + p->ids[coderIndex] = methodId; + switch (methodId) + { + case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, outBuf, outBufSize, p->alloc); + #ifdef USE_SUBBLOCK + case XZ_ID_Subblock: return SbState_SetFromMethod(sc, p->alloc); + #endif + } + if (coderIndex == 0) + return SZ_ERROR_UNSUPPORTED; + return BraState_SetFromMethod(sc, methodId, 0, p->alloc); +} + + +static SRes MixCoder_ResetFromMethod(CMixCoder *p, unsigned coderIndex, UInt64 methodId, Byte *outBuf, size_t outBufSize) +{ + IStateCoder *sc = &p->coders[coderIndex]; + switch (methodId) + { + case XZ_ID_LZMA2: return Lzma2State_ResetOutBuf(sc, outBuf, outBufSize); + } + return SZ_ERROR_UNSUPPORTED; +} + + + +/* + if (destFinish) - then unpack data block is finished at (*destLen) position, + and we can return data that were not processed by filter + +output (status) can be : + CODER_STATUS_NOT_FINISHED + CODER_STATUS_FINISHED_WITH_MARK + CODER_STATUS_NEEDS_MORE_INPUT - not implemented still +*/ + +static SRes MixCoder_Code(CMixCoder *p, + Byte *dest, SizeT *destLen, int destFinish, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + + *destLen = 0; + *srcLen = 0; + + if (p->wasFinished) + return p->res; + + p->status = CODER_STATUS_NOT_FINISHED; + + // if (p->SingleBufMode) + if (p->outBuf) + { + SRes res; + SizeT destLen2, srcLen2; + int wasFinished; + + PRF_STR("------- MixCoder Single ----------"); + + srcLen2 = srcLenOrig; + destLen2 = destLenOrig; + + { + IStateCoder *coder = &p->coders[0]; + res = coder->Code2(coder->p, NULL, &destLen2, src, &srcLen2, srcWasFinished, finishMode, + // &wasFinished, + &p->status); + wasFinished = (p->status == CODER_STATUS_FINISHED_WITH_MARK); + } + + p->res = res; + + /* + if (wasFinished) + p->status = CODER_STATUS_FINISHED_WITH_MARK; + else + { + if (res == SZ_OK) + if (destLen2 != destLenOrig) + p->status = CODER_STATUS_NEEDS_MORE_INPUT; + } + */ + + + *srcLen = srcLen2; + src += srcLen2; + p->outWritten += destLen2; + + if (res != SZ_OK || srcWasFinished || wasFinished) + p->wasFinished = True; + + if (p->numCoders == 1) + *destLen = destLen2; + else if (p->wasFinished) + { + unsigned i; + size_t processed = p->outWritten; + + for (i = 1; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + processed = coder->Filter(coder->p, p->outBuf, processed); + if (wasFinished || (destFinish && p->outWritten == destLenOrig)) + processed = p->outWritten; + PRF_STR_INT("filter", i); + } + *destLen = processed; + } + return res; + } + + PRF_STR("standard mix"); + + if (p->numCoders != 1) + { + if (!p->buf) + { + p->buf = (Byte *)ISzAlloc_Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1)); + if (!p->buf) + return SZ_ERROR_MEM; + } + + finishMode = CODER_FINISH_ANY; + } + + for (;;) + { + BoolInt processed = False; + BoolInt allFinished = True; + SRes resMain = SZ_OK; + unsigned i; + + p->status = CODER_STATUS_NOT_FINISHED; + /* + if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY) + break; + */ + + for (i = 0; i < p->numCoders; i++) + { + SRes res; + IStateCoder *coder = &p->coders[i]; + Byte *dest2; + SizeT destLen2, srcLen2; // destLen2_Orig; + const Byte *src2; + int srcFinished2; + int encodingWasFinished; + ECoderStatus status2; + + if (i == 0) + { + src2 = src; + srcLen2 = srcLenOrig - *srcLen; + srcFinished2 = srcWasFinished; + } + else + { + size_t k = i - 1; + src2 = p->buf + (CODER_BUF_SIZE * k) + p->pos[k]; + srcLen2 = p->size[k] - p->pos[k]; + srcFinished2 = p->finished[k]; + } + + if (i == p->numCoders - 1) + { + dest2 = dest; + destLen2 = destLenOrig - *destLen; + } + else + { + if (p->pos[i] != p->size[i]) + continue; + dest2 = p->buf + (CODER_BUF_SIZE * i); + destLen2 = CODER_BUF_SIZE; + } + + // destLen2_Orig = destLen2; + + if (p->results[i] != SZ_OK) + { + if (resMain == SZ_OK) + resMain = p->results[i]; + continue; + } + + res = coder->Code2(coder->p, + dest2, &destLen2, + src2, &srcLen2, srcFinished2, + finishMode, + // &encodingWasFinished, + &status2); + + if (res != SZ_OK) + { + p->results[i] = res; + if (resMain == SZ_OK) + resMain = res; + } + + encodingWasFinished = (status2 == CODER_STATUS_FINISHED_WITH_MARK); + + if (!encodingWasFinished) + { + allFinished = False; + if (p->numCoders == 1 && res == SZ_OK) + p->status = status2; + } + + if (i == 0) + { + *srcLen += srcLen2; + src += srcLen2; + } + else + p->pos[(size_t)i - 1] += srcLen2; + + if (i == p->numCoders - 1) + { + *destLen += destLen2; + dest += destLen2; + } + else + { + p->size[i] = destLen2; + p->pos[i] = 0; + p->finished[i] = encodingWasFinished; + } + + if (destLen2 != 0 || srcLen2 != 0) + processed = True; + } + + if (!processed) + { + if (allFinished) + p->status = CODER_STATUS_FINISHED_WITH_MARK; + return resMain; + } + } +} + + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf) +{ + *p = (CXzStreamFlags)GetBe16(buf + XZ_SIG_SIZE); + if (CrcCalc(buf + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE) != + GetUi32(buf + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE)) + return SZ_ERROR_NO_ARCHIVE; + return XzFlags_IsSupported(*p) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static BoolInt Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *buf) +{ + return indexSize == (((UInt64)GetUi32(buf + 4) + 1) << 2) + && GetUi32(buf) == CrcCalc(buf + 4, 6) + && flags == GetBe16(buf + 8) + && buf[10] == XZ_FOOTER_SIG_0 + && buf[11] == XZ_FOOTER_SIG_1; +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + + +static BoolInt XzBlock_AreSupportedFilters(const CXzBlock *p) +{ + unsigned numFilters = XzBlock_GetNumFilters(p) - 1; + unsigned i; + { + const CXzFilter *f = &p->filters[numFilters]; + if (f->id != XZ_ID_LZMA2 || f->propsSize != 1 || f->props[0] > 40) + return False; + } + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &p->filters[i]; + if (f->id == XZ_ID_Delta) + { + if (f->propsSize != 1) + return False; + } + else if (f->id < XZ_ID_Delta + || f->id > XZ_ID_SPARC + || (f->propsSize != 0 && f->propsSize != 4)) + return False; + } + return True; +} + + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header) +{ + unsigned pos; + unsigned numFilters, i; + unsigned headerSize = (unsigned)header[0] << 2; + + /* (headerSize != 0) : another code checks */ + + if (CrcCalc(header, headerSize) != GetUi32(header + headerSize)) + return SZ_ERROR_ARCHIVE; + + pos = 1; + p->flags = header[pos++]; + + p->packSize = (UInt64)(Int64)-1; + if (XzBlock_HasPackSize(p)) + { + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->packSize); + if (p->packSize == 0 || p->packSize + headerSize >= (UInt64)1 << 63) + return SZ_ERROR_ARCHIVE; + } + + p->unpackSize = (UInt64)(Int64)-1; + if (XzBlock_HasUnpackSize(p)) + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->unpackSize); + + numFilters = XzBlock_GetNumFilters(p); + for (i = 0; i < numFilters; i++) + { + CXzFilter *filter = p->filters + i; + UInt64 size; + READ_VARINT_AND_CHECK(header, pos, headerSize, &filter->id); + READ_VARINT_AND_CHECK(header, pos, headerSize, &size); + if (size > headerSize - pos || size > XZ_FILTER_PROPS_SIZE_MAX) + return SZ_ERROR_ARCHIVE; + filter->propsSize = (UInt32)size; + memcpy(filter->props, header + pos, (size_t)size); + pos += (unsigned)size; + + #ifdef XZ_DUMP + printf("\nf[%u] = %2X: ", i, (unsigned)filter->id); + { + unsigned i; + for (i = 0; i < size; i++) + printf(" %2X", filter->props[i]); + } + #endif + } + + if (XzBlock_HasUnsupportedFlags(p)) + return SZ_ERROR_UNSUPPORTED; + + while (pos < headerSize) + if (header[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return SZ_OK; +} + + + + +static SRes XzDecMix_Init(CMixCoder *p, const CXzBlock *block, Byte *outBuf, size_t outBufSize) +{ + unsigned i; + BoolInt needReInit = True; + unsigned numFilters = XzBlock_GetNumFilters(block); + + if (numFilters == p->numCoders && ((p->outBuf && outBuf) || (!p->outBuf && !outBuf))) + { + needReInit = False; + for (i = 0; i < numFilters; i++) + if (p->ids[i] != block->filters[numFilters - 1 - i].id) + { + needReInit = True; + break; + } + } + + // p->SingleBufMode = (outBuf != NULL); + p->outBuf = outBuf; + p->outBufSize = outBufSize; + + // p->SingleBufMode = False; + // outBuf = NULL; + + if (needReInit) + { + MixCoder_Free(p); + for (i = 0; i < numFilters; i++) + { + RINOK(MixCoder_SetFromMethod(p, i, block->filters[numFilters - 1 - i].id, outBuf, outBufSize)); + } + p->numCoders = numFilters; + } + else + { + RINOK(MixCoder_ResetFromMethod(p, 0, block->filters[numFilters - 1].id, outBuf, outBufSize)); + } + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + IStateCoder *sc = &p->coders[i]; + RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc)); + } + + MixCoder_Init(p); + return SZ_OK; +} + + + +void XzUnpacker_Init(CXzUnpacker *p) +{ + p->state = XZ_STATE_STREAM_HEADER; + p->pos = 0; + p->numStartedStreams = 0; + p->numFinishedStreams = 0; + p->numTotalBlocks = 0; + p->padSize = 0; + p->decodeOnlyOneBlock = 0; + + p->parseMode = False; + p->decodeToStreamSignature = False; + + // p->outBuf = NULL; + // p->outBufSize = 0; + p->outDataWritten = 0; +} + + +void XzUnpacker_SetOutBuf(CXzUnpacker *p, Byte *outBuf, size_t outBufSize) +{ + p->outBuf = outBuf; + p->outBufSize = outBufSize; +} + + +void XzUnpacker_Construct(CXzUnpacker *p, ISzAllocPtr alloc) +{ + MixCoder_Construct(&p->decoder, alloc); + p->outBuf = NULL; + p->outBufSize = 0; + XzUnpacker_Init(p); +} + + +void XzUnpacker_Free(CXzUnpacker *p) +{ + MixCoder_Free(&p->decoder); +} + + +void XzUnpacker_PrepareToRandomBlockDecoding(CXzUnpacker *p) +{ + p->indexSize = 0; + p->numBlocks = 0; + Sha256_Init(&p->sha); + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + p->decodeOnlyOneBlock = 1; +} + + +static void XzUnpacker_UpdateIndex(CXzUnpacker *p, UInt64 packSize, UInt64 unpackSize) +{ + Byte temp[32]; + unsigned num = Xz_WriteVarInt(temp, packSize); + num += Xz_WriteVarInt(temp + num, unpackSize); + Sha256_Update(&p->sha, temp, num); + p->indexSize += num; + p->numBlocks++; +} + + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcFinished, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + + for (;;) + { + SizeT srcRem; + + if (p->state == XZ_STATE_BLOCK) + { + SizeT destLen2 = destLenOrig - *destLen; + SizeT srcLen2 = srcLenOrig - *srcLen; + SRes res; + + ECoderFinishMode finishMode2 = finishMode; + BoolInt srcFinished2 = srcFinished; + BoolInt destFinish = False; + + if (p->block.packSize != (UInt64)(Int64)-1) + { + UInt64 rem = p->block.packSize - p->packSize; + if (srcLen2 >= rem) + { + srcFinished2 = True; + srcLen2 = (SizeT)rem; + } + if (rem == 0 && p->block.unpackSize == p->unpackSize) + return SZ_ERROR_DATA; + } + + if (p->block.unpackSize != (UInt64)(Int64)-1) + { + UInt64 rem = p->block.unpackSize - p->unpackSize; + if (destLen2 >= rem) + { + destFinish = True; + finishMode2 = CODER_FINISH_END; + destLen2 = (SizeT)rem; + } + } + + /* + if (srcLen2 == 0 && destLen2 == 0) + { + *status = CODER_STATUS_NOT_FINISHED; + return SZ_OK; + } + */ + + { + res = MixCoder_Code(&p->decoder, + (p->outBuf ? NULL : dest), &destLen2, destFinish, + src, &srcLen2, srcFinished2, + finishMode2); + + *status = p->decoder.status; + XzCheck_Update(&p->check, (p->outBuf ? p->outBuf + p->outDataWritten : dest), destLen2); + if (!p->outBuf) + dest += destLen2; + p->outDataWritten += destLen2; + } + + (*srcLen) += srcLen2; + src += srcLen2; + p->packSize += srcLen2; + (*destLen) += destLen2; + p->unpackSize += destLen2; + + RINOK(res); + + if (*status != CODER_STATUS_FINISHED_WITH_MARK) + { + if (p->block.packSize == p->packSize + && *status == CODER_STATUS_NEEDS_MORE_INPUT) + { + PRF_STR("CODER_STATUS_NEEDS_MORE_INPUT"); + *status = CODER_STATUS_NOT_SPECIFIED; + return SZ_ERROR_DATA; + } + + return SZ_OK; + } + { + XzUnpacker_UpdateIndex(p, XzUnpacker_GetPackSizeForIndex(p), p->unpackSize); + p->state = XZ_STATE_BLOCK_FOOTER; + p->pos = 0; + p->alignPos = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + + if ((p->block.packSize != (UInt64)(Int64)-1 && p->block.packSize != p->packSize) + || (p->block.unpackSize != (UInt64)(Int64)-1 && p->block.unpackSize != p->unpackSize)) + { + PRF_STR("ERROR: block.size mismatch"); + return SZ_ERROR_DATA; + } + } + // continue; + } + + srcRem = srcLenOrig - *srcLen; + + // XZ_STATE_BLOCK_FOOTER can transit to XZ_STATE_BLOCK_HEADER without input bytes + if (srcRem == 0 && p->state != XZ_STATE_BLOCK_FOOTER) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + switch (p->state) + { + case XZ_STATE_STREAM_HEADER: + { + if (p->pos < XZ_STREAM_HEADER_SIZE) + { + if (p->pos < XZ_SIG_SIZE && *src != XZ_SIG[p->pos]) + return SZ_ERROR_NO_ARCHIVE; + if (p->decodeToStreamSignature) + return SZ_OK; + p->buf[p->pos++] = *src++; + (*srcLen)++; + } + else + { + RINOK(Xz_ParseHeader(&p->streamFlags, p->buf)); + p->numStartedStreams++; + p->indexSize = 0; + p->numBlocks = 0; + Sha256_Init(&p->sha); + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + } + break; + } + + case XZ_STATE_BLOCK_HEADER: + { + if (p->pos == 0) + { + p->buf[p->pos++] = *src++; + (*srcLen)++; + if (p->buf[0] == 0) + { + if (p->decodeOnlyOneBlock) + return SZ_ERROR_DATA; + p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks); + p->indexPos = p->indexPreSize; + p->indexSize += p->indexPreSize; + Sha256_Final(&p->sha, p->shaDigest); + Sha256_Init(&p->sha); + p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize); + p->state = XZ_STATE_STREAM_INDEX; + break; + } + p->blockHeaderSize = ((UInt32)p->buf[0] << 2) + 4; + break; + } + + if (p->pos != p->blockHeaderSize) + { + UInt32 cur = p->blockHeaderSize - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + RINOK(XzBlock_Parse(&p->block, p->buf)); + if (!XzBlock_AreSupportedFilters(&p->block)) + return SZ_ERROR_UNSUPPORTED; + p->numTotalBlocks++; + p->state = XZ_STATE_BLOCK; + p->packSize = 0; + p->unpackSize = 0; + XzCheck_Init(&p->check, XzFlags_GetCheckType(p->streamFlags)); + if (p->parseMode) + { + p->headerParsedOk = True; + return SZ_OK; + } + RINOK(XzDecMix_Init(&p->decoder, &p->block, p->outBuf, p->outBufSize)); + } + break; + } + + case XZ_STATE_BLOCK_FOOTER: + { + if ((((unsigned)p->packSize + p->alignPos) & 3) != 0) + { + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->alignPos++; + if (*src++ != 0) + return SZ_ERROR_CRC; + } + else + { + UInt32 checkSize = XzFlags_GetCheckSize(p->streamFlags); + UInt32 cur = checkSize - p->pos; + if (cur != 0) + { + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (checkSize != p->pos) + break; + } + { + Byte digest[XZ_CHECK_SIZE_MAX]; + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + if (XzCheck_Final(&p->check, digest) && memcmp(digest, p->buf, checkSize) != 0) + return SZ_ERROR_CRC; + if (p->decodeOnlyOneBlock) + { + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + } + } + } + break; + } + + case XZ_STATE_STREAM_INDEX: + { + if (p->pos < p->indexPreSize) + { + (*srcLen)++; + if (*src++ != p->buf[p->pos++]) + return SZ_ERROR_CRC; + } + else + { + if (p->indexPos < p->indexSize) + { + UInt64 cur = p->indexSize - p->indexPos; + if (srcRem > cur) + srcRem = (SizeT)cur; + p->crc = CrcUpdate(p->crc, src, srcRem); + Sha256_Update(&p->sha, src, srcRem); + (*srcLen) += srcRem; + src += srcRem; + p->indexPos += srcRem; + } + else if ((p->indexPos & 3) != 0) + { + Byte b = *src++; + p->crc = CRC_UPDATE_BYTE(p->crc, b); + (*srcLen)++; + p->indexPos++; + p->indexSize++; + if (b != 0) + return SZ_ERROR_CRC; + } + else + { + Byte digest[SHA256_DIGEST_SIZE]; + p->state = XZ_STATE_STREAM_INDEX_CRC; + p->indexSize += 4; + p->pos = 0; + Sha256_Final(&p->sha, digest); + if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX_CRC: + { + if (p->pos < 4) + { + (*srcLen)++; + p->buf[p->pos++] = *src++; + } + else + { + p->state = XZ_STATE_STREAM_FOOTER; + p->pos = 0; + if (CRC_GET_DIGEST(p->crc) != GetUi32(p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_FOOTER: + { + UInt32 cur = XZ_STREAM_FOOTER_SIZE - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (p->pos == XZ_STREAM_FOOTER_SIZE) + { + p->state = XZ_STATE_STREAM_PADDING; + p->numFinishedStreams++; + p->padSize = 0; + if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_PADDING: + { + if (*src != 0) + { + if (((UInt32)p->padSize & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + p->pos = 0; + p->state = XZ_STATE_STREAM_HEADER; + } + else + { + (*srcLen)++; + src++; + p->padSize++; + } + break; + } + + case XZ_STATE_BLOCK: break; /* to disable GCC warning */ + } + } + /* + if (p->state == XZ_STATE_FINISHED) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + */ +} + + +SRes XzUnpacker_CodeFull(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + XzUnpacker_Init(p); + XzUnpacker_SetOutBuf(p, dest, *destLen); + + return XzUnpacker_Code(p, + NULL, destLen, + src, srcLen, True, + finishMode, status); +} + + +BoolInt XzUnpacker_IsBlockFinished(const CXzUnpacker *p) +{ + return (p->state == XZ_STATE_BLOCK_HEADER) && (p->pos == 0); +} + +BoolInt XzUnpacker_IsStreamWasFinished(const CXzUnpacker *p) +{ + return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0); +} + +UInt64 XzUnpacker_GetExtraSize(const CXzUnpacker *p) +{ + UInt64 num = 0; + if (p->state == XZ_STATE_STREAM_PADDING) + num = p->padSize; + else if (p->state == XZ_STATE_STREAM_HEADER) + num = p->padSize + p->pos; + return num; +} + + + + + + + + + + + + + + + + + + + + + +#ifndef _7ZIP_ST +#include "MtDec.h" +#endif + + +void XzDecMtProps_Init(CXzDecMtProps *p) +{ + p->inBufSize_ST = 1 << 18; + p->outStep_ST = 1 << 20; + p->ignoreErrors = False; + + #ifndef _7ZIP_ST + p->numThreads = 1; + p->inBufSize_MT = 1 << 18; + p->memUseMax = sizeof(size_t) << 28; + #endif +} + + + +#ifndef _7ZIP_ST + +/* ---------- CXzDecMtThread ---------- */ + +typedef struct +{ + Byte *outBuf; + size_t outBufSize; + size_t outPreSize; + size_t inPreSize; + size_t inPreHeaderSize; + size_t blockPackSize_for_Index; // including block header and checksum. + size_t blockPackTotal; // including stream header, block header and checksum. + size_t inCodeSize; + size_t outCodeSize; + ECoderStatus status; + SRes codeRes; + BoolInt skipMode; + // BoolInt finishedWithMark; + EMtDecParseState parseState; + BoolInt parsing_Truncated; + BoolInt atBlockHeader; + CXzStreamFlags streamFlags; + // UInt64 numFinishedStreams + UInt64 numStreams; + UInt64 numTotalBlocks; + UInt64 numBlocks; + + BoolInt dec_created; + CXzUnpacker dec; + + Byte mtPad[1 << 7]; +} CXzDecMtThread; + +#endif + + +/* ---------- CXzDecMt ---------- */ + +typedef struct +{ + CAlignOffsetAlloc alignOffsetAlloc; + ISzAllocPtr allocMid; + + CXzDecMtProps props; + size_t unpackBlockMaxSize; + + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + // CXzStatInfo *stat; + + BoolInt finishMode; + BoolInt outSize_Defined; + UInt64 outSize; + + UInt64 outProcessed; + UInt64 inProcessed; + UInt64 readProcessed; + BoolInt readWasFinished; + SRes readRes; + SRes writeRes; + + Byte *outBuf; + size_t outBufSize; + Byte *inBuf; + size_t inBufSize; + + CXzUnpacker dec; + + ECoderStatus status; + SRes codeRes; + + #ifndef _7ZIP_ST + BoolInt mainDecoderWasCalled; + // int statErrorDefined; + int finishedDecoderIndex; + + // global values that are used in Parse stage + CXzStreamFlags streamFlags; + // UInt64 numFinishedStreams + UInt64 numStreams; + UInt64 numTotalBlocks; + UInt64 numBlocks; + + // UInt64 numBadBlocks; + SRes mainErrorCode; + + BoolInt isBlockHeaderState_Parse; + BoolInt isBlockHeaderState_Write; + UInt64 outProcessed_Parse; + BoolInt parsing_Truncated; + + BoolInt mtc_WasConstructed; + CMtDec mtc; + CXzDecMtThread coders[MTDEC__THREADS_MAX]; + #endif + +} CXzDecMt; + + + +CXzDecMtHandle XzDecMt_Create(ISzAllocPtr alloc, ISzAllocPtr allocMid) +{ + CXzDecMt *p = (CXzDecMt *)ISzAlloc_Alloc(alloc, sizeof(CXzDecMt)); + if (!p) + return NULL; + + AlignOffsetAlloc_CreateVTable(&p->alignOffsetAlloc); + p->alignOffsetAlloc.baseAlloc = alloc; + p->alignOffsetAlloc.numAlignBits = 7; + p->alignOffsetAlloc.offset = 0; + + p->allocMid = allocMid; + + p->outBuf = NULL; + p->outBufSize = 0; + p->inBuf = NULL; + p->inBufSize = 0; + + XzUnpacker_Construct(&p->dec, &p->alignOffsetAlloc.vt); + + p->unpackBlockMaxSize = 0; + + XzDecMtProps_Init(&p->props); + + #ifndef _7ZIP_ST + p->mtc_WasConstructed = False; + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *coder = &p->coders[i]; + coder->dec_created = False; + coder->outBuf = NULL; + coder->outBufSize = 0; + } + } + #endif + + return p; +} + + +#ifndef _7ZIP_ST + +static void XzDecMt_FreeOutBufs(CXzDecMt *p) +{ + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *coder = &p->coders[i]; + if (coder->outBuf) + { + ISzAlloc_Free(p->allocMid, coder->outBuf); + coder->outBuf = NULL; + coder->outBufSize = 0; + } + } + p->unpackBlockMaxSize = 0; +} + +#endif + + + +static void XzDecMt_FreeSt(CXzDecMt *p) +{ + XzUnpacker_Free(&p->dec); + + if (p->outBuf) + { + ISzAlloc_Free(p->allocMid, p->outBuf); + p->outBuf = NULL; + } + p->outBufSize = 0; + + if (p->inBuf) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBuf = NULL; + } + p->inBufSize = 0; +} + + +void XzDecMt_Destroy(CXzDecMtHandle pp) +{ + CXzDecMt *p = (CXzDecMt *)pp; + + XzDecMt_FreeSt(p); + + #ifndef _7ZIP_ST + + if (p->mtc_WasConstructed) + { + MtDec_Destruct(&p->mtc); + p->mtc_WasConstructed = False; + } + { + unsigned i; + for (i = 0; i < MTDEC__THREADS_MAX; i++) + { + CXzDecMtThread *t = &p->coders[i]; + if (t->dec_created) + { + // we don't need to free dict here + XzUnpacker_Free(&t->dec); + t->dec_created = False; + } + } + } + XzDecMt_FreeOutBufs(p); + + #endif + + ISzAlloc_Free(p->alignOffsetAlloc.baseAlloc, pp); +} + + + +#ifndef _7ZIP_ST + +static void XzDecMt_Callback_Parse(void *obj, unsigned coderIndex, CMtDecCallbackInfo *cc) +{ + CXzDecMt *me = (CXzDecMt *)obj; + CXzDecMtThread *coder = &me->coders[coderIndex]; + size_t srcSize = cc->srcSize; + + cc->srcSize = 0; + cc->outPos = 0; + cc->state = MTDEC_PARSE_CONTINUE; + + cc->canCreateNewThread = True; + + if (cc->startCall) + { + coder->outPreSize = 0; + coder->inPreSize = 0; + coder->inPreHeaderSize = 0; + coder->parseState = MTDEC_PARSE_CONTINUE; + coder->parsing_Truncated = False; + coder->skipMode = False; + coder->codeRes = SZ_OK; + coder->status = CODER_STATUS_NOT_SPECIFIED; + coder->inCodeSize = 0; + coder->outCodeSize = 0; + + coder->numStreams = me->numStreams; + coder->numTotalBlocks = me->numTotalBlocks; + coder->numBlocks = me->numBlocks; + + if (!coder->dec_created) + { + XzUnpacker_Construct(&coder->dec, &me->alignOffsetAlloc.vt); + coder->dec_created = True; + } + + XzUnpacker_Init(&coder->dec); + + if (me->isBlockHeaderState_Parse) + { + coder->dec.streamFlags = me->streamFlags; + coder->atBlockHeader = True; + XzUnpacker_PrepareToRandomBlockDecoding(&coder->dec); + } + else + { + coder->atBlockHeader = False; + me->isBlockHeaderState_Parse = True; + } + + coder->dec.numStartedStreams = me->numStreams; + coder->dec.numTotalBlocks = me->numTotalBlocks; + coder->dec.numBlocks = me->numBlocks; + } + + while (!coder->skipMode) + { + ECoderStatus status; + SRes res; + size_t srcSize2 = srcSize; + size_t destSize = (size_t)0 - 1; + + coder->dec.parseMode = True; + coder->dec.headerParsedOk = False; + + PRF_STR_INT("Parse", srcSize2); + + res = XzUnpacker_Code(&coder->dec, + NULL, &destSize, + cc->src, &srcSize2, cc->srcFinished, + CODER_FINISH_END, &status); + + // PRF(printf(" res = %d, srcSize2 = %d", res, (unsigned)srcSize2)); + + coder->codeRes = res; + coder->status = status; + cc->srcSize += srcSize2; + srcSize -= srcSize2; + coder->inPreHeaderSize += srcSize2; + coder->inPreSize = coder->inPreHeaderSize; + + if (res != SZ_OK) + { + cc->state = + coder->parseState = MTDEC_PARSE_END; + /* + if (res == SZ_ERROR_MEM) + return res; + return SZ_OK; + */ + return; // res; + } + + if (coder->dec.headerParsedOk) + { + const CXzBlock *block = &coder->dec.block; + if (XzBlock_HasUnpackSize(block) + // && block->unpackSize <= me->props.outBlockMax + && XzBlock_HasPackSize(block)) + { + { + if (block->unpackSize * 2 * me->mtc.numStartedThreads > me->props.memUseMax) + { + cc->state = MTDEC_PARSE_OVERFLOW; + return; // SZ_OK; + } + } + { + UInt64 packSize = block->packSize; + UInt64 packSizeAligned = packSize + ((0 - (unsigned)packSize) & 3); + UInt32 checkSize = XzFlags_GetCheckSize(coder->dec.streamFlags); + UInt64 blockPackSum = coder->inPreSize + packSizeAligned + checkSize; + // if (blockPackSum <= me->props.inBlockMax) + // unpackBlockMaxSize + { + coder->blockPackSize_for_Index = (size_t)(coder->dec.blockHeaderSize + packSize + checkSize); + coder->blockPackTotal = (size_t)blockPackSum; + coder->outPreSize = (size_t)block->unpackSize; + coder->streamFlags = coder->dec.streamFlags; + me->streamFlags = coder->dec.streamFlags; + coder->skipMode = True; + break; + } + } + } + } + else + // if (coder->inPreSize <= me->props.inBlockMax) + { + if (!cc->srcFinished) + return; // SZ_OK; + cc->state = + coder->parseState = MTDEC_PARSE_END; + return; // SZ_OK; + } + cc->state = MTDEC_PARSE_OVERFLOW; + return; // SZ_OK; + } + + // ---------- skipMode ---------- + { + UInt64 rem = coder->blockPackTotal - coder->inPreSize; + size_t cur = srcSize; + if (cur > rem) + cur = (size_t)rem; + cc->srcSize += cur; + coder->inPreSize += cur; + srcSize -= cur; + + if (coder->inPreSize == coder->blockPackTotal) + { + if (srcSize == 0) + { + if (!cc->srcFinished) + return; // SZ_OK; + cc->state = MTDEC_PARSE_END; + } + else if ((cc->src)[cc->srcSize] == 0) // we check control byte of next block + cc->state = MTDEC_PARSE_END; + else + { + cc->state = MTDEC_PARSE_NEW; + + { + size_t blockMax = me->unpackBlockMaxSize; + if (blockMax < coder->outPreSize) + blockMax = coder->outPreSize; + { + UInt64 required = (UInt64)blockMax * (me->mtc.numStartedThreads + 1) * 2; + if (me->props.memUseMax < required) + cc->canCreateNewThread = False; + } + } + + if (me->outSize_Defined) + { + // next block can be zero size + const UInt64 rem2 = me->outSize - me->outProcessed_Parse; + if (rem2 < coder->outPreSize) + { + coder->parsing_Truncated = True; + cc->state = MTDEC_PARSE_END; + } + me->outProcessed_Parse += coder->outPreSize; + } + } + } + else if (cc->srcFinished) + cc->state = MTDEC_PARSE_END; + else + return; // SZ_OK; + + coder->parseState = cc->state; + cc->outPos = coder->outPreSize; + + me->numStreams = coder->dec.numStartedStreams; + me->numTotalBlocks = coder->dec.numTotalBlocks; + me->numBlocks = coder->dec.numBlocks + 1; + return; // SZ_OK; + } +} + + +static SRes XzDecMt_Callback_PreCode(void *pp, unsigned coderIndex) +{ + CXzDecMt *me = (CXzDecMt *)pp; + CXzDecMtThread *coder = &me->coders[coderIndex]; + Byte *dest; + + if (!coder->dec.headerParsedOk) + return SZ_OK; + + dest = coder->outBuf; + + if (!dest || coder->outBufSize < coder->outPreSize) + { + if (dest) + { + ISzAlloc_Free(me->allocMid, dest); + coder->outBuf = NULL; + coder->outBufSize = 0; + } + { + size_t outPreSize = coder->outPreSize; + if (outPreSize == 0) + outPreSize = 1; + dest = (Byte *)ISzAlloc_Alloc(me->allocMid, outPreSize); + } + if (!dest) + return SZ_ERROR_MEM; + coder->outBuf = dest; + coder->outBufSize = coder->outPreSize; + + if (coder->outBufSize > me->unpackBlockMaxSize) + me->unpackBlockMaxSize = coder->outBufSize; + } + + // return SZ_ERROR_MEM; + + XzUnpacker_SetOutBuf(&coder->dec, coder->outBuf, coder->outBufSize); + + { + SRes res = XzDecMix_Init(&coder->dec.decoder, &coder->dec.block, coder->outBuf, coder->outBufSize); + // res = SZ_ERROR_UNSUPPORTED; // to test + coder->codeRes = res; + if (res != SZ_OK) + { + // if (res == SZ_ERROR_MEM) return res; + if (me->props.ignoreErrors && res != SZ_ERROR_MEM) + return S_OK; + return res; + } + } + + return SZ_OK; +} + + +static SRes XzDecMt_Callback_Code(void *pp, unsigned coderIndex, + const Byte *src, size_t srcSize, int srcFinished, + // int finished, int blockFinished, + UInt64 *inCodePos, UInt64 *outCodePos, int *stop) +{ + CXzDecMt *me = (CXzDecMt *)pp; + CXzDecMtThread *coder = &me->coders[coderIndex]; + + *inCodePos = coder->inCodeSize; + *outCodePos = coder->outCodeSize; + *stop = True; + + if (coder->inCodeSize < coder->inPreHeaderSize) + { + UInt64 rem = coder->inPreHeaderSize - coder->inCodeSize; + size_t step = srcSize; + if (step > rem) + step = (size_t)rem; + src += step; + srcSize -= step; + coder->inCodeSize += step; + if (coder->inCodeSize < coder->inPreHeaderSize) + { + *stop = False; + return SZ_OK; + } + } + + if (!coder->dec.headerParsedOk) + return SZ_OK; + if (!coder->outBuf) + return SZ_OK; + + if (coder->codeRes == SZ_OK) + { + ECoderStatus status; + SRes res; + size_t srcProcessed = srcSize; + size_t outSizeCur = coder->outPreSize - coder->dec.outDataWritten; + + // PRF(printf("\nCallback_Code: Code %d %d\n", (unsigned)srcSize, (unsigned)outSizeCur)); + + res = XzUnpacker_Code(&coder->dec, + NULL, &outSizeCur, + src, &srcProcessed, srcFinished, + // coder->finishedWithMark ? CODER_FINISH_END : CODER_FINISH_ANY, + CODER_FINISH_END, + &status); + + // PRF(printf(" res = %d, srcSize2 = %d, outSizeCur = %d", res, (unsigned)srcProcessed, (unsigned)outSizeCur)); + + coder->codeRes = res; + coder->status = status; + coder->inCodeSize += srcProcessed; + coder->outCodeSize = coder->dec.outDataWritten; + *inCodePos = coder->inCodeSize; + *outCodePos = coder->outCodeSize; + + if (res == SZ_OK) + { + if (srcProcessed == srcSize) + *stop = False; + return SZ_OK; + } + } + + if (me->props.ignoreErrors && coder->codeRes != SZ_ERROR_MEM) + { + *inCodePos = coder->inPreSize; + *outCodePos = coder->outPreSize; + return S_OK; + } + return coder->codeRes; +} + + +#define XZDECMT_STREAM_WRITE_STEP (1 << 24) + +static SRes XzDecMt_Callback_Write(void *pp, unsigned coderIndex, + BoolInt needWriteToStream, + const Byte *src, size_t srcSize, + // int srcFinished, + BoolInt *needContinue, + BoolInt *canRecode) +{ + CXzDecMt *me = (CXzDecMt *)pp; + const CXzDecMtThread *coder = &me->coders[coderIndex]; + + // PRF(printf("\nWrite processed = %d srcSize = %d\n", (unsigned)me->mtc.inProcessed, (unsigned)srcSize)); + + *needContinue = False; + *canRecode = True; + + if (!needWriteToStream) + return SZ_OK; + + if (!coder->dec.headerParsedOk || !coder->outBuf) + { + if (me->finishedDecoderIndex < 0) + me->finishedDecoderIndex = coderIndex; + return SZ_OK; + } + + if (me->finishedDecoderIndex >= 0) + return SZ_OK; + + me->mtc.inProcessed += coder->inCodeSize; + + *canRecode = False; + + { + SRes res; + size_t size = coder->outCodeSize; + Byte *data = coder->outBuf; + + // we use in me->dec: sha, numBlocks, indexSize + + if (!me->isBlockHeaderState_Write) + { + XzUnpacker_PrepareToRandomBlockDecoding(&me->dec); + me->dec.decodeOnlyOneBlock = False; + me->dec.numStartedStreams = coder->dec.numStartedStreams; + me->dec.streamFlags = coder->streamFlags; + + me->isBlockHeaderState_Write = True; + } + + me->dec.numTotalBlocks = coder->dec.numTotalBlocks; + XzUnpacker_UpdateIndex(&me->dec, coder->blockPackSize_for_Index, coder->outPreSize); + + if (coder->outPreSize != size) + { + if (me->props.ignoreErrors) + { + memset(data + size, 0, coder->outPreSize - size); + size = coder->outPreSize; + } + // me->numBadBlocks++; + if (me->mainErrorCode == SZ_OK) + { + if ((int)coder->status == LZMA_STATUS_NEEDS_MORE_INPUT) + me->mainErrorCode = SZ_ERROR_INPUT_EOF; + else + me->mainErrorCode = SZ_ERROR_DATA; + } + } + + if (me->writeRes != SZ_OK) + return me->writeRes; + + res = SZ_OK; + { + if (me->outSize_Defined) + { + const UInt64 rem = me->outSize - me->outProcessed; + if (size > rem) + size = (SizeT)rem; + } + + for (;;) + { + size_t cur = size; + size_t written; + if (cur > XZDECMT_STREAM_WRITE_STEP) + cur = XZDECMT_STREAM_WRITE_STEP; + + written = ISeqOutStream_Write(me->outStream, data, cur); + + // PRF(printf("\nWritten ask = %d written = %d\n", (unsigned)cur, (unsigned)written)); + + me->outProcessed += written; + if (written != cur) + { + me->writeRes = SZ_ERROR_WRITE; + res = me->writeRes; + break; + } + data += cur; + size -= cur; + // PRF_STR_INT("Written size =", size); + if (size == 0) + break; + res = MtProgress_ProgressAdd(&me->mtc.mtProgress, 0, 0); + if (res != SZ_OK) + break; + } + } + + if (coder->codeRes != SZ_OK) + if (!me->props.ignoreErrors) + { + me->finishedDecoderIndex = coderIndex; + return res; + } + + RINOK(res); + + if (coder->inPreSize != coder->inCodeSize + || coder->blockPackTotal != coder->inCodeSize) + { + me->finishedDecoderIndex = coderIndex; + return SZ_OK; + } + + if (coder->parseState != MTDEC_PARSE_END) + { + *needContinue = True; + return SZ_OK; + } + } + + // (coder->state == MTDEC_PARSE_END) means that there are no other working threads + // so we can use mtc variables without lock + + PRF_STR_INT("Write MTDEC_PARSE_END", me->mtc.inProcessed); + + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + { + CXzUnpacker *dec = &me->dec; + + PRF_STR_INT("PostSingle", srcSize); + + { + size_t srcProcessed = srcSize; + ECoderStatus status; + size_t outSizeCur = 0; + SRes res; + + // dec->decodeOnlyOneBlock = False; + dec->decodeToStreamSignature = True; + + me->mainDecoderWasCalled = True; + + if (coder->parsing_Truncated) + { + me->parsing_Truncated = True; + return SZ_OK; + } + + res = XzUnpacker_Code(dec, + NULL, &outSizeCur, + src, &srcProcessed, + me->mtc.readWasFinished, // srcFinished + CODER_FINISH_END, // CODER_FINISH_ANY, + &status); + + me->status = status; + me->codeRes = res; + + me->mtc.inProcessed += srcProcessed; + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + + if (res != SZ_OK) + { + return S_OK; + // return res; + } + + if (dec->state == XZ_STATE_STREAM_HEADER) + { + *needContinue = True; + me->isBlockHeaderState_Parse = False; + me->isBlockHeaderState_Write = False; + { + Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); + if (!crossBuf) + return SZ_ERROR_MEM; + memcpy(crossBuf, src + srcProcessed, srcSize - srcProcessed); + } + me->mtc.crossStart = 0; + me->mtc.crossEnd = srcSize - srcProcessed; + return SZ_OK; + } + + if (status != CODER_STATUS_NEEDS_MORE_INPUT) + { + return E_FAIL; + } + + if (me->mtc.readWasFinished) + { + return SZ_OK; + } + } + + { + size_t inPos; + size_t inLim; + const Byte *inData; + UInt64 inProgressPrev = me->mtc.inProcessed; + + // XzDecMt_Prepare_InBuf_ST(p); + Byte *crossBuf = MtDec_GetCrossBuff(&me->mtc); + if (!crossBuf) + return SZ_ERROR_MEM; + + inPos = 0; + inLim = 0; + // outProcessed = 0; + + inData = crossBuf; + + for (;;) + { + SizeT inProcessed; + SizeT outProcessed; + ECoderStatus status; + SRes res; + + if (inPos == inLim) + { + if (!me->mtc.readWasFinished) + { + inPos = 0; + inLim = me->mtc.inBufSize; + me->mtc.readRes = ISeqInStream_Read(me->inStream, (void *)inData, &inLim); + me->mtc.readProcessed += inLim; + if (inLim == 0 || me->mtc.readRes != SZ_OK) + me->mtc.readWasFinished = True; + } + } + + inProcessed = inLim - inPos; + outProcessed = 0; + + res = XzUnpacker_Code(dec, + NULL, &outProcessed, + inData + inPos, &inProcessed, + (inProcessed == 0), // srcFinished + CODER_FINISH_END, &status); + + me->codeRes = res; + me->status = status; + inPos += inProcessed; + me->mtc.inProcessed += inProcessed; + me->mtc.mtProgress.totalInSize = me->mtc.inProcessed; + + if (res != SZ_OK) + { + return S_OK; + // return res; + } + + if (dec->state == XZ_STATE_STREAM_HEADER) + { + *needContinue = True; + me->mtc.crossStart = inPos; + me->mtc.crossEnd = inLim; + me->isBlockHeaderState_Parse = False; + me->isBlockHeaderState_Write = False; + return SZ_OK; + } + + if (status != CODER_STATUS_NEEDS_MORE_INPUT) + return E_FAIL; + + if (me->mtc.progress) + { + UInt64 inDelta = me->mtc.inProcessed - inProgressPrev; + if (inDelta >= (1 << 22)) + { + RINOK(MtProgress_Progress_ST(&me->mtc.mtProgress)); + inProgressPrev = me->mtc.inProcessed; + } + } + if (me->mtc.readWasFinished) + return SZ_OK; + } + } + } +} + + +#endif + + + +void XzStatInfo_Clear(CXzStatInfo *p) +{ + p->InSize = 0; + p->OutSize = 0; + + p->NumStreams = 0; + p->NumBlocks = 0; + + p->UnpackSize_Defined = False; + + p->NumStreams_Defined = False; + p->NumBlocks_Defined = False; + + // p->IsArc = False; + // p->UnexpectedEnd = False; + // p->Unsupported = False; + // p->HeadersError = False; + // p->DataError = False; + // p->CrcError = False; + + p->DataAfterEnd = False; + p->DecodingTruncated = False; + + p->DecodeRes = SZ_OK; + p->ReadRes = SZ_OK; + p->ProgressRes = SZ_OK; + + p->CombinedRes = SZ_OK; + p->CombinedRes_Type = SZ_OK; +} + + + + +static SRes XzDecMt_Decode_ST(CXzDecMt *p + #ifndef _7ZIP_ST + , BoolInt tMode + #endif + , CXzStatInfo *stat) +{ + size_t outPos; + size_t inPos, inLim; + const Byte *inData; + UInt64 inPrev, outPrev; + + CXzUnpacker *dec; + + #ifndef _7ZIP_ST + if (tMode) + { + XzDecMt_FreeOutBufs(p); + tMode = MtDec_PrepareRead(&p->mtc); + } + #endif + + if (!p->outBuf || p->outBufSize != p->props.outStep_ST) + { + ISzAlloc_Free(p->allocMid, p->outBuf); + p->outBufSize = 0; + p->outBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.outStep_ST); + if (!p->outBuf) + return SZ_ERROR_MEM; + p->outBufSize = p->props.outStep_ST; + } + + if (!p->inBuf || p->inBufSize != p->props.inBufSize_ST) + { + ISzAlloc_Free(p->allocMid, p->inBuf); + p->inBufSize = 0; + p->inBuf = (Byte *)ISzAlloc_Alloc(p->allocMid, p->props.inBufSize_ST); + if (!p->inBuf) + return SZ_ERROR_MEM; + p->inBufSize = p->props.inBufSize_ST; + } + + dec = &p->dec; + dec->decodeToStreamSignature = False; + // dec->decodeOnlyOneBlock = False; + + XzUnpacker_SetOutBuf(dec, NULL, 0); + + inPrev = p->inProcessed; + outPrev = p->outProcessed; + + inPos = 0; + inLim = 0; + inData = NULL; + outPos = 0; + + for (;;) + { + SizeT outSize; + BoolInt finished; + ECoderFinishMode finishMode; + SizeT inProcessed; + ECoderStatus status; + SRes res; + + SizeT outProcessed; + + + + if (inPos == inLim) + { + #ifndef _7ZIP_ST + if (tMode) + { + inData = MtDec_Read(&p->mtc, &inLim); + inPos = 0; + if (inData) + continue; + tMode = False; + inLim = 0; + } + #endif + + if (!p->readWasFinished) + { + inPos = 0; + inLim = p->inBufSize; + inData = p->inBuf; + p->readRes = ISeqInStream_Read(p->inStream, (void *)inData, &inLim); + p->readProcessed += inLim; + if (inLim == 0 || p->readRes != SZ_OK) + p->readWasFinished = True; + } + } + + outSize = p->props.outStep_ST - outPos; + + finishMode = CODER_FINISH_ANY; + if (p->outSize_Defined) + { + const UInt64 rem = p->outSize - p->outProcessed; + if (outSize >= rem) + { + outSize = (SizeT)rem; + if (p->finishMode) + finishMode = CODER_FINISH_END; + } + } + + inProcessed = inLim - inPos; + outProcessed = outSize; + + res = XzUnpacker_Code(dec, p->outBuf + outPos, &outProcessed, + inData + inPos, &inProcessed, + (inPos == inLim), // srcFinished + finishMode, &status); + + p->codeRes = res; + p->status = status; + + inPos += inProcessed; + outPos += outProcessed; + p->inProcessed += inProcessed; + p->outProcessed += outProcessed; + + finished = ((inProcessed == 0 && outProcessed == 0) || res != SZ_OK); + + if (finished || outProcessed >= outSize) + if (outPos != 0) + { + size_t written = ISeqOutStream_Write(p->outStream, p->outBuf, outPos); + p->outProcessed += written; + if (written != outPos) + { + stat->CombinedRes_Type = SZ_ERROR_WRITE; + return SZ_ERROR_WRITE; + } + outPos = 0; + } + + if (p->progress && res == SZ_OK) + { + UInt64 inDelta = p->inProcessed - inPrev; + UInt64 outDelta = p->outProcessed - outPrev; + if (inDelta >= (1 << 22) || outDelta >= (1 << 22)) + { + res = ICompressProgress_Progress(p->progress, p->inProcessed, p->outProcessed); + if (res != SZ_OK) + { + stat->CombinedRes_Type = SZ_ERROR_PROGRESS; + stat->ProgressRes = res; + return res; + } + inPrev = p->inProcessed; + outPrev = p->outProcessed; + } + } + + if (finished) + return res; + } +} + +static SRes XzStatInfo_SetStat(const CXzUnpacker *dec, + int finishMode, + UInt64 readProcessed, UInt64 inProcessed, + SRes res, ECoderStatus status, + BoolInt decodingTruncated, + CXzStatInfo *stat) +{ + UInt64 extraSize; + + stat->DecodingTruncated = (Byte)(decodingTruncated ? 1 : 0); + stat->InSize = inProcessed; + stat->NumStreams = dec->numStartedStreams; + stat->NumBlocks = dec->numTotalBlocks; + + stat->UnpackSize_Defined = True; + stat->NumStreams_Defined = True; + stat->NumBlocks_Defined = True; + + extraSize = XzUnpacker_GetExtraSize(dec); + + if (res == SZ_OK) + { + if (status == CODER_STATUS_NEEDS_MORE_INPUT) + { + // CODER_STATUS_NEEDS_MORE_INPUT is expected status for correct xz streams + extraSize = 0; + if (!XzUnpacker_IsStreamWasFinished(dec)) + res = SZ_ERROR_INPUT_EOF; + } + else if (!decodingTruncated || finishMode) // (status == CODER_STATUS_NOT_FINISHED) + res = SZ_ERROR_DATA; + } + else if (res == SZ_ERROR_NO_ARCHIVE) + { + /* + SZ_ERROR_NO_ARCHIVE is possible for 2 states: + XZ_STATE_STREAM_HEADER - if bad signature or bad CRC + XZ_STATE_STREAM_PADDING - if non-zero padding data + extraSize / inProcessed don't include "bad" byte + */ + if (inProcessed != extraSize) // if good streams before error + if (extraSize != 0 || readProcessed != inProcessed) + { + stat->DataAfterEnd = True; + // there is some good xz stream before. So we set SZ_OK + res = SZ_OK; + } + } + + stat->DecodeRes = res; + + stat->InSize -= extraSize; + return res; +} + + +SRes XzDecMt_Decode(CXzDecMtHandle pp, + const CXzDecMtProps *props, + const UInt64 *outDataSize, int finishMode, + ISeqOutStream *outStream, + // Byte *outBuf, size_t *outBufSize, + ISeqInStream *inStream, + // const Byte *inData, size_t inDataSize, + CXzStatInfo *stat, + int *isMT, + ICompressProgress *progress) +{ + CXzDecMt *p = (CXzDecMt *)pp; + #ifndef _7ZIP_ST + BoolInt tMode; + #endif + + XzStatInfo_Clear(stat); + + p->props = *props; + + p->inStream = inStream; + p->outStream = outStream; + p->progress = progress; + // p->stat = stat; + + p->outSize = 0; + p->outSize_Defined = False; + if (outDataSize) + { + p->outSize_Defined = True; + p->outSize = *outDataSize; + } + + p->finishMode = finishMode; + + // p->outSize = 457; p->outSize_Defined = True; p->finishMode = False; // for test + + p->writeRes = SZ_OK; + p->outProcessed = 0; + p->inProcessed = 0; + p->readProcessed = 0; + p->readWasFinished = False; + + p->codeRes = 0; + p->status = CODER_STATUS_NOT_SPECIFIED; + + XzUnpacker_Init(&p->dec); + + *isMT = False; + + /* + p->outBuf = NULL; + p->outBufSize = 0; + if (!outStream) + { + p->outBuf = outBuf; + p->outBufSize = *outBufSize; + *outBufSize = 0; + } + */ + + + #ifndef _7ZIP_ST + + p->isBlockHeaderState_Parse = False; + p->isBlockHeaderState_Write = False; + // p->numBadBlocks = 0; + p->mainErrorCode = SZ_OK; + p->mainDecoderWasCalled = False; + + tMode = False; + + if (p->props.numThreads > 1) + { + IMtDecCallback vt; + + // we just free ST buffers here + // but we still keep state variables, that was set in XzUnpacker_Init() + XzDecMt_FreeSt(p); + + p->outProcessed_Parse = 0; + p->parsing_Truncated = False; + + p->numStreams = 0; + p->numTotalBlocks = 0; + p->numBlocks = 0; + p->finishedDecoderIndex = -1; + + if (!p->mtc_WasConstructed) + { + p->mtc_WasConstructed = True; + MtDec_Construct(&p->mtc); + } + + p->mtc.mtCallback = &vt; + p->mtc.mtCallbackObject = p; + + p->mtc.progress = progress; + p->mtc.inStream = inStream; + p->mtc.alloc = &p->alignOffsetAlloc.vt; + // p->mtc.inData = inData; + // p->mtc.inDataSize = inDataSize; + p->mtc.inBufSize = p->props.inBufSize_MT; + // p->mtc.inBlockMax = p->props.inBlockMax; + p->mtc.numThreadsMax = p->props.numThreads; + + *isMT = True; + + vt.Parse = XzDecMt_Callback_Parse; + vt.PreCode = XzDecMt_Callback_PreCode; + vt.Code = XzDecMt_Callback_Code; + vt.Write = XzDecMt_Callback_Write; + + { + BoolInt needContinue; + + SRes res = MtDec_Code(&p->mtc); + + stat->InSize = p->mtc.inProcessed; + + p->inProcessed = p->mtc.inProcessed; + p->readRes = p->mtc.readRes; + p->readWasFinished = p->mtc.readWasFinished; + p->readProcessed = p->mtc.readProcessed; + + tMode = True; + needContinue = False; + + if (res == SZ_OK) + { + if (p->mtc.mtProgress.res != SZ_OK) + { + res = p->mtc.mtProgress.res; + stat->ProgressRes = res; + stat->CombinedRes_Type = SZ_ERROR_PROGRESS; + } + else + needContinue = p->mtc.needContinue; + } + + if (!needContinue) + { + SRes codeRes; + BoolInt truncated = False; + ECoderStatus status; + CXzUnpacker *dec; + + stat->OutSize = p->outProcessed; + + if (p->finishedDecoderIndex >= 0) + { + CXzDecMtThread *coder = &p->coders[(unsigned)p->finishedDecoderIndex]; + codeRes = coder->codeRes; + dec = &coder->dec; + status = coder->status; + } + else if (p->mainDecoderWasCalled) + { + codeRes = p->codeRes; + dec = &p->dec; + status = p->status; + truncated = p->parsing_Truncated; + } + else + return E_FAIL; + + XzStatInfo_SetStat(dec, p->finishMode, + p->mtc.readProcessed, p->mtc.inProcessed, + codeRes, status, + truncated, + stat); + + if (res == SZ_OK) + { + if (p->writeRes != SZ_OK) + { + res = p->writeRes; + stat->CombinedRes_Type = SZ_ERROR_WRITE; + } + else if (p->mtc.readRes != SZ_OK && p->mtc.inProcessed == p->mtc.readProcessed) + { + res = p->mtc.readRes; + stat->ReadRes = res; + stat->CombinedRes_Type = SZ_ERROR_READ; + } + else if (p->mainErrorCode != SZ_OK) + { + res = p->mainErrorCode; + } + } + + stat->CombinedRes = res; + if (stat->CombinedRes_Type == SZ_OK) + stat->CombinedRes_Type = res; + return res; + } + + PRF_STR("----- decoding ST -----"); + } + } + + #endif + + + *isMT = False; + + { + SRes res = XzDecMt_Decode_ST(p + #ifndef _7ZIP_ST + , tMode + #endif + , stat + ); + + XzStatInfo_SetStat(&p->dec, + p->finishMode, + p->readProcessed, p->inProcessed, + p->codeRes, p->status, + False, // truncated + stat); + + if (res == SZ_OK) + { + /* + if (p->writeRes != SZ_OK) + { + res = p->writeRes; + stat->CombinedRes_Type = SZ_ERROR_WRITE; + } + else + */ + if (p->readRes != SZ_OK && p->inProcessed == p->readProcessed) + { + res = p->readRes; + stat->ReadRes = res; + stat->CombinedRes_Type = SZ_ERROR_READ; + } + #ifndef _7ZIP_ST + else if (p->mainErrorCode != SZ_OK) + res = p->mainErrorCode; + #endif + } + + stat->CombinedRes = res; + if (stat->CombinedRes_Type == SZ_OK) + stat->CombinedRes_Type = res; + return res; + } +} diff --git a/bsnes/lzma/XzEnc.c b/bsnes/lzma/XzEnc.c new file mode 100644 index 00000000..309eca94 --- /dev/null +++ b/bsnes/lzma/XzEnc.c @@ -0,0 +1,1329 @@ +/* XzEnc.c -- Xz Encode +2019-02-02 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include +#include + +#include "7zCrc.h" +#include "Bra.h" +#include "CpuArch.h" + +#ifdef USE_SUBBLOCK +#include "Bcj3Enc.c" +#include "SbFind.c" +#include "SbEnc.c" +#endif + +#include "XzEnc.h" + +// #define _7ZIP_ST + +#ifndef _7ZIP_ST +#include "MtCoder.h" +#else +#define MTCODER__THREADS_MAX 1 +#define MTCODER__BLOCKS_MAX 1 +#endif + +#define XZ_GET_PAD_SIZE(dataSize) ((4 - ((unsigned)(dataSize) & 3)) & 3) + +/* max pack size for LZMA2 block + check-64bytrs: */ +#define XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize) ((unpackSize) + ((unpackSize) >> 10) + 16 + 64) + +#define XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(unpackSize) (XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(unpackSize)) + + +#define XzBlock_ClearFlags(p) (p)->flags = 0; +#define XzBlock_SetNumFilters(p, n) (p)->flags |= ((n) - 1); +#define XzBlock_SetHasPackSize(p) (p)->flags |= XZ_BF_PACK_SIZE; +#define XzBlock_SetHasUnpackSize(p) (p)->flags |= XZ_BF_UNPACK_SIZE; + + +static SRes WriteBytes(ISeqOutStream *s, const void *buf, size_t size) +{ + return (ISeqOutStream_Write(s, buf, size) == size) ? SZ_OK : SZ_ERROR_WRITE; +} + +static SRes WriteBytesUpdateCrc(ISeqOutStream *s, const void *buf, size_t size, UInt32 *crc) +{ + *crc = CrcUpdate(*crc, buf, size); + return WriteBytes(s, buf, size); +} + + +static SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s) +{ + UInt32 crc; + Byte header[XZ_STREAM_HEADER_SIZE]; + memcpy(header, XZ_SIG, XZ_SIG_SIZE); + header[XZ_SIG_SIZE] = (Byte)(f >> 8); + header[XZ_SIG_SIZE + 1] = (Byte)(f & 0xFF); + crc = CrcCalc(header + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE); + SetUi32(header + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE, crc); + return WriteBytes(s, header, XZ_STREAM_HEADER_SIZE); +} + + +static SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + + unsigned pos = 1; + unsigned numFilters, i; + header[pos++] = p->flags; + + if (XzBlock_HasPackSize(p)) pos += Xz_WriteVarInt(header + pos, p->packSize); + if (XzBlock_HasUnpackSize(p)) pos += Xz_WriteVarInt(header + pos, p->unpackSize); + numFilters = XzBlock_GetNumFilters(p); + + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &p->filters[i]; + pos += Xz_WriteVarInt(header + pos, f->id); + pos += Xz_WriteVarInt(header + pos, f->propsSize); + memcpy(header + pos, f->props, f->propsSize); + pos += f->propsSize; + } + + while ((pos & 3) != 0) + header[pos++] = 0; + + header[0] = (Byte)(pos >> 2); + SetUi32(header + pos, CrcCalc(header, pos)); + return WriteBytes(s, header, pos + 4); +} + + + + +typedef struct +{ + size_t numBlocks; + size_t size; + size_t allocated; + Byte *blocks; +} CXzEncIndex; + + +static void XzEncIndex_Construct(CXzEncIndex *p) +{ + p->numBlocks = 0; + p->size = 0; + p->allocated = 0; + p->blocks = NULL; +} + +static void XzEncIndex_Init(CXzEncIndex *p) +{ + p->numBlocks = 0; + p->size = 0; +} + +static void XzEncIndex_Free(CXzEncIndex *p, ISzAllocPtr alloc) +{ + if (p->blocks) + { + ISzAlloc_Free(alloc, p->blocks); + p->blocks = NULL; + } + p->numBlocks = 0; + p->size = 0; + p->allocated = 0; +} + + +static SRes XzEncIndex_ReAlloc(CXzEncIndex *p, size_t newSize, ISzAllocPtr alloc) +{ + Byte *blocks = (Byte *)ISzAlloc_Alloc(alloc, newSize); + if (!blocks) + return SZ_ERROR_MEM; + if (p->size != 0) + memcpy(blocks, p->blocks, p->size); + if (p->blocks) + ISzAlloc_Free(alloc, p->blocks); + p->blocks = blocks; + p->allocated = newSize; + return SZ_OK; +} + + +static SRes XzEncIndex_PreAlloc(CXzEncIndex *p, UInt64 numBlocks, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) +{ + UInt64 pos; + { + Byte buf[32]; + unsigned pos2 = Xz_WriteVarInt(buf, totalSize); + pos2 += Xz_WriteVarInt(buf + pos2, unpackSize); + pos = numBlocks * pos2; + } + + if (pos <= p->allocated - p->size) + return SZ_OK; + { + UInt64 newSize64 = p->size + pos; + size_t newSize = (size_t)newSize64; + if (newSize != newSize64) + return SZ_ERROR_MEM; + return XzEncIndex_ReAlloc(p, newSize, alloc); + } +} + + +static SRes XzEncIndex_AddIndexRecord(CXzEncIndex *p, UInt64 unpackSize, UInt64 totalSize, ISzAllocPtr alloc) +{ + Byte buf[32]; + unsigned pos = Xz_WriteVarInt(buf, totalSize); + pos += Xz_WriteVarInt(buf + pos, unpackSize); + + if (pos > p->allocated - p->size) + { + size_t newSize = p->allocated * 2 + 16 * 2; + if (newSize < p->size + pos) + return SZ_ERROR_MEM; + RINOK(XzEncIndex_ReAlloc(p, newSize, alloc)); + } + memcpy(p->blocks + p->size, buf, pos); + p->size += pos; + p->numBlocks++; + return SZ_OK; +} + + +static SRes XzEncIndex_WriteFooter(const CXzEncIndex *p, CXzStreamFlags flags, ISeqOutStream *s) +{ + Byte buf[32]; + UInt64 globalPos; + UInt32 crc = CRC_INIT_VAL; + unsigned pos = 1 + Xz_WriteVarInt(buf + 1, p->numBlocks); + + globalPos = pos; + buf[0] = 0; + RINOK(WriteBytesUpdateCrc(s, buf, pos, &crc)); + RINOK(WriteBytesUpdateCrc(s, p->blocks, p->size, &crc)); + globalPos += p->size; + + pos = XZ_GET_PAD_SIZE(globalPos); + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + globalPos += pos; + + crc = CrcUpdate(crc, buf + 4 - pos, pos); + SetUi32(buf + 4, CRC_GET_DIGEST(crc)); + + SetUi32(buf + 8 + 4, (UInt32)(globalPos >> 2)); + buf[8 + 8] = (Byte)(flags >> 8); + buf[8 + 9] = (Byte)(flags & 0xFF); + SetUi32(buf + 8, CrcCalc(buf + 8 + 4, 6)); + buf[8 + 10] = XZ_FOOTER_SIG_0; + buf[8 + 11] = XZ_FOOTER_SIG_1; + + return WriteBytes(s, buf + 4 - pos, pos + 4 + 12); +} + + + +/* ---------- CSeqCheckInStream ---------- */ + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *realStream; + const Byte *data; + UInt64 limit; + UInt64 processed; + int realStreamFinished; + CXzCheck check; +} CSeqCheckInStream; + +static void SeqCheckInStream_Init(CSeqCheckInStream *p, unsigned checkMode) +{ + p->limit = (UInt64)(Int64)-1; + p->processed = 0; + p->realStreamFinished = 0; + XzCheck_Init(&p->check, checkMode); +} + +static void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest) +{ + XzCheck_Final(&p->check, digest); +} + +static SRes SeqCheckInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSeqCheckInStream *p = CONTAINER_FROM_VTBL(pp, CSeqCheckInStream, vt); + size_t size2 = *size; + SRes res = SZ_OK; + + if (p->limit != (UInt64)(Int64)-1) + { + UInt64 rem = p->limit - p->processed; + if (size2 > rem) + size2 = (size_t)rem; + } + if (size2 != 0) + { + if (p->realStream) + { + res = ISeqInStream_Read(p->realStream, data, &size2); + p->realStreamFinished = (size2 == 0) ? 1 : 0; + } + else + memcpy(data, p->data + (size_t)p->processed, size2); + XzCheck_Update(&p->check, data, size2); + p->processed += size2; + } + *size = size2; + return res; +} + + +/* ---------- CSeqSizeOutStream ---------- */ + +typedef struct +{ + ISeqOutStream vt; + ISeqOutStream *realStream; + Byte *outBuf; + size_t outBufLimit; + UInt64 processed; +} CSeqSizeOutStream; + +static size_t SeqSizeOutStream_Write(const ISeqOutStream *pp, const void *data, size_t size) +{ + CSeqSizeOutStream *p = CONTAINER_FROM_VTBL(pp, CSeqSizeOutStream, vt); + if (p->realStream) + size = ISeqOutStream_Write(p->realStream, data, size); + else + { + if (size > p->outBufLimit - (size_t)p->processed) + return 0; + memcpy(p->outBuf + (size_t)p->processed, data, size); + } + p->processed += size; + return size; +} + + +/* ---------- CSeqInFilter ---------- */ + +#define FILTER_BUF_SIZE (1 << 20) + +typedef struct +{ + ISeqInStream p; + ISeqInStream *realStream; + IStateCoder StateCoder; + Byte *buf; + size_t curPos; + size_t endPos; + int srcWasFinished; +} CSeqInFilter; + + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, int encodeMode, ISzAllocPtr alloc); + +static SRes SeqInFilter_Init(CSeqInFilter *p, const CXzFilter *props, ISzAllocPtr alloc) +{ + if (!p->buf) + { + p->buf = (Byte *)ISzAlloc_Alloc(alloc, FILTER_BUF_SIZE); + if (!p->buf) + return SZ_ERROR_MEM; + } + p->curPos = p->endPos = 0; + p->srcWasFinished = 0; + RINOK(BraState_SetFromMethod(&p->StateCoder, props->id, 1, alloc)); + RINOK(p->StateCoder.SetProps(p->StateCoder.p, props->props, props->propsSize, alloc)); + p->StateCoder.Init(p->StateCoder.p); + return SZ_OK; +} + + +static SRes SeqInFilter_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSeqInFilter *p = CONTAINER_FROM_VTBL(pp, CSeqInFilter, p); + size_t sizeOriginal = *size; + if (sizeOriginal == 0) + return SZ_OK; + *size = 0; + + for (;;) + { + if (!p->srcWasFinished && p->curPos == p->endPos) + { + p->curPos = 0; + p->endPos = FILTER_BUF_SIZE; + RINOK(ISeqInStream_Read(p->realStream, p->buf, &p->endPos)); + if (p->endPos == 0) + p->srcWasFinished = 1; + } + { + SizeT srcLen = p->endPos - p->curPos; + ECoderStatus status; + SRes res; + *size = sizeOriginal; + res = p->StateCoder.Code2(p->StateCoder.p, + (Byte *)data, size, + p->buf + p->curPos, &srcLen, + p->srcWasFinished, CODER_FINISH_ANY, + &status); + p->curPos += srcLen; + if (*size != 0 || srcLen == 0 || res != SZ_OK) + return res; + } + } +} + +static void SeqInFilter_Construct(CSeqInFilter *p) +{ + p->buf = NULL; + p->StateCoder.p = NULL; + p->p.Read = SeqInFilter_Read; +} + +static void SeqInFilter_Free(CSeqInFilter *p, ISzAllocPtr alloc) +{ + if (p->StateCoder.p) + { + p->StateCoder.Free(p->StateCoder.p, alloc); + p->StateCoder.p = NULL; + } + if (p->buf) + { + ISzAlloc_Free(alloc, p->buf); + p->buf = NULL; + } +} + + +/* ---------- CSbEncInStream ---------- */ + +#ifdef USE_SUBBLOCK + +typedef struct +{ + ISeqInStream vt; + ISeqInStream *inStream; + CSbEnc enc; +} CSbEncInStream; + +static SRes SbEncInStream_Read(const ISeqInStream *pp, void *data, size_t *size) +{ + CSbEncInStream *p = CONTAINER_FROM_VTBL(pp, CSbEncInStream, vt); + size_t sizeOriginal = *size; + if (sizeOriginal == 0) + return SZ_OK; + + for (;;) + { + if (p->enc.needRead && !p->enc.readWasFinished) + { + size_t processed = p->enc.needReadSizeMax; + RINOK(p->inStream->Read(p->inStream, p->enc.buf + p->enc.readPos, &processed)); + p->enc.readPos += processed; + if (processed == 0) + { + p->enc.readWasFinished = True; + p->enc.isFinalFinished = True; + } + p->enc.needRead = False; + } + + *size = sizeOriginal; + RINOK(SbEnc_Read(&p->enc, data, size)); + if (*size != 0 || !p->enc.needRead) + return SZ_OK; + } +} + +void SbEncInStream_Construct(CSbEncInStream *p, ISzAllocPtr alloc) +{ + SbEnc_Construct(&p->enc, alloc); + p->vt.Read = SbEncInStream_Read; +} + +SRes SbEncInStream_Init(CSbEncInStream *p) +{ + return SbEnc_Init(&p->enc); +} + +void SbEncInStream_Free(CSbEncInStream *p) +{ + SbEnc_Free(&p->enc); +} + +#endif + + + +/* ---------- CXzProps ---------- */ + + +void XzFilterProps_Init(CXzFilterProps *p) +{ + p->id = 0; + p->delta = 0; + p->ip = 0; + p->ipDefined = False; +} + +void XzProps_Init(CXzProps *p) +{ + p->checkId = XZ_CHECK_CRC32; + p->blockSize = XZ_PROPS__BLOCK_SIZE__AUTO; + p->numBlockThreads_Reduced = -1; + p->numBlockThreads_Max = -1; + p->numTotalThreads = -1; + p->reduceSize = (UInt64)(Int64)-1; + p->forceWriteSizesInHeader = 0; + // p->forceWriteSizesInHeader = 1; + + XzFilterProps_Init(&p->filterProps); + Lzma2EncProps_Init(&p->lzma2Props); +} + + +static void XzEncProps_Normalize_Fixed(CXzProps *p) +{ + UInt64 fileSize; + int t1, t1n, t2, t2r, t3; + { + CLzma2EncProps tp = p->lzma2Props; + if (tp.numTotalThreads <= 0) + tp.numTotalThreads = p->numTotalThreads; + Lzma2EncProps_Normalize(&tp); + t1n = tp.numTotalThreads; + } + + t1 = p->lzma2Props.numTotalThreads; + t2 = p->numBlockThreads_Max; + t3 = p->numTotalThreads; + + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + + if (t3 <= 0) + { + if (t2 <= 0) + t2 = 1; + t3 = t1n * t2; + } + else if (t2 <= 0) + { + t2 = t3 / t1n; + if (t2 == 0) + { + t1 = 1; + t2 = t3; + } + if (t2 > MTCODER__THREADS_MAX) + t2 = MTCODER__THREADS_MAX; + } + else if (t1 <= 0) + { + t1 = t3 / t2; + if (t1 == 0) + t1 = 1; + } + else + t3 = t1n * t2; + + p->lzma2Props.numTotalThreads = t1; + + t2r = t2; + + fileSize = p->reduceSize; + + if ((p->blockSize < fileSize || fileSize == (UInt64)(Int64)-1)) + p->lzma2Props.lzmaProps.reduceSize = p->blockSize; + + Lzma2EncProps_Normalize(&p->lzma2Props); + + t1 = p->lzma2Props.numTotalThreads; + + { + if (t2 > 1 && fileSize != (UInt64)(Int64)-1) + { + UInt64 numBlocks = fileSize / p->blockSize; + if (numBlocks * p->blockSize != fileSize) + numBlocks++; + if (numBlocks < (unsigned)t2) + { + t2r = (unsigned)numBlocks; + if (t2r == 0) + t2r = 1; + t3 = t1 * t2r; + } + } + } + + p->numBlockThreads_Max = t2; + p->numBlockThreads_Reduced = t2r; + p->numTotalThreads = t3; +} + + +static void XzProps_Normalize(CXzProps *p) +{ + /* we normalize xzProps properties, but we normalize only some of CXzProps::lzma2Props properties. + Lzma2Enc_SetProps() will normalize lzma2Props later. */ + + if (p->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID) + { + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + p->numBlockThreads_Reduced = 1; + p->numBlockThreads_Max = 1; + if (p->lzma2Props.numTotalThreads <= 0) + p->lzma2Props.numTotalThreads = p->numTotalThreads; + return; + } + else + { + CLzma2EncProps *lzma2 = &p->lzma2Props; + if (p->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + { + // xz-auto + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + { + // if (xz-auto && lzma2-solid) - we use solid for both + p->blockSize = XZ_PROPS__BLOCK_SIZE__SOLID; + p->numBlockThreads_Reduced = 1; + p->numBlockThreads_Max = 1; + if (p->lzma2Props.numTotalThreads <= 0) + p->lzma2Props.numTotalThreads = p->numTotalThreads; + } + else + { + // if (xz-auto && (lzma2-auto || lzma2-fixed_) + // we calculate block size for lzma2 and use that block size for xz, lzma2 uses single-chunk per block + CLzma2EncProps tp = p->lzma2Props; + if (tp.numTotalThreads <= 0) + tp.numTotalThreads = p->numTotalThreads; + + Lzma2EncProps_Normalize(&tp); + + p->blockSize = tp.blockSize; // fixed or solid + p->numBlockThreads_Reduced = tp.numBlockThreads_Reduced; + p->numBlockThreads_Max = tp.numBlockThreads_Max; + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + lzma2->blockSize = tp.blockSize; // fixed or solid, LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + if (lzma2->lzmaProps.reduceSize > tp.blockSize && tp.blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + lzma2->lzmaProps.reduceSize = tp.blockSize; + lzma2->numBlockThreads_Reduced = 1; + lzma2->numBlockThreads_Max = 1; + return; + } + } + else + { + // xz-fixed + // we can use xz::reduceSize or xz::blockSize as base for lzmaProps::reduceSize + + p->lzma2Props.lzmaProps.reduceSize = p->reduceSize; + { + UInt64 r = p->reduceSize; + if (r > p->blockSize || r == (UInt64)(Int64)-1) + r = p->blockSize; + lzma2->lzmaProps.reduceSize = r; + } + if (lzma2->blockSize == LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO) + lzma2->blockSize = LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID; + else if (lzma2->blockSize > p->blockSize && lzma2->blockSize != LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID) + lzma2->blockSize = p->blockSize; + + XzEncProps_Normalize_Fixed(p); + } + } +} + + +/* ---------- CLzma2WithFilters ---------- */ + +typedef struct +{ + CLzma2EncHandle lzma2; + CSeqInFilter filter; + + #ifdef USE_SUBBLOCK + CSbEncInStream sb; + #endif +} CLzma2WithFilters; + + +static void Lzma2WithFilters_Construct(CLzma2WithFilters *p) +{ + p->lzma2 = NULL; + SeqInFilter_Construct(&p->filter); + + #ifdef USE_SUBBLOCK + SbEncInStream_Construct(&p->sb, alloc); + #endif +} + + +static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p, ISzAllocPtr alloc, ISzAllocPtr bigAlloc) +{ + if (!p->lzma2) + { + p->lzma2 = Lzma2Enc_Create(alloc, bigAlloc); + if (!p->lzma2) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + + +static void Lzma2WithFilters_Free(CLzma2WithFilters *p, ISzAllocPtr alloc) +{ + #ifdef USE_SUBBLOCK + SbEncInStream_Free(&p->sb); + #endif + + SeqInFilter_Free(&p->filter, alloc); + if (p->lzma2) + { + Lzma2Enc_Destroy(p->lzma2); + p->lzma2 = NULL; + } +} + + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; + size_t headerSize; +} CXzEncBlockInfo; + + +static SRes Xz_CompressBlock( + CLzma2WithFilters *lzmaf, + + ISeqOutStream *outStream, + Byte *outBufHeader, + Byte *outBufData, size_t outBufDataLimit, + + ISeqInStream *inStream, + // UInt64 expectedSize, + const Byte *inBuf, // used if (!inStream) + size_t inBufSize, // used if (!inStream), it's block size, props->blockSize is ignored + + const CXzProps *props, + ICompressProgress *progress, + int *inStreamFinished, /* only for inStream version */ + CXzEncBlockInfo *blockSizes, + ISzAllocPtr alloc, + ISzAllocPtr allocBig) +{ + CSeqCheckInStream checkInStream; + CSeqSizeOutStream seqSizeOutStream; + CXzBlock block; + unsigned filterIndex = 0; + CXzFilter *filter = NULL; + const CXzFilterProps *fp = &props->filterProps; + if (fp->id == 0) + fp = NULL; + + *inStreamFinished = False; + + RINOK(Lzma2WithFilters_Create(lzmaf, alloc, allocBig)); + + RINOK(Lzma2Enc_SetProps(lzmaf->lzma2, &props->lzma2Props)); + + XzBlock_ClearFlags(&block); + XzBlock_SetNumFilters(&block, 1 + (fp ? 1 : 0)); + + if (fp) + { + filter = &block.filters[filterIndex++]; + filter->id = fp->id; + filter->propsSize = 0; + + if (fp->id == XZ_ID_Delta) + { + filter->props[0] = (Byte)(fp->delta - 1); + filter->propsSize = 1; + } + else if (fp->ipDefined) + { + SetUi32(filter->props, fp->ip); + filter->propsSize = 4; + } + } + + { + CXzFilter *f = &block.filters[filterIndex++]; + f->id = XZ_ID_LZMA2; + f->propsSize = 1; + f->props[0] = Lzma2Enc_WriteProperties(lzmaf->lzma2); + } + + seqSizeOutStream.vt.Write = SeqSizeOutStream_Write; + seqSizeOutStream.realStream = outStream; + seqSizeOutStream.outBuf = outBufData; + seqSizeOutStream.outBufLimit = outBufDataLimit; + seqSizeOutStream.processed = 0; + + /* + if (expectedSize != (UInt64)(Int64)-1) + { + block.unpackSize = expectedSize; + if (props->blockSize != (UInt64)(Int64)-1) + if (expectedSize > props->blockSize) + block.unpackSize = props->blockSize; + XzBlock_SetHasUnpackSize(&block); + } + */ + + if (outStream) + { + RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); + } + + checkInStream.vt.Read = SeqCheckInStream_Read; + SeqCheckInStream_Init(&checkInStream, props->checkId); + + checkInStream.realStream = inStream; + checkInStream.data = inBuf; + checkInStream.limit = props->blockSize; + if (!inStream) + checkInStream.limit = inBufSize; + + if (fp) + { + #ifdef USE_SUBBLOCK + if (fp->id == XZ_ID_Subblock) + { + lzmaf->sb.inStream = &checkInStream.vt; + RINOK(SbEncInStream_Init(&lzmaf->sb)); + } + else + #endif + { + lzmaf->filter.realStream = &checkInStream.vt; + RINOK(SeqInFilter_Init(&lzmaf->filter, filter, alloc)); + } + } + + { + SRes res; + Byte *outBuf = NULL; + size_t outSize = 0; + BoolInt useStream = (fp || inStream); + // useStream = True; + + if (!useStream) + { + XzCheck_Update(&checkInStream.check, inBuf, inBufSize); + checkInStream.processed = inBufSize; + } + + if (!outStream) + { + outBuf = seqSizeOutStream.outBuf; // + (size_t)seqSizeOutStream.processed; + outSize = seqSizeOutStream.outBufLimit; // - (size_t)seqSizeOutStream.processed; + } + + res = Lzma2Enc_Encode2(lzmaf->lzma2, + outBuf ? NULL : &seqSizeOutStream.vt, + outBuf, + outBuf ? &outSize : NULL, + + useStream ? + (fp ? + ( + #ifdef USE_SUBBLOCK + (fp->id == XZ_ID_Subblock) ? &lzmaf->sb.vt: + #endif + &lzmaf->filter.p) : + &checkInStream.vt) : NULL, + + useStream ? NULL : inBuf, + useStream ? 0 : inBufSize, + + progress); + + if (outBuf) + seqSizeOutStream.processed += outSize; + + RINOK(res); + blockSizes->unpackSize = checkInStream.processed; + } + { + Byte buf[4 + 64]; + unsigned padSize = XZ_GET_PAD_SIZE(seqSizeOutStream.processed); + UInt64 packSize = seqSizeOutStream.processed; + + buf[0] = 0; + buf[1] = 0; + buf[2] = 0; + buf[3] = 0; + + SeqCheckInStream_GetDigest(&checkInStream, buf + 4); + RINOK(WriteBytes(&seqSizeOutStream.vt, buf + (4 - padSize), padSize + XzFlags_GetCheckSize((CXzStreamFlags)props->checkId))); + + blockSizes->totalSize = seqSizeOutStream.processed - padSize; + + if (!outStream) + { + seqSizeOutStream.outBuf = outBufHeader; + seqSizeOutStream.outBufLimit = XZ_BLOCK_HEADER_SIZE_MAX; + seqSizeOutStream.processed = 0; + + block.unpackSize = blockSizes->unpackSize; + XzBlock_SetHasUnpackSize(&block); + + block.packSize = packSize; + XzBlock_SetHasPackSize(&block); + + RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.vt)); + + blockSizes->headerSize = (size_t)seqSizeOutStream.processed; + blockSizes->totalSize += seqSizeOutStream.processed; + } + } + + if (inStream) + *inStreamFinished = checkInStream.realStreamFinished; + else + { + *inStreamFinished = False; + if (checkInStream.processed != inBufSize) + return SZ_ERROR_FAIL; + } + + return SZ_OK; +} + + + +typedef struct +{ + ICompressProgress vt; + ICompressProgress *progress; + UInt64 inOffset; + UInt64 outOffset; +} CCompressProgress_XzEncOffset; + + +static SRes CompressProgress_XzEncOffset_Progress(const ICompressProgress *pp, UInt64 inSize, UInt64 outSize) +{ + const CCompressProgress_XzEncOffset *p = CONTAINER_FROM_VTBL(pp, CCompressProgress_XzEncOffset, vt); + inSize += p->inOffset; + outSize += p->outOffset; + return ICompressProgress_Progress(p->progress, inSize, outSize); +} + + + + +typedef struct +{ + ISzAllocPtr alloc; + ISzAllocPtr allocBig; + + CXzProps xzProps; + UInt64 expectedDataSize; + + CXzEncIndex xzIndex; + + CLzma2WithFilters lzmaf_Items[MTCODER__THREADS_MAX]; + + size_t outBufSize; /* size of allocated outBufs[i] */ + Byte *outBufs[MTCODER__BLOCKS_MAX]; + + #ifndef _7ZIP_ST + unsigned checkType; + ISeqOutStream *outStream; + BoolInt mtCoder_WasConstructed; + CMtCoder mtCoder; + CXzEncBlockInfo EncBlocks[MTCODER__BLOCKS_MAX]; + #endif + +} CXzEnc; + + +static void XzEnc_Construct(CXzEnc *p) +{ + unsigned i; + + XzEncIndex_Construct(&p->xzIndex); + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + Lzma2WithFilters_Construct(&p->lzmaf_Items[i]); + + #ifndef _7ZIP_ST + p->mtCoder_WasConstructed = False; + { + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + p->outBufs[i] = NULL; + p->outBufSize = 0; + } + #endif +} + + +static void XzEnc_FreeOutBufs(CXzEnc *p) +{ + unsigned i; + for (i = 0; i < MTCODER__BLOCKS_MAX; i++) + if (p->outBufs[i]) + { + ISzAlloc_Free(p->alloc, p->outBufs[i]); + p->outBufs[i] = NULL; + } + p->outBufSize = 0; +} + + +static void XzEnc_Free(CXzEnc *p, ISzAllocPtr alloc) +{ + unsigned i; + + XzEncIndex_Free(&p->xzIndex, alloc); + + for (i = 0; i < MTCODER__THREADS_MAX; i++) + Lzma2WithFilters_Free(&p->lzmaf_Items[i], alloc); + + #ifndef _7ZIP_ST + if (p->mtCoder_WasConstructed) + { + MtCoder_Destruct(&p->mtCoder); + p->mtCoder_WasConstructed = False; + } + XzEnc_FreeOutBufs(p); + #endif +} + + +CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig) +{ + CXzEnc *p = (CXzEnc *)ISzAlloc_Alloc(alloc, sizeof(CXzEnc)); + if (!p) + return NULL; + XzEnc_Construct(p); + XzProps_Init(&p->xzProps); + XzProps_Normalize(&p->xzProps); + p->expectedDataSize = (UInt64)(Int64)-1; + p->alloc = alloc; + p->allocBig = allocBig; + return p; +} + + +void XzEnc_Destroy(CXzEncHandle pp) +{ + CXzEnc *p = (CXzEnc *)pp; + XzEnc_Free(p, p->alloc); + ISzAlloc_Free(p->alloc, p); +} + + +SRes XzEnc_SetProps(CXzEncHandle pp, const CXzProps *props) +{ + CXzEnc *p = (CXzEnc *)pp; + p->xzProps = *props; + XzProps_Normalize(&p->xzProps); + return SZ_OK; +} + + +void XzEnc_SetDataSize(CXzEncHandle pp, UInt64 expectedDataSiize) +{ + CXzEnc *p = (CXzEnc *)pp; + p->expectedDataSize = expectedDataSiize; +} + + + + +#ifndef _7ZIP_ST + +static SRes XzEnc_MtCallback_Code(void *pp, unsigned coderIndex, unsigned outBufIndex, + const Byte *src, size_t srcSize, int finished) +{ + CXzEnc *me = (CXzEnc *)pp; + SRes res; + CMtProgressThunk progressThunk; + + Byte *dest = me->outBufs[outBufIndex]; + + UNUSED_VAR(finished) + + { + CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; + bInfo->totalSize = 0; + bInfo->unpackSize = 0; + bInfo->headerSize = 0; + } + + if (!dest) + { + dest = (Byte *)ISzAlloc_Alloc(me->alloc, me->outBufSize); + if (!dest) + return SZ_ERROR_MEM; + me->outBufs[outBufIndex] = dest; + } + + MtProgressThunk_CreateVTable(&progressThunk); + progressThunk.mtProgress = &me->mtCoder.mtProgress; + MtProgressThunk_Init(&progressThunk); + + { + CXzEncBlockInfo blockSizes; + int inStreamFinished; + + res = Xz_CompressBlock( + &me->lzmaf_Items[coderIndex], + + NULL, + dest, + dest + XZ_BLOCK_HEADER_SIZE_MAX, me->outBufSize - XZ_BLOCK_HEADER_SIZE_MAX, + + NULL, + // srcSize, // expectedSize + src, srcSize, + + &me->xzProps, + &progressThunk.vt, + &inStreamFinished, + &blockSizes, + me->alloc, + me->allocBig); + + if (res == SZ_OK) + me->EncBlocks[outBufIndex] = blockSizes; + + return res; + } +} + + +static SRes XzEnc_MtCallback_Write(void *pp, unsigned outBufIndex) +{ + CXzEnc *me = (CXzEnc *)pp; + + const CXzEncBlockInfo *bInfo = &me->EncBlocks[outBufIndex]; + const Byte *data = me->outBufs[outBufIndex]; + + RINOK(WriteBytes(me->outStream, data, bInfo->headerSize)); + + { + UInt64 totalPackFull = bInfo->totalSize + XZ_GET_PAD_SIZE(bInfo->totalSize); + RINOK(WriteBytes(me->outStream, data + XZ_BLOCK_HEADER_SIZE_MAX, (size_t)totalPackFull - bInfo->headerSize)); + } + + return XzEncIndex_AddIndexRecord(&me->xzIndex, bInfo->unpackSize, bInfo->totalSize, me->alloc); +} + +#endif + + + +SRes XzEnc_Encode(CXzEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress) +{ + CXzEnc *p = (CXzEnc *)pp; + + const CXzProps *props = &p->xzProps; + + XzEncIndex_Init(&p->xzIndex); + { + UInt64 numBlocks = 1; + UInt64 blockSize = props->blockSize; + + if (blockSize != XZ_PROPS__BLOCK_SIZE__SOLID + && props->reduceSize != (UInt64)(Int64)-1) + { + numBlocks = props->reduceSize / blockSize; + if (numBlocks * blockSize != props->reduceSize) + numBlocks++; + } + else + blockSize = (UInt64)1 << 62; + + RINOK(XzEncIndex_PreAlloc(&p->xzIndex, numBlocks, blockSize, XZ_GET_ESTIMATED_BLOCK_TOTAL_PACK_SIZE(blockSize), p->alloc)); + } + + RINOK(Xz_WriteHeader((CXzStreamFlags)props->checkId, outStream)); + + + #ifndef _7ZIP_ST + if (props->numBlockThreads_Reduced > 1) + { + IMtCoderCallback2 vt; + + if (!p->mtCoder_WasConstructed) + { + p->mtCoder_WasConstructed = True; + MtCoder_Construct(&p->mtCoder); + } + + vt.Code = XzEnc_MtCallback_Code; + vt.Write = XzEnc_MtCallback_Write; + + p->checkType = props->checkId; + p->xzProps = *props; + + p->outStream = outStream; + + p->mtCoder.allocBig = p->allocBig; + p->mtCoder.progress = progress; + p->mtCoder.inStream = inStream; + p->mtCoder.inData = NULL; + p->mtCoder.inDataSize = 0; + p->mtCoder.mtCallback = &vt; + p->mtCoder.mtCallbackObject = p; + + if ( props->blockSize == XZ_PROPS__BLOCK_SIZE__SOLID + || props->blockSize == XZ_PROPS__BLOCK_SIZE__AUTO) + return SZ_ERROR_FAIL; + + p->mtCoder.blockSize = (size_t)props->blockSize; + if (p->mtCoder.blockSize != props->blockSize) + return SZ_ERROR_PARAM; /* SZ_ERROR_MEM */ + + { + size_t destBlockSize = XZ_BLOCK_HEADER_SIZE_MAX + XZ_GET_MAX_BLOCK_PACK_SIZE(p->mtCoder.blockSize); + if (destBlockSize < p->mtCoder.blockSize) + return SZ_ERROR_PARAM; + if (p->outBufSize != destBlockSize) + XzEnc_FreeOutBufs(p); + p->outBufSize = destBlockSize; + } + + p->mtCoder.numThreadsMax = props->numBlockThreads_Max; + p->mtCoder.expectedDataSize = p->expectedDataSize; + + RINOK(MtCoder_Code(&p->mtCoder)); + } + else + #endif + { + int writeStartSizes; + CCompressProgress_XzEncOffset progress2; + Byte *bufData = NULL; + size_t bufSize = 0; + + progress2.vt.Progress = CompressProgress_XzEncOffset_Progress; + progress2.inOffset = 0; + progress2.outOffset = 0; + progress2.progress = progress; + + writeStartSizes = 0; + + if (props->blockSize != XZ_PROPS__BLOCK_SIZE__SOLID) + { + writeStartSizes = (props->forceWriteSizesInHeader > 0); + + if (writeStartSizes) + { + size_t t2; + size_t t = (size_t)props->blockSize; + if (t != props->blockSize) + return SZ_ERROR_PARAM; + t = XZ_GET_MAX_BLOCK_PACK_SIZE(t); + if (t < props->blockSize) + return SZ_ERROR_PARAM; + t2 = XZ_BLOCK_HEADER_SIZE_MAX + t; + if (!p->outBufs[0] || t2 != p->outBufSize) + { + XzEnc_FreeOutBufs(p); + p->outBufs[0] = (Byte *)ISzAlloc_Alloc(p->alloc, t2); + if (!p->outBufs[0]) + return SZ_ERROR_MEM; + p->outBufSize = t2; + } + bufData = p->outBufs[0] + XZ_BLOCK_HEADER_SIZE_MAX; + bufSize = t; + } + } + + for (;;) + { + CXzEncBlockInfo blockSizes; + int inStreamFinished; + + /* + UInt64 rem = (UInt64)(Int64)-1; + if (props->reduceSize != (UInt64)(Int64)-1 + && props->reduceSize >= progress2.inOffset) + rem = props->reduceSize - progress2.inOffset; + */ + + blockSizes.headerSize = 0; // for GCC + + RINOK(Xz_CompressBlock( + &p->lzmaf_Items[0], + + writeStartSizes ? NULL : outStream, + writeStartSizes ? p->outBufs[0] : NULL, + bufData, bufSize, + + inStream, + // rem, + NULL, 0, + + props, + progress ? &progress2.vt : NULL, + &inStreamFinished, + &blockSizes, + p->alloc, + p->allocBig)); + + { + UInt64 totalPackFull = blockSizes.totalSize + XZ_GET_PAD_SIZE(blockSizes.totalSize); + + if (writeStartSizes) + { + RINOK(WriteBytes(outStream, p->outBufs[0], blockSizes.headerSize)); + RINOK(WriteBytes(outStream, bufData, (size_t)totalPackFull - blockSizes.headerSize)); + } + + RINOK(XzEncIndex_AddIndexRecord(&p->xzIndex, blockSizes.unpackSize, blockSizes.totalSize, p->alloc)); + + progress2.inOffset += blockSizes.unpackSize; + progress2.outOffset += totalPackFull; + } + + if (inStreamFinished) + break; + } + } + + return XzEncIndex_WriteFooter(&p->xzIndex, (CXzStreamFlags)props->checkId, outStream); +} + + +#include "Alloc.h" + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CXzProps *props, ICompressProgress *progress) +{ + SRes res; + CXzEncHandle xz = XzEnc_Create(&g_Alloc, &g_BigAlloc); + if (!xz) + return SZ_ERROR_MEM; + res = XzEnc_SetProps(xz, props); + if (res == SZ_OK) + res = XzEnc_Encode(xz, outStream, inStream, progress); + XzEnc_Destroy(xz); + return res; +} + + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream) +{ + SRes res; + CXzEncIndex xzIndex; + XzEncIndex_Construct(&xzIndex); + res = Xz_WriteHeader((CXzStreamFlags)0, outStream); + if (res == SZ_OK) + res = XzEncIndex_WriteFooter(&xzIndex, (CXzStreamFlags)0, outStream); + XzEncIndex_Free(&xzIndex, NULL); // g_Alloc + return res; +} diff --git a/bsnes/lzma/XzEnc.h b/bsnes/lzma/XzEnc.h new file mode 100644 index 00000000..529ac3fd --- /dev/null +++ b/bsnes/lzma/XzEnc.h @@ -0,0 +1,60 @@ +/* XzEnc.h -- Xz Encode +2017-06-27 : Igor Pavlov : Public domain */ + +#ifndef __XZ_ENC_H +#define __XZ_ENC_H + +#include "Lzma2Enc.h" + +#include "Xz.h" + +EXTERN_C_BEGIN + + +#define XZ_PROPS__BLOCK_SIZE__AUTO LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO +#define XZ_PROPS__BLOCK_SIZE__SOLID LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID + + +typedef struct +{ + UInt32 id; + UInt32 delta; + UInt32 ip; + int ipDefined; +} CXzFilterProps; + +void XzFilterProps_Init(CXzFilterProps *p); + + +typedef struct +{ + CLzma2EncProps lzma2Props; + CXzFilterProps filterProps; + unsigned checkId; + UInt64 blockSize; + int numBlockThreads_Reduced; + int numBlockThreads_Max; + int numTotalThreads; + int forceWriteSizesInHeader; + UInt64 reduceSize; +} CXzProps; + +void XzProps_Init(CXzProps *p); + + +typedef void * CXzEncHandle; + +CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); +void XzEnc_Destroy(CXzEncHandle p); +SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props); +void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize); +SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CXzProps *props, ICompressProgress *progress); + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream); + +EXTERN_C_END + +#endif diff --git a/bsnes/lzma/XzIn.c b/bsnes/lzma/XzIn.c new file mode 100644 index 00000000..792a6178 --- /dev/null +++ b/bsnes/lzma/XzIn.c @@ -0,0 +1,319 @@ +/* XzIn.c - Xz input +2018-07-04 : Igor Pavlov : Public domain */ + +#include "Precomp.h" + +#include + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" + +/* +#define XZ_FOOTER_SIG_CHECK(p) (memcmp((p), XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) == 0) +*/ +#define XZ_FOOTER_SIG_CHECK(p) ((p)[0] == XZ_FOOTER_SIG_0 && (p)[1] == XZ_FOOTER_SIG_1) + + +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream) +{ + Byte sig[XZ_STREAM_HEADER_SIZE]; + RINOK(SeqInStream_Read2(inStream, sig, XZ_STREAM_HEADER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(sig, XZ_SIG, XZ_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + return Xz_ParseHeader(p, sig); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, BoolInt *isIndex, UInt32 *headerSizeRes) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + unsigned headerSize; + *headerSizeRes = 0; + RINOK(SeqInStream_ReadByte(inStream, &header[0])); + headerSize = (unsigned)header[0]; + if (headerSize == 0) + { + *headerSizeRes = 1; + *isIndex = True; + return SZ_OK; + } + + *isIndex = False; + headerSize = (headerSize << 2) + 4; + *headerSizeRes = headerSize; + RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1)); + return XzBlock_Parse(p, header); +} + +#define ADD_SIZE_CHECK(size, val) \ + { UInt64 newSize = size + (val); if (newSize < size) return XZ_SIZE_OVERFLOW; size = newSize; } + +UInt64 Xz_GetUnpackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECK(size, p->blocks[i].unpackSize); + return size; +} + +UInt64 Xz_GetPackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECK(size, (p->blocks[i].totalSize + 3) & ~(UInt64)3); + return size; +} + +/* +SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream) +{ + return SeqInStream_Read(inStream, p->check, XzFlags_GetCheckSize(f)); +} +*/ + +static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAllocPtr alloc) +{ + size_t numBlocks, pos = 1; + UInt32 crc; + + if (size < 5 || buf[0] != 0) + return SZ_ERROR_ARCHIVE; + + size -= 4; + crc = CrcCalc(buf, size); + if (crc != GetUi32(buf + size)) + return SZ_ERROR_ARCHIVE; + + { + UInt64 numBlocks64; + READ_VARINT_AND_CHECK(buf, pos, size, &numBlocks64); + numBlocks = (size_t)numBlocks64; + if (numBlocks != numBlocks64 || numBlocks * 2 > size) + return SZ_ERROR_ARCHIVE; + } + + Xz_Free(p, alloc); + if (numBlocks != 0) + { + size_t i; + p->numBlocks = numBlocks; + p->blocks = (CXzBlockSizes *)ISzAlloc_Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks); + if (!p->blocks) + return SZ_ERROR_MEM; + for (i = 0; i < numBlocks; i++) + { + CXzBlockSizes *block = &p->blocks[i]; + READ_VARINT_AND_CHECK(buf, pos, size, &block->totalSize); + READ_VARINT_AND_CHECK(buf, pos, size, &block->unpackSize); + if (block->totalSize == 0) + return SZ_ERROR_ARCHIVE; + } + } + while ((pos & 3) != 0) + if (buf[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize, ISzAllocPtr alloc) +{ + SRes res; + size_t size; + Byte *buf; + if (indexSize > ((UInt32)1 << 31)) + return SZ_ERROR_UNSUPPORTED; + size = (size_t)indexSize; + if (size != indexSize) + return SZ_ERROR_UNSUPPORTED; + buf = (Byte *)ISzAlloc_Alloc(alloc, size); + if (!buf) + return SZ_ERROR_MEM; + res = LookInStream_Read2(stream, buf, size, SZ_ERROR_UNSUPPORTED); + if (res == SZ_OK) + res = Xz_ReadIndex2(p, buf, size, alloc); + ISzAlloc_Free(alloc, buf); + return res; +} + +static SRes LookInStream_SeekRead_ForArc(ILookInStream *stream, UInt64 offset, void *buf, size_t size) +{ + RINOK(LookInStream_SeekTo(stream, offset)); + return LookInStream_Read(stream, buf, size); + /* return LookInStream_Read2(stream, buf, size, SZ_ERROR_NO_ARCHIVE); */ +} + +static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAllocPtr alloc) +{ + UInt64 indexSize; + Byte buf[XZ_STREAM_FOOTER_SIZE]; + UInt64 pos = *startOffset; + + if ((pos & 3) != 0 || pos < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + + pos -= XZ_STREAM_FOOTER_SIZE; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); + + if (!XZ_FOOTER_SIG_CHECK(buf + 10)) + { + UInt32 total = 0; + pos += XZ_STREAM_FOOTER_SIZE; + + for (;;) + { + size_t i; + #define TEMP_BUF_SIZE (1 << 10) + Byte temp[TEMP_BUF_SIZE]; + + i = (pos > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)pos; + pos -= i; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, temp, i)); + total += (UInt32)i; + for (; i != 0; i--) + if (temp[i - 1] != 0) + break; + if (i != 0) + { + if ((i & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + pos += i; + break; + } + if (pos < XZ_STREAM_FOOTER_SIZE || total > (1 << 16)) + return SZ_ERROR_NO_ARCHIVE; + } + + if (pos < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + pos -= XZ_STREAM_FOOTER_SIZE; + RINOK(LookInStream_SeekRead_ForArc(stream, pos, buf, XZ_STREAM_FOOTER_SIZE)); + if (!XZ_FOOTER_SIG_CHECK(buf + 10)) + return SZ_ERROR_NO_ARCHIVE; + } + + p->flags = (CXzStreamFlags)GetBe16(buf + 8); + + if (!XzFlags_IsSupported(p->flags)) + return SZ_ERROR_UNSUPPORTED; + + if (GetUi32(buf) != CrcCalc(buf + 4, 6)) + return SZ_ERROR_ARCHIVE; + + indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2; + + if (pos < indexSize) + return SZ_ERROR_ARCHIVE; + + pos -= indexSize; + RINOK(LookInStream_SeekTo(stream, pos)); + RINOK(Xz_ReadIndex(p, stream, indexSize, alloc)); + + { + UInt64 totalSize = Xz_GetPackSize(p); + if (totalSize == XZ_SIZE_OVERFLOW + || totalSize >= ((UInt64)1 << 63) + || pos < totalSize + XZ_STREAM_HEADER_SIZE) + return SZ_ERROR_ARCHIVE; + pos -= (totalSize + XZ_STREAM_HEADER_SIZE); + RINOK(LookInStream_SeekTo(stream, pos)); + *startOffset = pos; + } + { + CXzStreamFlags headerFlags; + CSecToRead secToRead; + SecToRead_CreateVTable(&secToRead); + secToRead.realStream = stream; + + RINOK(Xz_ReadHeader(&headerFlags, &secToRead.vt)); + return (p->flags == headerFlags) ? SZ_OK : SZ_ERROR_ARCHIVE; + } +} + + +/* ---------- Xz Streams ---------- */ + +void Xzs_Construct(CXzs *p) +{ + p->num = p->numAllocated = 0; + p->streams = 0; +} + +void Xzs_Free(CXzs *p, ISzAllocPtr alloc) +{ + size_t i; + for (i = 0; i < p->num; i++) + Xz_Free(&p->streams[i], alloc); + ISzAlloc_Free(alloc, p->streams); + p->num = p->numAllocated = 0; + p->streams = 0; +} + +UInt64 Xzs_GetNumBlocks(const CXzs *p) +{ + UInt64 num = 0; + size_t i; + for (i = 0; i < p->num; i++) + num += p->streams[i].numBlocks; + return num; +} + +UInt64 Xzs_GetUnpackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECK(size, Xz_GetUnpackSize(&p->streams[i])); + return size; +} + +/* +UInt64 Xzs_GetPackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECK(size, Xz_GetTotalSize(&p->streams[i])); + return size; +} +*/ + +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompressProgress *progress, ISzAllocPtr alloc) +{ + Int64 endOffset = 0; + RINOK(ILookInStream_Seek(stream, &endOffset, SZ_SEEK_END)); + *startOffset = endOffset; + for (;;) + { + CXzStream st; + SRes res; + Xz_Construct(&st); + res = Xz_ReadBackward(&st, stream, startOffset, alloc); + st.startOffset = *startOffset; + RINOK(res); + if (p->num == p->numAllocated) + { + size_t newNum = p->num + p->num / 4 + 1; + Byte *data = (Byte *)ISzAlloc_Alloc(alloc, newNum * sizeof(CXzStream)); + if (!data) + return SZ_ERROR_MEM; + p->numAllocated = newNum; + if (p->num != 0) + memcpy(data, p->streams, p->num * sizeof(CXzStream)); + ISzAlloc_Free(alloc, p->streams); + p->streams = (CXzStream *)data; + } + p->streams[p->num++] = st; + if (*startOffset == 0) + break; + RINOK(LookInStream_SeekTo(stream, *startOffset)); + if (progress && ICompressProgress_Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK) + return SZ_ERROR_PROGRESS; + } + return SZ_OK; +} diff --git a/bsnes/lzma/lzma.cpp b/bsnes/lzma/lzma.cpp new file mode 100644 index 00000000..f002e9f4 --- /dev/null +++ b/bsnes/lzma/lzma.cpp @@ -0,0 +1,81 @@ +#include + +#include "7zAlloc.c" +#include "7zArcIn.c" +#include "7zBuf.c" +#include "7zCrc.c" +#include "7zCrcOpt.c" +#include "7zDec.c" +#include "7zFile.c" +#include "7zStream.c" +#include "Bcj2.c" +#include "Bra.c" +#include "Bra86.c" +#include "BraIA64.c" +#include "CpuArch.c" +#include "Delta.c" +#undef kBitModelTotal +#undef kTopValue +#include "LzmaDec.c" +#include "Lzma2Dec.c" +#define kInputBufSize ((size_t)1 << 18) + +namespace LZMA { + +auto extract(string_view filename) -> vector { + vector result; + + static bool initialized = false; + if(!initialized) { + initialized = true; + CrcGenerateTable(); + } + + static ISzAlloc allocate = {SzAlloc, SzFree}; + static ISzAlloc allocateTemporary = {SzAllocTemp, SzFreeTemp}; + + CFileInStream archive; + #if defined(PLATFORM_WINDOWS) + if(InFile_OpenW(&archive.file, (const wchar_t*)utf16_t(filename)) != SZ_OK) return result; + #else + if(InFile_Open(&archive.file, (const char*)filename) != SZ_OK) return result; + #endif + FileInStream_CreateVTable(&archive); + + CLookToRead2 look; + LookToRead2_CreateVTable(&look, false); + look.buf = (Byte*)ISzAlloc_Alloc(&allocate, kInputBufSize); + look.bufSize = kInputBufSize; + look.realStream = &archive.vt; + LookToRead2_Init(&look); + + CSzArEx db; + SzArEx_Init(&db); + if(SzArEx_Open(&db, &look.vt, &allocate, &allocateTemporary) != SZ_OK || db.NumFiles == 0) { + SzArEx_Free(&db, &allocate); + return result; + } + + for(uint index : range(db.NumFiles)) { + if(SzArEx_IsDir(&db, index)) continue; + + UInt32 blockIndex = -1; + Byte* filedata = nullptr; + size_t filesize = 0; + size_t offset = 0; + size_t count = 0; + if(SzArEx_Extract(&db, &look.vt, index, &blockIndex, + &filedata, &filesize, &offset, &count, &allocate, &allocateTemporary + ) == SZ_OK) { + result.resize(filesize); + memory::copy(result.data(), filedata, filesize); + ISzAlloc_Free(&allocate, filedata); + break; + } + } + + SzArEx_Free(&db, &allocate); + return result; +} + +} diff --git a/bsnes/lzma/lzma.hpp b/bsnes/lzma/lzma.hpp new file mode 100644 index 00000000..a0178829 --- /dev/null +++ b/bsnes/lzma/lzma.hpp @@ -0,0 +1,7 @@ +#pragma once + +namespace LZMA { + +auto extract(string_view filename) -> vector; + +} diff --git a/bsnes/sfc/ppu-fast/line.cpp b/bsnes/sfc/ppu-fast/line.cpp index ec417f4b..3b2fb785 100644 --- a/bsnes/sfc/ppu-fast/line.cpp +++ b/bsnes/sfc/ppu-fast/line.cpp @@ -47,18 +47,26 @@ auto PPUfast::Line::render() -> void { renderWindow(io.col.window, io.col.window.aboveMask, windowAbove); renderWindow(io.col.window, io.col.window.belowMask, windowBelow); - auto luma = io.displayBrightness << 15; + auto luma = ppufast.lightTable[io.displayBrightness]; + uint curr = 0, prev = 0; if(hd) for(uint x : range(256 * scale * scale)) { - *output++ = luma | pixel(x / scale & 255, above[x], below[x]); + *output++ = luma[pixel(x / scale & 255, above[x], below[x])]; } else if(width == 256) for(uint x : range(256)) { - *output++ = luma | pixel(x, above[x], below[x]); + *output++ = luma[pixel(x, above[x], below[x])]; } else if(!hires) for(uint x : range(256)) { - auto color = luma | pixel(x, above[x], below[x]); + auto color = luma[pixel(x, above[x], below[x])]; *output++ = color; *output++ = color; + } else if(!configuration.video.blurEmulation) for(uint x : range(256)) { + *output++ = luma[pixel(x, below[x], above[x])]; + *output++ = luma[pixel(x, above[x], below[x])]; } else for(uint x : range(256)) { - *output++ = luma | pixel(x, below[x], above[x]); - *output++ = luma | pixel(x, above[x], below[x]); + curr = luma[pixel(x, below[x], above[x])]; + *output++ = (prev + curr - ((prev ^ curr) & 0x0421)) >> 1; + prev = curr; + curr = luma[pixel(x, above[x], below[x])]; + *output++ = (prev + curr - ((prev ^ curr) & 0x0421)) >> 1; + prev = curr; } } diff --git a/bsnes/sfc/ppu-fast/ppu.cpp b/bsnes/sfc/ppu-fast/ppu.cpp index 9b22f747..3583ca6f 100644 --- a/bsnes/sfc/ppu-fast/ppu.cpp +++ b/bsnes/sfc/ppu-fast/ppu.cpp @@ -26,7 +26,22 @@ auto PPUfast::hdSupersample() const -> bool { return configuration.hacks.ppu.mod auto PPUfast::hdMosaic() const -> bool { return configuration.hacks.ppu.mode7.mosaic; } PPUfast::PPUfast() { - output = new uint32[2304 * 2304] + 72 * 2304; //overscan offset + output = new uint16[2304 * 2304] + 72 * 2304; //overscan offset + + for(uint l : range(16)) { + for(uint r : range(32)) { + for(uint g : range(32)) { + for(uint b : range(32)) { + double luma = (double)l / 15.0; + uint ar = (luma * r + 0.5); + uint ag = (luma * g + 0.5); + uint ab = (luma * b + 0.5); + lightTable[l][(r << 10) + (g << 5) + b] = (ab << 10) + (ag << 5) + ar; + } + } + } + } + tilecache[TileMode::BPP2] = new uint8[4096 * 8 * 8]; tilecache[TileMode::BPP4] = new uint8[2048 * 8 * 8]; tilecache[TileMode::BPP8] = new uint8[1024 * 8 * 8]; @@ -116,8 +131,7 @@ auto PPUfast::refresh() -> void { width = 256 * hdScale(); height = 240 * hdScale(); } - Emulator::video.setEffect(Emulator::Video::Effect::ColorBleed, configuration.video.blurEmulation && hires()); - Emulator::video.refresh(output, pitch * sizeof(uint32), width, height); + platform->videoFrame(output, pitch * sizeof(uint16), width, height); } if(system.frameCounter++ >= system.frameSkip) system.frameCounter = 0; } @@ -129,7 +143,7 @@ auto PPUfast::load() -> bool { auto PPUfast::power(bool reset) -> void { create(Enter, system.cpuFrequency()); PPUcounter::reset(); - memory::fill(output, 1024 * 960); + memory::fill(output, 1024 * 960); function uint8> reader{&PPUfast::readIO, this}; function void> writer{&PPUfast::writeIO, this}; diff --git a/bsnes/sfc/ppu-fast/ppu.hpp b/bsnes/sfc/ppu-fast/ppu.hpp index 255795f0..b903955d 100644 --- a/bsnes/sfc/ppu-fast/ppu.hpp +++ b/bsnes/sfc/ppu-fast/ppu.hpp @@ -262,7 +262,8 @@ public: Object objects[128]; //[unserialized] - uint32* output; + uint16* output; + uint16 lightTable[16][32768]; uint8* tilecache[3]; //bitplane -> bitmap tiledata uint32 ItemLimit; uint32 TileLimit; diff --git a/bsnes/sfc/ppu/ppu.cpp b/bsnes/sfc/ppu/ppu.cpp index 3e4117bb..a0124e83 100644 --- a/bsnes/sfc/ppu/ppu.cpp +++ b/bsnes/sfc/ppu/ppu.cpp @@ -20,8 +20,22 @@ bg4(Background::ID::BG4) { ppu1.version = 1; //allowed values: 1 ppu2.version = 3; //allowed values: 1, 2, 3 - output = new uint32[512 * 512]; + output = new uint16[512 * 512]; output += 16 * 512; //overscan offset + + for(uint l = 0; l < 16; l++) { + for(uint r = 0; r < 32; r++) { + for(uint g = 0; g < 32; g++) { + for(uint b = 0; b < 32; b++) { + double luma = (double)l / 15.0; + uint ar = (luma * r + 0.5); + uint ag = (luma * g + 0.5); + uint ab = (luma * b + 0.5); + lightTable[l][(r << 10) + (g << 5) + b] = (ab << 10) + (ag << 5) + ar; + } + } + } + } } PPU::~PPU() { @@ -101,7 +115,7 @@ auto PPU::power(bool reset) -> void { create(Enter, system.cpuFrequency()); PPUcounter::reset(); - memory::fill(output, 512 * 480); + memory::fill(output, 512 * 480); function uint8> reader{&PPU::readIO, this}; function void> writer{&PPU::writeIO, this}; @@ -243,8 +257,8 @@ auto PPU::refresh() -> void { auto pitch = 512; auto width = 512; auto height = 480; - Emulator::video.setEffect(Emulator::Video::Effect::ColorBleed, configuration.video.blurEmulation); - Emulator::video.refresh(output, pitch * sizeof(uint32), width, height); +//Emulator::video.setEffect(Emulator::Video::Effect::ColorBleed, configuration.video.blurEmulation); + platform->videoFrame(output, pitch * sizeof(uint16), width, height); } } diff --git a/bsnes/sfc/ppu/ppu.hpp b/bsnes/sfc/ppu/ppu.hpp index 3fbba549..37e1ba25 100644 --- a/bsnes/sfc/ppu/ppu.hpp +++ b/bsnes/sfc/ppu/ppu.hpp @@ -40,7 +40,8 @@ private: uint16 mask = 0x7fff; } vram; - uint32* output = nullptr; + uint16* output = nullptr; + uint16 lightTable[16][32768]; struct { bool interlace; diff --git a/bsnes/sfc/ppu/screen.cpp b/bsnes/sfc/ppu/screen.cpp index 5cfe37f9..f6499908 100644 --- a/bsnes/sfc/ppu/screen.cpp +++ b/bsnes/sfc/ppu/screen.cpp @@ -23,8 +23,8 @@ auto PPU::Screen::run() -> void { auto belowColor = below(hires); auto aboveColor = above(); - *lineA++ = *lineB++ = ppu.io.displayBrightness << 15 | (hires ? belowColor : aboveColor); - *lineA++ = *lineB++ = ppu.io.displayBrightness << 15 | (aboveColor); + *lineA++ = *lineB++ = ppu.lightTable[ppu.io.displayBrightness][(hires ? belowColor : aboveColor)]; + *lineA++ = *lineB++ = ppu.lightTable[ppu.io.displayBrightness][(aboveColor)]; } auto PPU::Screen::below(bool hires) -> uint16 { diff --git a/bsnes/sfc/ppu/screen.hpp b/bsnes/sfc/ppu/screen.hpp index 5a886477..13ea8174 100644 --- a/bsnes/sfc/ppu/screen.hpp +++ b/bsnes/sfc/ppu/screen.hpp @@ -13,8 +13,8 @@ struct Screen { auto serialize(serializer&) -> void; - uint32* lineA; - uint32* lineB; + uint16* lineA; + uint16* lineB; uint15 cgram[256]; diff --git a/bsnes/systems/Game Boy Color.sys/boot.rom b/bsnes/systems/Game Boy Color.sys/boot.rom deleted file mode 100644 index 2aea3d92..00000000 Binary files a/bsnes/systems/Game Boy Color.sys/boot.rom and /dev/null differ diff --git a/bsnes/systems/Game Boy Color.sys/manifest.bml b/bsnes/systems/Game Boy Color.sys/manifest.bml deleted file mode 100644 index 48e7837d..00000000 --- a/bsnes/systems/Game Boy Color.sys/manifest.bml +++ /dev/null @@ -1,3 +0,0 @@ -system name:Game Boy Color - cpu - rom name=boot.rom size=2048 diff --git a/bsnes/systems/Game Boy.sys/boot.rom b/bsnes/systems/Game Boy.sys/boot.rom deleted file mode 100644 index afa0ee47..00000000 Binary files a/bsnes/systems/Game Boy.sys/boot.rom and /dev/null differ diff --git a/bsnes/systems/Game Boy.sys/manifest.bml b/bsnes/systems/Game Boy.sys/manifest.bml deleted file mode 100644 index 11182de0..00000000 --- a/bsnes/systems/Game Boy.sys/manifest.bml +++ /dev/null @@ -1,3 +0,0 @@ -system name:Game Boy - cpu - rom name=boot.rom size=256 diff --git a/bsnes/target-bsnes/GNUmakefile b/bsnes/target-bsnes/GNUmakefile index ea2aec4e..fdf1aae2 100644 --- a/bsnes/target-bsnes/GNUmakefile +++ b/bsnes/target-bsnes/GNUmakefile @@ -45,11 +45,14 @@ else ifneq ($(filter $(platform),linux bsd),) mkdir -p $(prefix)/share/applications/ mkdir -p $(prefix)/share/icons/ mkdir -p $(prefix)/share/$(name)/ - mkdir -p $(prefix)/share/$(name)/locales/ + mkdir -p $(prefix)/share/$(name)/Database/ + mkdir -p $(prefix)/share/$(name)/Locale/ cp out/$(name) $(prefix)/bin/$(name) - cp $(ui)/resource/locales/* $(prefix)/share/$(name)/locales/ cp $(ui)/resource/$(name).desktop $(prefix)/share/applications/$(name).desktop cp $(ui)/resource/$(name).png $(prefix)/share/icons/$(name).png + cp Database/* $(prefix)/share/$(name)/Database/ + cp ../icarus/Database/* $(prefix)/share/$(name)/Database/ + cp Locale/* $(prefix)/share/$(name)/Locale/ endif uninstall: @@ -62,4 +65,5 @@ else ifneq ($(filter $(platform),linux bsd),) rm -f $(prefix)/bin/$(name) rm -f $(prefix)/share/applications/$(name).desktop rm -f $(prefix)/share/icons/$(name).png + rm -rf $(prefix)/share/$(name) endif diff --git a/bsnes/target-bsnes/bsnes.cpp b/bsnes/target-bsnes/bsnes.cpp index 00317843..bd32ef35 100644 --- a/bsnes/target-bsnes/bsnes.cpp +++ b/bsnes/target-bsnes/bsnes.cpp @@ -9,11 +9,6 @@ auto locate(string name) -> string { string location = {Path::program(), name}; if(inode::exists(location)) return location; - if(name.beginsWith("database/")) { - location = {Path::userData(), "icarus/", name}; - if(inode::exists(location)) return location; - } - directory::create({Path::userData(), "bsnes/"}); return {Path::userData(), "bsnes/", name}; } @@ -26,7 +21,7 @@ auto nall::main(Arguments arguments) -> void { if(argument == "--fullscreen") { presentation.startFullScreen = true; } else if(argument.beginsWith("--locale=")) { - Application::locale().scan(locate("locales/")); + Application::locale().scan(locate("Locale/")); Application::locale().select(argument.trimLeft("--locale=", 1L)); } else if(argument.beginsWith("--settings=")) { settings.location = argument.trimLeft("--settings=", 1L); @@ -44,7 +39,19 @@ auto nall::main(Arguments arguments) -> void { Application::setName("bsnes"); Application::setScreenSaver(settings.general.screenSaver); Application::setToolTips(settings.general.toolTips); + Instances::presentation.construct(); + Instances::settingsWindow.construct(); + Instances::cheatDatabase.construct(); + Instances::cheatWindow.construct(); + Instances::stateWindow.construct(); + Instances::toolsWindow.construct(); emulator = new SuperFamicom::Interface; program.create(); Application::run(); + Instances::presentation.destruct(); + Instances::settingsWindow.destruct(); + Instances::cheatDatabase.destruct(); + Instances::cheatWindow.destruct(); + Instances::stateWindow.destruct(); + Instances::toolsWindow.destruct(); } diff --git a/bsnes/target-bsnes/bsnes.hpp b/bsnes/target-bsnes/bsnes.hpp index ae230649..db60b679 100644 --- a/bsnes/target-bsnes/bsnes.hpp +++ b/bsnes/target-bsnes/bsnes.hpp @@ -10,6 +10,10 @@ using namespace hiro; #include extern unique_pointer emulator; +#include +#include + +#include #include #include #include diff --git a/bsnes/target-bsnes/input/hotkeys.cpp b/bsnes/target-bsnes/input/hotkeys.cpp index 23d03e88..ae5d0f53 100644 --- a/bsnes/target-bsnes/input/hotkeys.cpp +++ b/bsnes/target-bsnes/input/hotkeys.cpp @@ -44,7 +44,7 @@ auto InputManager::bindHotkeys() -> void { })); hotkeys.append(InputHotkey("Fast Forward").onPress([] { - emulator->setFrameSkip(9); + emulator->setFrameSkip(emulator->configuration("Hacks/PPU/Fast") == "true" && settings.video.fastForwardFrameSkip ? 9 : 0); video.setBlocking(false); audio.setBlocking(false); audio.setDynamic(false); diff --git a/bsnes/target-bsnes/presentation/presentation.cpp b/bsnes/target-bsnes/presentation/presentation.cpp index 20d16eda..c6ac6360 100644 --- a/bsnes/target-bsnes/presentation/presentation.cpp +++ b/bsnes/target-bsnes/presentation/presentation.cpp @@ -1,5 +1,6 @@ #include "../bsnes.hpp" -Presentation presentation; +namespace Instances { Instance presentation; } +Presentation& presentation = Instances::presentation(); auto Presentation::create() -> void { systemMenu.setText(tr("System")); @@ -26,15 +27,15 @@ auto Presentation::create() -> void { outputMenu.setIcon(Icon::Emblem::Image).setText("Output"); centerViewport.setText("Center").onActivate([&] { settings.video.output = "Center"; - resizeViewport(); + video.clear(); }); scaleViewport.setText("Scale").onActivate([&] { settings.video.output = "Scale"; - resizeViewport(); + video.clear(); }); stretchViewport.setText("Stretch").onActivate([&] { settings.video.output = "Stretch"; - resizeViewport(); + video.clear(); }); if(settings.video.output == "Center") centerViewport.setChecked(); if(settings.video.output == "Scale") scaleViewport.setChecked(); @@ -51,6 +52,37 @@ auto Presentation::create() -> void { settings.video.blur = blurEmulation.checked(); emulator->configure("Video/BlurEmulation", blurEmulation.checked()); }).doToggle(); + filterMenu.setIcon(Icon::Emblem::Image).setText("Filter"); + filterNone.setText("None").onActivate([&] { settings.video.filter = "None"; }); + filterScanlinesLight.setText("Scanlines (66%)").onActivate([&] { settings.video.filter = "Scanlines (66%)"; }); + filterScanlinesDark.setText("Scanlines (33%)").onActivate([&] { settings.video.filter = "Scanlines (33%)"; }); + filterScanlinesBlack.setText("Scanlines (0%)").onActivate([&] { settings.video.filter = "Scanlines (0%)"; }); + filterPixellate2x.setText("Pixellate2x").onActivate([&] { settings.video.filter = "Pixellate2x"; }); + filterScale2x.setText("Scale2x").onActivate([&] { settings.video.filter = "Scale2x"; }); + filter2xSaI.setText("2xSaI").onActivate([&] { settings.video.filter = "2xSaI"; }); + filterSuper2xSaI.setText("Super 2xSaI").onActivate([&] { settings.video.filter = "Super 2xSaI"; }); + filterSuperEagle.setText("Super Eagle").onActivate([&] { settings.video.filter = "Super Eagle"; }); + filterLQ2x.setText("LQ2x").onActivate([&] { settings.video.filter = "LQ2x"; }); + filterHQ2x.setText("HQ2x").onActivate([&] { settings.video.filter = "HQ2x"; }); + filterNTSC_RF.setText("NTSC (RF)").onActivate([&] { settings.video.filter = "NTSC (RF)"; }); + filterNTSC_Composite.setText("NTSC (Composite)").onActivate([&] { settings.video.filter = "NTSC (Composite)"; }); + filterNTSC_SVideo.setText("NTSC (S-Video)").onActivate([&] { settings.video.filter = "NTSC (S-Video)"; }); + filterNTSC_RGB.setText("NTSC (RGB)").onActivate([&] { settings.video.filter = "NTSC (RGB)"; }); + if(settings.video.filter == "None") filterNone.setChecked(); + if(settings.video.filter == "Scanlines (66%)") filterScanlinesLight.setChecked(); + if(settings.video.filter == "Scanlines (33%)") filterScanlinesDark.setChecked(); + if(settings.video.filter == "Scanlines (0%)") filterScanlinesBlack.setChecked(); + if(settings.video.filter == "Pixellate2x") filterPixellate2x.setChecked(); + if(settings.video.filter == "Scale2x") filterScale2x.setChecked(); + if(settings.video.filter == "2xSaI") filter2xSaI.setChecked(); + if(settings.video.filter == "Super 2xSaI") filterSuper2xSaI.setChecked(); + if(settings.video.filter == "Super Eagle") filterSuperEagle.setChecked(); + if(settings.video.filter == "LQ2x") filterLQ2x.setChecked(); + if(settings.video.filter == "HQ2x") filterHQ2x.setChecked(); + if(settings.video.filter == "NTSC (RF)") filterNTSC_RF.setChecked(); + if(settings.video.filter == "NTSC (Composite)") filterNTSC_Composite.setChecked(); + if(settings.video.filter == "NTSC (S-Video)") filterNTSC_SVideo.setChecked(); + if(settings.video.filter == "NTSC (RGB)") filterNTSC_RGB.setChecked(); shaderMenu.setIcon(Icon::Emblem::Image).setText("Shader"); muteAudio.setText("Mute Audio").setChecked(settings.audio.mute).onToggle([&] { settings.audio.mute = muteAudio.checked(); @@ -145,17 +177,17 @@ auto Presentation::create() -> void { .show(); }); - viewport.setDroppable().onDrop([&](vector locations) { + viewport.setFocusable(); + viewport.setDroppable(); + viewport.onDrop([&](vector locations) { if(!locations) return; program.gameQueue = {}; program.gameQueue.append({"Auto;", locations.first()}); program.load(); setFocused(); - }).onSize([&] { - configureViewport(); }); - iconLayout.setAlignment(0.0); + iconLayout.setAlignment(0.0).setCollapsible(); image icon{Resource::Icon}; icon.alphaBlend(0x000000); iconCanvas.setIcon(icon); @@ -166,6 +198,7 @@ auto Presentation::create() -> void { auto back = Color{ 32, 32, 32}; auto fore = Color{255, 255, 255}; + updateProgramIcon(); updateStatusIcon(); spacerIcon.setBackgroundColor(back).setForegroundColor(fore); @@ -190,10 +223,6 @@ auto Presentation::create() -> void { program.quit(); }); - onSize([&] { - resizeViewport(); - }); - setTitle({"bsnes v", Emulator::Version}); setBackgroundColor({0, 0, 0}); resizeWindow(); @@ -211,6 +240,11 @@ auto Presentation::create() -> void { #endif } +auto Presentation::updateProgramIcon() -> void { + presentation.iconLayout.setVisible(!emulator->loaded() && !settings.video.snow); + presentation.layout.resize(); +} + auto Presentation::updateStatusIcon() -> void { image icon; icon.allocate(16, StatusHeight); @@ -224,80 +258,6 @@ auto Presentation::updateStatusIcon() -> void { statusIcon.setIcon(icon); } -auto Presentation::configureViewport() -> void { - uint width = viewport.geometry().width(); - uint height = viewport.geometry().height(); - video.configure(width, height, 60, 60); -} - -auto Presentation::clearViewport() -> void { - if(!emulator->loaded()) viewportLayout.setPadding(); - if(!visible() || !video) return; - - uint32_t opaqueBlack = 0xff000000; - if(settings.video.format == "RGB30") opaqueBlack = 0xc0000000; - - uint width = 16; - uint height = 16; - if(auto [output, length] = video.acquire(width, height); output) { - for(uint y : range(height)) { - auto line = output + y * (length >> 2); - for(uint x : range(width)) *line++ = opaqueBlack; - } - video.release(); - video.output(); - } -} - -auto Presentation::resizeViewport() -> void { - uint layoutWidth = viewportLayout.geometry().width(); - uint layoutHeight = viewportLayout.geometry().height(); - - uint width = 256 * (settings.video.aspectCorrection ? 8.0 / 7.0 : 1.0); - uint height = (settings.video.overscan ? 240.0 : 224.0); - uint viewportWidth, viewportHeight; - - if(visible() && !fullScreen()) { - uint widthMultiplier = layoutWidth / width; - uint heightMultiplier = layoutHeight / height; - uint multiplier = max(1, min(widthMultiplier, heightMultiplier)); - settings.video.multiplier = multiplier; - for(auto item : sizeGroup.objects()) { - if(auto property = item.property("multiplier")) { - if(property.natural() == multiplier) item.setChecked(); - } - } - } - - if(!emulator->loaded()) return clearViewport(); - if(!video) return; - - if(settings.video.output == "Center") { - uint widthMultiplier = layoutWidth / width; - uint heightMultiplier = layoutHeight / height; - uint multiplier = min(widthMultiplier, heightMultiplier); - viewportWidth = width * multiplier; - viewportHeight = height * multiplier; - } else if(settings.video.output == "Scale") { - double widthMultiplier = (double)layoutWidth / width; - double heightMultiplier = (double)layoutHeight / height; - double multiplier = min(widthMultiplier, heightMultiplier); - viewportWidth = width * multiplier; - viewportHeight = height * multiplier; - } else if(settings.video.output == "Stretch" || 1) { - viewportWidth = layoutWidth; - viewportHeight = layoutHeight; - } - - //center viewport within viewportLayout by use of viewportLayout padding - uint paddingWidth = layoutWidth - viewportWidth; - uint paddingHeight = layoutHeight - viewportHeight; - viewportLayout.setPadding({ - paddingWidth / 2, paddingHeight / 2, - paddingWidth - paddingWidth / 2, paddingHeight - paddingHeight / 2 - }); -} - auto Presentation::resizeWindow() -> void { if(fullScreen()) return; if(maximized()) setMaximized(false); @@ -309,27 +269,16 @@ auto Presentation::resizeWindow() -> void { setMinimumSize({width, height + statusHeight}); setSize({width * multiplier, height * multiplier + statusHeight}); - resizeViewport(); } auto Presentation::toggleFullscreenMode() -> void { - if(!fullScreen()) { - if(settings.general.statusBar) layout.remove(statusLayout); - menuBar.setVisible(false); - setFullScreen(true); - video.setExclusive(settings.video.exclusive); - if(video.exclusive()) setVisible(false); + if(!video.exclusive()) { + video.setExclusive(true); if(!input.acquired()) input.acquire(); - resizeViewport(); } else { if(input.acquired()) input.release(); - if(video.exclusive()) setVisible(true); video.setExclusive(false); - setFullScreen(false); - menuBar.setVisible(true); - if(settings.general.statusBar) layout.append(statusLayout, Size{~0, StatusHeight}); - resizeWindow(); - setAlignment(Alignment::Center); + viewport.setFocused(); } } diff --git a/bsnes/target-bsnes/presentation/presentation.hpp b/bsnes/target-bsnes/presentation/presentation.hpp index e8fbba5d..fd73a35c 100644 --- a/bsnes/target-bsnes/presentation/presentation.hpp +++ b/bsnes/target-bsnes/presentation/presentation.hpp @@ -5,10 +5,8 @@ struct Presentation : Window { enum : uint { RecentGames = 9, QuickStates = 9 }; enum : uint { StatusHeight = 24 }; + auto updateProgramIcon() -> void; auto updateStatusIcon() -> void; - auto configureViewport() -> void; - auto clearViewport() -> void; - auto resizeViewport() -> void; auto resizeWindow() -> void; auto updateStatus() -> void; auto toggleFullscreenMode() -> void; @@ -47,6 +45,39 @@ struct Presentation : Window { MenuCheckItem aspectCorrection{&outputMenu}; MenuCheckItem showOverscanArea{&outputMenu}; MenuCheckItem blurEmulation{&outputMenu}; + Menu filterMenu{&settingsMenu}; + MenuRadioItem filterNone{&filterMenu}; + MenuRadioItem filterScanlinesLight{&filterMenu}; + MenuRadioItem filterScanlinesDark{&filterMenu}; + MenuRadioItem filterScanlinesBlack{&filterMenu}; + MenuRadioItem filterPixellate2x{&filterMenu}; + MenuRadioItem filterScale2x{&filterMenu}; + MenuRadioItem filter2xSaI{&filterMenu}; + MenuRadioItem filterSuper2xSaI{&filterMenu}; + MenuRadioItem filterSuperEagle{&filterMenu}; + MenuRadioItem filterLQ2x{&filterMenu}; + MenuRadioItem filterHQ2x{&filterMenu}; + MenuRadioItem filterNTSC_RF{&filterMenu}; + MenuRadioItem filterNTSC_Composite{&filterMenu}; + MenuRadioItem filterNTSC_SVideo{&filterMenu}; + MenuRadioItem filterNTSC_RGB{&filterMenu}; + Group filterGroup{ + &filterNone, + &filterScanlinesLight, + &filterScanlinesDark, + &filterScanlinesBlack, + &filterPixellate2x, + &filterScale2x, + &filter2xSaI, + &filterSuper2xSaI, + &filterSuperEagle, + &filterLQ2x, + &filterHQ2x, + &filterNTSC_RF, + &filterNTSC_Composite, + &filterNTSC_SVideo, + &filterNTSC_RGB + }; Menu shaderMenu{&settingsMenu}; MenuSeparator settingsSeparatorA{&settingsMenu}; MenuCheckItem muteAudio{&settingsMenu}; @@ -97,4 +128,5 @@ struct Presentation : Window { Label spacerRight{&statusLayout, Size{8, ~0}, 0}; }; -extern Presentation presentation; +namespace Instances { extern Instance presentation; } +extern Presentation& presentation; diff --git a/bsnes/target-bsnes/program/game.cpp b/bsnes/target-bsnes/program/game.cpp index b8c60020..ff4d25e1 100644 --- a/bsnes/target-bsnes/program/game.cpp +++ b/bsnes/target-bsnes/program/game.cpp @@ -36,6 +36,7 @@ auto Program::load() -> void { verified() ? "Verified game loaded" : "Game loaded", appliedPatch() ? " and patch applied" : "" }); + presentation.setFocused(); presentation.setTitle(emulator->titles().merge(" + ")); presentation.resetSystem.setEnabled(true); presentation.unloadGame.setEnabled(true); @@ -43,9 +44,8 @@ auto Program::load() -> void { presentation.updateStateMenus(); presentation.speedNormal.setChecked(); presentation.pauseEmulation.setChecked(false); + presentation.updateProgramIcon(); presentation.updateStatusIcon(); - presentation.viewportLayout.remove(presentation.iconLayout); - presentation.resizeViewport(); cheatEditor.loadCheats(); stateManager.loadStates(); manifestViewer.loadManifest(); @@ -64,17 +64,19 @@ auto Program::load() -> void { } auto Program::loadFile(string location) -> vector { - if(Location::suffix(location) == ".zip") { + if(Location::suffix(location).downcase() == ".zip") { Decode::ZIP archive; if(archive.open(location)) { for(auto& file : archive.file) { - auto type = Location::suffix(file.name); + auto type = Location::suffix(file.name).downcase(); if(type == ".sfc" || type == ".smc" || type == ".gb" || type == ".gbc" || type == ".bs" || type == ".st") { return archive.extract(file); } } } return {}; + } else if(Location::suffix(location).downcase() == ".7z") { + return LZMA::extract(location); } else { return file::read(location); } @@ -109,7 +111,7 @@ auto Program::loadSuperFamicom(string location) -> bool { if(!superFamicom.patched) superFamicom.patched = applyPatchBPS(rom, location); auto heuristics = Heuristics::SuperFamicom(rom, location); auto sha256 = Hash::SHA256(rom).digest(); - if(auto document = BML::unserialize(string::read(locate("database/Super Famicom.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/Super Famicom.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); superFamicom.verified = true; @@ -163,13 +165,13 @@ auto Program::loadGameBoy(string location) -> bool { gameBoy.patched = applyPatchIPS(rom, location) || applyPatchBPS(rom, location); auto heuristics = Heuristics::GameBoy(rom, location); auto sha256 = Hash::SHA256(rom).digest(); - if(auto document = BML::unserialize(string::read(locate("database/Game Boy.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/Game Boy.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); gameBoy.verified = true; } } - if(auto document = BML::unserialize(string::read(locate("database/Game Boy Color.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/Game Boy Color.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); gameBoy.verified = true; @@ -200,7 +202,7 @@ auto Program::loadBSMemory(string location) -> bool { bsMemory.patched = applyPatchIPS(rom, location) || applyPatchBPS(rom, location); auto heuristics = Heuristics::BSMemory(rom, location); auto sha256 = Hash::SHA256(rom).digest(); - if(auto document = BML::unserialize(string::read(locate("database/BS Memory.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/BS Memory.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); bsMemory.verified = true; @@ -230,7 +232,7 @@ auto Program::loadSufamiTurboA(string location) -> bool { sufamiTurboA.patched = applyPatchIPS(rom, location) || applyPatchBPS(rom, location); auto heuristics = Heuristics::SufamiTurbo(rom, location); auto sha256 = Hash::SHA256(rom).digest(); - if(auto document = BML::unserialize(string::read(locate("database/Sufami Turbo.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/Sufami Turbo.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); sufamiTurboA.verified = true; @@ -260,7 +262,7 @@ auto Program::loadSufamiTurboB(string location) -> bool { sufamiTurboB.patched = applyPatchIPS(rom, location) || applyPatchBPS(rom, location); auto heuristics = Heuristics::SufamiTurbo(rom, location); auto sha256 = Hash::SHA256(rom).digest(); - if(auto document = BML::unserialize(string::read(locate("database/Sufami Turbo.bml")))) { + if(auto document = BML::unserialize(string::read(locate("Database/Sufami Turbo.bml")))) { if(auto game = document[{"game(sha256=", sha256, ")"}]) { manifest = BML::serialize(game); sufamiTurboB.verified = true; @@ -307,9 +309,8 @@ auto Program::unload() -> void { presentation.resetSystem.setEnabled(false); presentation.unloadGame.setEnabled(false); presentation.toolsMenu.setVisible(false); + presentation.updateProgramIcon(); presentation.updateStatusIcon(); - presentation.clearViewport(); - presentation.viewportLayout.append(presentation.iconLayout, Size{0, ~0}); } //a game is considered verified if the game plus its slot(s) are found in the games database diff --git a/bsnes/target-bsnes/program/platform.cpp b/bsnes/target-bsnes/program/platform.cpp index 24900ac7..613d67a6 100644 --- a/bsnes/target-bsnes/program/platform.cpp +++ b/bsnes/target-bsnes/program/platform.cpp @@ -112,7 +112,7 @@ auto Program::load(uint id, string name, string type, vector options) -> } else { dialog.setTitle("Load SNES ROM"); dialog.setPath(path("Games", settings.path.recent.superFamicom)); - dialog.setFilters({string{"SNES ROMs|*.sfc:*.smc:*.zip:*.SFC:*.SMC:*.ZIP:*.Sfc:*.Smc:*.Zip"}, string{"All Files|*"}}); + dialog.setFilters({string{"SNES ROMs|*.sfc:*.smc:*.zip:*.7z:*.SFC:*.SMC:*.ZIP:*.7Z:*.Sfc:*.Smc:*.Zip"}, string{"All Files|*"}}); superFamicom.location = dialog.openObject(); superFamicom.option = dialog.option(); } @@ -132,7 +132,7 @@ auto Program::load(uint id, string name, string type, vector options) -> } else { dialog.setTitle("Load Game Boy ROM"); dialog.setPath(path("Games", settings.path.recent.gameBoy)); - dialog.setFilters({string{"Game Boy ROMs|*.gb:*.gbc:*.zip:*.GB:*.GBC:*.ZIP:*.Gb:*.Gbc:*.Zip"}, string{"All Files|*"}}); + dialog.setFilters({string{"Game Boy ROMs|*.gb:*.gbc:*.zip:*.7z:*.GB:*.GBC:*.ZIP:*.7Z:*.Gb:*.Gbc:*.Zip"}, string{"All Files|*"}}); gameBoy.location = dialog.openObject(); gameBoy.option = dialog.option(); } @@ -152,7 +152,7 @@ auto Program::load(uint id, string name, string type, vector options) -> } else { dialog.setTitle("Load BS Memory ROM"); dialog.setPath(path("Games", settings.path.recent.bsMemory)); - dialog.setFilters({string{"BS Memory ROMs|*.bs:*.zip:*.BS:*.ZIP:*.Bs:*.Zip"}, string{"All Files|*"}}); + dialog.setFilters({string{"BS Memory ROMs|*.bs:*.zip:*.7z:*.BS:*.ZIP:*.7Z:*.Bs:*.Zip"}, string{"All Files|*"}}); bsMemory.location = dialog.openObject(); bsMemory.option = dialog.option(); } @@ -172,7 +172,7 @@ auto Program::load(uint id, string name, string type, vector options) -> } else { dialog.setTitle("Load Sufami Turbo ROM - Slot A"); dialog.setPath(path("Games", settings.path.recent.sufamiTurboA)); - dialog.setFilters({string{"Sufami Turbo ROMs|*.st:*.zip:*.ST:*.ZIP:*.St:*.Zip"}, string{"All Files|*"}}); + dialog.setFilters({string{"Sufami Turbo ROMs|*.st:*.zip:*.7z:*.ST:*.ZIP:*.7Z:*.St:*.Zip"}, string{"All Files|*"}}); sufamiTurboA.location = dialog.openObject(); sufamiTurboA.option = dialog.option(); } @@ -192,7 +192,7 @@ auto Program::load(uint id, string name, string type, vector options) -> } else { dialog.setTitle("Load Sufami Turbo ROM - Slot B"); dialog.setPath(path("Games", settings.path.recent.sufamiTurboB)); - dialog.setFilters({string{"Sufami Turbo ROMs|*.st:*.zip:*.ST:*.ZIP:*.St:*.Zip"}, string{"All Files|*"}}); + dialog.setFilters({string{"Sufami Turbo ROMs|*.st:*.zip:*.7z:*.ST:*.ZIP:*.7Z:*.St:*.Zip"}, string{"All Files|*"}}); sufamiTurboB.location = dialog.openObject(); sufamiTurboB.option = dialog.option(); } @@ -207,7 +207,7 @@ auto Program::load(uint id, string name, string type, vector options) -> return {}; } -auto Program::videoFrame(const uint32* data, uint pitch, uint width, uint height) -> void { +auto Program::videoFrame(const uint16* data, uint pitch, uint width, uint height) -> void { //this relies on the UI only running between Emulator::Scheduler::Event::Frame events //this will always be the case; so we can avoid an unnecessary copy or one-frame delay here //if the core were to exit between a frame event, the next frame might've been only partially rendered @@ -216,21 +216,119 @@ auto Program::videoFrame(const uint32* data, uint pitch, uint width, uint height screenshot.width = width; screenshot.height = height; - pitch >>= 2; + pitch >>= 1; if(!presentation.showOverscanArea.checked()) { data += (height / 30) * pitch; height -= height / 15; } - if(auto [output, length] = video.acquire(width, height); output) { - length >>= 2; + uint videoWidth = 256 * (settings.video.aspectCorrection ? 8.0 / 7.0 : 1.0); + uint videoHeight = (settings.video.overscan ? 240.0 : 224.0); - for(auto y : range(height)) { - memory::copy(output + y * length, data + y * pitch, width); - } + auto [viewportWidth, viewportHeight] = video.size(); + uint multiplierX = viewportWidth / videoWidth; + uint multiplierY = viewportHeight / videoHeight; + uint multiplier = min(multiplierX, multiplierY); + + uint outputWidth = videoWidth * multiplier; + uint outputHeight = videoHeight * multiplier; + + if(multiplier == 0 || settings.video.output == "Scale") { + float multiplierX = (float)viewportWidth / (float)videoWidth; + float multiplierY = (float)viewportHeight / (float)videoHeight; + float multiplier = min(multiplierX, multiplierY); + + outputWidth = videoWidth * multiplier; + outputHeight = videoHeight * multiplier; + } + + if(settings.video.output == "Stretch") { + outputWidth = viewportWidth; + outputHeight = viewportHeight; + } + + void (*filterSize)(uint& width, uint& height) = &Filter::None::size; + void (*filterRender)(uint32_t* colortable, uint32_t* output, uint outpitch, const uint16_t* input, uint pitch, uint width, uint height) = &Filter::None::render; + + if(presentation.filterScanlinesLight.checked() && height <= 240) { + filterSize = &Filter::ScanlinesLight::size; + filterRender = &Filter::ScanlinesLight::render; + } + + if(presentation.filterScanlinesDark.checked() && height <= 240) { + filterSize = &Filter::ScanlinesDark::size; + filterRender = &Filter::ScanlinesDark::render; + } + + if(presentation.filterScanlinesBlack.checked() && height <= 240) { + filterSize = &Filter::ScanlinesBlack::size; + filterRender = &Filter::ScanlinesBlack::render; + } + + if(presentation.filterPixellate2x.checked()) { + filterSize = &Filter::Pixellate2x::size; + filterRender = &Filter::Pixellate2x::render; + } + + if(presentation.filterScale2x.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::Scale2x::size; + filterRender = &Filter::Scale2x::render; + } + + if(presentation.filter2xSaI.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::_2xSaI::size; + filterRender = &Filter::_2xSaI::render; + } + + if(presentation.filterSuper2xSaI.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::Super2xSaI::size; + filterRender = &Filter::Super2xSaI::render; + } + + if(presentation.filterSuperEagle.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::SuperEagle::size; + filterRender = &Filter::SuperEagle::render; + } + + if(presentation.filterLQ2x.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::LQ2x::size; + filterRender = &Filter::LQ2x::render; + } + + if(presentation.filterHQ2x.checked() && width <= 256 && height <= 240) { + filterSize = &Filter::HQ2x::size; + filterRender = &Filter::HQ2x::render; + } + + if(presentation.filterNTSC_RF.checked()) { + filterSize = &Filter::NTSC_RF::size; + filterRender = &Filter::NTSC_RF::render; + } + + if(presentation.filterNTSC_Composite.checked()) { + filterSize = &Filter::NTSC_Composite::size; + filterRender = &Filter::NTSC_Composite::render; + } + + if(presentation.filterNTSC_SVideo.checked()) { + filterSize = &Filter::NTSC_SVideo::size; + filterRender = &Filter::NTSC_SVideo::render; + } + + if(presentation.filterNTSC_RGB.checked()) { + filterSize = &Filter::NTSC_RGB::size; + filterRender = &Filter::NTSC_RGB::render; + } + + uint filterWidth = width; + uint filterHeight = height; + filterSize(filterWidth, filterHeight); + + if(auto [output, length] = video.acquire(filterWidth, filterHeight); output) { + filterRender(palette, output, length, (const uint16_t*)data, pitch << 1, width, height); video.release(); - video.output(); + video.output(outputWidth, outputHeight); } inputManager.frame(); diff --git a/bsnes/target-bsnes/program/program.cpp b/bsnes/target-bsnes/program/program.cpp index 6f3e8e59..313090a8 100644 --- a/bsnes/target-bsnes/program/program.cpp +++ b/bsnes/target-bsnes/program/program.cpp @@ -11,6 +11,7 @@ #include "utility.cpp" #include "patch.cpp" #include "hacks.cpp" +#include "viewport.cpp" Program program; auto Program::create() -> void { @@ -75,7 +76,10 @@ auto Program::main() -> void { if(inactive()) { audio.clear(); - if(!Application::modal()) usleep(20 * 1000); + if(!Application::modal()) { + usleep(20 * 1000); + refreshViewport(); + } return; } @@ -90,6 +94,10 @@ auto Program::main() -> void { } auto Program::quit() -> void { + //make closing the program feel more responsive + presentation.setVisible(false); + Application::processEvents(); + unload(); settings.save(); video.reset(); diff --git a/bsnes/target-bsnes/program/program.hpp b/bsnes/target-bsnes/program/program.hpp index ad45f7cf..9d3dd91d 100644 --- a/bsnes/target-bsnes/program/program.hpp +++ b/bsnes/target-bsnes/program/program.hpp @@ -9,7 +9,7 @@ struct Program : Lock, Emulator::Platform { //platform.cpp auto open(uint id, string name, vfs::file::mode mode, bool required) -> vfs::shared::file override; auto load(uint id, string name, string type, vector options = {}) -> Emulator::Platform::Load override; - auto videoFrame(const uint32* data, uint pitch, uint width, uint height) -> void override; + auto videoFrame(const uint16* data, uint pitch, uint width, uint height) -> void override; auto audioFrame(const double* samples, uint channels) -> void override; auto inputPoll(uint port, uint device, uint input) -> int16 override; auto inputRumble(uint port, uint device, uint input, bool enable) -> void override; @@ -104,6 +104,9 @@ struct Program : Lock, Emulator::Platform { auto hackPatchMemory(vector& data) -> void; auto hackOverclockSuperFX() -> void; + //viewport.cpp + auto refreshViewport() -> void; + public: struct Game { explicit operator bool() const { return (bool)location; } @@ -138,8 +141,10 @@ public: vector gameQueue; + uint32_t palette[32768]; + struct Screenshot { - const uint32* data = nullptr; + const uint16* data = nullptr; uint pitch = 0; uint width = 0; uint height = 0; diff --git a/bsnes/target-bsnes/program/states.cpp b/bsnes/target-bsnes/program/states.cpp index 2fb00a73..5f1f7be3 100644 --- a/bsnes/target-bsnes/program/states.cpp +++ b/bsnes/target-bsnes/program/states.cpp @@ -83,9 +83,9 @@ auto Program::saveState(string filename) -> bool { //this can be null if a state is captured before the first frame of video output after power/reset if(screenshot.data) { image preview; + preview.transform(0, 15, 0x8000, 0x7c00, 0x03e0, 0x001f); preview.copy(screenshot.data, screenshot.pitch, screenshot.width, screenshot.height); if(preview.width() != 256 || preview.height() != 240) preview.scale(256, 240, true); - preview.transform(0, 15, 0x8000, 0x7c00, 0x03e0, 0x001f); previewRLE = Encode::RLE<2>({preview.data(), preview.size()}); } diff --git a/bsnes/target-bsnes/program/video.cpp b/bsnes/target-bsnes/program/video.cpp index b462740b..6bd4303d 100644 --- a/bsnes/target-bsnes/program/video.cpp +++ b/bsnes/target-bsnes/program/video.cpp @@ -12,13 +12,12 @@ auto Program::updateVideoDriver(Window parent) -> void { updateVideoShader(); if(video.ready()) { - presentation.configureViewport(); - presentation.clearViewport(); + video.clear(); updateVideoShader(); } video.onUpdate([&](uint width, uint height) { - if(!emulator->loaded()) presentation.clearViewport(); + if(!emulator->loaded()) video.clear(); }); if(!video.ready()) { @@ -59,9 +58,48 @@ auto Program::updateVideoShader() -> void { } auto Program::updateVideoPalette() -> void { + double luminance = settings.video.luminance / 100.0; + double saturation = settings.video.saturation / 100.0; + double gamma = settings.video.gamma / 100.0; + + uint depth = 24; + if(video.format() == "RGB30") depth = 30; + + for(uint color : range(32768)) { + uint16 r = (color >> 10) & 31; + uint16 g = (color >> 5) & 31; + uint16 b = (color >> 0) & 31; + + r = r << 3 | r >> 2; r = r << 8 | r << 0; + g = g << 3 | g >> 2; g = g << 8 | g << 0; + b = b << 3 | b >> 2; b = b << 8 | b << 0; + + if(saturation != 1.0) { + uint16 grayscale = uclamp<16>((r + g + b) / 3); + double inverse = max(0.0, 1.0 - saturation); + r = uclamp<16>(r * saturation + grayscale * inverse); + g = uclamp<16>(g * saturation + grayscale * inverse); + b = uclamp<16>(b * saturation + grayscale * inverse); + } + + if(gamma != 1.0) { + double reciprocal = 1.0 / 32767.0; + r = r > 32767 ? r : uint16(32767 * pow(r * reciprocal, gamma)); + g = g > 32767 ? g : uint16(32767 * pow(g * reciprocal, gamma)); + b = b > 32767 ? b : uint16(32767 * pow(b * reciprocal, gamma)); + } + + if(luminance != 1.0) { + r = uclamp<16>(r * luminance); + g = uclamp<16>(g * luminance); + b = uclamp<16>(b * luminance); + } + + switch(depth) { + case 24: palette[color] = r >> 8 << 16 | g >> 8 << 8 | b >> 8 << 0; break; + case 30: palette[color] = r >> 6 << 20 | g >> 6 << 10 | b >> 6 << 0; break; + } + } + emulator->configure("Video/ColorEmulation", false); - Emulator::video.setLuminance(settings.video.luminance / 100.0); - Emulator::video.setSaturation(settings.video.saturation / 100.0); - Emulator::video.setGamma(settings.video.gamma / 100.0); - Emulator::video.setPalette(); } diff --git a/bsnes/target-bsnes/program/viewport.cpp b/bsnes/target-bsnes/program/viewport.cpp new file mode 100644 index 00000000..771c38bc --- /dev/null +++ b/bsnes/target-bsnes/program/viewport.cpp @@ -0,0 +1,201 @@ +uint16_t SnowData[] = { + 161, 251, 115, 211, 249, 87, 128, 101, 232, 176, 51, 180, 108, 193, 224, 112, 254, 159, 102, 238, + 223, 123, 218, 42, 173, 160, 143, 170, 64, 1, 174, 29, 34, 187, 194, 199, 40, 89, 232, 32, + 7, 195, 141, 67, 216, 48, 234, 1, 243, 116, 164, 182, 146, 136, 66, 70, 36, 43, 98, 208, + 63, 240, 216, 253, 147, 36, 33, 253, 98, 80, 228, 156, 73, 82, 85, 1, 97, 72, 187, 239, + 18, 196, 127, 182, 22, 22, 101, 25, 124, 145, 240, 213, 186, 22, 7, 161, 30, 98, 90, 197, + 22, 205, 32, 150, 59, 133, 49, 140, 10, 128, 142, 185, 176, 142, 220, 195, 100, 102, 105, 194, + 43, 139, 184, 153, 1, 95, 176, 169, 192, 201, 233, 243, 73, 65, 188, 14, 194, 39, 251, 140, + 239, 181, 142, 160, 242, 248, 82, 49, 9, 157, 233, 162, 254, 121, 112, 6, 118, 24, 56, 121, + 74, 209, 1, 223, 145, 6, 75, 73, 18, 168, 194, 168, 58, 39, 222, 170, 214, 75, 45, 218, + 39, 197, 242, 98, 22, 90, 255, 5, 144, 244, 252, 55, 98, 18, 135, 101, 27, 85, 215, 207, + 183, 28, 201, 142, 45, 122, 145, 159, 41, 243, 109, 29, 117, 203, 7, 234, 231, 214, 131, 133, + 217, 8, 74, 207, 130, 77, 21, 229, 167, 78, 218, 109, 142, 58, 134, 238, 29, 182, 178, 14, + 144, 129, 196, 219, 60, 128, 30, 105, 57, 53, 76, 122, 242, 208, 101, 241, 246, 99, 248, 67, + 137, 244, 70, 51, 202, 94, 164, 125, 115, 72, 61, 72, 129, 169, 155, 122, 91, 154, 160, 83, + 41, 102, 223, 218, 140, 40, 132, 16, 223, 92, 50, 230, 168, 47, 126, 117, 242, 136, 1, 245, + 171, 0, 36, 98, 73, 69, 14, 229, 66, 177, 108, 92, 39, 250, 243, 161, 111, 85, 211, 99, + 52, 98, 121, 188, 128, 201, 90, 205, 223, 92, 177, 19, 87, 18, 75, 54, 6, 81, 235, 137, + 247, 66, 211, 129, 247, 39, 119, 206, 116, 250, 113, 231, 190, 196, 53, 51, 34, 114, 39, 22, + 192, 33, 249, 151, 26, 22, 139, 97, 171, 238, 182, 88, 22, 176, 157, 255, 178, 199, 138, 98, + 140, 36, 112, 90, 25, 245, 134, 64, 48, 190, 165, 113, 24, 195, 84, 70, 175, 9, 179, 69, + 13, 26, 167, 237, 163, 159, 185, 128, 109, 114, 86, 74, 188, 103, 141, 48, 188, 203, 205, 191, + 215, 193, 224, 4, 153, 36, 108, 3, 172, 235, 56, 251, 211, 115, 173, 216, 240, 33, 78, 150, + 133, 64, 51, 103, 56, 26, 165, 222, 70, 148, 115, 119, 246, 229, 181, 63, 109, 49, 228, 108, + 126, 10, 170, 48, 87, 42, 193, 24, 28, 255, 176, 176, 209, 181, 97, 93, 61, 241, 201, 137, + 129, 97, 24, 159, 168, 215, 61, 113, 104, 143, 168, 7, 196, 216, 149, 239, 110, 65, 75, 143, + 238, 0, 37, 19, 8, 56, 65, 234, 228, 72, 42, 5, 226, 95, 243, 51, 55, 231, 114, 90, + 160, 141, 171, 108, 218, 252, 154, 64, 175, 142, 214, 211, 180, 129, 217, 118, 33, 130, 213, 2, + 73, 145, 93, 21, 162, 141, 97, 225, 112, 253, 49, 43, 113, 208, 131, 104, 31, 51, 192, 37, + 117, 186, 16, 45, 61, 114, 220, 6, 89, 163, 197, 203, 142, 80, 89, 115, 190, 190, 228, 15, + 166, 145, 59, 139, 120, 79, 104, 252, 246, 73, 113, 144, 224, 65, 204, 155, 221, 85, 31, 99, + 48, 253, 94, 159, 215, 31, 123, 204, 248, 153, 31, 210, 174, 178, 54, 146, 152, 88, 56, 92, + 197, 35, 124, 104, 211, 118, 1, 207, 108, 68, 123, 161, 107, 69, 143, 13, 79, 170, 130, 193, + 214, 153, 219, 247, 227, 2, 170, 208, 248, 139, 118, 241, 247, 183, 18, 135, 246, 126, 201, 46, + 70, 234, 171, 72, 18, 135, 236, 216, 32, 178, 148, 231, 161, 15, 6, 254, 34, 181, 5, 71, + 2, 219, 71, 87, 252, 16, 202, 190, 180, 83, 99, 209, 75, 134, 78, 84, 114, 32, 171, 246, + 125, 11, 57, 200, 102, 29, 176, 26, 205, 151, 152, 108, 100, 146, 117, 95, 71, 77, 158, 207, + 60, 192, 50, 135, 223, 237, 231, 53, 27, 195, 170, 146, 155, 160, 92, 224, 247, 187, 14, 50, + 203, 5, 153, 42, 17, 75, 109, 14, 78, 160, 236, 114, 131, 105, 189, 209, 233, 135, 221, 207, + 226, 119, 104, 10, 178, 107, 77, 160, 233, 179, 120, 227, 133, 241, 32, 223, 63, 247, 66, 157, + 140, 81, 118, 81, 63, 193, 173, 228, 214, 78, 124, 123, 222, 149, 9, 242, 0, 128, 194, 110 +}; + +uint8_t SnowVelDist[] = { + 57, 92, 100, 19, 100, 184, 238, 225, 55, 240, 255, 221, 215, 105, 226, 153, 164, 41, 22, 93, + 176, 203, 155, 199, 244, 52, 233, 219, 110, 227, 229, 227, 152, 240, 83, 248, 226, 31, 163, 22, + 28, 156, 18, 10, 248, 67, 123, 167, 25, 138, 90, 10, 79, 107, 208, 229, 248, 233, 185, 10, + 167, 21, 19, 178, 132, 154, 81, 70, 20, 71, 95, 147, 72, 27, 91, 189, 13, 189, 102, 84, + 195, 123, 251, 93, 68, 36, 178, 59, 107, 99, 104, 191, 76, 110, 44, 206, 123, 46, 98, 112, + 26, 50, 1, 35, 150, 17, 242, 208, 69, 23, 202, 197, 59, 80, 136, 124, 40, 89, 11, 40, + 1, 136, 90, 72, 198, 83, 2, 174, 174, 4, 28, 205, 135, 35, 194, 54, 22, 40, 4, 132, + 191, 88, 163, 66, 204, 230, 35, 111, 9, 177, 254, 174, 163, 68, 5, 88, 111, 235, 58, 236, + 4, 248, 172, 154, 101, 164, 43, 223, 10, 13, 210, 125, 146, 73, 192, 57, 117, 152, 128, 36, + 106, 21, 253, 113, 110, 133, 244, 4, 150, 32, 76, 71, 22, 106, 210, 244, 46, 128, 27, 215, + 231, 112, 177, 196, 198, 120, 196, 57, 234, 74, 235, 108, 64, 181, 209, 188, 177, 63, 197, 200, + 126, 164, 136, 163, 48, 62, 225, 223, 212, 201, 195, 121, 90, 7, 10, 196, 88, 53, 39, 249, + 147, 98, 65, 253, 246, 3, 152, 125, 242, 105, 44, 129, 94, 232, 13, 4, 86, 220, 194, 67, + 186, 210, 171, 197, 64, 138, 89, 78, 58, 150, 52, 79, 138, 201, 244, 111, 106, 181, 192, 69, + 234, 253, 239, 113, 98, 37, 209, 151, 60, 47, 241, 235, 185, 52, 173, 94, 172, 182, 47, 150, + 80, 118, 10, 58, 161, 237, 10, 64, 238, 198, 14, 74, 132, 250, 234, 63, 169, 86, 158, 170, + 76, 168, 124, 133, 28, 203, 246, 140, 228, 77, 50, 53, 115, 113, 157, 218, 90, 192, 28, 209, + 72, 117, 156, 101, 226, 99, 11, 245, 69, 59, 17, 175, 164, 59, 8, 166, 163, 185, 10, 60, + 100, 19, 26, 38, 114, 232, 180, 115, 238, 184, 88, 103, 178, 67, 212, 21, 87, 64, 85, 1, + 62, 87, 155, 62, 21, 96, 205, 195, 131, 97, 191, 252, 218, 209, 179, 201, 12, 2, 234, 110, + 162, 14, 145, 170, 156, 105, 85, 132, 132, 60, 239, 14, 80, 129, 225, 144, 149, 244, 188, 8, + 13, 168, 181, 168, 30, 142, 24, 110, 26, 172, 231, 182, 50, 214, 66, 193, 100, 45, 132, 144, + 205, 190, 16, 133, 45, 250, 83, 183, 140, 229, 117, 226, 68, 59, 163, 96, 235, 227, 25, 155, + 209, 105, 41, 214, 30, 107, 2, 85, 180, 23, 241, 39, 113, 63, 75, 44, 107, 142, 93, 29, + 62, 240, 235, 152, 147, 52, 54, 146, 109, 112, 139, 162, 238, 198, 201, 8, 141, 115, 112, 106, + 4, 99, 25, 155, 111, 161, 114, 253, 75, 100, 28, 59, 101, 150, 2, 122, 228, 6, 12, 59, + 249, 181, 67, 136, 227, 227, 199, 46, 75, 203, 50, 25, 50, 61, 62, 22, 238, 124, 218, 134, + 243, 21, 243, 222, 94, 138, 161, 234, 133, 23, 138, 45, 4, 226, 154, 227, 8, 84, 105, 126, + 200, 127, 240, 144, 124, 197, 102, 144, 53, 29, 94, 231, 108, 175, 136, 37, 44, 183, 178, 95, + 41, 196, 214, 12, 42, 221, 106, 225, 151, 32, 53, 130, 24, 211, 88, 14, 135, 18, 90, 219, + 177, 129, 90, 217, 162, 181, 199, 133, 116, 56, 36, 100, 230, 91, 220, 83, 41, 65, 20, 64, + 177, 197, 249, 24, 242, 62, 26, 234, 92, 44, 167, 153, 243, 94, 179, 163, 103, 29, 220, 199, + 128, 94, 236, 152, 53, 32, 77, 78, 228, 89, 124, 85, 87, 50, 197, 116, 179, 105, 236, 139, + 102, 17, 159, 66, 176, 27, 205, 36, 113, 80, 60, 6, 61, 174, 254, 174, 246, 72, 154, 31, + 97, 40, 10, 8, 114, 203, 238, 26, 89, 51, 134, 110, 118, 176, 87, 32, 192, 210, 146, 207, + 88, 45, 156, 179, 61, 224, 87, 107, 107, 1, 252, 187, 203, 100, 169, 211, 205, 105, 12, 231, + 137, 176, 166, 37, 192, 241, 169, 84, 32, 85, 112, 168, 154, 7, 247, 146, 183, 225, 246, 173, + 57, 103, 110, 236, 113, 118, 203, 200, 22, 87, 251, 7, 138, 37, 12, 84, 221, 171, 51, 209, + 242, 37, 89, 73, 151, 162, 139, 189, 131, 209, 221, 96, 107, 144, 175, 79, 199, 123, 98, 138, + 226, 86, 221, 254, 72, 14, 126, 180, 200, 171, 85, 94, 120, 124, 196, 225, 150, 57, 219, 158 +}; + +auto Program::refreshViewport() -> void { + if(!emulator->loaded() && !settings.video.snow) return; + + static uint32_t SnowMover = 0; + static uint32_t SnowTimer = 18; + static uint32_t NumSnow = 0; + if(settings.video.snow) SnowMover++; + + auto [viewportWidth, viewportHeight] = video.size(); + + uint videoWidth = 256 * (settings.video.aspectCorrection ? 8.0 / 7.0 : 1.0); + uint videoHeight = (settings.video.overscan ? 240.0 : 224.0); + + uint multiplierX = viewportWidth / videoWidth; + uint multiplierY = viewportHeight / videoHeight; + uint multiplier = min(multiplierX, multiplierY); + + uint outputWidth = videoWidth * multiplier; + uint outputHeight = videoHeight * multiplier; + + if(multiplier == 0 || settings.video.output == "Scale") { + float multiplierX = (float)viewportWidth / (float)videoWidth; + float multiplierY = (float)viewportHeight / (float)videoHeight; + float multiplier = min(multiplierX, multiplierY); + + outputWidth = videoWidth * multiplier; + outputHeight = videoHeight * multiplier; + } + + if(settings.video.output == "Stretch") { + outputWidth = viewportWidth; + outputHeight = viewportHeight; + } + + uint width = 256; + uint height = 240; + + if(emulator->loaded() && screenshot.data) { + width = screenshot.width; + height = screenshot.height; + } + + if(!settings.video.overscan) { + if(height == 240) height = 224; + if(height == 480) height = 448; + } + + if(auto [output, length] = video.acquire(width, height); output) { + length >>= 2; + + if(!emulator->loaded() || !screenshot.data) { + for(uint y : range(height)) { + memory::fill(output + y * length, length, 0xff000000); + } + } else { + for(uint y : range(height)) { + auto source = screenshot.data + y * (screenshot.pitch >> 1); + if(!settings.video.overscan) source += 8 * (screenshot.pitch >> 1); + auto target = output + y * length; + for(uint x : range(width)) { + auto color = *source++; + + uint a = 255; + uint r = (color >> 10) & 31; + uint g = (color >> 5) & 31; + uint b = (color >> 0) & 31; + + r = r << 3 | r >> 2; + g = g << 3 | g >> 2; + b = b << 3 | b >> 2; + + r >>= 1; + g >>= 1; + b >>= 1; + + *target++ = a << 24 | r << 16 | g << 8 | b << 0; + } + } + } + + if(settings.video.snow) { + uint32_t i = 0; + do { + uint y = uint8_t(SnowData[i * 2 + 1] >> 8); + uint x = uint8_t(SnowData[i * 2 + 0] >> 8); + if(width > 256) x <<= 1; + if(height > 240) y <<= 1; + if((SnowVelDist[i * 2] & 8) != 0) { + uint8_t color = 228 + (SnowVelDist[i * 2] & 0x03); + if(y > 0 && y < height) output[y * width + x] = color << 16 | color << 8 | color << 0; + } + } while(++i != 200); + + for(; SnowMover != 0; --SnowMover) { + if(--SnowTimer == 0) { + ++NumSnow; + SnowTimer = 18; + } + uint32_t i = 0; + uint32_t n = NumSnow; + while(n-- != 0) { + SnowData[i * 2 + 0] += SnowVelDist[i * 2 + 0] + 4 * (uint8_t)(100 - 50); + SnowData[i * 2 + 1] += SnowVelDist[i * 2 + 1] + 256; + if(SnowData[i * 2 + 1] <= 0x200) { + SnowVelDist[i * 2] |= 8; + } + ++i; + } + } + } + + video.release(); + video.output(outputWidth, outputHeight); + } +} diff --git a/bsnes/target-bsnes/resource/locales/.gitignore b/bsnes/target-bsnes/resource/locales/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/bsnes/target-bsnes/resource/resource.bml b/bsnes/target-bsnes/resource/resource.bml index 86f0d42e..041d1626 100644 --- a/bsnes/target-bsnes/resource/resource.bml +++ b/bsnes/target-bsnes/resource/resource.bml @@ -2,5 +2,5 @@ namespace name=Resource binary name=Icon file=icon.png binary name=Logo file=logo.png namespace name=System - string name=Boards file="../../systems/Super Famicom.sys/boards.bml" - binary name=IPLROM file="../../systems/Super Famicom.sys/ipl.rom" + binary name=Boards file="system/boards.bml" + binary name=IPLROM file="system/ipl.rom" diff --git a/bsnes/target-bsnes/resource/resource.cpp b/bsnes/target-bsnes/resource/resource.cpp index ebb04639..f620a235 100644 --- a/bsnes/target-bsnes/resource/resource.cpp +++ b/bsnes/target-bsnes/resource/resource.cpp @@ -849,7 +849,7 @@ const unsigned char Logo[23467] = { 0,0,0,73,69,78,68,174,66,96,130, }; namespace System { -const char Boards[30188] = { +const unsigned char Boards[30838] = { 100,97,116,97,98,97,115,101,10,32,32,114,101,118,105,115,105,111,110,58,32,50,48,49,56,45,48,55,45,50,53,10, 10,47,47,66,111,97,114,100,115,32,40,80,114,111,100,117,99,116,105,111,110,41,10,10,100,97,116,97,98,97,115,101, 10,32,32,114,101,118,105,115,105,111,110,58,32,50,48,49,56,45,48,53,45,49,54,10,10,98,111,97,114,100,58,32, @@ -1532,268 +1532,288 @@ const char Boards[30188] = { 77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55, 55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61, 68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,111,115, - 99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,69,88,72,73,82,79,77,45,82,65,77,10,32,32,109, - 101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32, - 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,58,56,48,48,48,45,102,102,102,102,32,98, - 97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45, - 55,100,58,48,48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109, - 97,112,32,97,100,100,114,101,115,115,61,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61, - 48,120,99,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48, - 48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,109,101,109,111,114,121,32, - 116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100, - 100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107, - 61,48,120,101,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,58,48,48, - 48,48,45,55,102,102,102,10,10,98,111,97,114,100,58,32,69,88,72,73,82,79,77,45,82,65,77,45,83,72,65,82, - 80,82,84,67,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80, - 114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,58,56,48,48, - 48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100, - 114,101,115,115,61,52,48,45,55,100,58,48,48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48, - 48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,56,48,45,98,102,58,56,48,48,48,45,102,102, - 102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, - 61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32, - 32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,54,48,48,48,45,55, - 102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 55,48,45,55,100,58,48,48,48,48,45,55,102,102,102,10,32,32,114,116,99,32,109,97,110,117,102,97,99,116,117,114, - 101,114,61,83,104,97,114,112,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56, - 48,45,98,102,58,50,56,48,48,45,50,56,48,49,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82, - 84,67,32,99,111,110,116,101,110,116,61,84,105,109,101,32,109,97,110,117,102,97,99,116,117,114,101,114,61,83,104,97, - 114,112,10,10,98,111,97,114,100,58,32,69,88,78,69,67,45,76,79,82,79,77,10,32,32,109,101,109,111,114,121,32, - 116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112, - 32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58,56,48,48,48,45,102,102,102,102,32,109, - 97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116, - 117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,54,48,45, - 54,55,44,101,48,45,101,55,58,48,48,48,48,45,51,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121, - 112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105,116,101,99,116, - 117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77, - 32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,57,54, - 48,53,48,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61, - 68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,32, - 32,109,97,112,32,97,100,100,114,101,115,115,61,54,56,45,54,102,44,101,56,45,101,102,58,48,48,48,48,45,55,102, - 102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98, - 111,97,114,100,58,32,69,88,83,80,67,55,49,49,48,45,82,65,77,45,69,80,83,79,78,82,84,67,10,32,32,109, - 101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,69,120,112,97,110,115,105,111,110, - 10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,52,102,58,48,48,48,48,45,102,102,102,102, - 10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83,80,67,55,49,49,48,10, - 32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48, - 45,52,56,51,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,53,48,44,53,56,58,48,48,48,48, - 45,102,102,102,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48, - 48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48, - 45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,32,32,109,101,109,111,114,121, - 32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,32,32, - 109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,10,32,32,32, - 32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32, - 32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48, - 45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,114,116,99,32,109,97,110,117,102,97,99,116, - 117,114,101,114,61,69,112,115,111,110,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102, - 44,56,48,45,98,102,58,52,56,52,48,45,52,56,52,50,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101, - 61,82,84,67,32,99,111,110,116,101,110,116,61,84,105,109,101,32,109,97,110,117,102,97,99,116,117,114,101,114,61,69, - 112,115,111,110,10,10,98,111,97,114,100,58,32,71,66,45,76,79,82,79,77,10,32,32,109,101,109,111,114,121,32,116, - 121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32, - 97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58,56,48,48,48,45,102,102,102,102,32,109,97, - 115,107,61,48,120,56,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,44, - 99,48,45,102,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114, - 111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,73,67,68,32,114,101,118,105,115,105,111,110,61, - 50,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48, - 48,48,45,54,55,102,102,44,55,48,48,48,45,55,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112, - 101,61,82,79,77,32,99,111,110,116,101,110,116,61,66,111,111,116,32,97,114,99,104,105,116,101,99,116,117,114,101,61, - 76,82,51,53,57,48,50,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,32,32,32,32,115,108,111,116,32, - 116,121,112,101,61,71,97,109,101,66,111,121,10,10,98,111,97,114,100,58,32,71,83,85,45,82,65,77,10,32,32,112, - 114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,71,83,85,10,32,32,32,32,109,97, - 112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,51,48,48,48,45,51,52,102,102,10, - 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103, - 114,97,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98, - 102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,32,32,109,97, - 112,32,97,100,100,114,101,115,115,61,52,48,45,53,102,44,99,48,45,100,102,58,48,48,48,48,45,102,102,102,102,10, - 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101, - 10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54, - 48,48,48,45,55,102,102,102,32,115,105,122,101,61,48,120,50,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97, - 100,100,114,101,115,115,61,55,48,45,55,49,44,102,48,45,102,49,58,48,48,48,48,45,102,102,102,102,10,10,98,111, - 97,114,100,58,32,72,73,82,79,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110, - 116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45, - 51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101, - 115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,10,98,111,97,114,100,58, - 32,72,73,82,79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110, - 116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45, - 51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101, - 115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,109,101,109,111,114, - 121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32, - 97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97, - 115,107,61,48,120,101,48,48,48,10,10,98,111,97,114,100,58,32,72,73,84,65,67,72,73,45,76,79,82,79,77,10, - 32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,72,71,53,49,66,83,49, - 54,57,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54, - 99,48,48,45,54,102,102,102,44,55,99,48,48,45,55,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121, - 112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,32,32,109,97,112, - 32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109, - 97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99, - 111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48, - 45,55,55,58,48,48,48,48,45,55,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79, - 77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,72,71,53,49, - 66,83,49,54,57,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110, - 116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,72,71,53,49,66,83,49,54,57,10,32,32, - 32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48, - 45,54,98,102,102,44,55,48,48,48,45,55,98,102,102,32,109,97,115,107,61,48,120,102,48,48,48,10,32,32,32,32, - 111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,76,79,82,79,77,10,32,32,109,101,109,111,114, + 99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,69,88,72,73,82,79,77,10,32,32,109,101,109,111,114, 121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109, - 97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58,56,48,48,48,45,102,102,102,102, - 32,109,97,115,107,61,48,120,56,48,48,48,10,10,98,111,97,114,100,58,32,76,79,82,79,77,45,82,65,77,10,32, - 32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109, - 10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58,56,48,48, - 48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,109,101,109,111,114,121,32,116,121,112,101, - 61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115, - 115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,56, - 48,48,48,10,10,98,111,97,114,100,58,32,76,79,82,79,77,45,82,65,77,35,65,10,32,32,109,101,109,111,114,121, - 32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97, - 112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32, - 109,97,115,107,61,48,120,56,48,48,48,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111, - 110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100, - 44,102,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,10,98,111, - 97,114,100,58,32,78,69,67,45,72,73,82,79,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77, + 97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,58,56,48,48,48,45,102,102,102,102,32,98,97,115,101,61, + 48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,58,48, + 48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97, + 100,100,114,101,115,115,61,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48, + 48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45, + 102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,10,98,111,97,114,100,58,32,69,88,72,73,82, + 79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116, + 61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,58,56, + 48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97, + 100,100,114,101,115,115,61,52,48,45,55,100,58,48,48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48, + 48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,56,48,45,98,102,58,56,48,48,48,45, + 102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101, + 115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48, + 10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10, + 32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,54,48,48,48, + 45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115, + 115,61,55,48,45,55,100,58,48,48,48,48,45,55,102,102,102,10,10,98,111,97,114,100,58,32,69,88,72,73,82,79, + 77,45,82,65,77,45,83,72,65,82,80,82,84,67,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77, 32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, - 61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,109,97,112,32,97, - 100,100,114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,112, - 114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45,57,102,58,54,48,48,48,45,55, - 102,102,102,32,109,97,115,107,61,48,120,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82, - 79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105,116,101,99,116,117,114,101,61, - 117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116, - 101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32, - 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97, - 114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,111,115,99,105,108,108,97,116, - 111,114,10,10,98,111,97,114,100,58,32,78,69,67,45,72,73,82,79,77,45,82,65,77,10,32,32,109,101,109,111,114, - 121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109, + 61,48,48,45,51,102,58,56,48,48,48,45,102,102,102,102,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32, + 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,58,48,48,48,48,45,102,102,102,102,32,98, + 97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,56,48,45, + 98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,109, + 97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61, + 48,120,99,48,48,48,48,48,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101, + 110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48, + 45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32,109,97, + 112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,58,48,48,48,48,45,55,102,102,102,10,32,32,114,116,99,32, + 109,97,110,117,102,97,99,116,117,114,101,114,61,83,104,97,114,112,10,32,32,32,32,109,97,112,32,97,100,100,114,101, + 115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,50,56,48,48,45,50,56,48,49,10,32,32,32,32,109,101,109, + 111,114,121,32,116,121,112,101,61,82,84,67,32,99,111,110,116,101,110,116,61,84,105,109,101,32,109,97,110,117,102,97, + 99,116,117,114,101,114,61,83,104,97,114,112,10,10,98,111,97,114,100,58,32,69,88,76,79,82,79,77,10,32,32,109, + 101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32, + 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,58,56,48,48,48,45,102,102,102,102,32,109, + 97,115,107,61,48,120,56,48,48,48,32,98,97,115,101,61,48,120,52,48,48,48,48,48,10,32,32,32,32,109,97,112, + 32,97,100,100,114,101,115,115,61,56,48,45,102,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120, + 56,48,48,48,32,98,97,115,101,61,48,120,48,48,48,48,48,48,10,10,98,111,97,114,100,58,32,69,88,76,79,82, + 79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116, + 61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,58,56, + 48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,32,98,97,115,101,61,48,120,52,48,48,48, + 48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,56,48,45,102,102,58,56,48,48,48,45,102,102, + 102,102,32,109,97,115,107,61,48,120,56,48,48,48,32,98,97,115,101,61,48,120,48,48,48,48,48,48,10,32,32,109, + 101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32, + 109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,55,102,102, + 102,32,109,97,115,107,61,48,120,56,48,48,48,10,10,98,111,97,114,100,58,32,69,88,78,69,67,45,76,79,82,79, + 77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103, + 114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58, + 56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111, + 114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,109,97,112,32, + 97,100,100,114,101,115,115,61,54,48,45,54,55,44,101,48,45,101,55,58,48,48,48,48,45,51,102,102,102,10,32,32, + 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97, + 109,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,109,101,109,111, + 114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101, + 99,116,117,114,101,61,117,80,68,57,54,48,53,48,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82, + 65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68, + 57,54,48,53,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,54,56,45,54,102,44,101,56, + 45,101,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,111,115, + 99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,69,88,83,80,67,55,49,49,48,45,82,65,77,45,69, + 80,83,79,78,82,84,67,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110, + 116,61,69,120,112,97,110,115,105,111,110,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,52, + 102,58,48,48,48,48,45,102,102,102,102,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105, + 101,114,61,83,80,67,55,49,49,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102, + 44,56,48,45,98,102,58,52,56,48,48,45,52,56,51,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, + 61,53,48,44,53,56,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109, 97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102, - 10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48, - 48,45,102,102,102,102,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116, - 61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98, - 102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,112,114,111,99,101,115, - 115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,97,112, - 32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45,57,102,58,54,48,48,48,45,55,102,102,102,32,109, - 97,115,107,61,48,120,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111, - 110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55, - 50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68, - 97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109, - 111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116, - 101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98, - 111,97,114,100,58,32,78,69,67,45,76,79,82,79,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79, + 32,109,97,115,107,61,48,120,56,48,48,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, + 61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32, + 32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111, + 103,114,97,109,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101, + 110,116,61,68,97,116,97,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116, + 101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102, + 44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,114, + 116,99,32,109,97,110,117,102,97,99,116,117,114,101,114,61,69,112,115,111,110,10,32,32,32,32,109,97,112,32,97,100, + 100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,52,48,45,52,56,52,50,10,32,32,32,32, + 109,101,109,111,114,121,32,116,121,112,101,61,82,84,67,32,99,111,110,116,101,110,116,61,84,105,109,101,32,109,97,110, + 117,102,97,99,116,117,114,101,114,61,69,112,115,111,110,10,10,98,111,97,114,100,58,32,71,66,45,76,79,82,79,77, + 10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114, + 97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102,102,58,56, + 48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100, + 114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61, + 48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,73,67, + 68,32,114,101,118,105,115,105,111,110,61,50,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45, + 51,102,44,56,48,45,98,102,58,54,48,48,48,45,54,55,102,102,44,55,48,48,48,45,55,102,102,102,10,32,32,32, + 32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,66,111,111,116,32,97,114, + 99,104,105,116,101,99,116,117,114,101,61,76,82,51,53,57,48,50,10,32,32,32,32,111,115,99,105,108,108,97,116,111, + 114,10,32,32,32,32,115,108,111,116,32,116,121,112,101,61,71,97,109,101,66,111,121,10,10,98,111,97,114,100,58,32, + 71,83,85,45,82,65,77,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101, + 61,71,83,85,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102, + 58,51,48,48,48,45,51,52,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99, + 111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, + 61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48, + 48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,53,102,44,99,48,45,100,102, + 58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99, + 111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48, + 45,51,102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,115,105,122,101,61,48,120,50,48,48,48,10, + 32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,49,44,102,48,45,102,49,58,48,48, + 48,48,45,102,102,102,102,10,10,98,111,97,114,100,58,32,72,73,82,79,77,10,32,32,109,101,109,111,114,121,32,116, + 121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32, + 97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32, + 32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,102, + 102,102,102,10,10,98,111,97,114,100,58,32,72,73,82,79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116, + 121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32, + 97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32, + 32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48,48,48,45,102, + 102,102,102,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97, + 118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,54, + 48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,10,98,111,97,114,100,58,32,72,73,84, + 65,67,72,73,45,76,79,82,79,77,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116, + 117,114,101,61,72,71,53,49,66,83,49,54,57,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48, + 45,51,102,44,56,48,45,98,102,58,54,99,48,48,45,54,102,102,102,44,55,99,48,48,45,55,102,102,102,10,32,32, + 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97, + 109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58, + 56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,109,101,109,111,114,121, + 32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112, + 32,97,100,100,114,101,115,115,61,55,48,45,55,55,58,48,48,48,48,45,55,102,102,102,10,32,32,32,32,109,101,109, + 111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116, + 101,99,116,117,114,101,61,72,71,53,49,66,83,49,54,57,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101, + 61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,72, + 71,53,49,66,83,49,54,57,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102, + 44,56,48,45,98,102,58,54,48,48,48,45,54,98,102,102,44,55,48,48,48,45,55,98,102,102,32,109,97,115,107,61, + 48,120,102,48,48,48,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,76,79, + 82,79,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114, + 111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55,100,44,56,48,45,102, + 102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,10,98,111,97,114,100,58,32, + 76,79,82,79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116, + 101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,55, + 100,44,56,48,45,102,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32, + 109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32, + 32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,55,102, + 102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,10,98,111,97,114,100,58,32,76,79,82,79,77,45,82,65,77, + 35,65,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111, + 103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102, + 58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,109,101,109,111,114,121,32, + 116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100, + 100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107, + 61,48,120,56,48,48,48,10,10,98,111,97,114,100,58,32,78,69,67,45,72,73,82,79,77,10,32,32,109,101,109,111, + 114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32, + 109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102, + 102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55,100,44,99,48,45,102,102,58,48,48, + 48,48,45,102,102,102,102,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101, + 61,117,80,68,55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56, + 48,45,57,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,102,102,102,10,32,32,32,32,109,101, + 109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114, + 99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121, + 112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101, + 61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110, + 116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32, + 32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,78,69,67,45,72,73,82,79,77,45, + 82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114, + 111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98, + 102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,55, + 100,44,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61, + 82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, + 61,50,48,45,51,102,44,97,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48, + 48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55, + 55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45,57,102,58, + 54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32, + 116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105,116,101, + 99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79, + 77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55, + 55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61, + 68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,111,115, + 99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,78,69,67,45,76,79,82,79,77,10,32,32,109,101,109, + 111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32, + 32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45,57,102,58,56,48,48,48,45,102,102, + 102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105, + 116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, + 51,48,45,51,102,44,98,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,51,102,102, + 102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114, + 111,103,114,97,109,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109, + 101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104, + 105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101, + 61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117, + 80,68,55,55,50,53,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,78,69, + 67,45,76,79,82,79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111, + 110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48, + 45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10, + 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32, + 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45, + 55,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99, + 104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115, + 115,61,54,48,45,54,102,44,101,48,45,101,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,51, + 102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61, + 80,114,111,103,114,97,109,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32, + 32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114, + 99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121, + 112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101, + 61,117,80,68,55,55,50,53,10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32, + 78,69,67,45,76,79,82,79,77,45,82,65,77,35,65,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79, 77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115, 115,61,48,48,45,49,102,44,56,48,45,57,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56, - 48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68, - 55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,51,48,45,51,102,44,98,48,45,98,102, - 58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,51,102,102,102,10,32,32,32,32,109,101,109,111,114, - 121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105, - 116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61, - 82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80, - 68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110, - 116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32, - 111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,78,69,67,45,76,79,82,79,77,45,82,65,77, - 10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114, - 97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56, - 48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,109,101,109,111,114,121,32,116,121, - 112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114, - 101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48, - 120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117, - 80,68,55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,54,48,45,54,102,44,101,48,45, - 101,102,58,48,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,51,102,102,102,10,32,32,32,32,109,101,109, - 111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99, - 104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112, - 101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61, - 117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116, - 101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32, - 32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,78,69,67,45,76,79,82,79,77,45,82, - 65,77,35,65,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80, - 114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45, - 57,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,109,101,109,111,114, - 121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32, - 97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32, - 112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32, - 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58,56,48,48,48,45, - 102,102,102,102,32,109,97,115,107,61,48,120,51,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101, - 61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32,97,114,99,104,105,116,101,99,116,117,114, - 101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111, - 110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10, - 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,68,97,116,97, - 32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,111,115,99,105,108,108, - 97,116,111,114,10,10,98,111,97,114,100,58,32,79,66,67,49,45,76,79,82,79,77,45,82,65,77,10,32,32,109,101, - 109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102, - 102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110, - 116,105,102,105,101,114,61,79,66,67,49,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51, - 102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,49,44,102,48,45,102,49,58,54,48,48,48,45,55, - 102,102,102,44,101,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32,109,101, - 109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,10,98,111,97,114, - 100,58,32,83,65,49,45,82,65,77,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116, - 117,114,101,61,87,54,53,67,56,49,54,83,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45, - 51,102,44,56,48,45,98,102,58,50,50,48,48,45,50,51,102,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32, - 32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102, - 102,102,32,109,97,115,107,61,48,120,52,48,56,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101, - 115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,101,109,111,114,121,32, - 116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,101,109, - 111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32, - 109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102, - 102,32,115,105,122,101,61,48,120,50,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 52,48,45,52,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61, - 82,65,77,32,99,111,110,116,101,110,116,61,73,110,116,101,114,110,97,108,10,32,32,32,32,32,32,109,97,112,32,97, - 100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,51,48,48,48,45,51,55,102,102,32,115,105,122, - 101,61,48,120,56,48,48,10,10,98,111,97,114,100,58,32,83,68,68,49,10,32,32,112,114,111,99,101,115,115,111,114, - 32,105,100,101,110,116,105,102,105,101,114,61,83,68,68,49,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, - 61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48,45,52,56,48,102,10,32,32,32,32,109,99,117,10,32, - 32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48, - 48,45,102,102,102,102,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48, - 48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99, - 111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,10,98,111,97,114,100,58,32,83,68,68,49,45,82,65,77,10, - 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32, - 32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48,45, - 55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, - 61,55,48,45,55,51,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112, - 114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83,68,68,49,10,32,32,32,32,109,97,112, - 32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48,45,52,56,48,102,10,32, - 32,32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56, - 48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115, - 61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121, - 112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,10,98,111,97,114,100,58,32,83, - 80,67,55,49,49,48,45,82,65,77,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101, - 114,61,83,80,67,55,49,49,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44, - 56,48,45,98,102,58,52,56,48,48,45,52,56,51,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 53,48,44,53,56,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109,97, - 112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32, - 109,97,115,107,61,48,120,56,48,48,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32, - 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103, - 114,97,109,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110, - 116,61,68,97,116,97,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101, - 110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44, - 56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,10,98,111,97, - 114,100,58,32,83,80,67,55,49,49,48,45,82,65,77,45,69,80,83,79,78,82,84,67,10,32,32,112,114,111,99,101, - 115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83,80,67,55,49,49,48,10,32,32,32,32,109,97,112,32, - 97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48,45,52,56,51,102,10,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,53,48,44,53,56,58,48,48,48,48,45,102,102,102,102,10,32,32, + 48,48,48,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97, + 118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58,48, + 48,48,48,45,102,102,102,102,10,32,32,112,114,111,99,101,115,115,111,114,32,97,114,99,104,105,116,101,99,116,117,114, + 101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44, + 97,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,51,102,102,102,10,32,32,32,32, + 109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,32, + 97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32, + 116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117, + 114,101,61,117,80,68,55,55,50,53,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99, + 111,110,116,101,110,116,61,68,97,116,97,32,97,114,99,104,105,116,101,99,116,117,114,101,61,117,80,68,55,55,50,53, + 10,32,32,32,32,111,115,99,105,108,108,97,116,111,114,10,10,98,111,97,114,100,58,32,79,66,67,49,45,76,79,82, + 79,77,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116, + 61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56, + 48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,112,114,111, + 99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,79,66,67,49,10,32,32,32,32,109,97,112,32,97, + 100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115, + 107,61,48,120,101,48,48,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,49,44,102, + 48,45,102,49,58,54,48,48,48,45,55,102,102,102,44,101,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120, + 101,48,48,48,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116, + 61,83,97,118,101,10,10,98,111,97,114,100,58,32,83,65,49,45,82,65,77,10,32,32,112,114,111,99,101,115,115,111, + 114,32,97,114,99,104,105,116,101,99,116,117,114,101,61,87,54,53,67,56,49,54,83,10,32,32,32,32,109,97,112,32, + 97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,50,50,48,48,45,50,51,102,102,10,32,32, 32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48, - 45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,48,48,10,32,32,32,32, - 32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97, - 115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79, - 77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116, - 121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,10,32,32,32,32,109,101,109,111,114,121,32, - 116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32, - 97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97, - 115,107,61,48,120,101,48,48,48,10,32,32,114,116,99,32,109,97,110,117,102,97,99,116,117,114,101,114,61,69,112,115, - 111,110,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52, - 56,52,48,45,52,56,52,50,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,84,67,32,99,111,110, - 116,101,110,116,61,84,105,109,101,32,109,97,110,117,102,97,99,116,117,114,101,114,61,69,112,115,111,110,10,10,98,111, - 97,114,100,58,32,83,84,45,76,79,82,79,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32, - 99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61, - 48,48,45,49,102,44,56,48,45,57,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48, - 48,10,32,32,115,108,111,116,32,116,121,112,101,61,83,117,102,97,109,105,84,117,114,98,111,10,32,32,32,32,114,111, - 109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50,48,45,51,102,44,97,48,45,98,102,58, - 56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,114,97,109,10,32,32, - 32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,54,48,45,54,102,44,101,48,45,101,102,58,48,48,48,48, - 45,102,102,102,102,10,32,32,115,108,111,116,32,116,121,112,101,61,83,117,102,97,109,105,84,117,114,98,111,10,32,32, - 32,32,114,111,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,52,48,45,53,102,44,99,48, - 45,100,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,32,32,114,97, - 109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,100,44,102,48,45,102,102,58, - 48,48,48,48,45,102,102,102,102,10,10, + 45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,52,48,56,48,48,48,10,32,32,32,32, + 32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32, + 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103, + 114,97,109,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61, + 83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45, + 98,102,58,54,48,48,48,45,55,102,102,102,32,115,105,122,101,61,48,120,50,48,48,48,10,32,32,32,32,32,32,109, + 97,112,32,97,100,100,114,101,115,115,61,52,48,45,52,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109, + 101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,73,110,116,101,114,110,97,108,10, + 32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,51,48, + 48,48,45,51,55,102,102,32,115,105,122,101,61,48,120,56,48,48,10,10,98,111,97,114,100,58,32,83,68,68,49,10, + 32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83,68,68,49,10,32,32,32,32, + 109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48,45,52,56,48, + 102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51, + 102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114, + 101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32,109,101,109,111,114,121, + 32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,10,98,111,97,114,100, + 58,32,83,68,68,49,45,82,65,77,10,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110, + 116,101,110,116,61,83,97,118,101,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44, + 56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,32,32, + 109,97,112,32,97,100,100,114,101,115,115,61,55,48,45,55,51,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107, + 61,48,120,56,48,48,48,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83, + 68,68,49,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58, + 52,56,48,48,45,52,56,48,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114, + 101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,10,32,32,32,32,32,32, + 109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32, + 32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97, + 109,10,10,98,111,97,114,100,58,32,83,80,67,55,49,49,48,45,82,65,77,10,32,32,112,114,111,99,101,115,115,111, + 114,32,105,100,101,110,116,105,102,105,101,114,61,83,80,67,55,49,49,48,10,32,32,32,32,109,97,112,32,97,100,100, + 114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52,56,48,48,45,52,56,51,102,10,32,32,32,32,109, + 97,112,32,97,100,100,114,101,115,115,61,53,48,44,53,56,58,48,48,48,48,45,102,102,102,102,10,32,32,32,32,109, + 99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102, + 58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48,48,48,10,32,32,32,32,32,32,109, + 97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61, + 48,120,99,48,48,48,48,48,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99, + 111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,32,32,109,101,109,111,114,121,32,116,121,112,101, + 61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,10,32,32,32,32,109,101,109,111,114,121,32,116,121,112, + 101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101,10,32,32,32,32,32,32,109,97,112,32,97,100,100, + 114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54,48,48,48,45,55,102,102,102,32,109,97,115,107,61, + 48,120,101,48,48,48,10,10,98,111,97,114,100,58,32,83,80,67,55,49,49,48,45,82,65,77,45,69,80,83,79,78, + 82,84,67,10,32,32,112,114,111,99,101,115,115,111,114,32,105,100,101,110,116,105,102,105,101,114,61,83,80,67,55,49, + 49,48,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,52, + 56,48,48,45,52,56,51,102,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,53,48,44,53,56,58,48, + 48,48,48,45,102,102,102,102,10,32,32,32,32,109,99,117,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101, + 115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120, + 56,48,48,48,48,48,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,99,48,45,102,102,58,48, + 48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,99,48,48,48,48,48,10,32,32,32,32,32,32,109,101,109, + 111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32, + 32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,68,97,116,97,10, + 32,32,32,32,109,101,109,111,114,121,32,116,121,112,101,61,82,65,77,32,99,111,110,116,101,110,116,61,83,97,118,101, + 10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48,45,51,102,44,56,48,45,98,102,58,54, + 48,48,48,45,55,102,102,102,32,109,97,115,107,61,48,120,101,48,48,48,10,32,32,114,116,99,32,109,97,110,117,102, + 97,99,116,117,114,101,114,61,69,112,115,111,110,10,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,48,48, + 45,51,102,44,56,48,45,98,102,58,52,56,52,48,45,52,56,52,50,10,32,32,32,32,109,101,109,111,114,121,32,116, + 121,112,101,61,82,84,67,32,99,111,110,116,101,110,116,61,84,105,109,101,32,109,97,110,117,102,97,99,116,117,114,101, + 114,61,69,112,115,111,110,10,10,98,111,97,114,100,58,32,83,84,45,76,79,82,79,77,10,32,32,109,101,109,111,114, + 121,32,116,121,112,101,61,82,79,77,32,99,111,110,116,101,110,116,61,80,114,111,103,114,97,109,10,32,32,32,32,109, + 97,112,32,97,100,100,114,101,115,115,61,48,48,45,49,102,44,56,48,45,57,102,58,56,48,48,48,45,102,102,102,102, + 32,109,97,115,107,61,48,120,56,48,48,48,10,32,32,115,108,111,116,32,116,121,112,101,61,83,117,102,97,109,105,84, + 117,114,98,111,10,32,32,32,32,114,111,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,50, + 48,45,51,102,44,97,48,45,98,102,58,56,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120,56,48,48,48, + 10,32,32,32,32,114,97,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,54,48,45,54,102, + 44,101,48,45,101,102,58,48,48,48,48,45,102,102,102,102,10,32,32,115,108,111,116,32,116,121,112,101,61,83,117,102, + 97,109,105,84,117,114,98,111,10,32,32,32,32,114,111,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101, + 115,115,61,52,48,45,53,102,44,99,48,45,100,102,58,48,48,48,48,45,102,102,102,102,32,109,97,115,107,61,48,120, + 56,48,48,48,10,32,32,32,32,114,97,109,10,32,32,32,32,32,32,109,97,112,32,97,100,100,114,101,115,115,61,55, + 48,45,55,100,44,102,48,45,102,102,58,48,48,48,48,45,102,102,102,102,10,10, }; const unsigned char IPLROM[64] = { 205,239,189,232,0,198,29,208,252,143,170,244,143,187,245,120,204,244,208,251,47,25,235,244,208,252,126,244,208,11,228,245, diff --git a/bsnes/target-bsnes/resource/resource.hpp b/bsnes/target-bsnes/resource/resource.hpp index dfa53ec3..d95577ff 100644 --- a/bsnes/target-bsnes/resource/resource.hpp +++ b/bsnes/target-bsnes/resource/resource.hpp @@ -2,7 +2,7 @@ namespace Resource { extern const unsigned char Icon[3463]; extern const unsigned char Logo[23467]; namespace System { -extern const char Boards[30188]; +extern const unsigned char Boards[30838]; extern const unsigned char IPLROM[64]; } } diff --git a/bsnes/systems/Super Famicom.sys/boards.bml b/bsnes/target-bsnes/resource/system/boards.bml similarity index 97% rename from bsnes/systems/Super Famicom.sys/boards.bml rename to bsnes/target-bsnes/resource/system/boards.bml index 416924fa..3dce9f8f 100644 --- a/bsnes/systems/Super Famicom.sys/boards.bml +++ b/bsnes/target-bsnes/resource/system/boards.bml @@ -669,6 +669,13 @@ board: EVENT-PF94 memory type=RAM content=Data architecture=uPD7725 oscillator +board: EXHIROM + memory type=ROM content=Program + map address=00-3f:8000-ffff base=0x400000 + map address=40-7d:0000-ffff base=0x400000 + map address=80-bf:8000-ffff mask=0xc00000 + map address=c0-ff:0000-ffff mask=0xc00000 + board: EXHIROM-RAM memory type=ROM content=Program map address=00-3f:8000-ffff base=0x400000 @@ -692,6 +699,18 @@ board: EXHIROM-RAM-SHARPRTC map address=00-3f,80-bf:2800-2801 memory type=RTC content=Time manufacturer=Sharp +board: EXLOROM + memory type=ROM content=Program + map address=00-7d:8000-ffff mask=0x8000 base=0x400000 + map address=80-ff:8000-ffff mask=0x8000 base=0x000000 + +board: EXLOROM-RAM + memory type=ROM content=Program + map address=00-7d:8000-ffff mask=0x8000 base=0x400000 + map address=80-ff:8000-ffff mask=0x8000 base=0x000000 + memory type=RAM content=Save + map address=70-7d,f0-ff:0000-7fff mask=0x8000 + board: EXNEC-LOROM memory type=ROM content=Program map address=00-7d,80-ff:8000-ffff mask=0x8000 diff --git a/bsnes/systems/Super Famicom.sys/ipl.rom b/bsnes/target-bsnes/resource/system/ipl.rom similarity index 100% rename from bsnes/systems/Super Famicom.sys/ipl.rom rename to bsnes/target-bsnes/resource/system/ipl.rom diff --git a/bsnes/target-bsnes/settings/drivers.cpp b/bsnes/target-bsnes/settings/drivers.cpp index a717f941..2b11e51e 100644 --- a/bsnes/target-bsnes/settings/drivers.cpp +++ b/bsnes/target-bsnes/settings/drivers.cpp @@ -13,14 +13,6 @@ auto DriverSettings::create() -> void { videoDriverUpdate.setText("Change").onActivate([&] { videoDriverChange(); }); videoFormatLabel.setText("Format:"); videoFormatOption.onChange([&] { videoFormatChange(); }); - videoExclusiveToggle.setText("Exclusive fullscreen mode").setToolTip( - "(Direct3D driver only)\n\n" - "Acquires exclusive access to the display in fullscreen mode.\n" - "Eliminates compositing issues such as video stuttering." - ).onToggle([&] { - settings.video.exclusive = videoExclusiveToggle.checked(); - program.updateVideoExclusive(); - }); videoBlockingToggle.setText("Synchronize").setToolTip( "Waits for the video card to be ready before rendering frames.\n" "Eliminates dropped or duplicated frames; but can distort audio.\n\n" @@ -119,7 +111,6 @@ auto DriverSettings::videoDriverChanged() -> void { videoDriverActive.setText({"Active driver: ", video.driver()}); videoDriverOption.doChange(); videoFormatChanged(); - videoExclusiveToggle.setChecked(settings.video.exclusive && video.hasExclusive()).setEnabled(video.hasExclusive()); videoBlockingToggle.setChecked(video.blocking()).setEnabled(video.hasBlocking()); videoFlushToggle.setChecked(video.flush()).setEnabled(video.hasFlush()); layout.setGeometry(layout.geometry()); diff --git a/bsnes/target-bsnes/settings/settings.cpp b/bsnes/target-bsnes/settings/settings.cpp index c3c247f2..a257539b 100644 --- a/bsnes/target-bsnes/settings/settings.cpp +++ b/bsnes/target-bsnes/settings/settings.cpp @@ -14,7 +14,8 @@ HotkeySettings hotkeySettings; PathSettings pathSettings; EmulatorSettings emulatorSettings; DriverSettings driverSettings; -SettingsWindow settingsWindow; +namespace Instances { Instance settingsWindow; } +SettingsWindow& settingsWindow = Instances::settingsWindow(); auto Settings::load() -> void { Markup::Node::operator=(BML::unserialize(string::read(location), " ")); @@ -43,21 +44,23 @@ auto Settings::process(bool load) -> void { } \ bind(text, "Video/Driver", video.driver); - bind(boolean, "Video/Exclusive", video.exclusive); bind(boolean, "Video/Blocking", video.blocking); bind(boolean, "Video/Flush", video.flush); bind(text, "Video/Format", video.format); bind(text, "Video/Shader", video.shader); - bind(natural, "Video/Luminance", video.luminance); - bind(natural, "Video/Saturation", video.saturation); - bind(natural, "Video/Gamma", video.gamma); + bind(natural, "Video/Luminance", video.luminance); + bind(natural, "Video/Saturation", video.saturation); + bind(natural, "Video/Gamma", video.gamma); + bind(boolean, "Video/FastForwardFrameSkip", video.fastForwardFrameSkip); + bind(boolean, "Video/Snow", video.snow); bind(text, "Video/Output", video.output); bind(natural, "Video/Multiplier", video.multiplier); bind(boolean, "Video/AspectCorrection", video.aspectCorrection); bind(boolean, "Video/Overscan", video.overscan); bind(boolean, "Video/Blur", video.blur); + bind(text, "Video/Filter", video.filter); bind(text, "Audio/Driver", audio.driver); bind(boolean, "Audio/Exclusive", audio.exclusive); diff --git a/bsnes/target-bsnes/settings/settings.hpp b/bsnes/target-bsnes/settings/settings.hpp index 02f2947f..8fd469f8 100644 --- a/bsnes/target-bsnes/settings/settings.hpp +++ b/bsnes/target-bsnes/settings/settings.hpp @@ -9,7 +9,6 @@ struct Settings : Markup::Node { struct Video { string driver; - bool exclusive = false; bool blocking = false; bool flush = false; string format = "Default"; @@ -18,12 +17,15 @@ struct Settings : Markup::Node { uint luminance = 100; uint saturation = 100; uint gamma = 150; + bool fastForwardFrameSkip = true; + bool snow = false; string output = "Scale"; uint multiplier = 2; bool aspectCorrection = true; bool overscan = false; bool blur = false; + string filter = "None"; } video; struct Audio { @@ -126,6 +128,9 @@ private: Label gammaLabel{&colorLayout, Size{0, 0}}; Label gammaValue{&colorLayout, Size{50_sx, 0}}; HorizontalSlider gammaSlider{&colorLayout, Size{~0, 0}}; + // + CheckLabel fastForwardFrameSkip{&layout, Size{~0, 0}}; + CheckLabel snowOption{&layout, Size{~0, 0}}; }; struct AudioSettings : TabFrameItem { @@ -318,7 +323,6 @@ public: HorizontalLayout videoPropertyLayout{&videoLayout, Size{~0, 0}}; ComboButton videoFormatOption{&videoPropertyLayout, Size{0, 0}}; HorizontalLayout videoToggleLayout{&layout, Size{~0, 0}}; - CheckLabel videoExclusiveToggle{&videoToggleLayout, Size{0, 0}}; CheckLabel videoBlockingToggle{&videoToggleLayout, Size{0, 0}}; CheckLabel videoFlushToggle{&videoToggleLayout, Size{0, 0}}; Canvas videoSpacer{&layout, Size{~0, 1}}; @@ -369,4 +373,5 @@ extern HotkeySettings hotkeySettings; extern PathSettings pathSettings; extern EmulatorSettings emulatorSettings; extern DriverSettings driverSettings; -extern SettingsWindow settingsWindow; +namespace Instances { extern Instance settingsWindow; } +extern SettingsWindow& settingsWindow; diff --git a/bsnes/target-bsnes/settings/video.cpp b/bsnes/target-bsnes/settings/video.cpp index 28d055e3..86190c6f 100644 --- a/bsnes/target-bsnes/settings/video.cpp +++ b/bsnes/target-bsnes/settings/video.cpp @@ -31,4 +31,16 @@ auto VideoSettings::create() -> void { gammaValue.setText(value); program.updateVideoPalette(); }).doChange(); + + fastForwardFrameSkip.setText("Skip frames while fast forwarding").setChecked(settings.video.fastForwardFrameSkip).setToolTip({ + "When using the fast forward hotkey, this option will enable a frame skip of 9.\n" + "Frame skipping while fast forwarding allows a higher maximum frame skipping frame rate." + }).onToggle([&] { + settings.video.fastForwardFrameSkip = fastForwardFrameSkip.checked(); + }); + + snowOption.setText("Draw snow effect when idle").setChecked(settings.video.snow).onToggle([&] { + settings.video.snow = snowOption.checked(); + presentation.updateProgramIcon(); + }); } diff --git a/bsnes/target-bsnes/tools/cheat-editor.cpp b/bsnes/target-bsnes/tools/cheat-editor.cpp index cc731cd9..8d677593 100644 --- a/bsnes/target-bsnes/tools/cheat-editor.cpp +++ b/bsnes/target-bsnes/tools/cheat-editor.cpp @@ -18,16 +18,21 @@ auto CheatDatabase::create() -> void { auto CheatDatabase::findCheats() -> void { auto sha256 = emulator->hashes()[0]; - auto document = BML::unserialize(string::read(locate("cheats.bml"))); + auto document = BML::unserialize(string::read(locate("Database/Cheat Codes.bml"))); for(auto game : document.find("cartridge")) { if(game["sha256"].text() != sha256) continue; cheatList.reset(); for(auto cheat : game.find("cheat")) { + //convert old cheat format (address/data and address/compare/data) + //to new cheat format (address=data and address=compare?data) + auto code = cheat["code"].text(); + code.replace("/", "=", 1L); + code.replace("/", "?", 1L); cheatList.append(ListViewItem() .setCheckable() .setText(cheat["description"].text()) - .setProperty("code", cheat["code"].text()) + .setProperty("code", code) ); } @@ -158,8 +163,8 @@ auto CheatEditor::create() -> void { removeCheats(); }); - //do not display "Find Cheats" button if there is no cheat database available - if(!file::exists(locate("cheats.bml"))) findCheatsButton.setVisible(false); + //hide the "Find Cheats" button if the cheat code database isn't found + if(!file::exists(locate("Database/Cheat Codes.bml"))) findCheatsButton.setVisible(false); } auto CheatEditor::refresh() -> void { diff --git a/bsnes/target-bsnes/tools/tools.cpp b/bsnes/target-bsnes/tools/tools.cpp index 98da0e9f..39f89dc8 100644 --- a/bsnes/target-bsnes/tools/tools.cpp +++ b/bsnes/target-bsnes/tools/tools.cpp @@ -2,13 +2,17 @@ #include "cheat-editor.cpp" #include "state-manager.cpp" #include "manifest-viewer.cpp" -CheatDatabase cheatDatabase; -CheatWindow cheatWindow; +namespace Instances { Instance cheatDatabase; } +CheatDatabase& cheatDatabase = Instances::cheatDatabase(); +namespace Instances { Instance cheatWindow; } +CheatWindow& cheatWindow = Instances::cheatWindow(); CheatEditor cheatEditor; -StateWindow stateWindow; +namespace Instances { Instance stateWindow; } +StateWindow& stateWindow = Instances::stateWindow(); StateManager stateManager; ManifestViewer manifestViewer; -ToolsWindow toolsWindow; +namespace Instances { Instance toolsWindow; } +ToolsWindow& toolsWindow = Instances::toolsWindow(); auto ToolsWindow::create() -> void { layout.setPadding(5_sx); diff --git a/bsnes/target-bsnes/tools/tools.hpp b/bsnes/target-bsnes/tools/tools.hpp index 979023ff..a6a9743b 100644 --- a/bsnes/target-bsnes/tools/tools.hpp +++ b/bsnes/target-bsnes/tools/tools.hpp @@ -156,10 +156,14 @@ public: TabFrame panel{&layout, Size{~0, ~0}}; }; -extern CheatDatabase cheatDatabase; -extern CheatWindow cheatWindow; +namespace Instances { extern Instance cheatDatabase; } +extern CheatDatabase& cheatDatabase; +namespace Instances { extern Instance cheatWindow; } +extern CheatWindow& cheatWindow; extern CheatEditor cheatEditor; -extern StateWindow stateWindow; +namespace Instances { extern Instance stateWindow; } +extern StateWindow& stateWindow; extern StateManager stateManager; extern ManifestViewer manifestViewer; -extern ToolsWindow toolsWindow; +namespace Instances { extern Instance toolsWindow; } +extern ToolsWindow& toolsWindow; diff --git a/hiro/cocoa/monitor.cpp b/hiro/cocoa/monitor.cpp index 7d8e6020..1f201577 100644 --- a/hiro/cocoa/monitor.cpp +++ b/hiro/cocoa/monitor.cpp @@ -9,12 +9,18 @@ auto pMonitor::count() -> uint { } auto pMonitor::dpi(uint monitor) -> Position { + //macOS includes built-in HiDPI scaling support. + //it may be better to rely on per-application scaling, + //but for now we'll let macOS handle it so it works in all hiro applications. + #if 0 @autoreleasepool { NSScreen* screen = [[NSScreen screens] objectAtIndex:monitor]; NSDictionary* dictionary = [screen deviceDescription]; NSSize dpi = [[dictionary objectForKey:NSDeviceSize] sizeValue]; return {dpi.width, dpi.height}; } + #endif + return {96.0, 96.0}; } auto pMonitor::geometry(uint monitor) -> Geometry { @@ -30,7 +36,7 @@ auto pMonitor::geometry(uint monitor) -> Geometry { } auto pMonitor::primary() -> uint { - //on macOS, the primary monitor is always the first monitor + //on macOS, the primary monitor is always the first monitor. return 0; } diff --git a/hiro/cocoa/widget/canvas.cpp b/hiro/cocoa/widget/canvas.cpp index 4cc83daa..85db2da9 100644 --- a/hiro/cocoa/widget/canvas.cpp +++ b/hiro/cocoa/widget/canvas.cpp @@ -96,8 +96,6 @@ auto pCanvas::construct() -> void { @autoreleasepool { cocoaView = cocoaCanvas = [[CocoaCanvas alloc] initWith:self()]; pWidget::construct(); - - setDroppable(state().droppable); } } @@ -131,6 +129,10 @@ auto pCanvas::setDroppable(bool droppable) -> void { } } +auto pCanvas::setFocusable(bool focusable) -> void { + //TODO +} + auto pCanvas::setGeometry(Geometry geometry) -> void { pWidget::setGeometry(geometry); update(); @@ -168,7 +170,6 @@ auto pCanvas::_rasterize() -> void { if(width != surfaceWidth || height != surfaceHeight) { [cocoaView setImage:nil]; - [surface release]; surface = nullptr; bitmap = nullptr; } diff --git a/hiro/cocoa/widget/canvas.hpp b/hiro/cocoa/widget/canvas.hpp index 6c1d9a9c..942e0fb0 100644 --- a/hiro/cocoa/widget/canvas.hpp +++ b/hiro/cocoa/widget/canvas.hpp @@ -29,7 +29,8 @@ struct pCanvas : pWidget { auto minimumSize() const -> Size; auto setAlignment(Alignment) -> void; auto setColor(Color color) -> void; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; auto setGeometry(Geometry geometry) -> void override; auto setGradient(Gradient gradient) -> void; auto setIcon(const image& icon) -> void; diff --git a/hiro/cocoa/widget/text-edit.cpp b/hiro/cocoa/widget/text-edit.cpp index 3b18ed56..2586c282 100644 --- a/hiro/cocoa/widget/text-edit.cpp +++ b/hiro/cocoa/widget/text-edit.cpp @@ -53,7 +53,7 @@ auto pTextEdit::construct() -> void { setEditable(state().editable); setWordWrap(state().wordWrap); setText(state().text); - setCursor(state().cursor); + setTextCursor(state().textCursor); } } @@ -67,15 +67,6 @@ auto pTextEdit::destruct() -> void { auto pTextEdit::setBackgroundColor(Color color) -> void { } -auto pTextEdit::setCursor(Cursor cursor) -> void { - @autoreleasepool { - //todo: handle text selection (cursor.length()) - string text = [[[cocoaView content] string] UTF8String]; - auto offset = min(cursor.offset(), text.length()); - [[cocoaView content] setSelectedRange:NSMakeRange(offset, 0)]; - } -} - auto pTextEdit::setEditable(bool editable) -> void { @autoreleasepool { [[cocoaView content] setEditable:(editable && self().enabled(true))]; @@ -102,6 +93,15 @@ auto pTextEdit::setText(const string& text) -> void { } } +auto pTextEdit::setTextCursor(TextCursor cursor) -> void { + @autoreleasepool { + //todo: handle text selection (cursor.length()) + string text = [[[cocoaView content] string] UTF8String]; + auto offset = min(cursor.offset(), text.length()); + [[cocoaView content] setSelectedRange:NSMakeRange(offset, 0)]; + } +} + auto pTextEdit::setWordWrap(bool wordWrap) -> void { @autoreleasepool { [cocoaView configure]; @@ -114,6 +114,11 @@ auto pTextEdit::text() const -> string { } } +auto pTextEdit::textCursor() const -> TextCursor { + //TODO + return state().textCursor; +} + } #endif diff --git a/hiro/cocoa/widget/text-edit.hpp b/hiro/cocoa/widget/text-edit.hpp index 745784ea..4a876433 100644 --- a/hiro/cocoa/widget/text-edit.hpp +++ b/hiro/cocoa/widget/text-edit.hpp @@ -17,14 +17,15 @@ struct pTextEdit : pWidget { Declare(TextEdit, Widget) auto setBackgroundColor(Color color) -> void; - auto setCursor(Cursor cursor) -> void; auto setEditable(bool editable) -> void; auto setEnabled(bool enabled) -> void override; auto setFont(const Font& font) -> void override; auto setForegroundColor(Color color) -> void; auto setText(const string& text) -> void; + auto setTextCursor(TextCursor textCursor) -> void; auto setWordWrap(bool wordWrap) -> void; auto text() const -> string; + auto textCursor() const -> TextCursor; CocoaTextEdit* cocoaTextEdit = nullptr; }; diff --git a/hiro/cocoa/widget/viewport.cpp b/hiro/cocoa/widget/viewport.cpp index 515707d5..3ae50ae0 100644 --- a/hiro/cocoa/widget/viewport.cpp +++ b/hiro/cocoa/widget/viewport.cpp @@ -67,6 +67,8 @@ auto pViewport::setDroppable(bool droppable) -> void { } } +auto pViewport::setFocusable(bool focusable) -> void { + //TODO } #endif diff --git a/hiro/cocoa/widget/viewport.hpp b/hiro/cocoa/widget/viewport.hpp index b9811b17..f6301a8c 100644 --- a/hiro/cocoa/widget/viewport.hpp +++ b/hiro/cocoa/widget/viewport.hpp @@ -19,7 +19,8 @@ struct pViewport : pWidget { Declare(Viewport, Widget) auto handle() const -> uintptr_t; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; CocoaViewport* cocoaViewport = nullptr; }; diff --git a/hiro/cocoa/widget/widget.cpp b/hiro/cocoa/widget/widget.cpp index d61e9834..e4f8a881 100644 --- a/hiro/cocoa/widget/widget.cpp +++ b/hiro/cocoa/widget/widget.cpp @@ -12,8 +12,11 @@ auto pWidget::construct() -> void { if(auto window = self().parentWindow(true)) { if(auto p = window->self()) p->_append(self()); + setDroppable(self().droppable()); setEnabled(self().enabled(true)); + setFocusable(self().focusable()); setFont(self().font(true)); + setMouseCursor(self().mouseCursor()); setToolTip(self().toolTip()); setVisible(self().visible(true)); } @@ -33,6 +36,10 @@ auto pWidget::focused() const -> bool { } } +auto pWidget::setDroppable(bool droppable) -> void { + //virtual +} + auto pWidget::setEnabled(bool enabled) -> void { if(abstract) enabled = false; @@ -43,6 +50,10 @@ auto pWidget::setEnabled(bool enabled) -> void { } } +auto pWidget::setFocusable(bool focusable) -> void { + //virtual +} + auto pWidget::setFocused() -> void { @autoreleasepool { [[cocoaView window] makeFirstResponder:cocoaView]; @@ -66,6 +77,10 @@ auto pWidget::setGeometry(Geometry geometry) -> void { pSizable::setGeometry(geometry); } +auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void { + //TODO +} + auto pWidget::setToolTip(const string& toolTip) -> void { //TODO } diff --git a/hiro/cocoa/widget/widget.hpp b/hiro/cocoa/widget/widget.hpp index 6f9f0904..13203012 100644 --- a/hiro/cocoa/widget/widget.hpp +++ b/hiro/cocoa/widget/widget.hpp @@ -6,10 +6,13 @@ struct pWidget : pSizable { Declare(Widget, Sizable) auto focused() const -> bool; + virtual auto setDroppable(bool droppable) -> void; auto setEnabled(bool enabled) -> void override; + virtual auto setFocusable(bool focusable) -> void; auto setFocused() -> void override; auto setFont(const Font& font) -> void override; auto setGeometry(Geometry geometry) -> void override; + auto setMouseCursor(const MouseCursor& mouseCursor) -> void; auto setToolTip(const string& toolTip) -> void; auto setVisible(bool visible) -> void override; diff --git a/hiro/components.hpp b/hiro/components.hpp index 71a6e616..86b66587 100644 --- a/hiro/components.hpp +++ b/hiro/components.hpp @@ -12,11 +12,12 @@ #define Hiro_Color #define Hiro_Gradient #define Hiro_Alignment -#define Hiro_Cursor +#define Hiro_TextCursor #define Hiro_Position #define Hiro_Size #define Hiro_Geometry #define Hiro_Font +#define Hiro_MouseCursor #define Hiro_Application #define Hiro_Desktop diff --git a/hiro/core/core.cpp b/hiro/core/core.cpp index 0930dc3f..67f7a11c 100644 --- a/hiro/core/core.cpp +++ b/hiro/core/core.cpp @@ -33,11 +33,12 @@ namespace hiro { #include "color.cpp" #include "gradient.cpp" #include "alignment.cpp" - #include "cursor.cpp" + #include "text-cursor.cpp" #include "position.cpp" #include "size.cpp" #include "geometry.cpp" #include "font.cpp" + #include "mouse-cursor.cpp" #include "application.cpp" #include "desktop.cpp" diff --git a/hiro/core/core.hpp b/hiro/core/core.hpp index 064c6142..3fef7e47 100644 --- a/hiro/core/core.hpp +++ b/hiro/core/core.hpp @@ -182,7 +182,7 @@ struct Alignment { }; #endif -#include "cursor.hpp" +#include "text-cursor.hpp" #if defined(Hiro_Position) struct Position { @@ -289,6 +289,7 @@ struct Geometry { #endif #include "font.hpp" +#include "mouse-cursor.hpp" #if defined(Hiro_Hotkey) struct Hotkey { @@ -1093,42 +1094,7 @@ struct mRadioLabel : mWidget { #include "widget/table-view-column.hpp" #include "widget/table-view-item.hpp" #include "widget/table-view-cell.hpp" - -#if defined(Hiro_TextEdit) -struct mTextEdit : mWidget { - Declare(TextEdit) - - auto backgroundColor() const -> Color; - auto cursor() const -> Cursor; - auto doChange() const -> void; - auto doMove() const -> void; - auto editable() const -> bool; - auto foregroundColor() const -> Color; - auto onChange(const function& callback = {}) -> type&; - auto onMove(const function& callback = {}) -> type&; - auto setBackgroundColor(Color color = {}) -> type&; - auto setCursor(Cursor cursor = {}) -> type&; - auto setEditable(bool editable = true) -> type&; - auto setForegroundColor(Color color = {}) -> type&; - auto setText(const string& text = "") -> type&; - auto setWordWrap(bool wordWrap = true) -> type&; - auto text() const -> string; - auto wordWrap() const -> bool; - -//private: - struct State { - Color backgroundColor; - Cursor cursor; - bool editable = true; - Color foregroundColor; - function onChange; - function onMove; - string text; - bool wordWrap = true; - } state; -}; -#endif - +#include "widget/text-edit.hpp" #include "widget/tree-view.hpp" #include "widget/tree-view-item.hpp" @@ -1172,35 +1138,7 @@ struct mVerticalSlider : mWidget { }; #endif -#if defined(Hiro_Viewport) -struct mViewport : mWidget { - Declare(Viewport) - - auto doDrop(vector names) const -> void; - auto doMouseLeave() const -> void; - auto doMouseMove(Position position) const -> void; - auto doMousePress(Mouse::Button button) const -> void; - auto doMouseRelease(Mouse::Button button) const -> void; - auto droppable() const -> bool; - auto handle() const -> uintptr_t; - auto onDrop(const function)>& callback = {}) -> type&; - auto onMouseLeave(const function& callback = {}) -> type&; - auto onMouseMove(const function& callback = {}) -> type&; - auto onMousePress(const function& callback = {}) -> type&; - auto onMouseRelease(const function& callback = {}) -> type&; - auto setDroppable(bool droppable = true) -> type&; - -//private: - struct State { - bool droppable = false; - function)> onDrop; - function onMouseLeave; - function onMouseMove; - function onMousePress; - function onMouseRelease; - } state; -}; -#endif +#include "widget/viewport.hpp" #undef Declare diff --git a/hiro/core/cursor.cpp b/hiro/core/cursor.cpp deleted file mode 100644 index 751ca37a..00000000 --- a/hiro/core/cursor.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#if defined(Hiro_Cursor) - -Cursor::Cursor(int offset, int length) { - setCursor(offset, length); -} - -Cursor::operator bool() const { - return offset() || length(); -} - -auto Cursor::operator==(const Cursor& source) const -> bool { - return offset() == source.offset() && length() == source.length(); -} - -auto Cursor::operator!=(const Cursor& source) const -> bool { - return !operator==(source); -} - -auto Cursor::length() const -> int { - return state.length; -} - -auto Cursor::offset() const -> int { - return state.offset; -} - -auto Cursor::setCursor(int offset, int length) -> type& { - state.offset = offset; - state.length = length; - return *this; -} - -auto Cursor::setLength(int length) -> type& { - state.length = length; - return *this; -} - -auto Cursor::setOffset(int offset) -> type& { - state.offset = offset; - return *this; -} - -#endif diff --git a/hiro/core/cursor.hpp b/hiro/core/cursor.hpp deleted file mode 100644 index aac0472f..00000000 --- a/hiro/core/cursor.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#if defined(Hiro_Cursor) -struct Cursor { - using type = Cursor; - - Cursor(int offset = 0, int length = 0); - - explicit operator bool() const; - auto operator==(const Cursor& source) const -> bool; - auto operator!=(const Cursor& source) const -> bool; - - auto length() const -> int; - auto offset() const -> int; - auto setCursor(int offset = 0, int length = 0) -> type&; - auto setLength(int length = 0) -> type&; - auto setOffset(int offset = 0) -> type&; - -//private: - struct State { - int offset; - int length; - } state; -}; -#endif diff --git a/hiro/core/monitor.hpp b/hiro/core/monitor.hpp index d20ce38e..2f580845 100644 --- a/hiro/core/monitor.hpp +++ b/hiro/core/monitor.hpp @@ -11,13 +11,14 @@ struct Monitor { //DPI scale X inline auto sx(float x) -> float { - static auto scale = Monitor::dpi().x() / 96.0; + //round DPI scalar to increments of 0.5 (eg 1.0, 1.5, 2.0, ...) + static auto scale = round(Monitor::dpi().x() / 96.0 * 2.0) / 2.0; return x * scale; } //DPI scale y inline auto sy(float y) -> float { - static auto scale = Monitor::dpi().y() / 96.0; + static auto scale = round(Monitor::dpi().y() / 96.0 * 2.0) / 2.0; return y * scale; } diff --git a/hiro/core/mouse-cursor.cpp b/hiro/core/mouse-cursor.cpp new file mode 100644 index 00000000..cb23ccb9 --- /dev/null +++ b/hiro/core/mouse-cursor.cpp @@ -0,0 +1,33 @@ +#if defined(Hiro_MouseCursor) + +const string MouseCursor::Default = ""; +const string MouseCursor::Hand = "{hand}"; +const string MouseCursor::HorizontalResize = "{horizontal-resize}"; +const string MouseCursor::VerticalResize = "{vertical-resize}"; + +MouseCursor::MouseCursor(const string& name) { + setName(name); +} + +MouseCursor::operator bool() const { + return state.name; +} + +auto MouseCursor::operator==(const MouseCursor& source) const -> bool { + return name() == source.name(); +} + +auto MouseCursor::operator!=(const MouseCursor& source) const -> bool { + return name() != source.name(); +} + +auto MouseCursor::name() const -> string { + return state.name; +} + +auto MouseCursor::setName(const string& name) -> type& { + state.name = name; + return *this; +} + +#endif diff --git a/hiro/core/mouse-cursor.hpp b/hiro/core/mouse-cursor.hpp new file mode 100644 index 00000000..b2fa99bf --- /dev/null +++ b/hiro/core/mouse-cursor.hpp @@ -0,0 +1,24 @@ +#if defined(Hiro_MouseCursor) +struct MouseCursor { + using type = MouseCursor; + + MouseCursor(const string& name = ""); + + explicit operator bool() const; + auto operator==(const MouseCursor& source) const -> bool; + auto operator!=(const MouseCursor& source) const -> bool; + + auto name() const -> string; + auto setName(const string& name = "") -> type&; + + static const string Default; + static const string Hand; + static const string HorizontalResize; + static const string VerticalResize; + +//private: + struct State { + string name; + } state; +}; +#endif diff --git a/hiro/core/shared.hpp b/hiro/core/shared.hpp index 83b421a3..c264d7a3 100644 --- a/hiro/core/shared.hpp +++ b/hiro/core/shared.hpp @@ -62,6 +62,24 @@ #define DeclareSharedWidget(Name) \ DeclareSharedSizable(Name) \ + auto droppable() const { return self().droppable(); } \ + auto doDrop(vector names) { return self().doDrop(names); } \ + auto doMouseEnter() const { return self().doMouseEnter(); } \ + auto doMouseLeave() const { return self().doMouseLeave(); } \ + auto doMouseMove(Position position) const { return self().doMouseMove(position); } \ + auto doMousePress(Mouse::Button button) const { return self().doMousePress(button); } \ + auto doMouseRelease(Mouse::Button button) const { return self().doMouseRelease(button); } \ + auto focusable() const { return self().focusable(); } \ + auto mouseCursor() const { return self().mouseCursor(); } \ + auto onDrop(const function)>& callback = {}) { return self().onDrop(callback), *this; } \ + auto onMouseEnter(const function& callback = {}) { return self().onMouseEnter(callback), *this; } \ + auto onMouseLeave(const function& callback = {}) { return self().onMouseLeave(callback), *this; } \ + auto onMouseMove(const function& callback = {}) { return self().onMouseMove(callback), *this; } \ + auto onMousePress(const function& callback = {}) { return self().onMousePress(callback), *this; } \ + auto onMouseRelease(const function& callback = {}) { return self().onMouseRelease(callback), *this; } \ + auto setDroppable(bool droppable = true) { return self().setDroppable(droppable), *this; } \ + auto setFocusable(bool focusable = true) { return self().setFocusable(focusable), *this; } \ + auto setMouseCursor(const MouseCursor& mouseCursor = {}) { return self().setMouseCursor(mouseCursor), *this; } \ auto setToolTip(const string& toolTip = "") { return self().setToolTip(toolTip), *this; } \ auto toolTip() const { return self().toolTip(); } \ @@ -213,22 +231,10 @@ struct Canvas : sCanvas { auto alignment() const { return self().alignment(); } auto color() const { return self().color(); } auto data() { return self().data(); } - auto droppable() const { return self().droppable(); } - auto doDrop(vector names) { return self().doDrop(names); } - auto doMouseLeave() const { return self().doMouseLeave(); } - auto doMouseMove(Position position) const { return self().doMouseMove(position); } - auto doMousePress(Mouse::Button button) const { return self().doMousePress(button); } - auto doMouseRelease(Mouse::Button button) const { return self().doMouseRelease(button); } auto gradient() const { return self().gradient(); } auto icon() const { return self().icon(); } - auto onDrop(const function)>& callback = {}) { return self().onDrop(callback), *this; } - auto onMouseLeave(const function& callback = {}) { return self().onMouseLeave(callback), *this; } - auto onMouseMove(const function& callback = {}) { return self().onMouseMove(callback), *this; } - auto onMousePress(const function& callback = {}) { return self().onMousePress(callback), *this; } - auto onMouseRelease(const function& callback = {}) { return self().onMouseRelease(callback), *this; } auto setAlignment(Alignment alignment = {}) { return self().setAlignment(alignment), *this; } auto setColor(Color color) { return self().setColor(color), *this; } - auto setDroppable(bool droppable = true) { return self().setDroppable(droppable), *this; } auto setGradient(Gradient gradient = {}) { return self().setGradient(gradient), *this; } auto setIcon(const image& icon = {}) { return self().setIcon(icon), *this; } auto setSize(Size size = {}) { return self().setSize(size), *this; } @@ -465,11 +471,7 @@ struct Label : sLabel { auto alignment() const { return self().alignment(); } auto backgroundColor() const { return self().backgroundColor(); } - auto doMousePress(Mouse::Button button) const { return self().doMousePress(button); } - auto doMouseRelease(Mouse::Button button) const { return self().doMouseRelease(button); } auto foregroundColor() const { return self().foregroundColor(); } - auto onMousePress(const function& callback = {}) { return self().onMousePress(callback), *this; } - auto onMouseRelease(const function& callback = {}) { return self().onMouseRelease(callback), *this; } auto setAlignment(Alignment alignment = {}) { return self().setAlignment(alignment), *this; } auto setBackgroundColor(Color color = {}) { return self().setBackgroundColor(color), *this; } auto setForegroundColor(Color color = {}) { return self().setForegroundColor(color), *this; } @@ -544,7 +546,6 @@ struct RadioLabel : sRadioLabel { struct SourceEdit : sSourceEdit { DeclareSharedWidget(SourceEdit) - auto cursor() const { return self().cursor(); } auto doChange() const { return self().doChange(); } auto doMove() const { return self().doMove(); } auto editable() const { return self().editable(); } @@ -553,14 +554,15 @@ struct SourceEdit : sSourceEdit { auto onChange(const function& callback = {}) { return self().onChange(callback), *this; } auto onMove(const function& callback = {}) { return self().onMove(callback), *this; } auto scheme() const { return self().scheme(); } - auto setCursor(Cursor cursor = {}) { return self().setCursor(cursor), *this; } auto setEditable(bool editable = true) { return self().setEditable(editable), *this; } auto setLanguage(const string& language = "") { return self().setLanguage(language), *this; } auto setNumbered(bool numbered = true) { return self().setNumbered(numbered), *this; } auto setScheme(const string& scheme = "") { return self().setScheme(scheme), *this; } auto setText(const string& text = "") { return self().setText(text), *this; } + auto setTextCursor(TextCursor textCursor = {}) { return self().setTextCursor(textCursor), *this; } auto setWordWrap(bool wordWrap = true) { return self().setWordWrap(wordWrap), *this; } auto text() const { return self().text(); } + auto textCursor() const { return self().textCursor(); } auto wordWrap() const { return self().wordWrap(); } }; #endif @@ -719,6 +721,8 @@ struct TableView : sTableView { auto remove(sTableViewItem item) { return self().remove(item), *this; } auto reset() { return self().reset(), *this; } auto resizeColumns() { return self().resizeColumns(), *this; } + auto selectAll() { return self().selectAll(), *this; } + auto selectNone() { return self().selectNone(), *this; } auto selected() const { return self().selected(); } auto setAlignment(Alignment alignment = {}) { return self().setAlignment(alignment), *this; } auto setBackgroundColor(Color color = {}) { return self().setBackgroundColor(color), *this; } @@ -737,7 +741,6 @@ struct TextEdit : sTextEdit { DeclareSharedWidget(TextEdit) auto backgroundColor() const { return self().backgroundColor(); } - auto cursor() const { return self().cursor(); } auto doChange() const { return self().doChange(); } auto doMove() const { return self().doMove(); } auto editable() const { return self().editable(); } @@ -745,12 +748,13 @@ struct TextEdit : sTextEdit { auto onChange(const function& callback = {}) { return self().onChange(callback), *this; } auto onMove(const function& callback = {}) { return self().onMove(callback), *this; } auto setBackgroundColor(Color color = {}) { return self().setBackgroundColor(color), *this; } - auto setCursor(Cursor cursor = {}) { return self().setCursor(cursor), *this; } auto setEditable(bool editable = true) { return self().setEditable(editable), *this; } auto setForegroundColor(Color color = {}) { return self().setForegroundColor(color), *this; } auto setText(const string& text = "") { return self().setText(text), *this; } + auto setTextCursor(TextCursor textCursor = {}) { return self().setTextCursor(textCursor), *this; } auto setWordWrap(bool wordWrap = true) { return self().setWordWrap(wordWrap), *this; } auto text() const { return self().text(); } + auto textCursor() const { return self().textCursor(); } auto wordWrap() const { return self().wordWrap(); } }; #endif @@ -808,6 +812,7 @@ struct TreeView : sTreeView { auto onToggle(const function& callback = {}) { return self().onToggle(callback), *this; } auto remove(sTreeViewItem item) { return self().remove(item), *this; } auto reset() { return self().reset(), *this; } + auto selectNone() { return self().selectNone(), *this; } auto selected() const { return self().selected(); } auto setBackgroundColor(Color color = {}) { return self().setBackgroundColor(color), *this; } auto setForegroundColor(Color color = {}) { return self().setForegroundColor(color), *this; } @@ -844,19 +849,7 @@ struct VerticalSlider : sVerticalSlider { struct Viewport : sViewport { DeclareSharedWidget(Viewport) - auto doDrop(vector names) const { return self().doDrop(names); } - auto doMouseLeave() const { return self().doMouseLeave(); } - auto doMouseMove(Position position) const { return self().doMouseMove(position); } - auto doMousePress(Mouse::Button button) const { return self().doMousePress(button); } - auto doMouseRelease(Mouse::Button button) const { return self().doMouseRelease(button); } - auto droppable() const { return self().droppable(); } auto handle() const { return self().handle(); } - auto onDrop(const function)>& callback = {}) { return self().onDrop(callback), *this; } - auto onMouseLeave(const function& callback = {}) { return self().onMouseLeave(callback), *this; } - auto onMouseMove(const function& callback = {}) { return self().onMouseMove(callback), *this; } - auto onMousePress(const function& callback = {}) { return self().onMousePress(callback), *this; } - auto onMouseRelease(const function& callback = {}) { return self().onMouseRelease(callback), *this; } - auto setDroppable(bool droppable = true) { return self().setDroppable(droppable), *this; } }; #endif diff --git a/hiro/core/text-cursor.cpp b/hiro/core/text-cursor.cpp new file mode 100644 index 00000000..cbb935f2 --- /dev/null +++ b/hiro/core/text-cursor.cpp @@ -0,0 +1,43 @@ +#if defined(Hiro_TextCursor) + +TextCursor::TextCursor(int offset, int length) { + setTextCursor(offset, length); +} + +TextCursor::operator bool() const { + return offset() || length(); +} + +auto TextCursor::operator==(const TextCursor& source) const -> bool { + return offset() == source.offset() && length() == source.length(); +} + +auto TextCursor::operator!=(const TextCursor& source) const -> bool { + return !operator==(source); +} + +auto TextCursor::length() const -> int { + return state.length; +} + +auto TextCursor::offset() const -> int { + return state.offset; +} + +auto TextCursor::setLength(int length) -> type& { + state.length = length; + return *this; +} + +auto TextCursor::setOffset(int offset) -> type& { + state.offset = offset; + return *this; +} + +auto TextCursor::setTextCursor(int offset, int length) -> type& { + state.offset = offset; + state.length = length; + return *this; +} + +#endif diff --git a/hiro/core/text-cursor.hpp b/hiro/core/text-cursor.hpp new file mode 100644 index 00000000..2f32373b --- /dev/null +++ b/hiro/core/text-cursor.hpp @@ -0,0 +1,23 @@ +#if defined(Hiro_TextCursor) +struct TextCursor { + using type = TextCursor; + + TextCursor(int offset = 0, int length = 0); + + explicit operator bool() const; + auto operator==(const TextCursor& source) const -> bool; + auto operator!=(const TextCursor& source) const -> bool; + + auto length() const -> int; + auto offset() const -> int; + auto setLength(int length = 0) -> type&; + auto setOffset(int offset = 0) -> type&; + auto setTextCursor(int offset = 0, int length = 0) -> type&; + +//private: + struct State { + int offset; + int length; + } state; +}; +#endif diff --git a/hiro/core/widget/canvas.cpp b/hiro/core/widget/canvas.cpp index 2377bbfb..073b7352 100644 --- a/hiro/core/widget/canvas.cpp +++ b/hiro/core/widget/canvas.cpp @@ -18,30 +18,6 @@ auto mCanvas::data() -> uint32_t* { return (uint32_t*)state.icon.data(); } -auto mCanvas::droppable() const -> bool { - return state.droppable; -} - -auto mCanvas::doDrop(vector names) const -> void { - if(state.onDrop) return state.onDrop(names); -} - -auto mCanvas::doMouseLeave() const -> void { - if(state.onMouseLeave) return state.onMouseLeave(); -} - -auto mCanvas::doMouseMove(Position position) const -> void { - if(state.onMouseMove) return state.onMouseMove(position); -} - -auto mCanvas::doMousePress(Mouse::Button button) const -> void { - if(state.onMousePress) return state.onMousePress(button); -} - -auto mCanvas::doMouseRelease(Mouse::Button button) const -> void { - if(state.onMouseRelease) return state.onMouseRelease(button); -} - auto mCanvas::gradient() const -> Gradient { return state.gradient; } @@ -50,31 +26,6 @@ auto mCanvas::icon() const -> image { return state.icon; } -auto mCanvas::onDrop(const function)>& callback) -> type& { - state.onDrop = callback; - return *this; -} - -auto mCanvas::onMouseLeave(const function& callback) -> type& { - state.onMouseLeave = callback; - return *this; -} - -auto mCanvas::onMouseMove(const function& callback) -> type& { - state.onMouseMove = callback; - return *this; -} - -auto mCanvas::onMousePress(const function& callback) -> type& { - state.onMousePress = callback; - return *this; -} - -auto mCanvas::onMouseRelease(const function& callback) -> type& { - state.onMouseRelease = callback; - return *this; -} - auto mCanvas::setAlignment(Alignment alignment) -> type& { state.alignment = alignment; signal(setAlignment, alignment); @@ -89,12 +40,6 @@ auto mCanvas::setColor(Color color) -> type& { return *this; } -auto mCanvas::setDroppable(bool droppable) -> type& { - state.droppable = droppable; - signal(setDroppable, droppable); - return *this; -} - auto mCanvas::setGradient(Gradient gradient) -> type& { state.color = {}; state.gradient = gradient; diff --git a/hiro/core/widget/canvas.hpp b/hiro/core/widget/canvas.hpp index 2d9089b0..077b5f11 100644 --- a/hiro/core/widget/canvas.hpp +++ b/hiro/core/widget/canvas.hpp @@ -5,22 +5,10 @@ struct mCanvas : mWidget { auto alignment() const -> Alignment; auto color() const -> Color; auto data() -> uint32_t*; - auto droppable() const -> bool; - auto doDrop(vector names) const -> void; - auto doMouseLeave() const -> void; - auto doMouseMove(Position position) const -> void; - auto doMousePress(Mouse::Button button) const -> void; - auto doMouseRelease(Mouse::Button button) const -> void; auto gradient() const -> Gradient; auto icon() const -> image; - auto onDrop(const function)>& callback = {}) -> type&; - auto onMouseLeave(const function& callback = {}) -> type&; - auto onMouseMove(const function& callback = {}) -> type&; - auto onMousePress(const function& callback = {}) -> type&; - auto onMouseRelease(const function& callback = {}) -> type&; auto setAlignment(Alignment alignment = {}) -> type&; auto setColor(Color color = {}) -> type&; - auto setDroppable(bool droppable = true) -> type&; auto setGradient(Gradient gradient = {}) -> type&; auto setIcon(const image& icon = {}) -> type&; auto setSize(Size size = {}) -> type&; @@ -31,14 +19,8 @@ struct mCanvas : mWidget { struct State { Alignment alignment; Color color; - bool droppable = false; Gradient gradient; image icon; - function)> onDrop; - function onMouseLeave; - function onMouseMove; - function onMousePress; - function onMouseRelease; } state; }; #endif diff --git a/hiro/core/widget/label.cpp b/hiro/core/widget/label.cpp index 523d5ca3..86f7f151 100644 --- a/hiro/core/widget/label.cpp +++ b/hiro/core/widget/label.cpp @@ -14,28 +14,10 @@ auto mLabel::backgroundColor() const -> Color { return state.backgroundColor; } -auto mLabel::doMousePress(Mouse::Button button) const -> void { - if(state.onMousePress) return state.onMousePress(button); -} - -auto mLabel::doMouseRelease(Mouse::Button button) const -> void { - if(state.onMouseRelease) return state.onMouseRelease(button); -} - auto mLabel::foregroundColor() const -> Color { return state.foregroundColor; } -auto mLabel::onMousePress(const function& callback) -> type& { - state.onMousePress = callback; - return *this; -} - -auto mLabel::onMouseRelease(const function& callback) -> type& { - state.onMouseRelease = callback; - return *this; -} - auto mLabel::setAlignment(Alignment alignment) -> type& { state.alignment = alignment; signal(setAlignment, alignment); diff --git a/hiro/core/widget/label.hpp b/hiro/core/widget/label.hpp index 4d0382b5..d16b41c1 100644 --- a/hiro/core/widget/label.hpp +++ b/hiro/core/widget/label.hpp @@ -4,11 +4,7 @@ struct mLabel : mWidget { auto alignment() const -> Alignment; auto backgroundColor() const -> Color; - auto doMousePress(Mouse::Button button) const -> void; - auto doMouseRelease(Mouse::Button button) const -> void; auto foregroundColor() const -> Color; - auto onMousePress(const function& callback = {}) -> type&; - auto onMouseRelease(const function& callback = {}) -> type&; auto setAlignment(Alignment alignment = {}) -> type&; auto setBackgroundColor(Color color = {}) -> type&; auto setForegroundColor(Color color = {}) -> type&; @@ -20,8 +16,6 @@ struct mLabel : mWidget { Alignment alignment; Color backgroundColor; Color foregroundColor; - function onMousePress; - function onMouseRelease; string text; } state; }; diff --git a/hiro/core/widget/source-edit.cpp b/hiro/core/widget/source-edit.cpp index 57468982..7390fc46 100644 --- a/hiro/core/widget/source-edit.cpp +++ b/hiro/core/widget/source-edit.cpp @@ -6,10 +6,6 @@ auto mSourceEdit::allocate() -> pObject* { // -auto mSourceEdit::cursor() const -> Cursor { - return signal(cursor); -} - auto mSourceEdit::doChange() const -> void { if(state.onChange) return state.onChange(); } @@ -44,11 +40,6 @@ auto mSourceEdit::scheme() const -> string { return state.scheme; } -auto mSourceEdit::setCursor(Cursor cursor) -> type& { - signal(setCursor, cursor); - return *this; -} - auto mSourceEdit::setEditable(bool editable) -> type& { state.editable = editable; signal(setEditable, editable); @@ -79,6 +70,12 @@ auto mSourceEdit::setText(const string& text) -> type& { return *this; } +auto mSourceEdit::setTextCursor(TextCursor textCursor) -> type& { + state.textCursor = textCursor; + signal(setTextCursor, textCursor); + return *this; +} + auto mSourceEdit::setWordWrap(bool wordWrap) -> type& { state.wordWrap = wordWrap; signal(setWordWrap, wordWrap); @@ -89,6 +86,10 @@ auto mSourceEdit::text() const -> string { return signal(text); } +auto mSourceEdit::textCursor() const -> TextCursor { + return signal(textCursor); +} + auto mSourceEdit::wordWrap() const -> bool { return state.wordWrap; } diff --git a/hiro/core/widget/source-edit.hpp b/hiro/core/widget/source-edit.hpp index 77fa6bf6..5dc42712 100644 --- a/hiro/core/widget/source-edit.hpp +++ b/hiro/core/widget/source-edit.hpp @@ -2,7 +2,6 @@ struct mSourceEdit : mWidget { Declare(SourceEdit) - auto cursor() const -> Cursor; auto doChange() const -> void; auto doMove() const -> void; auto editable() const -> bool; @@ -11,14 +10,15 @@ struct mSourceEdit : mWidget { auto onChange(const function& callback = {}) -> type&; auto onMove(const function& callback = {}) -> type&; auto scheme() const -> string; - auto setCursor(Cursor cursor = {}) -> type&; auto setEditable(bool editable) -> type&; auto setLanguage(const string& language = "") -> type&; auto setNumbered(bool numbered = true) -> type&; auto setScheme(const string& scheme = "") -> type&; auto setText(const string& text = "") -> type&; + auto setTextCursor(TextCursor textCursor = {}) -> type&; auto setWordWrap(bool wordWrap = true) -> type&; auto text() const -> string; + auto textCursor() const -> TextCursor; auto wordWrap() const -> bool; //private: @@ -30,6 +30,7 @@ struct mSourceEdit : mWidget { function onMove; string scheme; string text; + TextCursor textCursor; bool wordWrap = true; } state; }; diff --git a/hiro/core/widget/table-view.cpp b/hiro/core/widget/table-view.cpp index f07cb503..5a72b8d4 100644 --- a/hiro/core/widget/table-view.cpp +++ b/hiro/core/widget/table-view.cpp @@ -173,6 +173,21 @@ auto mTableView::resizeColumns() -> type& { return *this; } +auto mTableView::selectAll() -> type& { + if(!state.batchable) return *this; + for(auto& item : state.items) { + item->setSelected(true); + } + return *this; +} + +auto mTableView::selectNone() -> type& { + for(auto& item : state.items) { + item->setSelected(false); + } + return *this; +} + auto mTableView::selected() const -> TableViewItem { for(auto& item : state.items) { if(item->selected()) return item; diff --git a/hiro/core/widget/table-view.hpp b/hiro/core/widget/table-view.hpp index 4f68eb37..9bce8964 100644 --- a/hiro/core/widget/table-view.hpp +++ b/hiro/core/widget/table-view.hpp @@ -34,6 +34,8 @@ struct mTableView : mWidget { auto remove(sTableViewItem item) -> type&; auto reset() -> type&; auto resizeColumns() -> type&; + auto selectAll() -> type&; + auto selectNone() -> type&; auto selected() const -> TableViewItem; auto setAlignment(Alignment alignment = {}) -> type&; auto setBackgroundColor(Color color = {}) -> type&; diff --git a/hiro/core/widget/text-edit.cpp b/hiro/core/widget/text-edit.cpp index 14211900..889fdee3 100644 --- a/hiro/core/widget/text-edit.cpp +++ b/hiro/core/widget/text-edit.cpp @@ -10,10 +10,6 @@ auto mTextEdit::backgroundColor() const -> Color { return state.backgroundColor; } -auto mTextEdit::cursor() const -> Cursor { - return state.cursor; -} - auto mTextEdit::doChange() const -> void { if(state.onChange) return state.onChange(); } @@ -46,12 +42,6 @@ auto mTextEdit::setBackgroundColor(Color color) -> type& { return *this; } -auto mTextEdit::setCursor(Cursor cursor) -> type& { - state.cursor = cursor; - signal(setCursor, cursor); - return *this; -} - auto mTextEdit::setEditable(bool editable) -> type& { state.editable = editable; signal(setEditable, editable); @@ -70,6 +60,12 @@ auto mTextEdit::setText(const string& text) -> type& { return *this; } +auto mTextEdit::setTextCursor(TextCursor textCursor) -> type& { + state.textCursor = textCursor; + signal(setTextCursor, textCursor); + return *this; +} + auto mTextEdit::setWordWrap(bool wordWrap) -> type& { state.wordWrap = wordWrap; signal(setWordWrap, wordWrap); @@ -80,6 +76,10 @@ auto mTextEdit::text() const -> string { return signal(text); } +auto mTextEdit::textCursor() const -> TextCursor { + return signal(textCursor); +} + auto mTextEdit::wordWrap() const -> bool { return state.wordWrap; } diff --git a/hiro/core/widget/text-edit.hpp b/hiro/core/widget/text-edit.hpp new file mode 100644 index 00000000..1f8bc845 --- /dev/null +++ b/hiro/core/widget/text-edit.hpp @@ -0,0 +1,34 @@ +#if defined(Hiro_TextEdit) +struct mTextEdit : mWidget { + Declare(TextEdit) + + auto backgroundColor() const -> Color; + auto doChange() const -> void; + auto doMove() const -> void; + auto editable() const -> bool; + auto foregroundColor() const -> Color; + auto onChange(const function& callback = {}) -> type&; + auto onMove(const function& callback = {}) -> type&; + auto setBackgroundColor(Color color = {}) -> type&; + auto setEditable(bool editable = true) -> type&; + auto setForegroundColor(Color color = {}) -> type&; + auto setText(const string& text = "") -> type&; + auto setTextCursor(TextCursor textCursor = {}) -> type&; + auto setWordWrap(bool wordWrap = true) -> type&; + auto text() const -> string; + auto textCursor() const -> TextCursor; + auto wordWrap() const -> bool; + +//private: + struct State { + Color backgroundColor; + bool editable = true; + Color foregroundColor; + function onChange; + function onMove; + string text; + TextCursor textCursor; + bool wordWrap = true; + } state; +}; +#endif diff --git a/hiro/core/widget/tree-view.cpp b/hiro/core/widget/tree-view.cpp index 847f6550..aa781393 100644 --- a/hiro/core/widget/tree-view.cpp +++ b/hiro/core/widget/tree-view.cpp @@ -107,6 +107,14 @@ auto mTreeView::reset() -> type& { return *this; } +auto mTreeView::selectNone() -> type& { + if(auto item = selected()) { + //TODO + //item->setSelected(false); + } + return *this; +} + auto mTreeView::selected() const -> TreeViewItem { return item(state.selectedPath); } diff --git a/hiro/core/widget/tree-view.hpp b/hiro/core/widget/tree-view.hpp index 100f4702..83c6890f 100644 --- a/hiro/core/widget/tree-view.hpp +++ b/hiro/core/widget/tree-view.hpp @@ -21,6 +21,7 @@ struct mTreeView : mWidget { auto onToggle(const function& callback = {}) -> type&; auto remove(sTreeViewItem item) -> type&; auto reset() -> type&; + auto selectNone() -> type&; auto selected() const -> TreeViewItem; auto setBackgroundColor(Color color = {}) -> type&; auto setForegroundColor(Color color = {}) -> type&; diff --git a/hiro/core/widget/viewport.cpp b/hiro/core/widget/viewport.cpp index 03ad19ae..8e9499e0 100644 --- a/hiro/core/widget/viewport.cpp +++ b/hiro/core/widget/viewport.cpp @@ -6,63 +6,8 @@ auto mViewport::allocate() -> pObject* { // -auto mViewport::doDrop(vector names) const -> void { - if(state.onDrop) return state.onDrop(names); -} - -auto mViewport::doMouseLeave() const -> void { - if(state.onMouseLeave) return state.onMouseLeave(); -} - -auto mViewport::doMouseMove(Position position) const -> void { - if(state.onMouseMove) return state.onMouseMove(position); -} - -auto mViewport::doMousePress(Mouse::Button button) const -> void { - if(state.onMousePress) return state.onMousePress(button); -} - -auto mViewport::doMouseRelease(Mouse::Button button) const -> void { - if(state.onMouseRelease) return state.onMouseRelease(button); -} - -auto mViewport::droppable() const -> bool { - return state.droppable; -} - auto mViewport::handle() const -> uintptr_t { return signal(handle); } -auto mViewport::onDrop(const function)>& callback) -> type& { - state.onDrop = callback; - return *this; -} - -auto mViewport::onMouseLeave(const function& callback) -> type& { - state.onMouseLeave = callback; - return *this; -} - -auto mViewport::onMouseMove(const function& callback) -> type& { - state.onMouseMove = callback; - return *this; -} - -auto mViewport::onMousePress(const function& callback) -> type& { - state.onMousePress = callback; - return *this; -} - -auto mViewport::onMouseRelease(const function& callback) -> type& { - state.onMouseRelease = callback; - return *this; -} - -auto mViewport::setDroppable(bool droppable) -> type& { - state.droppable = droppable; - signal(setDroppable, droppable); - return *this; -} - #endif diff --git a/hiro/core/widget/viewport.hpp b/hiro/core/widget/viewport.hpp new file mode 100644 index 00000000..d5648ac2 --- /dev/null +++ b/hiro/core/widget/viewport.hpp @@ -0,0 +1,11 @@ +#if defined(Hiro_Viewport) +struct mViewport : mWidget { + Declare(Viewport) + + auto handle() const -> uintptr_t; + +//private: + struct State { + } state; +}; +#endif diff --git a/hiro/core/widget/widget.cpp b/hiro/core/widget/widget.cpp index c13d1b84..0af49a3c 100644 --- a/hiro/core/widget/widget.cpp +++ b/hiro/core/widget/widget.cpp @@ -6,6 +6,72 @@ auto mWidget::allocate() -> pObject* { // +auto mWidget::doDrop(vector names) const -> void { + if(state.onDrop) return state.onDrop(names); +} + +auto mWidget::doMouseEnter() const -> void { + if(state.onMouseEnter) return state.onMouseEnter(); +} + +auto mWidget::doMouseLeave() const -> void { + if(state.onMouseLeave) return state.onMouseLeave(); +} + +auto mWidget::doMouseMove(Position position) const -> void { + if(state.onMouseMove) return state.onMouseMove(position); +} + +auto mWidget::doMousePress(Mouse::Button button) const -> void { + if(state.onMousePress) return state.onMousePress(button); +} + +auto mWidget::doMouseRelease(Mouse::Button button) const -> void { + if(state.onMouseRelease) return state.onMouseRelease(button); +} + +auto mWidget::droppable() const -> bool { + return state.droppable; +} + +auto mWidget::focusable() const -> bool { + return state.focusable; +} + +auto mWidget::mouseCursor() const -> MouseCursor { + return state.mouseCursor; +} + +auto mWidget::onDrop(const function)>& callback) -> type& { + state.onDrop = callback; + return *this; +} + +auto mWidget::onMouseEnter(const function& callback) -> type& { + state.onMouseEnter = callback; + return *this; +} + +auto mWidget::onMouseLeave(const function& callback) -> type& { + state.onMouseLeave = callback; + return *this; +} + +auto mWidget::onMouseMove(const function& callback) -> type& { + state.onMouseMove = callback; + return *this; +} + +auto mWidget::onMousePress(const function& callback) -> type& { + state.onMousePress = callback; + return *this; +} + +auto mWidget::onMouseRelease(const function& callback) -> type& { + state.onMouseRelease = callback; + return *this; +} + auto mWidget::remove() -> type& { //TODO: how to implement this after removing mLayout? //if(auto layout = parentLayout()) layout->remove(layout->sizable(offset())); @@ -13,6 +79,24 @@ auto mWidget::remove() -> type& { return *this; } +auto mWidget::setDroppable(bool droppable) -> type& { + state.droppable = droppable; + signal(setDroppable, droppable); + return *this; +} + +auto mWidget::setFocusable(bool focusable) -> type& { + state.focusable = focusable; + signal(setFocusable, focusable); + return *this; +} + +auto mWidget::setMouseCursor(const MouseCursor& mouseCursor) -> type& { + state.mouseCursor = mouseCursor; + signal(setMouseCursor, mouseCursor); + return *this; +} + auto mWidget::setToolTip(const string& toolTip) -> type& { state.toolTip = toolTip; //TODO: allow this option to dynamically control tool tips diff --git a/hiro/core/widget/widget.hpp b/hiro/core/widget/widget.hpp index 4412935f..91a7e63a 100644 --- a/hiro/core/widget/widget.hpp +++ b/hiro/core/widget/widget.hpp @@ -2,13 +2,39 @@ struct mWidget : mSizable { Declare(Widget) + auto doDrop(vector names) const -> void; + auto doMouseEnter() const -> void; + auto doMouseLeave() const -> void; + auto doMouseMove(Position position) const -> void; + auto doMousePress(Mouse::Button button) const -> void; + auto doMouseRelease(Mouse::Button button) const -> void; + auto droppable() const -> bool; + auto focusable() const -> bool; + auto mouseCursor() const -> MouseCursor; + auto onDrop(const function)>& callback = {}) -> type&; + auto onMouseEnter(const function& callback = {}) -> type&; + auto onMouseLeave(const function& callback = {}) -> type&; + auto onMouseMove(const function& callback = {}) -> type&; + auto onMousePress(const function& callback = {}) -> type&; + auto onMouseRelease(const function& callback = {}) -> type&; auto remove() -> type& override; + auto setDroppable(bool droppable = true) -> type&; + auto setFocusable(bool focusable = true) -> type&; + auto setMouseCursor(const MouseCursor& mouseCursor = {}) -> type&; auto setToolTip(const string& toolTip = "") -> type&; auto toolTip() const -> string; //private: -//sizeof(mWidget) == 32 struct State { + bool droppable = false; + bool focusable = false; + MouseCursor mouseCursor; + function)> onDrop; + function onMouseEnter; + function onMouseLeave; + function onMouseMove; + function onMousePress; + function onMouseRelease; string toolTip; } state; }; diff --git a/hiro/core/window.cpp b/hiro/core/window.cpp index 60ed3448..eac4e1d4 100644 --- a/hiro/core/window.cpp +++ b/hiro/core/window.cpp @@ -266,6 +266,13 @@ auto mWindow::setFullScreen(bool fullScreen) -> type& { } auto mWindow::setGeometry(Geometry geometry) -> type& { + //round fractional bits of geometry coordinates that window managers cannot display. + //the pWindow classes lose this precision and so not doing so here can cause off-by-1 issues. + geometry.setX(round(geometry.x())); + geometry.setY(round(geometry.y())); + geometry.setWidth(round(geometry.width())); + geometry.setHeight(round(geometry.height())); + state.geometry = geometry; signal(setGeometry, geometry); if(auto& sizable = state.sizable) sizable->setGeometry(sizable->geometry()); diff --git a/hiro/extension/about-dialog.cpp b/hiro/extension/about-dialog.cpp index 12b29f6e..222183d0 100644 --- a/hiro/extension/about-dialog.cpp +++ b/hiro/extension/about-dialog.cpp @@ -62,7 +62,7 @@ auto AboutDialog::show() -> void { nameLabel.setForegroundColor({0, 0, 0}); nameLabel.setFont(Font().setFamily("Georgia").setBold().setSize(36.0)); nameLabel.setText(state.name ? state.name : Application::name()); - nameLabel.setVisible(!state.logo); + nameLabel.setVisible((bool)state.name); Canvas logoCanvas{&layout, Size{~0, 0}}; logoCanvas.setCollapsible(); @@ -130,11 +130,16 @@ auto AboutDialog::show() -> void { websiteLabel.setFont(Font().setBold()); websiteLabel.setForegroundColor({0, 0, 0}); websiteLabel.setText("Website:"); - Label websiteValue{&websiteLayout, Size{~0, 0}}; + //add a layout for the website value to fill 50% of the window, + HorizontalLayout websiteValueLayout{&websiteLayout, Size{~0, 0}}; + //so that the label is only as long as its text content, + Label websiteValue{&websiteValueLayout, Size{0, 0}}; websiteValue.setAlignment(0.0); websiteValue.setFont(Font().setBold()); websiteValue.setForegroundColor({0, 0, 240}); websiteValue.setText(state.website); + //so that the hand cursor is only visible when overing over the link. + websiteValue.setMouseCursor(MouseCursor::Hand); websiteValue.onMouseRelease([&](auto button) { if(button == Mouse::Button::Left) invoke(state.website); }); diff --git a/hiro/extension/horizontal-resize-grip.cpp b/hiro/extension/horizontal-resize-grip.cpp index afdae850..fdd8d3cb 100644 --- a/hiro/extension/horizontal-resize-grip.cpp +++ b/hiro/extension/horizontal-resize-grip.cpp @@ -12,6 +12,7 @@ mHorizontalResizeGrip::mHorizontalResizeGrip() { icon.write(data, 0x00000000); data += icon.stride(); } mCanvas::setIcon(icon); + mCanvas::setMouseCursor(MouseCursor::HorizontalResize); mCanvas::onMousePress([&](auto button) { if(button == Mouse::Button::Left && !state.timer.enabled()) { doActivate(); diff --git a/hiro/extension/list-view.cpp b/hiro/extension/list-view.cpp index 22c780f6..a04654cc 100644 --- a/hiro/extension/list-view.cpp +++ b/hiro/extension/list-view.cpp @@ -74,7 +74,7 @@ auto mListView::reset() -> type& { return *this; } -auto mListView::resize() -> type& { +auto mListView::resizeColumn() -> type& { mTableView::resizeColumns(); return *this; } @@ -85,12 +85,6 @@ auto mListView::selected() const -> ListViewItem { auto mListView::setVisible(bool visible) -> type& { mTableView::setVisible(visible); -#if 0 - if(visible) { - Application::processEvents(); //heavy-handed, but necessary for proper Widget geometry - mTableView::resizeColumns(); - } -#endif return *this; } diff --git a/hiro/extension/list-view.hpp b/hiro/extension/list-view.hpp index e1c7c382..37bb971d 100644 --- a/hiro/extension/list-view.hpp +++ b/hiro/extension/list-view.hpp @@ -27,7 +27,7 @@ struct mListView : mTableView { auto onContext(const function& callback) -> type&; auto onToggle(const function& callback) -> type&; auto reset() -> type& override; - auto resize() -> type&; + auto resizeColumn() -> type&; auto selected() const -> ListViewItem; auto setVisible(bool visible = true) -> type&; diff --git a/hiro/extension/shared.hpp b/hiro/extension/shared.hpp index 7cb444e0..e58e5eff 100644 --- a/hiro/extension/shared.hpp +++ b/hiro/extension/shared.hpp @@ -222,7 +222,8 @@ struct ListView : sListView { auto onToggle(const function& callback = {}) { return self().onToggle(callback), *this; } auto remove(sListViewItem item) { return self().remove(item), *this; } auto reset() { return self().reset(), *this; } - auto resize() { return self().resize(), *this; } + auto resizeColumn() { return self().resizeColumn(), *this; } + auto selectNone() { return self().selectNone(), *this; } auto selected() { return self().selected(); } auto setAlignment(Alignment alignment = {}) { return self().setAlignment(alignment), *this; } auto setBackgroundColor(Color color = {}) { return self().setBackgroundColor(color), *this; } diff --git a/hiro/extension/vertical-resize-grip.cpp b/hiro/extension/vertical-resize-grip.cpp index f62ba4eb..51a0ed74 100644 --- a/hiro/extension/vertical-resize-grip.cpp +++ b/hiro/extension/vertical-resize-grip.cpp @@ -12,6 +12,7 @@ mVerticalResizeGrip::mVerticalResizeGrip() { icon.write(data, 0x00000000); data += icon.pitch(); } mCanvas::setIcon(icon); + mCanvas::setMouseCursor(MouseCursor::VerticalResize); mCanvas::onMousePress([&](auto button) { if(button == Mouse::Button::Left && !state.timer.enabled()) { doActivate(); diff --git a/hiro/gtk/widget/canvas.cpp b/hiro/gtk/widget/canvas.cpp index 03a07300..546abc94 100644 --- a/hiro/gtk/widget/canvas.cpp +++ b/hiro/gtk/widget/canvas.cpp @@ -2,14 +2,6 @@ namespace hiro { -static auto Canvas_drop(GtkWidget* widget, GdkDragContext* context, signed x, signed y, -GtkSelectionData* data, unsigned type, unsigned timestamp, pCanvas* p) -> void { - if(!p->state().droppable) return; - auto paths = DropPaths(data); - if(!paths) return; - p->self().doDrop(paths); -} - //GTK3 static auto Canvas_draw(GtkWidget* widget, cairo_t* context, pCanvas* p) -> signed { p->_onDraw(context); @@ -22,40 +14,28 @@ static auto Canvas_expose(GtkWidget* widget, GdkEventExpose* event, pCanvas* p) return true; } -static auto Canvas_mouseLeave(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { - p->self().doMouseLeave(); - return true; -} +static auto Canvas_keyPress(GtkWidget* widget, GdkEventKey* event, pViewport* p) -> signed { + //canvass that have been set focusable are intended for games. + //to prevent arrow keys, tab, etc from losing focus on the game viewport, block key propagation here. + if(p->self().focusable()) return true; -static auto Canvas_mouseMove(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { - p->self().doMouseMove({(signed)event->x, (signed)event->y}); - return true; + //for all other cases, allow the key to propagate. + return false; } static auto Canvas_mousePress(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { - switch(event->button) { - case 1: p->self().doMousePress(Mouse::Button::Left); break; - case 2: p->self().doMousePress(Mouse::Button::Middle); break; - case 3: p->self().doMousePress(Mouse::Button::Right); break; - } - return true; -} + //gtk_widget_set_focus_on_click() is a GTK 3.2+ feature. + //implement this functionality manually for GTK 2.0+ compatibility. + if(event->button == 1 && p->self().focusable()) gtk_widget_grab_focus(widget); -static auto Canvas_mouseRelease(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { - switch(event->button) { - case 1: p->self().doMouseRelease(Mouse::Button::Left); break; - case 2: p->self().doMouseRelease(Mouse::Button::Middle); break; - case 3: p->self().doMouseRelease(Mouse::Button::Right); break; - } - return true; + return Widget_mousePress(widget, event, p); } auto pCanvas::construct() -> void { gtkWidget = gtk_drawing_area_new(); gtk_widget_add_events(gtkWidget, - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK); + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK); - setDroppable(state().droppable); _rasterize(); _redraw(); @@ -64,15 +44,17 @@ auto pCanvas::construct() -> void { //GTK+ will throw SIGBUS inside g_signal_connect_data() on one of the below connections g_signal_connect(G_OBJECT(gtkWidget), "button-press-event", G_CALLBACK(Canvas_mousePress), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "button-release-event", G_CALLBACK(Canvas_mouseRelease), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "drag-data-received", G_CALLBACK(Canvas_drop), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "button-release-event", G_CALLBACK(Widget_mouseRelease), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "drag-data-received", G_CALLBACK(Widget_drop), (gpointer)this); #if HIRO_GTK==2 g_signal_connect(G_OBJECT(gtkWidget), "expose-event", G_CALLBACK(Canvas_expose), (gpointer)this); #elif HIRO_GTK==3 g_signal_connect(G_OBJECT(gtkWidget), "draw", G_CALLBACK(Canvas_draw), (gpointer)this); #endif - g_signal_connect(G_OBJECT(gtkWidget), "leave-notify-event", G_CALLBACK(Canvas_mouseLeave), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "motion-notify-event", G_CALLBACK(Canvas_mouseMove), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "key-press-event", G_CALLBACK(Canvas_keyPress), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "enter-notify-event", G_CALLBACK(Widget_mouseEnter), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "leave-notify-event", G_CALLBACK(Widget_mouseLeave), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "motion-notify-event", G_CALLBACK(Widget_mouseMove), (gpointer)this); pWidget::construct(); } @@ -83,6 +65,18 @@ auto pCanvas::destruct() -> void { gtkParent = nullptr; } +auto pCanvas::handle() const -> uintptr { + #if defined(DISPLAY_WINDOWS) + return (uintptr)GDK_WINDOW_HWND(gtk_widget_get_window(gtkWidget)); + #endif + + #if defined(DISPLAY_XORG) + return (uintptr)GDK_WINDOW_XID(gtk_widget_get_window(gtkWidget)); + #endif + + return (uintptr)nullptr; +} + auto pCanvas::minimumSize() const -> Size { if(auto& icon = state().icon) return {(int)icon.width(), (int)icon.height()}; return {0, 0}; @@ -96,11 +90,8 @@ auto pCanvas::setColor(Color color) -> void { update(); } -auto pCanvas::setDroppable(bool droppable) -> void { - if(droppable) { - gtk_drag_dest_set(gtkWidget, GTK_DEST_DEFAULT_ALL, nullptr, 0, GDK_ACTION_COPY); - gtk_drag_dest_add_uri_targets(gtkWidget); - } +auto pCanvas::setFocusable(bool focusable) -> void { + gtk_widget_set_can_focus(gtkWidget, focusable); } auto pCanvas::setGeometry(Geometry geometry) -> void { diff --git a/hiro/gtk/widget/canvas.hpp b/hiro/gtk/widget/canvas.hpp index f921f826..2bae3ef9 100644 --- a/hiro/gtk/widget/canvas.hpp +++ b/hiro/gtk/widget/canvas.hpp @@ -5,10 +5,11 @@ namespace hiro { struct pCanvas : pWidget { Declare(Canvas, Widget) + auto handle() const -> uintptr; auto minimumSize() const -> Size; auto setAlignment(Alignment) -> void; auto setColor(Color color) -> void; - auto setDroppable(bool droppable) -> void; + auto setFocusable(bool focusable) -> void override; auto setGeometry(Geometry geometry) -> void override; auto setGradient(Gradient gradient) -> void; auto setIcon(const image& icon) -> void; diff --git a/hiro/gtk/widget/label.cpp b/hiro/gtk/widget/label.cpp index f0c386f0..3c657be9 100644 --- a/hiro/gtk/widget/label.cpp +++ b/hiro/gtk/widget/label.cpp @@ -46,6 +46,16 @@ static auto Label_expose(GtkWidget* widget, GdkEvent* event, pLabel* p) -> int { return false; } +static auto Label_mouseEnter(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { + Widget_mouseEnter(widget, event, p); + return true; +} + +static auto Label_mouseLeave(GtkWidget* widget, GdkEventButton* event, pCanvas* p) -> signed { + Widget_mouseLeave(widget, event, p); + return true; +} + static auto Label_mousePress(GtkWidget* widget, GdkEventButton* event, pLabel* p) -> int { switch(event->button) { case 1: p->self().doMousePress(Mouse::Button::Left); break; @@ -82,6 +92,8 @@ auto pLabel::construct() -> void { #elif HIRO_GTK==3 g_signal_connect(G_OBJECT(subWidget), "draw", G_CALLBACK(Label_draw), (gpointer)this); #endif + g_signal_connect(G_OBJECT(gtkWidget), "enter-notify-event", G_CALLBACK(Label_mouseEnter), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "leave-notify-event", G_CALLBACK(Label_mouseLeave), (gpointer)this); pWidget::construct(); } diff --git a/hiro/gtk/widget/source-edit.cpp b/hiro/gtk/widget/source-edit.cpp index d72a5f20..e373be01 100644 --- a/hiro/gtk/widget/source-edit.cpp +++ b/hiro/gtk/widget/source-edit.cpp @@ -7,6 +7,7 @@ static auto SourceEdit_change(GtkTextBuffer*, pSourceEdit* p) -> void { } static auto SourceEdit_move(GObject*, GParamSpec*, pSourceEdit* p) -> void { + p->state().textCursor = p->textCursor(); if(!p->locked()) p->self().doMove(); } @@ -53,6 +54,7 @@ auto pSourceEdit::construct() -> void { setNumbered(state().numbered); setScheme(state().scheme); setText(state().text); + setTextCursor(state().textCursor); setWordWrap(state().wordWrap); g_signal_connect(G_OBJECT(gtkSourceBuffer), "changed", G_CALLBACK(SourceEdit_change), (gpointer)this); @@ -67,37 +69,6 @@ auto pSourceEdit::destruct() -> void { gtk_widget_destroy(gtkWidget); } -auto pSourceEdit::cursor() const -> Cursor { - Cursor cursor; - int offset = 0; - g_object_get(G_OBJECT(gtkSourceBuffer), "cursor-position", &offset, nullptr); - cursor.setOffset(offset); - GtkTextIter start, end; - if(gtk_text_buffer_get_selection_bounds(gtkTextBuffer, &start, &end)) { - //if selecting text from left to right, the cursor may be ahead of the selection start ... - //since hiro combines selection bounds (end-start) into length, move the offset to the start - int origin = gtk_text_iter_get_offset(&start); - cursor.setOffset(origin); - int length = gtk_text_iter_get_offset(&end) - origin; - cursor.setLength(length); - } - return cursor; -} - -auto pSourceEdit::setCursor(Cursor cursor) -> void { - lock(); - GtkTextIter offset, length; - gtk_text_buffer_get_end_iter(gtkTextBuffer, &offset); - gtk_text_buffer_get_end_iter(gtkTextBuffer, &length); - signed end = gtk_text_iter_get_offset(&offset); - gtk_text_iter_set_offset(&offset, max(0, min(end, cursor.offset()))); - gtk_text_iter_set_offset(&length, max(0, min(end, cursor.offset() + cursor.length()))); - gtk_text_buffer_select_range(gtkTextBuffer, &offset, &length); - auto mark = gtk_text_buffer_get_mark(gtkTextBuffer, "insert"); - gtk_text_view_scroll_mark_onscreen(gtkTextView, mark); - unlock(); -} - auto pSourceEdit::setEditable(bool editable) -> void { gtk_text_view_set_editable(gtkTextView, editable); } @@ -110,7 +81,7 @@ auto pSourceEdit::setLanguage(const string& language) -> void { string name; if(language == "C") name = "c"; if(language == "C++") name = "cpp"; - if(language == "Make") name = "makefile"; + if(language == "Makefile") name = "makefile"; gtkSourceLanguage = gtk_source_language_manager_get_language(gtkSourceLanguageManager, name); gtk_source_buffer_set_language(gtkSourceBuffer, gtkSourceLanguage); } @@ -136,6 +107,20 @@ auto pSourceEdit::setText(const string& text) -> void { unlock(); } +auto pSourceEdit::setTextCursor(TextCursor cursor) -> void { + lock(); + GtkTextIter offset, length; + gtk_text_buffer_get_end_iter(gtkTextBuffer, &offset); + gtk_text_buffer_get_end_iter(gtkTextBuffer, &length); + signed end = gtk_text_iter_get_offset(&offset); + gtk_text_iter_set_offset(&offset, max(0, min(end, cursor.offset()))); + gtk_text_iter_set_offset(&length, max(0, min(end, cursor.offset() + cursor.length()))); + gtk_text_buffer_select_range(gtkTextBuffer, &offset, &length); + auto mark = gtk_text_buffer_get_mark(gtkTextBuffer, "insert"); + gtk_text_view_scroll_mark_onscreen(gtkTextView, mark); + unlock(); +} + auto pSourceEdit::setWordWrap(bool wordWrap) -> void { gtk_text_view_set_wrap_mode(gtkTextView, wordWrap ? GTK_WRAP_WORD_CHAR : GTK_WRAP_NONE); gtk_scrolled_window_set_policy(gtkScrolledWindow, wordWrap ? GTK_POLICY_NEVER : GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS); @@ -154,6 +139,23 @@ auto pSourceEdit::text() const -> string { return text; } +auto pSourceEdit::textCursor() const -> TextCursor { + TextCursor cursor; + int offset = 0; + g_object_get(G_OBJECT(gtkSourceBuffer), "cursor-position", &offset, nullptr); + cursor.setOffset(offset); + GtkTextIter start, end; + if(gtk_text_buffer_get_selection_bounds(gtkTextBuffer, &start, &end)) { + //if selecting text from left to right, the cursor may be ahead of the selection start ... + //since hiro combines selection bounds (end-start) into length, move the offset to the start + int origin = gtk_text_iter_get_offset(&start); + cursor.setOffset(origin); + int length = gtk_text_iter_get_offset(&end) - origin; + cursor.setLength(length); + } + return cursor; +} + } #endif diff --git a/hiro/gtk/widget/source-edit.hpp b/hiro/gtk/widget/source-edit.hpp index 54153246..7798461c 100644 --- a/hiro/gtk/widget/source-edit.hpp +++ b/hiro/gtk/widget/source-edit.hpp @@ -5,16 +5,16 @@ namespace hiro { struct pSourceEdit : pWidget { Declare(SourceEdit, Widget) - auto cursor() const -> Cursor; - auto setCursor(Cursor cursor) -> void; auto setEditable(bool editable) -> void; auto setFocused() -> void override; auto setLanguage(const string& language) -> void; auto setNumbered(bool numbered) -> void; auto setScheme(const string& scheme) -> void; auto setText(const string& text) -> void; + auto setTextCursor(TextCursor textCursor) -> void; auto setWordWrap(bool wordWrap) -> void; auto text() const -> string; + auto textCursor() const -> TextCursor; GtkScrolledWindow* gtkScrolledWindow = nullptr; GtkContainer* gtkContainer = nullptr; diff --git a/hiro/gtk/widget/table-view.cpp b/hiro/gtk/widget/table-view.cpp index 6d27c810..4ccffa75 100644 --- a/hiro/gtk/widget/table-view.cpp +++ b/hiro/gtk/widget/table-view.cpp @@ -14,6 +14,15 @@ static auto TableView_popup(GtkTreeView*, pTableView* p) -> void { return p->_do static auto TableView_dataFunc(GtkTreeViewColumn* column, GtkCellRenderer* renderer, GtkTreeModel* model, GtkTreeIter* iter, pTableView* p) -> void { return p->_doDataFunc(column, renderer, iter); } static auto TableView_toggle(GtkCellRendererToggle* toggle, const char* path, pTableView* p) -> void { return p->_doToggle(toggle, path); } +static auto TableView_realize(GtkTreeView*, pTableView* p) -> void { + //the initial geometry for column sizing is most likely wrong at this point: + //having to call processEvents() twice is very heavy-handed, but necessary here. + for(uint repeat : range(2)) { + Application::processEvents(); + p->resizeColumns(); + } +} + auto pTableView::construct() -> void { gtkWidget = gtk_scrolled_window_new(0, 0); gtkScrolledWindow = GTK_SCROLLED_WINDOW(gtkWidget); @@ -41,6 +50,7 @@ auto pTableView::construct() -> void { g_signal_connect(G_OBJECT(gtkTreeView), "key-press-event", G_CALLBACK(TableView_keyPressEvent), (gpointer)this); g_signal_connect(G_OBJECT(gtkTreeView), "motion-notify-event", G_CALLBACK(TableView_mouseMoveEvent), (gpointer)this); g_signal_connect(G_OBJECT(gtkTreeView), "popup-menu", G_CALLBACK(TableView_popup), (gpointer)this); + g_signal_connect(G_OBJECT(gtkTreeView), "realize", G_CALLBACK(TableView_realize), (gpointer)this); g_signal_connect(G_OBJECT(gtkTreeView), "row-activated", G_CALLBACK(TableView_activate), (gpointer)this); g_signal_connect(G_OBJECT(gtkTreeSelection), "changed", G_CALLBACK(TableView_change), (gpointer)this); @@ -128,15 +138,18 @@ auto pTableView::setBordered(bool bordered) -> void { } auto pTableView::setFocused() -> void { + lock(); //gtk_widget_grab_focus() will select the first item if nothing is currently selected //this behavior is undesirable. detect selection state first, and restore if required - if(!state().batchable) { //gtk_tree_selection_get_selected() will throw a critical exception in batchable mode - lock(); + if(!state().batchable) { + //gtk_tree_selection_get_selected() will throw a critical exception in batchable mode bool selected = gtk_tree_selection_get_selected(gtkTreeSelection, nullptr, nullptr); gtk_widget_grab_focus(gtkWidgetChild); if(!selected) gtk_tree_selection_unselect_all(gtkTreeSelection); - unlock(); + } else { + gtk_widget_grab_focus(gtkWidgetChild); } + unlock(); } auto pTableView::setFont(const Font& font) -> void { @@ -151,7 +164,10 @@ auto pTableView::setForegroundColor(Color color) -> void { auto pTableView::setGeometry(Geometry geometry) -> void { pWidget::setGeometry(geometry); for(auto& column : state().columns) { - if(column->expandable()) return resizeColumns(); + if(column->expandable()) { + Application::processEvents(); + return resizeColumns(); + } } } @@ -352,23 +368,25 @@ auto pTableView::_doHeaderActivate(GtkTreeViewColumn* gtkTreeViewColumn) -> void } auto pTableView::_doKeyPress(GdkEventKey* event) -> bool { + //TODO: GCC 8.2.0 on FreeBSD 12.0 (amd64) seems to miscompile this function periodically to always return true. + return false; + if(state().batchable && event->type == GDK_KEY_PRESS) { //when using keyboard to activate tree view items in GTK_SELECTION_MULTIPLE mode, GTK will deselect all but the last item //this code detects said case, blocks the key from being propagated, and calls the activate callback directly //the result is that the enter key can be used to activate multiple selected items at a time //there are four ways to activate items via the keyboard in GTK, so we have to detect all of them here - auto modifiers = event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_SUPER_MASK); //ignore other modifiers (eg mouse buttons) + uint modifiers = event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_SUPER_MASK); //ignore other modifiers (eg mouse buttons) if((event->keyval == GDK_KEY_Return && !modifiers) || (event->keyval == GDK_KEY_KP_Enter && !modifiers) || (event->keyval == GDK_KEY_space && !modifiers) || (event->keyval == GDK_KEY_space && modifiers == GDK_SHIFT_MASK) ) { _doActivate(); - return true; + return true; //block GTK from handling this keypress } } - //allow GTK to handle this keypress - return false; + return false; //allow GTK to handle this keypress } //GtkTreeView::cursor-changed and GtkTreeSelection::changed do not send signals for changes during rubber-banding selection @@ -401,7 +419,7 @@ auto pTableView::_doToggle(GtkCellRendererToggle* gtkCellRendererToggle, const c //this isn't currently exposed as a hiro API call, so try and determine if we should apply it here //basically, if there's two or more columns and no custom colors applied, then we do so auto pTableView::_updateRulesHint() -> void { - bool rules = true; + bool rules = false; //true if(state().backgroundColor) rules = false; if(state().foregroundColor) rules = false; if(state().columns.size() <= 1) rules = false; diff --git a/hiro/gtk/widget/text-edit.cpp b/hiro/gtk/widget/text-edit.cpp index 9768dfc9..25c018a8 100644 --- a/hiro/gtk/widget/text-edit.cpp +++ b/hiro/gtk/widget/text-edit.cpp @@ -7,13 +7,8 @@ static auto TextEdit_change(GtkTextBuffer* textBuffer, pTextEdit* p) -> void { } static auto TextEdit_move(GObject* object, GParamSpec* spec, pTextEdit* p) -> void { - signed offset = 0; - g_object_get(p->textBuffer, "cursor-position", &offset, nullptr); - - if(p->state().cursor.offset() != offset) { - p->state().cursor.setOffset(offset); - if(!p->locked()) p->self().doMove(); - } + p->state().textCursor = p->textCursor(); + if(!p->locked()) p->self().doMove(); } auto pTextEdit::construct() -> void { @@ -32,8 +27,8 @@ auto pTextEdit::construct() -> void { setEditable(state().editable); setForegroundColor(state().foregroundColor); setText(state().text); + setTextCursor(state().textCursor); setWordWrap(state().wordWrap); - setCursor(state().cursor); g_signal_connect(G_OBJECT(textBuffer), "changed", G_CALLBACK(TextEdit_change), (gpointer)this); g_signal_connect(G_OBJECT(textBuffer), "notify::cursor-position", G_CALLBACK(TextEdit_move), (gpointer)this); @@ -56,20 +51,6 @@ auto pTextEdit::setBackgroundColor(Color color) -> void { gtk_widget_modify_base(subWidget, GTK_STATE_NORMAL, color ? &gdkColor : nullptr); } -auto pTextEdit::setCursor(Cursor cursor) -> void { - lock(); - GtkTextIter offset, length; - gtk_text_buffer_get_end_iter(textBuffer, &offset); - gtk_text_buffer_get_end_iter(textBuffer, &length); - signed end = gtk_text_iter_get_offset(&offset); - gtk_text_iter_set_offset(&offset, max(0, min(end, cursor.offset()))); - gtk_text_iter_set_offset(&length, max(0, min(end, cursor.offset() + cursor.length()))); - gtk_text_buffer_select_range(textBuffer, &offset, &length); - auto mark = gtk_text_buffer_get_mark(textBuffer, "insert"); - gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(subWidget), mark); - unlock(); -} - auto pTextEdit::setEditable(bool editable) -> void { gtk_text_view_set_editable(GTK_TEXT_VIEW(subWidget), editable); } @@ -90,6 +71,20 @@ auto pTextEdit::setText(const string& text) -> void { unlock(); } +auto pTextEdit::setTextCursor(TextCursor cursor) -> void { + lock(); + GtkTextIter offset, length; + gtk_text_buffer_get_end_iter(textBuffer, &offset); + gtk_text_buffer_get_end_iter(textBuffer, &length); + signed end = gtk_text_iter_get_offset(&offset); + gtk_text_iter_set_offset(&offset, max(0, min(end, cursor.offset()))); + gtk_text_iter_set_offset(&length, max(0, min(end, cursor.offset() + cursor.length()))); + gtk_text_buffer_select_range(textBuffer, &offset, &length); + auto mark = gtk_text_buffer_get_mark(textBuffer, "insert"); + gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(subWidget), mark); + unlock(); +} + auto pTextEdit::setWordWrap(bool wordWrap) -> void { gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(subWidget), wordWrap ? GTK_WRAP_WORD_CHAR : GTK_WRAP_NONE); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gtkWidget), @@ -107,6 +102,23 @@ auto pTextEdit::text() const -> string { return text; } +auto pTextEdit::textCursor() const -> TextCursor { + TextCursor cursor; + int offset = 0; + g_object_get(G_OBJECT(textBuffer), "cursor-position", &offset, nullptr); + cursor.setOffset(offset); + GtkTextIter start, end; + if(gtk_text_buffer_get_selection_bounds(textBuffer, &start, &end)) { + //if selecting text from left to right, the cursor may be ahead of the selection start ... + //since hiro combines selection bounds (end-start) into length, move the offset to the start + int origin = gtk_text_iter_get_offset(&start); + cursor.setOffset(origin); + int length = gtk_text_iter_get_offset(&end) - origin; + cursor.setLength(length); + } + return cursor; +} + } #endif diff --git a/hiro/gtk/widget/text-edit.hpp b/hiro/gtk/widget/text-edit.hpp index 4bb7e1fe..4a0029b4 100644 --- a/hiro/gtk/widget/text-edit.hpp +++ b/hiro/gtk/widget/text-edit.hpp @@ -7,13 +7,14 @@ struct pTextEdit : pWidget { auto focused() const -> bool override; auto setBackgroundColor(Color color) -> void; - auto setCursor(Cursor cursor) -> void; auto setEditable(bool editable) -> void; auto setFocused() -> void override; auto setForegroundColor(Color color) -> void; auto setText(const string& text) -> void; + auto setTextCursor(TextCursor textCursor) -> void; auto setWordWrap(bool wordWrap) -> void; auto text() const -> string; + auto textCursor() const -> TextCursor; GtkWidget* subWidget = nullptr; GtkTextBuffer* textBuffer = nullptr; diff --git a/hiro/gtk/widget/viewport.cpp b/hiro/gtk/widget/viewport.cpp index 3816a860..9923ff8b 100644 --- a/hiro/gtk/widget/viewport.cpp +++ b/hiro/gtk/widget/viewport.cpp @@ -2,74 +2,52 @@ namespace hiro { -static auto Viewport_dropEvent(GtkWidget* widget, GdkDragContext* context, signed x, signed y, -GtkSelectionData* data, unsigned type, unsigned timestamp, pViewport* p) -> void { - if(!p->state().droppable) return; - auto paths = DropPaths(data); - if(!paths) return; - p->self().doDrop(paths); -} - +//GTK3 static auto Viewport_draw(GtkWidget* widget, cairo_t* context, pViewport* p) -> signed { + p->_onDraw(context); return true; } -static auto Viewport_expose(GtkWidget* widget, GdkEventExpose* event) -> signed { +//GTK2 +static auto Viewport_expose(GtkWidget* widget, GdkEventExpose* event, pViewport* p) -> signed { + p->_onExpose(event); return true; } -static auto Viewport_mouseLeave(GtkWidget* widget, GdkEventButton* event, pViewport* p) -> signed { - p->self().doMouseLeave(); - return true; -} +static auto Viewport_keyPress(GtkWidget* widget, GdkEventKey* event, pViewport* p) -> signed { + //viewports that have been set focusable are intended for games. + //to prevent arrow keys, tab, etc from losing focus on the game viewport, block key propagation here. + if(p->self().focusable()) return true; -static auto Viewport_mouseMove(GtkWidget* widget, GdkEventButton* event, pViewport* p) -> signed { - p->self().doMouseMove({(signed)event->x, (signed)event->y}); - return true; + //for all other cases, allow the key to propagate. + return false; } static auto Viewport_mousePress(GtkWidget* widget, GdkEventButton* event, pViewport* p) -> signed { - switch(event->button) { - case 1: p->self().doMousePress(Mouse::Button::Left); break; - case 2: p->self().doMousePress(Mouse::Button::Middle); break; - case 3: p->self().doMousePress(Mouse::Button::Right); break; - } - return true; -} + //gtk_widget_set_focus_on_click() is a GTK 3.2+ feature. + //implement this functionality manually for GTK 2.0+ compatibility. + if(event->button == 1 && p->self().focusable()) gtk_widget_grab_focus(widget); -static auto Viewport_mouseRelease(GtkWidget* widget, GdkEventButton* event, pViewport* p) -> signed { - switch(event->button) { - case 1: p->self().doMouseRelease(Mouse::Button::Left); break; - case 2: p->self().doMouseRelease(Mouse::Button::Middle); break; - case 3: p->self().doMouseRelease(Mouse::Button::Right); break; - } - return true; + return Widget_mousePress(widget, event, p); } auto pViewport::construct() -> void { gtkWidget = gtk_drawing_area_new(); gtk_widget_add_events(gtkWidget, - GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK); - - GdkColor color; - color.pixel = 0; - color.red = 0; - color.green = 0; - color.blue = 0; - gtk_widget_modify_bg(gtkWidget, GTK_STATE_NORMAL, &color); - - setDroppable(state().droppable); + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_EXPOSURE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK); g_signal_connect(G_OBJECT(gtkWidget), "button-press-event", G_CALLBACK(Viewport_mousePress), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "button-release-event", G_CALLBACK(Viewport_mouseRelease), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "drag-data-received", G_CALLBACK(Viewport_dropEvent), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "button-release-event", G_CALLBACK(Widget_mouseRelease), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "drag-data-received", G_CALLBACK(Widget_drop), (gpointer)this); #if HIRO_GTK==2 g_signal_connect(G_OBJECT(gtkWidget), "expose-event", G_CALLBACK(Viewport_expose), (gpointer)this); #elif HIRO_GTK==3 g_signal_connect(G_OBJECT(gtkWidget), "draw", G_CALLBACK(Viewport_draw), (gpointer)this); #endif - g_signal_connect(G_OBJECT(gtkWidget), "leave-notify-event", G_CALLBACK(Viewport_mouseLeave), (gpointer)this); - g_signal_connect(G_OBJECT(gtkWidget), "motion-notify-event", G_CALLBACK(Viewport_mouseMove), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "key-press-event", G_CALLBACK(Viewport_keyPress), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "enter-notify-event", G_CALLBACK(Widget_mouseEnter), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "leave-notify-event", G_CALLBACK(Widget_mouseLeave), (gpointer)this); + g_signal_connect(G_OBJECT(gtkWidget), "motion-notify-event", G_CALLBACK(Widget_mouseMove), (gpointer)this); pWidget::construct(); } @@ -85,17 +63,25 @@ auto pViewport::handle() const -> uintptr { #endif #if defined(DISPLAY_XORG) - return GDK_WINDOW_XID(gtk_widget_get_window(gtkWidget)); + return (uintptr)GDK_WINDOW_XID(gtk_widget_get_window(gtkWidget)); #endif return (uintptr)nullptr; } -auto pViewport::setDroppable(bool droppable) -> void { - if(droppable) { - gtk_drag_dest_set(gtkWidget, GTK_DEST_DEFAULT_ALL, nullptr, 0, GDK_ACTION_COPY); - gtk_drag_dest_add_uri_targets(gtkWidget); - } +auto pViewport::setFocusable(bool focusable) -> void { + gtk_widget_set_can_focus(gtkWidget, focusable); +} + +auto pViewport::_onDraw(cairo_t* context) -> void { + cairo_set_source_rgba(context, 0.0, 0.0, 0.0, 1.0); + cairo_paint(context); +} + +auto pViewport::_onExpose(GdkEventExpose* expose) -> void { + cairo_t* context = gdk_cairo_create(gtk_widget_get_window(gtkWidget)); + _onDraw(context); + cairo_destroy(context); } } diff --git a/hiro/gtk/widget/viewport.hpp b/hiro/gtk/widget/viewport.hpp index 4eb4fe2e..54def999 100644 --- a/hiro/gtk/widget/viewport.hpp +++ b/hiro/gtk/widget/viewport.hpp @@ -6,7 +6,10 @@ struct pViewport : pWidget { Declare(Viewport, Widget) auto handle() const -> uintptr; - auto setDroppable(bool droppable) -> void; + auto setFocusable(bool focusable) -> void override; + + auto _onDraw(cairo_t* context) -> void; + auto _onExpose(GdkEventExpose* expose) -> void; }; } diff --git a/hiro/gtk/widget/widget.cpp b/hiro/gtk/widget/widget.cpp index 069af87c..652cbbcf 100644 --- a/hiro/gtk/widget/widget.cpp +++ b/hiro/gtk/widget/widget.cpp @@ -2,12 +2,66 @@ namespace hiro { +static auto Widget_drop(GtkWidget* widget, GdkDragContext* context, int x, int y, +GtkSelectionData* data, uint type, uint timestamp, pWidget* p) -> void { + if(!p->state().droppable) return; + auto paths = DropPaths(data); + if(!paths) return; + p->self().doDrop(paths); +} + +static auto Widget_mouseEnter(GtkWidget* widget, GdkEventButton* event, pWidget* p) -> int { + if(auto cursor = p->gdkMouseCursor) { + if(auto window = gtk_widget_get_parent_window(widget)) { + gdk_window_set_cursor(window, cursor); + } + } + p->self().doMouseEnter(); + return true; +} + +static auto Widget_mouseLeave(GtkWidget* widget, GdkEventButton* event, pWidget* p) -> int { + if(auto cursor = p->gdkMouseCursor) { + if(auto window = gtk_widget_get_parent_window(widget)) { + gdk_window_set_cursor(window, nullptr); + } + } + p->self().doMouseLeave(); + return true; +} + +static auto Widget_mouseMove(GtkWidget* widget, GdkEventButton* event, pWidget* p) -> signed { + p->self().doMouseMove({(signed)event->x, (signed)event->y}); + return true; +} + +static auto Widget_mousePress(GtkWidget* widget, GdkEventButton* event, pWidget* p) -> signed { + switch(event->button) { + case 1: p->self().doMousePress(Mouse::Button::Left); break; + case 2: p->self().doMousePress(Mouse::Button::Middle); break; + case 3: p->self().doMousePress(Mouse::Button::Right); break; + } + return true; +} + +static auto Widget_mouseRelease(GtkWidget* widget, GdkEventButton* event, pWidget* p) -> signed { + switch(event->button) { + case 1: p->self().doMouseRelease(Mouse::Button::Left); break; + case 2: p->self().doMouseRelease(Mouse::Button::Middle); break; + case 3: p->self().doMouseRelease(Mouse::Button::Right); break; + } + return true; +} + auto pWidget::construct() -> void { if(!gtkWidget) return; if(auto window = self().parentWindow(true)) { if(window->self()) window->self()->_append(self()); + setDroppable(self().droppable()); setEnabled(self().enabled(true)); + setFocusable(self().focusable()); setFont(self().font(true)); + setMouseCursor(self().mouseCursor()); setToolTip(self().toolTip()); setVisible(self().visible(true)); } @@ -25,11 +79,23 @@ auto pWidget::focused() const -> bool { return gtk_widget_has_focus(gtkWidget); } +auto pWidget::setDroppable(bool droppable) -> void { + if(!gtkWidget) return; + if(droppable) { + gtk_drag_dest_set(gtkWidget, GTK_DEST_DEFAULT_ALL, nullptr, 0, GDK_ACTION_COPY); + gtk_drag_dest_add_uri_targets(gtkWidget); + } +} + auto pWidget::setEnabled(bool enabled) -> void { if(!gtkWidget) return; gtk_widget_set_sensitive(gtkWidget, enabled); } +auto pWidget::setFocusable(bool focusable) -> void { + //virtual overload: only configurable for Canvas and Viewport +} + auto pWidget::setFocused() -> void { if(!gtkWidget) return; gtk_widget_grab_focus(gtkWidget); @@ -63,6 +129,24 @@ auto pWidget::setGeometry(Geometry geometry) -> void { pSizable::setGeometry(geometry); } +auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void { +//TODO: this should be freed, yet this code seems to break the cursor assignment completely ... +//if(gdkMouseCursor) { +// gdk_cursor_unref(gdkMouseCursor); +// gdkMouseCursor = nullptr; +//} + + if(mouseCursor) { + string name; + if(mouseCursor == MouseCursor::Hand) name = "hand1"; + if(mouseCursor == MouseCursor::HorizontalResize) name = "sb_h_double_arrow"; + if(mouseCursor == MouseCursor::VerticalResize) name = "sb_v_double_arrow"; + if(name) { + gdkMouseCursor = gdk_cursor_new_from_name(gdk_display_get_default(), name); + } + } +} + auto pWidget::setToolTip(const string& toolTip) -> void { gtk_widget_set_tooltip_text(gtkWidget, toolTip); } diff --git a/hiro/gtk/widget/widget.hpp b/hiro/gtk/widget/widget.hpp index 9058c128..05d1dab1 100644 --- a/hiro/gtk/widget/widget.hpp +++ b/hiro/gtk/widget/widget.hpp @@ -7,15 +7,19 @@ struct pWidget : pSizable { virtual auto container(mWidget& widget) -> GtkWidget*; auto focused() const -> bool override; + auto setDroppable(bool droppable) -> void; auto setEnabled(bool enabled) -> void override; + virtual auto setFocusable(bool focusable) -> void; auto setFocused() -> void override; auto setFont(const Font& font) -> void override; auto setGeometry(Geometry geometry) -> void override; + auto setMouseCursor(const MouseCursor& mouseCursor) -> void; auto setToolTip(const string& toolTip) -> void; auto setVisible(bool visible) -> void override; GtkWidget* gtkWidget = nullptr; GtkWidget* gtkParent = nullptr; + GdkCursor* gdkMouseCursor = nullptr; }; } diff --git a/hiro/gtk/window.cpp b/hiro/gtk/window.cpp index fce4dee2..a04ab17a 100644 --- a/hiro/gtk/window.cpp +++ b/hiro/gtk/window.cpp @@ -541,9 +541,12 @@ auto pWindow::_synchronizeGeometry() -> void { if(!gtk_widget_get_realized(widget)) return; if(!gtk_widget_get_visible(widget)) return; + //get_allocation(formContainer) returns the same values as get_allocation(widget) ... + //as a result, we have to compensate for the window margin ourselves here. GtkAllocation allocation; - - gtk_widget_get_allocation(formContainer, &allocation); + gtk_widget_get_allocation(widget, &allocation); + allocation.height -= _menuHeight(); + allocation.height -= _statusHeight(); if(allocation.width != lastSize.width || allocation.height != lastSize.height) { auto size = self().geometry().size(); state().geometry.setSize({allocation.width, allocation.height}); diff --git a/hiro/qt/widget/canvas.cpp b/hiro/qt/widget/canvas.cpp index 1ba354df..677c1e33 100644 --- a/hiro/qt/widget/canvas.cpp +++ b/hiro/qt/widget/canvas.cpp @@ -34,6 +34,10 @@ auto pCanvas::setDroppable(bool droppable) -> void { qtCanvas->setAcceptDrops(droppable); } +auto pCanvas::setFocusable(bool focusable) -> void { + //TODO +} + auto pCanvas::setGeometry(Geometry geometry) -> void { update(); pWidget::setGeometry(geometry); diff --git a/hiro/qt/widget/canvas.hpp b/hiro/qt/widget/canvas.hpp index 686a1030..58cee994 100644 --- a/hiro/qt/widget/canvas.hpp +++ b/hiro/qt/widget/canvas.hpp @@ -8,7 +8,8 @@ struct pCanvas : pWidget { auto minimumSize() const -> Size; auto setAlignment(Alignment) -> void; auto setColor(Color color) -> void; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; auto setGeometry(Geometry geometry) -> void; auto setGradient(Gradient gradient) -> void; auto setIcon(const image& icon) -> void; diff --git a/hiro/qt/widget/text-edit.cpp b/hiro/qt/widget/text-edit.cpp index 466c51aa..75ff1bee 100644 --- a/hiro/qt/widget/text-edit.cpp +++ b/hiro/qt/widget/text-edit.cpp @@ -27,10 +27,6 @@ auto pTextEdit::setBackgroundColor(Color color) -> void { qtTextEdit->setAutoFillBackground((bool)color); } -auto pTextEdit::setCursor(Cursor cursor) -> void { - _setState(); -} - auto pTextEdit::setEditable(bool editable) -> void { _setState(); } @@ -47,6 +43,10 @@ auto pTextEdit::setText(const string& text) -> void { qtTextEdit->setPlainText(QString::fromUtf8(text)); } +auto pTextEdit::setTextCursor(TextCursor cursor) -> void { + _setState(); +} + auto pTextEdit::setWordWrap(bool wordWrap) -> void { _setState(); } @@ -55,11 +55,16 @@ auto pTextEdit::text() const -> string { return qtTextEdit->toPlainText().toUtf8().constData(); } +auto pTextEdit::textCursor() const -> TextCursor { + //TODO + return state().textCursor; +} + auto pTextEdit::_setState() -> void { QTextCursor cursor = qtTextEdit->textCursor(); signed lastCharacter = strlen(qtTextEdit->toPlainText().toUtf8().constData()); - cursor.setPosition(max(0, min(lastCharacter, state().cursor.offset()))); - cursor.setPosition(max(0, min(lastCharacter, state().cursor.offset() + state().cursor.length())), QTextCursor::KeepAnchor); + cursor.setPosition(max(0, min(lastCharacter, state().textCursor.offset()))); + cursor.setPosition(max(0, min(lastCharacter, state().textCursor.offset() + state().textCursor.length())), QTextCursor::KeepAnchor); qtTextEdit->setTextCursor(cursor); qtTextEdit->setTextInteractionFlags(state().editable ? Qt::TextEditorInteraction diff --git a/hiro/qt/widget/text-edit.hpp b/hiro/qt/widget/text-edit.hpp index a810a3ed..e0c29c1a 100644 --- a/hiro/qt/widget/text-edit.hpp +++ b/hiro/qt/widget/text-edit.hpp @@ -6,12 +6,13 @@ struct pTextEdit : pWidget { Declare(TextEdit, Widget) auto setBackgroundColor(Color color) -> void; - auto setCursor(Cursor cursor) -> void; auto setEditable(bool editable) -> void; auto setForegroundColor(Color color) -> void; auto setText(const string& text) -> void; + auto setTextCursor(TextCursor cursor) -> void; auto setWordWrap(bool wordWrap) -> void; auto text() const -> string; + auto textCursor() const -> TextCursor; auto _setState() -> void; diff --git a/hiro/qt/widget/viewport.cpp b/hiro/qt/widget/viewport.cpp index 8edc159c..653c45a5 100644 --- a/hiro/qt/widget/viewport.cpp +++ b/hiro/qt/widget/viewport.cpp @@ -25,8 +25,12 @@ auto pViewport::setDroppable(bool droppable) -> void { _setState(); } +auto pViewport::setFocusable(bool focusable) -> void { + //TODO +} + auto pViewport::_setState() -> void { - qtViewport->setAcceptDrops(state().droppable); + qtViewport->setAcceptDrops(self().droppable()); } auto QtViewport::dragEnterEvent(QDragEnterEvent* event) -> void { diff --git a/hiro/qt/widget/viewport.hpp b/hiro/qt/widget/viewport.hpp index 82a90dca..99588dfe 100644 --- a/hiro/qt/widget/viewport.hpp +++ b/hiro/qt/widget/viewport.hpp @@ -6,7 +6,8 @@ struct pViewport : pWidget { Declare(Viewport, Widget) auto handle() const -> uintptr_t; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; auto _setState() -> void; diff --git a/hiro/qt/widget/widget.cpp b/hiro/qt/widget/widget.cpp index 05dc77ef..132b11a6 100644 --- a/hiro/qt/widget/widget.cpp +++ b/hiro/qt/widget/widget.cpp @@ -25,8 +25,11 @@ auto pWidget::construct() -> void { qtWidget->setParent(container); } + setDroppable(self().droppable()); setEnabled(self().enabled(true)); + setFocusable(self().focusable()); setFont(self().font(true)); + setMouseCursor(self().mouseCursor()); setToolTip(self().toolTip()); setVisible(self().visible(true)); } @@ -39,11 +42,19 @@ auto pWidget::focused() const -> bool { return qtWidget->hasFocus(); } +auto pWidget::setDroppable(bool droppable) -> void { + //virtual overload, implemented on a per-widget basis +} + auto pWidget::setEnabled(bool enabled) -> void { if(!qtWidget) return; qtWidget->setEnabled(enabled); } +auto pWidget::setFocusable(bool focusable) -> void { + //virtual overload, implemented on a per-widget basis +} + auto pWidget::setFocused() -> void { if(!qtWidget) return; qtWidget->setFocus(Qt::OtherFocusReason); @@ -60,6 +71,14 @@ auto pWidget::setGeometry(Geometry geometry) -> void { pSizable::setGeometry(geometry); } +auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void { + auto cursorID = Qt::ArrowCursor; + if(mouseCursor.name() == MouseCursor::Hand) cursorID = Qt::PointingHandCursor; + if(mouseCursor.name() == MouseCursor::HorizontalResize) cursorID = Qt::SizeHorCursor; + if(mouseCursor.name() == MouseCursor::VerticalResize) cursorID = Qt::SizeVerCursor; + qtWidget->setCursor(cursorID); +} + auto pWidget::setToolTip(const string& toolTip) -> void { if(!qtWidget) return; qtWidget->setToolTip(QString::fromUtf8(toolTip)); diff --git a/hiro/qt/widget/widget.hpp b/hiro/qt/widget/widget.hpp index a55fb018..9c87ec85 100644 --- a/hiro/qt/widget/widget.hpp +++ b/hiro/qt/widget/widget.hpp @@ -6,10 +6,13 @@ struct pWidget : pSizable { Declare(Widget, Sizable) auto focused() const -> bool override; + virtual auto setDroppable(bool droppable) -> void; auto setEnabled(bool enabled) -> void override; + virtual auto setFocusable(bool focusable) -> void; auto setFocused() -> void override; auto setFont(const Font& font) -> void override; auto setGeometry(Geometry geometry) -> void override; + auto setMouseCursor(const MouseCursor& mouseCursor) -> void; auto setToolTip(const string& toolTip) -> void; auto setVisible(bool visible) -> void override; diff --git a/hiro/windows/widget/canvas.cpp b/hiro/windows/widget/canvas.cpp index c45af363..41585a6d 100644 --- a/hiro/windows/widget/canvas.cpp +++ b/hiro/windows/widget/canvas.cpp @@ -5,7 +5,6 @@ namespace hiro { auto pCanvas::construct() -> void { hwnd = CreateWindow(L"hiroWidget", L"", WS_CHILD, 0, 0, 0, 0, _parentHandle(), nullptr, GetModuleHandle(0), 0); pWidget::construct(); - setDroppable(state().droppable); update(); } @@ -30,6 +29,10 @@ auto pCanvas::setDroppable(bool droppable) -> void { DragAcceptFiles(hwnd, droppable); } +auto pCanvas::setFocusable(bool focusable) -> void { + //handled by windowProc() +} + auto pCanvas::setGeometry(Geometry geometry) -> void { pWidget::setGeometry(geometry); update(); @@ -64,6 +67,10 @@ auto pCanvas::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> m return false; } + if(msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN || msg == WM_KEYUP || msg == WM_SYSKEYUP) { + if(self().focusable()) return true; + } + if(msg == WM_GETDLGCODE) { return DLGC_STATIC | DLGC_WANTCHARS; } @@ -73,20 +80,8 @@ auto pCanvas::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> m return msg == WM_ERASEBKGND; } - if(msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN || msg == WM_RBUTTONDOWN) { - switch(msg) { - case WM_LBUTTONDOWN: self().doMousePress(Mouse::Button::Left); break; - case WM_MBUTTONDOWN: self().doMousePress(Mouse::Button::Middle); break; - case WM_RBUTTONDOWN: self().doMousePress(Mouse::Button::Right); break; - } - } - - if(msg == WM_LBUTTONUP || msg == WM_MBUTTONUP || msg == WM_RBUTTONUP) { - switch(msg) { - case WM_LBUTTONUP: self().doMouseRelease(Mouse::Button::Left); break; - case WM_MBUTTONUP: self().doMouseRelease(Mouse::Button::Middle); break; - case WM_RBUTTONUP: self().doMouseRelease(Mouse::Button::Right); break; - } + if(msg == WM_LBUTTONDOWN) { + if(self().focusable()) setFocused(); } return pWidget::windowProc(hwnd, msg, wparam, lparam); diff --git a/hiro/windows/widget/canvas.hpp b/hiro/windows/widget/canvas.hpp index 0535694a..76931bf8 100644 --- a/hiro/windows/widget/canvas.hpp +++ b/hiro/windows/widget/canvas.hpp @@ -8,7 +8,8 @@ struct pCanvas : pWidget { auto minimumSize() const -> Size override; auto setAlignment(Alignment) -> void; auto setColor(Color color) -> void; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; auto setGeometry(Geometry geometry) -> void override; auto setGradient(Gradient gradient) -> void; auto setIcon(const image& icon) -> void; diff --git a/hiro/windows/widget/text-edit.cpp b/hiro/windows/widget/text-edit.cpp index c2a3ce75..8b509345 100644 --- a/hiro/windows/widget/text-edit.cpp +++ b/hiro/windows/widget/text-edit.cpp @@ -12,7 +12,7 @@ auto pTextEdit::construct() -> void { setBackgroundColor(state().backgroundColor); setEditable(state().editable); setText(state().text); - setCursor(state().cursor); + setTextCursor(state().textCursor); } auto pTextEdit::destruct() -> void { @@ -27,14 +27,6 @@ auto pTextEdit::setBackgroundColor(Color color) -> void { InvalidateRect(hwnd, 0, true); } -auto pTextEdit::setCursor(Cursor cursor) -> void { - signed end = GetWindowTextLength(hwnd); - signed offset = max(0, min(end, cursor.offset())); - signed length = max(0, min(end, cursor.offset() + cursor.length())); - Edit_SetSel(hwnd, offset, length); - Edit_ScrollCaret(hwnd); -} - auto pTextEdit::setEditable(bool editable) -> void { SendMessage(hwnd, EM_SETREADONLY, editable == false, (LPARAM)0); } @@ -50,6 +42,14 @@ auto pTextEdit::setText(string text) -> void { SetWindowText(hwnd, utf16_t(text)); } +auto pTextEdit::setTextCursor(TextCursor cursor) -> void { + signed end = GetWindowTextLength(hwnd); + signed offset = max(0, min(end, cursor.offset())); + signed length = max(0, min(end, cursor.offset() + cursor.length())); + Edit_SetSel(hwnd, offset, length); + Edit_ScrollCaret(hwnd); +} + auto pTextEdit::setWordWrap(bool wordWrap) -> void { //ES_AUTOHSCROLL cannot be changed after widget creation. //As a result, we must destroy and re-create widget to change this setting. @@ -66,6 +66,10 @@ auto pTextEdit::text() const -> string { return text; } +auto pTextEdit::textCursor() const -> TextCursor { + return state().textCursor; +} + // auto pTextEdit::onChange() -> void { diff --git a/hiro/windows/widget/text-edit.hpp b/hiro/windows/widget/text-edit.hpp index 12a65f96..e674af0a 100644 --- a/hiro/windows/widget/text-edit.hpp +++ b/hiro/windows/widget/text-edit.hpp @@ -6,12 +6,13 @@ struct pTextEdit : pWidget { Declare(TextEdit, Widget) auto setBackgroundColor(Color color) -> void; - auto setCursor(Cursor cursor) -> void; auto setEditable(bool editable) -> void; auto setForegroundColor(Color color) -> void; auto setText(string text) -> void; + auto setTextCursor(TextCursor textCursor) -> void; auto setWordWrap(bool wordWrap) -> void; auto text() const -> string; + auto textCursor() const -> TextCursor; auto onChange() -> void; auto windowProc(HWND, UINT, WPARAM, LPARAM) -> maybe override; diff --git a/hiro/windows/widget/viewport.cpp b/hiro/windows/widget/viewport.cpp index 7b9cbad9..b6daef23 100644 --- a/hiro/windows/widget/viewport.cpp +++ b/hiro/windows/widget/viewport.cpp @@ -7,7 +7,6 @@ auto pViewport::construct() -> void { WS_CHILD | WS_DISABLED, 0, 0, 0, 0, _parentHandle(), nullptr, GetModuleHandle(0), 0); pWidget::construct(); - setDroppable(state().droppable); } auto pViewport::destruct() -> void { @@ -22,6 +21,10 @@ auto pViewport::setDroppable(bool droppable) -> void { DragAcceptFiles(hwnd, droppable); } +auto pViewport::setFocusable(bool focusable) -> void { + //handled by windowProc() +} + // auto pViewport::doMouseLeave() -> void { @@ -38,16 +41,23 @@ auto pViewport::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> return false; } + if(msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN || msg == WM_KEYUP || msg == WM_SYSKEYUP) { + if(self().focusable()) return true; + } + if(msg == WM_ERASEBKGND) { - //this will cause flickering during window resize - /*PAINTSTRUCT ps; + return false; + } + + if(msg == WM_PAINT) { + PAINTSTRUCT ps; BeginPaint(hwnd, &ps); auto brush = CreateSolidBrush(RGB(0, 0, 0)); RECT rc{}; GetClientRect(hwnd, &rc); FillRect(ps.hdc, &rc, brush); DeleteObject(brush); - EndPaint(hwnd, &ps);*/ + EndPaint(hwnd, &ps); return true; } @@ -55,20 +65,8 @@ auto pViewport::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> return DLGC_STATIC | DLGC_WANTCHARS; } - if(msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN || msg == WM_RBUTTONDOWN) { - switch(msg) { - case WM_LBUTTONDOWN: self().doMousePress(Mouse::Button::Left); break; - case WM_MBUTTONDOWN: self().doMousePress(Mouse::Button::Middle); break; - case WM_RBUTTONDOWN: self().doMousePress(Mouse::Button::Right); break; - } - } - - if(msg == WM_LBUTTONUP || msg == WM_MBUTTONUP || msg == WM_RBUTTONUP) { - switch(msg) { - case WM_LBUTTONUP: self().doMouseRelease(Mouse::Button::Left); break; - case WM_MBUTTONUP: self().doMouseRelease(Mouse::Button::Middle); break; - case WM_RBUTTONUP: self().doMouseRelease(Mouse::Button::Right); break; - } + if(msg == WM_LBUTTONDOWN) { + if(self().focusable()) setFocused(); } return pWidget::windowProc(hwnd, msg, wparam, lparam); diff --git a/hiro/windows/widget/viewport.hpp b/hiro/windows/widget/viewport.hpp index ae917280..40baf41b 100644 --- a/hiro/windows/widget/viewport.hpp +++ b/hiro/windows/widget/viewport.hpp @@ -6,7 +6,8 @@ struct pViewport : pWidget { Declare(Viewport, Widget) auto handle() const -> uintptr_t; - auto setDroppable(bool droppable) -> void; + auto setDroppable(bool droppable) -> void override; + auto setFocusable(bool focusable) -> void override; auto doMouseLeave() -> void override; auto doMouseMove(int x, int y) -> void override; diff --git a/hiro/windows/widget/widget.cpp b/hiro/windows/widget/widget.cpp index 7c61a304..c83ce185 100644 --- a/hiro/windows/widget/widget.cpp +++ b/hiro/windows/widget/widget.cpp @@ -42,6 +42,10 @@ auto pWidget::minimumSize() -> Size { return {0, 0}; } +auto pWidget::setDroppable(bool droppable) -> void { + //TODO +} + auto pWidget::setEnabled(bool enabled) -> void { if(!self().parentWindow(true)) enabled = false; if(!self().enabled(true)) enabled = false; @@ -49,6 +53,10 @@ auto pWidget::setEnabled(bool enabled) -> void { EnableWindow(hwnd, enabled); } +auto pWidget::setFocusable(bool focusable) -> void { + //TODO +} + auto pWidget::setFocused() -> void { SetFocus(hwnd); } @@ -69,6 +77,10 @@ auto pWidget::setGeometry(Geometry geometry) -> void { pSizable::setGeometry(geometry); } +auto pWidget::setMouseCursor(const MouseCursor& mouseCursor) -> void { + //TODO +} + auto pWidget::setToolTip(const string& toolTipText) -> void { if(toolTipText) { toolTip = new pToolTip{toolTipText}; @@ -97,6 +109,39 @@ auto pWidget::doMouseMove(int x, int y) -> void { } auto pWidget::windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> maybe { + if(msg == WM_SETCURSOR) { + if(auto cursor = self().mouseCursor()) { + maybe cursorID; + if(cursor.name() == MouseCursor::Hand) cursorID = IDC_HAND; + if(cursor.name() == MouseCursor::HorizontalResize) cursorID = IDC_SIZEWE; + if(cursor.name() == MouseCursor::VerticalResize) cursorID = IDC_SIZENS; + if(cursorID) return SetCursor(LoadCursor(0, cursorID())), true; + } + } + + if(msg == WM_LBUTTONDOWN || msg == WM_MBUTTONDOWN || msg == WM_RBUTTONDOWN) { + //if using a (Horizontal,Vertical)ResizeGrip, it's possible to move the cursor off the widget momentarily. + //ordinarily, this will cause the cursor to revert to the newly hovered Widget. + //by capturing the mouse until the mouse button is released, this prevents said cursor flickering. + //if(msg == WM_LBUTTONDOWN && self().mouseCursor()) SetCapture(hwnd); + + switch(msg) { + case WM_LBUTTONDOWN: self().doMousePress(Mouse::Button::Left); break; + case WM_MBUTTONDOWN: self().doMousePress(Mouse::Button::Middle); break; + case WM_RBUTTONDOWN: self().doMousePress(Mouse::Button::Right); break; + } + } + + if(msg == WM_LBUTTONUP || msg == WM_MBUTTONUP || msg == WM_RBUTTONUP) { + //if(msg == WM_LBUTTONUP && self().mouseCursor() && GetCapture() == hwnd) ReleaseCapture(); + + switch(msg) { + case WM_LBUTTONUP: self().doMouseRelease(Mouse::Button::Left); break; + case WM_MBUTTONUP: self().doMouseRelease(Mouse::Button::Middle); break; + case WM_RBUTTONUP: self().doMouseRelease(Mouse::Button::Right); break; + } + } + if(msg == WM_MOUSEMOVE) { TRACKMOUSEEVENT event{sizeof(TRACKMOUSEEVENT)}; event.hwndTrack = hwnd; @@ -147,8 +192,11 @@ auto pWidget::_parentWindow() -> maybe { } auto pWidget::_setState() -> void { + setDroppable(self().droppable()); setEnabled(self().enabled()); + setFocusable(self().focusable()); setFont(self().font()); + setMouseCursor(self().mouseCursor()); setToolTip(self().toolTip()); setVisible(self().visible()); } diff --git a/hiro/windows/widget/widget.hpp b/hiro/windows/widget/widget.hpp index a00f9640..d85ca901 100644 --- a/hiro/windows/widget/widget.hpp +++ b/hiro/windows/widget/widget.hpp @@ -7,10 +7,13 @@ struct pWidget : pSizable { auto focused() const -> bool override; virtual auto minimumSize() -> Size; + virtual auto setDroppable(bool droppable) -> void; auto setEnabled(bool enabled) -> void override; + virtual auto setFocusable(bool focusable) -> void; auto setFocused() -> void; auto setFont(const Font& font) -> void override; virtual auto setGeometry(Geometry geometry) -> void; + auto setMouseCursor(const MouseCursor& mouseCursor) -> void; auto setToolTip(const string& toolTip) -> void; auto setVisible(bool visible) -> void override; diff --git a/icarus/icarus.cpp b/icarus/icarus.cpp index ec28937d..fe059834 100644 --- a/icarus/icarus.cpp +++ b/icarus/icarus.cpp @@ -8,8 +8,8 @@ auto locate(string name) -> string { string location = {Path::program(), name}; if(inode::exists(location)) return location; - directory::create({Path::userData(), "icarus/"}); - return {Path::userData(), "icarus/", name}; + directory::create({Path::userData(), "bsnes/"}); + return {Path::userData(), "bsnes/", name}; } #include "settings.cpp" diff --git a/libco/aarch64.c b/libco/aarch64.c new file mode 100644 index 00000000..3b00c526 --- /dev/null +++ b/libco/aarch64.c @@ -0,0 +1,116 @@ +#define LIBCO_C +#include "libco.h" +#include "settings.h" + +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +static thread_local unsigned long co_active_buffer[64]; +static thread_local cothread_t co_active_handle = 0; +static void (*co_swap)(cothread_t, cothread_t) = 0; + +#ifdef LIBCO_MPROTECT + alignas(4096) +#else + section(text) +#endif +static const uint32_t co_swap_functin[1024] = { + 0xa9002428, /* stp x8,x9,[x1] */ + 0xa9012c2a, /* stp x10,x11,[x1,#16] */ + 0xa902342c, /* stp x12,x13,[x1,#32] */ + 0xa9033c2e, /* stp x14,x15,[x1,#48] */ + 0xf9002433, /* str x19,[x1,#72] */ + 0xa9055434, /* stp x20,x21,[x1,#80] */ + 0xa9065c36, /* stp x22,x23,[x1,#96] */ + 0xa9076438, /* stp x24,x25,[x1,#112] */ + 0xa9086c3a, /* stp x26,x27,[x1,#128] */ + 0xa909743c, /* stp x28,x29,[x1,#144] */ + 0x910003f0, /* mov x16,sp */ + 0xa90a7830, /* stp x16,x30,[x1,#160] */ + + 0xa9402408, /* ldp x8,x9,[x0] */ + 0xa9412c0a, /* ldp x10,x11,[x0,#16] */ + 0xa942340c, /* ldp x12,x13,[x0,#32] */ + 0xa9433c0e, /* ldp x14,x15,[x0,#48] */ + 0xf9402413, /* ldr x19,[x0,#72] */ + 0xa9455414, /* ldp x20,x21,[x0,#80] */ + 0xa9465c16, /* ldp x22,x23,[x0,#96] */ + 0xa9476418, /* ldp x24,x25,[x0,#112] */ + 0xa9486c1a, /* ldp x26,x27,[x0,#128] */ + 0xa949741c, /* ldp x28,x29,[x0,#144] */ + 0xa94a4410, /* ldp x16,x17,[x0,#160] */ + 0x9100021f, /* mov sp,x16 */ + 0xd61f0220, /* br x17 */ +}; + +static void co_init() { + #ifdef LIBCO_MPROTECT + unsigned long addr = (unsigned long)co_swap_function; + unsigned long base = addr - (addr % sysconf(_SC_PAGESIZE)); + unsigned long size = (addr - base) + sizeof co_swap_function; + mprotect((void*)base, size, PROT_READ | PROT_EXEC); + #endif +} + +cothread_t co_active() { + if(!co_active_handle) co_active_handle = &co_active_buffer; + return co_active_handle; +} + +cothread_t co_derive(void* memory, unsigned int size, void (*entrypoint)(void)) { + unsigned long* handle; + if(!co_swap) { + co_init(); + co_swap = (void (*)(cothread_t, cothread_t))co_swap_function; + } + if(!co_active_handle) co_active_handle = &co_active_buffer; + + if(handle = (unsigned long*)memory) { + unsigned long* p = (unsigned long*)((unsigned char*)handle + size); + handle[19] = (unsigned long)p; /* x29 (frame pointer) */ + handle[20] = (unsigned long)p; /* x30 (stack pointer) */ + handle[21] = (unsigned long)entrypoint; /* x31 (link register) */ + } + + return handle; +} + +cothread_t co_create(unsigned int size, void (*entrypoint)(void)) { + unsigned long* handle; + if(!co_swap) { + co_init(); + co_swap = (void (*)(cothread_t, cothread_t))co_swap_function; + } + if(!co_active_handle) co_active_handle = &co_active_buffer; + size += 256; + size &= ~15; + + if(handle = (unsigned long*)malloc(size)) { + unsigned long* p = (unsigned long*)((unsigned char*)handle + size); + handle[19] = (unsigned long)p; /* x29 (frame pointer) */ + handle[20] = (unsigned long)p; /* x30 (stack pointer) */ + handle[21] = (unsigned long)entrypoint; /* x31 (link register) */ + } + + return handle; +} + +void co_delete(cothread_t handle) { + free(handle); +} + +void co_switch(cothread_t handle) { + cothread_t co_previous_handle = co_active_handle; + co_swap(co_active_handle = handle, co_previous_handle); +} + +#ifdef __cplusplus +} +#endif diff --git a/libco/amd64.c b/libco/amd64.c index 15468090..ab62bd92 100644 --- a/libco/amd64.c +++ b/libco/amd64.c @@ -120,6 +120,24 @@ cothread_t co_active() { return co_active_handle; } +cothread_t co_derive(void* memory, unsigned int size, void (*entrypoint)(void)) { + cothread_t handle; + if(!co_swap) { + co_init(); + co_swap = (void (*)(cothread_t, cothread_t))co_swap_function; + } + if(!co_active_handle) co_active_handle = &co_active_buffer; + + if(handle = (cothread_t)memory) { + long long *p = (long long*)((char*)handle + size); /* seek to top of stack */ + *--p = (long long)crash; /* crash if entrypoint returns */ + *--p = (long long)entrypoint; /* start of function */ + *(long long*)handle = (long long)p; /* stack pointer */ + } + + return handle; +} + cothread_t co_create(unsigned int size, void (*entrypoint)(void)) { cothread_t handle; if(!co_swap) { diff --git a/libco/arm.c b/libco/arm.c index 313f1134..20c95310 100644 --- a/libco/arm.c +++ b/libco/arm.c @@ -40,8 +40,25 @@ cothread_t co_active() { return co_active_handle; } +cothread_t co_derive(void* memory, unsigned int size, void (*entrypoint)(void)) { + unsigned long* handle; + if(!co_swap) { + co_init(); + co_swap = (void (*)(cothread_t, cothread_t))co_swap_function; + } + if(!co_active_handle) co_active_handle = &co_active_buffer; + + if(handle = (unsigned long*)memory) { + unsigned long* p = (unsigned long*)((unsigned char*)handle + size); + handle[8] = (unsigned long)p; + handle[9] = (unsigned long)entrypoint; + } + + return handle; +} + cothread_t co_create(unsigned int size, void (*entrypoint)(void)) { - unsigned long* handle = 0; + unsigned long* handle; if(!co_swap) { co_init(); co_swap = (void (*)(cothread_t, cothread_t))co_swap_function; diff --git a/libco/doc/usage.html b/libco/doc/usage.html index 38576dc5..994072f9 100644 --- a/libco/doc/usage.html +++ b/libco/doc/usage.html @@ -62,6 +62,14 @@ Return handle to current cothread. Always returns a valid handle, even when called from the main program thread.
+cothread_t co_derive(void* memory, unsigned int heapsize, void (*coentry)(void));

+Initializes new cothread.
+This function is identical to co_create, only it attempts to use the provided +memory instead of allocating new memory on the heap. Please note that certain +implementations (currently only Windows Fibers) cannot be created using existing +memory, and as such, this function will fail. +
+ cothread_t co_create(unsigned int heapsize, void (*coentry)(void));

Create new cothread.
Heapsize is the amount of memory allocated for the cothread stack, specified diff --git a/libco/fiber.c b/libco/fiber.c index 50af4a72..bdf4dd4e 100644 --- a/libco/fiber.c +++ b/libco/fiber.c @@ -24,6 +24,11 @@ cothread_t co_active() { return co_active_; } +cothread_t co_derive(void* memory, unsigned int heapsize, void (*coentry)(void)) { + //Windows fibers do not allow users to supply their own memory + return (cothread_t)0; +} + cothread_t co_create(unsigned int heapsize, void (*coentry)(void)) { if(!co_active_) { ConvertThreadToFiber(0); diff --git a/libco/libco.c b/libco/libco.c index 77873fa3..6f446971 100644 --- a/libco/libco.c +++ b/libco/libco.c @@ -9,6 +9,8 @@ #include "amd64.c" #elif defined(__arm__) #include "arm.c" + #elif defined(__aarch64__) + #include "aarch64.c" #elif defined(_ARCH_PPC) #include "ppc.c" #elif defined(_WIN32) diff --git a/libco/libco.h b/libco/libco.h index c8452154..b7f60852 100644 --- a/libco/libco.h +++ b/libco/libco.h @@ -1,5 +1,5 @@ /* - libco v18.02 (2017-11-06) + libco v19 (2019-02-18) author: byuu license: ISC */ @@ -14,6 +14,7 @@ extern "C" { typedef void* cothread_t; cothread_t co_active(); +cothread_t co_derive(void*, unsigned int, void (*)(void)); cothread_t co_create(unsigned int, void (*)(void)); void co_delete(cothread_t); void co_switch(cothread_t); diff --git a/libco/ppc.c b/libco/ppc.c index 6d79b44f..f071fab2 100644 --- a/libco/ppc.c +++ b/libco/ppc.c @@ -258,6 +258,70 @@ static const uint32_t libco_ppc_code[1024] = { #define CO_SWAP_ASM(x, y) ((void (*)(cothread_t, cothread_t))(uintptr_t)libco_ppc_code)(x, y) #endif +static uint32_t* co_derive_(void* memory, unsigned size, uintptr_t entry) { + (void)entry; + + uint32_t* t = (uint32_t*)memory; + + #if LIBCO_PPCDESC + if(t) { + memcpy(t, (void*)entry, sizeof(void*) * 3); /* copy entry's descriptor */ + *(const void**)t = libco_ppc_code; /* set function pointer to swap routine */ + } + #endif + + return t; +} + +cothread_t co_derive(void* memory, unsigned int size, void (*entry_)(void)) { + uintptr_t entry = (uintptr_t)entry_; + uint32_t* t = 0; + + /* be sure main thread was successfully allocated */ + if(co_active()) { + t = co_derive_(memory, size, entry); + } + + if(t) { + uintptr_t sp; + int shift; + + /* save current registers into new thread, so that any special ones will have proper values when thread is begun */ + CO_SWAP_ASM(t, t); + + #if LIBCO_PPCDESC + entry = (uintptr_t)*(void**)entry; /* get real address */ + #endif + + /* put stack near end of block, and align */ + sp = (uintptr_t)t + size - above_stack; + sp -= sp % stack_align; + + /* on PPC32, we save and restore GPRs as 32 bits. for PPC64, we + save and restore them as 64 bits, regardless of the size the ABI + uses. so, we manually write pointers at the proper size. we always + save and restore at the same address, and since PPC is big-endian, + we must put the low byte first on PPC32. */ + + /* if uintptr_t is 32 bits, >>32 is undefined behavior, + so we do two shifts and don't have to care how many bits uintptr_t is. */ + #if LIBCO_PPC64 + shift = 16; + #else + shift = 0; + #endif + + /* set up so entry will be called on next swap */ + t[ 8] = (uint32_t)(entry >> shift >> shift); + t[ 9] = (uint32_t)entry; + + t[10] = (uint32_t)(sp >> shift >> shift); + t[11] = (uint32_t)sp; + } + + return t; +} + static uint32_t* co_create_(unsigned size, uintptr_t entry) { (void)entry; diff --git a/libco/sjlj.c b/libco/sjlj.c index 1d0cb59a..d99572a3 100644 --- a/libco/sjlj.c +++ b/libco/sjlj.c @@ -38,10 +38,52 @@ cothread_t co_active() { return (cothread_t)co_running; } +cothread_t co_derive(void* memory, unsigned int size, void (*coentry)(void)) { + if(!co_running) co_running = &co_primary; + + cothread_struct* thread = (cothread_struct*)memory; + memory = (unsigned char*)memory + sizeof(cothread_struct); + size -= sizeof(cothread_struct); + if(thread) { + struct sigaction handler; + struct sigaction old_handler; + + stack_t stack; + stack_t old_stack; + + thread->coentry = thread->stack = 0; + + stack.ss_flags = 0; + stack.ss_size = size; + thread->stack = stack.ss_sp = memory; + if(stack.ss_sp && !sigaltstack(&stack, &old_stack)) { + handler.sa_handler = springboard; + handler.sa_flags = SA_ONSTACK; + sigemptyset(&handler.sa_mask); + creating = thread; + + if(!sigaction(SIGUSR1, &handler, &old_handler)) { + if(!raise(SIGUSR1)) { + thread->coentry = coentry; + } + sigaltstack(&old_stack, 0); + sigaction(SIGUSR1, &old_handler, 0); + } + } + + if(thread->coentry != coentry) { + co_delete(thread); + thread = 0; + } + } + + return (cothread_t)thread; +} + cothread_t co_create(unsigned int size, void (*coentry)(void)) { if(!co_running) co_running = &co_primary; - cothread_struct *thread = (cothread_struct*)malloc(sizeof(cothread_struct)); + cothread_struct* thread = (cothread_struct*)malloc(sizeof(cothread_struct)); if(thread) { struct sigaction handler; struct sigaction old_handler; diff --git a/libco/ucontext.c b/libco/ucontext.c index 9ba47c88..edf513d4 100644 --- a/libco/ucontext.c +++ b/libco/ucontext.c @@ -31,6 +31,23 @@ cothread_t co_active() { return (cothread_t)co_running; } +cothread_t co_derive(void* memory, unsigned int heapsize, void (*coentry)(void)) { + if(!co_running) co_running = &co_primary; + ucontext_t* thread = (ucontext_t*)memory; + memory = (unsigned char*)memory + sizeof(ucontext_t); + heapsize -= sizeof(ucontext_t); + if(thread) { + if((!getcontext(thread) && !(thread->uc_stack.ss_sp = 0)) && (thread->uc_stack.ss_sp = memory)) { + thread->uc_link = co_running; + thread->uc_stack.ss_size = heapsize; + makecontext(thread, coentry, 0); + } else { + thread = 0; + } + } + return (cothread_t)thread; +} + cothread_t co_create(unsigned int heapsize, void (*coentry)(void)) { if(!co_running) co_running = &co_primary; ucontext_t* thread = (ucontext_t*)malloc(sizeof(ucontext_t)); diff --git a/libco/x86.c b/libco/x86.c index b5c38216..d79306c6 100644 --- a/libco/x86.c +++ b/libco/x86.c @@ -74,6 +74,24 @@ cothread_t co_active() { return co_active_handle; } +cothread_t co_derive(void* memory, unsigned int size, void (*entrypoint)(void)) { + cothread_t handle; + if(!co_swap) { + co_init(); + co_swap = (void (fastcall*)(cothread_t, cothread_t))co_swap_function; + } + if(!co_active_handle) co_active_handle = &co_active_buffer; + + if(handle = (cothread_t)memory) { + long *p = (long*)((char*)handle + size); /* seek to top of stack */ + *--p = (long)crash; /* crash if entrypoint returns */ + *--p = (long)entrypoint; /* start of function */ + *(long*)handle = (long)p; /* stack pointer */ + } + + return handle; +} + cothread_t co_create(unsigned int size, void (*entrypoint)(void)) { cothread_t handle; if(!co_swap) { diff --git a/nall/GNUmakefile b/nall/GNUmakefile index 2707a959..3a4c683e 100644 --- a/nall/GNUmakefile +++ b/nall/GNUmakefile @@ -69,7 +69,7 @@ endif # build optimization levels ifeq ($(build),debug) - flags += -Og -DBUILD_DEBUG + flags += -Og -g -DBUILD_DEBUG else ifeq ($(build),stable) flags += -O1 -DBUILD_STABLE else ifeq ($(build),size) diff --git a/nall/array.hpp b/nall/array.hpp index c3bd3ea5..2d705337 100644 --- a/nall/array.hpp +++ b/nall/array.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -19,6 +20,10 @@ template struct array { } } + operator array_span() { + return {data(), size()}; + } + operator array_view() const { return {data(), size()}; } diff --git a/nall/bit.hpp b/nall/bit.hpp index f48f0886..c56ea4a9 100644 --- a/nall/bit.hpp +++ b/nall/bit.hpp @@ -59,7 +59,7 @@ namespace bit { } //count number of bits set in a byte - inline auto count(uintmax x) -> uint { + constexpr inline auto count(uintmax x) -> uint { uint count = 0; while(x) x &= x - 1, count++; //clear the least significant bit return count; @@ -67,7 +67,7 @@ namespace bit { //return index of the first bit set (or zero of no bits are set) //first(0b1000) == 3 - inline auto first(uintmax x) -> uint { + constexpr inline auto first(uintmax x) -> uint { uint first = 0; while(x) { if(x & 1) break; x >>= 1; first++; } return first; @@ -75,7 +75,7 @@ namespace bit { //round up to next highest single bit: //round(15) == 16, round(16) == 16, round(17) == 32 - inline auto round(uintmax x) -> uintmax { + constexpr inline auto round(uintmax x) -> uintmax { if((x & (x - 1)) == 0) return x; while(x & (x - 1)) x &= x - 1; return x << 1; diff --git a/nall/cd.hpp b/nall/cd.hpp new file mode 100644 index 00000000..9fca9aba --- /dev/null +++ b/nall/cd.hpp @@ -0,0 +1,31 @@ +#pragma once + +/* CD-ROM sector functions. + * + * Implemented: + * eight-to-fourteen modulation (encoding and decoding) + * sync header creation and verification + * error detection code creation and verification + * reed-solomon product-code creation and verification + * sector scrambling and descrambling (currently unverified) + * + * Unimplemented: + * reed-solomon product-code correction + * cross-interleave reed-solomon creation, verification, and correction + * CD-ROM XA mode 2 forms 1 & 2 support + * subcode insertion and removal + * subcode decoding from CUE files + * channel frame expansion and reduction + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include diff --git a/nall/cd/crc16.hpp b/nall/cd/crc16.hpp new file mode 100644 index 00000000..d0b34b1c --- /dev/null +++ b/nall/cd/crc16.hpp @@ -0,0 +1,18 @@ +#pragma once + +//CRC-16/KERMIT + +namespace nall::CD { + +inline auto CRC16(array_view data) -> uint16_t { + uint16_t crc = 0; + while(data) { + crc ^= *data++ << 8; + for(uint bit : range(8)) { + crc = crc << 1 ^ (crc & 0x8000 ? 0x1021 : 0); + } + } + return ~crc; +} + +} diff --git a/nall/cd/edc.hpp b/nall/cd/edc.hpp new file mode 100644 index 00000000..bcc645a5 --- /dev/null +++ b/nall/cd/edc.hpp @@ -0,0 +1,65 @@ +#pragma once + +//error detection code + +namespace nall::CD::EDC { + +//polynomial(x) = (x^16 + x^15 + x^2 + 1) * (x^16 + x^2 + x + 1) +inline auto polynomial(uint8_t x) -> uint32_t { + static uint32_t lookup[256]{}; + static bool once = false; + if(!once) { once = true; + for(uint n : range(256)) { + uint32_t edc = n; + for(uint b : range(8)) edc = edc >> 1 ^ (edc & 1 ? 0xd8018001 : 0); + lookup[n] = edc; + } + } + return lookup[x]; +} + +// + +inline auto create(array_view input) -> uint32_t { + uint32_t sum = 0; + for(auto& byte : input) sum = sum >> 8 ^ polynomial(sum ^ byte); + return sum; +} + +inline auto create(array_view input, array_span output) -> bool { + if(output.size() != 4) return false; + auto sum = create(input); + output[0] = sum >> 0; + output[1] = sum >> 8; + output[2] = sum >> 16; + output[3] = sum >> 24; + return true; +} + +inline auto createMode1(array_span sector) -> bool { + if(sector.size() != 2352) return false; + return create({sector, 2064}, {sector + 2064, 4}); +} + +// + +inline auto verify(array_view input, uint32_t edc) -> bool { + return edc == create(input); +} + +inline auto verify(array_view input, array_view compare) -> bool { + if(compare.size() != 4) return false; + auto sum = create(input); + if(compare[0] != uint8_t(sum >> 0)) return false; + if(compare[1] != uint8_t(sum >> 8)) return false; + if(compare[2] != uint8_t(sum >> 16)) return false; + if(compare[3] != uint8_t(sum >> 24)) return false; + return true; +} + +inline auto verifyMode1(array_view sector) -> bool { + if(sector.size() != 2352) return false; + return verify({sector, 2064}, {sector + 2064, 4}); +} + +} diff --git a/nall/cd/efm.hpp b/nall/cd/efm.hpp new file mode 100644 index 00000000..ea4896a8 --- /dev/null +++ b/nall/cd/efm.hpp @@ -0,0 +1,68 @@ +#pragma once + +//eight-to-fourteen modulation: +//separates each 1-bit by at least two 0-bits and at most ten 0-bits + +namespace nall::CD::EFM { + +//the algorithm to generate this table is unknown +inline auto lookup(uint8_t index) -> uint16_t { + static const uint16_t lookup[256] = { + 0x1220, 0x2100, 0x2420, 0x2220, 0x1100, 0x0110, 0x0420, 0x0900, + 0x1240, 0x2040, 0x2440, 0x2240, 0x1040, 0x0040, 0x0440, 0x0840, + 0x2020, 0x2080, 0x2480, 0x0820, 0x1080, 0x0080, 0x0480, 0x0880, + 0x1210, 0x2010, 0x2410, 0x2210, 0x1010, 0x0210, 0x0410, 0x0810, + 0x0020, 0x2108, 0x0220, 0x0920, 0x1108, 0x0108, 0x1020, 0x0908, + 0x1248, 0x2048, 0x2448, 0x2248, 0x1048, 0x0048, 0x0448, 0x0848, + 0x0100, 0x2088, 0x2488, 0x2110, 0x1088, 0x0088, 0x0488, 0x0888, + 0x1208, 0x2008, 0x2408, 0x2208, 0x1008, 0x0208, 0x0408, 0x0808, + 0x1224, 0x2124, 0x2424, 0x2224, 0x1124, 0x0024, 0x0424, 0x0924, + 0x1244, 0x2044, 0x2444, 0x2244, 0x1044, 0x0044, 0x0444, 0x0844, + 0x2024, 0x2084, 0x2484, 0x0824, 0x1084, 0x0084, 0x0484, 0x0884, + 0x1204, 0x2004, 0x2404, 0x2204, 0x1004, 0x0204, 0x0404, 0x0804, + 0x1222, 0x2122, 0x2422, 0x2222, 0x1122, 0x0022, 0x1024, 0x0922, + 0x1242, 0x2042, 0x2442, 0x2242, 0x1042, 0x0042, 0x0442, 0x0842, + 0x2022, 0x2082, 0x2482, 0x0822, 0x1082, 0x0082, 0x0482, 0x0882, + 0x1202, 0x0248, 0x2402, 0x2202, 0x1002, 0x0202, 0x0402, 0x0802, + 0x1221, 0x2121, 0x2421, 0x2221, 0x1121, 0x0021, 0x0421, 0x0921, + 0x1241, 0x2041, 0x2441, 0x2241, 0x1041, 0x0041, 0x0441, 0x0841, + 0x2021, 0x2081, 0x2481, 0x0821, 0x1081, 0x0081, 0x0481, 0x0881, + 0x1201, 0x2090, 0x2401, 0x2201, 0x1090, 0x0201, 0x0401, 0x0890, + 0x0221, 0x2109, 0x1110, 0x0121, 0x1109, 0x0109, 0x1021, 0x0909, + 0x1249, 0x2049, 0x2449, 0x2249, 0x1049, 0x0049, 0x0449, 0x0849, + 0x0120, 0x2089, 0x2489, 0x0910, 0x1089, 0x0089, 0x0489, 0x0889, + 0x1209, 0x2009, 0x2409, 0x2209, 0x1009, 0x0209, 0x0409, 0x0809, + 0x1120, 0x2111, 0x2490, 0x0224, 0x1111, 0x0111, 0x0490, 0x0911, + 0x0241, 0x2101, 0x0244, 0x0240, 0x1101, 0x0101, 0x0090, 0x0901, + 0x0124, 0x2091, 0x2491, 0x2120, 0x1091, 0x0091, 0x0491, 0x0891, + 0x1211, 0x2011, 0x2411, 0x2211, 0x1011, 0x0211, 0x0411, 0x0811, + 0x1102, 0x0102, 0x2112, 0x0902, 0x1112, 0x0112, 0x1022, 0x0912, + 0x2102, 0x2104, 0x0249, 0x0242, 0x1104, 0x0104, 0x0422, 0x0904, + 0x0122, 0x2092, 0x2492, 0x0222, 0x1092, 0x0092, 0x0492, 0x0892, + 0x1212, 0x2012, 0x2412, 0x2212, 0x1012, 0x0212, 0x0412, 0x0812, + }; + return lookup[index]; +} + +// + +inline auto encode(uint8_t data) -> uint16_t { + return lookup(data); +} + +// + +inline auto decode(uint16_t data) -> maybe { + static uint16_t table[1 << 14]; + static bool once = true; + if(once) { + once = false; + for(uint n : range(1 << 14)) table[n] = 0xffff; + for(uint n : range(1 << 8)) table[lookup(n)] = n; + } + uint16_t result = table[data & 0x3fff]; + if(result == 0xffff) return {}; + return (uint8_t)result; +} + +} diff --git a/nall/cd/rspc.hpp b/nall/cd/rspc.hpp new file mode 100644 index 00000000..4f776dd2 --- /dev/null +++ b/nall/cd/rspc.hpp @@ -0,0 +1,128 @@ +#pragma once + +//reed-solomon product code + +namespace nall::CD::RSPC { + +inline auto encodeP(array_view input, array_span parity) -> bool { + ReedSolomon<26,24> s; + uint lo = 0, hi = 43 * 2; + for(uint x : range(43)) { + for(uint w : range(2)) { //16-bit words + uint z = 0; + for(uint y : range(24)) { + s[z++] = input[(y * 43 + x) * 2 + w]; + } + s.generateParity(); + parity[lo++] = s[z++]; + parity[hi++] = s[z++]; + } + } + return true; +} + +inline auto encodeQ(array_view input, array_span parity) -> bool { + ReedSolomon<45,43> s; + uint lo = 0, hi = 26 * 2; + for(uint y : range(26)) { + for(uint w : range(2)) { + uint z = 0; + for(uint x : range(43)) { + s[z++] = input[((x * 44 + y * 43) * 2 + w) % (26 * 43 * 2)]; + } + s.generateParity(); + parity[lo++] = s[z++]; + parity[hi++] = s[z++]; + } + } + return true; +} + +inline auto encodeMode1(array_span sector) -> bool { + if(sector.size() != 2352) return false; + if(!encodeP({sector + 12, 2064}, {sector + 2076, 172})) return false; + if(!encodeQ({sector + 12, 2236}, {sector + 2248, 104})) return false; + return true; +} + +// + +inline auto decodeP(array_span input, array_span parity) -> int { + bool success = false; + bool failure = false; + ReedSolomon<26,24> s; + uint lo = 0, hi = 43 * 2; + for(uint x : range(43)) { + for(uint w : range(2)) { + uint z = 0; + for(uint y : range(24)) { + s[z++] = input[(y * 43 + x) * 2 + w]; + } + s[z++] = parity[lo++]; + s[z++] = parity[hi++]; + auto count = s.correctErrors(); + if(count < 0) { + failure = true; + } + if(count > 0) { + success = true; + z = 0; + for(uint y : range(24)) { + input[(y * 43 + x) * 2 + w] = s[z++]; + } + parity[lo - 1] = s[z++]; + parity[hi - 1] = s[z++]; + } + } + } + if(!success && !failure) return 0; //no errors remaining + return success ? 1 : -1; //return success even if there are some failures +} + +inline auto decodeQ(array_span input, array_span parity) -> int { + bool success = false; + bool failure = false; + ReedSolomon<45,43> s; + uint lo = 0, hi = 26 * 2; + for(uint y : range(26)) { + for(uint w : range(2)) { + uint z = 0; + for(uint x : range(43)) { + s[z++] = input[((x * 44 + y * 43) * 2 + w) % (26 * 43 * 2)]; + } + s[z++] = parity[lo++]; + s[z++] = parity[hi++]; + auto count = s.correctErrors(); + if(count < 0) { + failure = true; + } + if(count > 0) { + success = true; + z = 0; + for(uint x : range(43)) { + input[((x * 44 + y * 43) * 2 + w) % (26 * 43 * 2)] = s[z++]; + } + parity[lo - 1] = s[z++]; + parity[hi - 1] = s[z++]; + } + } + } + if(!success && !failure) return 0; + return success ? 1 : -1; +} + +inline auto decodeMode1(array_span sector) -> bool { + if(sector.size() != 2352) return false; + //P corrections can allow Q corrections that previously failed to succeed, and vice versa. + //the more iterations, the more chances to correct errors, but the more computationally expensive it is. + //there must be a limit on the amount of retries, or this function may get stuck in an infinite loop. + for(uint attempt : range(4)) { + auto p = decodeP({sector + 12, 2064}, {sector + 2076, 172}); + auto q = decodeQ({sector + 12, 2236}, {sector + 2248, 104}); + if(p == 0 && q == 0) return true; //no errors remaining + if(p < 0 && q < 0) return false; //no more errors correctable + } + return false; //exhausted all retries with errors remaining +} + +} diff --git a/nall/cd/scrambler.hpp b/nall/cd/scrambler.hpp new file mode 100644 index 00000000..cf7380e5 --- /dev/null +++ b/nall/cd/scrambler.hpp @@ -0,0 +1,35 @@ +#pragma once + +namespace nall::CD::Scrambler { + +//polynomial(x) = x^15 + x + 1 +inline auto polynomial(uint x) -> uint8_t { + static uint8_t lookup[2340]{}; + static bool once = false; + if(!once) { once = true; + uint16_t shift = 0x0001; + for(uint n : range(2340)) { + lookup[n] = shift; + for(uint b : range(8)) { + bool carry = shift & 1 ^ shift >> 1 & 1; + shift = (carry << 15 | shift) >> 1; + } + } + } + return lookup[x]; +} + +// + +inline auto transform(array_span sector) -> bool { + if(sector.size() == 2352) sector += 12; //header is not scrambled + if(sector.size() != 2340) return false; //F1 frames only + + for(uint index : range(2340)) { + sector[index] ^= polynomial(index); + } + + return true; +} + +} diff --git a/nall/cd/session.hpp b/nall/cd/session.hpp new file mode 100644 index 00000000..44759268 --- /dev/null +++ b/nall/cd/session.hpp @@ -0,0 +1,478 @@ +#pragma once + +//subchannel processor +//note: this code is not tolerant to subchannel data that violates the Redbook standard + +namespace nall::CD { + +enum : int { InvalidLBA = 100 * 60 * 75 }; + +struct BCD { + static auto encode(uint8_t value) -> uint8_t { return value / 10 << 4 | value % 10; } + static auto decode(uint8_t value) -> uint8_t { return (value >> 4) * 10 + (value & 15); } +}; + +struct MSF { + uint8_t minute; //00-99 + uint8_t second; //00-59 + uint8_t frame = -1; //00-74 + + MSF() = default; + MSF(uint8_t m, uint8_t s, uint8_t f) : minute(m), second(s), frame(f) {} + MSF(int lba) { *this = fromLBA(lba); } + + explicit operator bool() const { + return minute <= 99 && second <= 59 && frame <= 74; + } + + static auto fromBCD(uint8_t minute, uint8_t second, uint8_t frame) -> MSF { + return {BCD::decode(minute), BCD::decode(second), BCD::decode(frame)}; + } + + static auto fromLBA(int lba) -> MSF { + if(lba < 0) lba = 100 * 60 * 75 + lba; + if(lba >= 100 * 60 * 75) return {}; + uint8_t minute = lba / 75 / 60 % 100; + uint8_t second = lba / 75 % 60; + uint8_t frame = lba % 75; + return {minute, second, frame}; + } + + auto toLBA() const -> int { + int lba = minute * 60 * 75 + second * 75 + frame; + if(minute < 90) return lba; + return -(100 * 60 * 75 - lba); + } + + //for debugging purposes + auto toString() const -> string { + if(!operator bool()) return "??:??:??"; + return {pad(minute, 2, '0'), ":", pad(second, 2, '0'), ":", pad(frame, 2, '0')}; + } +}; + +struct Index { + int lba = InvalidLBA; + int end = InvalidLBA; //inclusive range + + explicit operator bool() const { + return lba != InvalidLBA; + } + + auto inRange(int sector) const -> bool { + if(lba == InvalidLBA || end == InvalidLBA) return false; + return sector >= lba && sector <= end; + } +}; + +struct Track { + uint8_t control = 0b1111; //4-bit + uint8_t address = 0b1111; //4-bit + Index indices[100]; + uint8_t firstIndex = -1; + uint8_t lastIndex = -1; + + explicit operator bool() const { + return (bool)indices[1]; + } + + auto emphasis() const -> bool { + return control & 1; + } + + auto copyable() const -> bool { + return control & 2; + } + + auto channels() const -> uint { + if((control & 0b1100) == 0b0000) return 2; + if((control & 0b1100) == 0b1000) return 4; + return 0; //data track or reserved + } + + auto pregap() const -> int { + if(!indices[0] || !indices[1]) return InvalidLBA; + return indices[1].lba - indices[0].lba; + } + + auto isAudio() const -> bool { + return channels() != 0; + } + + auto isData() const -> bool { + return (control & 0b1100) == 0b0100; + } + + auto inIndex(int lba) const -> maybe { + for(uint8_t index : range(100)) { + if(indices[index].inRange(lba)) return index; + } + return {}; + } + + auto inRange(int lba) const -> bool { + if(firstIndex > 99 || lastIndex > 99) return false; + return lba >= indices[firstIndex].lba && lba <= indices[lastIndex].end; + } +}; + +struct Session { + Index leadIn; //00 + Track tracks[100]; //01-99 + Index leadOut; //aa + uint8_t firstTrack = -1; + uint8_t lastTrack = -1; + + auto inLeadIn(int lba) const -> bool { + return lba < 0; + } + + auto inTrack(int lba) const -> maybe { + for(uint8_t trackID : range(100)) { + auto& track = tracks[trackID]; + if(track && track.inRange(lba)) return trackID; + } + return {}; + } + + auto inLeadOut(int lba) const -> bool { + return lba >= leadOut.lba; + } + + auto encode(uint sectors) const -> vector { + if(sectors < abs(leadIn.lba) + leadOut.lba) return {}; //not enough sectors + + vector data; + data.resize(sectors * 96 + 96); //add one sector for P shift + + auto toP = [&](int lba) -> array_span { + //P is encoded one sector later than Q + return {&data[(lba + abs(leadIn.lba) + 1) * 96], 12}; + }; + + auto toQ = [&](int lba) -> array_span { + return {&data[(lba + abs(leadIn.lba)) * 96 + 12], 12}; + }; + + //lead-in + int lba = leadIn.lba; + while(lba < 0) { + //tracks + for(uint trackID : range(100)) { + for(uint repeat : range(3)) { + auto& track = tracks[trackID]; + if(!track) continue; + auto q = toQ(lba); + q[0] = track.control << 4 | track.address << 0; + q[1] = 0x00; + q[2] = BCD::encode(trackID); + auto msf = MSF(lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + msf = MSF(track.indices[1].lba); + q[7] = BCD::encode(msf.minute); + q[8] = BCD::encode(msf.second); + q[9] = BCD::encode(msf.frame); + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + if(++lba >= 0) break; + }}if( lba >= 0) break; + + //first track + for(uint repeat : range(3)) { + auto q = toQ(lba); + q[0] = 0x01; //control value unverified; address = 1 + q[1] = 0x00; //track# = 00 (TOC) + q[2] = 0xa0; //first track + auto msf = MSF(lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + q[7] = BCD::encode(firstTrack); + q[8] = 0x00; + q[9] = 0x00; + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + if(++lba >= 0) break; + } if( lba >= 0) break; + + //last track + for(uint repeat : range(3)) { + auto q = toQ(lba); + q[0] = 0x01; + q[1] = 0x00; + q[2] = 0xa1; //last track + auto msf = MSF(lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + q[7] = BCD::encode(lastTrack); + q[8] = 0x00; + q[9] = 0x00; + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + if(++lba >= 0) break; + } if( lba >= 0) break; + + //lead-out point + for(uint repeat : range(3)) { + auto q = toQ(lba); + q[0] = 0x01; + q[1] = 0x00; + q[2] = 0xa2; //lead-out point + auto msf = MSF(lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + msf = MSF(leadOut.lba); + q[7] = BCD::encode(msf.minute); + q[8] = BCD::encode(msf.second); + q[9] = BCD::encode(msf.frame); + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + if(++lba >= 0) break; + } if( lba >= 0) break; + } + + //tracks + int end = leadOut.lba; + for(uint8_t trackID : reverse(range(100))) { + auto& track = tracks[trackID]; + if(!track) continue; + + //indices + for(uint8_t indexID : reverse(range(100))) { + auto& index = track.indices[indexID]; + if(!index) continue; + + for(int lba = index.lba; lba < end; lba++) { + auto p = toP(lba); + uint8_t byte = indexID == 0 ? 0xff : 0x00; + for(uint index : range(12)) p[index] = byte; + + auto q = toQ(lba); + q[0] = track.control << 4 | track.address << 0; + q[1] = BCD::encode(trackID); + q[2] = BCD::encode(indexID); + auto msf = MSF(lba - track.indices[1].lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + msf = MSF(lba); + q[7] = BCD::encode(msf.minute); + q[8] = BCD::encode(msf.second); + q[9] = BCD::encode(msf.frame); + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + } + + end = index.lba; + } + } + + //lead-out + for(int lba : range(sectors - abs(leadIn.lba) - leadOut.lba)) { + auto p = toP(leadOut.lba + lba); + uint8_t byte; + if(lba < 150) { + //2s start (standard specifies 2-3s start) + byte = 0x00; + } else { + //2hz duty cycle; rounded downward (standard specifies 2% tolerance) + byte = (lba - 150) / (75 >> 1) & 1 ? 0xff : 0x00; + } + for(uint index : range(12)) p[index] = byte; + + auto q = toQ(leadOut.lba + lba); + q[0] = 0x01; + q[1] = 0xaa; //lead-out track# + q[2] = 0x01; //lead-out index# + auto msf = MSF(lba); + q[3] = BCD::encode(msf.minute); + q[4] = BCD::encode(msf.second); + q[5] = BCD::encode(msf.frame); + q[6] = 0x00; + msf = MSF(leadOut.lba + lba); + q[7] = BCD::encode(msf.minute); + q[8] = BCD::encode(msf.second); + q[9] = BCD::encode(msf.frame); + auto crc16 = CRC16({q, 10}); + q[10] = crc16 >> 8; + q[11] = crc16 >> 0; + } + + data.resize(data.size() - 96); //remove padding for P shift + return data; + } + + auto decode(array_view data, uint size, uint leadOutSectors = 0) -> bool { + *this = {}; //reset session + //three data[] types supported: subcode Q only, subcode P-W only, data+subcode complete image + if(size != 12 && size != 96 && size != 2448) return false; + + //determine lead-in sector count + for(int lba : range(7500)) { //7500 max sectors scanned + uint offset = lba * size; + if(size == 96) offset += 12; + if(size == 2448) offset += 12 + 2352; + if(offset + 12 > data.size()) break; + auto q = array_view{&data[offset], 12}; + auto crc16 = CRC16({q, 10}); + if(q[10] != uint8_t(crc16 >> 8)) continue; + if(q[11] != uint8_t(crc16 >> 0)) continue; + + uint8_t control = q[0] >> 4; + uint8_t address = q[0] & 15; + uint8_t trackID = q[1]; + if(address != 1) continue; + if(trackID != 0) continue; + + auto msf = MSF::fromBCD(q[3], q[4], q[5]); + leadIn.lba = msf.toLBA() - lba; + break; + } + if(leadIn.lba == InvalidLBA || leadIn.lba >= 0) return false; + + auto toQ = [&](int lba) -> array_view { + uint offset = (lba + abs(leadIn.lba)) * size; + if(size == 96) offset += 12; + if(size == 2448) offset += 12 + 2352; + if(offset + 12 > data.size()) return {}; + return {&data[offset], 12}; + }; + + //lead-in + for(int lba = leadIn.lba; lba < 0; lba++) { + auto q = toQ(lba); + if(!q) break; + auto crc16 = CRC16({q, 10}); + if(q[10] != uint8_t(crc16 >> 8)) continue; + if(q[11] != uint8_t(crc16 >> 0)) continue; + + uint8_t control = q[0] >> 4; + uint8_t address = q[0] & 15; + uint8_t trackID = q[1]; + if(address != 1) continue; + if(trackID != 0) continue; + + trackID = BCD::decode(q[2]); + + if(trackID <= 99) { //00-99 + auto& track = tracks[trackID]; + track.control = control; + track.address = address; + track.indices[1].lba = MSF::fromBCD(q[7], q[8], q[9]).toLBA(); + } + + if(trackID == 100) { //a0 + firstTrack = BCD::decode(q[7]); + } + + if(trackID == 101) { //a1 + lastTrack = BCD::decode(q[7]); + } + + if(trackID == 102) { //a2 + leadOut.lba = MSF::fromBCD(q[7], q[8], q[9]).toLBA(); + } + } + if(leadOut.lba == InvalidLBA) return false; + + //tracks + for(int lba = 0; lba < leadOut.lba; lba++) { + auto q = toQ(lba); + if(!q) break; + auto crc16 = CRC16({q, 10}); + if(q[10] != uint8_t(crc16 >> 8)) continue; + if(q[11] != uint8_t(crc16 >> 0)) continue; + + uint8_t control = q[0] >> 4; + uint8_t address = q[0] & 15; + uint8_t trackID = BCD::decode(q[1]); + uint8_t indexID = BCD::decode(q[2]); + if(address != 1) continue; + if(trackID > 99) continue; + if(indexID > 99) continue; + + auto& track = tracks[trackID]; + if(!track) continue; //track not found? + auto& index = track.indices[indexID]; + if(index) continue; //index already decoded? + + index.lba = MSF::fromBCD(q[7], q[8], q[9]).toLBA(); + } + + synchronize(leadOutSectors); + return true; + } + + //calculates Index::end variables: + //needed for Session::isTrack() and Track::isIndex() to function. + auto synchronize(uint leadOutSectors = 0) -> void { + leadIn.end = -1; + int end = leadOut.lba - 1; + for(uint trackID : reverse(range(100))) { + auto& track = tracks[trackID]; + if(!track) continue; + + for(uint indexID : reverse(range(100))) { + auto& index = track.indices[indexID]; + if(!index) continue; + + index.end = end; + end = index.lba - 1; + } + + for(uint indexID : range(100)) { + auto& index = track.indices[indexID]; + if(index) { track.firstIndex = indexID; break; } + } + + for(uint indexID : reverse(range(100))) { + auto& index = track.indices[indexID]; + if(index) { track.lastIndex = indexID; break; } + } + } + leadOut.end = leadOut.lba + leadOutSectors - 1; + } + + //for diagnostic use only + auto serialize() const -> string { + string s; + s.append("session\n"); + s.append(" leadIn: "); + s.append(MSF(leadIn.lba).toString(), " - ", MSF(leadIn.end).toString(), "\n"); + for(uint trackID : range(100)) { + auto& track = tracks[trackID]; + if(!track) continue; + s.append(" track", pad(trackID, 2, '0')); + if(trackID == firstTrack) s.append(" first"); + if(trackID == lastTrack) s.append( " last"); + s.append("\n"); + s.append(" control: ", binary(track.control, 4, '0'), "\n"); + s.append(" address: ", binary(track.address, 4, '0'), "\n"); + for(uint indexID : range(100)) { + auto& index = track.indices[indexID]; + if(!index) continue; + s.append(" index", pad(indexID, 2, '0'), ": "); + s.append(MSF(index.lba).toString(), " - ", MSF(index.end).toString(), "\n"); + } + } + s.append(" leadout: "); + s.append(MSF(leadOut.lba).toString(), " - ", MSF(leadOut.end).toString(), "\n"); + return s; + } +}; + +} diff --git a/nall/cd/sync.hpp b/nall/cd/sync.hpp new file mode 100644 index 00000000..513db355 --- /dev/null +++ b/nall/cd/sync.hpp @@ -0,0 +1,27 @@ +#pragma once + +namespace nall::CD::Sync { + +inline auto create(array_span sector) -> bool { + if(sector.size() != 12 && sector.size() != 2352) return false; + + for(uint n : range(12)) { + sector[n] = (n == 0 || n == 11) ? 0x00 : 0xff; + } + + return true; +} + +// + +inline auto verify(array_view sector) -> bool { + if(sector.size() != 12 && sector.size() != 2352) return false; + + for(uint n : range(12)) { + if(sector[n] != (n == 0 || n == 11) ? 0x00 : 0xff) return false; + } + + return true; +} + +} diff --git a/nall/dsp/iir/biquad.hpp b/nall/dsp/iir/biquad.hpp index 16dfd046..becd2c6e 100644 --- a/nall/dsp/iir/biquad.hpp +++ b/nall/dsp/iir/biquad.hpp @@ -20,6 +20,7 @@ struct Biquad { inline auto reset(Type type, double cutoffFrequency, double samplingFrequency, double quality, double gain = 0.0) -> void; inline auto process(double in) -> double; //normalized sample (-1.0 to +1.0) + inline static auto shelf(double gain, double slope) -> double; inline static auto butterworth(uint order, uint phase) -> double; private: @@ -105,37 +106,37 @@ auto Biquad::reset(Type type, double cutoffFrequency, double samplingFrequency, case Type::LowShelf: if(gain >= 0) { - n = 1 / (1 + sqrt(2) * k + k * k); - a0 = (1 + sqrt(2 * v) * k + v * k * k) * n; + n = 1 / (1 + k / q + k * k); + a0 = (1 + sqrt(v) / q * k + v * k * k) * n; a1 = 2 * (v * k * k - 1) * n; - a2 = (1 - sqrt(2 * v) * k + v * k * k) * n; + a2 = (1 - sqrt(v) / q * k + v * k * k) * n; b1 = 2 * (k * k - 1) * n; - b2 = (1 - sqrt(2) * k + k * k) * n; + b2 = (1 - k / q + k * k) * n; } else { - n = 1 / (1 + sqrt(2 * v) * k + v * k * k); - a0 = (1 + sqrt(2) * k + k * k) * n; + n = 1 / (1 + sqrt(v) / q * k + v * k * k); + a0 = (1 + k / q + k * k) * n; a1 = 2 * (k * k - 1) * n; - a2 = (1 - sqrt(2) * k + k * k) * n; + a2 = (1 - k / q + k * k) * n; b1 = 2 * (v * k * k - 1) * n; - b2 = (1 - sqrt(2 * v) * k + v * k * k) * n; + b2 = (1 - sqrt(v) / q * k + v * k * k) * n; } break; case Type::HighShelf: if(gain >= 0) { - n = 1 / (1 + sqrt(2) * k + k * k); - a0 = (v + sqrt(2 * v) * k + k * k) * n; + n = 1 / (1 + k / q + k * k); + a0 = (v + sqrt(v) / q * k + k * k) * n; a1 = 2 * (k * k - v) * n; - a2 = (v - sqrt(2 * v) * k + k * k) * n; + a2 = (v - sqrt(v) / q * k + k * k) * n; b1 = 2 * (k * k - 1) * n; - b2 = (1 - sqrt(2) * k + k * k) * n; + b2 = (1 - k / q + k * k) * n; } else { - n = 1 / (v + sqrt(2 * v) * k + k * k); - a0 = (1 + sqrt(2) * k + k * k) * n; + n = 1 / (v + sqrt(v) / q * k + k * k); + a0 = (1 + k / q + k * k) * n; a1 = 2 * (k * k - 1) * n; - a2 = (1 - sqrt(2) * k + k * k) * n; + a2 = (1 - k / q + k * k) * n; b1 = 2 * (k * k - v) * n; - b2 = (v - sqrt(2 * v) * k + k * k) * n; + b2 = (v - sqrt(v) / q * k + k * k) * n; } break; @@ -149,7 +150,13 @@ auto Biquad::process(double in) -> double { return out; } -//compute Q values for N-order butterworth filtering +//compute Q values for low-shelf and high-shelf filtering +auto Biquad::shelf(double gain, double slope) -> double { + double a = pow(10, gain / 40); + return 1 / sqrt((a + 1 / a) * (1 / slope - 1) + 2); +} + +//compute Q values for Nth-order butterworth filtering auto Biquad::butterworth(uint order, uint phase) -> double { return -0.5 / cos(Math::Pi * (phase + order + 0.5) / order); } diff --git a/nall/galois-field.hpp b/nall/galois-field.hpp new file mode 100644 index 00000000..38f22697 --- /dev/null +++ b/nall/galois-field.hpp @@ -0,0 +1,70 @@ +#pragma once + +//table-driven galois field modulo 2 +//do not use with GF(2^17) or larger + +namespace nall { + +template +struct GaloisField { + using type = GaloisField; + + GaloisField(uint x = 0) : x(x) {} + operator field() const { return x; } + + auto operator^(field y) const -> type { return x ^ y; } + auto operator+(field y) const -> type { return x ^ y; } + auto operator-(field y) const -> type { return x ^ y; } + auto operator*(field y) const -> type { return x && y ? exp(log(x) + log(y)) : 0; } + auto operator/(field y) const -> type { return x && y ? exp(log(x) + Elements - log(y)) : 0; } + + auto& operator =(field y) { return x = y, *this; } + auto& operator^=(field y) { return x = operator^(y), *this; } + auto& operator+=(field y) { return x = operator^(y), *this; } + auto& operator-=(field y) { return x = operator^(y), *this; } + auto& operator*=(field y) { return x = operator*(y), *this; } + auto& operator/=(field y) { return x = operator/(y), *this; } + + auto pow(field y) const -> type { return exp(log(x) * y); } + auto inv() const -> type { return exp(Elements - log(x)); } // 1/x + + static auto log(uint x) -> uint { + enum : uint { Size = bit::round(Elements), Mask = Size - 1 }; + static array log = [] { + uint shift = 0, polynomial = Polynomial; + while(polynomial >>= 1) shift++; + shift--; + + array log; + field x = 1; + for(uint n : range(Elements)) { + log[x] = n; + x = x << 1 ^ (x >> shift ? Polynomial : 0); + } + log[0] = 0; //-inf (undefined) + return log; + }(); + return log[x & Mask]; + } + + static auto exp(uint x) -> uint { + static array exp = [] { + uint shift = 0, polynomial = Polynomial; + while(polynomial >>= 1) shift++; + shift--; + + array exp; + field x = 1; + for(uint n : range(Elements)) { + exp[n] = x; + x = x << 1 ^ (x >> shift ? Polynomial : 0); + } + return exp; + }(); + return exp[x % Elements]; + } + + field x; +}; + +} diff --git a/nall/location.hpp b/nall/location.hpp index 4f1b3a51..7aeb8b07 100644 --- a/nall/location.hpp +++ b/nall/location.hpp @@ -52,7 +52,7 @@ inline auto prefix(string_view self) -> string { const char* p = self.data() + self.size() - 1, *last = p; for(int offset = self.size() - 1, suffix = -1; offset >= 0; offset--, p--) { if(*p == '/' && p == last) continue; - if(*p == '/') return slice(self, offset + 1, suffix >= 0 ? suffix - offset - 1 : 0).trimRight("/"); + if(*p == '/') return slice(self, offset + 1, (suffix >= 0 ? suffix : self.size()) - offset - 1).trimRight("/"); if(*p == '.' && suffix == -1) { suffix = offset; continue; } if(offset == 0) return slice(self, offset, suffix).trimRight("/"); } diff --git a/nall/matrix-multiply.hpp b/nall/matrix-multiply.hpp new file mode 100644 index 00000000..a82d8ea2 --- /dev/null +++ b/nall/matrix-multiply.hpp @@ -0,0 +1,36 @@ +#pragma once + +//matrix multiplication primitives +//used in: ruby/opengl/quark + +namespace nall { + +template inline auto MatrixMultiply( +T* output, +const T* xdata, uint xrows, uint xcols, +const T* ydata, uint yrows, uint ycols +) -> void { + if(xcols != yrows) return; + + for(uint y : range(xrows)) { + for(uint x : range(ycols)) { + T sum = 0; + for(uint z : range(xcols)) { + sum += xdata[y * xcols + z] * ydata[z * ycols + x]; + } + *output++ = sum; + } + } +} + +template inline auto MatrixMultiply( +const T* xdata, uint xrows, uint xcols, +const T* ydata, uint yrows, uint ycols +) -> vector { + vector output; + output.resize(xrows * ycols); + MatrixMultiply(output.data(), xdata, xrows, xcols, ydata, yrows, ycols); + return output; +} + +} diff --git a/nall/matrix.hpp b/nall/matrix.hpp index a4c67095..e266df6a 100644 --- a/nall/matrix.hpp +++ b/nall/matrix.hpp @@ -1,36 +1,213 @@ #pragma once -//matrix multiplication primitives -//used in: ruby/opengl/quark +namespace nall { -namespace nall::Matrix { +template +struct Matrix { + static_assert(Rows > 0 && Cols > 0); -template inline auto Multiply( -T* output, -const T* xdata, uint xrows, uint xcols, -const T* ydata, uint yrows, uint ycols -) -> void { - if(xcols != yrows) return; - - for(uint y : range(xrows)) { - for(uint x : range(ycols)) { - T sum = 0; - for(uint z : range(xcols)) { - sum += xdata[y * xcols + z] * ydata[z * ycols + x]; - } - *output++ = sum; + Matrix() = default; + Matrix(const Matrix&) = default; + Matrix(const initializer_list& source) { + uint index = 0; + for(auto& value : source) { + if(index >= Rows * Cols) break; + values[index / Cols][index % Cols] = value; } } -} -template inline auto Multiply( -const T* xdata, uint xrows, uint xcols, -const T* ydata, uint yrows, uint ycols -) -> vector { - vector output; - output.resize(xrows * ycols); - Multiply(output.data(), xdata, xrows, xcols, ydata, yrows, ycols); - return output; -} + operator array_span() { return {values, Rows * Cols}; } + operator array_view() const { return {values, Rows * Cols}; } + + //1D matrices (for polynomials, etc) + auto operator[](uint row) -> T& { return values[row][0]; } + auto operator[](uint row) const -> T { return values[row][0]; } + + //2D matrices + auto operator()(uint row, uint col) -> T& { return values[row][col]; } + auto operator()(uint row, uint col) const -> T { return values[row][col]; } + + //operators + auto operator+() const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = +target(row, col); + } + } + return result; + } + + auto operator-() const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = -target(row, col); + } + } + return result; + } + + auto operator+(const Matrix& source) const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = target(row, col) + source(row, col); + } + } + return result; + } + + auto operator-(const Matrix& source) const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = target(row, col) - source(row, col); + } + } + return result; + } + + auto operator*(T source) const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = target(row, col) * source; + } + } + return result; + } + + auto operator/(T source) const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = target(row, col) / source; + } + } + return result; + } + + //warning: matrix multiplication is not commutative! + template + auto operator*(const Matrix& source) const -> Matrix { + static_assert(Cols == SourceRows); + Matrix result; + for(uint y : range(Rows)) { + for(uint x : range(SourceCols)) { + T sum{}; + for(uint z : range(Cols)) { + sum += target(y, z) * source(z, x); + } + result(y, x) = sum; + } + } + return result; + } + + template + auto operator/(const Matrix& source) const -> maybe> { + static_assert(Cols == SourceRows && SourceRows == SourceCols); + if(auto inverted = source.invert()) return operator*(inverted()); + return {}; + } + + auto& operator+=(const Matrix& source) { return *this = operator+(source); } + auto& operator-=(const Matrix& source) { return *this = operator-(source); } + auto& operator*=(T source) { return *this = operator*(source); } + auto& operator/=(T source) { return *this = operator/(source); } + template + auto& operator*=(const Matrix& source) { return *this = operator*(source); } + //matrix division is not always possible (when matrix cannot be inverted), so operator/= is not provided + + //algorithm: Gauss-Jordan + auto invert() const -> maybe { + static_assert(Rows == Cols); + Matrix source = *this; + Matrix result = identity(); + + const auto add = [&](uint targetRow, uint sourceRow, T factor = 1) { + for(uint col : range(Cols)) { + result(targetRow, col) += result(sourceRow, col) * factor; + source(targetRow, col) += source(sourceRow, col) * factor; + } + }; + + const auto sub = [&](uint targetRow, uint sourceRow, T factor = 1) { + for(uint col : range(Cols)) { + result(targetRow, col) -= result(sourceRow, col) * factor; + source(targetRow, col) -= source(sourceRow, col) * factor; + } + }; + + const auto mul = [&](uint row, T factor) { + for(uint col : range(Cols)) { + result(row, col) *= factor; + source(row, col) *= factor; + } + }; + + for(uint i : range(Cols)) { + if(source(i, i) == 0) { + for(uint row : range(Rows)) { + if(source(row, i) != 0) { + add(i, row); + break; + } + } + //matrix is not invertible: + if(source(i, i) == 0) return {}; + } + + mul(i, T{1} / source(i, i)); + for(uint row : range(Rows)) { + if(row == i) continue; + sub(row, i, source(row, i)); + } + } + + return result; + } + + auto transpose() const -> Matrix { + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(col, row) = target(row, col); + } + } + return result; + } + + static auto identity() -> Matrix { + static_assert(Rows == Cols); + Matrix result; + for(uint row : range(Rows)) { + for(uint col : range(Cols)) { + result(row, col) = row == col; + } + } + return result; + } + + //debugging function: do not use in production code + template + auto _print() const -> void { + for(uint row : range(Rows)) { + nall::print("[ "); + for(uint col : range(Cols)) { + nall::print(pad(target(row, col), Pad, ' '), " "); + } + nall::print("]\n"); + } + } + +protected: + //same as operator(), but with easier to read syntax inside Matrix class + auto target(uint row, uint col) -> T& { return values[row][col]; } + auto target(uint row, uint col) const -> T { return values[row][col]; } + + T values[Rows][Cols]{}; +}; } diff --git a/nall/nall.hpp b/nall/nall.hpp index e823d629..3cb32e1e 100644 --- a/nall/nall.hpp +++ b/nall/nall.hpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +56,7 @@ #include #include #include +#include #include #include #include diff --git a/nall/platform.hpp b/nall/platform.hpp index 7049d496..4e2b3769 100644 --- a/nall/platform.hpp +++ b/nall/platform.hpp @@ -39,6 +39,7 @@ namespace Math { #include #include #include +#include #include #include @@ -77,7 +78,6 @@ namespace Math { inline auto putenv(const char* value) -> int { return _wputenv(nall::utf16_t(value)); } inline auto realpath(const char* file_name, char* resolved_name) -> char* { wchar_t wfile_name[PATH_MAX] = L""; if(!_wfullpath(wfile_name, nall::utf16_t(file_name), PATH_MAX)) return nullptr; strcpy(resolved_name, nall::utf8_t(wfile_name)); return resolved_name; } inline auto rename(const char* oldname, const char* newname) -> int { return _wrename(nall::utf16_t(oldname), nall::utf16_t(newname)); } - inline auto usleep(unsigned milliseconds) -> void { Sleep(milliseconds / 1000); } namespace nall { //network functions take void*, not char*. this allows them to be used without casting diff --git a/nall/primitives/integer.hpp b/nall/primitives/integer.hpp index cff015da..3f42edbd 100644 --- a/nall/primitives/integer.hpp +++ b/nall/primitives/integer.hpp @@ -40,6 +40,12 @@ template struct Integer { template inline auto& operator ^=(const T& value) { data = mask(data ^ value); return *this; } template inline auto& operator |=(const T& value) { data = mask(data | value); return *this; } + inline auto operator()(int index) -> BitRange { return {(utype&)data, index, index}; } + inline auto operator()(int lo, int hi) -> BitRange { return {(utype&)data, lo, hi}; } + + inline auto operator()(int index) const -> const BitRange { return {(utype&)data, index, index}; } + inline auto operator()(int lo, int hi) const -> const BitRange { return {(utype&)data, lo, hi}; } + inline auto bits(int lo, int hi) -> BitRange { return {(utype&)data, lo, hi}; } inline auto bit(int index) -> BitRange { return {(utype&)data, index, index}; } inline auto byte(int index) -> BitRange { return {(utype&)data, index * 8 + 0, index * 8 + 7}; } diff --git a/nall/primitives/natural.hpp b/nall/primitives/natural.hpp index 0ad4abcf..f8224221 100644 --- a/nall/primitives/natural.hpp +++ b/nall/primitives/natural.hpp @@ -38,6 +38,12 @@ template struct Natural { template inline auto& operator ^=(const T& value) { data = mask(data ^ value); return *this; } template inline auto& operator |=(const T& value) { data = mask(data | value); return *this; } + inline auto operator()(int index) -> BitRange { return {(utype&)data, index, index}; } + inline auto operator()(int lo, int hi) -> BitRange { return {(utype&)data, lo, hi}; } + + inline auto operator()(int index) const -> const BitRange { return {(utype&)data, index, index}; } + inline auto operator()(int lo, int hi) const -> const BitRange { return {(utype&)data, lo, hi}; } + inline auto bits(int lo, int hi) -> BitRange { return {(utype&)data, lo, hi}; } inline auto bit(int index) -> BitRange { return {(utype&)data, index, index}; } inline auto byte(int index) -> BitRange { return {(utype&)data, index * 8 + 0, index * 8 + 7}; } diff --git a/nall/reed-solomon.hpp b/nall/reed-solomon.hpp new file mode 100644 index 00000000..d04bb661 --- /dev/null +++ b/nall/reed-solomon.hpp @@ -0,0 +1,218 @@ +#pragma once + +namespace nall { + +//RS(n,k) = ReedSolomon +template +struct ReedSolomon { + enum : uint { Parity = Length - Inputs }; + static_assert(Length <= 255 && Length > 0); + static_assert(Parity <= 32 && Parity > 0); + + using Field = GaloisField; + template using Polynomial = Matrix; + + template + static auto shift(Polynomial polynomial) -> Polynomial { + for(int n = Size - 1; n > 0; n--) polynomial[n] = polynomial[n - 1]; + polynomial[0] = 0; + return polynomial; + } + + template + static auto degree(const Polynomial& polynomial) -> uint { + for(int n = Size; n > 0; n--) { + if(polynomial[n - 1] != 0) return n - 1; + } + return 0; + } + + template + static auto evaluate(const Polynomial& polynomial, Field field) -> Field { + Field sum = 0; + for(uint n : range(Size)) sum += polynomial[n] * field.pow(n); + return sum; + } + + Polynomial message; + Polynomial syndromes; + Polynomial locators; + + ReedSolomon() = default; + ReedSolomon(const ReedSolomon&) = default; + + ReedSolomon(const initializer_list& source) { + uint index = 0; + for(auto& value : source) { + if(index >= Length) break; + message[index++] = value; + } + } + + auto operator[](uint index) -> Field& { return message[index]; } + auto operator[](uint index) const -> Field { return message[index]; } + + auto calculateSyndromes() -> void { + static const Polynomial bases = [] { + Polynomial bases; + for(uint n : range(Parity)) { + bases[n] = Field::exp(n); + } + return bases; + }(); + + syndromes = {}; + for(uint m : range(Length)) { + for(uint p : range(Parity)) { + syndromes[p] *= bases[p]; + syndromes[p] += message[m]; + } + } + } + + auto generateParity() -> void { + static const Polynomial matrix = [] { + Polynomial matrix{}; + for(uint row : range(Parity)) { + for(uint col : range(Parity)) { + matrix(row, col) = Field::exp(row * col); + } + } + if(auto result = matrix.invert()) return *result; + throw; //should never occur + }(); + + for(uint p : range(Parity)) message[Inputs + p] = 0; + calculateSyndromes(); + auto parity = matrix * syndromes; + for(uint p : range(Parity)) message[Inputs + p] = parity[Parity - (p + 1)]; + } + + auto syndromesAreZero() -> bool { + for(uint p : range(Parity)) { + if(syndromes[p]) return false; + } + return true; + } + + //algorithm: Berlekamp-Massey + auto calculateLocators() -> void { + Polynomial history{1}; + locators = history; + uint errors = 0; + + for(uint n : range(Parity)) { + Field discrepancy = 0; + for(uint l : range(errors + 1)) { + discrepancy += locators[l] * syndromes[n - l]; + } + + history = shift(history); + if(discrepancy) { + auto located = locators - history * discrepancy; + if(errors * 2 <= n) { + errors = (n + 1) - errors; + history = locators * discrepancy.inv(); + } + locators = located; + } + } + } + + //algorithm: brute force + //todo: implement Chien search here + auto calculateErrors() -> vector { + calculateSyndromes(); + if(syndromesAreZero()) return {}; //no errors detected + calculateLocators(); + vector errors; + for(uint n : range(Length)) { + if(evaluate(locators, Field{2}.pow(255 - n))) continue; + errors.append(Length - (n + 1)); + } + return errors; + } + + template + static auto calculateErasures(array_view errors) -> maybe> { + Polynomial matrix{}; + for(uint row : range(Size)) { + for(uint col : range(Size)) { + uint index = Length - (errors[col] + 1); + matrix(row, col) = Field::exp(row * index); + } + } + return matrix.invert(); + } + + template + auto correctErasures(array_view errors) -> int { + calculateSyndromes(); + if(syndromesAreZero()) return 0; //no errors detected + if(auto matrix = calculateErasures(errors)) { + Polynomial factors; + for(uint n : range(Size)) factors[n] = syndromes[n]; + auto errata = matrix() * factors; + for(uint m : range(Size)) { + message[errors[m]] += errata[m]; + } + calculateSyndromes(); + if(syndromesAreZero()) return Size; //corrected Size errors + return -Size; //failed to correct Size errors + } + return -Size; //should never occur, but might ... + } + + //note: the erasure matrix is generated as a Polynomial, where N is the number of errors to correct. + //because this is a template parameter, and the actual number of errors may very, this function is needed. + //the alternative would be to convert Matrix to a dynamically sized Matrix(Rows, Cols) type, + //but this would require heap memory allocations and would be a massive performance penalty. + auto correctErrata(array_view errors) -> int { + if(errors.size() >= Parity) return -errors.size(); //too many errors to be correctable + + switch(errors.size()) { + case 0: return 0; + case 1: return correctErasures< 1>(errors); + case 2: return correctErasures< 2>(errors); + case 3: return correctErasures< 3>(errors); + case 4: return correctErasures< 4>(errors); + case 5: return correctErasures< 5>(errors); + case 6: return correctErasures< 6>(errors); + case 7: return correctErasures< 7>(errors); + case 8: return correctErasures< 8>(errors); + case 9: return correctErasures< 9>(errors); + case 10: return correctErasures<10>(errors); + case 11: return correctErasures<11>(errors); + case 12: return correctErasures<12>(errors); + case 13: return correctErasures<13>(errors); + case 14: return correctErasures<14>(errors); + case 15: return correctErasures<15>(errors); + case 16: return correctErasures<16>(errors); + case 17: return correctErasures<17>(errors); + case 18: return correctErasures<18>(errors); + case 19: return correctErasures<19>(errors); + case 20: return correctErasures<20>(errors); + case 21: return correctErasures<21>(errors); + case 22: return correctErasures<22>(errors); + case 23: return correctErasures<23>(errors); + case 24: return correctErasures<24>(errors); + case 25: return correctErasures<25>(errors); + case 26: return correctErasures<26>(errors); + case 27: return correctErasures<27>(errors); + case 28: return correctErasures<28>(errors); + case 29: return correctErasures<29>(errors); + case 30: return correctErasures<30>(errors); + case 31: return correctErasures<31>(errors); + case 32: return correctErasures<32>(errors); + } + return -errors.size(); //it's possible to correct more errors if the above switch were extended ... + } + + //convenience function for when erasures aren't needed + auto correctErrors() -> int { + auto errors = calculateErrors(); + return correctErrata(errors); + } +}; + +} diff --git a/nall/serializer.hpp b/nall/serializer.hpp index 16238c2c..eb090510 100644 --- a/nall/serializer.hpp +++ b/nall/serializer.hpp @@ -51,7 +51,7 @@ struct serializer { return _capacity; } - template auto floatingpoint(T& value) -> serializer& { + template auto real(T& value) -> serializer& { enum : uint { size = sizeof(T) }; //this is rather dangerous, and not cross-platform safe; //but there is no standardized way to export FP-values @@ -108,7 +108,7 @@ struct serializer { template auto operator()(T& value, typename std::enable_if::value>::type* = 0) -> serializer& { value.serialize(*this); return *this; } template auto operator()(T& value, typename std::enable_if::value>::type* = 0) -> serializer& { return integer(value); } - template auto operator()(T& value, typename std::enable_if::value>::type* = 0) -> serializer& { return floatingpoint(value); } + template auto operator()(T& value, typename std::enable_if::value>::type* = 0) -> serializer& { return real(value); } template auto operator()(T& value, typename std::enable_if::value>::type* = 0) -> serializer& { return array(value); } template auto operator()(T& value, uint size, typename std::enable_if::value>::type* = 0) -> serializer& { return array(value, size); } diff --git a/nall/shared-pointer.hpp b/nall/shared-pointer.hpp index d7d1e0d8..e5755c13 100644 --- a/nall/shared-pointer.hpp +++ b/nall/shared-pointer.hpp @@ -188,6 +188,10 @@ struct shared_pointer { return manager && manager->strong == 1; } + auto references() const -> uint { + return manager ? manager->strong : 0; + } + auto reset() -> void { if(manager && manager->strong) { //pointer may contain weak references; if strong==0 it may destroy manager diff --git a/nall/string.hpp b/nall/string.hpp index 45e900ec..bd32e808 100644 --- a/nall/string.hpp +++ b/nall/string.hpp @@ -194,11 +194,9 @@ public: template inline auto assign(P&&...) -> type&; template inline auto prepend(const T&, P&&...) -> type&; template inline auto prepend(const nall::string_format&, P&&...) -> type&; - inline auto prepend() -> type&; template inline auto _prepend(const stringify&) -> type&; template inline auto append(const T&, P&&...) -> type&; template inline auto append(const nall::string_format&, P&&...) -> type&; - inline auto append() -> type&; template inline auto _append(const stringify&) -> type&; inline auto length() const -> uint; diff --git a/nall/string/core.hpp b/nall/string/core.hpp index 45ca6fe8..459993c2 100644 --- a/nall/string/core.hpp +++ b/nall/string/core.hpp @@ -34,19 +34,15 @@ template auto string::assign(P&&... p) -> string& { } template auto string::prepend(const T& value, P&&... p) -> string& { - prepend(forward

(p)...); + if constexpr(sizeof...(p)) prepend(forward

(p)...); return _prepend(make_string(value)); } template auto string::prepend(const nall::string_format& value, P&&... p) -> string& { - prepend(forward

(p)...); + if constexpr(sizeof...(p)) prepend(forward

(p)...); return format(value); } -auto string::prepend() -> string& { - return *this; -} - template auto string::_prepend(const stringify& source) -> string& { resize(source.size() + size()); memory::move(get() + source.size(), get(), size() - source.size()); @@ -56,15 +52,13 @@ template auto string::_prepend(const stringify& source) -> string template auto string::append(const T& value, P&&... p) -> string& { _append(make_string(value)); - return append(forward

(p)...); + if constexpr(sizeof...(p)) append(forward

(p)...); + return *this; } template auto string::append(const nall::string_format& value, P&&... p) -> string& { format(value); - return append(forward

(p)...); -} - -auto string::append() -> string& { + if constexpr(sizeof...(p)) append(forward

(p)...); return *this; } diff --git a/nall/string/markup/node.hpp b/nall/string/markup/node.hpp index 4113df81..528d0a03 100644 --- a/nall/string/markup/node.hpp +++ b/nall/string/markup/node.hpp @@ -66,15 +66,15 @@ struct Node { auto text() const -> nall::string { return value().strip(); } auto string() const -> nall::string { return value().strip(); } auto boolean() const -> bool { return text() == "true"; } - auto integer() const -> intmax { return text().integer(); } - auto natural() const -> uintmax { return text().natural(); } + auto integer() const -> int64_t { return text().integer(); } + auto natural() const -> uint64_t { return text().natural(); } auto real() const -> double { return text().real(); } auto text(const nall::string& fallback) const -> nall::string { return bool(*this) ? text() : fallback; } auto string(const nall::string& fallback) const -> nall::string { return bool(*this) ? string() : fallback; } auto boolean(bool fallback) const -> bool { return bool(*this) ? boolean() : fallback; } - auto integer(intmax fallback) const -> intmax { return bool(*this) ? integer() : fallback; } - auto natural(uintmax fallback) const -> uintmax { return bool(*this) ? natural() : fallback; } + auto integer(int64_t fallback) const -> int64_t { return bool(*this) ? integer() : fallback; } + auto natural(uint64_t fallback) const -> uint64_t { return bool(*this) ? natural() : fallback; } auto real(double fallback) const -> double { return bool(*this) ? real() : fallback; } auto setName(const nall::string& name = "") -> Node& { shared->_name = name; return *this; } diff --git a/ruby/GNUmakefile b/ruby/GNUmakefile index 01d5ce64..84e65f35 100644 --- a/ruby/GNUmakefile +++ b/ruby/GNUmakefile @@ -8,7 +8,7 @@ ifeq ($(ruby),) ruby += audio.openal ruby += input.quartz input.carbon else ifeq ($(platform),linux) - ruby += video.glx video.xvideo video.xshm + ruby += video.glx video.glx2 video.xvideo video.xshm ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao ruby += input.sdl input.xlib input.udev else ifeq ($(platform),bsd) diff --git a/ruby/ruby.hpp b/ruby/ruby.hpp index 5be87c32..9be04879 100644 --- a/ruby/ruby.hpp +++ b/ruby/ruby.hpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/ruby/video/cgl.cpp b/ruby/video/cgl.cpp index 90e92762..11a68a67 100644 --- a/ruby/video/cgl.cpp +++ b/ruby/video/cgl.cpp @@ -60,6 +60,14 @@ struct VideoCGL : VideoDriver, OpenGL { } } + auto size(uint& width, uint& height) -> void override { + @autoreleasepool { + auto area = [view convertRectToBacking:[view bounds]]; + width = area.size.width; + height = area.size.height; + } + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { OpenGL::size(width, height); return OpenGL::lock(data, pitch); @@ -68,12 +76,16 @@ struct VideoCGL : VideoDriver, OpenGL { auto release() -> void override { } - auto output() -> void override { + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); + @autoreleasepool { if([view lockFocusIfCanDraw]) { - auto area = [view convertRectToBacking:[view bounds]]; - OpenGL::outputWidth = area.size.width; - OpenGL::outputHeight = area.size.height; + OpenGL::absoluteWidth = width; + OpenGL::absoluteHeight = height; + OpenGL::outputWidth = windowWidth; + OpenGL::outputHeight = windowHeight; OpenGL::output(); [[view openGLContext] flushBuffer]; if(self.flush) glFinish(); diff --git a/ruby/video/direct3d.cpp b/ruby/video/direct3d.cpp index 83dbd926..24220da2 100644 --- a/ruby/video/direct3d.cpp +++ b/ruby/video/direct3d.cpp @@ -3,14 +3,14 @@ #include #undef interface -static LRESULT CALLBACK VideoDirect3D_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { +static LRESULT CALLBACK VideoDirect3D9_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { return DefWindowProc(hwnd, msg, wparam, lparam); } struct VideoDirect3D : VideoDriver { VideoDirect3D& self = *this; - VideoDirect3D(Video& super) : VideoDriver(super) {} - ~VideoDirect3D() { terminate(); } + VideoDirect3D(Video& super) : VideoDriver(super) { construct(); } + ~VideoDirect3D() { destruct(); } auto create() -> bool override { return initialize(); @@ -52,14 +52,25 @@ struct VideoDirect3D : VideoDriver { } } - auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { - if(_lost && !recover()) return false; + auto size(uint& width, uint& height) -> void { + if(_lost && !recover()) return; + + RECT rectangle; + GetClientRect(_context, &rectangle); + + width = rectangle.right - rectangle.left; + height = rectangle.bottom - rectangle.top; //if output size changed, driver must be re-initialized. //failure to do so causes scaling issues on some video drivers. - RECT rectangle; - GetClientRect((HWND)self.context, &rectangle); - if(_windowWidth != rectangle.right || _windowHeight != rectangle.bottom) initialize(); + if(width != _windowWidth || height != _windowHeight) initialize(); + } + + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { + if(_lost && !recover()) return false; + + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); if(width != _inputWidth || height != _inputHeight) { resize(_inputWidth = width, _inputHeight = height); @@ -81,17 +92,17 @@ struct VideoDirect3D : VideoDriver { _surface = nullptr; } - auto output() -> void override { + auto output(uint width, uint height) -> void override { if(_lost && !recover()) return; + if(!width) width = _windowWidth; + if(!height) height = _windowHeight; + _device->BeginScene(); - uint x = 0, y = 0; - if(self.exclusive) { - //center output in exclusive mode fullscreen window - x = (_monitorWidth - _windowWidth) / 2; - y = (_monitorHeight - _windowHeight) / 2; - } - setVertex(0, 0, _inputWidth, _inputHeight, _textureWidth, _textureHeight, x, y, _windowWidth, _windowHeight); + //center output within window + uint x = (_windowWidth - width) / 2; + uint y = (_windowHeight - height) / 2; + setVertex(0, 0, _inputWidth, _inputHeight, _textureWidth, _textureHeight, x, y, width, height); _device->SetTexture(0, _texture); _device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); _device->EndScene(); @@ -112,6 +123,25 @@ struct VideoDirect3D : VideoDriver { } private: + auto construct() -> void { + WNDCLASS windowClass{}; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + windowClass.hCursor = LoadCursor(0, IDC_ARROW); + windowClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); + windowClass.hInstance = GetModuleHandle(0); + windowClass.lpfnWndProc = VideoDirect3D9_WindowProcedure; + windowClass.lpszClassName = L"VideoDirect3D9_Window"; + windowClass.lpszMenuName = 0; + windowClass.style = CS_HREDRAW | CS_VREDRAW; + RegisterClass(&windowClass); + } + + auto destruct() -> void { + terminate(); + } + auto recover() -> bool { if(!_device) return false; @@ -211,36 +241,28 @@ private: auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; - HMONITOR monitor = MonitorFromWindow((HWND)self.context, MONITOR_DEFAULTTOPRIMARY); - MONITORINFOEX information = {}; + POINT point{0, 0}; + HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY); + MONITORINFOEX information{}; information.cbSize = sizeof(MONITORINFOEX); GetMonitorInfo(monitor, &information); _monitorWidth = information.rcMonitor.right - information.rcMonitor.left; _monitorHeight = information.rcMonitor.bottom - information.rcMonitor.top; - WNDCLASS windowClass = {}; - windowClass.cbClsExtra = 0; - windowClass.cbWndExtra = 0; - windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); - windowClass.hCursor = LoadCursor(0, IDC_ARROW); - windowClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); - windowClass.hInstance = GetModuleHandle(0); - windowClass.lpfnWndProc = VideoDirect3D_WindowProcedure; - windowClass.lpszClassName = L"VideoDirect3D_Window"; - windowClass.lpszMenuName = 0; - windowClass.style = CS_HREDRAW | CS_VREDRAW; - RegisterClass(&windowClass); - - _exclusiveContext = (uintptr)CreateWindow(L"VideoDirect3D_Window", L"", WS_POPUP, - information.rcMonitor.left, information.rcMonitor.top, _monitorWidth, _monitorHeight, - nullptr, nullptr, GetModuleHandle(0), nullptr); + if(self.exclusive) { + _context = _exclusive = CreateWindowEx(WS_EX_TOPMOST, L"VideoDirect3D9_Window", L"", WS_VISIBLE | WS_POPUP, + information.rcMonitor.left, information.rcMonitor.top, _monitorWidth, _monitorHeight, + nullptr, nullptr, GetModuleHandle(0), nullptr); + } else { + _context = (HWND)self.context; + } RECT rectangle; - GetClientRect((HWND)self.context, &rectangle); - _windowWidth = rectangle.right; - _windowHeight = rectangle.bottom; + GetClientRect(_context, &rectangle); + _windowWidth = rectangle.right - rectangle.left; + _windowHeight = rectangle.bottom - rectangle.top; _instance = Direct3DCreate9(D3D_SDK_VERSION); if(!_instance) return false; @@ -254,36 +276,19 @@ private: _presentation.EnableAutoDepthStencil = false; _presentation.AutoDepthStencilFormat = D3DFMT_UNKNOWN; _presentation.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + _presentation.hDeviceWindow = _context; + _presentation.Windowed = !self.exclusive; + _presentation.BackBufferFormat = self.exclusive ? D3DFMT_X8R8G8B8 : D3DFMT_UNKNOWN; + _presentation.BackBufferWidth = self.exclusive ? _monitorWidth : 0; + _presentation.BackBufferHeight = self.exclusive ? _monitorHeight : 0; + _presentation.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; - if(!self.exclusive) { - _presentation.hDeviceWindow = (HWND)self.context; - _presentation.Windowed = true; - _presentation.BackBufferFormat = D3DFMT_UNKNOWN; - _presentation.BackBufferWidth = 0; - _presentation.BackBufferHeight = 0; - - ShowWindow((HWND)_exclusiveContext, SW_HIDE); - if(_instance->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (HWND)self.context, - D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &_presentation, &_device) != D3D_OK) { - return false; - } - } else { - _presentation.hDeviceWindow = (HWND)_exclusiveContext; - _presentation.Windowed = false; - _presentation.BackBufferFormat = D3DFMT_X8R8G8B8; - _presentation.BackBufferWidth = _monitorWidth; - _presentation.BackBufferHeight = _monitorHeight; - _presentation.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; - - ShowWindow((HWND)_exclusiveContext, SW_SHOWNORMAL); - if(_instance->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (HWND)_exclusiveContext, - D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &_presentation, &_device) != D3D_OK) { - return false; - } + if(_instance->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, _context, + D3DCREATE_FPU_PRESERVE | D3DCREATE_SOFTWARE_VERTEXPROCESSING, &_presentation, &_device) != D3D_OK) { + return false; } _device->GetDeviceCaps(&_capabilities); - if(_capabilities.Caps2 & D3DCAPS2_DYNAMICTEXTURES) { _textureUsage = D3DUSAGE_DYNAMIC; _texturePool = D3DPOOL_DEFAULT; @@ -307,7 +312,8 @@ private: if(_texture) { _texture->Release(); _texture = nullptr; } if(_device) { _device->Release(); _device = nullptr; } if(_instance) { _instance->Release(); _instance = nullptr; } - if(_exclusiveContext) { DestroyWindow((HWND)_exclusiveContext); _exclusiveContext = 0; } + if(_exclusive) { DestroyWindow(_exclusive); _exclusive = nullptr; } + _context = nullptr; } struct Vertex { @@ -316,8 +322,9 @@ private: }; bool _ready = false; - uintptr _exclusiveContext = 0; + HWND _exclusive = nullptr; + HWND _context = nullptr; LPDIRECT3D9 _instance = nullptr; LPDIRECT3DDEVICE9 _device = nullptr; LPDIRECT3DVERTEXBUFFER9 _vertexBuffer = nullptr; diff --git a/ruby/video/directdraw.cpp b/ruby/video/directdraw.cpp index 8d68b16e..7392bc91 100644 --- a/ruby/video/directdraw.cpp +++ b/ruby/video/directdraw.cpp @@ -1,10 +1,14 @@ #include #undef interface +static LRESULT CALLBACK VideoDirectDraw7_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + return DefWindowProc(hwnd, msg, wparam, lparam); +} + struct VideoDirectDraw : VideoDriver { VideoDirectDraw& self = *this; - VideoDirectDraw(Video& super) : VideoDriver(super) {} - ~VideoDirectDraw() { terminate(); } + VideoDirectDraw(Video& super) : VideoDriver(super) { construct(); } + ~VideoDirectDraw() { destruct(); } auto create() -> bool override { super.setShader("Blur"); @@ -14,9 +18,14 @@ struct VideoDirectDraw : VideoDriver { auto driver() -> string override { return "DirectDraw 7.0"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasBlocking() -> bool override { return true; } + auto setExclusive(bool exclusive) -> bool override { + return initialize(); + } + auto setContext(uintptr context) -> bool override { return initialize(); } @@ -26,13 +35,20 @@ struct VideoDirectDraw : VideoDriver { } auto clear() -> void override { - DDBLTFX fx = {}; + DDBLTFX fx{}; fx.dwSize = sizeof(DDBLTFX); fx.dwFillColor = 0x00000000; _screen->Blt(0, 0, 0, DDBLT_WAIT | DDBLT_COLORFILL, &fx); _raster->Blt(0, 0, 0, DDBLT_WAIT | DDBLT_COLORFILL, &fx); } + auto size(uint& width, uint& height) -> void override { + RECT rectangle; + GetClientRect(_context, &rectangle); + width = rectangle.right - rectangle.left; + height = rectangle.bottom - rectangle.top; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { if(width != _width || height != _height) resize(_width = width, _height = height); DDSURFACEDESC2 description = {}; @@ -49,7 +65,10 @@ struct VideoDirectDraw : VideoDriver { _raster->Unlock(0); } - auto output() -> void override { + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); + if(self.blocking) while(true) { BOOL vblank; _interface->GetVerticalBlankStatus(&vblank); @@ -59,13 +78,18 @@ struct VideoDirectDraw : VideoDriver { RECT source; SetRect(&source, 0, 0, _width, _height); - POINT point = {0, 0}; - ClientToScreen((HWND)self.context, &point); + POINT point{0, 0}; + ClientToScreen(_context, &point); RECT target; - GetClientRect((HWND)self.context, &target); + GetClientRect(_context, &target); OffsetRect(&target, point.x, point.y); + target.left += ((int)windowWidth - (int)width) / 2; + target.top += ((int)windowHeight - (int)height) / 2; + target.right = target.left + width; + target.bottom = target.top + height; + if(_screen->Blt(&target, _raster, &source, DDBLT_WAIT, 0) == DDERR_SURFACELOST) { _screen->Restore(); _raster->Restore(); @@ -73,25 +97,60 @@ struct VideoDirectDraw : VideoDriver { } private: + auto construct() -> void { + WNDCLASS windowClass{}; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + windowClass.hCursor = LoadCursor(0, IDC_ARROW); + windowClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); + windowClass.hInstance = GetModuleHandle(0); + windowClass.lpfnWndProc = VideoDirect3D9_WindowProcedure; + windowClass.lpszClassName = L"VideoDirectDraw7_Window"; + windowClass.lpszMenuName = 0; + windowClass.style = CS_HREDRAW | CS_VREDRAW; + RegisterClass(&windowClass); + } + + auto destruct() -> void { + terminate(); + } + auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; + + POINT point{0, 0}; + HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY); + MONITORINFOEX information{}; + information.cbSize = sizeof(MONITORINFOEX); + GetMonitorInfo(monitor, &information); + uint monitorWidth = information.rcMonitor.right - information.rcMonitor.left; + uint monitorHeight = information.rcMonitor.bottom - information.rcMonitor.top; + + if(self.exclusive) { + _context = _exclusive = CreateWindowEx(WS_EX_TOPMOST, L"VideoDirectDraw7_Window", L"", WS_VISIBLE | WS_POPUP, + information.rcMonitor.left, information.rcMonitor.top, monitorWidth, monitorHeight, + nullptr, nullptr, GetModuleHandle(0), nullptr); + } else { + _context = (HWND)self.context; + } LPDIRECTDRAW interface = nullptr; DirectDrawCreate(0, &interface, 0); interface->QueryInterface(IID_IDirectDraw7, (void**)&_interface); interface->Release(); - _interface->SetCooperativeLevel((HWND)self.context, DDSCL_NORMAL); + _interface->SetCooperativeLevel(_context, DDSCL_NORMAL); - DDSURFACEDESC2 description = {}; + DDSURFACEDESC2 description{}; description.dwSize = sizeof(DDSURFACEDESC2); description.dwFlags = DDSD_CAPS; description.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; _interface->CreateSurface(&description, &_screen, 0); _interface->CreateClipper(0, &_clipper, 0); - _clipper->SetHWnd(0, (HWND)self.context); + _clipper->SetHWnd(0, _context); _screen->SetClipper(_clipper); _raster = nullptr; @@ -107,6 +166,8 @@ private: if(_raster) { _raster->Release(); _raster = nullptr; } if(_screen) { _screen->Release(); _screen = nullptr; } if(_interface) { _interface->Release(); _interface = nullptr; } + if(_exclusive) { DestroyWindow(_exclusive); _exclusive = nullptr; } + _context = nullptr; } auto resize(uint width, uint height) -> void { @@ -117,7 +178,7 @@ private: if(_raster) _raster->Release(); - DDSURFACEDESC2 description = {}; + DDSURFACEDESC2 description{}; description.dwSize = sizeof(DDSURFACEDESC2); _screen->GetSurfaceDesc(&description); int depth = description.ddpfPixelFormat.dwRGBBitCount; @@ -155,6 +216,8 @@ private: uint _width = 0; uint _height = 0; + HWND _context = nullptr; + HWND _exclusive = nullptr; LPDIRECTDRAW7 _interface = nullptr; LPDIRECTDRAWSURFACE7 _screen = nullptr; LPDIRECTDRAWSURFACE7 _raster = nullptr; diff --git a/ruby/video/gdi.cpp b/ruby/video/gdi.cpp index e4579ce5..74afbf16 100644 --- a/ruby/video/gdi.cpp +++ b/ruby/video/gdi.cpp @@ -1,7 +1,11 @@ +static LRESULT CALLBACK VideoGDI_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + return DefWindowProc(hwnd, msg, wparam, lparam); +} + struct VideoGDI : VideoDriver { VideoGDI& self = *this; - VideoGDI(Video& super) : VideoDriver(super) {} - ~VideoGDI() { terminate(); } + VideoGDI(Video& super) : VideoDriver(super) { construct(); } + ~VideoGDI() { destruct(); } auto create() -> bool override { super.setShader("None"); @@ -11,10 +15,19 @@ struct VideoGDI : VideoDriver { auto driver() -> string override { return "GDI"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } + auto setExclusive(bool exclusive) -> bool override { return initialize(); } auto setContext(uintptr context) -> bool override { return initialize(); } + auto size(uint& width, uint& height) -> void override { + RECT rectangle; + GetClientRect(_context, &rectangle); + width = rectangle.right - rectangle.left; + height = rectangle.bottom - rectangle.top; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { if(!_buffer || _width != width || _height != height) { if(_buffer) delete[] _buffer; @@ -25,11 +38,11 @@ struct VideoGDI : VideoDriver { _width = width; _height = height; - HDC hdc = GetDC((HWND)self.context); + HDC hdc = GetDC(_context); _dc = CreateCompatibleDC(hdc); _bitmap = CreateCompatibleBitmap(hdc, width, height); SelectObject(_dc, _bitmap); - ReleaseDC((HWND)self.context, hdc); + ReleaseDC(_context, hdc); memory::fill(&_info, sizeof(BITMAPINFO)); _info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); @@ -48,20 +61,58 @@ struct VideoGDI : VideoDriver { auto release() -> void override { } - auto output() -> void override { - RECT rc; - GetClientRect((HWND)self.context, &rc); + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); SetDIBits(_dc, _bitmap, 0, _height, (void*)_buffer, &_info, DIB_RGB_COLORS); - HDC hdc = GetDC((HWND)self.context); - StretchBlt(hdc, rc.left, rc.top, rc.right, rc.bottom, _dc, 0, 0, _width, _height, SRCCOPY); - ReleaseDC((HWND)self.context, hdc); + HDC hdc = GetDC(_context); + StretchBlt(hdc, + ((int)windowWidth - (int)width) / 2, ((int)windowHeight - (int)height) / 2, width, height, _dc, + 0, 0, _width, _height, SRCCOPY + ); + ReleaseDC(_context, hdc); } private: + auto construct() -> void { + WNDCLASS windowClass{}; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + windowClass.hCursor = LoadCursor(0, IDC_ARROW); + windowClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); + windowClass.hInstance = GetModuleHandle(0); + windowClass.lpfnWndProc = VideoGDI_WindowProcedure; + windowClass.lpszClassName = L"VideoGDI_Window"; + windowClass.lpszMenuName = 0; + windowClass.style = CS_HREDRAW | CS_VREDRAW; + RegisterClass(&windowClass); + } + + auto destruct() -> void { + terminate(); + } + auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; + + POINT point{0, 0}; + HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY); + MONITORINFOEX information{}; + information.cbSize = sizeof(MONITORINFOEX); + GetMonitorInfo(monitor, &information); + uint monitorWidth = information.rcMonitor.right - information.rcMonitor.left; + uint monitorHeight = information.rcMonitor.bottom - information.rcMonitor.top; + + if(self.exclusive) { + _context = _exclusive = CreateWindowEx(WS_EX_TOPMOST, L"VideoGDI_Window", L"", WS_VISIBLE | WS_POPUP, + information.rcMonitor.left, information.rcMonitor.top, monitorWidth, monitorHeight, + nullptr, nullptr, GetModuleHandle(0), nullptr); + } else { + _context = (HWND)self.context; + } _width = 0; _height = 0; @@ -73,6 +124,8 @@ private: if(_buffer) { delete[] _buffer; _buffer = nullptr; } if(_bitmap) { DeleteObject(_bitmap); _bitmap = nullptr; } if(_dc) { DeleteDC(_dc); _dc = nullptr; } + if(_exclusive) { DestroyWindow(_exclusive); _exclusive = nullptr; } + _context = nullptr; } bool _ready = false; @@ -81,6 +134,8 @@ private: uint _width = 0; uint _height = 0; + HWND _exclusive = nullptr; + HWND _context = nullptr; HBITMAP _bitmap = nullptr; HDC _dc = nullptr; BITMAPINFO _info = {}; diff --git a/ruby/video/glx.cpp b/ruby/video/glx.cpp index 569fa186..4b0f4992 100644 --- a/ruby/video/glx.cpp +++ b/ruby/video/glx.cpp @@ -9,8 +9,8 @@ auto VideoGLX_X11ErrorHandler(Display*, XErrorEvent*) -> int { struct VideoGLX : VideoDriver, OpenGL { VideoGLX& self = *this; - VideoGLX(Video& super) : VideoDriver(super) {} - ~VideoGLX() { terminate(); } + VideoGLX(Video& super) : VideoDriver(super) { construct(); } + ~VideoGLX() { destruct(); } auto create() -> bool override { super.setFormat("RGB24"); @@ -20,13 +20,20 @@ struct VideoGLX : VideoDriver, OpenGL { auto driver() -> string override { return "OpenGL 3.2"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasBlocking() -> bool override { return true; } auto hasFlush() -> bool override { return true; } auto hasShader() -> bool override { return true; } auto hasFormats() -> vector override { - return {"RGB24"}; //"RGB30" is currently broken; use OpenGL 2.0 driver instead + if(_depth == 30) return {"RGB30", "RGB24"}; + if(_depth == 24) return {"RGB24"}; + return {"RGB24"}; //fallback + } + + auto setExclusive(bool exclusive) -> bool override { + return initialize(); } auto setContext(uintptr context) -> bool override { @@ -45,12 +52,12 @@ struct VideoGLX : VideoDriver, OpenGL { auto setFormat(string format) -> bool override { if(format == "RGB24") { OpenGL::inputFormat = GL_RGBA8; - return true; + return initialize(); } if(format == "RGB30") { OpenGL::inputFormat = GL_RGB10_A2; - return true; + return initialize(); } return false; @@ -66,6 +73,21 @@ struct VideoGLX : VideoDriver, OpenGL { if(_doubleBuffer) glXSwapBuffers(_display, _glXWindow); } + auto size(uint& width, uint& height) -> void override { + XWindowAttributes window; + XGetWindowAttributes(_display, _window, &window); + + XWindowAttributes parent; + XGetWindowAttributes(_display, _parent, &parent); + + if(window.width != parent.width || window.height != parent.height) { + XResizeWindow(_display, _window, parent.width, parent.height); + } + + width = parent.width; + height = parent.height; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { OpenGL::size(width, height); return OpenGL::lock(data, pitch); @@ -74,20 +96,14 @@ struct VideoGLX : VideoDriver, OpenGL { auto release() -> void override { } - auto output() -> void override { - //we must ensure that the child window is the same size as the parent window. - //unfortunately, we cannot hook the parent window resize event notification, - //as we did not create the parent window, nor have any knowledge of the toolkit used. - //therefore, inelegant as it may be, we query each window size and resize as needed. - XWindowAttributes parent, child; - XGetWindowAttributes(_display, (Window)self.context, &parent); - XGetWindowAttributes(_display, (Window)_window, &child); - if(child.width != parent.width || child.height != parent.height) { - XResizeWindow(_display, _window, parent.width, parent.height); - } + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); - OpenGL::outputWidth = parent.width; - OpenGL::outputHeight = parent.height; + OpenGL::absoluteWidth = width; + OpenGL::absoluteHeight = height; + OpenGL::outputWidth = windowWidth; + OpenGL::outputHeight = windowHeight; OpenGL::output(); if(_doubleBuffer) glXSwapBuffers(_display, _glXWindow); if(self.flush) glFinish(); @@ -106,20 +122,33 @@ struct VideoGLX : VideoDriver, OpenGL { } private: - auto initialize() -> bool { - terminate(); - if(!self.context) return false; - + auto construct() -> void { _display = XOpenDisplay(nullptr); _screen = DefaultScreen(_display); + XWindowAttributes attributes{}; + XGetWindowAttributes(_display, RootWindow(_display, _screen), &attributes); + _depth = attributes.depth; + } + + auto destruct() -> void { + terminate(); + + if(_display) { + XCloseDisplay(_display); + _display = nullptr; + _screen = 0; + } + } + + auto initialize() -> bool { + terminate(); + if(!self.exclusive && !self.context) return false; + //require GLX 1.2+ API glXQueryVersion(_display, &_versionMajor, &_versionMinor); if(_versionMajor < 1 || (_versionMajor == 1 && _versionMinor < 2)) return false; - XWindowAttributes windowAttributes; - XGetWindowAttributes(_display, (Window)self.context, &windowAttributes); - int redDepth = VideoDriver::format == "RGB30" ? 10 : 8; int greenDepth = VideoDriver::format == "RGB30" ? 10 : 8; int blueDepth = VideoDriver::format == "RGB30" ? 10 : 8; @@ -140,22 +169,27 @@ private: GLXFBConfig* fbConfig = glXChooseFBConfig(_display, _screen, attributeList, &fbCount); if(fbCount == 0) return false; - XVisualInfo* vi = glXGetVisualFromFBConfig(_display, fbConfig[0]); + auto visual = glXGetVisualFromFBConfig(_display, fbConfig[0]); + + _parent = self.exclusive ? RootWindow(_display, visual->screen) : (Window)self.context; + XWindowAttributes windowAttributes; + XGetWindowAttributes(_display, _parent, &windowAttributes); //(Window)self.context has already been realized, most likely with DefaultVisual. //GLX requires that the GL output window has the same Visual as the GLX context. //it is not possible to change the Visual of an already realized (created) window. //therefore a new child window, using the same GLX Visual, must be created and binded to it. - _colormap = XCreateColormap(_display, RootWindow(_display, vi->screen), vi->visual, AllocNone); - XSetWindowAttributes attributes = {}; - attributes.colormap = _colormap; + _colormap = XCreateColormap(_display, RootWindow(_display, visual->screen), visual->visual, AllocNone); + XSetWindowAttributes attributes{}; attributes.border_pixel = 0; - _window = XCreateWindow(_display, /* parent = */ (Window)self.context, - /* x = */ 0, /* y = */ 0, windowAttributes.width, windowAttributes.height, - /* border_width = */ 0, vi->depth, InputOutput, vi->visual, - CWColormap | CWBorderPixel, &attributes); + attributes.colormap = _colormap; + attributes.override_redirect = self.exclusive; + _window = XCreateWindow(_display, _parent, + 0, 0, windowAttributes.width, windowAttributes.height, + 0, visual->depth, InputOutput, visual->visual, + CWBorderPixel | CWColormap | CWOverrideRedirect, &attributes); XSelectInput(_display, _window, ExposureMask); - XSetWindowBackground(_display, _window, /* color = */ 0); + XSetWindowBackground(_display, _window, 0); XMapWindow(_display, _window); XFlush(_display); @@ -165,7 +199,7 @@ private: XNextEvent(_display, &event); } - _glXContext = glXCreateContext(_display, vi, /* sharelist = */ 0, /* direct = */ GL_TRUE); + _glXContext = glXCreateContext(_display, visual, 0, GL_TRUE); glXMakeCurrent(_display, _glXWindow = _window, _glXContext); //glXSwapInterval is used to toggle Vsync @@ -203,7 +237,7 @@ private: //read attributes of frame buffer for later use, as requested attributes from above are not always granted int value = 0; - glXGetConfig(_display, vi, GLX_DOUBLEBUFFER, &value); + glXGetConfig(_display, visual, GLX_DOUBLEBUFFER, &value); _doubleBuffer = value; _isDirect = glXIsDirect(_display, _glXContext); @@ -228,11 +262,6 @@ private: XFreeColormap(_display, _colormap); _colormap = 0; } - - if(_display) { - XCloseDisplay(_display); - _display = nullptr; - } } bool _ready = false; @@ -241,6 +270,8 @@ private: Display* _display = nullptr; int _screen = 0; + uint _depth = 24; //depth of the default root window + Window _parent = 0; Window _window = 0; Colormap _colormap = 0; GLXContext _glXContext = nullptr; diff --git a/ruby/video/glx2.cpp b/ruby/video/glx2.cpp index ff5a14b6..91ef46e2 100644 --- a/ruby/video/glx2.cpp +++ b/ruby/video/glx2.cpp @@ -23,8 +23,8 @@ struct VideoGLX2 : VideoDriver { VideoGLX2& self = *this; - VideoGLX2(Video& super) : VideoDriver(super) {} - ~VideoGLX2() { terminate(); } + VideoGLX2(Video& super) : VideoDriver(super) { construct(); } + ~VideoGLX2() { destruct(); } auto create() -> bool { super.setFormat("RGB24"); @@ -34,12 +34,22 @@ struct VideoGLX2 : VideoDriver { auto driver() -> string override { return "OpenGL 2.0"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasBlocking() -> bool override { return true; } auto hasFlush() -> bool override { return true; } - auto hasFormats() -> vector override { return {"RGB24", "RGB30"}; } auto hasShader() -> bool override { return true; } + auto hasFormats() -> vector override { + if(_depth == 30) return {"RGB30", "RGB24"}; + if(_depth == 24) return {"RGB24"}; + return {"RGB24"}; //fallback + } + + auto setExclusive(bool exclusive) -> bool override { + return initialize(); + } + auto setContext(uintptr context) -> bool override { return initialize(); } @@ -67,11 +77,6 @@ struct VideoGLX2 : VideoDriver { return true; } - auto configure(uint width, uint height, double inputFrequency, double outputFrequency) -> bool override { - XResizeWindow(_display, _window, width, height); - return true; - } - auto clear() -> void override { memory::fill(_glBuffer, _glWidth * _glHeight); glClearColor(0.0, 0.0, 0.0, 1.0); @@ -80,6 +85,21 @@ struct VideoGLX2 : VideoDriver { if(_isDoubleBuffered) glXSwapBuffers(_display, _glXWindow); } + auto size(uint& width, uint& height) -> void override { + XWindowAttributes window; + XGetWindowAttributes(_display, _window, &window); + + XWindowAttributes parent; + XGetWindowAttributes(_display, _parent, &parent); + + if(window.width != parent.width || window.height != parent.height) { + XResizeWindow(_display, _window, parent.width, parent.height); + } + + width = parent.width; + height = parent.height; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { if(width != _width || height != _height) resize(width, height); pitch = _glWidth * sizeof(uint32_t); @@ -89,7 +109,15 @@ struct VideoGLX2 : VideoDriver { auto release() -> void override { } - auto output() -> void override { + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); + + if(!width) width = windowWidth; + if(!height) height = windowHeight; + int x = ((int)windowWidth - (int)width) / 2; + int y = ((int)windowHeight - (int)height) / 2; + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, self.shader == "Blur" ? GL_LINEAR : GL_NEAREST); @@ -97,8 +125,8 @@ struct VideoGLX2 : VideoDriver { glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glOrtho(0, self.width, 0, self.height, -1.0, 1.0); - glViewport(0, 0, self.width, self.height); + glOrtho(0, windowWidth, 0, windowHeight, -1.0, 1.0); + glViewport(x, y, width, height); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -107,8 +135,8 @@ struct VideoGLX2 : VideoDriver { double w = (double)_width / (double)_glWidth; double h = (double)_height / (double)_glHeight; - int u = self.width; - int v = self.height; + int u = windowWidth; + int v = windowHeight; glBegin(GL_TRIANGLE_STRIP); glTexCoord2f(0, 0); glVertex3i(0, v, 0); @@ -135,20 +163,33 @@ struct VideoGLX2 : VideoDriver { } private: - auto initialize() -> bool { - terminate(); - if(!self.context) return false; - + auto construct() -> void { _display = XOpenDisplay(nullptr); _screen = DefaultScreen(_display); + XWindowAttributes attributes{}; + XGetWindowAttributes(_display, RootWindow(_display, _screen), &attributes); + _depth = attributes.depth; + } + + auto destruct() -> void { + terminate(); + + if(_display) { + XCloseDisplay(_display); + _display = nullptr; + _screen = 0; + } + } + + auto initialize() -> bool { + terminate(); + if(!self.exclusive && !self.context) return false; + int versionMajor = 0, versionMinor = 0; glXQueryVersion(_display, &versionMajor, &versionMinor); if(versionMajor < 1 || (versionMajor == 1 && versionMinor < 2)) return false; - XWindowAttributes windowAttributes; - XGetWindowAttributes(_display, (Window)self.context, &windowAttributes); - int redDepth = self.format == "RGB30" ? 10 : 8; int greenDepth = self.format == "RGB30" ? 10 : 8; int blueDepth = self.format == "RGB30" ? 10 : 8; @@ -167,13 +208,21 @@ private: auto fbConfig = glXChooseFBConfig(_display, _screen, attributeList, &fbCount); if(fbCount == 0) return false; - auto vi = glXGetVisualFromFBConfig(_display, fbConfig[0]); - _colormap = XCreateColormap(_display, RootWindow(_display, vi->screen), vi->visual, AllocNone); - XSetWindowAttributes attributes = {}; - attributes.colormap = _colormap; + auto visual = glXGetVisualFromFBConfig(_display, fbConfig[0]); + + _parent = self.exclusive ? RootWindow(_display, visual->screen) : (Window)self.context; + XWindowAttributes windowAttributes; + XGetWindowAttributes(_display, _parent, &windowAttributes); + + _colormap = XCreateColormap(_display, RootWindow(_display, visual->screen), visual->visual, AllocNone); + XSetWindowAttributes attributes{}; attributes.border_pixel = 0; - _window = XCreateWindow(_display, (Window)self.context, 0, 0, windowAttributes.width, windowAttributes.height, - 0, vi->depth, InputOutput, vi->visual, CWColormap | CWBorderPixel, &attributes); + attributes.colormap = _colormap; + attributes.override_redirect = self.exclusive; + _window = XCreateWindow(_display, _parent, + 0, 0, windowAttributes.width, windowAttributes.height, + 0, visual->depth, InputOutput, visual->visual, + CWBorderPixel | CWColormap | CWOverrideRedirect, &attributes); XSelectInput(_display, _window, ExposureMask); XSetWindowBackground(_display, _window, 0); XMapWindow(_display, _window); @@ -184,7 +233,7 @@ private: XNextEvent(_display, &event); } - _glXContext = glXCreateContext(_display, vi, 0, GL_TRUE); + _glXContext = glXCreateContext(_display, visual, 0, GL_TRUE); glXMakeCurrent(_display, _glXWindow = _window, _glXContext); if(!glXSwapInterval) glXSwapInterval = (int (*)(int))glGetProcAddress("glXSwapIntervalMESA"); @@ -193,7 +242,7 @@ private: if(glXSwapInterval) glXSwapInterval(self.blocking); int value = 0; - glXGetConfig(_display, vi, GLX_DOUBLEBUFFER, &value); + glXGetConfig(_display, visual, GLX_DOUBLEBUFFER, &value); _isDoubleBuffered = value; _isDirect = glXIsDirect(_display, _glXContext); @@ -240,11 +289,6 @@ private: XFreeColormap(_display, _colormap); _colormap = 0; } - - if(_display) { - XCloseDisplay(_display); - _display = nullptr; - } } auto resize(uint width, uint height) -> void { @@ -267,6 +311,8 @@ private: Display* _display = nullptr; int _screen = 0; + uint _depth = 24; //depth of the default root window + Window _parent = 0; Window _window = 0; Colormap _colormap = 0; GLXContext _glXContext = nullptr; diff --git a/ruby/video/opengl/surface.hpp b/ruby/video/opengl/surface.hpp index 43892a77..6639a2df 100644 --- a/ruby/video/opengl/surface.hpp +++ b/ruby/video/opengl/surface.hpp @@ -60,7 +60,7 @@ auto OpenGLSurface::render(uint sourceWidth, uint sourceHeight, uint targetWidth }; GLfloat modelViewProjection[4 * 4]; - Matrix::Multiply(modelViewProjection, modelView, 4, 4, projection, 4, 4); + MatrixMultiply(modelViewProjection, modelView, 4, 4, projection, 4, 4); GLfloat vertices[] = { 0, 0, 0, 1, @@ -71,7 +71,7 @@ auto OpenGLSurface::render(uint sourceWidth, uint sourceHeight, uint targetWidth GLfloat positions[4 * 4]; for(uint n = 0; n < 16; n += 4) { - Matrix::Multiply(&positions[n], &vertices[n], 1, 4, modelViewProjection, 4, 4); + MatrixMultiply(&positions[n], &vertices[n], 1, 4, modelViewProjection, 4, 4); } GLfloat texCoords[] = { diff --git a/ruby/video/video.cpp b/ruby/video/video.cpp index 0b4f3383..c2456a0f 100644 --- a/ruby/video/video.cpp +++ b/ruby/video/video.cpp @@ -80,18 +80,16 @@ auto Video::setShader(string shader) -> bool { // -auto Video::configure(uint width, uint height, double inputFrequency, double outputFrequency) -> bool { - instance->width = width; - instance->height = height; - instance->inputFrequency = inputFrequency; - instance->outputFrequency = outputFrequency; - return instance->configure(width, height, inputFrequency, outputFrequency); -} - auto Video::clear() -> void { return instance->clear(); } +auto Video::size() -> Size { + Size result; + instance->size(result.width, result.height); + return result; +} + auto Video::acquire(uint width, uint height) -> Acquire { Acquire result; if(instance->acquire(result.data, result.pitch, width, height)) return result; @@ -102,8 +100,8 @@ auto Video::release() -> void { return instance->release(); } -auto Video::output() -> void { - return instance->output(); +auto Video::output(uint width, uint height) -> void { + return instance->output(width, height); } auto Video::poll() -> void { diff --git a/ruby/video/video.hpp b/ruby/video/video.hpp index 574bc0f1..7b7d2e74 100644 --- a/ruby/video/video.hpp +++ b/ruby/video/video.hpp @@ -24,11 +24,11 @@ struct VideoDriver { virtual auto setFormat(string format) -> bool { return true; } virtual auto setShader(string shader) -> bool { return true; } - virtual auto configure(uint width, uint height, double inputFrequency, double outputFrequency) -> bool { return true; } virtual auto clear() -> void {} + virtual auto size(uint& width, uint& height) -> void {} virtual auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool { return false; } virtual auto release() -> void {} - virtual auto output() -> void {} + virtual auto output(uint width = 0, uint height = 0) -> void {} virtual auto poll() -> void {} protected: @@ -41,11 +41,6 @@ protected: bool flush = false; string format = "RGB24"; string shader = "Blur"; - - uint width = 0; - uint height = 0; - double inputFrequency = 0.0; - double outputFrequency = 0.0; }; struct Video { @@ -84,8 +79,12 @@ struct Video { auto setFormat(string format) -> bool; auto setShader(string shader) -> bool; - auto configure(uint width, uint height, double inputFrequency, double outputFrequency) -> bool; auto clear() -> void; + struct Size { + uint width = 0; + uint height = 0; + }; + auto size() -> Size; struct Acquire { explicit operator bool() const { return data; } uint32_t* data = nullptr; @@ -93,7 +92,7 @@ struct Video { }; auto acquire(uint width, uint height) -> Acquire; auto release() -> void; - auto output() -> void; + auto output(uint width = 0, uint height = 0) -> void; auto poll() -> void; auto onUpdate(const function&) -> void; diff --git a/ruby/video/wgl.cpp b/ruby/video/wgl.cpp index cbaf20c0..85c6f5b2 100644 --- a/ruby/video/wgl.cpp +++ b/ruby/video/wgl.cpp @@ -3,10 +3,14 @@ #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +static LRESULT CALLBACK VideoOpenGL32_WindowProcedure(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { + return DefWindowProc(hwnd, msg, wparam, lparam); +} + struct VideoWGL : VideoDriver, OpenGL { VideoWGL& self = *this; - VideoWGL(Video& super) : VideoDriver(super) {} - ~VideoWGL() { terminate(); } + VideoWGL(Video& super) : VideoDriver(super) { construct(); } + ~VideoWGL() { destruct(); } auto create() -> bool override { return initialize(); @@ -15,11 +19,16 @@ struct VideoWGL : VideoDriver, OpenGL { auto driver() -> string override { return "OpenGL 3.2"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasBlocking() -> bool override { return true; } auto hasFlush() -> bool override { return true; } auto hasShader() -> bool override { return true; } + auto setExclusive(bool exclusive) -> bool override { + return initialize(); + } + auto setContext(uintptr context) -> bool override { return initialize(); } @@ -43,6 +52,13 @@ struct VideoWGL : VideoDriver, OpenGL { SwapBuffers(_display); } + auto size(uint& width, uint& height) -> void { + RECT rectangle; + GetClientRect(_context, &rectangle); + width = rectangle.right - rectangle.left; + height = rectangle.bottom - rectangle.top; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { OpenGL::size(width, height); return OpenGL::lock(data, pitch); @@ -51,28 +67,65 @@ struct VideoWGL : VideoDriver, OpenGL { auto release() -> void override { } - auto output() -> void override { - RECT rectangle; - GetClientRect((HWND)self.context, &rectangle); - OpenGL::outputWidth = rectangle.right - rectangle.left; - OpenGL::outputHeight = rectangle.bottom - rectangle.top; + auto output(uint width, uint height) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); + OpenGL::absoluteWidth = width; + OpenGL::absoluteHeight = height; + OpenGL::outputWidth = windowWidth; + OpenGL::outputHeight = windowHeight; OpenGL::output(); SwapBuffers(_display); if(self.flush) glFinish(); } private: + auto construct() -> void { + WNDCLASS windowClass{}; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + windowClass.hCursor = LoadCursor(0, IDC_ARROW); + windowClass.hIcon = LoadIcon(nullptr, IDI_APPLICATION); + windowClass.hInstance = GetModuleHandle(0); + windowClass.lpfnWndProc = VideoOpenGL32_WindowProcedure; + windowClass.lpszClassName = L"VideoOpenGL32_Window"; + windowClass.lpszMenuName = 0; + windowClass.style = CS_HREDRAW | CS_VREDRAW; + RegisterClass(&windowClass); + } + + auto destruct() -> void { + terminate(); + } + auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; - PIXELFORMATDESCRIPTOR descriptor = {}; + POINT point{0, 0}; + HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY); + MONITORINFOEX information{}; + information.cbSize = sizeof(MONITORINFOEX); + GetMonitorInfo(monitor, &information); + _monitorWidth = information.rcMonitor.right - information.rcMonitor.left; + _monitorHeight = information.rcMonitor.bottom - information.rcMonitor.top; + + if(self.exclusive) { + _context = _exclusive = CreateWindowEx(WS_EX_TOPMOST, L"VideoOpenGL32_Window", L"", WS_VISIBLE | WS_POPUP, + information.rcMonitor.left, information.rcMonitor.top, _monitorWidth, _monitorHeight, + nullptr, nullptr, GetModuleHandle(0), nullptr); + } else { + _context = (HWND)self.context; + } + + PIXELFORMATDESCRIPTOR descriptor{}; descriptor.nSize = sizeof(PIXELFORMATDESCRIPTOR); descriptor.nVersion = 1; descriptor.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; descriptor.iPixelType = PFD_TYPE_RGBA; - _display = GetDC((HWND)self.context); + _display = GetDC(_context); GLuint pixelFormat = ChoosePixelFormat(_display, &descriptor); SetPixelFormat(_display, pixelFormat, &descriptor); @@ -108,6 +161,13 @@ private: wglDeleteContext(_wglContext); _wglContext = nullptr; } + + if(_exclusive) { + DestroyWindow(_exclusive); + _exclusive = nullptr; + } + + _context = nullptr; } auto (APIENTRY* wglCreateContextAttribs)(HDC, HGLRC, const int*) -> HGLRC = nullptr; @@ -115,6 +175,11 @@ private: bool _ready = false; + uint _monitorWidth = 0; + uint _monitorHeight = 0; + + HWND _exclusive = nullptr; + HWND _context = nullptr; HDC _display = nullptr; HGLRC _wglContext = nullptr; HINSTANCE _glWindow = nullptr; diff --git a/ruby/video/xshm.cpp b/ruby/video/xshm.cpp index 3d0b7676..a19607b7 100644 --- a/ruby/video/xshm.cpp +++ b/ruby/video/xshm.cpp @@ -20,33 +20,16 @@ struct VideoXShm : VideoDriver { auto driver() -> string override { return "XShm"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasShader() -> bool override { return true; } auto hasFormats() -> vector override { return {"RGB24"}; } + auto setExclusive(bool exclusive) -> bool override { return initialize(); } auto setContext(uintptr context) -> bool override { return initialize(); } auto setShader(string shader) -> bool override { return true; } - auto configure(uint width, uint height, double inputFrequency, double outputFrequency) -> bool override { - if(width == _outputWidth && height == _outputHeight) return true; - - _outputWidth = width; - _outputHeight = height; - XResizeWindow(_display, _window, _outputWidth, _outputHeight); - free(); - - _shmInfo.shmid = shmget(IPC_PRIVATE, _outputWidth * _outputHeight * sizeof(uint32_t), IPC_CREAT | 0777); - if(_shmInfo.shmid < 0) return false; - - _shmInfo.shmaddr = (char*)shmat(_shmInfo.shmid, 0, 0); - _shmInfo.readOnly = False; - XShmAttach(_display, &_shmInfo); - _outputBuffer = (uint32_t*)_shmInfo.shmaddr; - _image = XShmCreateImage(_display, _visual, _depth, ZPixmap, _shmInfo.shmaddr, &_shmInfo, _outputWidth, _outputHeight); - return (bool)_image; - } - auto clear() -> void override { auto dp = _inputBuffer; uint length = _inputWidth * _inputHeight; @@ -54,6 +37,24 @@ struct VideoXShm : VideoDriver { output(); } + auto size(uint& width, uint& height) -> void override { + XWindowAttributes window; + XGetWindowAttributes(_display, _window, &window); + + XWindowAttributes parent; + XGetWindowAttributes(_display, _parent, &parent); + + if(window.width != parent.width || window.height != parent.height) { + _outputWidth = parent.width; + _outputHeight = parent.height; + XResizeWindow(_display, _window, _outputWidth, _outputHeight); + allocate(); + } + + width = parent.width; + height = parent.height; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { if(!_inputBuffer || _inputWidth != width || _inputHeight != height) { if(_inputBuffer) delete[] _inputBuffer; @@ -70,25 +71,51 @@ struct VideoXShm : VideoDriver { auto release() -> void override { } - auto output() -> void override { - float xratio = (float)_inputWidth / (float)_outputWidth; - float yratio = (float)_inputHeight / (float)_outputHeight; + auto output(uint width = 0, uint height = 0) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); + if(!_image) return; + + if(!width) width = _outputWidth; + if(!height) height = _outputHeight; + + float xratio = (float)_inputWidth / (float)width; + float yratio = (float)_inputHeight / (float)height; + + int x = ((int)_outputWidth - (int)width) / 2; + int y = ((int)_outputHeight - (int)height) / 2; + + width = min(width, _outputWidth); + height = min(height, _outputHeight); + + auto inputBuffer = _inputBuffer; + auto outputBuffer = _outputBuffer; + + if(x < 0) { + inputBuffer += abs(x); + x = 0; + } + + if(y < 0) { + inputBuffer += abs(y) * _inputWidth; + y = 0; + } #pragma omp parallel for - for(uint y = 0; y < _outputHeight; y++) { + for(uint y = 0; y < height; y++) { float ystep = y * yratio; float xstep = 0; - uint32_t* sp = _inputBuffer + (uint)ystep * _inputWidth; - uint32_t* dp = _outputBuffer + y * _outputWidth; + uint32_t* sp = inputBuffer + (uint)ystep * _inputWidth; + uint32_t* dp = outputBuffer + y * _outputWidth; if(self.shader != "Blur") { - for(uint x = 0; x < _outputWidth; x++) { + for(uint x = 0; x < width; x++) { *dp++ = 255u << 24 | sp[(uint)xstep]; xstep += xratio; } } else { - for(uint x = 0; x < _outputWidth; x++) { + for(uint x = 0; x < width; x++) { *dp++ = 255u << 24 | interpolate(xstep - (uint)xstep, sp[(uint)xstep], sp[(uint)xstep + 1]); xstep += xratio; } @@ -96,7 +123,7 @@ struct VideoXShm : VideoDriver { } GC gc = XCreateGC(_display, _window, 0, 0); - XShmPutImage(_display, _window, gc, _image, 0, 0, 0, 0, _outputWidth, _outputHeight, False); + XShmPutImage(_display, _window, gc, _image, 0, 0, x, y, width, height, False); XFreeGC(_display, gc); XFlush(_display); } @@ -126,12 +153,16 @@ private: auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; - XWindowAttributes getAttributes{}; - XGetWindowAttributes(_display, (Window)self.context, &getAttributes); - _depth = getAttributes.depth; - _visual = getAttributes.visual; + _parent = self.exclusive ? RootWindow(_display, _screen) : (Window)self.context; + + XWindowAttributes windowAttributes{}; + XGetWindowAttributes(_display, _parent, &windowAttributes); + _outputWidth = windowAttributes.width; + _outputHeight = windowAttributes.height; + _depth = windowAttributes.depth; + _visual = windowAttributes.visual; //driver only supports 32-bit pixels //note that even on 15-bit and 16-bit displays, the window visual's depth should be 32 if(_depth < 24 || _depth > 32) { @@ -139,12 +170,15 @@ private: return false; } - XSetWindowAttributes setAttributes = {}; - setAttributes.border_pixel = 0; - _window = XCreateWindow(_display, (Window)self.context, - 0, 0, 256, 256, 0, - getAttributes.depth, InputOutput, getAttributes.visual, - CWBorderPixel, &setAttributes + _colormap = XCreateColormap(_display, _parent, _visual, AllocNone); + XSetWindowAttributes attributes{}; + attributes.border_pixel = 0; + attributes.colormap = _colormap; + attributes.override_redirect = self.exclusive; + _window = XCreateWindow(_display, _parent, + 0, 0, _outputWidth, _outputHeight, + 0, _depth, InputOutput, _visual, + CWBorderPixel | CWColormap | CWOverrideRedirect, &attributes ); XSelectInput(_display, _window, ExposureMask); XSetWindowBackground(_display, _window, 0); @@ -156,11 +190,30 @@ private: XNextEvent(_display, &event); } + allocate(); return _ready = true; } auto terminate() -> void { free(); + + if(_colormap) { + XFreeColormap(_display, _colormap); + _colormap = 0; + } + } + + auto allocate() -> void { + free(); + + _shmInfo.shmid = shmget(IPC_PRIVATE, _outputWidth * _outputHeight * sizeof(uint32_t), IPC_CREAT | 0777); + if(_shmInfo.shmid < 0) return; + + _shmInfo.shmaddr = (char*)shmat(_shmInfo.shmid, 0, 0); + _shmInfo.readOnly = False; + XShmAttach(_display, &_shmInfo); + _outputBuffer = (uint32_t*)_shmInfo.shmaddr; + _image = XShmCreateImage(_display, _visual, _depth, ZPixmap, _shmInfo.shmaddr, &_shmInfo, _outputWidth, _outputHeight); } auto free() -> void { @@ -198,7 +251,9 @@ private: int _screen = 0; int _depth = 0; Visual* _visual = nullptr; + Window _parent = 0; Window _window = 0; + Colormap _colormap = 0; XShmSegmentInfo _shmInfo; XImage* _image = nullptr; diff --git a/ruby/video/xvideo.cpp b/ruby/video/xvideo.cpp index 9fb7b3ae..bd441b14 100644 --- a/ruby/video/xvideo.cpp +++ b/ruby/video/xvideo.cpp @@ -19,6 +19,7 @@ struct VideoXVideo : VideoDriver { auto driver() -> string override { return "XVideo"; } auto ready() -> bool override { return _ready; } + auto hasExclusive() -> bool override { return true; } auto hasContext() -> bool override { return true; } auto hasBlocking() -> bool override { return true; } @@ -26,6 +27,10 @@ struct VideoXVideo : VideoDriver { return _formatNames; } + auto setExclusive(bool exclusive) -> bool override { + return initialize(); + } + auto setContext(uintptr context) -> bool override { return initialize(); } @@ -53,6 +58,21 @@ struct VideoXVideo : VideoDriver { output(); } + auto size(uint& width, uint& height) -> void override { + XWindowAttributes window; + XGetWindowAttributes(_display, _window, &window); + + XWindowAttributes parent; + XGetWindowAttributes(_display, _parent, &parent); + + if(window.width != parent.width || window.height != parent.height) { + XResizeWindow(_display, _window, parent.width, parent.height); + } + + width = parent.width; + height = parent.height; + } + auto acquire(uint32_t*& data, uint& pitch, uint width, uint height) -> bool override { if(width != _width || height != _height) resize(_width = width, _height = height); pitch = _bufferWidth * 4; @@ -62,22 +82,9 @@ struct VideoXVideo : VideoDriver { auto release() -> void override { } - auto output() -> void override { - XWindowAttributes target; - XGetWindowAttributes(_display, _window, &target); - - //we must ensure that the child window is the same size as the parent window. - //unfortunately, we cannot hook the parent window resize event notification, - //as we did not create the parent window, nor have any knowledge of the toolkit used. - //therefore, query each window size and resize as needed. - XWindowAttributes parent; - XGetWindowAttributes(_display, (Window)self.context, &parent); - if(target.width != parent.width || target.height != parent.height) { - XResizeWindow(_display, _window, parent.width, parent.height); - } - - //update target width and height attributes - XGetWindowAttributes(_display, _window, &target); + auto output(uint width = 0, uint height = 0) -> void override { + uint windowWidth, windowHeight; + size(windowWidth, windowHeight); auto& name = _formatName; if(name == "RGB24" ) renderRGB24 (_width, _height); @@ -89,9 +96,14 @@ struct VideoXVideo : VideoDriver { if(name == "YV12" ) renderYV12 (_width, _height); if(name == "I420" ) renderI420 (_width, _height); + if(!width) width = windowWidth; + if(!height) height = windowHeight; + int x = (windowWidth - width) / 2; + int y = (windowHeight - height) / 2; + XvShmPutImage(_display, _port, _window, _gc, _image, 0, 0, _width, _height, - 0, 0, target.width, target.height, + x, y, width, height, true); } @@ -110,9 +122,10 @@ struct VideoXVideo : VideoDriver { private: auto initialize() -> bool { terminate(); - if(!self.context) return false; + if(!self.exclusive && !self.context) return false; _display = XOpenDisplay(nullptr); + _screen = DefaultScreen(_display); if(!XShmQueryExtension(_display)) { print("XVideo: XShm extension not found.\n"); @@ -143,15 +156,9 @@ private: return false; } - //create child window to attach to parent window. - //this is so that even if parent window visual depth doesn't match Xv visual - //(common with composited windows), Xv can still render to child window. - XWindowAttributes windowAttributes; - XGetWindowAttributes(_display, (Window)self.context, &windowAttributes); - XVisualInfo visualTemplate; visualTemplate.visualid = visualID; - visualTemplate.screen = DefaultScreen(_display); + visualTemplate.screen = _screen; visualTemplate.depth = depth; visualTemplate.visual = 0; int visualMatches = 0; @@ -162,17 +169,25 @@ private: return false; } - _colormap = XCreateColormap(_display, (Window)self.context, visualInfo->visual, AllocNone); - XSetWindowAttributes attributes = {}; - attributes.colormap = _colormap; + _parent = self.exclusive ? RootWindow(_display, _screen) : (Window)self.context; + //create child window to attach to parent window. + //this is so that even if parent window visual depth doesn't match Xv visual + //(common with composited windows), Xv can still render to child window. + XWindowAttributes windowAttributes; + XGetWindowAttributes(_display, _parent, &windowAttributes); + + _colormap = XCreateColormap(_display, _parent, visualInfo->visual, AllocNone); + XSetWindowAttributes attributes{}; attributes.border_pixel = 0; - _window = XCreateWindow(_display, /* parent = */ (Window)self.context, - /* x = */ 0, /* y = */ 0, windowAttributes.width, windowAttributes.height, - /* border_width = */ 0, depth, InputOutput, visualInfo->visual, - CWColormap | CWBorderPixel | CWEventMask, &attributes); + attributes.colormap = _colormap; + attributes.override_redirect = self.exclusive; + _window = XCreateWindow(_display, _parent, + 0, 0, windowAttributes.width, windowAttributes.height, + 0, depth, InputOutput, visualInfo->visual, + CWBorderPixel | CWColormap | CWOverrideRedirect, &attributes); XSelectInput(_display, _window, ExposureMask); XFree(visualInfo); - XSetWindowBackground(_display, _window, /* color = */ 0); + XSetWindowBackground(_display, _window, 0); XMapWindow(_display, _window); _gc = XCreateGC(_display, _window, 0, 0); @@ -500,7 +515,9 @@ private: uint8_t* _vtable = nullptr; Display* _display = nullptr; + int _screen = 0; GC _gc = 0; + Window _parent = 0; Window _window = 0; Colormap _colormap = 0; XShmSegmentInfo _shmInfo; diff --git a/sourcery/sourcery.cpp b/sourcery/sourcery.cpp index ccd918db..ba8e04e5 100644 --- a/sourcery/sourcery.cpp +++ b/sourcery/sourcery.cpp @@ -59,22 +59,6 @@ auto Sourcery::parse(Markup::Node& root) -> void { }); if(buffer.size() & 31) source.print("\n"); source.print("};\n"); - } else if(node.name() == "string") { - string filename{pathname, node["file"].text()}; - if(!file::exists(filename)) { - print("warning: string file ", node["file"].text(), " not found\n"); - continue; - } - auto buffer = file::read(filename); - header.print("extern const char ", node["name"].text(), "[", buffer.size() + 1, "];\n"); - source.print("const char ", node["name"].text(), "[", buffer.size() + 1, "] = {\n"); - buffer.foreach([&](uint offset, uint8_t data) { - if((offset & 31) == 0) source.print(" "); - source.print(data, ","); - if((offset & 31) == 31) source.print("\n"); - }); - if(buffer.size() & 31) source.print("\n"); - source.print("};\n"); } } }