Arkanoid controller: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Second difference for DPCM glitches; test ROM; correct range based on my specimen; correct title of controls per Arkanoid manual; link to test ROM)
(→‎Test ROMs: not yet fully published)
Line 39: Line 39:


== Test ROMs ==
== Test ROMs ==
*[//pineight.com/nes/#vaus Vaus Test] shows adaptation to trimpot setting, repeated read rate, and first and second differences
*[http://forums.nesdev.org/viewtopic.php?f=22&t=10662 Vaus Test] shows adaptation to trimpot setting, repeated read rate, and first and second differences
[[Category:Controllers]]
[[Category:Controllers]]

Revision as of 23:40, 26 November 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 the black rubber dot is another potentiometer to adjust the control knob's range.

The controller uses D3 and D4 so it 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 dial 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)

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.

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