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

(I wonder if some of those extra power/ground pins can actually configure whether certain ports are inputs or outputs? but it would be very difficult to test this)

1VCC
2GND
3VCC
4??? VCC (through JP1)
5GND
6bit 0port $04
(output)
7bit 1
8bit 2
9bit 3
10GND
11bit 0port $02
12bit 1
13bit 2
14bit 3
15GND
16bit 4port $02
17bit 5
18bit 6
19bit 7
20bit 0port $07
(input + dials)
21bit 1
22bit 2
23bit 3
24bit 4
25bit 5
26bit 6
27bit 7
28GND
29bit 0port $03 (i/o)
30VCC
31GND
32bit 1port $03
(i/o)
33bit 2
34bit 3
35GND
36bit 4port $03
(i/o)
37bit 5
38bit 6
39bit 7
40GND
41bit 0port $12
42bit 1
43bit 2
44bit 3
45bit 4
46bit 5
47bit 6
48bit 7
49bit 0port $17
(input + dials)
50bit 1
51bit 2
52bit 3
53bit 4
54bit 5
55bit 6
56bit 7
57GND
58bit 0port $13
(i/o)
59bit 1
60GND
61VCC
62bit 2port $13
(i/o)
63bit 3
64bit 4
65bit 5
66bit 6
67bit 7
68GND
69bit 0port $14
(output)
70bit 1
71bit 2
72bit 3
73GND
74bit 7port $01
75GND
76bit 6port $01
77bit 5
78bit 4
79bit 3
80bit 2
81bit 1
82bit 0
83bit 7port $00
84bit 6
85bit 5
86bit 4
87bit 3
88bit 2
89bit 1
90VCC
91GND
92bit 0port $00
93GND
94cpu reset
95cpu halt
96GND
97D0cpu data
98D1
99D2
100D3
101GND
102D4cpu data
103D5
104D6
105D7
106GND
107clock input (1 MHz)
108GND
109A4cpu address
110A3
111A2
112A1
113A0
114GND
115reset
116read/write
117output enable
118chip select ? (FCM.106)
119GND
120GND