nesdev.com
http://forums.nesdev.com/

VS. Duck Hunt zapper not responding properly [SOLVED]
http://forums.nesdev.com/viewtopic.php?f=3&t=14419
Page 3 of 3

Author:  lidnariq [ Tue Jun 28, 2016 4:51 pm ]
Post subject:  Re: VS. Duck Hunt zapper not responding properly

zeroone wrote:
It looks like it positions sprite0 in the middle of the first scanline.
That's not what I'm seeing in Nintendulator (There sprite 0 is at Y=$EE on both black and white frames)

Author:  zeroone [ Tue Jun 28, 2016 5:00 pm ]
Post subject:  Re: VS. Duck Hunt zapper not responding properly

tepples wrote:
How well does your emulator handle Zap Ruder (which uses a normal D4/D3 Zapper, not the Vs. Zapper)? It also uses sprite 0 at the top and counts scanlines to determine. If I had a Zapper modified to also speak Vs. protocol, I might be able to help you by making a test ROM.


Zap Ruder appears to work perfectly. It's unfortunate there is no VS Zapper version of it.

Author:  zeroone [ Tue Jun 28, 2016 5:07 pm ]
Post subject:  Re: VS. Duck Hunt zapper not responding properly

lidnariq wrote:
zeroone wrote:
It looks like it positions sprite0 in the middle of the first scanline.
That's not what I'm seeing in Nintendulator (There sprite 0 is at Y=$EE on both black and white frames)


I think you just revealed the issue. Apparently there is a flaw in my PPU implementation. It is reporting a sprite0 hit on the pre-render scanline (scanline -1). I put in a check to prevent that and now it detects it on scanline 239 ($EF). More importantly, the game works now!

It's really amazing that this flaw was not revealed in any other games. That's nuts. I'll study my code further to understand how this happened. Thanks so much everyone.

Edit: That solves the issue with VS Hogan's Alley also. And, it didn't break Battletoads or the Simpsons HUD, etc. Interesting.

Edit 2: The unlicensed game Lethal Weapon (Ch) [U][!].unf still does not work. But, it doesn't work correctly in Nestopia either. So, I can live with that.

Edit 3: Thanks again everyone. This change did not affect the test ROM results either. I'm still amazed that this issue wasn't detected until now.

Page 3 of 3 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/