Golden Sun Hacking Community

General Hacking => Non-GS Hacking => Topic started by: Blazer on 06, July, 2009, 10:27:00 PM

Title: Wav Insertion
Post by: Blazer on 06, July, 2009, 10:27:00 PM
Yeah. :\

Step 1 is to convert the WAV. It didn't bring up any errors so I'm assuming it did it correctly. I tried another WAV that was possibly compressed and it DID give an error, so yeah, I'm confident the file I am using is fine. I'm 99% sure ALL my pointers are 100% correct. I'd be shocked if it was a pointer problem.

My instrument map is very very simple...

00003C00 00701B09 00FF00FF

I used Atrius' format, and the pointer in the middle leads to 0x11B7000 where my instrument data is. The instrument data is what was in the "taunt.bin" file, my converted file. Yes, I'm trying to insert the voice of a characters' taunt. That's not important though, is it? :P

Now, the pointer to my header, in the pointer table. 48ECAD08 06000600

The last 4 bytes are part of the priority, I am inserting over what was originally a sound effect and I checked to see if the bytes looked right and they do; the other option would be to make it "07 00 07 00" but honestly, the sound should work REGARDLESS and the priority should only effect how it works out in-game. :\

01001400 50801C09 00801C09

The 1st part is what was originally there. I have also tried a header of "01000A80" but that didn't change much. :( I've already showed what's at the first pointer-- the instrument thing and the 2nd one is at 0x11C8000 and this is what is there.

011C8000  BE FF BC 00 BB 01 BD 00-CF 3C 7F B0 B1 00 00 00

I got those bytes from Atrius.

If anyone can help, please help. I'm really curious to insert some sound effects/voices. Especially voices. :P

Thanks in advance, although I'll be saying thanks after anyone helps me (if possible) and indebted to them as well. ^_^

This post has been edited by Blazer on Jul 6 2009, 09:28 PM
Title: Wav Insertion
Post by: Atrius on 06, July, 2009, 10:46:00 PM
You write your WORD values in a different endian format than I do.

00701B09 would be interpreted as 0x09B17000 by the GBA, correct?  That's how I would write it then, so you probably put in 0x00003C00, and 0x00FF00FF backwards.
Title: Wav Insertion
Post by: Blazer on 06, July, 2009, 10:47:00 PM
Little endian.

Regardless, I just checked some existing voicegroups, you're right.

Let's see if it fixes it, thanks.

EDIT: By the way, an '08' is added to the end because the game needs to know to access the ROM part of the uh... RAM (I suck at terminology, excuse my lack of proper explanation). You probably know this, but I don't want to assume anything. Thus, the pointer is read as 0x11B7000

EDIT2: I got something; "BZZZTT, BZZZTT".

You wouldn't by any chance have one of the voice clips you inserted into GS that you know worked for the sake of me testing stuff, would you?

This post has been edited by Blazer on Jul 6 2009, 09:52 PM
Title: Wav Insertion
Post by: Salanewt on 06, July, 2009, 10:55:00 PM
Hello. I heard about big and little endian format when I was trying to make a hack for Link to the Past, but I did not understand them. When you both are done your conversation, could one of you please explain to me what they are? I learned a bit about them, but I find them confusing (this guide to Hyrule Magic does not help much about endian formats, but it mentions them).

Thank you in advance, and please have a nice day.
:MercurySet:  
Title: Wav Insertion
Post by: Blazer on 06, July, 2009, 11:04:00 PM
@Atrius: If there's any data you need in order for you to help me, say so. I mainly want to get it working first; if I can get it working I can easily apply the concept.

I can't tell you much about big endian, but little endian is reversing the order of bytes in a word...

12 34 56 78 becomes 78 56 34 12

If I want the game to know the offset '0x08123456" I would need to type into a hex editor "56 34 12 08".

That's the jist of how it works, anyway. It gets easy with practice.  
Title: Wav Insertion
Post by: Atrius on 06, July, 2009, 11:05:00 PM
You did also reposition it so that it's WORD aligned right?

Yes, it would have been difficult to write an editor for a GBA game without knowing about how the pointers actually work.  Here's a complete list (http://nocash.emubase.de/gbatek.htm#gbamemorymap) of GBA's memory map if you're curious about the rest of it.  There's a lot of good, extremely detailed information on how exactly the GBA works on that page, it really comes in handy sometimes.

