11 March 2016 - Forum Rules

Main Menu

Help with Sappy.

Started by StarWyvern, December 15, 2019, 06:59:55 PM

Previous topic - Next topic


  I would like to be able to freely swap songs between all 3 GBA Castlevanias as well as GBA Classic NES Castlevania. Sappy won't pull from NES Classic. And All of My attempts to Rip Midis, convert them with mid2agb, and reassemble them in another game have failed miserably.  :'( They either end up sounding horrible, or when they do sound ok, other tracks at random get messed up.  :-[

  If anyone can Help I have a tracklist i would like to see for each GBA CV Title. Let me know as soon as you can, if you can help, please. :)
Insert "Witty Text" here.


First of all the NES Classic games does not use the sappy sound engine. Rewriting the NES Castlevania music to be sappy-compatible shouldn't be too complicated though if it's really needed for a hack.

The 3 native GBA games all use the sappy sound engine. However they use entierely different soundfonts, so that's why it won't sound good if you import a song form another game without either importing the sound font too, or adapt the song to the other game's soundfont somehow.


  I'm not to good with programming, but if given the right editor I could make some things happen. I would like to see certain songs ported to various hacks already in existence. But if I can improve or change a set of hacks like HOD NGP, it would be even better.  :happy:
  Example: AOS Alter, inverted like Yukuutski no Fantasia, with sprites from Dawn of Symphony, palette hacked enemies with new values, music from all known GBA CV titles in swappable list format, like in the DSVania editor, with the difficulty level of AOS Persephone Hacks. Also Maria should be a playable character, with moves like her set from Saturn version of SotN.  :o

  Example 2: Harmony of Dissonance Revenge on the Findesiecle, with whole new set of maps for castle A and B, swappable music, equipment menu for all characters, as well as Lydie in HOD, with a moves list similar to Yoko in Dawn of Sorrow, generally progressing as you find spellbooks.  8)

  How do I import the HOD and CotM Soundfonts to AOS?
You said rewriting classic nes cv to fit sappy wouldn't be too hard. Would you be willing to make me a .s archive of AOS compatible songs for a hack? Dawn of Symphony used Aquarius, Wicked Child, and Something from Ecclesia for the forbidden area. AOS Hugh Baldwin hack used Clockwork Library, Sinking Old Sactuary, and CotM Chapel. But HOW??? I tried ripping these from AOS hacks figuring they would already be fit to use in the same game format. I mean thay came from hacks of AOS, so why can't I put them in another hack of AOS?  :-\
Insert "Witty Text" here.


Still trying to change music in several hacks unsuccessfully. Need help porting bloodstained curse of the moon songs to AOS zangetsu/gebel/alfred hacks. Also Dawn of Symphony plus AOS alter with music from, Hugh Baldwin hack, Dawn of Symphony, and Harmony of Dissonance. The only original AOS song I want left alone is Inner Quarters.
Insert "Witty Text" here.


