# NES hack for equal pieces?

Thread in 'Competition' started by wasmachstdugern, 28 Aug 2013.

1. ### Kasumi

D-D-D-Double Post: I think I got it.

990A: From $17 to$19
803A: From $FC to$17
82BF: From $FC to$17

Edit: These are NES CPU offsets, not ROM offsets.
Edit2: But nah, I didn't really get it. This makes the piece sequence super uneven. Only 2 Ls dealt after like 90 pieces. If anyone wants to write an FCEUX LUA script to compare piece sequences... that'd be cool.

For those curious about the theory behind it: The game seems to add the random seed ($17) to the number of pieces since power on ($1A) to get a new piece. So my change at $990A adds the last piece generated instead of the random seed. But how can we be sure the last piece generated is always the same from the title screen to the first game? #$00 is stored to \$FC every frame (in fact in one more place than I "fixed"), but this value is only written to the scroll. And... this game doesn't scroll as far as I know. So I made it store that zero to the random seed instead. *shrug* I could be talking out of my ass, though. I'm primarily a homebrew dev, and making new stuff is easier than trying to mess with stuff in assembled programs.

Edit3: If this needs to fit in a game genie code, maybe I give up. I can think of ways to do this, but they need more freedom. The theory I made above didn't notice the reroll stuff.

Last edited: 3 Nov 2013
2. ### Kitaru

Yeah, no worries. If we have access to a PowerPak, it'd be very doable and I could knock it out without too much trouble once I get set up with debugging tools again. If it's a Game Genie code it _might_ be possible, but it's going to take some pretty clever tricks to fit it in 3 bytes.