Home

Awesome

MDSDRV

A sound driver for Sega Mega Drive/Genesis.

Features

Upcoming features

How to use

Feel free to join the Discord server if you have any questions or feedback.

Composing sound data

mmlgui provides an easy way to compose music and sound effects using Music Macro Language (MML).

For information on the MML dialect, see here.

Compiling sound data

The mdslink tool of ctrmml is capable of building the sound data files (mdsseq.bin and mdspcm.bin).

# creates 'mdsseq.bin' and 'mdspcm.bin'
mdslink -o mdsseq.bin mdspcm.bin mymusic.mml ...

Sound data files can be in MML (Music Macro Language) or MDS formats. For information on the MDS binary format, see mdsseq.md.

Building MDSDRV

All required tools for building are already in the repository, you just need to run build.bat. These are Windows executables, so for other operating systems, wine is required.

# creates `main.bin` (test ROM) and `mdsdrv.bin` (sound driver blob)
wine /c build.bat

To quickly generate a ROM (in Windows) with a single song, you can drag and drop a .MDS or .MML file into "quickrom.bat"

Using MDSDRV

Once compiled, using MDSDRV should be as easy as including the binary files (mdsdrv.bin, mdsseq.bin, mdspcm.bin) in your project, and calling the correct addresses inside the mdsdrv.bin blob.

File listing

SGDK test project

If the SGDK environment variables are set, calling build.bat should automatically build the SGDK test program.

Interfaces

Sound data reference

Precautions when using DMA

The Z80 code has a protection mechanism against reading ROM during DMA transfers. Please read dma.md for information how to use it.

Copyright

© 2019-2022 Ian Karlsson.

MDSDRV is licensed under the terms of the zlib license.

Other programs included in this repository

mdslink is part of ctrmml and is licensed under the terms of the GPLv2. But all code is written by me and I give myself permission to use it here :).

asm68k is owned by SN Systems and is non-free. However it was last released 25 years ago. I hope to move away from using it soon. The code does however currently still use a lot of specific directives, and I prefer its listing outputs for debugging... Please bear with me as I try to find a good replacement.

sjasmplus is licensed under the zlib license. The version included in this repository has been downloaded from the Github repository.

salvador is released under the zlib license. The version included in this repository has been compiled from the source code in the Github repository.

Special thanks