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

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

Post Reply
lazerbeat
Posts: 64
Joined: Tue Jul 09, 2013 7:13 am

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

Post by lazerbeat » Wed Sep 20, 2017 12:08 am

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.
Attachments
scrollnesmod.asm
(26.2 KiB) Downloaded 79 times
scrollnesmod.nes
(40.02 KiB) Downloaded 87 times
Last edited by lazerbeat on Wed Sep 20, 2017 3:55 am, edited 1 time in total.

lidnariq
Posts: 9500
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

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

Post by lidnariq » Wed Sep 20, 2017 12:35 am

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.

lazerbeat
Posts: 64
Joined: Tue Jul 09, 2013 7:13 am

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

Post by lazerbeat » Wed Sep 20, 2017 3:54 am

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.

Sour
Posts: 815
Joined: Sun Feb 07, 2016 6:16 pm

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

Post by Sour » Wed Sep 20, 2017 4:44 am

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

User avatar
tokumaru
Posts: 11755
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

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

Post by tokumaru » Wed Sep 20, 2017 6:48 am

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.

User avatar
nesrocks
Posts: 461
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

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

Post by nesrocks » Wed Sep 20, 2017 10:24 am

The same happened to me very recently viewtopic.php?f=3&t=16433
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!

Post Reply