The Famicom Network System (HVC-050) is a Famicom add-on for a dial-up modem network. It plugs into the cartridge connector and has a slot for a tsuushin card, which looks like a cartridge but has no PPU signals. Commercial software came as such cards (banking, share trading, horse-race betting, shogi and similar). The add-on has its own number-pad controller, described on the controllers page. The Dataship 1200 is a stand-alone version with the Famicom part cut down: it takes only tsuushin cards, has no built-in controllers (only an expansion port for the network controller), uses the Game Boy link cable port for RF or AV output and has a 14-pin Centronics port for a printer. The unreleased Family Computer Network Adapter for the Disk System is an earlier design with a similar purpose.
Everything below is from the NESdev Wiki page “Family Computer Network System”. Most of it was found by bench tests and by reading the software of the few cards, so entries marked unknown or theory are the wiki’s own words for what is not settled. Register tables list what a bit does, not what the bench tests saw; the bench-test notes are on the wiki.
System overview
The add-on is built around two custom chips. The RF5C66 is the mapper: it gives the Famicom its own registers at $40A0, the registers of the other chip at $40D0, a kanji ROM at $5000 and 8 KiB of work RAM at $6000. It also switches a 16 KiB CHR RAM made of two 8 KiB chips. The RF5A18 holds a 65C02 called CPU2, with its own clock and a 4 KiB ROM, that runs the modem. The Famicom talks to CPU2 through four registers at $40D0 to $40D3.
Tsuushin cards carry their own MMC1, which does not touch the add-on’s registers. The RF5C66 buffers the CPU data bus and the CPU R/W line before they reach the card and the internal parts (the kanji ROM and the RF5C66’s own registers sit directly on the CPU bus). It blocks writes when the lid switch is open or when the CIC check has failed. Older revisions also buffered the address bus with 74HC541 chips.
Expansion audio. The Famicom’s audio passes through the modem module and does not go to either custom chip. Dial tones come out of the television’s speaker. Whether there is any other sound source is unknown.
Disk drive support. A block diagram of doubtful origin says the RF5C66 contains a disk drive controller, and its pins 71 to 79 look like those of the FDS’s RP2C33 (serial out at about 95.95 kHz, serial in, read/write, reset transfer timing, motor on, write protect, disk not ready, disk missing, battery health). So a drive may be connectable to the expansion port. Nothing used this, none of the FDS registers is present (the registers found start right after where the FDS ones would be), the FDS’s large DRAM has no counterpart, and there is no visible path for FDS audio. How it works, or whether it was finished, is unknown.
Memory map and data bus
$0000-$07FF Famicom RAM $4000-$4017 APU and I/O $4018-$401F test registers
$40A0-$40CF RF5C66 registers $40D0-$40D7 RF5A18 (CPU2) registers, mirrored at $40D8
$40E0-$40EF unused device registers (open bus; meant for a second CPU2-like device)
$4100-$41FF mirrors of $40A0-$40FF (address bits 8-11 are not connected, so each register
$5000-$5FFF kanji ROM repeats at $41xx to $4Fxx)
$6000-$7FFF add-on RAM (and card RAM) $8000-$FFFF tsuushin card
The RF5C66 drives the data bus through a one-way buffer, with a delay of about 16 ns. Its direction in each address range:
| Addresses | Reads | Writes | What is there |
|---|---|---|---|
$0000-$4x1F | CPU to card | CPU to card | Famicom RAM and registers |
$4x20-$4x9F | CPU to card | CPU to card | unknown (the FDS registers would fit exactly) |
$4xA0-$4xCF | CPU to card | CPU to card | RF5C66 registers |
$4xD0-$4xDF | card to CPU | CPU to card | CPU2 registers (/CE is RF5C66 pin 42) |
$4xE0-$4xEF | card to CPU | CPU to card | unused; a card could use these 256 addresses itself (/CE is pin 41) |
$4xF0-$4xFF | CPU to card | CPU to card | unknown |
$5x00-$5xFF | CPU to card | CPU to card (bus conflict on writes) | kanji ROM (/CE is pin 50) |
$6x00-$7xFF | card to CPU | CPU to card | add-on RAM (/CE is pin 40) |
$8x00-$FxFF | card to CPU | CPU to card | tsuushin card (/CE is /ROMSEL) |
No high-impedance state was seen on a standalone RF5C66 in either direction: the two data buses always matched. When RF5C66 pin 29 is driven low by the CIC key chip, the card R/W line is held high, which prevents most RAM and register writes; the buffer may also stop bus conflicts in that mode. The lid switch does the same when open, but the chip cannot know that, so bus conflicts are probably not prevented then.
Kanji graphics ROM (LH5323M1)
A 256 KiB ROM, mostly kanji, at $5000-$5FFF. Each index in that range is a 32-byte space holding a 16 by 16 pixel, one-bit image, usually one character, and every read moves on to the next byte. There are two 128 KiB banks: the low bank at power-on, the high bank after a write of 1 to $40B0 bit 0. Reading $40B0 returns to the start of the 32 bytes; writing it does not, and nothing else was seen to change the position. Software reads and discards bytes when its data does not start at the beginning. The ROM sits on the unbuffered CPU data bus, and writes in $5000-$5FFF do select it, so they cause bus conflicts. The chip’s low address pins A0 to A4 come from an auto-increment counter in the RF5C66 that rises at each falling edge of M2 while the CPU is in $5000-$5FFF, and its bank pin A17 comes from $40B0 bit 0; reads of $40B0 and reset clear them.
RF5C66 registers (Famicom side)
These registers do not use address bits 8 to 11, so $40A0 also answers at $41A0 to $4FA0. The wiki notes that on its test set-up the RF5C66 registers could not be written (they work in a real Famicom). “Unknown” means the wiki does not know.
| Address | Read | Write |
|---|---|---|
$40A0 | probably does not exist (open bus on the bench) | unknown; no effect was ever seen. A placeholder in the wiki. |
$40A1 | bits exist, function unknown (reads $FF with pull-downs) | unknown |
$40A2 | IRQ status and acknowledge, like FDS $4030: bit 0 is the timer interrupt (1 = an IRQ happened); a read acknowledges /IRQ (behaviour was inconsistent, perhaps several IRQ sources); the other bits exist but are unknown. JRA-PAT reads it with BIT just before CLI and decides on bit 7. | unknown |
$40A3 | probably does not exist | bit 0 drives expansion pin 6 (power-on 0); other bits unknown, but they change the pulses on pin 79. JRA-PAT and Super Mario Club write $2F. |
$40A4 | probably does not exist | expansion port control: bit 1 drives pin 5 inverted, bit 2 drives pin 4 inverted (power-on 0); bit 0 and bits 3-7 unknown. No commercial software uses it. |
$40A5 | expansion inputs: bit 0 pin 9, bit 1 pin 8, bit 2 pin 7, bit 7 pin 11 (bits 3-6 unlikely to exist) | unknown |
$40A6 | M2 cycle counter, present value, low byte (counts down; like FDS $4020) | counter reload value, low byte |
$40A7 | counter present value, high byte (like FDS $4021) | reload value, high byte |
$40A8 | probably does not exist | IRQ control (like FDS $4022): bit 0 repeat flag (1 reloads automatically when the counter passes zero, 0 rolls over to $FFFF), bit 1 IRQ enable. Any write resets the counter to the reload value. Writing $02 was seen to pull /IRQ low and $00 high; acknowledge with a read of $40A2 first to stop it going low at once. |
$40A9 | an 8-bit value of unknown function that changes continuously when RF5C66 pin 45 is high (as if counting cycles); a read loads it into $40AA | unknown |
$40AA | the value last read from $40A9 | unknown |
$40AB | a read resets $40A9 to $00 | unknown |
$40AC | a read prevents the timed toggle on pin 69 (a high pulse of 11.9085 microseconds when this register has not been read for 12.4892 seconds, which is 2^28 cycles of the 21.47727 MHz crystal; the pulse repeats each 12.4892 s) | unknown |
$40AD | bit 7: the present value of CIRAM A10 | bit 7 mirroring (power-on 0): 0 vertical (CIRAM A10 = PPU A10), 1 horizontal (CIRAM A10 = PPU A11) |
$40AE | probably does not exist | bit 0 add-on RAM chip enable (power-on 1): 1 lets /CE go low for reads and writes in $6000-$7FFF (pin 28 high), 0 keeps it high so the RAM cannot be used (pin 28 low). See also $40C0 bit 0. |
$40B0 | a read resets the kanji auto-increment counter | bit 0 kanji bank (power-on 0) |
$40B1 | the input values of the pins written: bits 0-2 modem module pins 29, 32, 31; bit 3 RF5C66 pin 63 (normally unconnected); bits 4-7 expansion pins 15, 14, 13, 12 | outputs (all power on as 1; they rise slowly and fall fast): bits 0-2 modem module pins 29, 32, 31; bit 3 CPU2 reset on new revisions (CPU2 runs when it is 0); bits 4-7 expansion pins 15, 14, 13, 12 |
$40C0 | bit 0 pin 31 (from the CIC key chip pin 10, or grounded without a CIC: always seen low); bit 1 pin 32 (CIC pin 15: always low); bit 2 pin 33 (CPU2 reset fed back, for all models); bit 3 pin 34 (the selected CHR RAM bank); bit 7 pin 29 (/CPU R/W inhibit from CIC key pin 11, or high without a CIC: 1 = writes to the card, add-on RAM and $40Dx allowed, 0 = blocked, and a CIC that fails the check latches 0 until the power is cycled). All software waits for bit 7 = 1 at start-up. Why bits 0 and 1 never go high is unknown (theories: detecting different lock chips, a transient at power-on, or a CIC error state). | outputs (power-on 0): bit 0 add-on RAM chip enable (it always follows this bit, whatever the address); bit 1 unconnected; bit 2 CPU2 reset on old revisions (runs when 1; see $40B1 bit 3); bit 3 CHR RAM bank select (picks one of the two 8 KiB CHR RAM chips) |
The RF5A18’s Famicom-side registers $40D0-$40D6 are listed in the next section. Registers not listed ($40AF, $40B2 to $40BF, $40C1 to $40CF) are not described on the wiki.
RF5A18 registers (Famicom side)
| Address | Read | Write |
|---|---|---|
$40D0 | the byte CPU2 wrote to its $4123 | a byte that CPU2 reads at its $4123 (data byte 0) |
$40D1 | the byte CPU2 wrote to $4124 | data byte 1, read by CPU2 at $4124 |
$40D2 | the byte CPU2 wrote to $4125 | data byte 2, read by CPU2 at $4125 |
$40D3 | bits 7-5: the three-bit acknowledge value CPU2 wrote to $4122 (bits 4-0 unlikely to exist) | bits 7-5: an acknowledge value that CPU2 reads at $4122 (bits 4-0 unknown) |
$40D4 | tone receiver and expansion I/O: bit 0 pin 65 (expansion pin 17, open-drain), bit 1 output value of pin 67 (expansion pin 19, push-pull), bit 2 pin 66 (expansion pin 18, open-drain), bit 3 Tone Rx D1, bit 4 D2, bit 5 D4, bit 6 D8, bit 7 DV (data valid) | bits 0, 1 and 2 drive pins 65, 67 and 66; the rest unknown |
$40D5 | clocks, derived from the 19.6608 MHz CPU2 crystal and asynchronous to the Famicom, so they may serve as a random source: bit 5 is a 0.05% duty 1.200 kHz pulse (crystal / 16384; negative pulse 406 ns); bit 4 a 50% square wave of 19.20, 38.40, 76.80 or 153.6 kHz (crystal / 1024, 512, 256 or 128, chosen by CPU2 $4114 bits 1-0); bit 3 307.3 kHz (/64); bit 2 2.451 MHz (/8); bit 1 4.902 MHz (/4); bit 0 9.804 MHz (/2). Bits 7 and 6 unlikely to exist. | unknown |
$40D6 | UART status: bit 1 is not CPU2 $4112 bit 0 (0 = a received byte is ready); bit 2 is not $4112 bit 1 (0 = the transmit buffer can be written; it also follows the transmit-ready bit); bit 3 is not ($4113 bit 1 OR bit 2); bit 4 is not $4113 bit 7 (1 = transmit repeat); bit 5 is not $4113 bit 6; bit 0 exists but is unknown | unknown |
Communication. The four registers $40D0-$40D3 are separate registers in each direction: the Famicom only sets what CPU2 reads, and CPU2 only sets what the Famicom reads, so reading back right after a write returns what CPU2 left, not the value written. Messages go both ways, three bytes at a time through $40D0-$40D2, with flow control by the status and acknowledge flags in $40D3. CPU2 collects the chunks in its RAM from $0401; a message is at most 255 bytes, probably fewer. Each message is a command byte, a byte count and a byte that most commands ignore and do not count. There are 25 command bytes in a table at CPU2 ROM $FB52, with a function pointer table at $FBB2 and a table of the modes each command is allowed in at $FB6B; the mode byte is at CPU2 RAM $0051 (modes 0 to 5; command $03 also allows 6 and 7) and is probably used to enforce the order of commands.
CPU2: the RF5A18’s 65C02
CPU2 is a 65C02 with the bit set, clear and branch instructions, with its own buses, which the Famicom cannot see. Its reset is wired differently by revision. To start it on any revision, write both $40B1 bit 3 = 0 (new revisions, and old ones with jumper J1 closed) and $40C0 bit 2 = 1 (old revisions with J2 closed). Two memory maps exist, chosen by RF5A18 pin 26, which is tied to ground on the board:
pin 26 low (default) pin 26 high
$0000-$1FFF CPU2 RAM (8 KiB chip U6) same
$2000-$40FF returns the last fetch same
$4100-$413F CPU2 control registers same
$4140-$BFFF returns the last fetch same
$C000-$DFFF external ROM (not used) external ROM (the whole $C000-$FFFF)
$E000-$FFFF internal 4 KiB ROM (internal ROM off: open bus)
With pin 26 high the whole of $C000-$FFFF can be a custom external ROM with its own vectors. Pin 24 held high at power-on stops CPU2; driving it low fetches the reset vector, so it works as a reset at any time. Pin 25 low sends the address bus to $FFFF and makes bits 2, 5, 6 and 7 of the data bus toggle (period 208.7 microseconds, low for 7.93).
| Address | Function (W = write, R = read) |
|---|---|
$4100, $4101 | W: NMI timer 1 period, low and high byte. Seconds times 1200 is the 16-bit value; one count is 2048 CPU cycles. |
$4102 | W: timer 1 control: bit 0 loop (1 loops, 0 one-shot), bit 1 restart (1 restarts it with the period). The period registers survive a run. NMI fires when it expires if $412F bit 0 is set. Behaviour when both bits are set while running is untested. |
$4103 | R: bit 0 timer 1 NMI flag (1 = triggered); a read probably acknowledges it. It does not show the external NMI on pin 29. |
$4104, $4105 | W: IRQ timer 2 period, low and high byte. Seconds times 2,457,600 is the 16-bit value; one count is one CPU cycle. |
$4106 | W: timer 2 control: bit 0 loop, bit 1 restart (the wiki marks the restart behaviour as theory). IRQ fires when it expires if $412F bit 6 is set. |
$4107 | R: bit 1 probably the timer 2 IRQ flag; a read probably acknowledges it. |
$4110 | R/W: UART data. A write (7 or 8 bits) clears the transmit-ready flag and sends the byte on the line to the modem chip’s TXD; a read clears the receive-ready flag. Received data raises an IRQ ($4112 bit 0). Writes are blocked by the built-in ROM in modes 0 and 5. |
$4111 | R/W UART configuration (reads back what was written): bit 0 receive enable, bit 1 transmit enable, bit 2 baud scaler (0 multiplies the rate by 4), bit 3 data bits (0 = 7, 1 = 8), bit 4 transmit stop bits (0 = 1, 1 = 2; not enforced on receive), bit 5 parity bit used, bit 6 parity type (0 odd, 1 even), bit 7 send a break (manual; no effect on receive). Bits 2, 3, 5 and 6 apply to both directions. |
$4112 | R: bit 0 receive buffer ready, bit 1 transmit buffer ready, bit 2 transmit idle (1 idle), bit 4 parity error, bit 5 framing error, bit 6 break received (always with a framing error). W: bit 1 transmit silence (0 holds the line idle-high, 1 allows data), bit 7 acknowledge the receive IRQ and clear the error bits. |
$4113 | W: bit 1 and bit 2 feed Famicom $40D6 bit 3, bit 6 feeds $40D6 bit 5, bit 7 transmit repeat (1 sends once, 0 sends repeatedly; feeds $40D6 bits 2 and 4). Other bits unknown. |
$4114 | W: bits 1-0 baud rate divider; with $4111 bit 2 the rate is 1200, 2400, 4800 or 9600 baud (bit 2 = 0, divider 0 to 3) or 300, 600, 1200 or 2400 baud (bit 2 = 1). It also sets the frequency of $40D5 bit 4. |
$4120, $4121 | The modem chip’s bus (an Oki MSM6827L): $4120 W: bits 0-1 AD0 and AD1, bit 3 /RD, bit 4 /WR, bit 5 EXCLK, bit 6 data direction of pin 32 (1 input, 0 output), bit 2 unconnected; R: bit 7 is the chip’s /INT pin. $4121 W: bit 0 the data pin when it is an output (it floats as an input; when input the read bit is always 1). |
$4122-$4125 | The Famicom interface, read by the Famicom at $40D3 (bits 7-5), $40D0, $40D1 and $40D2. The read and write directions are separate registers. |
$4126 | R: bit 0 pin 47 (+5 V), bit 1 pin 48 inverted (+5 V), bit 2 pin 49 (from the RF5C66, its pin 69), bits 3 and 4 the switch SW1 positions 2 and 4 (SW1 chooses pulse or DTMF dialling), bits 5, 6 and 7 modem connector pins 25, 28 and 23. |
$4127 | W: bit 0 modem +reset, bit 1 /red LED, bit 2 /green LED, bit 3 unconnected, bit 4 /phone off hook (low = off hook, and the pulse-dialling pulses), bit 5 /DTMF output enable (low while DTMF digits are dialled), bit 6 /phone audio enable (low while modem sounds play through the television), bit 7 modem connector pin 19 (always high). |
$4128 | R: bit 0 is the tone receiver’s GT pin (written), bits 3 to 7 read the tone receiver pins D1, D2, D4, D8 and DV. |
$4129 | Port P5 (old revisions): W: bits 3-0 a data nibble for the device, bits 5-4 sequencing of the writes; R: bits 5-0 controlled by the device (the ROM never reads it). The data bus floats on reads. Bits 6 and 7 are not on the connector; the P5 /CE goes low for writes. |
$412F | W: bit 0 timer 1 NMI enable, bit 4 modem /INT IRQ enable, bit 5 tone receiver DV IRQ enable, bit 6 timer 2 IRQ enable, bit 7 UART receive IRQ enable. R: bit 4 is not the /INT pin, bit 5 is set by an IRQ triggered from $412F bit 5 (probably the DV flag), bit 6 is the IRQ flag (1 = pending). The ROM clears bit 0 right after SEI and sets it before CLI. None of the bits stop an external NMI (pin 29 low) or IRQ (pin 28 low). The modem /INT low or DV high triggers an interrupt. |
$4130-$4133 | W: serial bit streams (bit 0 of the written value), most significant bit of each byte first. $4130 sends the buffer at RAM $0330, $4131 the buffer at $0360, $4132 the buffer at $0390 (40 bytes and the top 6 bits of the 41st: 326 bits each) and $4133 the buffer at $0320 (4 bytes and the top 4 bits of the 5th: 36 bits). Commands $10, $11 and $6A fill these buffers. |
$4134, $4135 | $4134 R: serial data read one bit per read (bit 0), most significant bit first; the ROM reads 40 bytes and 6 more bits into RAM from $03C0 (the 41st byte has bits 7-2 set, bits 1-0 zero). $4135 R: bit 0 data ready (the ROM uses it as a flag only). |
$4136, $4137 | W: the ROM writes $00 to $4137, then the streams to $4130-$4133, then $00 to $4136. Theory: $4137 clears the bit counters and old data, and $4136 starts the use of the new data. |
The serial streams in $4130-$4137 are used by commands $10 and $11; what the data means is not known.
Commands read by the Famicom
| Byte | What it is |
|---|---|
$80 | the reply to command $00: $80, $01, $00, status; the status is the connection status byte below. On success the mode becomes 2, otherwise 0; it arrives in mode 1, by NMI. |
$81 | probably the reply to command $01: $81, $01, $00, status, only in mode 3, by NMI. What triggers it is unknown. |
$82 | probably the reply to command $02: $82, $01, $00, status; $00 means success (mode becomes 2) and any other value failure (mode becomes 0); only in mode 4, by NMI. |
$83 | the reply to command $03 (see there). |
$90, $91, $92 | the replies to commands $10, $11 and $12. |
$C0 | UART receive packet: $C0, N, parameter, N bytes in mode 2, by IRQ. The parameter comes from CPU2 RAM $0024, and the bytes are data read from $4110 (one byte per IRQ, the most recent read first) from the modem chip; N does not count the parameter. A second form $C0, $01, $00, parameter (parameter $00 or $01) is sent when the modem disconnects abruptly; what triggers it is unknown. |
$C1 | tone receiver packet. One nybble: $C1, $01, $80, nybble (the nybble is ($4128 >> 3) AND $0F). More: $C1, N, parameter, bytes, each byte packing two nybbles; the parameter is $00 or $01 from RAM $007A (theory: an even or odd number of nybbles); N does not count it. |
$E1 | CPU2 could not accept a command. For an invalid command or one not allowed in the present mode the reply is $E1, $03, ?, $00, invalid command, byte 1 (the third byte can hold an artefact of the last reply; JRA-PAT read E1 03 (00) 00 01 01 after command $01 following a failed connection). For an invalid byte count it is $E1, $03, $00, $01, command, byte 1. |
$F0 | the reply to command $7C. |
Commands written by the Famicom
Message layout: command byte, byte count, a byte that is usually ignored (called xx), then the data. “Modes” are the CPU2 modes in which the command is accepted; the handler address is in CPU2 ROM. The wiki says most descriptions are incomplete.
| Cmd | Handler | Count | Modes | What it does |
|---|---|---|---|---|
$00 | $F43A | 0 to 60 | 0 | Hook and dialling sequence: the data is a string of one-byte commands run in mode 1. $00-$1F ignored; $20 wait up to 3 seconds for the dial tone to stop (status $03 if it never does); $21 DTMF dialling; $22 pulse dialling at 10 pps; $23 pulse dialling at 20 pps; $24 audio output on; $25 audio off; $26 hang up; $27 off hook; $28-$2F ignored; $30 dial 0 (10 pulses); $31-$39 dial 1 to 9; $3A dial D (no pulses); $3B dial * (11 pulses); $3C dial # (12); $3D A (13); $3E B (14); $3F C (15); $40-$7F unknown but not ignored; $80-$FF wait 0.2 to 25.6 seconds in steps of 200 ms. All known software uses it to open a connection. The reply is $80 with the connection status. |
$01 | $F46C | 1 | 2 | Unknown. The parameter $00 writes $00 to CPU2 RAM $0031, any other value writes $02 there. JRA-PAT and PiT Motorboat Race use it to close a connection (01 01 (00) 01). It starts NMI timer 1 (period 6, about 5 ms, one-shot), changes to mode 3 and probably produces reply $81. |
$02 | $F48A | 2 | 0 | Unknown. Parameter 0 goes to RAM $002E, parameter 1 to $002B and $002C; nine zero-page bytes are cleared; NMI timer 1 starts as in $01; mode 4; probably produces reply $82. |
$03 | $F4BB | 0 | 0-7 | System revision and status. Reply $83, $0A, $00, then: ROM revision (from CPU2 ROM $FFF9, seen as 3), the 16-bit ROM checksum (a sum of every ROM byte, made at boot by the routine at $FD7D), $4121 AND $3F (with bit 7 set if RAM $0023 is not 4), $4126, the last value written to $4127, the present mode, the number of 256-byte blocks queued in RAM $1300-$1FFF, and RAM $0076 and $0077. Super Mario Club read 83 0A 00 03 0C AF A1 FB FE 00 0D 00 00 at power-on; JRA-PAT read the same with 81 in place of A1. |
$10 | $F71A | 40 | 0, 2, 5 | Unknown $413x function: like $11 but with fixed data from ROM. The parameter byte ($00-$0F: ROM tables chosen by its bits copy 40 bytes to RAM $0360 and $0390; the 40 data bytes go to $0330; five fixed bytes 01 40 50 00 60 go to $0320) is not counted. The command writes $00 to $4137, shifts the four buffers into $4130-$4133 one bit at a time, writes $00 to $4136, and replies $90, $28, parameter, 40 bytes from RAM $03C0. Parameter $10 skips the ROM copies if RAM $0055 is 0 and otherwise aborts. The ROM tables are in the command $10 ROM tables section below. |
$11 | $F75C | 127 | 0, 2, 5 | Unknown $413x function: a 5-byte chunk (its first byte is used here but not counted) goes to RAM $0320 with bit shifting and byte swapping, and three 41-byte chunks go to $0330, $0360 and $0390. The rest is as $10. Reply $91, $29, parameter, 41 bytes from $03C0. |
$12 | $F773 | 3 to 252 | 0, 2, 5 | CRC calculator: $12, N, initial, polynomial 1, polynomial 2, N-2 data bytes. Reply $92, $02, $00, CRC 2, CRC 1. The initial byte is not counted. See the CRC section. |
$40 | $F7AF | 1 to 252 | 2 | Unknown (theory: send a UART transmit packet to the modem chip, linked to reply $C0). Copies the N-1 data bytes into memory at the location plus 2 of the pointer at CPU2 $0000-$0001, the byte count to plus 1, and $FF to the pointed location. What sets the pointer is not known. |
$41 | $F7D0 | 1 to 100 | 5 | Unknown (theory: concerns the tone receiver, linked to reply $C1). Writes (count + 2) * 2, $00 and $0F and then each data byte as two nybbles (high first), then the value of RAM $007C as two nybbles and $FF, through the same pointer as $40. |
$60 | $F829 | 6 | 0 | Unknown. The six data bytes (the first is used and counted) go to CPU2 RAM from $84. PiT Motorboat Race uses it to open a connection (60 06 00 01 80 00 00 00). |
$61 | $F839 | 0 | 1, 3, 4 | Disconnect: the modem is cut off at once, timer 1 is stopped ($4102 = 0) and the mode becomes 0. |
$62 | $F849 | 1 | 0, 2, 5 | Unknown: parameter $00 or $01 (other values abort); interrupts are disabled while it runs; it seems to write $4120. |
$63 | $F887 | 0 | 0-5 | No operation (only the count is checked). |
$64 | $F88D | 1 | 0, 2, 5 | Modem off-hook control: $00 saves the mode and changes nothing, $01 sets $4127 bit 4 low (off hook), $02-$FF sets it high (hang up). The value is kept in RAM $004E. PiT Motorboat Race uses it to close a connection. The wiki calls this description fairly complete. |
$65 | $F89D | 2 | 0, 2, 5 | Modem audio enable and pin P4-19 control: the first parameter $00 saves only, $01 sets $4127 bit 6 low (audio to the television), $02-$FF sets it high (saved in $004F); the second does the same for bit 7 (modem pin P4-19), saved in $0050. Heart no Benrikun Mini uses it when closing a connection (65 02 (00) 02 00). Fairly complete. |
$66 | $F8B7 | 2 | 0, 2, 5 | LED control: red then green LED mode: $00 saves only, $01 LED on, $02-$7F off, $80-$FF controlled by the network status (saved at $004C and $004D). PiT Motorboat Race uses it when closing a connection. Fairly complete. |
$67 | $F8D1 | 2 | 0, 5 | Unknown. Parameter 0 = $00 cuts off the modem, zeroes RAM $0076 and $0077 and changes to mode 0. Otherwise parameter 0 goes to RAM $74 and parameter 1 to $75, the green LED, the phone off-hook pin and the phone audio pin are refreshed from their modes, RAM $76, $77, $37, $39, $38 are zeroed, the queue of outgoing modem messages in RAM $1300-$1FFF (each message has $100 bytes, the count is at $0100) and the tone receiver buffer $0500-$05FF are cleared, and the mode becomes 5. |
$68 | $F912 | 1 | 0, 5 | Unknown. Three code paths by the parameter: below $10, equal to $FF, and every other value. |
$69 | $F951 | 10 | 0 | Unknown: ten data bytes go to CPU2 RAM from $8A; if the sixth ($8F) is above $FC it is replaced by 1. PiT Motorboat Race sends 69 0A (00) 00 04 14 1D 28 80 00 30 26 21 when opening a connection and JRA-PAT sends the same with 30 in place of 80 at power-on. |
$6A | $F96F | 80 | 0, 2, 5 | Unknown $413x function: copies a 40-byte chunk to RAM $0360 and the two’s complement of each byte of a second 40-byte chunk to $0390, zeroes $0388 and $03B8 and writes $10 to RAM $0055. It does not touch the buffers at $0320 and $0330 and starts no $413x operation. Fairly complete. |
$7B | $F994 | not checked | 0-5 | Software reset: refreshes the green LED, disables interrupts, writes $00 to $412F, compares some memory and resets with the reset type code $09 stored at $00FF. |
$7C | $F9AC | 5 | 0-5 | Arbitrary memory read: $7C, $05, xx, CRC 1, CRC 2, address MSB, address LSB, N. Reply $F0, N, $00, N bytes. It gives no reply if the address high byte is $80 or more (perhaps to prevent a ROM dump) or if N is $39 or more. |
$7D | $F9D9 | 5 or more | 0-5 | Arbitrary memory write: $7D, N, xx, CRC 1, CRC 2, address MSB, address LSB, N-4 data bytes; also writes $00 to RAM $006E. Super Mario Club uses it on its welcome screen, and JRA-PAT at power-on, to put a short program (starting at $0104 or $0102, the far end of the stack) into CPU2 RAM. The wiki gives both messages and their CRC bytes (07 60 and EC AD). |
$7E | $F9FE | 5 | 0-5 | Unknown: $7E, $05, xx, CRC 1, CRC 2, three parameters. Writes a lot to $4120 and $4121 and to $4127 bit 5 (/DTMF output enable). |
$7F | $FA16 | 5 | 0-5 | Unknown: $7F, $05, parameter 0, CRC 1, CRC 2, three more parameters (parameter 0 is not counted). If parameter 0 is $00-$7F, $0C is written out of the P5 expansion port; if $80-$FF, RAM $0240-$027F is sent out of it, one nybble at a time. Parameters 1, 2, 3 and 0 go to RAM $B7, $B6, $B8, $B5. |
The CRC key bytes
Command $12 computes a CRC-16 of its data with the polynomial given by polynomial 1 and polynomial 2 (in reciprocal form: for the usual $8005, polynomial 1 is $40, polynomial 2 is $03, initial $00), with the initial byte in both halves of the starting value, calculated least significant bit first (“reflected”). Commands $7C, $7D, $7E and $7F carry two key bytes, CRC 1 and CRC 2: a CRC-16 is calculated backwards over the message, from its last byte to CRC 1, with the polynomial $8385 and the start value $35AC, least significant bit first, and the command is ignored unless the result is 0.
Connection status byte
Replies $80, $81 and $82 carry a code kept in CPU2 RAM $0052: $00 is success and everything else a failure. Super Mario Club shows it as the error number 40xx, where xx is the byte, and its manual gives the advice below (translated from the Japanese manual of Kangyou Sumimaru no Famicom Trade).
| Byte | Error | Meaning and advice |
|---|---|---|
$00 | none | The connection succeeded. |
$01 | 4001 | No dial tone was detected. Is the phone line connected, or is your phone in use? |
$02 | 4002 | An incoming call is being received. Use it again. |
$03 | 4003 | The pulse or tone setting is wrong. Set the line selector switch on the back of the adapter. |
$04 | 4004 | The “0” outgoing call setting is wrong. Is the line available, or does your phone dial a prefix? |
$05 | 4005 | The DDX-TP connection finished earlier than expected. Call 113 to ask NTT whether the DDX work is complete. |
$06, $07 | 4006, 4007 | Unknown. |
$08 | 4008 | The server was busy, disconnected or rejected the password. As 4005. |
$09 | 4009 | The server was busy. |
$0A, $0B, $0C | 400A, 400B, 400C | The DDX-TP registration is wrong or the server disconnected. Try again; if it happens often, call the NES Trade office. |
$0D | 400D | A problem with the telephone line connection. |
$0E | 400E | A problem with the telephone line connection or the server. |
The values $0F and above are not described on the wiki.
Chips and connectors
RF5C66 (mapper and disk drive controller, 100-pin QFP, 0.65 mm). CPU address lines A0-A7, A12-A14, /ROMSEL, CPU R/W and M2 come in (pins 1 to 14); the CPU data bus is on pins 91 to 98 and the card data bus on pins 82 to 89. Pin 15 is the card R/W (a non-inverted buffer of CPU R/W, through the lid switch); pin 16 needs a 20 kilohm pull-up to 5 V to avoid a reset and seems tied to pin 29 (with pin 29 floating and pin 16 pulled up the chip ran for about 5 seconds); pin 17 is /IRQ; pins 20 and 21 are the 21.47727 MHz crystal; pin 26 outputs 3.58 MHz (the crystal divided by 6) for the CIC and the tone receiver; pin 28 follows $40AE bit 0; pin 29 is the CIC /CPU R/W inhibit; pins 30 to 32 go to the CIC key chip (12, 10, 15); pin 33 is the CPU2 reset feedback; pins 34 and 38 are the CHR RAM chip enables; pin 35 the add-on RAM +CE; pin 36 is $40C0 bit 1; pin 37 the old-revision CPU2 reset; pin 40 the add-on RAM /CE (low in $6000-$7FFF when M2 is high, whatever R/W); pin 41 the unused-device /CE ($4xE0-$4xEF, always); pin 42 the CPU2 /CE ($4xD0-$4xDF, always); pins 43 to 46 are grounded on the board but have protection diodes, so they are logic pins (45 and 46 high make pin 56 oscillate); pins 47 to 49 are CIRAM A10, PPU A11 and PPU A10 (CIRAM A10 follows PPU A10 by default); pin 50 is the kanji ROM /CE ($5000-$5FFF); pins 52 to 57 are the kanji ROM address lines A0 to A4 and A17; pins 60 to 62 and 71 to 79 and 64 to 67 go to the modem module and the expansion connector; pin 63 is $40B1 bit 3; pin 68 is the new-revision CPU2 reset; pin 69 goes to the RF5A18; pin 79 outputs a 95.95 kHz square wave (93.7% duty, negative pulse 650 ns; similar to the FDS bit rate; a standalone chip can also run at 341.2 kHz). Power is on pins 18, 59, 81 and 100 and ground on 23, 39, 70 and 90.
RF5A18 (CPU2 and modem controller, 100-pin QFP). CPU2 address lines A0-A12 are on pins 1 to 14 (A13-A15 unconnected), its data bus on 92 to 99, R/W on pin 20, the RAM chip enable ($0000-$1FFF) on pin 21, the external ROM /CE on pin 22, the P5 /CE ($4129 only) on pin 23, a reset input on pin 24 (grounded), pin 25 unknown (grounded), the internal ROM enable on pin 26 (grounded), CPU2 /RESET on pin 27 (from the RF5C66), /IRQ on pin 28 and /NMI on pin 29 (each with a 10 kilohm pull-up). Pins 32 to 39 are the modem chip bus (DATA, /INT, /RD, /WR, EXCLK, a spare, AD1, AD0), pins 44 and 45 the 19.6608 MHz crystal, 47 to 49 the $4126 inputs, 51 to 54 the switch and modem inputs, 55 the audio from the phone line, 56 the modem reset, 57 and 58 the LEDs, 60 to 63 phone hook, DTMF, phone audio and modem pin 19, 65 to 67 expansion pins 17 to 19, 68 to 73 the tone receiver (GT, D1, D2, D4, D8, DV), 74 to 77 and 79 to 82 the card data bus, 83 M2, 84 the card R/W (lid switch), 85 the /CE from the RF5C66, 86 to 88 CPU A0-A2, 89 and 90 the UART lines to and from the modem chip. Pin 42 outputs 4.92 MHz (the crystal divided by 4). Pin 19 is a 2.4576 MHz CPU2 M2 output (unconnected). Power is on pins 9, 31, 64 and 91 and ground on 18, 43, 46, 78 and 100.
LH5323M1 kanji ROM (44-pin QFP). Data pins to the CPU data bus; address pins A5 to A16 come straight from CPU A0 to A11 (A5 from CPU A0, A6 from CPU A1 and so on); A0 to A4 and A17 come from the RF5C66 (pins 52 to 57). /CE comes from RF5C66 pin 50 and /OE is grounded. The data bus is driven only when both pins 25 and 27 are low. Pin 17 seems to be the true ground (all logic pins have protection diodes from it).
CIC chips. The add-on has the key chip (8633, unlike the NES, where the key is in the console) and the tsuushin card has the lock chip (8634A). Both are 18-pin parts like the NES CIC; the key chip’s pin 11 is the /CPU R/W inhibit that goes to RF5C66 pin 29, pins 10 and 15 go to RF5C66 pins 31 and 32 (always seen low), pin 12 to RF5C66 pin 30, and the clock is the 3.58 MHz from RF5C66 pin 26. When the key drives pin 11 low the add-on stops by holding the card R/W high. The lock’s reset is wired to 5 V through a ceramic capacitor, giving a pulse at power-on, and its pin 11 goes to the key’s reset (pin 8). Pins and functions of the lock chip are assumed from the Super NES F411A. See the CIC page for the NES chip.
RAM chips. Three 8 KiB LH5268 SRAMs: the two CHR RAM chips U3 and U4 (chip enable by PPU A13 and RF5C66 pins 34 and 38, so one of them is selected by $40C0 bit 3), the add-on work RAM U5 (/WR is the card R/W through the lid switch, +CE is the RAM +CE, /CE is the built-in RAM /CE, /OE grounded) and the CPU2 RAM U6 (/WR is CPU2 R/W, /CE the CPU2 RAM /CE).
P4, the modem module connector (36 pins). Pins 1, 12 and 15 are +5 V; 4, 26, 35 and 36 ground; 2 modem +reset, 3 AD0, 5 AD1, 6 RXD, 7 DATA, 8 TXD, 9 /WR, 10 EXCLK, 11 /RD, 14 /INT; 13, 16, 17 and 18 tone receiver D1, D2, D8 and D4; 19 RF5A18 pin 63; 20 tone receiver GT; 21 /phone audio enable; 22 tone receiver DV; 23 the audio from the phone line (to RF5A18 pin 55); 24 the tone receiver clock from RF5C66 pin 26; 25 and 28 RF5A18 pins 53 and 54; 27 /phone off hook; 29, 31 and 32 RF5C66 pins 60, 62 and 61; 30 /DTMF output enable; 33 audio from the 2A03; 34 audio to the RF. The module uses an Oki MSM6827L modem chip and an MC14LC5436P dual tone receiver.
P2, the tsuushin card connector (42 pins; the pitch is 0.040 inch although it looks like 1 mm). 1 and 2 +5 V; 3, 4, 31, 32, 34 and 39 unconnected on the JRA-PAT card (the add-on has 10 kilohm pull-ups on 4, 31, 32 and 39); 5 to 12 card data D0 to D7; 13 card R/W (lid switch); 14 M2; 15 /ROMSEL; 16 to 30 CPU A0 to A14; 33 the lock CIC pin 12 on JRA-PAT; 35 the CIC key reset; 36 lock to key data; 37 key to lock data; 38 the CIC clock; 40 RAM +CE (unconnected on JRA-PAT); 41 and 42 ground.
P3, the expansion connector (20 pins). 1 /IRQ in, 2 the 95.94 kHz clock (RF5C66 pin 79), 3 to 9 RF5C66 pins 78 to 72, 10 ground, 11 RF5C66 pin 71, 12 to 15 RF5C66 pins 67 to 64, 16 RF5A18 pin 42 (4.92 MHz), 17 to 19 RF5A18 pins 65 to 67, 20 +5 V. P5 (old revisions only, 9 pins): 1 +5 V, 2 the P5 /CE (low at CPU2 $4129), 3 to 8 CPU2 D0 to D5, 9 ground. CN07 (the Dataship 1200 AV port, the Game Boy link cable shape): 1 +5 V, 2 audio, 4 video, 5 and 6 ground; the official AV cable uses pins 2, 4 and 5 and the official RF cable pins 1, 2, 4, 5 and 6. Pin 4 is often missing from link cables, so an aftermarket cable must be chosen with care.
Command $10 ROM tables
Command $10 (see the command table above) fills RAM $0360 and $0390 from tables in the CPU2 ROM instead of taking the data from the message, then shifts the four buffers into the $413x registers. Every table is 41 bytes, written here in hex; the wiki shows the data as the bytes the registers later receive. The table for $0360 is chosen by the low three bits of the parameter byte (register $4131) and the table for $0390 by the low two bits (register $4132). The 41st byte of each is $00 (the routine stores $00 there). The buffer at $0330 (register $4130) holds the 40 bytes of the message with its first and 41st byte set to $00, and the buffer at $0320 (register $4133) always holds the five bytes 01 40 50 00 60.
Table for $0360 (parameter bits 2 to 0)
| Parameter bits | 41 bytes |
|---|---|
xxxxx000 | 00000c6bbc41351b1e0fa372963f7af704415090ee9a139ff87c60ca610dec66f74bd5b992c8868300 |
xxxxx001 | 0000027473468ebd1f161331ad0e5512ba56487f7b30037dac78ed9c51b308b6d8c597ca8b59cc1300 |
xxxxx010 | 000001c89b4630b518cbc342a45282fa0908773df56830150ec1955c9ec1abbd1100d4d878604afd00 |
xxxxx011 | 00000939c25f1859304000e9fdab927959a49d1acdd136da4ddb2b551b2bc942a36077d1d09dbc3500 |
xxxxx100 | 3cfed7ad4cd7435c3544144572d1d0e83d1859864bf8c7412cac015ced49a1cabce13fbd6262af0b00 |
xxxxx101 | 8aac02df739c8c0a2572493bd95755450b06ea0d77f1f08bc665636ed3cf317cb89f6f301ef03a2f00 |
xxxxx110 | 39b07c4f12614dadb4eb214af3a6a0dc046b47d10c184b04d16c91d9eeb5e0c21a052529738c6f0100 |
xxxxx111 | 36a6a31fa79ba49a9f1d1985c640ad9a6c79a4195d06ece8726fc006e1d347efa5d129cdb79017b900 |
Table for $0390 (parameter bits 1 and 0)
| Parameter bits | 41 bytes |
|---|---|
xxxxxx00 | 882a14099f3f32b2419d0b09237a252ece6534274700628043a6df86657a84c0c4463fa72b49ad4900 |
xxxxxx01 | bbb57552f19d8a71d6ed68fd037188b700eab270071acedc624ff4c64b53ed1c4e1046ed89e775fd00 |
xxxxxx10 | cfb8e78ec54b81a1100f02f524acf0e05a45cc36a98f161c115a41082abb587ecabad5453511877100 |
xxxxxx11 | aa189432166db82500fffbb1107ced2469b12f0959b263c63a0332bb4a8e6ea378a0a47150cb296100 |
Source: the “ROM Data” block of command $10 on the NESdev Wiki page Family Computer Network System (raw wikitext saved as Family_Computer_Network_System.wiki); the data is copied exactly, our words are only the labels. The meaning of the data is not known (the page calls the function “unknown”).
Not described
Known, not yet covered: the exact bytes of the two example $7D messages are on the wiki and are not copied here; the bench-test notes (“Reference Data”) under each register are on the wiki; the wiki lists games and cards on other sites (the Niwa Network tsuushin cartridge pages), which are not summarised here.
Unknown (the wiki says so): the function of RF5C66 $40A0, $40A1, $40A3, $40A4 bits, $40A9 to $40AC; how a disk drive would be used; the meaning of the 41-byte data streams in CPU2 $4130-$4137; the purpose of commands $01, $02, $40, $41, $60, $62, $67, $68, $69, $7E and $7F; the packet contents beyond the byte layout; the connection status values $06 and $07.
Sources
- NESdev Wiki: Family Computer Network System
- NESdev Wiki: Famicom Network Controller
- NESdev Wiki: Family Computer Network Adapter
The NESdev Wiki text is available under CC BY-SA 3.0. This page is written in our own words from the raw wikitext kept in samples/nes/sources/hardware/Family_Computer_Network_System.wiki.