Glitch in SMB

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Glitch in SMB
by on (#169046)
Hi everybody

Most parts of my FPGA NES is done. Also a couple of Test-ROMs runs very well. But in SMB i have a glitch i can't explain. Anybody seen this glitch before and can push me in the right direction? The glitch only affects the HUD when a mobile platform (like in the video) or Mario is jumping through the HUD.

http://www.boxx-it.de/~cfruth/smb_glitch/

I have another question about the DMA of the DMC audio channel. I've read that the DMA waits up to 4 cycles for memory write to end. But why? I don't understand the waiting. Will it always wait 4 cycles? Will it wait for a cycle that want to read from memory to halt the cpu? Will the first read after a write haltet? Like a /INT-Signal waiting for the current opcode to complete? How do i have to imagine this magic is working?
Re: Glitch in SMB
by on (#169047)
How are you handling sprite zero hits? My guess is about that. It seems you're taking the first non-transparent pixel of sprite overlapping the background. It should be the sprite 0 pixel.
Re: Glitch in SMB
by on (#169051)
Heh, it does indeed look like any sprite is able to trigger a hit, but only sprite 0 should do it.
Re: Glitch in SMB
by on (#169067)
Hi guys

You're right. I tested for non-transparent pixel of first sprite in secondary OAM and not OAM *grmpf*
Added a flag if sprite 0 is in secondary OAM and it looks really good now. Thanx :-)
Re: Glitch in SMB
by on (#169080)
Feuerwerk42 wrote:
Added a flag if sprite 0 is in secondary OAM

Anyone remember what that flag was called in Visual 2C02?
Re: Glitch in SMB
by on (#169092)
Just looking through nodenames.js, read_2002_output_spr0_hit, spr0_hit, /spr0_hit, set_spr0_hit...
Re: Glitch in SMB
by on (#169721)
This is neat! Do you have any plans on sharing your HDL work?
Re: Glitch in SMB
by on (#169751)
Hi

Sure, i will add it to my GitHub-Account. Give me some days to change the commentary
to english and add a bit more *cough*

Greetings
Chris