Repair & Schematics
Sega Mega-Tech Arcade

Reading Game Titles (Sega Mega-Tech)

18min

Once the SMS reads the BIOS and boots, it instructs the Mega Drive to read all games header ROMs that are inserted.

The SMS Z80 then reads the data on the Mega Drives Z80 by passing it through some buffers and glue logic.

The Mega Drive 68k Processor is disabled during all of the game header reading via the !BGACK pin staying low. You can even remove the 68k completely and still get game titles to read.

It does this by setting the !CE0 pin low (to enable both ROM chips), the !Header OE pin low (to enable the Header ROM output) and the !CAS0 high (to disable the Game ROM output), one at a time per cartridge.

Cartridge connector pinout
Cartridge connector pinout
īģŋ

The following chips are not used at all during game title reading and can be completely absent:

  • Mega Drive 68k RAM (IC55 / IC43 HM65256 or TC51832)
  • Mega Drive Z80 RAM (IC44 MB8464)
  • High Address Buffer (IC42 74HC244)

The cartridge only needs some of the data pins from the cartridge pins to be valid/working in order to display a valid title.

For example, if the traces between the 68k and IC50/53 and cartridges pins are missing or bad, for D4, D5 or D6 the game title will still show but the game won't load.

So, seeing a game title only proves partial data path validity.

In order to monitor for the successful loading of the Game Title we want to follow this flow:

  • Reading Cartridges successfully (check Reading Cartridges article)
  • Monitor for 68k Mega Drive Data Bus for correct Game Metadata (its not the 68k driving the data pins but its good place to monitor them).
  • Monitor for Z80 Mega Drive Data Bus for correct Game Metadata
  • Monitor for Z80 SMS Dat Bus is correctly transferring the MD Z80 data

All the below monitoring is done by triggering on the 68k reset (pin 18) going high during initial boot when it is instructed to read the game metadata.

The 68k reset line connects to the other Mega Drive IC chips too, bringing them out of reset. The 68k is not used it is just a good place to probe and monitor the pins easily.

Data Processing

The first place to check is the 68k data bus. This bus connects to the 315-xxxx logic chips which are the ones doing the actual work, but the 68k is a good place to easily probe.

Ensure the SMS is working, you have the Menu title, the Mega Drive comes out of reset and you have validated if needs be the Reading Cartridges logic is all good.

Address & Data Bus

Start with the address and data pins for activity. Use 2 probes, one setup on the reset (pin 18) and the other on the address and data pins one at a time to capture activity.

68k Pinout
68k Pinout
īģŋ

Here are the address pins captured during the boot.

  • The blue trace is the !RESET (pin 18) going high for the first time to read the metadata.
  • The red trace is the address/data pins mentioned below each image
Address 5 (pin 33)
Address 5 (pin 33)
īģŋ
Address 8 (pin 36)
Address 8 (pin 36)
īģŋ

The data pins look slightly different.

Data 5 (pin 64)
Data 5 (pin 64)
īģŋ

Do this for all address and data pins looking for any floating or bad pins typically between 0.5V and 3V, not within a solid 0 to 5V range.

Confirming Valid Data Packets

Before you dive further back into the Mega Drive system, it is worth a quick check if the metadata is already coming out of the 68k data pins ok and valid, indicating perhaps more of an issue with the glue logic between the Mega Drive and Master System not actually a faulty Mega Drive system.

The best way to check this is with ideally 2 games and capturing on the first rising edge of the reset cycle.

This is a capture on pin D5 (top left on 68k) and on the reset trigger, with Golden Axe slot 1 and Super Real Basket Ball in slot 2.

Notice the first game Golden Axe is loaded for the first 70ms, and then Super Real Basket Ball in the second 70ms.

D5 Game Load
D5 Game Load
īģŋ

Importantly, if we zoom in for each start section and put them side by side, you can clearly see the differences in the data.

Game Metadata
Game Metadata
īģŋ

To confirm the data seems valid, repeating this capture over and over a few times should result in almost identical data being shown each time. Capture a reference waveform so it stays persistent on screen on the oscilloscope then re-capture and it should overlay perfectly.

Notice there are always slight variations even when loading the exact same game. This could be some custom data, time specific, last load, or just differences due to boot up timings or random data.