OK people. I have a specific problem with inserting songs using sappy. I have tried to find ANYHTING online about how to fix this problem, and know one has posted a solution ANYWHERE!  :(

My problem is not simple. I was working on trying to swap out songs in CV AOS for a hack template. In other words, an "AOSREMIX" patch to be used to swap out songs in various other hacks of the game.

  I finally figured out how to make the songs sound ok. So, I started replacing the original AOS songs with different songs I wanted in their place. This seemed to go fine with one or two songs. But when I took about an hour and a half to swap out all songs in the game, I went back through them to preview what had been done, and about one third of them got messed up!  >:(

Different songs, at random, got completely changed out all on their own, and some songs were just garbled overfilled data that crashed the program upon trying to preview them. So, mind you, I had already finished inserting each song, changing the voice table to make it sound better, and previewed each one before this happened! It wasn't until I was done, while I was cycling through each song, that I noticed some of them were all screwed up.

Does anyone know what happened? PLEASE Help!  :banghead:
Insert "Witty Text" here.


Oh somehow I completely missed your first two bump posts, so sorry 'bout that. You seem to be referring to existing romhacks of the games, also it seems your are using the old "sappy" software. So let's adress the two points.

* Although I'm familiar with the sappy sound engine I'm not with the software. I did my GBA hacks originally with hex editing and then later by using arm-gcc for recompiling while including the unmodified ROMs for parts of the games I didn't touch - a solution suggessted by dwedit for which I should thank him very much because such complex pointer-heavy hacks wouldn't have been possible without him.

* I haven't checked the existing hacks you seem to mention, nor can I understand when you talk about the details in them. If you're not the author of those hacks but you want to import some of it, you should contact their author(s) first - for sure they'd be able to say you can reuse their work and perhaps they can help with the usage of the sappy software.

For inserting the soundfont of a game into another (assuming there's enough free ROM) basically it's just copy/paste soundfont data and sample data, BUT you have to fix all pointers or from the soundfont data to the samples data, and also if unfortunately there's key-split and every-key-split instruments (likely you'll encounter some) you'd have to fix all the pointers of thosee, too. Documentation for how the sappy engine data is laid out is documented here. I strongly suggest you understand at least how the soundfont data and sample data is laid out. I'll gladly help if you have further questions.

For inserting music from Castelvania (NES) into a GBA game, you'd have to write a MIDI equivalent of the NES music and pass it through the mid2agb program (unless you feel like puching HEX code representing music - that's how it was made in the NES days after all). Then you need a soundfont with instruments representing the correct square/triangle/noise voices using their GBC equivalent - likely it won't sound exactly the same but close enough. If that's too far away (especially the noise channel sounds very different) then you could record the NES and play it back using normal GBA samples.


WOW. Thanks so much for completely ignoring my last post in this thread!  ::)
I have already figured out how to export and import tracks successfully. And have already figured out with tutorials, how to loop and insert any midi. But thank you all the same.

The problem is with, when tracks are imported, the songs on either side get screwed up. This happened to me again today actually.  :-[

But I figured out a half measure that will do for now. I imported songs on all odd numbers in one rom, and all even in the other. Then I made 2 IPS for the 2 different roms. Then I merged them.  :thumbsup: This worked, just not perfectly. The one sounds great, while the other distorts all music slightly. So when merged, All songs are replaced, but music is slightly distorted.  :-\

Mind you, It did not sound like that in the sappy program.

If you would like the 2 music hacked AOS Roms as a reference, just let me know and I will pm you a link.
Insert "Witty Text" here.


The problem is - in life in general and with computers in particular you should AVOID AS MUCH AS POSSIBLE fixing things with workarounds like that without having any clue of what you're doing - it's better to spend time figuring out what the problem actually is, and have a real fix that you understand why it's better. Romhacking is just a particular case of that rule.

In this case, you describe your song as "screwed up" and "slightly distorted". Those terms are vague and we have no chance of understanding what the problem is. You should either share a pre-release patch or record the issue, so we can figure out what the problem might be.

And probably the Sappy software is not exempts of glitches itself, like your previous post mentionned... that's why I'm rather on the hex editing side myself. But perhaps I have a huge hassle for nothing.


 An important observation that I have found is that there are a certain set no of tracks in each song. Sometimes, when I import a song into one place, I noticed that a completely different song had all of its tracks changed. It shows up with a different amount of tracks, usually alot more.

February 04, 2020, 08:35:12 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

Quote from: Bregalad on February 02, 2020, 12:49:54 PM
Hello again,
So I've looked into it, and the issue is pretty simple and is a combination of 2 things :

  • The song you imort uses the Aria of Sorrow soundfont, so you have to adapt the instrument so that they sound good with the Aria of Sorrow soundfont. If you don't they'll sound bad or the sound might even be muted if multiple channels try to use the same PSG channels.
  • The songs you import have more data than the song they replace, and this overflows into the next song. This causes issues such as the 1st track sounding wrong and the tempo being affected.

In the end when importing song you have to know what you want. If you want them to sound like their originals, this require much more work than having them adapted to AOS.

If you want to adapt the song to AOS you just need to undersand how the soundfont works, which are it's instruments, and adapt the MIDIs so that they use AOS instruments and drums. You also need to make sure no more than 7 direct sound voices are used simultaneously, and that not more than one PSG voice of the same type is used simultaneously.

If you want the songs to stay the same (assuming songs from GBA games), you need to import the sound font those songs uses into AOS. This is a long and complicated process. Then if they use more than 7 simultaneous voices (Circle of the Moon does that in some of its songs), you need to hack AOS so that it supports those extra voices. With the risk of seeing the game lagging as this uses more CPU time.

If you want to import non-GBA songs basically its the same but you have to import the sondfont from another format, which is even more complex.

So at first you have to know which path you want to take. Then I'll be able to help you further.

Best regards.

February 04, 2020, 09:02:05 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

O K ! So, thanks to your efforts, I believe the problem that I am most running into is the overflow of data.  :o

  I have actually been experimenting with each song, everyday, for about 2 weeks now, changing to various voice tables with each song until I liked the way it sounded. So if you open each patch seperately, (Patch A changed tracks 2,4,6,8,etc, and Patch B changed 1,3,5,7,9,etc) Each changed song should already show the voice group I have chosen for that particular song.  8)

  This means, I liked the way the soundfont worked for that song as it is. Like for instance the way the Clock Tower replacement of FF6 Magitek Factory Remaster now sounds more "8-bit Castlevania-esque". The same applies to the Colbrena remaster in the Dance Hall, and the Magic House Remaster in the Study. (Thank you for those by the way). Other songs like CotM's Vampire Killer, have a slightly different voicegroup, to keep the "Classic Castlevania" feel to them.  ;)

  If I could get all of the songs to sound almost exactly as they did before the glitchiness, I would not change the soundfont, or the voicegroup for any of them, as I have already experimented and found the way I want each one.

