Standard controller: Difference between revisions

From SNESdev Wiki
Jump to navigationJump to search
(standard controller)
 
(crosslink NESDev article)
 
(6 intermediate revisions by 2 users not shown)
Line 21: Line 21:


The signature is guaranteed to be 0000 for a standard SNES controller. Finding another value here indicates that a different peripheral is plugged in.
The signature is guaranteed to be 0000 for a standard SNES controller. Finding another value here indicates that a different peripheral is plugged in.
Additional reads past the first 16 return 1s on official controllers. Third party controllers may return 0s instead.


The first 8 bits of this report are identical to the NES controller, with SNES Y and B substituted for NES B and A. This offers potential compatibility with an NES controller through an adapter, though the game would have to ignore the extra buttons and signature which would normally report as all 1s from an NES controller.
The first 8 bits of this report are identical to the NES controller, with SNES Y and B substituted for NES B and A. This offers potential compatibility with an NES controller through an adapter, though the game would have to ignore the extra buttons and signature which would normally report as all 1s from an NES controller.


The first two controllers report through JOYSER0 ($4016) D0 and JOYSER1 ($4017) D0, and a 4-player multitap will also report two more controllers through D1, similar to simple Famicom 4-player adapters. All 4 reports can be delivered by the automatic read system to JOY1-4.
The first two controllers report through JOYSER0 ($4016) D0 and JOYSER1 ($4017) D0. A [[multitap]] peripheral exists allowing up to 5 standard controllers to be used.
 
== Links ==
* [//www.nesdev.org/wiki/SNES_controller SNES controller] at NESdev Wiki
 
[[Category:Controllers]]

Latest revision as of 01:52, 22 February 2023

The standard controller reports 16 bits of data.

See: Controller reading

If using the automatic read, the reports will be available at JOY1, etc.

   JOY1H       JOY1L
   $4219       $4218
15  bit  8   7  bit  0
 ---- ----   ---- ----
 BYsS UDLR   AXlr 0000
 |||| ||||   |||| ||||
 |||| ||||   |||| ++++- Signature
 |||| ||||   ||++------ L/R shoulder buttons
 |||| ||||   ++-------- A/X buttons
 |||| ++++------------- D-pad
 ||++------------------ Select (s) and Start (S)
 ++-------------------- B/Y buttons

If manually reading through JOYSER0, these bits are delivered starting with the most significant bit (B button).

The signature is guaranteed to be 0000 for a standard SNES controller. Finding another value here indicates that a different peripheral is plugged in.

Additional reads past the first 16 return 1s on official controllers. Third party controllers may return 0s instead.

The first 8 bits of this report are identical to the NES controller, with SNES Y and B substituted for NES B and A. This offers potential compatibility with an NES controller through an adapter, though the game would have to ignore the extra buttons and signature which would normally report as all 1s from an NES controller.

The first two controllers report through JOYSER0 ($4016) D0 and JOYSER1 ($4017) D0. A multitap peripheral exists allowing up to 5 standard controllers to be used.

Links