It is currently Tue Jul 23, 2019 9:16 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Zapruder calibration
PostPosted: Wed Apr 16, 2014 8:07 am 
Offline

Joined: Fri Oct 26, 2012 5:27 pm
Posts: 76
I recently added zapper emulation to Bizhawk. A few games that I've tried seem to be working, but I want response to be as similar as possible to how it was on real hardware. I tried zapruder, but the docs for it don't seem to give any indication of how hardware should respond.


Top
 Profile  
 
 Post subject: Re: Zapruder calibration
PostPosted: Wed Apr 16, 2014 8:23 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21511
Location: NE Indiana, USA (NTSC)
Just as with overscan amounts, different TVs at different settings produce different results in Zap Ruder. If you have an NES, a Zapper, and a CRT SDTV, contribute your results for different hue/bright levels and different line patterns here. I may give numbers from my Magnavox TV later tonight.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
 Post subject: Re: Zapruder calibration
PostPosted: Wed Apr 16, 2014 11:35 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21511
Location: NE Indiana, USA (NTSC)
Y COORD 1 GUN

Tests with hue 0
B 5+: HT= 26
B 4: HT= 25
B 3: HT= 24
B 2: HT= 23
B 1: HT= 17
B 0: HT= 0

Tests with hue 2 (blue)
B 6+: HT= 26
B 5: HT= 25
B 4: HT= 24
B 3: HT= 22
B 2: HT= 20
B 1: HT= ~10 (heavy fluctuation)
B 0: HT= 0

Tests with hue 6 (red)
B 8: HT= 26
B 7: HT= 25
B 6: HT= 24
B 5: HT= 23
B 4: HT= 20
B 3: HT= ~13 (heavy fluctuation)
B 2-: HT= 0

Tests with hue 8 (yellow)
B 8: HT= 26
B 7: HT= 25
B 6: HT= 25
B 5: HT= 24
B 4: HT= 22
B 3: HT= ~15 (heavy fluctuation)
B 2-: HT= 0

Tests with hue 10 (green)
B 7+: HT= 26
B 6: HT= 25
B 5: HT= 24
B 4: HT= 22
B 3: HT= 18
B 2-: HT= 0

In Y COORD 1 GUN, Y went up (decreased in value) slightly when I held the gun still while increasing the brightness. And in BALL TARGET, with a radius of 4 and bright 5 hue 0, HT ranged from 0 to 21 depending on how well the barrel was centered over the ball in the middle. This indicates that it's integrating light over a circle. I could acquire targets with HT=15 down to radius 1.

X coordinates in X AND Y COORDS seem to vary randomly, frame to frame, in a range 6 units wide (each unit is 18 pixels) with less probability at the sides. This variability is why I ended up rejecting the XY zapkernel from production use.

Vertical lines, bright 5, hue 0:
0-9 20-23 22-24 23-24
24-25 26-27 26-27 26-27
18-19 23-24 25-26 22-23

Horiz. lines, bright 5, hue 0:
16-23 19-25 20-26 20-26
24-26 25-27 26-27 25-26
20-23 24-26 25-26 24-25
For this test pattern, the Y coordinate appears to jump over areas that are black.

Trigger time
Pulling the trigger produces a "click" as the switch turns on and then a "clank" as it turns back off. Held time counts from the "click" to the "clank". It's usually 5 for a normal pull, can't get it lower than 4, may be some capacitor extending the pulse from click to clank. Games may interpret a long press (hold at "click" for more than 15 frames) differently from a short press (click through to clank). For example, Music Toy: Axe treats a short press as a long-term timbre change and a long press as a single note accent.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
 Post subject: Re: Zapruder calibration
PostPosted: Wed Apr 16, 2014 12:45 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 8488
Location: Seattle
natt wrote:
I recently added zapper emulation to Bizhawk. A few games that I've tried seem to be working, but I want response to be as similar as possible to how it was on real hardware. I tried zapruder, but the docs for it don't seem to give any indication of how hardware should respond.
Here's some numbers I pulled out from manually playing with a white LED, microcontroller, disassembled zapper, and oscilloscope:
- The notional period of a scanline inside the zapper is determined by an RC time constant, so can vary by up to 20% as a function of the parts used. Mine, however, does seem to be tuned to 16kHz to the precision that I can measure.
- The frequency selectiveness of the zapper is really lousy, barely providing 3dB of rejection within the adjacent decade of frequencies
- After the output has fired and no light is falling on the photodiode, the output will go false again after approximately 600-800µs.
- A single sufficiently bright light pulse (measured in terms of total amount of photocurrent, i.e. charge) will cause the light detect output to go true exactly three scanlines later.
- A single dimmer light pulse will still cause the output to go true, but it will randomly vary anywhere between four to sixteen scanlines later
- I was unable to usefully determine what the lower threshold for light detection was
- Periodic input will decrease the delay of the latter case: one of the pins of the IR3T07A rises in a tilted triangle wave (slow rise, fast fall, rising more than falling) after it's been triggered. Light input while the pin is rising causes it to rise faster; light input while the pin is falling has no effect.
- The final output (as seen by the NES) is a hysteretic buffer from the analog signal mentioned in the previous point, which is then inverted twice more before it is seen by the CPU.

The minimum trigger time is exactly determined by the 10kΩ pullup inside the NES and the 10µF capacitor inside the zapper.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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