Super NES controller support in NES emulators

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Super NES controller support in NES emulators

Post by tepples »

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: Select all

    __--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.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Super NES controller support in NES emulators

Post by tepples »

This one's so that Zero Mouse can test FCEUX changes.
Attachments
spadtest-nes-0.01.zip
(18.97 KiB) Downloaded 1357 times
natt
Posts: 76
Joined: Fri Oct 26, 2012 5:27 pm

Re: Super NES controller support in NES emulators

Post by natt »

I have added this controller to BizHawk's NesHawk core, and it passes the test.
Post Reply