Sprite Corruption

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Sprite Corruption
by on (#16822)
Back when I put together my breadboard version of an UNROM board, I would tend to get some graphical corruption sometimes. Games would generally start out fine, but once you played them for a few minutes, some would start to get corrupted sprites. And only sprites, mind you. The background was always fine. Not all sprites even got corrupted, either. Sometimes just certain ones in particular, which was odd. I chalked this up to somehow being the wiring, whether it be the lengths, or not-so-great connections in the breadboard, or what have you.

Well now that I have an actual cartridge UNROM board, I thought my problems were fixed. But earlier I was playing Dig Dug 2, only to find that seemingly the same corruption would happen to the player character in certain frames of animation after around a certain amount of time. This makes no sense at all to me. I never tried this game on the breadboard version, mind you, but it's the same phenomenon.

Dig Dug 2 of course isn't an UNROM game, but I've patched various NROM games to run on it properly by copying the CHR rom into video ram on startup, then switching back to the first 16k bank of the actual PRG and launching the game.

I'd like to think it's just my programming somehow, and is easily fixed, but like I mentioned, the games that have this problem usually start out fine, and this happens at some point during gameplay. Others have no problem whatsoever. And on my breadboard version, some native UNROM games would do this as well. Ducktales was particularly hateful about it. I haven't experienced it yet with any UNROM games on the actual cartridge, but if it's happening with the patched NROM ones, I'm left to believe it might happen to those as well.

So I really don't know what the deal is. I double-checked the cartridge in another NES just in case, and it's the same deal. Could these games be maybe accidently writing into the CHR rom space for some crazy reason?


EDIT: I tried Ducktales just to be sure, and it's fine on this board, oddly.

by on (#16825)
Try running the NES test program, I forget what the rom is 'officially' named but it was often cart.nes.

When I use my EPROM emulator I usually get a few corrupt sprites. Seems to be related to SPR-DMA rather than CHR memory. Having some series resistors of about 300 Ohms on the PRG data lines actually seems to fix it.