Famicom Four-Player Adapters Technical Document v1.0 : 11/15/2001 by Richard Hoelscher E-mail [(igPay) Latin Encoded] : ahgaray atay ahgaray otday omcay Four player games on the famicom were supported by plugging a special pair of controllers into the Famicom expansion port. As seen below, these controllers operate in a manner identical to the built-in controllers on the famicom, except for the fact that Joypad #3 returns it's data over PORT0-D1, and Joypad #4 returns it's data over PORT1-D1. For what it's worth, virtually all Famicom joypads work this way, so when you bought a special joystick for the Famicom, you were not simply limited to four player games. Rather, almost every Famicom game designed for one or two players look at both D0 and D1 for joystick information. These features are usually not removed when porting NES versions of these games. Only a few games don't support the reading both D0 and D1, usually just prototypes and releases specific to the United States. +---- | Device Pinouts +-------- /----------------------\ /--------------------------------------\ | Famicom Expansion Port |---+--| Famicom 4-Player Game Controllers Plug | / \----------------------/ | \--------------------------------------/ \ | | | | _ | _ | | (pin #1) \(9) | (9)/ (1) | | GND |Po| PORT1-CLK <|> JOYPAD #4 CLK |oP| GND | | SOUND |Po| OUT2 <|> |oP| | | IRQ |Po| OUT1 <|> |oP| | | PORT1-D4 |Po| OUT0(STROBE)<|> STROBE |oP| | | PORT1-D3 |Po| PORT0-D1 <|> JOYPAD #3 DATA |oP| | | PORT1-D2 |Po| PORT0-CLK <|> JOYPAD #3 CLK |oP| | | PORT1-D1 |Po| +5V <|> +5V |oP| JOYPAD #4 DATA | | PORT1-D0 |P/(15) <|> (15)\P| | | (8)/ | \(8) | | | | \-----------------------------+---------------------------------------------/ +---- | How It Works +-------- In normal games, each read of the joypad ports contain only one unique bit. However, in four player famicom games, each read of $4106 and $4017 returns in the form of "010000XY" (binary), where Y is the bit returned from D0, and X is the bit returned from D1. It's then the game's responsibility to extract these bits, one-at-a-time, then (usually) put them together into four bytes that store each joypad's state information. This information is then put it to use in the game. +---- | NES Incompatibility +-------- The NES was designed to accommodate the use of the light gun and robot that were already being used for the famicom, without making the console more complicated. To accommodate this without redesigning their devices and programs, the ports of the removable joysticks were equipped not only with data line D0, but also D3 and D4. Unfortunately, this prevented games that used other methods of communicating with the Famicom expansion port, including keyboard and four player games, from being released on the NES without major modifications. To accommodate four player gaming on the NES, Nintendo later released the Satellite and Four Score, which requires games to support another method of reading the joystick ports (first eight reads come from the first controller on the port, second eight reads come from the second controller on the port, followed by another 8 reads that includes a signature, letting the game know whether or not a four-player device is plugged in). It comes as a surprise to most people that the Famicom's four player games are incompatible with the NES' Four Score, but many of them forget that the original Famicom's controllers were hardwired on to the unit. +---- | Developing Games +-------- When making a Famicom compatible four-player game, all you need to know is that after you shift and store the bit from D0 on $4016 to get the state of Joypad #1, simply repeat the process to get the next bit, where the state of Joypad #3 which was sent over D1. After repeating 7 more times, repeat the entire process on $4017 to get the state of the next two controllers. If you are making games specific to the Four Score, make sure you check for a signature after the second set of 8 reads. Though your program may work in an emulator without doing this, it will read controllers 3 and 4 as having all buttons pushed down on a real NES when a four score is not actually plugged in. It is possible to program a game which will support four players on both the NES and Famicom. Several commercial games support this, including Super Spike V'Ball. +---- | Emulator Support +-------- To make the emulator work as close as possible to the real NES and Famicom, I suggest supporting 3 different modes: Standard: First 8 reads on both $4016 and $4017 return standard controller state info, every read after that returns set bits on D0. Very few emulators actually do this. Four Score Mode: First 8 reads on each port are for controllers 1 and 2, second 8 reads are for controllers 3 and 4, and the last set of 8 return a signature. Famicom Expansion Port Mode: Works the same way I explained above, with every read with D0 and D1 after the first 8 on each port returning set bits. To test proper emulation of these devices, I recommend playing Nekketsu Kakutou Densetsu, Nekketsu Dodge Ball, Nekketsu Soccer League, or Nekketsu Ganbare Dunk Heroes. +---- | Other Notes +-------- Though I've never even physically played on a Famicom, I'm confident that all the information on this page is technically accurate. To gather this information, I disassembled the ROMs on a number of my 4-player famicom games and analyzed the code they used to access the 3rd and 4th joypads. By rewiring my Four Score and making an adapter for the NES expansion port, then plugging games like Nekketsu Kakutou Densetsu into the Famicom-to-NES cartridge adapter included with Stack-Up, I can switch between playing four-player NES and Famicom games on my NES console. It works flawlessly. This project requires several photographs and a long list of instructions, and will eventually be posted on my website, http://rahga.com . +---- | Revision History +-------- 0.99a - First Release 1.0 - Re-wrote various portions for clarity, revised emulator support suggestions.