Back

TC0640 FIO
“F3 Input/Output”

Register Map

(labels are based on F3 usage because that's what we've tested)

input bit
fio pin
output bit
fio pin
input or output bit
fio pin

bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
$00 cartridge pin B4?
pin 83?
cartridge pin B3?
pin 84?
cartridge pin B2?
pin 85?
cartridge pin B1?
pin 86?
test (jamma)
pin 87
1p
button 5*
pin 88?
2p
button 4
pin 89
1p
button 4
pin 92
$01 coin 4
pin 74
coin 3
pin 76
coin 2
pin 77
coin 1
pin 78
(unused)
pin 79?
cartridge pin B5?
pin 80?
test (board)
pin 81
eeprom DO
pin 82
$02 4p
start
pin 19
3p
start
pin 18
2p
start
pin 17
1p
start
pin 16
service (4p)
pin 14
service (3p)
pin 13
service (jamma)
pin 12
tilt
pin 11
$03 (unused)
pin 39?
2p
button 3
pin 38
2p
button 2
pin 37
2p
button 1
pin 36
(unused)
pin 34?
1p
button 3
pin 33
1p
button 2
pin 32
1p
button 1
pin 29
$04 ? coin 2 counter
pin 9
coin 1 counter
pin 8
coin 2 lockout
pin 7
coin 1 lockout
pin 6
$05 ?
$06 port $03 direction controls (0=input, 1=output)
$07 2p stick
right
pin 27
2p stick
left
pin 26
2p stick
down
pin 25
2p stick
up
pin 24
1p stick
right
pin 23
1p stick
left
pin 22
1p stick
down
pin 21
1p stick
up
pin 20
$08 1p
up/down dial counter
$09
$0A 1p
left/right dial counter
$0B
$0C 2p
up/down dial counter
$0D
$0E 2p
left/right dial counter
$0F
$10 ?
$11 ?
$12 (unused)
pin 48?
4p
button 3
pin 47
4p
button 2
pin 46
4p
button 1
pin 45
(unused)
pin 44?
3p
button 3
pin 43
3p
button 2
pin 42
3p
button 1
pin 41
$13 (unused)
pin 67?
(unused)
pin 66?
(unused)
pin 65?
eeprom CS
pin 64
eeprom CLK
pin 63
eeprom DI
pin 62
Z pin 4
pin 59
Z pin 3
pin 58
$14 ? coin 4 counter
pin 72
coin 3 counter
pin 71
coin 4 lockout
pin 70
coin 3 lockout
pin 69
$15 ?
$16 port $13 direction controls (0=input, 1=output)
$17 4p stick
right
pin 56
4p stick
left
pin 55
4p stick
down
pin 54
4p stick
up
pin 53
3p stick
right
pin 52
3p stick
left
pin 51
3p stick
down
pin 50
3p stick
up
pin 49
$18 3p
up/down dial counter
$19
$1A 3p
left/right dial counter
$1B
$1C 4p
up/down dial counter
$1D
$1E 4p
left/right dial counter
$1F

Rotary Encoder Inputs

Each joystick axis (8 total, 2 per player) can also be used as input for a rotary encoder (by connecting it to the up/down or left/right joystick input pins).
The fio has a 16-bit (little endian) counter for each axis, which increments/decrements by 1 on each step (i.e. a full cycle (00 01 11 10) would increment/decrement the counter by 4)

(Note: both input modes are always enabled; the game chooses whether to read the joystick bits or the dial counter registers. The F3 has a jumper switch for "joystick/sensor" mode, but this just configures pull-up/down resistors on some input lines)

afaik, F3 games have only used two dials (connected to the 1p and 2p left/right axes), but i've tested all 8 and they are real.

Watchdog

todo: which address do you have to write to? MAME just checks for any writes to the first 4 bytes, but this is probably wrong.

Pinout

1VCC
2i? GND
3i? VCC
4i? VCC (through JP1)
5 GND
6obit 0Port $04
(output)
7obit 1
8obit 2
9obit 3
10GND
11ibit 0Port $02
(input)
12ibit 1
13ibit 2
14ibit 3
15GND
16ibit 4
17ibit 5
18ibit 6
19ibit 7
20ibit 0Port $07
(input + dials)
21ibit 1
22ibit 2
23ibit 3
24ibit 4
25ibit 5
26ibit 6
27ibit 7
28GND
29iobit 0Port $03 (i/o)
30VCC
31GND
32iobit 1Port $03
(i/o)
33iobit 2
34iobit 3
35GND
36iobit 4
37iobit 5
38iobit 6
39iobit 7
40GND
41ibit 0Port $12
(input)
42ibit 1
43ibit 2
44ibit 3
45ibit 4
46ibit 5
47ibit 6
48ibit 7
49ibit 0Port $17
(input + dials)
50ibit 1
51ibit 2
52ibit 3
53ibit 4
54ibit 5
55ibit 6
56ibit 7
57GND
58iobit 0Port $13
(i/o)
59iobit 1
60GND
61VCC
62iobit 2Port $13
(i/o)
63iobit 3
64iobit 4
65iobit 5
66iobit 6
67iobit 7
68GND
69obit 0Port $14
(output)
70obit 1
71obit 2
72obit 3
73GND
74ibit 7Port $01
(input)
75GND
76ibit 6
77ibit 5
78ibit 4
79ibit 3
80ibit 2
81ibit 1
82ibit 0
83ibit 7Port $00
(input)
84ibit 6
85ibit 5
86ibit 4
87ibit 3
88ibit 2
89ibit 1
90VCC
91GND
92ibit 0Port $00 (input)
93GND?
94oRESETWatchdog Output
95oHALT
96GND
97ioD24Cpu Data
(8-bit)
98ioD25
99ioD26
100ioD27
101GND
102ioD28
103ioD29
104ioD30
105ioD31
106GND
107iclock input (1 MHz)
108GND
109iA4Cpu Address
110iA3
111iA2
112iA1
113iA0
114GND
115iRESET input
116iR/W
117iOE
118ichip select ? (FCM.106)
119VCC
120GND

Pins 2-4 are data inputs connected to vcc/gnd. (they probably control some settings which are hardwired on the F3).

Note that pins 94 and 115 connect to separate nets on the F3 (115 connects to the power supply monitor's reset output, and 94 connects to the reset inputs on most other chips)