From SMS Power!

Development: Music Engine Control - Tutorials - Your - First - Track - Borgman

For our first track, we will be working with Cyborg Hunter / Chouon Senshi Borgman, a master system game based on an Anime that was rebranded for release outside Japan (another is Fist of the North Star / Black Belt). If you don't have a copy of the rom, grab it from one of the usual places. You will need it for this exercise. When you have it, place it in a subdirectory where you installed MEKA. You can place it anywhere as long as you can find it.

This game is not actually the easiest game for a beginner, but it helps highlight several issues in going from an unlogged track to the final product. We will be focusing on a few issues which affect a good amount of games. This game also has FM support, so for our starting work, you will want to make sure it is disabled. If you're not sure how to do that, a guide can be found here.

If you haven't yet grabbed a set of the tools, now. For a description of the files and their function, see here. If you are running these on another OS, you can compile from source.

We will be focusing on three of these tools. VGM Loop Finder, VGM Trimmer and VGM Compressor.

Before Starting, I would recommend some additional setup: here

You will be logging a track. Open up MEKA and load (Alt+L) the rom. Go to the Memory Editor (Tools>Memory Editor)

The RAM tab on the bottom should be highlighted by default. Otherwise, select it.

Now go to the Cheat Finder window. (Tools>Cheat Finder) Since this is a game developed by SEGA, we will make some assumptions. Most games developed by SEGA have, as an aspect of their sound engine, a shorthand way to access the music in the game. The method involves writing a value to RAM and consistently checking its value for changes and either playing back the corresponding music, effect, or executing some function of the sound engine. We call this a Memory Trigger, and we will trying to find this value. It will be easier to follow this guide if you at least have some familiarity with hexadecimal notation

On the Cheat Finder. Select the RAM tab (should be selected by default) and select 16 or 24 as variable size (default is 8). Select Constant where it says Compare Reference since we know the value we are looking for.

type: $80

i.e. $80 [hex/base 16] = 128 or 8 * 16 or 2^7 [binary]) see here

Press the "==" button

You should get this result.

That is the trigger. You can also see these pages for confirmation: here and here. If you ever want to find the trigger value to a game that uses the SEGA sound engine or a similar one, you can use this method to easily find what you are looking for, rather than looking up the game in tables.

Type DE03 in the Memory Editor and press return.

Now select the byte that says $80 (DE03) with the mouse and type 00 (or anything 00-7F,BF-FF). This will stop the music from playing. If you listen with headphones, you can hear a low hum. This is the sound of the sound engine resetting itself every frame, and is not ideal for logging, since it is adding unnecessary commands. Type $80 again and it will sound quiet. This should be the value of the trigger before you ever log a game with the SEGA sound engine. For additional information about why, click here. Try Typing values in between $81 and $88. These are all the valid song values for this game. You can try others. This level of control is why it is called a trigger-because you can "trigger" the song to play when you like simply by editing that value. sfx:are $90-AC. SFX may interrupt the music contents in one or more channels but will not change it like other music values will. Higher values will usually produce strange effects. FYI, $B3 is a fadeout trigger, and is used during the ending credits.

We will start by attempting to log a track as a beginner might.

A beginner:

Will not understand code
Will likely not look up all available resources for aid

You might have noticed that we do not have alot of time to log a track on the title screen. Therefore we will look for a place to log. A place where there are not a lot of effects interfering and where we can control what is happening on the screen. Since the title screen is not ideal, let's see if there is an options screen before we start the game.

Start the game. If you are familiar with the game, you know you're just started into the level. You may also know that if you move right, you trigger a message sequence with a lot of sfx. So we will start the game and not move.

While Standing in the corner. Stop the Music. DE03=$00,$80.

For this exercise, we are focused on one track. When you are ready, start the log. Access the menu by mouse.

Sound>Capture>VGM Start (Make sure Sample Accurate is not checked)

then quickly type $85 to trigger our intended track to minimize the silence in the beginning.

You will want to wait until the music loops a few times so you are able to trim it down. Let it loop a few times to see if it stops on its own or come back in a few minutes to see if it is still going. When you feel you've logged enough, access the menu by mouse and select

Sound>Capture>VGM Stop

Congratulations. You have logged your first track. The Bottom border and the Messages window will tell you how much of the track was logged (in seconds).

While you would rightly be proud of your accomplishment, there are a few issues with this method that result in a product that will be a bit more challenging to work with than necessary. Please keep this track around for reference in the next section: Better Methods.

Retrieved from //
Page last modified on Sun Dec 27, 2015 1:19 pm