Salanewt, endianess is how a processor interprets the order of bytes it reads.  Suppose you have a byte stream like 01 02 03 04.  That's the ordered they're actually stored in the file.  If a big endian processor read that file it would interpret that as 0x01020304, but if a little endian processor read it, it would interpret it backwards as 0x04030201.
Title: Wav Insertion
Post by: Blazer on 06, July, 2009, 11:11:00 PM
Oh no, not GBATEK.

My worst fear. >_<

Yeah, GBATEK, ThumbRef, debuggers, we don't get along too well. Not actually my worst fear, but I'm just not good enough for that stuff, I'm afraid.

Right, it make sense for you to know all of this stuff, excuse my naivety (proper word use?).

The header is word aligned-- address at 0xADEC48

Pointer table, I don't even need to say

All other data starts at 0x~~~~~~0, thus word aligned. I copied the file "taunt.bin" from 0x00-0xDB0C and pasted at 0x11B7000 so no reason for it not to work. I'm confident I didn't overwrite any data or anything.

I think what's wrong here is either the instrument map or the audio track data-- how exactly do I go about getting that data? :\

And once again, is there some file I could use that we KNOW works so I could test it to get the process down? I'd hate for the problem to be some stupid problem specific to the WAV file itself, although it seems a tad unlikely.  
Title: Wav Insertion
Post by: Salanewt on 06, July, 2009, 11:14:00 PM
Oh, thank you, both of you. Now that you have kindly explained it to me, I am starting to understand it. Is there anything that I can do to practice with it (changing big endian to little endian, and vise versa (preferably with games that do not have harder coding))?

Thank you in advance, and have a nice day.
:MercurySet:  
Title: Wav Insertion
Post by: Atrius on 06, July, 2009, 11:17:00 PM
If it's a problem with how the WAV file is being converted I need to fix my converter, I could probably do it easier if you send me a patch of what you've tried, and the original WAV file.

I got to go for the night though, I have to get up kinda early tomorrow for formation.
Title: Wav Insertion
Post by: Blazer on 06, July, 2009, 11:18:00 PM
Yeah, there is-- change any offsets you deal with into little endian and eventually you'll get sick at it yet good at it at the same time.

EDIT: Just saw your post, Atrius... I'm going to try different wav's and see if Charon can help me. We can continue tomorrow, provided you and I have some free time. If not, then whatever works, you're doing me the favor here. I appreciate your help so far. ^_^

- Blazer

Good night.

This post has been edited by Blazer on Jul 6 2009, 10:20 PM
Title: Wav Insertion
Post by: Salanewt on 06, July, 2009, 11:24:00 PM
Thanks for the advice. Good night.

Have a nice day.
:MercurySet:  
Title: Wav Insertion
Post by: Atrius on 07, July, 2009, 07:25:00 AM
QuoteI think what's wrong here is either the instrument map or the audio track data-- how exactly do I go about getting that data? :\

The audio track data is a list of commands and arguments for playing music/sound effects.

Anything below 0x80 is an argument, and anything 0x80 and above is a command.

0x80 - 0xB0 = Rest commands of varying lengths, to wait a certain amount of time before playing each note.

0xB1 = Stop command, to signal the end of the audio track.  From what I've noticed even if a song loops it has one of these after the loop command.

0xB2 = Jump command, to jump the playback pointer to another location in memory.  Often used to loop songs by jumping back to the beginning of it.

0xB3 = Jump command where playback can jump back to after it again later.  Used when you want to repeat part of a song before continuing with the rest of it.

0xB4 = Return to last 0xB3 command.

0xB5-0xBA = Unidentified

0xBB = Set Tempo

0xBC = Set Pitch offset

0xBD = Set instrument

0xBE = Set Volume

0xBF = Set Panning

0xC0 - 0xCE = Unidentified

0xCF - 0xFF = Play notes of varying lengths.


So to break apart the track information I gave you:

BE FF BC 00 BB 01 BD 00-CF 3C 7F B0 B1

BE FF = A volume command with an argument of 0xFF (Volume is an odd exception to the rule that arguments must be less than 0x80)

BC 00 = Set the pitch offset to zero

BB 01 = Very low tempo so that the note is drawn out long enough for voice samples to play their full length.

