It is currently Tue Oct 17, 2017 12:00 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: VS Zapper info?
PostPosted: Wed Mar 13, 2013 8:45 am 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
Someone told me in another thread that the Zapper that is connected to the VS Unisystem works in a different way than "usual" Zappers.
I can't find any documentation about this (except the info I got in that thread). Have I missed something? I've checked the wiki but nothing.. :/

_________________
http://nes.goondocks.se/


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Wed Mar 13, 2013 10:19 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
I'm not sure it was ever formally documented - the information I posted was from my own implementation (which works), and I either got that from another emulator or by reverse-engineering the code behind it.

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


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Wed Mar 13, 2013 1:42 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
So the $4016/$4017 registers on the VS-system (Zapper) is read 1-bit at a time (sort of how the MMC1-mapper works?). 7th read returns "sense" and 8th read returns "trigger" (all on bit 0 of course?).

I'm trying to write a "VS-Zapper-emulator" for my experimental "Duck Hunt (VS)"-hack but there's something I'm doing wrong.. Perhaps I've misunderstod the above information?

Does the Zapper leaves some kind of identification on these registers when connected?

_________________
http://nes.goondocks.se/


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Wed Mar 13, 2013 2:15 pm 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6275
Location: Seattle
FCEU (yes, ancient) implements the Vs. System zapper as though it were a standard controller where
"start" is always pressed
"left" is whether the zapper is pointed at light
"right" is whether the trigger is pressed

For a de-VS-ifying patch to the ROM, I'd probably look for the place where the game has its joypad read function and replace that wholesale. (It appears to be at $84D5…$84F5)

edit: I am so good at 0-index vs 1-index.


Last edited by lidnariq on Wed Mar 13, 2013 10:32 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Wed Mar 13, 2013 9:06 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1389
lidnariq wrote:
FCEU (yes, ancient) implements the Vs. System zapper as though it were a standard controller where
"start" is always pressed
"left" is whether the zapper is pointed at light
"right" is whether the trigger is pressed


Actually, it's "up" (0x10) that's always pressed, not "start" (0x08).

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


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Thu Mar 14, 2013 7:19 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19086
Location: NE Indiana, USA (NTSC)
Quietust wrote:
Actually, it's "up" (0x10) that's always pressed, not "start" (0x08).

There's a bit of confusion there. In some controller reading subroutines, A is $80 and Right is $01; in others, A is $01 and Right is $80. I edited the article not to impose any place value on the order of bits in the Vs. Zapper's report.


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Thu Mar 14, 2013 1:43 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
I finally got past the freezing part with my patch.. Still something wrong with the trigger however. Not everyday I code stuff based on "trial and error". :)

_________________
http://nes.goondocks.se/


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Thu Mar 14, 2013 11:35 pm 
Offline
User avatar

Joined: Sun Mar 19, 2006 3:06 am
Posts: 583
Location: Gothenburg/Sweden
I suspect the SENSE-bit is inverted compared to the "normal" Zapper-bits. Can anyone confirm this?

_________________
http://nes.goondocks.se/


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Fri Mar 15, 2013 12:53 am 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6275
Location: Seattle
FCEU 0.98.12 agrees with you.


Top
 Profile  
 
 Post subject: Re: VS Zapper info?
PostPosted: Wed Jun 22, 2016 6:22 pm 
Offline
User avatar

Joined: Mon Dec 29, 2014 1:46 pm
Posts: 709
Location: New York, NY
@oRBIT2002 Is source code of MadNESs available?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: MS-DOS and 6 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