So, in essence, the only logical problem I see at this point, is the way the overflow of data messes up different songs than the one being edited or replaced. If I go back to each song individually and find out  how much data I can replace, without overflowing, this should theoretically fix the issue.  :huh:

However, once I am finished, I will share links to more pre-releases (one for each hack), so they may be tested. That way if any of us run into an issue, we can share our analysis, and problem solve together.  :thumbsup:

February 06, 2020, 06:54:04 AM - (Auto Merged - Double Posts are not allowed before 7 days.)

   The overflow of data was most certainly the problem. Thank you for helping me figure it out. Here is a Pre-release test patch of AOSRemix Ver A, in which almost all songs have been replaced with non Castlevania ones. In Ver B, I plan to put Different CV songs, and in C, a mix of my favs from A and B versions. If there are any issues with the patch, let me know. If not, I will release it when all 3 are done.  XD

Insert "Witty Text" here.



I believe the approach you have to arranging songs to insert them in the CV-AoS ROM is wrong, and that you'll never get any good results with it.

Basically you're just changing the pointer to the sound table, so that it points a few instruments forwards or backwards from the cannonical sound table, and sound different. That's like if, to show different text in a textbox, you'd only change the pointer but not the text itself. You would only display part of the message, and it wouldn't mean anything but you'd still be satisfyed to have altered the content of the textbox.

That's not how you're supposed to do it. You're supposed to keep the same sound table as the original music, but change the instrument patches, so that each track is played with the instrument you'd like. In the case of the US ROM of CV-Aos you're supposed to use the soundfont at 0x27B2C0 all the time.

Many GBA games use multiple sound fonts or even a separate soundfont for each musical piece. Luckily Aria of Sorrow uses a single soundfont for the entiere game, so this makes things simple, so let's take this to your advantage !

You should learn how this soundfont work, which instruments are available at which number. For tracks that don't use any drums this should be relatively simple, you just have to change instrument numbers, and possibly octave them so that they sound like you'd like them to. You're extra lucky because some instruments are compatible with General-MIDI nubers, but often they're octavied differently, for example the bass guitar sound at #34 is two octaves lower in CV-Aos than it is on General MIDI, so if you import a General MIDI song you'll have to key shift by +24 (2 octaves) to compensate for that.

For songs with drums you have to learn how the drumset of the CV-Aos soundfont works. There is two drumsets located at instruments #123 and #124, it seems like the #123 is very close to being Genral MIDI compatible, so it should be easy to use. But some times you might have to change notes so that they use the drum you'd like them to.

