I ran into a strange problem with the emulator that I am developing: To make games work, I need to let the CPU run at least 250 times the number of cycles that it is suppose to run during the VBlank period. If I let the CPU run the expected number of cycles during VBlank, then the game logic runs correctly, but the graphics end up all messed up. It's almost as if it did not have enough time to do the tile memory copies or name table updates. By artificially extending VBlank with an extra 250 non-rendered lines, all the graphics work perfectly.
Any idea what could cause a strange effect like this?
Any idea what could cause a strange effect like this?