Arkanoid controller: Difference between revisions
(→Test ROMs: not yet fully published) |
(Controller autodetection; Famicom version) |
||
Line 1: | Line 1: | ||
The Arkanoid Vaus controller was included with the ''Arkanoid'' game, and is only used for this game and ''Chase HQ''. | The Arkanoid Vaus controller was included with the ''Arkanoid'' game, and is only used for this game and ''Chase HQ''. | ||
It has an control knob connected to a potentiometer and a single fire button. | It has an control knob connected to a potentiometer and a single fire button. | ||
Under | Under a small black plastic cover is another potentiometer to adjust the control knob's range. | ||
The controller uses D3 and D4 | <pre> | ||
,--------------------------------------. | | |||
| %% | | | |||
| ,---. %% % | | | |||
| / \ %% ,-. %% | | | |||
Control ->| | | %% ( ) %% |<- Fire button | |||
knob | \ / %% `-' %% | | | |||
| `---' %% % |==/ | |||
Adjustment->| () %% | | |||
screw `--------------------------------------' | |||
</pre> | |||
The Famicom version of this controller uses D1 (Famicom) on both ports. | |||
The NES version uses D3 and D4, usually in port 2 ($4017). | |||
The controller will not work in a [[Four Score]]. | |||
=== Input ($4016 write) === | === Input ($4016 write) === | ||
Line 14: | Line 29: | ||
Writing 1 to this bit will record the state of the control knob. | Writing 1 to this bit will record the state of the control knob. | ||
Writing 0 afterwards will allow the | Writing 0 afterwards will allow the position to be read back. | ||
The analog to digital conversion takes about 7 ms, so strobing too fast will return bad data, especially at the right side of the range. A function that reads the controller multiple times in a row to avoid DPCM glitches may not work. Instead, check for spurious accelerations, where the [[wikipedia:finite difference|second difference]] ''x''<sub>''t''</sub> - 2''x''<sub>''t'' - 1</sub> + ''x''<sub>''t'' - 2</sub> exceeds about eight units. | The analog to digital conversion takes about 7 ms, so strobing too fast will return bad data, especially at the right side of the range. A function that reads the controller multiple times in a row to avoid DPCM glitches may not work. Instead, check for spurious accelerations, where the [[wikipedia:finite difference|second difference]] ''x''<sub>''t''</sub> - 2''x''<sub>''t'' - 1</sub> + ''x''<sub>''t'' - 2</sub> exceeds about eight units. | ||
=== Output ($4016/$4017 read) === | === Output ($4016/$4017 read) === | ||
Famicom: | |||
<pre> | |||
$4016: | |||
7 bit 0 | |||
---- ---- | |||
xxxx xxBx | |||
| | |||
+-- Fire button (1: pressed) | |||
7 bit 0 | $4017: | ||
7 bit 0 | |||
---- ---- | |||
xxxx xxDx | |||
| | |||
+-- Serial control knob data | |||
</pre> | |||
NES: | |||
<pre> | |||
7 bit 0 | |||
---- ---- | |||
xxxD Bxxx | |||
| | | |||
| +---- Fire button (1: pressed) | |||
+------ Serial control knob data | |||
</pre> | |||
Button status is returned in D3, and does not need to be latched. | Button status is returned in D3, and does not need to be latched. However, making sure it reads the same way eight times is a good way to distinguish it from a [[Power Pad]], and reading it several times during a frame should distinguish it from the light sensor of a [[Zapper]]. | ||
Control knob data is returned in D4, MSB first. The data is also inverted. The whole range is about 180 degrees, and returned in $A0 steps. | Control knob data is returned in D4, MSB first. The data is also inverted. The whole range is about 180 degrees, and returned in $A0 steps. |
Revision as of 18:30, 15 December 2013
The Arkanoid Vaus controller was included with the Arkanoid game, and is only used for this game and Chase HQ. It has an control knob connected to a potentiometer and a single fire button. Under a small black plastic cover is another potentiometer to adjust the control knob's range.
,--------------------------------------. | | %% | | | ,---. %% % | | | / \ %% ,-. %% | | Control ->| | | %% ( ) %% |<- Fire button knob | \ / %% `-' %% | | | `---' %% % |==/ Adjustment->| () %% | screw `--------------------------------------'
The Famicom version of this controller uses D1 (Famicom) on both ports. The NES version uses D3 and D4, usually in port 2 ($4017). The controller will not work in a Four Score.
Input ($4016 write)
7 bit 0 ---- ---- xxxx xxxS | +- Control knob shift register strobe
Writing 1 to this bit will record the state of the control knob. Writing 0 afterwards will allow the position to be read back.
The analog to digital conversion takes about 7 ms, so strobing too fast will return bad data, especially at the right side of the range. A function that reads the controller multiple times in a row to avoid DPCM glitches may not work. Instead, check for spurious accelerations, where the second difference xt - 2xt - 1 + xt - 2 exceeds about eight units.
Output ($4016/$4017 read)
Famicom:
$4016: 7 bit 0 ---- ---- xxxx xxBx | +-- Fire button (1: pressed) $4017: 7 bit 0 ---- ---- xxxx xxDx | +-- Serial control knob data
NES:
7 bit 0 ---- ---- xxxD Bxxx | | | +---- Fire button (1: pressed) +------ Serial control knob data
Button status is returned in D3, and does not need to be latched. However, making sure it reads the same way eight times is a good way to distinguish it from a Power Pad, and reading it several times during a frame should distinguish it from the light sensor of a Zapper.
Control knob data is returned in D4, MSB first. The data is also inverted. The whole range is about 180 degrees, and returned in $A0 steps.
Variations in the analog to digital and pot physical range can vary the result slightly. With the trim pot at minimum the range returned is $0D-$AD. With the trim pot at maximum the range returned is $5C-$FC.
The Arkanoid game expects the range to be $54-$F4; the manual explains how to adjust the trimpot. New games can work at any trim pot setting by storing the maximum and minimum values seen during a play session and assuming values within ±80 units of the center of this range.
Test ROMs
- Vaus Test shows adaptation to trimpot setting, repeated read rate, and first and second differences