Coconuts Japan Pachinko Controller: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (Fiskbit moved page Coconuts Pachinko to Coconuts Japan Pachinko Controller: Moving to match the full name of the controller)
(Rewrites the Pachinko Controller page with new findings. (Thanks to lidnariq for his substantial help understanding the hardware.))
Line 1: Line 1:
The Coconuts Pachinko controller is used in the following games:
The [[Coconuts Japan Pachinko Controller]] is a Famicom expansion port controller designed by Hori that combines a standard controller with a large analog dial. The dial uses a spring to return it to its rest position. This controller was used in the following games:
*''Pachinko Daisakusen''
*''Pachinko Daisakusen''
*''Pachinko Daisakusen 2''
*''Pachinko Daisakusen 2''
Line 5: Line 5:
*''Pachio Kun 5''
*''Pachio Kun 5''


== Hardware interface ==
==Layout==


=== Input ($4016 write) ===
    |
,--------.  \-,-------.
|        |    |        |
|      |    |          |
|      |  /|          |
|  +  |  /_|  B  A  /
|        |    |        /
|        `--'        /
|                    /
|  Se St            /
`-------------------'


The Pachinko Controller is a thick controller with a front surface that slopes downward. Its button layout matches that of the standard controller, but with the select and start buttons positioned for use with the left hand rather than a more-ambidextrous central location. A large gap runs down most of the center of the controller, and the right half is rounded. On the right half, sandwiched between the front and back plastic shells of the controller is a dial with a slightly larger radius than the controller. On the left of the dial are two angled ridges. The controller is intended to be stabilized or held with the left hand and the dial manipulated with the right hand, using a palm grip that places the right hand's thumb below the larger ridge, index finger to the left of the smaller ridge, and other fingers placed on the dial, allowing clockwise rotation against the spring and counterclockwise rotation with the spring. The dial can also be used with the right index finger when holding the controller as a standard controller, but not as effectively.
==Interface==
===Input ($4016 write)===
  7  bit  0
  7  bit  0
  ---- ----
  ---- ----
  xxxx xxxS
  xxxx xxxS
         |
         |
         +- Controller shift register strobe
         +- Strobe controller shift register
 
Same behavior as a [[Standard controller]].


