Battletoads hangs in my emulator when the toad one must enter level one. It hangs reading sprite zero hit, so i changed my code, and after that it seems to pass sprite zero hit, but it hangs again (this time the music is audible, but the screen is blank). any idea?
Does your emulator check for and report emulation problems (like encountering undefined CPU instructions)? Have you dumped an instruction trace (with disassembly) to find out whether it's hanging in a loop polling something, or executing random instructions?
The problem is that the first versions of my emulator had a fully futured debugger (like fceultra), but when my hard disk died and i had to start from scratch again it was some frustrating to make again those large arrays with opcode data, strings, etc.
But you mentioned it, when i check sprite zero hit with the low 2 bits of the bk chr and sprite chr, it hangs checking for 2002.6 to be "true", typically it uses a LDA and a BIT.
At the other side, when i check spr 0 hit with full colours values and the game only "plays the music" it get stuck in loop (its a large one and dubuggin it with VC++ its some frustrating, again) that i really dont know what the game wanna do. Neither its form part of an interruption routine this loop.
Well this "big post" is becouse if someone had some quickly idea of what was happening with the game.
But as you say blargg the best way is to have something that reports CPU state, so its easier to find the problem.
You could try setting sprite 0 hit at a fixed time within the frame, to rule out any problems with the pixel-comparison. As for CPU logging, I could send you a simple 6502 disassembler in C; you just call it with the opcode and operand values and it gives you a string of the disassembly.
if you have that debugger i will preciate it.