They key thing is you can clearly tell on repeat boots that the overall data pattern is the same and specific to each game. For example, Super Real Basket Ball has a distinctive less data pulses at the right side than Golden Axe.

Repeat Loads
Repeat Loads
īģŋ

If you swap the games around the data should reverse in order to match. This confirms the game swapping and slot positions are correct and working.

If the data changes significantly between each boot it is a sign the RAM or 68k could be faulty. Much more common the RAM.

BIOS Variations

There are also SMS BIOS variants where the data will be slightly different. For example, here is an example of ERP 12604 SMS BIOS on the top, and ERP 12263 B BIOS on the bottom.

You can see the data looks very similar, and repeat boots result in repeatedly similar data, however there is clearly a difference in data requested, mainly at the end where the final pulses are all of a longer period.

BIOS Variations
BIOS Variations
īģŋ

Z80 Data Processing

Once you are happy that the 68k address/data bus is producing expected data by monitoring for the correct data on D6 with Golden Axe for example. you should now monitor if the Z80 is processing the data correctly from the 68k ready to pass onto the SMS Z80.

Z80 Mega Drive Pinout
Z80 Mega Drive Pinout
īģŋ

Address & Data Bus

The Z80 address and data pins below the 68k should have pretty much identical scopes as the 68k, pulsing data as soon as the chip comes out of reset.

Signal Pins

The CLOCK should be 3.579MHz.

The IOREQ, NMI, M1 and WRITE should stay DC high.

The HALT and REFRESH should be 3.3V.

The MREQ, READ, WAIT should pulse like the address pins.

MREQ
MREQ
īģŋ

The INT pin should pulse 4 times per game that is in a slot. So, 8 times if 2 games, 64 times if all 8 games are present.

Document image
īģŋ

The BUSACK and BUSREQ should pulse low.

BUSACK
BUSACK
īģŋ

Confirming Valid Data Packets

Before you dive further back into the Mega Drive system, it is worth a quick check if the metadata is already coming out of the Z80 data pins ok and valid, indicating perhaps more of an issue with the glue logic between the Mega Drive and Master System not actually a faulty Mega Drive system.

The best way to check this is with ideally 2 games and capturing on the first rising edge of the reset cycle.

Z80 Mega Drive Pinout
Z80 Mega Drive Pinout
īģŋ

This is a capture on the Mega Drive Z80 on the D0 (pin 14) and on the reset (pin 26), with Golden Axe slot 1 and Super Real Basket Ball in slot 2.

Notice the first game Golden Axe is loaded for the first 70ms, and then Super Real Basket Ball in the second 70ms.

D0 Game Load
D0 Game Load
īģŋ

In order to better read the data, go to 20us per division and capture just the start of the data. This is Golden Axe.

Golden Axe
Golden Axe
īģŋ

To confirm the data seems valid, repeating this capture over and over a few times should result in absolutely identical data being shown each time. Capture a reference waveform so it stays persistent on screen on the oscilloscope then re-capture and it should overlay perfectly.

In order to spot differences, capture slightly longer 100us per division. You can see a slight difference between the games. The data is always identical so the difference should be identical every time too.

If you swap the games around and capture with the faded red as a reference of Golden Axe, and the full red is the Super Basket Ball.

Z80 Mega Drive D0 Differences
Z80 Mega Drive D0 Differences
īģŋ

If the data changes significantly between each boot it is a sign the RAM or Z80 could be faulty. Much more common the RAM.

Here are all the data pins for Golden Axe to allow comparison. These were captured using the ERP 12263 BIOS.

Golden Axe Data Pins
Golden Axe Data Pins
īģŋ

Sending Data To SMS

If you get this far and all the data pins match, then the Mega Drive is ok and reading the data successfully.

The next step is to make sure it trsanslates over to the SMS Z80. Continue reading the Z80 Data Sharing article on how that works.

Only 6 Game Slots Showing

If you see 6 game slots it will be because you have no games in slots 7 or 8. Until a valid game is in one of the extra slots the menu will only show 6 items.

This can also happen if the Mega Drive system is faulty and not running, or if the Master System and Mega Drive are not communicating between each other successfully.