Page retrieved from the Internet Archive Wayback Machine

.Mod to Gameboy Music Conversions

By Thomas Engdahl ***Under Construction***(But has a start and a finish)

This page will have tutorials on:

Finding, creating, transposing .mod files for GameBoy music.


About .Mod Files

Getting .Mod Files

A good place to get mod files. http://modarchive.org/

Understanding .Mod Files

Use the mod tracker to edit and look at .mod files. Make sure there are 4 channels. These channels correspond to the 4 sound circuits in the game boy. The conversion will only care about the note pitches, instrument number, and volume. All other effects will be lost in the conversion.

=== The Conversion == Once a song is ready to be converted use the mod2lp.exe file to convert the mod file into an assembly language ready table. You can get it here under projects: http://members.fortunecity.com/lemon26/

To use the mod2lp.exe file place the exe and the mod file in the same folder. Then go into dos and goto the directory. Then type "mod2lp -a 'filename' " That will convert your mod file into a file "songname".inc (make sure to inspect your file, the converter likes to remove pattern 0)


Making An Order Table

Tictacorder.inc

This file defines what order the music patterns are played in the mod file and can also be used to define where songs start with labels. If you watch the mod files play in the mod tracker you will notice that it will play 64 steps then goto the next pattern. The row of numbers it plays though are the patterns. Each pattern has 64 steps of unique data and can be played or repeated in any order.


The Player File

Playerfile3.asm

A Musical Function Include File

music.inc


Editing Your Main Code for Music

examplesong.asm

After making these changes in Adam's game he was able to get the music going no problem.


Overview

Mod to lp1. This creates "songname".inc from mod file. This is music data for $4000 section

Create an "songname"order.inc to tell the player the order the patterns should be played in. Add labels where you want songs to start or if you want to jump to that position in a song.

Condition your player file: Pick the default tempo, total number of patterns, steps in a pattern (default is 64). Also use voice order function on top to pick where which mod channel goes to which gameboy sound circuit.

Assemble the code and enjoy music!


Remarks and Examples

There should be in each folder

1.original mod

2.edited mod for mod2lp1 ("modname"ed.mod)

3."songname".inc

4."songname"order.inc (you can really just name this anything, I put the word order to keep track.

5.A custom player file. (not the playerT3 linked above)

6.A source file that is designed just to play music only. "songname"song.asm

7.The assembled source just to test song. "songname"song.gb

Enjoy and try to use these files to get familiar with how things will sound.

You can listen to some of the songs in the music package as Mp3's here on my Blog:

http://cratel.wichita.edu/blogs/tgeegt/2008/05/07/gameboy-music/

ECE238Spr08/tutorials/GameBoyMusic(.MOD->Assembly) (last edited 2008-05-07 01:00:03 by ThomasEngdahl)