BD 00 = Set the instrument to the first entry in the instrument map.

CF 3C 7F = Play a note with a pitch of 0x3C (Right in the middle of the available range), and a volume of 0x7F (The maximum available)

B0 = Wait long enough for the note to finish playing

B1 = End the audio track
Title: Wav Insertion
Post by: Charon on 07, July, 2009, 09:00:00 AM
@ Blazer - it also helps if your sound it 11,250 Hz, Mono, 8-bit and PCM WAV audio.

Wow, this is awesome.

I think I'll pitch in and define some things a little more by defining some common arguments:

:Venus: Pitch

Pitch is very easy to understand. As Atrius noted, it is follows the byte 0xBC (which is usually the first byte in a given track anyhow). Pitch works like this:

0x00 is the base, equivalent to Middle C.

0x0C is one octave higher; High C.

0xF4 is one octave lower; Low C.

If you haven't noticed, it goes by increments of 0x0C, so for higher increments, they would be 0x18, 0x24, ect, while for lower increments they would be 0xE8, 0xDC, ect.

Tracks can be transposed by any value, however, so if you wanted it to be in a different key, you could change these values. If done, make sure to add/subtract 0x0C when raising/lowering octaves.

:Mercury: Tempo
Tempo is simply the tempo transfered into Hex. So, if your original tempo was 80, you would put in 0x50. It follows a 0xBB byte.

:Mars: Instruments
The instruments correspond with the instruments of the voicegroup. Although the instruments can be anything you want, the typical way is to have the instruments correspond directly. It follows a 0xBD The direct map:

   PIANO
0x00    Acoustic Grand (often used as a drum kit)
0x01  Bright Acoustic
0x02    Electric Grand
0x03    Honky-Tonk
0x04    Electric Piano 1
0x05    Electric Piano 2
0x06    Harpsichord
0x07    Clav

       CHROMATIC PERCUSSION
0x08  Celesta
0x09  Glockenspiel
0x0A  Music Box
0x0B  Vibraphone
0x0C  Marimba
0x0D  Xylophone
0x0E  Tubular Bells
0x0F  Dulcimer

   ORGAN
0x10  Drawbar Organ
0x11  Percussive Organ
0x12    Rock Organ
0x13    Church Organ
0x14    Reed Organ
0x15    Accoridan
0x16    Harmonica
0x17    Tango Accordian

   GUITAR
0x18    Acoustic Guitar(nylon)
0x19    Acoustic Guitar(steel)
0x1A    Electric Guitar(jazz)
0x1B    Electric Guitar(clean)
0x1C    Electric Guitar(muted)
0x1D    Overdriven Guitar
0x1E    Distortion Guitar
0x1F     Guitar Harmonics

   BASS
0x20    Acoustic Bass
0x21    Electric Bass(finger)
0x22    Electric Bass(pick)
0x23    Fretless Bass
0x24    Slap Bass 1
0x25    Slap Bass 2
0x26    Synth Bass 1
0x27    Synth Bass 2

   STRINGS
0x28    Violin
0x29    Viola
0x2A    Cello
0x2B    Contrabass
0x2C    Tremolo Strings
0x2D    Pizzicato Strings
0x2E    Orchestral Strings
0x2F    Timpani

   ENSEMBLE
0x30  String Ensemble 1
0x31    String Ensemble 2
0x32    SynthStrings 1
0x33    SynthStrings 2
0x34    Choir Aahs
0x35    Voice Oohs
0x36    Synth Voice
0x37    Orchestra Hit

   BRASS
0x38    Trumpet
0x39    Trombone
0x3A    Tuba
0x3B    Muted Trumpet
0x3C    French Horn
0x3D    Brass Section
0x3E    SynthBrass 1
0x3F    SynthBrass 2

   REED
0x40    Soprano Sax
0x41    Alto Sax
0x42    Tenor Sax
0x43    Baritone Sax
0x44    Oboe
0x45    English Horn
0x46    Bassoon
0x47    Clarinet

   PIPE
0x48    Piccolo
0x49    Flute
0x4A    Recorder
0x4B    Pan Flute
0x4C    Blown Bottle
0x4D    Shakuhachi
0x4E    Whistle
0x4F    Ocarina

   SYNTH LEAD
