Page 1 of 1

(solved) sprites not displaying on cart but OK on Emulator

Posted: Wed Sep 20, 2017 12:08 am
by lazerbeat
I have a little homebrew rom which displays a scrolling text background with some sprites in a star field in the background.

Image

This works fine on emulators I use but when I launch the program on my famicom with an everdrive n8 everything works fine except the sprites in the background aren't visible. I took screenshot from an emulator just to show the behavior.

Image

I have 2 famicoms and 2 everdrives, both with the most recent OS on and the behavior is the same on both carts and both famicoms. So I would assume it isn't a glitchy hardware issue. Does anyone have any ideas?

Thanks!

edit - I edited the title slightly to show it is solved.

Re: Some sprites not displaying on Everdrive but OK on Emula

Posted: Wed Sep 20, 2017 12:35 am
by lidnariq
The singular most common reason for sprites to not work on hardware is failing to do the DMA as the almost-first thing in your NMI.

And, in fact, trying running your demo in Nintendulator shows that DMA is being started at scanline 21 or 27, alternating every other NMI. You have to start your DMA by scanline 15 to be assured that the entire DMA will finish in time.

Re: Some sprites not displaying on Everdrive but OK on Emula

Posted: Wed Sep 20, 2017 3:54 am
by lazerbeat
lidnariq wrote:The singular most common reason for sprites to not work on hardware is failing to do the DMA as the almost-first thing in your NMI.

And, in fact, trying running your demo in Nintendulator shows that DMA is being started at scanline 21 or 27, alternating every other NMI. You have to start your DMA by scanline 15 to be assured that the entire DMA will finish in time.
Thank s very much for that! This is the first time I had run into an conflict between hardware and emu only versions of software. This is super handy to know.

Re: Some sprites not displaying on Everdrive but OK on Emula

Posted: Wed Sep 20, 2017 4:44 am
by Sour
lazerbeat wrote:Thank s very much for that! This is the first time I had run into an conflict between hardware and emu only versions of software. This is super handy to know.
FYI, you're also displaying uninitialized nametable memory on the screen, which probably can't be seen because of the Everdrive?
scrollnesmod.png

Re: (solved) sprites not displaying on cart but OK on Emulat

Posted: Wed Sep 20, 2017 6:48 am
by tokumaru
Another example of how inaccurate FCEUX can be. It's very forgiving of timing errors like this. I don't know if the "new PPU" is more accurate in this regard.

Re: (solved) sprites not displaying on cart but OK on Emulat

Posted: Wed Sep 20, 2017 10:24 am
by nesrocks
The same happened to me very recently viewtopic.php?f=3&t=16433