M4A build in assembler
I think everyone who already hacked music knows that the "main" tool Sappy is very buggy and some of them are really nasty.
So I thought about making my own tool and now I want to present it to you.
I think you also should know Sappy's button "Assemble song". My tool actually does exactly the same job than this function but it doesn't "destroy" your ROM and it has also compatiblity to 32MB ROMs.
*UPDATE* the tools now also deletes the old song!
This tool should work for all games that are using the M4A engine (also called sappy engine).
I already tried out Wario Land 4, Golden Sun, Kirby NID, and of course Pokemon.
So let's have a look to the GUI:
![[PokeCommunity.com] M4A build in assembler (Music) [PokeCommunity.com] M4A build in assembler (Music)](https://upload.pokefans.net/m29_54cl51aa4.gif)
The steps how to insert a song:
1. Make sure the "MPlayDef.s" library is placed in the same folder than the program.
2. Selcect your mid2agb output (.s file) and your ROM.
3. Type in the track group. Huh, I think you even don't know what it is. Which values you have insert here depends on the game you are using and on the type of song. So if you're using Pokemon games insert "0" for normal song, "1" for a sound effect and "2" for a fanfare and "3" for sound map sound efect (like rain).
4. Type in the songpointer offset. The songpointer is an entry of the songlist and it is needed to change the songpointer that it'll point to your new song. The songpointer is calculated like this:
Code:
songpointer_offset = ( song_number * 0x8 ) + songlist_offset
5. Just type in an offset of free space (it has to be word aligned).
6. Specify your soundbank/voicegroup
7. Define the "delete byte". The tool will fill the area of the old song with this byte.
8. Than click on "build in this song" and you will finally have a new sequence build in the ROM.
Just note that there are ways to make the program crash or even the song you'll insert:
-The input file is not an mid2agb output or the song syntax is not correct.
-You don't have write access to the programs folder (it will store temporary files there).
Also note that I won't bring out any updates for this toll because it does its job and I'm working on a new uitility that will be a little bit more blind user firendly than this one and will also contain diffrent functions like a music player and such or maybe an instrument set editor.
You can donwload the program from the file attatchment.
It should work on any OS that supports .NET 3.5 ( I used VC# 2008)
So now here are the offset of the songlists:
BPRE: 0x4A32CC
BPGE: 0x4A2BA8
AXVE: 0x45548C
AXPE: 0x4554E8
BPEE: 0x6B49F0
BPRD: 0x4A18F0
AXVD: 0x463428
BPED: 0x6C5BDC
So I hope you'll enjoy the tool!
PS: Greetings from Germany ;)
Last edited: