Joypad port connection in Famicom (and most chip based famiclones) is identical:
Code: Select all
VCC
| _
10k / |
JOY CLK -+-o |-- CPU M2
\_|
o
|
| \
JOY D0 ---| o-- CPU D0
|_/
/RD4016 ----o
At the end of this cycle, CPU reads data bus then drives M2 to go low, which causes the
CLK line to go high and joypad shifts its next bit that can be read on next cycle.
The exact moment of rising and falling edge of /RD4016 in respect to edges od M2 is not
important, though if this line is decoded (internally) only basing on the CPU address bus, it should fall before rise of M2 and rise after fal of M2:
Code: Select all
+--- CPU samples joypad
| +- joypads shifts next bit
| |
M2 ________/---\___
/RD4016 --\_______/-
JOY CLK -----\___/--
Now I am wondering, why M2 is used there instead of just VCC? The resulting logical effect would be identical and
additionally, M2 would not have load of those two 368 buffers and its edges could be more narrow:
Code: Select all
VCC
| _
10k / |
JOY CLK -+-o |-- VCC M2 ________/---\____-
\_| /RD4016 --\_______/---
o JOY CLK ---\_______/--
|
| \
JOY D0 ---| o-- CPU D0
|_/
/RD4016 ----o
Code: Select all
JOY CLK --------- /RD4016
_
| \
JOY D0 ---| o-- CPU D0
|_/
/RD4016 ----o
* internal CPU pin is available at the joypad connector which might potentially destroy CPU if there is any ESD (while people
rarelly push/pull cartridges when console in turned on, they feel that doing the same with joypads is nothing wrong)
* when the joypad is somehow broken (has shorted CLK line),it might cause the buffer to be enabled permanently, causing bus conflicts and
not allowing to game to even boot.
I looked at the NES schematic and it is basically identical with exception of ESD protecting diodes on the JOY CLK line and a
series diode in the PAL version:
Code: Select all
VCC
|
/_\
|
JOY CLK --|>----- /RD4016
|
/_\
|
GND
Now I am wondering about any advantages of the NES connection?
In NTSC NES (and the above famiclone) (without the series diode) the joypad could theoretically drive the CLK line low outside $4016 read cycle and
if the driving were strong enough, it could allow the joypad buffer to be enabled and thus allowing reading back joypad data for different address than $4016.