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

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

Moderator: 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 »

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 131 times
scrollnesmod.nes
(40.02 KiB) Downloaded 138 times
Last edited by lazerbeat on Wed Sep 20, 2017 3:55 am, edited 1 time in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

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

Post 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.
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 »

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: 891
Joined: Sun Feb 07, 2016 6:16 pm

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

Post 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
User avatar
tokumaru
Posts: 12427
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 »

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: 563
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 »

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