0x50    Lead 1 (square)
0x51    Lead 2 (sawtooth)
0x52    Lead 3 (calliope)
0x53    Lead 4 (chiff)
0x54    Lead 5 (charang)
0x55    Lead 6 (voice)
0x56    Lead 7 (fifths)
0x57    Lead 8 (bass+lead)

   SYNTH PAD
0x58    Pad 1 (new age)
0x59    Pad 2 (warm)
0x5A    Pad 3 (polysynth)
0x5B    Pad 4 (choir)
0x5C    Pad 5 (bowed)
0x5D    Pad 6 (metallic)
0x5E    Pad 7 (halo)
0x5F    Pad 8 (sweep)

   SYNTH EFFECTS
0x60    FX 1 (rain)
0x61    FX 2 (soundtrack)
0x62    FX 3 (crystal)
0x63    FX 4 (atmosphere)
0x64    FX 5 (brightness)
0x65    FX 6 (goblins)
0x66    FX 7 (echoes)
0x67    FX 8 (sci-fi)

   ETHNIC
0x68    Sitar
0x69    Banjo
0x6A    Shamisen
0x6B    Koto
0x6C    Kalimba
0x6D    Bagpipe
0x6E    Fiddle
0x6F    Shanai

   PERCUSSIVE
0x70    Tinkle Bell
0x71    Agogo
0x72    Steel Drums
0x73    Woodblock
0x74    Taiko Drum
0x75    Melodic Tom
0x76    Synth Drum
0x77    Reverse Cymbal

   SOUND EFFECTS
0x78    Guitar Fret Noise
0x79    Breath Noise
0x7A    Seashore
0x7B    Bird Tweet
0x7C    Telephone Ring
0x7D    Helicopter
0x7E    Applause
0x7F    Gunshot (also commonly used as a drum kit)


:Jupiter: Volume
Volume is a simple concept as well, but unlike most of the song arguments, it must be a value less than 0x80, or else (for some whacked out reason) it acts as a rest o.o

It follows 0xBE.

 Panning
I need to investigate panning a little more, but I do believe that 0x00 is the neutral value. Either that, or it's 0x0C. I believe that pan's range is from 0x00 to 0x0F; Atrius, correct me if I'm wrong.

Also, about 0xB1 - if your track doesn't end in it, it will cause the game to crash and make that horrible noise some of us know too well o-o
Title: Wav Insertion
Post by: Blazer on 07, July, 2009, 12:20:00 PM
Wow, good stuff.

Thanks for the break down of the data. I felt a little helpless you just giving me stuff and me not knowing how it works...

Regardless, the problem seems to have been in the WAV, when it was converted from 2 channels to 1 channel. I used another one that was only 1 channel, re-inserted data, and it worked perfectly. ^_^

Do you still want me to send you the WAV, in order to fix any possible problems in your program? It's not a huge problem for me, or at least it shouldn't be, but if it helps you/others... well, whatever works I guess. XP

Thanks again to Charon for all the other information and the instrument list. Really useful and helpfull, I seriously appreciate it. ^_^

Successful Blazer is successful.
Title: Wav Insertion
Post by: Charon on 07, July, 2009, 12:24:00 PM
I think the only problem with Atrius's editor is that he forgot to mention what the 0x40 byte does at the begining of the WAV (which I know what it does, but others may not) and that for some reason, you need to switch around the 0xCA byte to a 0xAC... all at the beginning.
Title: Wav Insertion
Post by: Blazer on 08, July, 2009, 08:29:00 PM
A README could fix the former, and I've never encountered the problem with the latter part. :P
Title: Re: Wav Insertion
Post by: Salanewt on 15, February, 2010, 07:28:33 PM
Hello. I am not fully sure if I should post this here, but I might as well...

Do you know how I can tell what an instrument is in a game's audio file? I would look at that neat list, but Superstar Saga uses a different audio format.

Well, thanks for at least reading this.

Have a nice day.
Title: Re: Wav Insertion
Post by: Atrius on 15, February, 2010, 08:23:17 PM
The only way you can tell for sure is by listening to it.
Title: Re: Wav Insertion
Post by: Salanewt on 15, February, 2010, 08:25:35 PM
That I know, but is there any way to determine which instrument is is, if I do not know which instrument the sound belongs to (like an intrument reference guide or something, since there are several instruments which I am not sure what they are)?

