It is currently Thu Dec 14, 2017 10:16 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
PostPosted: Fri Jun 24, 2016 4:42 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1393
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?

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.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
PostPosted: Fri Jun 24, 2016 3:22 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


I see that check in the code. Thanks.

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.


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 6:51 am 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 1:50 pm 
Offline

Joined: Mon Apr 11, 2016 8:12 pm
Posts: 3
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.


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 2:33 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


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?


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 3:03 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6520
Location: Seattle
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?


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 3:16 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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?


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.

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.


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 3:21 pm 
Offline

Joined: Mon Apr 11, 2016 8:12 pm
Posts: 3
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.


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 3:24 pm 
Offline

Joined: Mon Apr 11, 2016 8:12 pm
Posts: 3
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.....


Top
 Profile  
 
PostPosted: Mon Jun 27, 2016 3:29 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.....


This is mentioned on the wiki. I'll check if there is an audible alarm in my emulator if that bit is left unset...

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.


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 2:07 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6520
Location: Seattle
I made a tiny configuration file for clever-disasm to have a go at Vs. Duck Hunt:
Code:
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:
-       $A80E  AD 02 20:    lda $2002
        $A811  29 40:       and #$40
        $A813  D0 09:       bne +               ; $A81E
        $A815  20 3C A9:    jsr CheckLight
How's your sprite 0 hits?


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 3:58 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 4:15 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6520
Location: Seattle
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.
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.


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 4:33 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 750
Location: New York, NY
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.


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.

I'm willing to run any test that you can propose. This one is a real mystery.


Top
 Profile  
 
PostPosted: Tue Jun 28, 2016 4:50 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19343
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group