Repair & Schematics
Sega Mega-Tech Arcade

Port Expander IC24 (Sega Mega-Tech)

9min
the ic24 i/o expander cxd1095 connects the sms z80 data pins to various places, including the ym2612 sound ic, buttons and the custom pal chips there are 8 bits to the port expander, and 5 ports, meaning the z80 can interface with 5 different bytes of information coming from 5 sources (except for port x which is only 4 bits) as the cxd is setup, it basically multiplexes one of the ports (a, b, c, d and x) to the data pins of the sms z80 external ports to cxd all outside connectors to the physical buttons (buttons from player 1 cn4, player 2 cn7 and select cn2 for example) pass through nec 2501 photocouplers to isolate the buttons physical shorting to ground from the ics inputs it adds a bit of protection the buttons are pulled high on the diode anode side (positive), and then the button shorts the cathode (negative) to ground to turn the led on, which in turn saturates the base of the photo sensitive transistor on the output side (pins 9 16) triggering the output sides (collectors) to pull low also to bypass the photo coupler ics all together you can just short the collector pins (10, 12, 14 and 16) to ground to simulate button presses port a (input buttons) when port a is selected it maps the data pins to various buttons cxd port pin through final pin a0 ic36 pin 16 > pin 2 select (cn2 pin 1) a1 ic36 pin 14 > pin 4 ?? (cn2 pin 2) a2 ic36 pin 12 > pin 6 ??(cn2 pin 3) a3 ic36 pin 10 > pin 8 ?? (cn2 pin 4) a4 ic35 pin 16 > pin 2 door sw 1 (cn2 pin 5) a5 ic35 pin 14 > pin 4 door sw 2 (cn2 pin 6) a6 ic35 pin 12 > pin 6 ??? (cn2 pin 7) a7 ic35 pin 10 > pin 8 test (cn2 pin 8) port b (input buttons) when port b is selected it maps the data pins to various buttons cxd port pin through final pin b0 ic26 pin 16 > pin 2 a1 (cn2 pin 9) b1 ic26 pin 14 > pin 4 a2 (cn2 pin 10) b2 ic26 pin 12 > pin 6 a3 (cn2 pin 11) b3 ic26 pin 10 > pin 8 a4 (cn2 pin 12) b4 ic25 pin 16 > pin 2 service (cn2 pin 13) b5 ic25 pin 14 > pin 4 enter (cn2 pin 14) b6 ic63 pin 10 > pin 8 p1 start (cn4 pin 8) b7 ic46 pin 10 > pin 8 p2 start (cn7 pin 8) port c (cartridge !asel) port c connects to all 8 cartridge slots pin b26 (!asel) which are for row/column address multiplex control for dram of each cartridge slot slot 1 to 8 are pins pc0 through 7 if a game is inserted it pulls !asel low , letting the sms z80 know there is a game in the slot otherwise, the pin is high so, if you have a game in slot 1 and 6, the binary data on pc0 7 would be 11011110 where bits 5 and 0 are low port d (md z80 reset / ym2612 sound) port d4 goes to the ic23 inverter input pin 5, which the output pin 6 goes to the or gate of ic21 pin 4, who's output pin 6 goes to the mega drive z80 !reset pin 18 port d2 (pin 22) and d3 (pin 23) go to the ic51 or gate (pin 10, pin 9) which controls the enabling of the controller buttons to the mega drive the rest of the port d goes to the 74ls245 bus transceiver (ic13) near the audio ic the port d connects to the a side of the transceiver, and the b side connects to ym2612 audio ic this port is responsible for connecting the ym2612 d0 7 to the sms z80 d0 7 port x (mega drive + 68k) port x goes to the custom pal chips 315 5347 and 315 5348 these two pal16l8bcn chips appear to interface some of the pins of the 315 5313 and 68k of the mega drive system, to the cxd i/o expander back to the sms z80 cxd port pin through final pin x0 ic30 315 5348 pin 16 > ??? ??? x1 ra9 pin 4 ??? x2 ra9 pin 3 ic57 pin 5 p1 start/c and gate x3 ic31 315 5347 pin 1 > ??? ??? triggering button presses there are several ways to trigger the buttons presses the first and most obvious is to join the pull up 5v to the 5v of the system, and short the actual button pins on the external connectors to ground however, this requires fully working photo couplers perhaps those are bad instead, you can just ground the associated port pins on the cxd1095 (ic24) to ground for the specific button you want to press this method does not require the external 5v pull up shorting together either