Have a nice day.
Title: Re: Wav Insertion
Post by: Atrius on 15, February, 2010, 10:14:55 PM
By asking someone that knows more about how different instruments sound?  You'd be lucky to even find a list of the song names in the game's data.
Title: Re: Wav Insertion
Post by: Salanewt on 15, February, 2010, 10:22:01 PM
There really isn't, so... I suppose I will have to ask around then.

Perhaps I can upload a Youtube video tomorrow, and ask people what they think the instruments are? Hehehehehe...

Have a nice day, and thank you for your time.
Title: Re: Wav Insertion
Post by: Charon on 16, February, 2010, 07:30:38 AM
With the exception of the Oriental set, they all match with their midi counterparts in Sappy.
Title: Re: Wav Insertion
Post by: Salanewt on 16, February, 2010, 07:53:24 AM
They do? Okay, thanks. I am going to work on completing that list when I get back.

Have a nice day.

Wait though, the game is not Sappy compatible, it still matches?
Title: Re: Wav Insertion
Post by: Charon on 16, February, 2010, 09:26:42 AM
You have to make it Sappy Compatable. I'll pull up the sappy.lst file tomorrow.

Sappy uses the same instruments as the game would if it matched with your computer's MIDI engine. What I mean by my above post is that when a Pan Flute plays in Sappy, it's in the game, but the with the Oriental set it doesn't work that way. A few of the Lead instruments are like that too, as well as a few sound effects.
Title: Re: Wav Insertion
Post by: Tetsuya the Azure Blade on 16, February, 2010, 10:04:03 AM
Ooh. I had NEVER thought for a second that you can MAKE the GS games sappy compatable, Would making GS2 sappy compatable also make GS1 sappy compatable? And once again Charon has amazed me.
Title: Re: Wav Insertion
Post by: Salanewt on 16, February, 2010, 08:04:17 PM
Sweet, thanks Charon/Corvidae (which do you prefer to be titled?)!

So, I can make the tracks sappy compatible? I probably have to get them out of the game first though. One thing that I noticed with Superstar Saga, is that some of the other audio effects can be used as instruments (I had one track played entirely by the name "Mario" being sung).

Have a nice day.
Title: Re: Wav Insertion
Post by: Charon on 16, February, 2010, 08:30:34 PM
For Sappy 1.6 (the more useful version I use) this is what my sappy.lst file says in /sappy16/data :

****, Unsupported Game, unsupported, 0, 0, 0, 0, 0

B3TJ, Tales of the World Narikiri Dungeon 3 (J), sapphire, blank, blank, &H1c834C, 0, 0

AN8E, Wario Land 4 (J), sapphire, blank, blank, &HBE128, 0, 0

AGSE, Golden Sun (U), sapphire, blank, blank, &HFC70C, 0, 0

AGFE, Golden Sun: The Lost Age (U), sapphire, GSTLA, blank, &H1C4530, 0, 0

BPRE, Golden Sun (U), sapphire, blank, blank, &H4A32CC, 0, 0

AOGJ, Super Robot Wars (J), sapphire, blank, blank, &H336330, 0, 0

AWRE, Advance Wars (U), sapphire, advw, advw, &H143DDC, 0, 0

ASOJ, Sonic Advance (J), sapphire, blank, blank, &H6d76b4, 0 ,0

A2NE, Sonic Advance 2 (U), sapphire, blank, blank, &Had4f4c, 0 ,0

AW2E, Advance Wars 2: Black Hole Rising (U), sapphire, advw, advw, &H2429CC, 0, 0

AFEJ, Fire Emblem (J), sapphire, blank, blank, &H3994D8, 1, 0

ABSE, Bomberman Tournament (U), sapphire, blank, blank, &H31CB00, 0, 0

AMKE, Mario Kart: Super Circuit (U), sapphire, marokart, mksc2, &H102498, &H2, &H3C

A2CE, Castlevania - Aria of Sorrow (U), sapphire, cv2, cv2, &H27CD38, 0, 0

AXVE, Pokémon Ruby (U), sapphire, sapphire, sapp, &H45548C, &H15E, &H1D2

PKJE, Pokémon Jupiter (U), sapphire, sapphire, sapp, &H45548C, &H15E, &H1D2

BXVE, Pokémon Ruby (B), sapphire, sapphire2, sapp, &H45548C, &H15E, &H1D3

