Myself086 / Project-Nested

MIT License
493 stars 17 forks source link

Gamegenie codes for nes games on snes?? #53

Closed johneymute closed 2 years ago

johneymute commented 2 years ago

I know that it isn’t worth to convert the nes gamegenie rom into snes format since it works differently and since it also only uses letters,and since theres also no way to link it to a nes rom, but there might be a way to get around that despite the snes gamegenie does use both letters and number rather then only letters on the nes version,sothat while theres normally no way to use those codes on the snes,BUT i was thinking and do wonder what if those nes gamegenie codes can be translated into those corresponding codes for the snes version of the gamegenie sothat you can have infinitive lives or unlimited items in certain nes games on the snes because that would be awesome.

I know it’s easier said then done and it is something that should be done by a homebrewer to to translate those nes letters to those corresponding snes letters and numbers because for what i do know that for example letter Y on the nes game genie might be a mix of letter B and numer 0 on the snes game giene while letter E on nes gamegenie might be a mix of letter D and number 9 on snes gamegenie etc,,, just to make some random example guesses,but the fact is that those letters on the nes gamegenie are correspondible to those combined numbers and letters on the snes gamegenie,so it should be possible but i can imagine that it will be a dounty task to do that but, So while it is not your job for translating all nes gamegenie codes into snes gamegenie codes also since you are way to buzzy with nested 1,5, but i am sooo curious what you and others might think about this idea.

Myself086 commented 2 years ago

TL;DR. I only read the title.

Click the "Edit patches" at the top. Patches accept 3 different address formats. Use whichever one you prefer.

Here's how to decode NES Game Genie codes: https://doc.kodewerx.org/hacking_nes.html#gamegenie

The Game Genie code doesn't know the bank number but Project Nested does. An 8-character Game Genie code will contain the value expected at the given address but Project Nested doesn't. Use a hex editor like HxD to find the correct bank and that's your address. Don't forget to add 0x10 to the NES address when viewing it in a hex editor because the file contains a 16 bytes header.

You can read about mappers here: https://www.nesdev.org/wiki/Mapper Make sure you understand how large a PRG ROM bank is for the given mapper. For example, MMC1 has 16KB banks so you'll need to make 16KB (16384 bytes) jumps in your search for the correct value.

Example: our code writes $00 to address $8123 if it's equal to $FF on MMC1 (16KB banks).

Good luck :D

Myself086 commented 2 years ago

Added for upcoming version. You will be able to add them where you edit patches.

The logic behind 6 character codes is very similar to how I handle patches while the 8 character codes are compatible to how I copy the PRG ROM data multiple times to fill 32KB. It didn't take long to get them working.