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.. :/
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.
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?
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.
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 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.
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".
I suspect the SENSE-bit is inverted compared to the "normal" Zapper-bits. Can anyone confirm this?
FCEU 0.98.12 agrees with you.
@oRBIT2002 Is source code of MadNESs available?