Arkanoid controller: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(→‎Output ($4016/$4017 read): Trim pot independent read method)
m (cat)
Line 37: Line 37:
The Arkanoid game expects the range to be $54-$F4.
The Arkanoid game expects the range to be $54-$F4.
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.
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.
[[Category:Controllers]]

Revision as of 20:19, 3 October 2011

The Arkanoid Vaus controller was included with the Arkanoid game, and is only used for this game. It has an analog potentiometer dial and a single button.

Under the black rubber dot is another potentiometer to adjust the dial range.

The controller uses D3 and D4 so it will not work in a Four score.

Input ($4016 write)

7  bit  0
---- ----
xxxx xxxS
        |
        +- Dial shift register strobe

Writing 1 to this bit will record the state of the dial. Writing 0 afterwards will allow the dial to be read back.

The analog to digital conversion takes time so strobing too fast will return bad dial data. A function that reads the controller multiple times in a row to avoid DPCM glitches may not work.

Output ($4016/$4017 read)

7  bit  0
---- ----
xxxD Bxxx
   | |
   | +---- Button
   +------ Serial dial data
   

Button status is returned in D3, and does not need to be latched. Button is 1 if pressed, 0 if not pressed.

Dial data is returned in D4, MSB first. The data is also inverted. The whole dial range is about 270 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. 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.