Repair & Schematics
Sega Mega-Tech Arcade

Z80 Data Sharing (Sega Mega-Tech)

11min

The two Z80s, one from the SMS and one from the Mega Drive, communicate with each other through a few buffers (IC13, IC15, IC33, IC34) and the glue logic (315-5347 and 315-5348) to join the address pins, data pins and control pins together when needed from each specific Z80.

Data Pins

Any 8-bit data that needs sharing between the SMS and Mega Drive is done via the 74LS245 buffer (IC13) located above the SMS Z80.

The SMS data pins are connected to port A, and the Mega Drive Z80 data pins are connected to port B.

74LS245 Pinout
74LS245 Pinout
īģŋ
Z80 SMS Pinout
Z80 SMS Pinout
īģŋ
Z80 Mega Drive Pinout
Z80 Mega Drive Pinout
īģŋ
Document image
īģŋ

To test the data is coming through ok trigger on the Z80 Mega Drive Reset (pin 26), capture at 100us per division and capture all 8 data pins.

They should look very similar to the Z80 Mega Drive data pins only slightly less noisy but the data is the same.

The !OE pin is controlled by the 315-5348 (pin 16), and should be low during reset.

The DIR pin is controlled by the output of 74LS32 OR Gate (IC21 pin 11) and should pulse constant during reset.

74LS32 Pinout
74LS32 Pinout
īģŋ

The 2 inputs to the OR Gate are SMS Z80 !Red (pin 21) going to the input pin 12, and 315-5346 (pin 18) going to input pin 13.

The Data shoud look like this with Golden Axe at 100us per division.

NOTE: This is from the B side (Meg aDrive) which has higher peaks and a bit noisier, but the data will look very similar on the SMS side just without the overshoots.

Golden Axe Data
Golden Axe Data
īģŋ

Address Pins

The Mega Drive Z80 (IC56) and its RAM MB8464 (IC44) address pins go through bus translators 74LS245N (IC33 / IC34) on the B side.

The A side connects to the address pins of the SMS Z80 (IC17), BIOS (IC20) and both RAM chips HM65256BLP-10 (IC28) and MB8464A (IC27).

74LS245 Pinout
74LS245 Pinout
īģŋ
Z80 SMS Pinout
Z80 SMS Pinout
īģŋ
Z80 Mega Drive Pinout
Z80 Mega Drive Pinout
īģŋ

DIR (pin 1) is to VCC so always high, meaning the Master System address pins will pass through to the Mega Drive, so long as the !OE (pin 19) is low.

The !OE (pin 19) is controlled by the 315-5348 (pin 16) and should be low during the reset high period.

Z80 Address Line Sharing
Z80 Address Line Sharing
īģŋ

We see this during the out of reset stage one, when the Master System brings the Mega Drives Z80 and 68k out of reset, at the same time as enabling the bus transceiver so the SMS can control the Mega Drives Z80/68k.

The blue is the !RESET of the Z80 on the Mega Drive side, and the red is the !OE of the bus translators IC33/34.

!OE during reset
!OE during reset
īģŋ

Observe the address pins on the SMS Z80 during the initial out of reset stage to make sure all signals get getting to the Mega Drive Z80 from the SMS Z80 without bad traces or corruption.

Observe the opposite side of the connection by probing the same address pins but on the Mega Drive Z80.

The difference should be the SMS Z80 (port A) will have constant activity on the address lines both before and after the reset is high.

SMS Address A7
SMS Address A7
īģŋ

Whereas the Mega Drive Z80 should only have activity during the high pulse of the reset signal.

Mega Drive Address A7
Mega Drive Address A7
īģŋ

All address pins look the same (all full data) like below, with a few exceptions.

AddressA0
AddressA0
īģŋ

The only notable pins are A7, A8 and A9 as shown previously to have visible gaps in the pulses, and A14 is low the entire reset time.

A14
A14
īģŋ

Control Pins

The Z80 control pins are as follows on each Z80:

  • !MREQ Pin 19
  • !IOREQ Pin 20
  • !Read Pin 21
  • !Write Pin 22
  • M1 Pin 27

These pins from the SMS and Mega Drive are shared via the 74LS245 buffer (IC15) located to the right of the SMS Z80.

The SMS control pins are connected to port A, and the Mega Drive Z80 control pins are connected to port B.

74LS245 Pinout
74LS245 Pinout
īģŋ
Z80 SMS Pinout
Z80 SMS Pinout
īģŋ
Z80 Mega Drive Pinout
Z80 Mega Drive Pinout
īģŋ
Document image
īģŋ

NOTE: There is also an out of place pin setup on pins A6 > B6 where it isn't Master System to Mega Drive pins, but 315-5308 !ZWAIT pin 47 on port A going to the SMS Z80 !WAIT pin 24 on port B.

This means when the Mega Drive Z80 is being controlled, the 315-5308 puts the SMS Z80 into wait.

The DIR pin is tied to VCC.

The !OE pin is controlled by the 315-5346 above it (pin 18) and should be constantly pulsing during the reset high.

On the SMS side (Port A):

  • !READ is pulsing constantly
  • !WRITE is pulsing constantly
  • !MREQ is pulsing constantly
  • !IOREQ is held high
  • M1 is pulsing constantly

On the Mega Drive Side (Port B):

  • !READ is pulsing constantly during reset high
  • !WRITE is pulsed once low very briefly then held high
  • !MREQ is pulsing constantly during reset high
  • !IOREQ is held high
  • M1 is pulsed once low very briefly then held high

Notice the key difference is the Mega Drives !WRITE and M1 are basically high not pulsing.

Finally, the Port A !ZWAIT (going to the 315-5308) and Port B Z80 !WAIT (going to SMS Z80 wait pin 24) is pulsing constantly during reset high.

!ZWAIT Pin
!ZWAIT Pin
īģŋ

īģŋ