Development Tools/Software

Here you’ll find a collection of development tools, software, and sample code for the Mega Drive. Official tools are listed here, which in this case means tools that were made available to developers while the Mega Drive was still manufactured and officially supported by Sega. Additionally, community-developed tools of note are also listed below, which are potentially more suitable for modern development.

Original Development Tools

##TODO## -MEGAWICE.exe -LOGODEMO -32X Samples -SegaCD header file

      Images       Name Creator Description
Mega Drive Sample Programs Sega Official sample program disks provided by Sega to assist developers. Effectively your “Hello World” example code for getting started in Mega Drive development. Unfortunately complete copies of this software have never been shared publicly. ASSEMbler was known to possess the disks shown here, but didn’t release them. A lot of other code samples are also known to have been shared on an official BBS server run by Sega of America.

ICD_BLK4.PRG - This file is known to have been included with the sample program, based on mentions in “Genesis Software Development Manual (Complement)”. The file given here is believed to be unmodified and was recovered from source code releases.
CHECKSUM.ASM - This is a transcription of the checksum routine given in the “Genesis Software Development Manual (Complement)”.
HEADER.ASM - Transcription of the standard ROM header for third party developers, given in “Genesis Technical Bulletin #5”. For more information on the correct format of this header block, refer to “Genesis Software Development Manual (Complement)”, section 1. - Full version of the standard lockout code block that performs country code lockout checks. This was available on the official BBS server under the name “LOCK.ZIP”, which is referenced in “Genesis Technical Bulletin #18”. This version was retrieved from the 32X section of the November 1995 DTS CD.
UNIVERS.ZIP (Missing) - Example code that was available on the official BBS server relating to peripherals. Referenced in “Genesis Technical Bulletin #16”. File listings of the sample code is given in this bulletin too.

Alternate VersionsLOCK.ASM - Earlier version of the country code lockout check, with just the raw LOCK.ASM source file available. This particular version was recovered from the samples included with the SNASM2 32x installation.
32x Sample Programs Sega Official 32x (MARS) sample program developed by Sega, demonstrating the hardware. This particular version was recovered from the SNASM 32x installation disk, however file copyright headers indicate it was developed by Sega and is the official sample program for the platform. ##TODO## Change this to add all the other 32x sample programs here. [ROM]
GEMS Sound Driver Recreational Brainwave (for Sega) A widely used Z80-based sound driver for the Mega Drive, with an accompanying suite of PC software tools. Sega contracted Recreational Brainwave to develop this sound driver, to provide an easy option for developers looking to make use of the Mega Drive sound hardware. Although GEMS may not be the best sound driver for the system, it was a fairly comprehensive package which greatly simplified the task of adding sound support to games.

Brief Text Editor Borland A popular text editor back in the day, aimed at the requiremnts of programmers, with inbuilt support for macros. It is comparable to other vintage editors like vi. The use of Brief was commonplace, with other tools like the SNASM2 software adding macros into Brief.

Borland Brief 3.11
Psy-Q Mega Drive Toolkit S.N. Systems A set of tools designed specifically for Mega Drive development. While some of these are specific to the Psy-Q development hardware, this toolkit also includes the highly regarded DOS-based ASM68K.EXE and ASMZ80.EXE 68000 and Z80 assemblers, as well as a C compiler and linker for 68000 development. The 68000 assembler in particular was the best of its time. If you’re interested in using tools from the era, while you might want to go with the Sierra C compiler, this package is your best choice for assemblers.

Psy-Q Development Software (Genesis and MegaCD)
SNASM2 Mega Drive Toolkit Cross Products The supporting software for the SNASM2 development hardware. While some of these are specific to the development hardware, this toolkit also includes the SNASM68K.EXE and SNASMZ80.EXE DOS-based 68000 and Z80 assemblers. While these may have been widely used at the time, the 68000 assembler in particular is known to have several annoying bugs and limitations. If you want a toolchain from the original era, you’re better off using the assemblers from the Psy-Q toolkit.

Sierra 68000 Assembler & C Compiler Sierra Systems This particular DOS-based 68000 C compiler was recommended by Sega for development in C on the Mega Drive. A 68000 assembler is also included.

