SEGA Megadrive game development #1
Added 2020-02-26 19:26:13 +0000 UTCAn overview of SEGA Megadrive game development
Introduction
SEGA メガドライブ / Megadrive / Genesis is a 30 years old console which recently regained interest thanks to the work of fans around the world as well as the official release of a « Mini » console.
This and following articles will focus on my game development relying on SGDK, an open source development kit initiated by Stéphane DALLONGEVILLE in 2006. It allows to code a game in C and compile it as a .BIN file which can be played on both real hardware and emulators.
First, we will list console’s components and principles in order to have a simple understanding of console’s architecture. Then, we will check some code together.
What’s inside?
Various versions of this console were produced (1st and 3rd party), each coming with its own internal revisions.
There were also countless copies of the console produced illegally, each having its own architecture.
In 2019, the console was even completely re-engineered by Kevin HORTON using an Intel Altera Cyclone V solution (FPGA integrated circuit). This new version of the console is called Mega SG and is currently sold by Analogue.
List of components below should therefore be considered as a default configuration which may not strictly be applicable to all models.
- Motorola 68000 processor (main processor handling I/O and graphics calculation, running at 7,6MHz with 64KB RAM)
- Zilog Z80 processor (sound controller and backward compatibility with SEGA Master System, running at 3,5MHz)
- VDP chip (Video Display Processor, running at 13 MHz with 64KB of VRAM to contain and display graphics data at each screen refresh)
- Yamaha YM2612 chip (Frequency Modulation synthesizer, supporting 6 channels)
- Texas Instrument SN76489 chip (Programmable Sound Generator, integrated into VDP chip and supporting 3 standard wave form channels as well as one noise channel)
- 2 front ports (primarily used to plug 2 joypads with 3 or 6 buttons)
- 1 cartridge port (4MB maximum in direct access, though bigger cartridges can be accepted relying on bank switching)
- 1 extension port below the console (to plug SEGA CD)
This picture from https://copetti.org shows a Japanese VA0 launch model from 1988:

Since then, many revisions occurred.
You may look at the following page to get an idea of what happened: https://www.sega-16.com/forum/showthread.php?7796-GUIDE-Telling-apart-good-Genesis-1s-and-Genesis-2s-from-bad-ones