satoshinm / nes-game-genie

Game Genie decoder/encoder for Nintendo Entertainment System (npmjs module)
https://satoshinm.github.io/nescode/
MIT License
4 stars 0 forks source link

It doesn't work with addresses above 8000 #4

Open 128Gigabytes opened 2 years ago

128Gigabytes commented 2 years ago

For example my game genie code for Mario Bros 2 is E410:02?09

But if I try and use E410 in the code converter it doesn't work

console.log(encodeGG(0xE410, 0x09, 0x02)) outputs: PAOVAGZE (which does not work and is E418:02?09) expected output: PAOTAGZE (which works and is E410:02?09)

console.log(decodeGG(encodeGG(0xE410, 0x09, 0x02)).address, 0xE410) outputs 25624, 58384 expected outputs, 58384, 58384