Standard controller: Difference between revisions
Rainwarrior (talk | contribs) m (1s consistency) |
Rainwarrior (talk | contribs) (Note that third party controllers don't necessarily have consistent behaviour past the report.) |
||
Line 22: | Line 22: | ||
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. | Additional reads past the first 16 return 1s on official controllers. Third party controllers (e.g. U-Force) 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, 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. |
Revision as of 19:23, 26 May 2022
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 (e.g. U-Force) 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, 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.