Famicom Network System: Difference between revisions
(- Updated naming of CIC signals. Verified $40C0 bits 7, 1, and 0 were listed correctly.) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
=LH5323M1 Kanji Graphic ROM= | =LH5323M1 Kanji Graphic ROM= | ||
The LH5323M1 is a 256kByte graphics ROM containing primarily Kanji data that is mapped at $5000-5FFF. Each index in this range is a 32-byte space containing 16x16 1bpp graphics, usually for a single character, and each read automatically advances to the next byte in the sequence. There are 2 128kByte banks, and the low bank is default at power-on. Writing 1 to $40B0.0 selects the high bank. Reading from $40B0 resets to the beginning of the 32-byte sequence. Writing $40B0 does not reset the sequence however. No values written to $40B0 have been observed to arbitrarily change or reset the position in the sequence. | The LH5323M1 is a 256kByte graphics ROM containing primarily Kanji data that is mapped at $5000-5FFF. Each index in this range is a 32-byte space containing 16x16 1bpp graphics, usually for a single character, and each read automatically advances to the next byte in the sequence. There are 2 128kByte banks, and the low bank is default at power-on. Writing 1 to $40B0.0 selects the high bank. Reading from $40B0 resets to the beginning of the 32-byte sequence. Writing $40B0 does not reset the sequence however. No values written to $40B0 have been observed to arbitrarily change or reset the position in the sequence. Commercial software has been observed to use throwaway reads when accessing data that does not start at the beginning of the 32-byte area. | ||
The Kanji ROM chip is connected directly to the non-buffered Famicom CPU data bus. Writes in the range $5000-5FFF do activate Kanji ROM /CE and are subject to bus conflict. | |||
=Expansion Audio= | =Expansion Audio= | ||
Line 108: | Line 110: | ||
|- | |- | ||
! $4xE0-$4xEF | ! $4xE0-$4xEF | ||
| {{yes|CPU <- Card}} || {{yes|CPU -> Card}} || Unused device registers, /CE at RF5C66 pin 41 | | {{yes|CPU <- Card}} || {{yes|CPU -> Card}} || Unused device registers{{Sup|1}}, /CE at RF5C66 pin 41 | ||
|- | |- | ||
! $4xF0-$4xFF | ! $4xF0-$4xFF | ||
Line 114: | Line 116: | ||
|- | |- | ||
! $5x00-$5xFF | ! $5x00-$5xFF | ||
| {{no|CPU -> Card}} || {{yes|CPU -> Card}} || Kanji graphic ROM, /CE at RF5C66 pin 50 | | {{no|CPU -> Card}} || {{yes|CPU -> Card}}{{Sup|2}} || Kanji graphic ROM, /CE at RF5C66 pin 50 | ||
|- | |- | ||
! $6x00-$7xFF | ! $6x00-$7xFF | ||
Line 124: | Line 126: | ||
|} | |} | ||
{{Sup|1}} Address range $4xE0-$4xEF was meant for a second device similar to CPU 2. Since that device doesn't exist, a tsuushin card could theoretically exploit those 256 addresses for its own purposes; for example, its own read/write registers. | |||
{{Sup|2}} Writes here are subject to bus conflict on the CPU data bus. | |||
=Known Registers= | =Known Registers= | ||
Line 3,388: | Line 3,392: | ||
- Pins 45-46, when pulled high, causes oscillation on pin 56. | - Pins 45-46, when pulled high, causes oscillation on pin 56. | ||
- 24, 28, 36, 37, 41, 63 are n/c on the PCB, but function as noted. | - 24, 28, 36, 37, 41, 63 are n/c on the PCB, but function as noted. | ||
- /CE Pins 40, 41, 42 behaviors: | - /CE Pins 40, 41, 42, 50 behaviors: | ||
- Pin 40 (Built-in RAM /CE) activates low in range $6000-7FFF, regardless of CPU R/W, but only when M2 is high. | - Pin 40 (Built-in RAM /CE) activates low in range $6000-7FFF, regardless of CPU R/W, but only when M2 is high. | ||
- Pin 41 (Unknown /CE) always activates low in range $4xE0-4xEF, regardless of CPU R/W and M2. | - Pin 41 (Unknown /CE) always activates low in range $4xE0-4xEF, regardless of CPU R/W and M2. | ||
- Pin 42 (RF5A18 CPU2 /CE) always activates low in range $4xD0-4xDF, regardless of CPU R/W and M2. | - Pin 42 (RF5A18 CPU2 /CE) always activates low in range $4xD0-4xDF, regardless of CPU R/W and M2. | ||
- Pin 50 (Kanji ROM /CE) activates low in range $5000-5FFF, regardless of CPU R/W. (It appears to go low only when M2 is high but not specifically proven.) | |||
- Pin 29: | - Pin 29: | ||
- If the FNS has a CIC chip, CIC-11 drives this pin high after 24.8msec, and remains high as long as the CIC authentication is successful. There is a low-pass filter in this case. | - If the FNS has a CIC chip, CIC-11 drives this pin high after 24.8msec, and remains high as long as the CIC authentication is successful. There is a low-pass filter in this case. |
Latest revision as of 23:35, 6 June 2024
System Overview
The Famicom Network System is a complicated device with its own memory mapping system and internal CPU. The RF5C66 chip provides the main mapper functionality, delegating its own registers at $40A0, RF5A18 Famicom registers at $40D0, an internal Kanji ROM at $5000, an internal 8kByte W-RAM at $6000. It also controls the bank of a built-in 16 KiB CHR RAM (using two 8 KiB CHR RAM chips).
The RF5A18 contains CPU2, which is a 65C02 processor with its own independent CPU clock. It has a built-in 4kByte ROM. This chip is responsible for controlling the modem communications. It communicates with the Famicom CPU through four bidirectional registers at $40Dx.
The Famicom Network System plugs into the Famicom through its cartridge connector and provides the user a ZIF style slot to insert a tsuushin card. The card is similar to a normal cartridge but does not have access to any PPU signals. Commercial cards are observed to have their own MMC1 memory mapper, which does not interfere with any of the registers of the Famicom Network System. CPU R/W and the CPU data bus are routed through the RF5C66 chip before making it to the card and other internal hardware. It effectively blocks the Famicom Network System from driving the data bus for certain regions of memory, and possibly also is intended to act as a bidirectional buffer / signal conditioner. It is also used for blocking writes when the lid switch is open or when the CIC fails. Older revisions of Famicom Network System also buffered the Famicom address bus with 74HC541 chips, so it is plausible that signal conditioning was a concern.
LH5323M1 Kanji Graphic ROM
The LH5323M1 is a 256kByte graphics ROM containing primarily Kanji data that is mapped at $5000-5FFF. Each index in this range is a 32-byte space containing 16x16 1bpp graphics, usually for a single character, and each read automatically advances to the next byte in the sequence. There are 2 128kByte banks, and the low bank is default at power-on. Writing 1 to $40B0.0 selects the high bank. Reading from $40B0 resets to the beginning of the 32-byte sequence. Writing $40B0 does not reset the sequence however. No values written to $40B0 have been observed to arbitrarily change or reset the position in the sequence. Commercial software has been observed to use throwaway reads when accessing data that does not start at the beginning of the 32-byte area.
The Kanji ROM chip is connected directly to the non-buffered Famicom CPU data bus. Writes in the range $5000-5FFF do activate Kanji ROM /CE and are subject to bus conflict.
Expansion Audio
The Famicom Network System does have expansion audio capabilities. The Famicom audio is routed through the modem module, but nowhere directly to either of the large ASICs. Dial tones have been observed through the television speakers. It is unlikely but unknown if there are other possible sources of sound.
Disk Drive Support
According to a block diagram with potentially dubious origins, the RF5C66 chip contains a disk drive controller. Similar design in several ways to the Famicom Disk System, it is suspected that a disk drive can be connected to the expansion port and controlled by the RF5C66. Since this feature was never used, it is unknown how to use or activate it, or even if that feature is fully implemented. The original FDS has a large DRAM that is not present as a discrete chip in the Famicom Network System. It is unknown if such a DRAM could be already integrated into the RF5C66, or could be attached externally and simply not populated, or if a special tsuushin card was to be constructed containing this RAM. All original FDS registers are notably absent and all discovered registers start immediately after where the FDS registers would normally be. There is no obvious path to produce FDS expansion audio. This remains a mystery presently.
One possibility if the RF5C66 follows a similar pinout to the FDS RP2C33:
79 / -> Exp P3-2 (reg unknown) Serial Out (observed 95.95kHz) 78 / <- Exp P3-3 (reg unknown) Serial In 77 / -> Exp P3-4 (!$40A4.2) Read / Write 76 / -> Exp P3-5 (!$40A4.1) Reset Transfer Timing 75 / -> Exp P3-6 ($40A3.0) Turn on Motor 74 / <- Exp P3-7 ($40A5.2) Write Protect 73 / <- Exp P3-8 ($40A5.1) Disk Not Ready 72 / <- Exp P3-9 ($40A5.0) Disk Missing 71 / <- Exp P3-11 ($40A5.7) Battery Health
Memory Map
+================+ $0000 - Famicom Internam RAM | Famicom | | Internal RAM | +----------------+ $0800 | (Mirrors of | | $0000-$07FF) | +================+ $2000 - Famicom PPU Registers | Famicom PPU | | Registers | +----------------+ $2008 | (Mirrors of | | $2000-$2007) | +================+ $4000 - Famicom APU, IO, and Test Registers | FC APU and IO | | Registers | +----------------+ $4018 | FC Test Mode | | Registers | +----------------+ $4020 | (Open Bus) | +================+ $40A0 - Famicom Network System Internal Registers | Famicom Modem | | RF5C66 | | Registers | +----------------+ $40D0 | Famicom Modem | | RF5A18 (CPU2) | | Registers | +----------------+ $40D8 | (Mirror of | | $40D0-$40D7) | +----------------+ $40E0 | Unused Device | | Registers | | (Open Bus) | +----------------+ $40F0 | (Open Bus) | +----------------+ $4100 | (Open Bus) | +----------------+ $41A0 | (Mirror of | | $40A0-$40FF) | +----------------+ $4200 | (Mirrors of | | $4100-$41FF) | +================+ $5000 - Famicom Network System Internal Kanji ROM | FNS | | LH5323M1 | | Kanji ROM | +================+ $6000 - Famicom Network System Internal RAM and Tsuushin Card RAM | FNS | | Internal RAM | +================+ $8000 - Tsuushin Card ROM Space | Tsuushin Card | | Space | | | +================+ $10000
Data Bus Behavior
The CPU data bus is buffered in both directions through the RF5C66 chip before making it to the tsuushin card and other internal hardware, with the exception of the Kanji graphics ROM and the RF5C66's own registers, which sit directly on the CPU data bus. It appears that the buffer goes from CPU Data Bus to Card Data Bus, or Card Data Bus to CPU Data Bus only. There has not been a high-impedance state observed when testing each possible address in read and write directions on a standalone RF5C66 chip. The CPU Data Bus and Card Data Bus were always observed to be equal despite attaching opposite pull-up and pull-down resistors.
When RF5C66 pin 29 is driven low by the master CIC chip's pin 11, it forces Card R/W always high, thereby preventing most RAM and register writes in the Famicom Network System. Potentially, the data bus buffer has an additional behavior in this mode in order to prevent bus conflicts. The lid switch also imposes such a behavior when the lid is open, but it does not appear that the RF5C66 has a way of knowing when the switch is open, so the bus conflicts do not appear to be prevented in that case.
The propagation delay of the CPU data bus buffer and CPU R/W buffer are measured to be about 16 nsec.
Address Range | Buffer Direction When Reading | Buffer Direction When Writing | Notes |
---|---|---|---|
$0x00-$4x1F | CPU -> Card | CPU -> Card | Famicom internal RAM and registers |
$4x20-$4x9F | CPU -> Card | CPU -> Card | (unknown; FDS registers exactly fit here) |
$4xA0-$4xCF | CPU -> Card | CPU -> Card | RF5C66 registers |
$4xD0-$4xDF | CPU <- Card | CPU -> Card | CPU 2 registers, /CE at RF5C66 pin 42 |
$4xE0-$4xEF | CPU <- Card | CPU -> Card | Unused device registers1, /CE at RF5C66 pin 41 |
$4xF0-$4xFF | CPU -> Card | CPU -> Card | (unknown) |
$5x00-$5xFF | CPU -> Card | CPU -> Card2 | Kanji graphic ROM, /CE at RF5C66 pin 50 |
$6x00-$7xFF | CPU <- Card | CPU -> Card | Famicom Network System internal RAM, /CE at RF5C66 pin 40 |
$8x00-$FxFF | CPU <- Card | CPU -> Card | Tsuushin card, /CE is /ROMSEL |
1 Address range $4xE0-$4xEF was meant for a second device similar to CPU 2. Since that device doesn't exist, a tsuushin card could theoretically exploit those 256 addresses for its own purposes; for example, its own read/write registers.
2 Writes here are subject to bus conflict on the CPU data bus.
Known Registers
Note: All registers available to the Famicom ignore address bits 8-11 because those bits are not physically connected to the RF5C66. Therefore, register $4xA0 has mirrors that exist at $40A0, $41A0 ... $4FA0. For simplicity, this page shows all registers as the $40xx mirror.
Address | Read Has Effect |
Read Has Data |
Write | Owner | Function | ||
---|---|---|---|---|---|---|---|
$40A0 | Unknown | No | Unknown | RF5C66 | No evidence has been found that this register does or does not exist. It is possible that it is a write-only register that is not used by any known Famicom Network System card. No reads or writes to this register were ever observed to have any effect. However, its apparent absence is suspicious enough to have this placeholder here.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40A1 | Unknown | Yes | Unknown | RF5C66 | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- Bits exist but function is unknown
| ||
$40A2 | Yes | Yes | Unknown | RF5C66 | IRQ Acknowledge, similar to FDS register $4030
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- Timer Interrupt (1: an IRQ occurred) ||||||+--- Bit exists but function is unknown ||||++---- (unlikely to exist) ++++------ Bits exist but function is unknown
| ||
$40A3 | Unknown | No | Yes | RF5C66 | Unknown Function.
Write 76543210 |||||||+-- EXP 6 = $40A3.0 (POR value = 0) +++++++--- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40A4 | Unknown | No | Yes | RF5C66 | Expansion Port Control
Write 76543210 |||||||+-- (unknown) ||||||+--- EXP 5 = !($40A4.1) (POR value = 0) |||||+---- EXP 4 = !($40A4.2) (POR value = 0) +++++----- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40A5 | Unknown | Yes | Unknown | RF5C66 | Expansion Port Input Data
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- Input value of EXP 9 ||||||+--- Input value of EXP 8 |||||+---- Input value of EXP 7 |++++----- (unlikely to exist) +--------- Input value of EXP 11
| ||
$40A6 | Unknown | Yes | Yes | RF5C66 | M2 Cycle Counter LSB, similar to FDS register $4020
Write 76543210 ++++++++-- Cycle counter reload value (LSB) Read 76543210 ++++++++-- Cycle counter present value (LSB)
| ||
$40A7 | Unknown | Yes | Yes | RF5C66 | M2 Cycle Counter MSB, similar to FDS register $4021
Write 76543210 ++++++++-- Cycle counter reload value (MSB) Read 76543210 ++++++++-- Cycle counter present value (MSB)
| ||
$40A8 | Unknown | No | Yes | RF5C66 | IRQ Control, similar to FDS register $4022
Write 76543210 |||||||+-- IRQ Repeat Flag ||||||+--- IRQ Enable ++++++---- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40A9 | Yes | Yes | Unknown | RF5C66 | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- Bits exist but function is unknown
| ||
$40AA | No | Yes | Unknown | RF5C66 | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- Bits exist but function is unknown
| ||
$40AB | Yes | No | Yes | RF5C66 | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40AC | Yes | No | Unknown | RF5C66 | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40AD | Unknown | Yes | Yes | RF5C66 | Mirroring Control
Write 76543210 |+++++++-- (unknown) +--------- Mirroring (POR value = 0) 0 = Vertical Mirroring (CIRAM A10 = PPU A10) 1 = Horizontal Mirroring (CIRAM A10 = PPU A11) Read 76543210 |+++++++-- (unlikely to exist) +--------- Present value of CIRAM A10
| ||
$40AE | Unknown | No | Yes | RF5C66 | Unknown Function.
Write 76543210 |||||||+-- Built-in RAM /CE control (POR value = 1) ||||||| 1 = Built-in RAM /CE enabled to go low for reads and writes in the range $6000-7FFF. ||||||| Pin 5C66.28 = 1 at all address ranges. (This pin normally n/c.) ||||||| 0 = Built-in RAM /CE is always high, preventing all reads and writes of the built-in RAM. ||||||| Pin 5C66.28 = 0 at all address ranges. (This pin normally n/c.) +++++++--- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40B0 | Yes | No | Yes | RF5C66 | Kanji Graphic ROM Control
Write 76543210 |||||||+-- Kanji ROM Bank Select (POR value = 0) +++++++--- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||
$40B1 | Unknown | Yes | Yes | RF5C66 | Modem Control
Write 76543210 |||||||+-- Modem Module pin 29 = $40B1.0, rises slowly, goes low fast (POR value = 1) ||||||+--- Modem Module pin 32 = $40B1.1, rises slowly, goes low fast (POR value = 1) |||||+---- Modem Module pin 31 = $40B1.2, rises slowly, goes low fast (POR value = 1) ||||+----- Pin 5C66.68: CPU2 Reset on new revision Famicom Network Systems (POR value = 1) |||| CPU2 /Reset = !($40B1.3) |||| CPU2 runs when $40B1.3 = 0. |||| See also $40C0.2. |||+------ Exp 15 = $40B1.4, rises slowly, goes low fast (POR value = 1) ||+------- Exp 14 = $40B1.5, rises slowly, goes low fast (POR value = 1) |+-------- Exp 13 = $40B1.6, rises slowly, goes low fast (POR value = 1) +--------- Exp 12 = $40B1.7, rises slowly, goes low fast (POR value = 1) Read 76543210 |||||||+-- Input value of Modem Module pin 29 ||||||+--- Input value of Modem Module pin 32 |||||+---- Input value of Modem Module pin 31 ||||+----- Input value of 5C66 pin 63 (normally n/c) |||+------ Input value of EXP 15 ||+------- Input value of EXP 14 |+-------- Input value of EXP 13 +--------- Input value of EXP 12
| ||
$40C0 | Unknown | Yes | Yes | RF5C66 | CIC Status, CHR Bank, and RAM Control
Write 76543210 |||||||+-- Pin 5C66.35 = $40C0.0 (POR value = 0) ||||||| RAM +CE Enable (1 = enabled, 0 = disabled) ||||||+--- Pin 5C66.36 = $40C0.1 (POR value = 0) |||||| (This pin normally n/c) |||||+---- Pin 5C66.37 = $40C0.2 (POR value = 0) ||||| Old Revision Famicom Network System: CPU2 /Reset (This pin n/c on newer revisions) ||||| CPU2 runs on old revisions when $40C0.2 = 1. ||||| See also $40B1.3. ||||+----- Pin 5C66.38 = $40C0.3 (POR value = 0) |||| CHR RAM Bank Select (selects between two 8 KiB CHR RAM chips) ++++------ (unknown) Read 76543210 |||||||+-- Input value of pin 5C66.31: ||||||| From FNS CIC (Key) pin 10, or jumpered to GND on models without a CIC chip. ||||||+--- Input value of pin 5C66.32: |||||| From FNS CIC (Key) pin 15, or jumpered to GND on models without a CIC chip. |||||+---- Input value of pin 5C66.33: ||||| CPU2 /Reset fed back in for all models, regardless which model-specific 5C66 pin is sending it out. ||||+----- Input value of pin 5C66.34: |||| Selected CHR RAM Bank, fed back in from 5C66.38. |+++------ (unlikely to exist) +--------- Input value of pin 5C66.29: /CPU R/W Inhibit, from FNS CIC (Key) pin 11, or floating up to logic high on models without a CIC chip. 1 = Writes to card, W-RAM, and $40Dx are allowed 0 = Blocked (CPU R/W is overriden high, i.e. "read" for these writes)
| ||
$40D0 | Unknown | Yes | Yes | RF5A18 | Famicom CPU <-> CPU2 Interface, Data Byte 0
Write 76543210 ++++++++-- 8-bit value written here can be read by CPU2 from register $4123. Read 76543210 ++++++++-- 8-bit value read here was written by CPU2 to register $4123.
| ||
$40D1 | Unknown | Yes | Yes | RF5A18 | Famicom CPU <-> CPU2 Interface, Data Byte 1
Write 76543210 ++++++++-- 8-bit value written here can be read by CPU2 from register $4124. Read 76543210 ++++++++-- 8-bit value read here was written by CPU2 to register $4124.
| ||
$40D2 | Unknown | Yes | Yes | RF5A18 | Famicom CPU <-> CPU2 Interface, Data Byte 2
Write 76543210 ++++++++-- 8-bit value written here can be read by CPU2 from register $4125. Read 76543210 ++++++++-- 8-bit value read here was written by CPU2 to register $4125.
| ||
$40D3 | Unknown | Yes | Yes | RF5A18 | Famicom CPU <-> CPU2 Interface, Data Acknowledge
Write 76543210 |||+++++-- (unknown) +++------- 3-bit value written here can be read by CPU2 from register $4122. Read 76543210 |||+++++-- (unlikely to exist) +++------- 3-bit value read here was written by CPU2 to register $4122.
| ||
$40D4 | Unknown | Yes | Yes | RF5A18 | Tone Rx and Expansion I/O Control
Write 76543210 |||||||+-- RF5A18 Pin 65 (Exp 17) = $40D4.0 (open-drain) ||||||+--- RF5A18 Pin 67 (Exp 19) = $40D4.1 (push-pull) |||||+---- RF5A18 Pin 66 (Exp 18) = $40D4.2 (open-drain) +++++----- (unknown) Read 76543210 |||||||+-- $40D4.0 = I/O value of RF5A18 Pin 65 (Exp 17) ||||||+--- $40D4.1 = output value of RF5A18 Pin 67 (Exp 19) |||||+---- $40D4.2 = I/O value of RF5A18 Pin 66 (Exp 18) ||||+----- $40D4.3 = input value of RF5A18 Pin 69 (Tone Rx D1) |||+------ $40D4.4 = input value of RF5A18 Pin 70 (Tone Rx D2) ||+------- $40D4.5 = input value of RF5A18 Pin 71 (Tone Rx D4) |+-------- $40D4.6 = input value of RF5A18 Pin 72 (Tone Rx D8) +--------- $40D4.7 = input value of RF5A18 Pin 73 (Tone Rx DV)
| ||
$40D5 | Unknown | Yes | Unknown | RF5A18 | Clocks
Write 76543210 ++++++++-- (unknown) Read 76543210 ||++++++-- Bits exist but function is unknown ++-------- (unlikely to exist)
| ||
$40D6 | Unknown | Yes | Unknown | RF5A18 | UART Status
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- Bit exists but function is unknown ||||||+--- $40D6.1 = !($4112.0) read by CPU2. (0 = $4110 UART Rx buffer has a byte ready to be read.) |||||+---- $40D6.2 = !($4112.1) read by CPU2. (0 = $4110 UART Tx buffer can be written.) ||||+----- $40D6.3 = !($4113.1 OR $4113.2) written by CPU2. |||+------ $40D6.4 = !($4113.7) written by CPU2. (1 = Transmit repeat.) ||+------- $40D6.5 = !($4113.6) written by CPU2. ++-------- (unlikely to exist) $40D6.2 previously observed to equal !($4113.7 AND $4112.1) written by CPU2. It was later discovered that this bit also follows the $4112.1 read value (Tx buffer ready), which makes a lot more sense being beside $40D6.1 (Rx buffer ready). The previous observation can be explained because writing to those CPU2 bits both likely changed the availability of the Tx buffer.
|
RF5A18 Internal 65C02 CPU
The RF5A18 contains its own CPU, termed "CPU2" on this page. It is a 65C02 supporting bitwise set/clear/branch instructions. Note that CPU2 has its own parallel execution with its own address and data busses that are not available to the Famicom's CPU. CPU2 also has its own clock source, so it does not execute synchronously with the Famicom CPU. CPU2 clock speed is 2.4576 MHz (19.6608 MHz crystal / 8). This section describes CPU2's own memory mapping and its own internal registers.
CPU2 /Reset is controlled 2 different ways depending on the revision of Famicom Network System. To support all revisions when enabling CPU2, both of these bits should be written:
- $40B1.3 = 0 (new revisions Famicom Network System, and old revisions with J1 closed)
- $40C0.2 = 1 (old revisions Famicom Network System with J2 closed)
CPU2 Memory Map
RF5A18 Pin 26 Low (default)
+================+ $0000 | CPU2 RAM | | (U6) | +================+ $2000 | (Returns | | last fetch) | +================+ $4100 | CPU2 Control | | Registers | +================+ $4140 | (Returns | | last fetch) | +================+ $C000 | External ROM | | (not used) | +================+ $E000 | RF5A18 | | Internal ROM | +================+ $10000
RF5A18 Pin 26 High
+================+ $0000 | CPU2 RAM | | (U6) | +================+ $2000 | (Returns | | last fetch) | +================+ $4100 | CPU2 Control | | Registers | +================+ $4140 | (Returns | | last fetch) | +================+ $C000 | | | | | External ROM | | | | | +================+ $10000
CPU2 Known Registers
Address | Read Has Effect |
Read Has Data |
Write | Function | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$4100 | No | No | Yes | NMI Timer 1 Period, low byte.
Write 76543210 ++++++++-- NMI timer 1 period low byte. Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4101 | No | No | Yes | NMI Timer 1 Period, high byte.
Write 76543210 ++++++++-- NMI timer 1 period high byte. Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4102 | No | No | Yes | NMI Timer 1 Restart.
Write 76543210 |||||||+-- $4102.0 = timer 1 loop. 1 = Loop, 0 = One-Shot ||||||+--- $4102.1 = timer 1 restart. 1 = Restart. ++++++---- (unknown) Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4103 | Yes | Yes | Unknown | NMI Timer 1 Acknowledge.
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- $4103.0 = Timer 1 NMI flag. 1 = Timer 1 NMI triggered. +++++++--- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4104 | No | No | Yes | IRQ Timer 2 Period, low byte.
Write 76543210 ++++++++-- IRQ timer 2 period low byte. Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4105 | No | No | Yes | IRQ Timer 2 Period, high byte.
Write 76543210 ++++++++-- IRQ Timer 2 Period, high byte. Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4106 | No | No | Yes | IRQ Timer 2 Restart.
Write 76543210 |||||||+-- $4106.0 = timer 2 loop. 1 = Loop, 0 = One-Shot ||||||+--- $4106.1 = timer 2 restart. 1 = Restart. ++++++---- (unknown) Read 76543210 ++++++++-- (does not exist)
| ||||||||||||||||||||||||||||||||||||||
$4107 | Yes | Yes | Unknown | IRQ Timer 2 Acknowledge.
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- (unlikely to exist) ||||||+--- Likely to be the Timer 2 IRQ flag ++++++---- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4110 | Yes | Yes | Yes | UART Rx/Tx Data Buffer
Write 76543210 ++++++++-- UART Tx Data Byte Bits 7:0 in 8-bit mode, bits 6:0 in 7-bit mode Read 76543210 ++++++++-- UART Rx Data Byte Bits 7:0 in 8-bit mode, bits 6:0 in 7-bit mode
| ||||||||||||||||||||||||||||||||||||||
$4111 | Unknown | Yes | Yes | UART Configuration
Write 76543210 |||||||+-- $4111.0 = UART Rx Enable (1 = enabled) ||||||+--- $4111.1 = UART Tx Enable (1 = enabled) |||||+---- $4111.2 = Baudrate Scaler (0 = multiply baudrate x4) ||||+----- $4111.3 = Data bits (0 = 7 bits, 1 = 8 bits) |||+------ $4111.4 = Tx Stop bits (0 = 1 stop bit, 1 = 2 stop bits) ||+------- $4111.5 = Parity bit (0 = don't use, 1 = append parity bit) |+-------- $4111.6 = Parity type (0 = odd parity, 1 = even parity) +--------- $4111.7 = Send Tx Break (1 = force UART Tx low (break), 0 = normal) Read 76543210 ++++++++-- Reads back the value written.
| ||||||||||||||||||||||||||||||||||||||
$4112 | Unknown | Yes | Yes | UART Status
Write 76543210 |||||||+-- Bit exists but function is unknown ||||||+--- $4112.1: Tx Silence |||||| 0 = Set UART Tx directly high (idle state), 1 = Allow sending data. |||||| This bit figures into $40D6.2 read by the Famicom. (See register $40D6.) |+++++---- (unknown) +--------- $4112.7 = $4110 UART Rx Data IRQ Acknowledge, 1 = Acknowledge IRQ. Read 76543210 |||||||+-- $4112.0 = $4110 UART Rx Buffer Ready Flag (1 = $4110 buffer has a byte ready to be read.) ||||||+--- $4112.1 = $4110 UART Tx Buffer Ready Flag (1 = $4110 buffer can be written.) |||||+---- $4112.2 = UART Tx Idle, 1 = Idle, 0 = Active. ||||+----- Bit exists but function is unknown |||+------ $4112.4 = Rx Parity Error. (1 = error detected) ||+------- $4112.5 = Rx Framing Error. (1 = error detected) |+-------- $4112.6 = Rx Break Received. (1 = break detected) +--------- Bit exists but function is unknown
| ||||||||||||||||||||||||||||||||||||||
$4113 | Unknown | Yes | Yes | UART Configuration
Write 76543210 |||||||+-- (unknown) ||||||+--- $4113.1 figures into $40D6.3 read by the Famicom. (See register $40D6.) |||||+---- $4113.2 figures into $40D6.3 read by the Famicom. (See register $40D6.) ||+++----- (unknown) |+-------- $4113.6 figures into $40D6.5 read by the Famicom. (See register $40D6.) +--------- $4113.7: Tx Repeat 1 = Send once on pin 90 (UART Tx), 0 = Send repeatedly This figures into $40D6.2 and $40D6.4 read by the Famicom. (See register $40D6.) Read 76543210 ++++++++-- Bits exist but function is unknown
| ||||||||||||||||||||||||||||||||||||||
$4114 | Unknown | No | Yes | UART Baudrate
Write 76543210 ||||||++-- UART Baud Rate (Rx and Tx) |||||| This is a clock divider that also affects frequency seen on $40D5.4. ++++++---- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4120 | Unknown | Yes | Yes | Unknown Function.
Write 76543210 |||||||+-- Pin 39 (MSM6827L AD0) = $4120.0 ||||||+--- Pin 38 (MSM6827L AD1) = $4120.1 |||||+---- Pin 37 (n/c) = $4120.2 ||||+----- Pin 36 (MSM6827L /RD) = $4120.3 |||+------ Pin 35 (MSM6827L /WR) = $4120.4 ||+------- Pin 34 (MSM6827L EXCLK) = $4120.5 |+-------- Pin 32 (MSM6827L Data): Direction = $4120.6: 1 = input, 0 = output (refer to $4121.0) +--------- (unknown) Read 76543210 |+++++++-- Bits exist but function is unknown +--------- $4120.7 = Pin 33 (MSM6827L /INT)
| ||||||||||||||||||||||||||||||||||||||
$4121 | Unknown | Yes | Yes | Unknown Function.
Write 76543210 |||||||+-- Pin 32 (MSM6827L Data) = $4121.0 when set as output (refer to $4120.6) +++++++--- (unknown) Read 76543210 ++++++++-- Bits exist but function is unknown
| ||||||||||||||||||||||||||||||||||||||
$4122 | Unknown | Yes | Yes | Famicom CPU <-> CPU2 Interface, Data Acknowledge
Write 76543210 |||+++++-- (unlikely to exist) +++------- 3-bit value written here can be read by Famicom CPU from register $40D3. Read 76543210 |||+++++-- (unlikely to exist) +++------- 3-bit value read here was written by Famicom CPU to register $40D3.
| ||||||||||||||||||||||||||||||||||||||
$4123 | Unknown | Yes | Yes | Famicom CPU <-> CPU2 Interface, Data Byte 0
Write 76543210 ++++++++-- 8-bit value written here can be read by Famicom CPU from register $40D0. Read 76543210 ++++++++-- 8-bit value read here was written by Famicom CPU to register $40D0.
| ||||||||||||||||||||||||||||||||||||||
$4124 | Unknown | Yes | Yes | Famicom CPU <-> CPU2 Interface, Data Byte 1
Write 76543210 ++++++++-- 8-bit value written here can be read by Famicom CPU from register $40D1. Read 76543210 ++++++++-- 8-bit value read here was written by Famicom CPU to register $40D1.
| ||||||||||||||||||||||||||||||||||||||
$4125 | Unknown | Yes | Yes | Famicom CPU <-> CPU2 Interface, Data Byte 2
Write 76543210 ++++++++-- 8-bit value written here can be read by Famicom CPU from register $40D2. Read 76543210 ++++++++-- 8-bit value read here was written by Famicom CPU to register $40D2.
| ||||||||||||||||||||||||||||||||||||||
$4126 | Unknown | Yes | Unknown | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- $4126.0 = Pin 47 (+5V) ||||||+--- $4126.1 = !(Pin 48) (+5V) |||||+---- $4126.2 = Pin 49 (from 5C66-69) ||||+----- $4126.3 = Pin 51 (Switch SW1-2) |||+------ $4126.4 = Pin 52 (Switch SW1-4) ||+------- $4126.5 = Pin 53 (Modem P4-25) |+-------- $4126.6 = Pin 54 (Modem P4-28) +--------- $4126.7 = Pin 55 (Modem P4-23)
| ||||||||||||||||||||||||||||||||||||||
$4127 | Unknown | No | Yes | Unknown Function.
Write 76543210 |||||||+-- Pin 56 MSM6827L +Reset = $4127.0 ||||||+--- Pin 57 /Red LED = $4127.1 |||||+---- Pin 58 /Green LED = $4127.2 ||||+----- Pin 59 (n/c) = $4127.3 |||+------ Pin 60 /Phone Off Hook = $4127.4 ||+------- Pin 61 /DTMF Output Enable = $4127.5 |+-------- Pin 62 /Phone Audio Enable = $4127.6 +--------- Pin 63 (Modem P4-19) = $4127.7 Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4128 | Unknown | Yes | Yes | Unknown Function.
Write 76543210 |||||||+-- Pin 68 (Tone Rx GT) = $4128.0 +++++++--- (unknown) Read 76543210 |||||+++-- (unlikely to exist) ||||+----- $4128.3 = Pin 69 (Tone Rx D1) |||+------ $4128.4 = Pin 70 (Tone Rx D2) ||+------- $4128.5 = Pin 71 (Tone Rx D4) |+-------- $4128.6 = Pin 72 (Tone Rx D8) +--------- $4128.7 = Pin 73 (Tone Rx DV)
| ||||||||||||||||||||||||||||||||||||||
$4129 | Unknown | Unknown | Yes | P5 Expansion Port
Write 76543210 ||||++++-- Data nybble written to device attached to P5 connector. ||++------ Used for sequencing writes to the device. ++-------- (unknown) Read 76543210 ||++++++-- Controlled by device attached to P5 connector, though the ROM code never reads it. ++-------- Not used
| ||||||||||||||||||||||||||||||||||||||
$412F | Unknown | Yes | Yes | Unknown Function.
Write 76543210 |||||||+-- $412F.0 = Timer 1 NMI enable. 1 = Enabled. ||||+++--- (unknown) |||+------ $412F.4 = Pin 33 (MSM6827L /INT) IRQ enable. 1 = Enabled. ||+------- $412F.5 = Pin 73 (Tone Rx DV) IRQ enable. 1 = Enabled. |+-------- $412F.6 = Timer 2 IRQ enable. 1 = Enabled. +--------- $412F.7 = UART Rx IRQ enable. 1 = Enabled. Read 76543210 |||||||+-- Bit exists but function is unknown |||||++--- (unlikely to exist) ||||+----- Bit exists but function is unknown |||+------ $412F.4 = !(Pin 33) (MSM6827L /INT) ||+------- $412F.5 is set when IRQ is triggered by writing 1 to $412F.5. || This is probably the Tone Rx DV interrupt flag. |+-------- $412F.6 is an IRQ flag. 1 = IRQ pending. +--------- Bit exists but function is unknown
| ||||||||||||||||||||||||||||||||||||||
$4130 | Unknown | No | Yes | Unknown Function.
Write 76543210 |||||||+-- Serial bit to be written +++++++--- (unknown, unlikely to exist) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4131 | Unknown | No | Yes | Unknown Function.
Write 76543210 |||||||+-- Serial bit to be written +++++++--- (unknown, unlikely to exist) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4132 | Unknown | No | Yes | Unknown Function.
Write 76543210 |||||||+-- Serial bit to be written +++++++--- (unknown, unlikely to exist) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4133 | Unknown | No | Yes | Unknown Function.
Write 76543210 |||||||+-- Serial bit to be written +++++++--- (unknown, unlikely to exist) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4134 | Yes | Yes | Unknown | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- Bit exists but function is unknown +++++++--- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4135 | Unknown | Yes | Unknown | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 |||||||+-- $4135.0 = $4134 Serial Data Ready (1 = ready) +++++++--- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4136 | Unknown | No | Yes | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
| ||||||||||||||||||||||||||||||||||||||
$4137 | Unknown | No | Yes | Unknown Function.
Write 76543210 ++++++++-- (unknown) Read 76543210 ++++++++-- (unlikely to exist)
|
Communication Between Famicom and CPU2
Registers $40D0, $40D1, $40D2, and $40D3 are used for communication between Famicom and CPU2. One would tend to expect the Famicom to receive the same value from any of these four registers if read back right after writing. However, each register is actually a separate register in each direction. The Famicom only controls the value read by CPU2, and CPU2 only controls the value read by the Famicom. It may be that CPU2 echoes the value back in some cases, but don't be fooled.
Data packets are sent in both directions between the Famicom and CPU2 using these registers. The data flow is controlled by status and acknowledge flags in $40D3, and data is sent 3 bytes at a time using registers $40D0, $40D1, and $40D2. When CPU2 receives each 3-byte chunk, it buffers it in its RAM starting at address $0401 until the full message has been received. The maximum message length is at most 255 bytes, possibly less.
Each message starts with a command byte, followed by a byte count. The byte after the byte count is not used and not counted towards the byte count in most commands. There are a total of 25 command bytes, which are stored in a lookup table at CPU2 ROM address $FB52. The index of this lookup table corresponds to the index of a function pointer table at address $FBB2, and a command mode support bitfield table at address $FB6B. This is how CPU2 efficiently directs to a unique message handler function for each command byte. The mode bitfield checks against the mode byte at $0051. It is probably used for enforcing the correct sequence of commands, as the command handlers themselves seem to be a major contributor changing the mode. It seems there are 6 possible modes: 0, 1, 2, 3, 4, and 5, though command $03 is set to support modes 6 and 7 as well. The mode may actually represent a global state machine, such as 0 = disconnected, 1 = dialing, etc.
CPU2 Commands
Commands Read by the Famicom from CPU2
Command Byte |
Description |
---|---|
$80 | This command is received by the Famicom in response to writing to command $00. (See next section for details.) |
$81 | Unknown function.
[$81] [count=$01] [$00] [connection status]
|
$82 | Unknown function.
[$82] [count=$01] [$00] [connection status]
Response:
|
$83 | This command is received by the Famicom in response to writing to command $03. (See next section for details.) |
$90 | This command is received by the Famicom in response to writing to command $10. (See next section for details.) |
$91 | This command is received by the Famicom in response to writing to command $11. (See next section for details.) |
$92 | This command is received by the Famicom in response to writing to command $12. (See next section for details.) |
$C0 | UART Rx Packet
There are 2 different parts of the CPU2 code that can send this message: [$C0] [count=N] [parameter] [...N bytes...]
[$C0] [count=$01] [$00] [parameter]
|
$C1 | Tone Rx Data Packet.
When the packet only contains 1 nybble: [$C1] [count=$01] [$80] [tone Rx nybble]
[$C1] [count=N] [parameter] [tone Rx bytes]
|
$E1 | This command indicates that CPU2 had a failure receiving a command from the Famicom.
Command from Famicom that failed due to invalid command byte, or a command not supported in the present mode: Message from Famicom: [invalid command] [count] [byte 0] [byte 1] ... Response back to Famicom: [$E1] [count=$03] [?] [$00] [invalid command] [byte 1]
Message from Famicom: [command] [invalid count] [byte 0] [byte 1] ... Response back to Famicom: [$E1] [count=$03] [$00] [$01] [command] [byte 1] |
$F0 | This command is received by the Famicom in response to writing to command $7C. (See next section for details.) |
Commands Written by the Famicom to CPU2
Note that most descriptions are incomplete.
Command Byte |
CPU2 Handler Address |
Byte Count Expected |
Modes Supported |
Description | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$00 | $F43A | >= 0 <= 60 |
0 | Hook And Dialing Sequence Configuration
Message Bytes: [$00] [count=N] [xx] [...N bytes command string...] Response: [$80] [count=$01] [$00] [status byte]
Response:
| |||||||||||||||||||||||||||||||||||||
$01 | $F46C | 1 | 2 | Unknown Function.
Message Bytes: [$01] [count=$01] [xx] [parameter]
| |||||||||||||||||||||||||||||||||||||
$02 | $F48A | 2 | 0 | Unknown Function.
Message Bytes: [$02] [count=$02] [xx] [parameter 0] [parameter 1]
| |||||||||||||||||||||||||||||||||||||
$03 | $F4BB | 0 | 0,1,2,3, 4,5,6,7 |
System Revision and Status Information
Message Bytes: [$03] [count=$00] Response: [$83] [count=$0A] [$00] [ROM revision] [ROM checksum MSB] [ROM checksum LSB] [byte 4] ... [byte 10]
| |||||||||||||||||||||||||||||||||||||
$10 | $F71A | 40 | 0,2,5 | Unknown $413x Function.
Message Bytes: [$10] [count=$28] [parameter] [...40 bytes...] Response: [$90] [count=$28] [response parameter] [...40 bytes...]
| |||||||||||||||||||||||||||||||||||||
$11 | $F75C | 127 | 0,2,5 | Unknown $413x Function.
Message Bytes: [$11] [count=$7F] [...5 byte chunk...] [...41 byte chunk 0...] [...41 byte chunk 1...] [...41 byte chunk 2...] Response: [$91] [count=$29] [response parameter] [...41 bytes...]
| |||||||||||||||||||||||||||||||||||||
$12 | $F773 | >= 3 <= 252 |
0,2,5 | CRC Calculator
Message Bytes: [$12] [count=N] [initial] [polynomial 1] [polynomial 2] [...N-2 bytes...] Response: [$92] [count=$02] [$00] [CRC 2] [CRC 1]
| |||||||||||||||||||||||||||||||||||||
$40 | $F7AF | >= 1 <= 252 |
2 | Unknown Function.
Message Bytes: [$40] [count=N] [xx] [...N-1 bytes...]
| |||||||||||||||||||||||||||||||||||||
$41 | $F7D0 | >= 1 <= 100 |
5 | Unknown Function.
Message Bytes: [$41] [count=N] [xx] [...N bytes...]
| |||||||||||||||||||||||||||||||||||||
$60 | $F829 | 6 | 0 | Unknown Function.
Message Bytes: [$60] [count=$06] [...6 data bytes...]
| |||||||||||||||||||||||||||||||||||||
$61 | $F839 | 0 | 1,3,4 | Disconnect
Message Bytes: [$61] [count=$00]
| |||||||||||||||||||||||||||||||||||||
$62 | $F849 | 1 | 0,2,5 | Unknown Function.
Message Bytes: [$62] [count=$01] [xx] [parameter]
| |||||||||||||||||||||||||||||||||||||
$63 | $F887 | 0 | 0,1,2,3, 4,5 |
NOP Command
Message Bytes: [$63] [count=$00]
| |||||||||||||||||||||||||||||||||||||
$64 | $F88D | 1 | 0,2,5 | Modem Off Hook Control
Message Bytes: [$64] [count=$01] [xx] [Modem Off Hook mode]
| |||||||||||||||||||||||||||||||||||||
$65 | $F89D | 2 | 0,2,5 | Modem Audio Enable and P4-19 Control
Message Bytes: [$65] [count=$02] [xx] [Modem Audio Enable mode] [P4-19 mode]
| |||||||||||||||||||||||||||||||||||||
$66 | $F8B7 | 2 | 0,2,5 | LED Control
Message Bytes: [$66] [count=$02] [xx] [red LED mode] [green LED mode]
| |||||||||||||||||||||||||||||||||||||
$67 | $F8D1 | 2 | 0,5 | Unknown Function.
Message Bytes: [$67] [count=$02] [xx] [parameter 0] [parameter 1]
| |||||||||||||||||||||||||||||||||||||
$68 | $F912 | 1 | 0,5 | Unknown Function.
Message Bytes: [$68] [count=$01] [xx] [parameter]
| |||||||||||||||||||||||||||||||||||||
$69 | $F951 | 10 | 0 | Unknown Function.
Message Bytes: [$69] [count=$0A] [xx] [...10 data bytes...]
| |||||||||||||||||||||||||||||||||||||
$6A | $F96F | 80 | 0,2,5 | Unknown $413x Function.
Message Bytes: [$6A] [count=$50] [xx] [...40 byte chunk 0...] [...40 byte chunk 1...]
| |||||||||||||||||||||||||||||||||||||
$7B | $F994 | No Check |
0,1,2,3, 4,5 |
Software Reset
Message Bytes: [$7B] [count=xx] [xx]
| |||||||||||||||||||||||||||||||||||||
$7C | $F9AC | 5 | 0,1,2,3, 4,5 |
Arbitrary Memory Read
Message Bytes: [$7C] [count=$05] [xx] [CRC 1] [CRC 2] [address MSB] [address LSB] [read count N] Response: [$F0] [read count N] [$00] ...N bytes from memory...
| |||||||||||||||||||||||||||||||||||||
$7D | $F9D9 | >= 5 | 0,1,2,3, 4,5 |
Arbitrary Memory Write
Message Bytes: [$7D] [count=N] [xx] [CRC 1] [CRC 2] [address MSB] [address LSB] [...N-4 bytes...]
| |||||||||||||||||||||||||||||||||||||
$7E | $F9FE | 5 | 0,1,2,3, 4,5 |
Unknown Function.
Message Bytes: [$7E] [count=$05] [xx] [CRC 1] [CRC 2] [parameter 0] [parameter 1] [parameter 2]
| |||||||||||||||||||||||||||||||||||||
$7F | $FA16 | 5 | 0,1,2,3, 4,5 |
Unknown Function.
Message Bytes: [$7F] [count=$05] [parameter 0] [CRC 1] [CRC 2] [parameter 1] [parameter 2] [parameter 3]
|
CPU2 Commands with CRC key bytes
CPU2 command $12 calculates the CRC-16 of its message using [polynomial 1] and [polynomial 2] as the CRC polynomial, with [initial] placed in both bytes of the initial value, and performs the calculation LSB-first or "reflected". This command requires the polynomial to be specified in reciprocal form. For example, to calculate the standard CRC-16 with polynomial $8005, [polynomial 1] would be set to $40, [polynomial 2] would be set to $03, and [initial] would be set to $00.
CPU2 Commands $7C, $7D, $7E, and $7F use CRC key bytes [CRC 1] and [CRC 2] to validate the message. These commands calculate a CRC-16 across the message backwards, starting from the last byte and ending at [CRC 1]. The result must be 0 or the command is ignored. The CRC-16 polynomial is $8385 and the initial value is $35AC. The calculation is done LSB-first, or "reflected".
Connection Status Byte
Response commands $80, $81, and $82 send an enumerated value indicating the result when attempting to make a telephone connection. These enumerations are used clearly in the CPU2 ROM: 00, 01, 02, 03, 04, 05, 06, 07, 08, 0B, 0C, 0D, 0E. CPU2 ROM keeps track of this value at RAM location $0052. $00 indicates a successful connection, and all other values indicate a failure. Super Mario Club shows these failures with error code 40xx, xx directly reflecting this byte. Super Mario Club's manual gives troubleshooting information for most of these values. That information was used to create the table below.
Status Byte |
Error Code |
Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
$00 | (n/a) | Connection was successful. | ||||||||||||||
$01 | 4001 | No dial tone was detected.
| ||||||||||||||
$02 | 4002 | An incoming phone call is being received.
| ||||||||||||||
$03 | 4003 | Pulse vs. Tone setting is incorrect.
| ||||||||||||||
$04 | 4004 | "0" Outgoing call setting is incorrect.
| ||||||||||||||
$05 | 4005 | DDX-TP connection completed earlier than expected.
| ||||||||||||||
$06 | 4006 | Unknown. | ||||||||||||||
$07 | 4007 | Unknown. | ||||||||||||||
$08 | 4008 | Server was busy, disconnected, or rejected the password.
| ||||||||||||||
$09 | 4009 | Server was busy.
| ||||||||||||||
$0A | 400A | DDX-TP registration incorrect or server disconnected.
| ||||||||||||||
$0B | 400B | |||||||||||||||
$0C | 400C | |||||||||||||||
$0D | 400D | Problem with telephone line connection.
| ||||||||||||||
$0E | 400E | Problem with telephone line connection or server.
|
Pinouts
RF5C66 Mapper and Disk Drive Controller
_____ / \ CPU A0 -> / 1 100 \ -- +5Vcc CPU A1 -> / 2 99 \ -- n/c CPU A2 -> / 3 98 \ <> CPU D0 CPU A3 -> / 4 97 \ <> CPU D1 CPU A4 -> / 5 96 \ <> CPU D2 CPU A5 -> / 6 95 \ <> CPU D3 CPU A6 -> / 7 94 \ <> CPU D4 CPU A7 -> / 8 93 \ <> CPU D5 CPU A12 -> / 9 92 \ <> CPU D6 CPU A13 -> / 10 91 \ <> CPU D7 CPU A14 -> / 11 90 \ -- GND /ROMSEL -> / 12 89 \ <> Card D0 CPU R/W -> / 13 88 \ <> Card D1 M2 -> / 14 87 \ <> Card D2 P6-1 Lid Switch, Card R/W <- / 15 86 \ <> Card D3 (20k resistor to 5Vcc) ? -> / 16 85 \ <> Card D4 /IRQ <- / 17 84 \ <> Card D5 +5Vcc -- / 18 83 \ <> Card D6 n/c -- / 19 82 \ <> Card D7 21.47727MHz Xtal -- / 20 81 \ -- +5Vcc Xtal -- / 21 \ n/c -- / 22 O / GND -- / 23 80 / -- n/c (n/c) Xtal Osc Out <- / 24 79 / -> Exp P3-2 n/c -- / 25 78 / <- Exp P3-3 ToneRx Xin, CIC Clock <- / 26 Nintendo RF5C66 77 / -> Exp P3-4 n/c -- / 27 Package QFP-100, 0.65mm pitch 76 / -> Exp P3-5 (n/c) $40AE.0 <- / 28 75 / -> Exp P3-6 CIC /CPU R/W Inhibit -> / 29 Mapper and 74 / <- Exp P3-7 Key CIC-12 (?) <- / 30 Disk Drive Controller 73 / <- Exp P3-8 / O 72 / <- Exp P3-9 \ 71 / <- Exp P3-11 Key CIC-10 (?) -> \ 31 70 / -- GND Key CIC-15 (?) -> \ 32 69 / -> 5A18-49 CPU2 /Reset -> \ 33 68 / -> CPU2 /Reset (new rev) CHR RAM /CE (input) -> \ 34 67 / <> Exp P3-12 Orientation: RAM +CE <- \ 35 66 / <> Exp P3-13 -------------------- (n/c) $40C0.1 <- \ 36 65 / <> Exp P3-14 80 51 CPU2 /Reset (old rev: J2) <- \ 37 64 / <> Exp P3-15 | | CHR RAM /CE <- \ 38 63 / <- $40B1.3 (n/c) .-----------. GND -- \ 39 62 / <> Modem P4-31 81-|O Nintendo |-50 Built-in RAM /CE ($6000-7FFF) <- \ 40 61 / <> Modem P4-32 | RF5C66 | (n/c) ? /CE ($4xE0-4xEF) <- \ 41 60 / <> Modem P4-29 100-| GCD 4R O|-31 5A18-85 /CE ($4xD0-4xDF) <- \ 42 59 / -- +5Vcc \-----------' (GND) ? -> \ 43 58 / -- n/c | | (GND) ? -> \ 44 57 / -> Kanji ROM A17 01 30 (GND) ? -> \ 45 56 / -> Kanji ROM A4 (GND) ? -> \ 46 55 / -> Kanji ROM A3 Legend: CIRAM A10 <- \ 47 54 / -> Kanji ROM A2 ------------------------------ PPU A11 -> \ 48 53 / -> Kanji ROM A1 --[RF5C66]-- Power PPU A10 -> \ 49 52 / -> Kanji ROM A0 ->[RF5C66]<- RF5C66 input Kanji ROM /CE ($5000-5FFF) <- \ 50 51 / -- n/c <-[RF5C66]-> RF5C66 output \ / <>[RF5C66]<> Bidirectional \ / f Famicom connection \ / r ROM chip connection V R RAM chip connection Notes: - +5Vcc pins 18, 59, 81, 100 are all connected together internally. - GND pins 23, 39, 70, 90 are all connected together internally. - 43, 44, 45, 46 are GND on the PCB, but have internal protection diodes from GND, suggesting they are logic pins. - Pins 45-46, when pulled high, causes oscillation on pin 56. - 24, 28, 36, 37, 41, 63 are n/c on the PCB, but function as noted. - /CE Pins 40, 41, 42, 50 behaviors: - Pin 40 (Built-in RAM /CE) activates low in range $6000-7FFF, regardless of CPU R/W, but only when M2 is high. - Pin 41 (Unknown /CE) always activates low in range $4xE0-4xEF, regardless of CPU R/W and M2. - Pin 42 (RF5A18 CPU2 /CE) always activates low in range $4xD0-4xDF, regardless of CPU R/W and M2. - Pin 50 (Kanji ROM /CE) activates low in range $5000-5FFF, regardless of CPU R/W. (It appears to go low only when M2 is high but not specifically proven.) - Pin 29: - If the FNS has a CIC chip, CIC-11 drives this pin high after 24.8msec, and remains high as long as the CIC authentication is successful. There is a low-pass filter in this case. - If the FNS does not have a CIC chip, the pin floats high. There may be a pull-up resistor somewhere. The delay to go high (if any) has not been measured. - When this pin is low, it resets pins 52-57 low and possibly lots of other things. - Card R/W is always high when this pin is low. - Pin 31 (CIC-10) and Pin 32 (CIC-15): - Both are jumpered direct to GND if the FNS does not have a CIC chip. - If it does have a CIC chip, these signals are both always low with or without tsuushin card inserted. - In no observed case are these signals ever high. - Pin 16 Pull-up of 20k to 5V is also required in order to avoid triggering reset. - Pin 16 seems to be related to pin 29. With pin 29 floating and pin 16 pulled high at power on, the chip runs for 5 seconds, then enters reset. - Tested 10k instead of 20k (per original PCB) on pin 16, found no difference in time or function. - Pin 69 has a high pulse of 11.9085 usec at any time that register $4xAC has not been read for 12.4892 seconds. - Each additional 12.4892 seconds generates another pulse. - It has very repeatable precision, at least 6 figures on each. - It is not synchronized to M2 or any other inputs. - Note that 12.4892 sec * 21.47727 MHz = 2^28, with an error of 0.075%. (Nominal would be 12.4986 sec.) - Note that 11.9085 usec * 21.47727 MHz = 2^8, with an error of 0.093%. (Nominal would be 11.9196 usec.) - Pins 52-56 drive the address pins of the Kanji ROM. (See notes below the LH5323M1 pinout.) - Pin 15 (Card R/W) is a non-inverted buffer of CPU R/W. This signal connects through the lid switch. - Pin 26 puts out a 3.58 MHz square wave, ~50% duty. This corresponds to 21.47727 MHz / 6. - Pin 79 (Exp 2) puts out a 95.95 kHz square wave, 93.7% duty. Clock source unknown. - Note that this seems similar to FDS serial bitrate. - Standalone chip can get into a 341.2 kHz mode when touching pin 80, though pulling 80 high or low doesn't correlate. - Either frequency, the negative pulse width is 650 nsec. - Pins 71-79 appear strikingly similar to an FDS interface. - CIRAM A10 follows PPU A10 by default.
RF5A18 CPU2 / Modem Controller
_____ / \ CPU2 A0 <- / 1 100 \ -- GND CPU2 A1 <- / 2 99 \ <> CPU2 D0 CPU2 A2 <- / 3 98 \ <> CPU2 D1 CPU2 A3 <- / 4 97 \ <> CPU2 D2 CPU2 A4 <- / 5 96 \ <> CPU2 D3 CPU2 A5 <- / 6 95 \ <> CPU2 D4 CPU2 A6 <- / 7 94 \ <> CPU2 D5 CPU2 A7 <- / 8 93 \ <> CPU2 D6 +5Vcc -- / 9 92 \ <> CPU2 D7 CPU2 A8 <- / 10 91 \ -- +5Vcc CPU2 A9 <- / 11 90 \ -> UART Tx (MSM6827L TXD) CPU2 A10 <- / 12 89 \ <- UART Rx (MSM6827L RXD) CPU2 A11 <- / 13 88 \ <- CPU A2 CPU2 A12 <- / 14 87 \ <- CPU A1 (n/c) CPU2 A13 <- / 15 86 \ <- CPU A0 (n/c) CPU2 A14 <- / 16 85 \ <- /CE (5C66-42) (n/c) CPU2 A15 <- / 17 84 \ <- P6-1 Lid Switch, Card R/W GND -- / 18 83 \ <- M2 (2.4576 MHz) (n/c) CPU2 M2 <- / 19 82 \ <> Card D7 CPU2 R/W <- / 20 81 \ <> Card D6 RAM /CE ($0000-1FFF) <- / 21 \ (n/c) ROM /CE ($C000-xFFF) <- / 22 O / P5 /CE ($4129 Only) <- / 23 80 / <> Card D5 (GND) CPU2 +Reset -> / 24 79 / <> Card D4 (GND) ? -> / 25 78 / -- GND /Internal ROM Enable -> / 26 Nintendo RF5A18 77 / <> Card D3 (5C66-68) CPU2 /Reset -> / 27 Package QFP-100, 0.65mm pitch 76 / <> Card D2 (10k up) CPU2 /IRQ -> / 28 75 / <> Card D1 (10k up) CPU2 /NMI -> / 29 Modem Controller 74 / <> Card D0 n/c -- / 30 CPU2 73 / <- Tone Rx DV / O 72 / <- Tone Rx D8 \ 71 / <- Tone Rx D4 +5Vcc -- \ 31 70 / <- Tone Rx D2 MSM6827L DATA <> \ 32 69 / <- Tone Rx D1 MSM6827L /INT -> \ 33 68 / -> Tone Rx GT MSM6827L /RD <- \ 34 67 / -> Exp P3-19 MSM6827L /WR <- \ 35 66 / <> Exp P3-18 MSM6827L EXCLK <- \ 36 65 / <> Exp P3-17 (n/c) $4120.2 <- \ 37 64 / -- +5Vcc Orientation: MSM6827L AD1 <- \ 38 63 / -> Modem P4-19 -------------------- MSM6827L AD0 <- \ 39 62 / -> /Phone Audio Enable 80 51 (n/c) CPU2 D0 <- \ 40 61 / -> /DTMF Output Enable | | (n/c) ? <- \ 41 60 / -> /Phone Off Hook .-----------. (4.9152 MHz) Exp P3-16 <- \ 42 59 / -> $4127.3 (n/c) 81-|O RF5A18 |-50 GND -- \ 43 58 / -> /Green LED | Nintendo | 19.6608MHz Xtal -- \ 44 57 / -> /Red LED 100-| GCD 8C O|-31 1k to Xtal -- \ 45 56 / -> MSM6827L +Reset \-----------' GND -- \ 46 55 / <- Audio from phone line | | (+5Vcc) $4126.0 -> \ 47 54 / <- Modem P4-28 01 30 (+5Vcc) !($4126.1) -> \ 48 53 / <- Modem P4-25 5C66-69 -> \ 49 52 / <- Switch SW1-4 Legend: n/c -- \ 50 51 / <- Switch SW1-2 ------------------------------ \ / --[RF5A18]-- Power, n/a \ / ->[RF5A18]<- RF5A18 input \ / <-[RF5A18]-> RF5A18 output V <>[RF5A18]<> Bidirectional Notes: - This chip contains its very own 65C02 CPU, with built-in ROM. - +5Vcc pins 9, 31, 64, 91 are all connected together internally. - GND pins 18, 43, 46, 78, 100 are all connected together internally. - 24, 26 are GND on the PCB, but function as noted. - 25 is GND on the PCB, but has internal protection diode from GND, suggesting it is a logic pin. - 47, 48 are +5Vcc on the PCB, but function as noted. - 15, 16, 17, 19, 22, 37, 40, 59 are n/c on the PCB, but function as noted. - 41 is n/c on the PCB, but has protection diode from GND, suggesting it may have a function. - Pin 42 (Exp 16) puts out a 4.92 MHz square wave, ~50% duty. This is 19.6608 MHz / 4. - CPU2 /Reset comes from RF5C66 pin 68 on new revisions and selectable with J1, J2 on old revisions: - J2 closed = RF5C66 pin 37 (default) - J1 closed = RF5C66 pin 68 - Pin 24 prevents CPU2 functioning when held high at power-on. If the pin is then driven low, the reset vector is then fetched after that. - Pin 24 can be freely used as a +reset at any time this way. - Pin 25 low at any time causes address bus to go to $FFFF and data bus shows a toggle on bits 2,5,6,7: period 208.7 usec, low for 7.93 usec. - Other data bits always low. - Shortly after applying power, the toggle has a lot of variations for a period of about 1.5 seconds, including a 225 msec gap where the bits are low. - The mentioned data bits all appear to have the same data. - Held low at power-on will fetch the reset vector later when driven high. - Held high at power-on, driven low later, enters the data bus toggle mode but: - Does not appear to fetch the reset vector when driven high after that. - Does execute code, possibly resuming from where it left off. - When pin 26 is set low (default case: This pin is tied directly to GND on the PCB): - Internal ROM is enabled in CPU2 range $E000-FFFF. - Open Bus in CPU2 range $C000-DFFF. - Pin 22 (ROM /CE) is enabled low in range $C000-DFFF - This mode allows ROM expansion at $C000-DFFF, with internal ROM (and its vector table) in place. - When pin 26 is set high: - Internal ROM is disabled, leaving open bus in CPU2 range $E000-FFFF. - Open Bus in CPU2 range $C000-DFFF. - Pin 22 (ROM /CE) is enabled low in the entire range $C000-FFFF. - This mode allows a totally custom external CPU2 ROM with its own interrupt vector table.
LH5323M1 Kanji Graphic ROM
_____ Note: Flat spot does not correspond to pin 1. / \ n/c -- / 12 11 \ -- n/c (5C66-52) A0 -> / 13 10 \ -- n/c CPU D0 <> / 14 9 \ <- A1 (5C66-53) CPU D1 <> / 15 8 \ <- A2 (5C66-54) CPU D2 <> / 16 7 \ <- A3 (5C66-55) GND -- / 17 6 \ -- GND CPU D3 <> / 18 5 \ <- A5 (CPU A0) CPU D4 <> / 19 4 \ -- n/c CPU D5 <> / 20 3 \ <- A6 (CPU A1) CPU D6 <> / 21 2 \ <- A7 (CPU A2) CPU D7 <> / 22 Nintendo LH5323M1 1 \ -- n/c / Package QFP-44 \ \ 0.8mm pitch / n/c -- \ 23 44 / <- A8 (CPU A3) n/c -- \ 24 Kanji Graphic 43 / <- A13 (CPU A8) (GND) /OE -- \ 25 ROM 42 / <- A16 (CPU A11) (CPU A6) A11 -> \ 26 41 / <- A4 (5C66-56) Orientation: (5C66-50) /CE -> \ 27 40 / -- n/c -------------------- GND -- \ 28 39 / -- n/c 33 23 (CPU A7) A12 -> \ 29 38 / -- +5Vcc | | (CPU A5) A10 -> \ 30 37 / <- A17 (5C66-57 Bankswitch) .-----------. n/c -- \ 31 36 / <- A15 (CPU A10) 34-| Nintendo O|-22 n/c -- \ 32 35 / -- n/c | CCR-01 | (CPU A4) A9 -> \ 33 34 / <- A14 (CPU A9) | LH5323M1 | \ / 44-|O 9528 D |-12 \ / '-----------/ \ / | | V 01 11 Notes: - 6 & 28 are connected together internally. - 17 has no measurable connection to 6 & 28. - All logic pins have protection diode from pin 17, suggesting this is the true GND. - Pin 25 also appears as a logic pin with respect to pin 17. - When pins 25 and 27 are both driven low, the data bus becomes an output. Otherwise it is hi-z. - Pins 13, 9, 8, 7, 41, 37 are controlled by the RF5C66. - Pins 13, 9, 8, 7, 41 are controlled with auto-increment function. - The value of these pins increments each M2 falling edge when the CPU is in range $5000-5FFF. - Pin 37 is a bankswitch, controlled by register $40B0.0 - At reset and when reading from register $40B0, these pins reset to 0. - The conditions resetting or maintaining the bankswitch pin to 1 are still unknown.
8633 Famicom Network System CIC Key Chip
Unlike the NES console, the Famicom Network System appears to have the CIC key.
_______ _______ | \_/ | (To Card CIC Pin 2) Data Out <- | 1 18 | -- +5Vcc (From Card CIC Pin 1) Data In -> | 2 O 17 | -- n/c n/c -- | 3 8633 16 | -- n/c n/c -- | 4 15 | -> ? (5C66-32) always observed low n/c -- | 5 CIC 14 | -- n/c n/c -- | 6 Key 13 | -- n/c Clock -> | 7 12 | <- ? (5C66-30) (From Card CIC Pin 11) +Reset -> | 8 U8 11 | -> /CPU R/W Inhibit (5C66-29) GND -- | 9 10 | -> ? (5C66-31) always observed low |_______________|
- When the CIC key drives pin 11 low, this stops operation of the Famicom Network System by means of holding Card R/W high.
- The clock is 3.58 MHz, coming from RF5C66 pin 26.
8634A Tsuushin Card CIC Lock Chip
Unlike the NES cartridge, the tsuushin card appears to have the CIC lock.
_______ _______ | \_/ | (To FNS CIC Pin 2) Data Out <- | 1 18 | -- +5Vcc (From FNS CIC Pin 1) Data In -> | 2 O 17 | -- n/c n/c -- | 3 8634A 16 | ?? GND n/c -- | 4 15 | -- n/c n/c -- | 5 CIC 14 | -- n/c n/c -- | 6 Lock 13 | ?? +5V Clock -> | 7 12 | ?? Card-33, n/c in Famicom Network System (Cap to 5V) +Reset -> | 8 11 | -> CIC Key +Reset (To FNS CIC Pin 8) GND -- | 9 10 | -- n/c |_______________|
- +Reset is connected with a ceramic capacitor to 5V. This gives a momentary positive pulse at power-on.
- The clock is 3.58 MHz, coming from RF5C66 pin 26.
- Note: Some assumptions made on CIC chips based on similarity to F411A from Super NES.
8kByte CHR RAM
_______ _______ | \_/ | n/c? -- | 1 28 | -- +5Vcc PPU A12 -> | 2 O 27 | <- PPU /WR PPU A7 -> | 3 26 | <- +CE: U3=RF5C66 34/38, U4=PPU /A13 PPU A6 -> | 4 25 | <- PPU A8 PPU A5 -> | 5 LH5268 24 | <- PPU A9 PPU A4 -> | 6 CHR 23 | <- PPU A11 PPU A3 -> | 7 RAM 22 | <- /OE: PPU /RD PPU A2 -> | 8 U3/U4 21 | <- PPU A10 PPU A1 -> | 9 20 | <- /CE: U3=PPU A13, U4=RF5C66 34/38 PPU A0 -> | 10 19 | <> PPU D7 PPU D0 <> | 11 18 | <> PPU D6 PPU D1 <> | 12 17 | <> PPU D5 PPU D2 <> | 13 16 | <> PPU D4 GND -- | 14 15 | <> PPU D3 |_______________|
8kByte W-RAM
_______ _______ | \_/ | n/c? -- | 1 28 | -- +5Vcc CPU A12 -> | 2 O 27 | <- /WR: Card R/W (P6-2 Lid Switch) CPU A7 -> | 3 26 | <- +CE: RAM +CE CPU A6 -> | 4 25 | <- CPU A8 CPU A5 -> | 5 LH5268 24 | <- CPU A9 CPU A4 -> | 6 Built-in 23 | <- CPU A11 CPU A3 -> | 7 W-RAM 22 | <- /OE: GND CPU A2 -> | 8 U5 21 | <- Card A10 CPU A1 -> | 9 20 | <- /CE: Built-in RAM /CE CPU A0 -> | 10 19 | <> Card D7 Card D0 <> | 11 18 | <> Card D6 Card D1 <> | 12 17 | <> Card D5 Card D2 <> | 13 16 | <> Card D4 GND -- | 14 15 | <> Card D3 |_______________|
8kByte CPU2 RAM
_______ _______ | \_/ | n/c? -- | 1 28 | -- +5Vcc CPU2 A12 -> | 2 O 27 | <- /WR: CPU2 R/W CPU2 A7 -> | 3 26 | <- +CE: +5Vcc CPU2 A6 -> | 4 25 | <- CPU2 A8 CPU2 A5 -> | 5 LH5268 24 | <- CPU2 A9 CPU2 A4 -> | 6 CPU2 23 | <- CPU2 A11 CPU2 A3 -> | 7 RAM 22 | <- /OE: GND CPU2 A2 -> | 8 U6 21 | <- CPU2 A10 CPU2 A1 -> | 9 20 | <- /CE: CPU2 RAM /CE CPU2 A0 -> | 10 19 | <> CPU2 D7 CPU2 D0 <> | 11 18 | <> CPU2 D6 CPU2 D1 <> | 12 17 | <> CPU2 D5 CPU2 D2 <> | 13 16 | <> CPU2 D4 GND -- | 14 15 | <> CPU2 D3 |_______________|
P4: Modem Module Edge Connector
Famicom | Modem | Famicom Network System | Module | Network System __________ | | +5Vcc -- | 1 19 | <- 5A18-63 MSM6827L +Reset -> | 2 20 | <- Tone Rx GT MSM6827L AD0 <> | 3 21 | <- /Phone Audio Enable GND -- | 4 22 | -> Tone Rx DV MSM6827L AD1 <> | 5 23 | -> 5A18-55, Audio from phone line MSM6827L RXD <- | 6 24 | <- Tone Rx Xin, from 5C66-26 MSM6827L DATA <- | 7 25 | -> 5A18-53 MSM6827L TXD -> | 8 26 | -- GND MSM6827L /WR -> | 9 27 | <- /Phone Off Hook MSM6827L EXCLK -> | 10 28 | -> 5A18-54 MSM6827L /RD -> | 11 29 | <> 5C66-60 +5Vcc -- | 12 30 | <- /DTMF Output Enable Tone Rx D1 <- | 13 31 | <> 5C66-62 __________________________ MSM6827L /INT <- | 14 32 | <> 5C66-61 | Modem Module | +5Vcc -- | 15 33 | <- Audio from 2A03 | Orientation | Tone Rx D2 <- | 16 34 | -> Audio to RF | | Tone Rx D8 <- | 17 35 | -- GND | 19 _____________ 36 | Tone Rx D4 <- | 18 36 | -- GND | 1 |___________| 18 | |________| |________________________| Note: The modem module uses modem chip Oki MSM6827L and Dual Tone Receiver MC14LC5436P.
P2: Tsuushin Card Connector
Note that the tsuushin card may appear to have a metric 1mm pin pitch, but in fact it has an imperial 0.040" (40 thousandths) pin pitch.
Card | | Famicom Network System -----+--+------------------------- 1 |--| +5Vcc 2 |--| +5Vcc 3 |??| n/c in JRA-PAT card, n/c in FNS 4 |??| n/c in JRA-PAT card, FNS has 10k pull-up only. 5 |<>| Card D0 6 |<>| Card D1 7 |<>| Card D2 8 |<>| Card D3 9 |<>| Card D4 10 |<>| Card D5 11 |<>| Card D6 12 |<>| Card D7 13 |<-| Card R/W (P6-2 Lid Switch) 14 |<-| M2 15 |<-| /ROMSEL 16 |<-| CPU A0 17 |<-| CPU A1 18 |<-| CPU A2 19 |<-| CPU A3 20 |<-| CPU A4 21 |<-| CPU A5 | | | | 22 |<-| CPU A6 23 |<-| CPU A7 24 |<-| CPU A8 25 |<-| CPU A9 26 |<-| CPU A10 27 |<-| CPU A11 28 |<-| CPU A12 29 |<-| CPU A13 30 |<-| CPU A14 31 |??| n/c in JRA-PAT card, FNS has 10k pull-up only. 32 |??| n/c in JRA-PAT card, FNS has 10k pull-up only. 33 |??| connected to Card Lock CIC-12 in JRA-PAT, n/c in FNS 34 |??| n/c in JRA-PAT card, n/c in FNS 35 |->| CIC Key Reset (Card Lock CIC-11 -> FNS Key CIC-8) 36 |->| CIC Lock-to-Key Data (Card Lock CIC-1 -> FNS Key CIC-2) 37 |<-| CIC Key-to-Lock Data (Card Lock CIC-2 <- FNS Key CIC-1) 38 |<-| CIC Clock (3.58 MHz, from 5C66.26) 39 |??| n/c in JRA-PAT card, FNS has 10k pull-up only. 40 |<-| RAM +CE (n/c in JRA-PAT card) 41 |--| GND 42 |--| GND
P3: Expansion Connector
Outside | FNS | Outside _____________________ _________ / Orientation /| | | /____________________/ | /IRQ -> | 1 20 | -- +5Vcc |o|_| == |_||_|o|/ (95.94kHz Clock) 5C66-79 <- | 2 19 | -> 5A18-67 \_ _ _ _||_ _ _ _/| 5C66-78 -> | 3 18 | -> 5A18-66 |-| | || HVC-050| | 5C66-77 <- | 4 17 | -> 5A18-65 |-|_| || | | 5C66-76 <- | 5 16 | -> 5A18-42 (4.92MHz Clock) | || | | 5C66-75 <- | 6 15 | <> 5C66-64 | 20 __/__\__ 11 | | | | |o 1 |______| 10 o| | 5C66-74 -> | 7 14 | <> 5C66-65 | ________________ | | 5C66-73 -> | 8 13 | <> 5C66-66 |/_______________/|| | 5C66-72 -> | 9 12 | <> 5C66-67 ||______________|/ | | GND -- | 10 11 | <- 5C66-71 | | | |_______| | ______ | | |o | | | o| | \_____|/ |_____|/
P5: Expansion Connector
Note: This connector only exists on old revisions of Famicom Network System. Expansion P5 /CE is activated low specifically at CPU2 address $4129.
Outside | | Famicom Network System --------+--+------------------------- 9 |--| GND 8 |<>| CPU2 D5 7 |<>| CPU2 D4 6 |<>| CPU2 D3 5 |<>| CPU2 D2 4 |<>| CPU2 D1 3 |<>| CPU2 D0 2 |<-| Expansion P5 /CE 1 |--| +5V