BPEE, Pokémon Emerald (E), sapphire, sapphire, blank, &H6b49f0, 0, 0

BPRE, Pokémon FireRed (U), sapphire, sapphire, sapp, &H4A32CC, 0, 0

AXPJ, Pokémon Sapphire (J), sapphire, sapphire, sapp, &H416ECC, &H15E, &H1D2

AMAJ, Super Mario Advance (J), sapphire, marioadv, marioadv, &HF3F18, 0, 0

AMAE, Super Mario Advance (E), sapphire, marioadv, marioadv, &HF4368, 0, 0

AMZE, Super Mario Advance (U), sapphire, marioadv, marioadv, &HF40D4, 0, 0

A7KE, Kirby: Nightmare in Dream Land (U), sapphire, kirby, blank, &H60B460, 0, 0

AEPP, Sheep (E), sapphire, blank, blank, &H2083EC, 0, 0

AFFP, Final Fight One (E), sapphire, blank, blank, &HA52F4, &H50, 0

ATLE, Atlantis - The Lost Empire (U), sapphire, blank, blank, &H3b4f80, &H2, 0

ASYE, Spyro - Season of Ice (U), sapphire, blank, blank, &HDB16c, &H2, 0

ASAE, Army Men (U), sapphire, blank, blank, &H3183E0, 1, 0

AMYE, Bomberman Max 2 Red (U), sapphire, blank, blank, &H176974, 1 ,0

ABDE, Boulder Dash EX (U), sapphire, blank, blank, &H1436c0, &H3E, 0

AO4E, Splinter Cell (U), sapphire, blank, blank, &Hb8058, 0, 0

AFZJ, F-Zero Advance (J), sapphire, blank, blank, &H58324, &H0, 0

AAUE, Pokémon Gold (U), pkmngbc, blank, blank, &HE906E, &H0, 0

AAUJ, Pokémon Gold (J), pkmngbc, blank, blank, &HE906E, &H0, 0

AAXE, Pokémon Silver (U), pkmngbc, blank, blank, &HE906E, &H0, 0

AAXJ, Pokémon Silver (J), pkmngbc, blank, blank, &HE906E, &H0, 0

BXTE, Pokémon Crystal (U), pkmngbc, blank, blank, &HE906E, &H0, 0

BXTJ, Pokémon Crystal (J), pkmngbc, blank, blank, &HE906E, &H0, 0

AFEÿ, Fire Emblem, error, Only the Japanese version [AFEJ] of this ROM is supported at this time., blank, 0, 0, 0

AO4ÿ, Splinter Cell, error, Only the US version [AO4E] of this ROM is supported at this time., blank, 0, 0, 0

AFZÿ, F-Zero Advance, error, Only the Japanese version [AFZJ] of this ROM is supported at this time., blank, 0, 0, 0

A2Cÿ, Castlevania - Aria of Sorrow, error, Only the US version [A2Ce] of this ROM is supported at this time., blank, 0, 0, 0

AMKÿ, Mario Kart: Super Circuit, error, Only the US version [AMKE] of this ROM is supported at this time., blank, 0, 0, 0

AWRÿ, Advance Wars, error, Only the US version [AWRE] of this ROM is supported at this time., blank, 0, 0, 0

AXVÿ, Pokémon Ruby, error, Only the US [AXVE] and Japanese [AXVJ] versions of this ROM are supported at this time., blank, 0, 0, 0

AXPÿ, Pokémon Sapphire, error, Only the US [AXPE] and Japanese [AXPJ] versions of this ROM are supported at this time., blank, 0, 0, 0

AMAÿ, Super Mario Advance, error, Only the US [AMZE] European [AMAE] and Japanese [AMAJ] versions of this rom are supported at this time., blank, 0, 0, 0

AMZÿ, Super Mario Advance, error, Only the US [AMZE] European [AMAE] and Japanese [AMAJ] versions of this rom are supported at this time., blank, 0, 0, 0

A7Kÿ, Kirby: Nightmare in Dream Land, error, Only the US version [A7KE] of this ROM is supported at this time., blank, 0, 0, 0

ABSÿ, Bomberman Tournament / Bomberman Story, error, Only the US version [ABSE] of this ROM is supported at this time., blank, 0, 0, 0

