Super NES controller support in NES emulators

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Super NES controller support in NES emulators
by on (#167267)
The 6-button Super NES controller was designed for the Super NES, Sony Play Station (with space), and Coleco Chameleon. It also connects to some Famiclones, such as the FC Twin (not to be confused with the official licensed Twin Famicom). The vast majority of NES games that use a standard 2-button controller will also work with a 6-button pad.

Code:
    __--L--_________________--R--__
   /    _                          \
  |   _| |_                  (X)    |
  |  |_   _|  SLCT STRT   (Y)   (A) |
  |    |_|                   (B)    |
   \_________.-----------._________/

Illustration from Fullsnes by Martin "nocash" Korth

It is read in the same manner as the 2-button controller but has an additional report byte.

Report byte 1: B, Y, Select, Start, Up, Down, Left, Right
Report byte 2: A, X, L, R, 0, 0, 0, 0
Report bytes 3+: 1, 1, 1, 1, 1, 1, 1, 1

The 0, 0, 0, 0 followed by all 1's are used to distinguish this from other input devices, such as the Four Score or Super NES Mouse, and to help reject spurious presses due to bit deletion caused by the DMC DMA glitch.* Buttons A, X, L, and R cannot be read through a Four Score accessory.

On a bug-tracking forum, an emulator developer requested an NES test ROM for the 6-button controller. I plan to port spadtest tonight.


* That is, in the alternate universe in which the Super NES controller is also sold as a back-compatible 6-pad, the way 6-pads for Genesis and TG16 were.
Re: Super NES controller support in NES emulators
by on (#167288)
This one's so that Zero Mouse can test FCEUX changes.
Re: Super NES controller support in NES emulators
by on (#167742)
I have added this controller to BizHawk's NesHawk core, and it passes the test.