The SMSReader Project

SMSReader is a parallel port Sega Master System cartridge reader/writer. By default, it can read standard US and European SMS cartridges, and can write to battery-backed SRAM memory in such cartridges.

With adaptors, the SMSReader can also handle the following:

equivalent) or a DOS-based version of Windows, i.e. Windows 95/98 or Windows ME. A bidirectional (PS/2 compliant) parallel port is required to support the hardware.

Purpose of the SMSReader

Firstly, the SMSReader is intended to allow you to back up your own original cartridges (known as "dumping" the ROM), so you can use them with emulators such as Meka, Smeg, FreezeSMS, Dega etc. Although most Sega 8-bit cartridges have already been dumped (thanks to projects like SMS Power), not all of them have been. (I suspect that many undumped variants of released games remain undiscovered!) Additionally, locating good dumps of your favourite games on ROM sites can sometimes prove difficult.

If you intend to actually release the dumps you make, as opposed to just making dumps for your own personal use, please read the Guide To Responsible Dumping.

A second function is to allow the transfer of saved games between emulators and the real SMS console. Games such as Phantasy Star contain a battery backed SRAM chip which is used to save your progress. The SMSReader will read the contents of this chip and thereby allow you to continue your game in an emulator. When you're ready to continue playing the real thing, the SMSReader can write the updated save file back to the cartridge.

Finally, the SMSReader can take ROM files you've downloaded, and write them onto specially modified, battery-backed RAM cartridges so you can play them on a real SMS, instead of on an emulator. This also facilitates the development of home-brew SMS programs which can then be run on the real console.

I'll now explain how the SMSReader works. You don't need to know any of this in order to build and use the device, however, so don't worry if anything seems difficult to understand.

SMSReader Design

Schematic

Here is the schematic of the SMSReader hardware:

Schematic

The design uses a pair of CMOS 4040 counter ICs for addressing - one for the low byte, one for the high byte. The entire Z80 address space of 65536 bytes (0x0000 - 0xFFFF hexadecimal) is covered. In effect, the address space is treated as a continuous "loop of tape", but since we are dealing with large, contiguous blocks of data, 16 kilobytes or more in size, this isn't really an issue. The counters can be clocked very fast, so any memory location can be accessed reasonably quickly.

Four control lines are available from the parallel port (three inverted, one non-inverted) and the SMSReader uses all of them. INIT is used for write enable and is connected directly to the WR line on the cartridge. AUTLF is used to reset the counters before a read/write sequence is commenced. STB is connected to the CLOCK pin on the low counter and is used to increment the counter. Finally SEL is used to set the RD pin high during write mode, disabling data output from the "ROM" area of the cartridge.

A 74HC00 quad NAND gate IC is used to implement the logic shown in the lower part of the schematic, such that:

(These pins aren't actually used by any Sega cartridge that I know of, but since we need the 74HC00 IC anyway we may as well connect them, for completeness.)
(This enables data output from the ROM only when we want to read data from it. Many cartridges do not use this pin, but instead have their own logic for ROM output enable.)

Construction

The SMSReader is built on Veroboard (or "strip board") - a SRBP board with 0.1 inch pitch holes and copper strips on one side, forming "tracks" to which components can be soldered. It's a common means of building prototypes or homebrew projects, without the need to etch a custom printed circuit board. Wire links are used to make connections between the components on the board.

Power is obtained from an unregulated DC power supply, such as the one provided with the Sega Master System itself. A 7805 regulator and associated smoothing and decoupling capacitors are used to provide the 5 volt supply required by the ICs and cartridge.

How a cartridge is read

As mentioned previously, the Z80 in the Master System can only address 65536 bytes or 64 kilobytes in total (0x0000 - 0xFFFF hex). How, then, are cartridges of 1 Megabit (131072 bytes) and above implemented?

Answer - by using mapping. The cartridge ROM is divided into 8 or more discrete 16 kilobyte "banks" which can then be mapped into "slots" starting at 0x4000 and at 0x8000 hex. The mapping is controlled by mapper hardware on the cartridge itself - three mapper types are commonly used in Master System cartridges:

Codemasters games (Fantastic Dizzy, Cosmic Spacehead, Micro Machines, etc.) use a different, and incompatible, type of mapper. They aren't supported by the SMSReader at this time.

Most Sega-made cartridges do not actually have separate mapper ICs, but instead have the mapper hardware built into a custom ROM. The functionality is identical to that described above, however.

Banks are selected by writing to 0xFFFC - 0xFFFF, as follows:

Here are some examples of how cartridges are read:

32k cartridges (not mapped)

128k cartridges (8 banks)

...

Battery backed save game SRAM (1 bank)

Writing to SRAM on cartridges which support it is accomplished in the same way.

That concludes our overview of the SMSReader and how it works.


SMSReader | Tools you'll need >




Return to top
0.166s