=== Output ($4016 read) ===
This matches the normal strobe behavior used by the [[Standard_controller#Input_($4016_write)|standard controller]].


===Output ($4017 read)===
  7  bit  0
  7  bit  0
  ---- ----
  ---- ----
  xxxx xxDx
  xxxx xxEx
         |
         |
         +- Serial data
         +-- Controller status bit
 
The controller status is returned in a 16-bit serial report:
 
  Bits
  0-7  - [[Standard_controller#Report|Standard controller]]
  8    - (Always 1)
  9-15 - 7-bit analog value, inverted (high bits first)
  16+  - (Always 1)
 
Note that the analog value is provided to the CPU inverted. This article will discuss the raw, non-inverted values.
 
Unlike the [[Arkanoid controller]], which starts an analog-to-digital conversion in response to a strobe, the Pachinko Controller converts constantly. The controller has a 7-bit counter that is always counting up at a rate of approximately 20 kHz. A voltage based on all 7 bits of the counter is compared against a voltage based on the dial's potentiometer. When the counter voltage exceeds the potentiometer voltage, the 7 counter bits are simultaneously latched. When the controller is strobed, it is this latched conversion that is latched for the report, so the controller always provides a single complete conversion in its report.
 
The counter wraps every 128 counts, which takes about 6.4 ms, so conversions will latch at this rate on average. However, conversions will occur faster or slower than this as the dial is turned; for example, a latch could occur early during one pass and late during another, taking nearly two passes. In fact, if the potentiometer voltage is rapidly increased by quickly turning the dial clockwise, the counter could even be latched multiple times in a single pass.


The controller returns the data in the following order:
At power-on, if the dial is in its rest position, the latched value is usually 0, but a conversion may occur immediately, typically producing a value of $01 or $02. Once the dial has been used, its minimum value is $03 and its maximum value is approximately $72-74, depending on mechanical factors. The maximum value is restricted by the plastic components and thus may vary by controller and by elastic deformation of the plastic. On the other hand, the minimum value is restricted by the conversion circuit, and there is a small deadzone around the rest position of the dial where turning does not change the value.


Bits 0-7: Same as a Standard Controller (A, B, Select, Start, Up, Down, Left, Right)
When the potentiometer voltage is sufficiently low, the counter voltage always exceeds it, preventing the conversion latches from taking a new value. Thus, if it is below the voltage that would produce the minimum value of $03, no conversions occur and the stale value continues to be latched. If the dial is returned to rest quickly enough, this means that larger values than the minimum can be latched until the dial is turned far enough to trigger conversions again. For this reason, it is common in normal use for the at-rest value to be $04 rather than the actual minimum of $03, and values as large as $06 have been observed by allowing the spring to freely return the dial to rest from the maximum position. Software should extend the deadzone to accommodate this quirk.
Bits 8-15: 8-bit position data for the analog trigger (returns MSB first and with all bits inverted)
Bits 16+: Unknown


The values used by games for the analog trigger range between $00 (stopped) and $63 (fastest). The analog trigger is spring-loaded.
Contemporary software expects a range of $00-63, clamping values above $63. If bit 8 of the report does not match the expected 1, these games ignore the analog value. Note that the controller cannot report values less than $03 under normal operation, so ball launching cannot be completely stopped.
The actual range on real hardware has not been determined.


== See Also ==
== See Also ==
* [//youtu.be/qWbw-9C0fGE?t=606 video demonstrating how trigger maps to game play]
* [//youtu.be/qWbw-9C0fGE?t=606 Video demonstrating how the dial maps to gameplay]
 
[[Category:Controllers]]

Revision as of 06:09, 21 November 2022

The Coconuts Japan Pachinko Controller is a Famicom expansion port controller designed by Hori that combines a standard controller with a large analog dial. The dial uses a spring to return it to its rest position. This controller was used in the following games:

  • Pachinko Daisakusen
  • Pachinko Daisakusen 2
  • Pachio Kun 4
  • Pachio Kun 5

Layout

    |
,--------.   \-,-------.
|        |    |         |
|       |    |           |
|       |   /|           |
|   +   |  /_|   B   A   /
|        |    |         /
|         `--'         /
|                     /
|  Se St             /
`-------------------'

The Pachinko Controller is a thick controller with a front surface that slopes downward. Its button layout matches that of the standard controller, but with the select and start buttons positioned for use with the left hand rather than a more-ambidextrous central location. A large gap runs down most of the center of the controller, and the right half is rounded. On the right half, sandwiched between the front and back plastic shells of the controller is a dial with a slightly larger radius than the controller. On the left of the dial are two angled ridges. The controller is intended to be stabilized or held with the left hand and the dial manipulated with the right hand, using a palm grip that places the right hand's thumb below the larger ridge, index finger to the left of the smaller ridge, and other fingers placed on the dial, allowing clockwise rotation against the spring and counterclockwise rotation with the spring. The dial can also be used with the right index finger when holding the controller as a standard controller, but not as effectively.

Interface

Input ($4016 write)

7  bit  0
---- ----
xxxx xxxS
        |
        +- Strobe controller shift register

This matches the normal strobe behavior used by the standard controller.

Output ($4017 read)

7  bit  0
---- ----
xxxx xxEx
       |
       +-- Controller status bit

The controller status is returned in a 16-bit serial report:

 Bits
 0-7  - Standard controller
 8    - (Always 1)
 9-15 - 7-bit analog value, inverted (high bits first)

 16+  - (Always 1)

Note that the analog value is provided to the CPU inverted. This article will discuss the raw, non-inverted values.

Unlike the Arkanoid controller, which starts an analog-to-digital conversion in response to a strobe, the Pachinko Controller converts constantly. The controller has a 7-bit counter that is always counting up at a rate of approximately 20 kHz. A voltage based on all 7 bits of the counter is compared against a voltage based on the dial's potentiometer. When the counter voltage exceeds the potentiometer voltage, the 7 counter bits are simultaneously latched. When the controller is strobed, it is this latched conversion that is latched for the report, so the controller always provides a single complete conversion in its report.

The counter wraps every 128 counts, which takes about 6.4 ms, so conversions will latch at this rate on average. However, conversions will occur faster or slower than this as the dial is turned; for example, a latch could occur early during one pass and late during another, taking nearly two passes. In fact, if the potentiometer voltage is rapidly increased by quickly turning the dial clockwise, the counter could even be latched multiple times in a single pass.

At power-on, if the dial is in its rest position, the latched value is usually 0, but a conversion may occur immediately, typically producing a value of $01 or $02. Once the dial has been used, its minimum value is $03 and its maximum value is approximately $72-74, depending on mechanical factors. The maximum value is restricted by the plastic components and thus may vary by controller and by elastic deformation of the plastic. On the other hand, the minimum value is restricted by the conversion circuit, and there is a small deadzone around the rest position of the dial where turning does not change the value.

When the potentiometer voltage is sufficiently low, the counter voltage always exceeds it, preventing the conversion latches from taking a new value. Thus, if it is below the voltage that would produce the minimum value of $03, no conversions occur and the stale value continues to be latched. If the dial is returned to rest quickly enough, this means that larger values than the minimum can be latched until the dial is turned far enough to trigger conversions again. For this reason, it is common in normal use for the at-rest value to be $04 rather than the actual minimum of $03, and values as large as $06 have been observed by allowing the spring to freely return the dial to rest from the maximum position. Software should extend the deadzone to accommodate this quirk.

Contemporary software expects a range of $00-63, clamping values above $63. If bit 8 of the report does not match the expected 1, these games ignore the analog value. Note that the controller cannot report values less than $03 under normal operation, so ball launching cannot be completely stopped.

See Also