Expansion Port - Falmouth-Games-Academy/comp310-wiki GitHub Wiki

Introduction

Both the NES and the Japanese only Famicom utilize an expansion port which allows the use of a wider array of input devices over just using the controller ports as there are far more pins, and thus inputs available to the console[1].

Famicom Expansion Port Source[7]

As the Famicom has hardwired controllers, unlike the western NES, the expansion port is in a much more accessible position so that additional controllers and such can be connected with ease. However the NES's expansion port is hidden away under a cover that needed to be snapped off to access it (As seen in the image below), this is mostly due to the fact that, as mentioned before, that the NES has non-hardwired controllers[2], and thus any accessories and other I/O devices released at the time would utilize these ports instead, even though the expansion connector would allow for so many more inputs, it was seen as more of a "backup plan" by Nintendo[1] as they intended to release far fewer peripherals for the NES in the west compared to the slew of exclusive accessories that were released in Japan, such as the 3D System that was never released outside of Japan[3].

NES Expansion port Source[8]

Input

Due to the reasons mentioned in the last section, the Famicom's expansion port only has 15 pins compared to that of the NES's which has 48. The below piece of code shows the pin out of the Famicom port[1]

             /\
            |   \
        GND | 01  \
            |   09 | /OE for joypad 2
      SOUND | 02   |
            |   10 | Out 2 ($4016.2)
        IRQ | 03   |
            |   11 | Out 1 ($4016.1)
Joypad 2 D4 | 04   |
            |   12 | Out 0 ($4016.0, Strobe)
Joypad 2 D3 | 05   |
            |   13 | Joypad 1 D1
Joypad 2 D2 | 06   |
            |   14 | /OE for Joypad 1
Joypad 2 D1 | 07   |
            |   15 | +5V
Joypad 2 D0 | 08  /
            |   /
             \/

As the port was mostly used for additional controllers, most of the inputs are dedicated to detecting the digital inputs from said controllers, usually from a Four Score (Or Four-Players Adapter as it was known in Japan)[4] as this allowed the use of two additional controllers, as well as the 2 hardwired units, however the list of games that allowed the use of more than 2 controllers was quite limited in the grand scheme of things[5]. As seen on the diagram, pins 10, 11 and 12 are dedicated to writing to the $4016 register, which stores button states received from the controllers for the game to read

As mentioned before, the NES expansion port was more of a backup plan for Nintendo, and was never used by any officially licensed product, however it used a great deal in the homebrew and hacking communities to expand the capabilities of the system, as seen in this example[6] where someone utilized the expansion port to interact with a microcontroller and a shared piece of SRAM that would allow the user to create a message on the NES that would then be sent to a Twitter relay server.

                                        +-------\
                                 +5V -- |01   48| -- +5V
                                 Gnd -- |02   47| -- Gnd
                            Audio in -> |03   46| -- NC
                                /NMI <- |04   45| -> out 2 ($4016 write data, bit 2)
                                 A15 <- |05   44| -> out 1 ($4016 write data, bit 1)
                                EXP9 ?? |06   43| -> out 0 ($4016 write data, bit 0, strobe on sticks)
                                EXP8 ?? |07   42| ?? EXP0
                                EXP7 ?? |08   41| ?? EXP1
                                EXP6 ?? |09   40| ?? EXP2
                                EXP5 ?? |10   39| ?? EXP3
($4017 read strobe) /OE for joypad 2 <- |11   38| ?? EXP4
                         joypad 1 D1 -> |12   37| -> /OE for joypad 1 ($4016 read strobe)
                         joypad 1 D3 xx |13   36| xx joypad 1 D4
                                /IRQ <> |14   35| xx joypad 1 D0
                         joypad 2 D2 -> |15   34| -> duplicate of pin 37
                         joypad 2 D3 xx |16   33| <- joypad 1 D2
                 duplicate of pin 11 <- |17   32| <> CPU D0
                         joypad 2 D4 xx |18   31| <> CPU D1
                         joypad 2 D0 xx |19   30| <> CPU D2
                         joypad 2 D1 -> |20   29| <> CPU D3
                           Video out <- |21   28| <> CPU D4
                           Audio out <- |22   27| <> CPU D5
       unregulated power adapter vdd -- |23   26| <> CPU D6
                     4.00MHz CIC CLK <- |24   25| <> CPU D7
                                        +-------/

Source1(https://wiki.nesdev.com/w/index.php/Expansion_port)

However, the developer in question needed to access the section of memory starting at address $6000, which requires address pins A13 and 14 to write to, and as the only address pin accessible on the expansion port is A15, the developer had to bridge some connections on an old cartridge, and then utilise the cart pass through pins on the expansion port to access them, but it works perfectly well.

References