Sierra C Compiler 3.1b
Microtec 68000 Assembler Microtec This DOS-based 68000 assembler was commonly used in the early days of Mega Drive development, and is mentioned in the official documentation.

Microtec ASM68K 6.9C
Microtec ASM68K 7.0 (Installed)
Microtec 68000 C Compiler Microtec A DOS-based C compiler for the 68000, which was made available for early Mega Drive development. It appears the Sierra C compiler was favoured by Sega in later years.

Microtec ASM68K 6.9C
Microtec ASM68K 7.0 (Installed)

Community Development Tools



The following is a collection of test ROMS for the Mega Drive which are noteworthy, interesting, or otherwise useful for examining or testing the behaviour of the hardware. This list does not attempt to be exhaustive and cover every test ROM ever produced for the system, but it does aim to include the most useful ROMS which can be used to verify the correct behaviour of emulators in particular.

      Images       Name Author Description
IO Sample Program Sega Official test ROM from Sega to demonstrate detection of I/O devices and to decode their input.
  FM Test DevSter Very basic test of FM sound through the YM2612. There is no visual output, only audio.
Graphics & Joystick Sampler Charles Doty Handy minimalist ROM with simple graphics and a movable character. Useful as an early test ROM when building an emulator.
68000 BCD Verifier [source] flamewing Verifies correct flag results for Motorola 68000 BCD opcodes, which have historically been poorly documented and problematic to emulate correctly.
68000 Opcode Sizes [source] r57shell Verifies 68000 opcodes are implemented with support for the correct sizes. Two green boxes near the bottom right corner indicates success, otherwise it’s a fail.
68000 Illegal Opcodes [source] Charles MacDonald Verifies that all 68000 opcodes which should generate illegal instruction exceptions actually do. A green screen is a pass, red is a fail.
V counter test program Charles MacDonald Samples observed VDP vertical counter (VCounter) values under a variety of display modes
CRAM Flicker Test Nemesis Verifies correct placement and timing of CRAM dots in the border and active scan when CRAM is written to
VDP Port Access Test ROM [source] Nemesis Exhaustive test suite running through hundreds of separate tests on observable VDP port behaviour. This test ROM focuses on undefined or unusual behaviour, attempting to test as many corner cases as possible.
VDP Sprite Masking Test ROM [source] Nemesis This test ROM verifies correct sprite masking and overflow behaviour in both H32 and H40 modes, including all known corner-cases.
VDP Test Register Tristan Seifert Interactive test ROM allowing any bits of the VDP test register to be toggled, with a variety of audio and graphical output to observe the results.
68000 Memory Test Charles MacDonald Handy test ROM that displays the results of reading from various locations in the 68000 memory address for the Mega Drive which are undefined, but don’t lockup when attempting a read as DTACK is asserted. Results will differ between different Mega Drive models.
1536 Color Test Charles MacDonald Test ROM using dynamic palette changes combined with the VDP shadow/highlight mode to demonstrate a large number of unique colors on the screen at once.
Shadow-Highlight Test Program Paul Lee Simple test ROM showing shadow highlight mode
Window Test Fonzie Useful test ROM showing the function of the VDP Window mode with a top left aligned window, and scrolling plane A and B. This ROM also demonstrates the VDP hscroll bug, which occurs when you have a left-aligned window and attempt to scroll layer A.
Direct Color DMA [source] Chilly Willy Test of the “Direct Color DMA” method involving CRAM writes to the VDP with the 68000 locked to a stable raster position. Emulating this requires extremely accurate timing emulation.
Window distortion bug [source] Charles MacDonald Old test ROM showing the VDP hscroll bug when using a left-aligned window. The ROM is fairly limited but demonstrates the issue reasonably well. You can also use the “Window Test” ROM by Fonzie for an interactive example of this issue.
Overdrive Titan Technically a demo release, but serves as a good technical proof as well. Aims to push the hardware to the limits, and exploit corner cases and undocumented hardware features.
Overdrive 2 Titan Follow-up to the original Overdrive demo. Requires a lot of obscure features and timing edge-cases to be implemented correctly in order to work in emulators.