Sega Master System

Revision as of 12:39, 7 December 2024 by Retroand (talk | contribs) (Added I/O section)

Input/Output Ports

I/O space mapped ports
Starting port Ending port Read Write Origin Description
0x3E 0x3E No Yes Sega Master System Memory control port
0x3F 0x3F Yes Yes Sega Master System I/O control port
0x40 0x7F No Yes Sega SG-1000 PSG control port
0x80 0x80 Yes Yes Sega SG-1000 VDP data port
0x81 0x81 Yes Yes Sega SG-1000 VDP control port
0xC0 0xC0 Yes No Sega SG-1000 Controller A input port
0xC1 0xC1 Yes No Sega SG-1000 Controller B input port
0xF0 0xF1 No Yes Sega Mark III YM2413 OPLL control ports
0xF2 0xF3 Yes Yes Sega Mark III Audio control port

The Sega Master System is part of the SG-1000 family of video game consoles. As such, it has a high degree of compatibility with its predecessors, the SG-1000 and the Mark III. There are, however a few things to have in account. Only Japanese Sega Master System has the FM hardware, so ports 0xF0-0xF3 are unavailable to European and American models; lectures to port 0xF2 has to be done repeteadly in order to avoid false detections. Also, Mark III and Japanese Master Systems differ in how they enable the FM hardware: while in the older console the PSG and the FM hardware are mutually exclusive, its successor had an enable logic that could have both subsystems enabled at the same time. There are differences on how Japanese consoles and export ones manage port 0x3F, therefore region can be recognized by writing and reading that port.

Memory space mapped ports
Address Read Write Description
0xFFFD Yes* Yes Slot 0 (0x0400-0x3FFF) bank
0xFFFE Yes* Yes Slot 1 (0x4000-0x7FFF) bank
0xFFFF Yes* Yes Slot 2 (0x8000-0xBFFF) bank

There is an official Sega mapper that divides the address space in three slots and RAM. The bank used in each slot is determined by three write only registers at 0xFFFD-0xFFFF, however, as their placement collides with the in-system RAM they can be read back.

Units in collection

ID Model Comments
211 Master System V4
212 Master System V2
213 Master System V3