I don't remember whether it's cleared or not, but it is updated in real time, and the checks against PPU::SLnum and PPU::Clockticks ensure that it will never attempt to read data that has not yet been rendered.zeroone wrote:@Quietust In the controller port write function below, does PPU::DrawArray contain prior frame pixel values within the region that has yet to be updated? Or, is PPU::DrawArray cleared between frames?
VS. Duck Hunt zapper not responding properly [SOLVED]
Moderator: Moderators
Re: VS. Duck Hunt zapper not responding properly
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: VS. Duck Hunt zapper not responding properly
I see that check in the code. Thanks.Quietust wrote:I don't remember whether it's cleared or not, but it is updated in real time, and the checks against PPU::SLnum and PPU::Clockticks ensure that it will never attempt to read data that has not yet been rendered.
Do the VS Zapper games have some sort of copy protection that prevents them from advancing beyond the player select screens?
Edit: The VS Zapper works correctly in VS Freedom Force and VS Gumshoe in my emulator. It fails to work properly in VS Duck Hunt and VS Hogan's Alley.
Re: VS. Duck Hunt zapper not responding properly
To get past the player-selection screen issue in my emulator, I started up the game in FCEUX and I copied CPU RAM $0000--$2000 from FCEUX to my emulator. Unfortunately, the VS Zapper still does not work during gameplay either. However, this suggests it is not a missing copy protection feature.
Since my VS Zapper implementation works in VS Freedom Force and VS Gumshoe, it could be some sort of timing issue in VS Duck Hunt. But, it's really strange that normal Duck Hunt works just fine.
I'm open to suggestions on things I can try. Thanks.
Since my VS Zapper implementation works in VS Freedom Force and VS Gumshoe, it could be some sort of timing issue in VS Duck Hunt. But, it's really strange that normal Duck Hunt works just fine.
I'm open to suggestions on things I can try. Thanks.
Re: VS. Duck Hunt zapper not responding properly
I'm not familiar with the nes side of stuff, I am familiar with the VS side of things.
If this stuff has already been covered then you can skip it.
Vs Hogans alley and vs duck hunt do the gun check, which is just a ground loop.
Freedom force and gumshoe dont look for it... They will work with or without the ground loop.
Vs gun is also connected to the player 1 controls on the real cab. Taking place of the joystick and ect.
So its programed differently.
Just like i can split up the nes rom of wildgunman and put it on an actual vs pcb, the game will physically run, but the gun does nothing. The code isnt the same for location of gun.
If this stuff has already been covered then you can skip it.
Vs Hogans alley and vs duck hunt do the gun check, which is just a ground loop.
Freedom force and gumshoe dont look for it... They will work with or without the ground loop.
Vs gun is also connected to the player 1 controls on the real cab. Taking place of the joystick and ect.
So its programed differently.
Just like i can split up the nes rom of wildgunman and put it on an actual vs pcb, the game will physically run, but the gun does nothing. The code isnt the same for location of gun.
Re: VS. Duck Hunt zapper not responding properly
This is new to me. Can you describe the gun check in more detail? What does the ground loop mean in terms of data made available to the controller port?pc-10.com wrote:I'm not familiar with the nes side of stuff, I am familiar with the VS side of things.
If this stuff has already been covered then you can skip it.
Vs Hogans alley and vs duck hunt do the gun check, which is just a ground loop.
Freedom force and gumshoe dont look for it... They will work with or without the ground loop.
Vs gun is also connected to the player 1 controls on the real cab. Taking place of the joystick and ect.
So its programed differently.
Just like i can split up the nes rom of wildgunman and put it on an actual vs pcb, the game will physically run, but the gun does nothing. The code isnt the same for location of gun.
Re: VS. Duck Hunt zapper not responding properly
Is it possible that the game is making sure that no light is being sensed on a black frame, and you're still turning the light sensed output on despite pointing at black pixels?
Re: VS. Duck Hunt zapper not responding properly
I added logging to my emulator to see when the game was probing the controller ports. On the black frame, it probes once per scanline (8 reads to transfer the byte serially). Each of those probes indicates no light sensed. On the successive white frame, it doesn't do any probing. If it wasn't satisfied with the black frame, why does it even display the white frame? The white frame is followed by a second black frame. No scanline probing takes place in that frame either.lidnariq wrote:Is it possible that the game is making sure that no light is being sensed on a black frame, and you're still turning the light sensed output on despite pointing at black pixels?
Since the VS Zapper works perfectly in 2 of the 4 VS Zapper games, these 2 are doing some check that my emulator is failing to completely satisfy.
Re: VS. Duck Hunt zapper not responding properly
Its a literal ground. The "alarm" ties to ground. That wire would translate to player one up on joystick, in the wiring schematic of a vs cab. Right is trigger, left is hit.
Re: VS. Duck Hunt zapper not responding properly
I just checked on my cab, if no gun is installed, pressing up on the player 1 joystick closes the circuit and the gun alarm doesnt sound. As soon as i let it go the alarm sounds. So player 1 up needs to be tied to ground to shut down alarm.....
Re: VS. Duck Hunt zapper not responding properly
This is mentioned on the wiki. I'll check if there is an audible alarm in my emulator if that bit is left unset...pc-10.com wrote:I just checked on my cab, if no gun is installed, pressing up on the player 1 joystick closes the circuit and the gun alarm doesnt sound. As soon as i let it go the alarm sounds. So player 1 up needs to be tied to ground to shut down alarm.....
Edit: VS Duck Hunt and VS Hogan's Alley make an annoying audible ringing tone on the title screen if the UP bit is not set. Apparently, the implementation is missing something else.
Re: VS. Duck Hunt zapper not responding properly
I made a tiny configuration file for clever-disasm to have a go at Vs. Duck Hunt:
[/size]
I find the following, three of the four times that CheckLight is called: How's your sprite 0 hits?
Code: Select all
JumpTableRoutineWithAppendix $05B3
CertainlyCode $00A0
CertainlyCode $012B
CertainlyData $60F0
CertainlyCode $04D5 PollJoys
CertainlyCode $293C CheckLight
CertainlyCode $2938 CheckTrigger
I find the following, three of the four times that CheckLight is called:
Code: Select all
- $A80E AD 02 20: lda $2002
$A811 29 40: and #$40
$A813 D0 09: bne + ; $A81E
$A815 20 3C A9: jsr CheckLight
Re: VS. Duck Hunt zapper not responding properly
Debugging in my emulator reveals that it does reach $A81E when you pull the trigger on the player-selection screen; the sprite0 hit was detected. In fact, it breaks there twice when you pull the trigger, once on the black screen and once on the white screen.
Also, from debugging in FCEUX, the $A81E code does not appear to be used while the game is running. It's only used in the player-selection screen.
And, I put in some test code to force a sprite0 hit on the first scanline just in case my debugger was lying or something. That did not enable it to pass the player-selection screen.
Something else is going on. Thanks for your help lidnariq. I'm also trying to decipher the source.
Also, from debugging in FCEUX, the $A81E code does not appear to be used while the game is running. It's only used in the player-selection screen.
And, I put in some test code to force a sprite0 hit on the first scanline just in case my debugger was lying or something. That did not enable it to pass the player-selection screen.
Something else is going on. Thanks for your help lidnariq. I'm also trying to decipher the source.
Re: VS. Duck Hunt zapper not responding properly
That's backwards ... at least I think it's backwards? It looks like it's only checking for light until the sprite 0 hit.zeroone wrote:And, I put in some test code to force a sprite0 hit on the first scanline just in case my debugger was lying or something. That did not enable it to pass the player-selection screen.
The other identical fragments are at $A82C and $A867. The last one is similar, now that I look at it more closely, just structured differently. And at $A886.
Re: VS. Duck Hunt zapper not responding properly
It looks like it positions sprite0 in the middle of the first scanline. I assume that enables it to subsequently check each successive scanline for a light/dark hit.lidnariq wrote:That's backwards ... at least I think it's backwards? It looks like it's only checking for light until the sprite 0 hit.
The other identical fragments are at $A82C and $A867. The last one is similar, now that I look at it more closely, just structured differently. And at $A886.
I'm willing to run any test that you can propose. This one is a real mystery.
Re: VS. Duck Hunt zapper not responding properly
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.