lidnariq wrote:Memblers wrote:It would be, but the Game Genie does have some bugs [...] I actually made a build of ROM that fixes those bugs
Does it also restore the pulse sweep registers to power-on default, so that it doesn't do the weird thing with e.g. Megaman
mumblemumble ?
Yeah, I fixed that. I also changed $0D in the palette to $0F, though that hardly seems to affect anyone. I also shortened the time that it waits after it initializes the chip, I'm not sure why it waits so long, like 10 frames, it doesn't even touch the ASIC again until you press start (or rather, release start, in this version).
I haven't yet tested blargg's bootloader that I put into it, not sure if I can duplicate his setup, so it's been put off until I write some PC-side software for it.
What's there to test? The original 256-byte bootloader schema seemed awfully bulletproof.
The untested part is how best to determine whether to run the bootloader (which has no time-out or way to escape), or the Game Genie. Initially I wanted to use the break condition (transmit state opposite of idle), but I found out that's not universally supported among USB adapters. Using the CTS line would be ideal, but I'm having trouble sourcing cheap USB adapters that break out the flow control signals. I found one that I like, but I don't know where to get them now.. suppliers that sold it before now just have ones that only have TX and RX. Plus I know at least a small number of people have built adapters using NES controller cables, that don't have wiring for the extra signals. So the method I have in there now, which is completely untested, sets OUT0 high (so it repeatedly reads the A button if there's a controller) and waits for some time while checking D0 to see if it's state ever changes. When that times out, it runs the usual Game Genie program. So in theory, the PC-side program when you trigger an upload, would continually send a $55 byte or something and hope the NES sees the bits coming in, then would send the actual bootload program after it hears something back from the NES (was hoping the bootloader's CRC error response is enough). Or the user can press the A button during that time and hose everything up, but that's a small trade-off. There very little memory left to play with, I optimized the original program to barely fit all that in, and any additional optimizations will be hard-won.