AEPÿ, Sheep, error, Only the European version [AEPP] of this ROM is supported at this time., blank, 0, 0, 0

AFFÿ, Final Fight One, error, Only the European version [AFFP] of this ROM is supported at this time., blank, 0, 0, 0

ATLÿ, Atlantis - The Lost Empire, error, Only the US version [ATLE] of this ROM is supported at this time., blank, 0, 0, 0

ASYÿ, Spyro - Season of Ice, error, Only the US version [ASYE] of this ROM is supported at this time., blank, 0, 0, 0

ASAÿ, Army Men, error, Only the US version [ASAE] of this ROM is supported at this time., blank, 0, 0, 0

AMYÿ, Bomberman Max 2 Red, error, Only the US version [AMYE] of this ROM is supported at this time., blank, 0, 0, 0

ABDÿ, Boulder Dash EX, error, Only the US version [ABDE] of this ROM is supported at this time., blank, 0, 0, 0

ENDFILE

(lol FR is also called Golden Sun: The Lost Age but it will still load).

Put the attached file in the /sappy16/data folder as well. It should play in Sappy.

Basically, if you want to add a new game, you'll need to to copy this into a new line in the file:
[ROM NAME], [ROM TITLE], sapphire, blank, blank, &H[OFFSET TO MUSIC TABLE], 0, 0
The rom name can be checked in VBA by checking it's information. This name also appears on the actual cartridge itself (on Pokemon Ruby, for example, it actually has the letters "AXVE" imprinted on the sticker, along with the country). THIS IS NOT THE SAME AS A "ROM NUMBER" WHICH MAY BE USED IN FINDING A ROM ON A WEBSITE.

The Rom Title is simply the game's title, such as Golden Sun: The Lost Age or Pokemon Ruby Version.

The offset to the music table is the trickiest to find. It's basically a long list of pointers. With some games, the music table's location is well known among those who make programs for the games and may know where it is located. If you're having difficulty finding the pointer, I'll search for it for you :3

If done in this way you'll need to search for the songs one by one. I already wrote the list for TLA so you don't need to search, but other games that you allow to work you'll need to know which actual song number it is in order for it to actually play.

You can also call me whatever you want. :)
Title: Re: Wav Insertion
Post by: Salanewt on 16, February, 2010, 09:13:13 PM
Okay, thanks Charon. I tried something like this, but it did not work well. I will give it another shot tonight though.

Have a nice day.

Oh yeah, we located the song bank not too long ago, so I should be fine for making it work (if it will work).

Edit: Oh yeah, could you please tell me how I add a game again (I seem to remember having to add this to a list in a document, except that I can not find the document)?

Edit 2: Found it, but what if there is more than one bank (music and sound effects as separate banks)?

Edit 3: Never mind. This game is not compatible with Sappy, even after adding the data. Oh well, I thank you for your help anyway (though I know 100% that Mario Bros. is compatible).
Title: Re: Wav Insertion
Post by: Charon on 17, February, 2010, 10:50:07 AM
You sure you have the right pointer? If the game has midi based music it's going to be compatable with sappy - you may have a bad pointer. What game is it? I'll search for the music table and see if I get it for you, then I'll write the entry for you.
Title: Re: Wav Insertion
Post by: Salanewt on 17, February, 2010, 11:43:12 AM
Oh, Mario and Luigi: Superstar Saga (pretty sure that it is not midi based though).

If you want the song bank, I can give you what we have:

0821CB70 - Song bank
0821CC40 - Sound effect bank

I am about 99% sure that you can not find this anywhere else, since we are the first people to try to hack the game (or at least the first successful people).

Thank you for taking a look at this for me.

Have a nice day.

Edit: North American version of the game, forgot to mention before.
Title: Re: Wav Insertion
Post by: Atrius on 18, February, 2010, 10:01:57 PM
Like I've said before, the game's music format is simply not Sappy compatible.  I've studied the Sappy format well enough to recognize it, and M&L SSS music is definitely 100% not it.

Also Charon, Sappy format != Midi format.  They have similarities, but are still very different from each other.
Title: Re: Wav Insertion
Post by: Charon on 19, February, 2010, 03:09:04 PM
Wait, really? I mean, I knew they weren't the same, but... well, dammit, there goes my arrogance out the window. The sappy format is used in many games however, so still try it out before saying it won't work.