To use PSG sound for authentic gameboy it's simple, you map to an instrument that uses exactly that. CV-AoS has them at instruments #21-#24 for Square 1, #25-#28 for Square 2 and #33 for the "waveform" channel, #125 for noise channel, and #126 for noise with short period (so called "metallic noise"). But you need to make sure only one track uses each of the PSG channel simultaneously, and that the track are NOT polyphonic. Even if you want 2 notes to sound exactly the same on the Square 1 and 2 channels, you have to use different instruements so that they're adequately mapped to Square 1 and 2.

I hope this helps.

As for data overflows, the GBA allows the ROM to be expanded VERY EASILY. Unless you're sure you only overwrite data you don't need anymore, just insert your data past the end of the ROM and you're safe. This also makes the GBA games much easier to hack than, say, NES games, where any new data can only replace data that is not used anymore.


  Actually that explains alot. Unfortunately it wasn't what I was looking for. I don't want the songs in AOS original sound. I actually prefer the voice tables of AOS AFTER they have been changed to end in D8, CC, or F0. The instruments that are changed work really well with the tracks imported in that particular sound font. You can see here in may newest test pre-release, exactly what I was going for. Don't get me wrong, I am happy for the information, it is very helpful. If I have the time, I will try this again with your method. Until then, I will finish my 3 patches my way.  :thumbsup:


   And as for the method being the wrong way, I actually wanted to create a simpler method for those who either don't have the time, or lack skill with coding, to swap songs from one GBA Rom to Another. This also opens an easier route for those who have already imported certain midis, as you can export the tracks, and import them to your own hack. Without having to have any deep knowledge about sound coding. The only draw back to this method is that you have to remove tracks to make each song you are importing smaller. Also certain songs cannot be swapped, like when you first meet Hammer, as it causes errors in the Dialogue BGM, and ultimately fatal errors in script.  :(

This pre-release patch is constantly being updated over at:

for anyone who wants to see the progress with this method. I believe patch A is finished now.
I still plan to do 2 more. eventually, I will combine these with character hacks, and different castle layouts, and palette swaps. AOS will be like a whole new Castlevania! (Wish me luck)
Insert "Witty Text" here.


Well, good luck. Since you seem to obviously have more interest in realeasing random patches very quickly as opposed to work and do things properly and don't listen to my advice, I won't attempt to help you anymore as this is a pure waste of my time.


Quote from: Bregalad on February 09, 2020, 06:12:31 AM
Well, good luck. Since you seem to obviously have more interest in realeasing random patches very quickly as opposed to work and do things properly and don't listen to my advice, I won't attempt to help you anymore as this is a pure waste of my time.

I meant no offense. If I were to use your method. How would I go about changing each instrument in sappy? It was to my understanding that if you change an instrument the voice table, it changes in all songs. I don't want this to be the case. I want each song to be unique. Also, once you have expanded the rom, how do you find out where to point the new song table to?

February 12, 2020, 11:38:19 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

So. DarkPrinceAlucard took some time to explain a completely different method in great detail. Use HxD to insert about 100 bytes into the rom, then note the Hex address. Open Sappy. Assemble .s file to new Hex Address. Wallah! Worked like a charm. Thanks everyone. ;D
Insert "Witty Text" here.


QuoteIf I were to use your method. How would I go about changing each instrument in sappy?
The simplest is to edit the MIDI files so that they do what you want. This involves no programing whatsoever. Also this is a requirement if you want to have the freedom to arrange the song like you want, not only to change the instruments, but also to remove some notes or change octave, introduce looping etc, etc....

Without editing the MIDIs the result will always sound very poor at best, no matter what you do.


Quote from: Bregalad on February 13, 2020, 02:32:54 PM
The simplest is to edit the MIDI files so that they do what you want. This involves no programing whatsoever. Also this is a requirement if you want to have the freedom to arrange the song like you want, not only to change the instruments, but also to remove some notes or change octave, introduce looping etc, etc....

Without editing the MIDIs the result will always sound very poor at best, no matter what you do.

  Actually yes, you are right. I have Anvil Studio now for editing midis. Looping and changing instruments is pretty much cake now. Thanks again for your help. :thumbsup:
Insert "Witty Text" here.