Yoshi's Island DS Music Hack... by mikehaggar at 9:40 AM EST on February 5, 2007
Hey guys...I'm new here...but it seems like a fun site!
Recently I've bee playing Yoshi's Island DS. Although the game itself is really good, I'm having trouble stomaching the music. Compared to the original game for the SNES, the music in this game is absolutely horrendous. I feel it really does change the experience of the game! So I'm wondering...does anybody out there have the skills to create a hack of this game that uses the music from the original Yoshi's Island?? Is this even possible??
What do you guys think? I'd personally send anybody here that can pull it off 10 bucks! (Not much, I know...but if others chip in, it could be quite lucrative!)...it's worth it to me as it would improve the entire gameplay experience 10 fold!
So what do you guys think? If this is impossible, I will put my idea to rest.....
by unknownfile at 11:25 AM EST on February 5, 2007
While I'd personally like to get paid to rip xSFs, I am currently not working on DS hacking (Gamecube comes first nowadays). I will get around to doing DS when a good, open source, working emulator with sound is available. (Though there might be one, and I don't even know it.)
It should be possible. The Nitro Composer format has already been hacked (see the topic about DS hacking where I posted a tutorial on how to do it). However, you can't edit with it. You'd need to find a way to edit the SSEQ files, apply new instruments if needed and then repack the SDAT file. Then, you'd need to repack the NDS file (use NDSTool to do it) and find some way to run it (emulate it, or use some hardware to run it on the DS)
And yes, the music is atrocious. So is the difficulty spike later in the game. I'm at 5-5, and from mid-world 3 (3-2, 3-3) it becomes to get extremely hard. World 4 is a nightmare, World 5 is impossible! And some of the graphics make me want to vomit (Chomps in 5-1).
UNKNOWNFILE, you want Desmume. It's open source, it has sound, and it runs YIDS well. Some sprites and animations look incorrect because some forms of sprite manipulation aren't supported, and the bosses are a little weird as they don't appear on the top screen, but it's playable, even though it's slow. Also, transitions are messed up, and backgrounds don't appear on the top screen. I'm not sure if some of these may have been fixed though, as while looking for the link I noticed a new version has been released. Here it is: http://desmume.sourceforge.net
So it's possible! Fantastic!! Any brave soul out there willing to take this project on??!
And man, I haven't beaten World 1 yet because I have hopes that somebody can hack the music before I get seriously into it....but wow, the difficulty gets that hard huh? How is it compared to the original game? Is the game even harder than the bonus levels in the original Yoshi's Island?
I'm not sure, because I never really got into the original. I do know it gets really hard though. There's a level where you must ride along a platform through the sea. Enemies attack you from the air, and if you fall into the water, Lunge Fish eats you. And that's easy compared to what you face later. I think that was 3-2 or 3-3. You need to be really good to play this game. I would hack it myself by replacing it with music from another game, but I have no way to repack the SDAT files. If I did, I would do it. I'll go see if I can find something to do it with.
edit: After much searching, no luck! I decided to use a hex editor to replace it. using XVI32, I replaced the 1-1 music. It is just a series of clicks in-game (the music is the Mario & Luigi Partners in Time training music - best remix of the Super Mario Bros overworld ever), but I will try to replace the instruments as well to see if it will fix this.
edit 2: Mission unsuccessful. I succeeded in silencing the music and making the ROM crash VGMTrans upon opening. I'm not sure though if it may be because of the fact the MLPIT sample archive for instruments is 2MB, though.. I'll try a different piece of music. Maybe something from New Super Mario Bros.
I just realised that the initials for this game are "Yids." Nintendo = Neo Nazi? :S
EDIT: Last time I checked, Desmume didn't have its sourcecode online, unless the download site is back up. As soon as I get the sourcecode to it, I'll get hacking.
Go to the site I mentioned, and go to the Downloads page. I believe the link there should work.
By the way, on replacing the music, I believe it messes up because of the offsets (and also why all the instruments were clicky). The file is of a different size, but I didn't edit the offsets in the header. I'll be working on this. Thanks to Windows Calculator, the handy SMAP file Sdattool generates and Xvi32, this should hopefully work soon.
edit: Arrgh. I'll have to start again. Just realised I imported a MIDI file of the music I wanted (I used SSEQ2MID to make MIDI files of all the SSEQs, and left them in the folder) and not the SSEQ.
edit2: Hmm. I added it in, and corrected all the file offsets in the filesystem header, and it works. Somewhat. VGMTrans opens it, which means I've got the filesystem stuff right. I also just realised I replaced the wrong sequence, other than the one I intended to. At least I know I haven't messed it up TOO much (YIDS contains two SDAT files - one contains 2 sequences, the other contains everything else, I used the smaller one as it would be easier to learn with) as the second sequence plays fine in VGMtrans. I'll go open the original ROM to see what the first sequence was.
edit3: Hopefully, when I add the instruments and banks, it will work fine. I extracted my hacked SDAT with Sdattool and used Sseq2mid on the new sequence. Plays fine, just like the original did. So I've replaced it well.
edit4: Success! Later, I'll try and add the instruments. for now though, the music plays fine in-game, even though the instruments are wrong.
by the way, do you have the original Yoshi's Island OST on SPC?
Also, I think Yoshi's Island has enough music to do the job....I think it has 2 different overworld themes, the underground music, the map music (which updates in every world!) (which owns SO hard over the new map music), castle music, boss music, and the last boss music....
I think it should be a simple subsitution as far as format goes...
If you need help in the organization department or anything else that's non technical, let me know!
If the standard YIDS ROM works, this should. I'm just editing a file in the ROM's filesystem. It will take some time to be done (I have to find good music tracks for everything) as for each piece of music, I have to replace 3 files in the SDAT file. And I haven't fully tested it, there may be other problems. I don't think there will though as YIDS does nothing special to the music. While games like NSMB speed it up, YIDS leaves it intact throughout. I took a break from it, but I'm going to try adding the instruments now. If I get it done, I'll post the SDAT file and instructions on how to apply it, because I'm not sure about the legality of posting ROMs here, and my connection doesn't want to upload a 32MB file. Got any suggestions for music tracks I can use?
Sorry, I can't add new music. I'm simply replacing it with music from other DS games. I do have the SPC music from YI, but I can't add it. While SPC music is programming code sent to the SNES's sound chip, the Nitro Composer format (YIDS uses it, many other games also do, usually Nintendo-developed games, but third party games usually also do) uses both sequenced and streamed music. Sequenced music is in a MIDI-like format and uses instruments (it's so similar that VGMTrans can convert it to MID and DLS files) and streamed music can be converted to WAV format. What I'm doing is hex-editing the SDAT file (contains all sounds and music) to replace the sequences and instruments/samples.
Sorry for the triple post, but this merits a new post. I've finally perfected this! It's rather complicated to apply but it works well, as I'm not sure if HCS would like links to ROMs being posted on here. Download this file: http://www.sendspace.com/file/7lawt5 It should be quick to download, as it's only 161kb. Inside is another zip file, and a "YOSHI_DS.sdat" file. Now, do this: 1. Extract "rompacker.zip" into an empty folder. Put a YIDS ROM into the same folder and run "deextract.bat". NDSTool will extract the ROM into it's various components. Be patient. 2. Go into the data folder. There's a folder named file. Go into there. Delete the "YOSHI_DS.sdat" file in there. 3. Place the new YOSHI_DS.sdat you downloaded into the "file" folder. 4. Run "pack.bat". Be even more patient than you were in step 1, as this can take quite a bit of time if you have a slow computer. 5. Then, you should get a rom named "xmod.nds". This should work fine. You can hear the changed tune in the tutorial level and 1-1 (there are more places, but I'm too lazy to find them all and these are the easiest to access). If there are any problems, post them here. You should hear the New Super Mario Bros. Title Screen music.
Nice one! Will try it out tonight! So what exactly have you done?? Have you replaced all the music with NSMB music or just the title screen?
Also, perhaps to get Yoshi's Island music, don't forget you can use the music from the GBA version of Yoshi's Island instead of the SNES version if that makes it possible....
I've replaced the music in 1-1 with the title screen music from NSMB. I probably won't leave it like that, since it doesn't fit too well, it was just a test. Plus, the original piece of music I added had originally corrupted the file. I thought it was because the soundfont needed was 2MB big, but it was because I hadn't set the offsets and sizes. I tried this because it had a small soundfont, and it worked. Anyway, this won't be easy to finish. It will probably take some time, plus I have other projects (a Mario fangame). I can't use GBA music, because the format is too different. I'm not an experienced rom hacker, all I've done in the past is weird Super Mario Bros level hacks with SMB Utility. Someone else would probably be able to figure it out.
I probably won't post any more tests until the hack is finished, because to get the game to run properly, I must fix EVERY offset. There are around 100 files in the other SDAT for YIDS (which contains the main music). It's a shame I can't use music from Super Princess Peach, which is about as close to a Yoshi's Island sequel as you can get without touching this game. SPP uses a different sound format (thanks to TOSE) which isn't compatible with the same format YIDS uses. If you have any suggestions for pieces of music I can use from other DS games, then post them.
EDIT: Here's a list of things I'm currently working on, so be patient:
- Gamecube developmentstuffs (mostly creating the .SIG files) - the usual school stuff - studying for my G1 driving license test - super secret project, flomg
After I get one (1) of the following things done, then I will go about modifying Desmume into Highly Nitric. (Nitro is the codename for the DS.)
Kirby: Canvas Curse (has excellent music!!!) Super Mario 64 DS New Super Mario Bros.
There is some really good music from the first 2 games mentioned, and New Super Mario Bros. music is sorta hit and miss. I would say the first 2 is plenty of music! (That cancas curse game must have at least 1 to 2 dozen different stage musics, so the music can be even more varied than before!)...plus, for underground scenes in yoshi's island, you can maybe get the cave music from mario 64....that would be sweet....it's yoru call really, but I'd say that there's plenty of good music there! I just hope the formats are compatible....
And how is the GBA format very different? Doesn't it help that GBA games can be played on the DS? The DS is certainly able to emulate GBA music very well, it must have something built in for handling GBA music, right???
Edit: Actually, maybe Mario 64's music should be first choice, and then Kirby, as perhaps music from another Mario game would fit in better...anyway, it's your call! They both have great music!
GBA games, unlike DS games, are just one huge block of code. The generic audio banks, which have been nicknamed Sapphire or (more well-known) Sappy, are just a huge chunk of code. DS games, however use a file system and the audio data is relatively easy to locate.
The first rip is most likely going to be Yoshi Touch and Go, and I will modify the music driver to play any music that uses the generic driver.
The file format is being devised at this moment, currently the format will support SR64 compression and savestates, since I HATE zlib.
Comments? (Mouser, this is your chance to go WILD.)
I haven't been able to work on this today. The reason why GBA and DS games are incompatible is because they are very different. Especially, the DS formats. Not all DS games use the Nitro Composer format, which uses the SDAT files. Nitro Composer is part of the Nintendo DS SDK, but developers don't have to use it. I can only use sequenced music that was packed using the Nitro Composer format in here. What I am doing is replacing the data for the files with other data. For example, if YIDS uses a tune named "SSEQ_CAVE", and I replace it with "SSEQ_MUTEKI" from New Super Mario Bros, all I am doing is replacing the data. The game will still see it as "SSEQ_CAVE", but it will read the data from the other file. I hope this explanation is good.
He's back... by PokeParadox at 5:19 PM EST on February 6, 2007
This is a cool endevour... I'll third the oppinion that the music is YIDS is appaling in comparison to the original Yoshis's Island.
Jouw, I saw you mentiom seqtomidi in an earlier post... is there no tool to convert midi to seq? Would it be possible to convert some midi from the original Yoshis's Island to patch the NDS rom?
No, there is no tool for it. VGMTrans can convert a sequence and the instrument bank to DLS and MIDI format, but there is no tool to do the other way round. If there was even a way to do DLS/MIDI to SBNK/SSEQ it might be possible to do it (I have seen a way to convert DS musics to IT files from these, I have a tool that converts SPCs to ITs). There is one decent tune in YIDS: the music used in 4-3 (if you haven't got there yet, go to the water part of the museum - left from the entrance - to hear it). And maybe, the underground music. The others are awful. I've played through almost all the game (5-5 is torture, I'm stuck on it) and the music gets annoying quickly. But when trying to avoid piranha plant shooting spiky balls at you and jump in the right direction and aiming an egg at a block and timing it all correctly, I guess you don't really pay too much attention to the music..
I've been looking for a copy of Nitro Composer to see if that can help. Apparently it's a program, part of the DS devkit, which is used to create DS music. Various Google searches do not help. I can't find this anywhere. I'll go search on Loveemu's site to see if I can find any specifications for these formats.
edit: Desmume is not that slow. I know the music can run fine. On my computer (which is really not that good), I can get perfect sound in quite a lot of areas. It's great in the place where you're given your score. Frameskip also helps.
Also, as I see that if a DS music player is created it will use emulation, one game you can use to test music in games not using Nitro Composer is Super Princess Peach. It's relatively easy to get, and it's emulated well, with mostly graphical glitches and slowness.
by unknownfile at 11:38 AM EST on February 7, 2007
I've drawn up a plan of the 2sf format.
SR64 will be used for savestates, whereas the ROM will always be zlib compressed.
VC++2005 isn't downloaded yet, so I will use my Action Replay to patch Super Mario 64 DS to play music. (I'll also need the ROM for that, so that's going to be added to my download queue.)
Have fun playing Mario 64 DS on an emulator. Desmume runs the main menu and the minigames. No$gba goes ingame, but good luck getting the source to that (You need to pay the author for the debug version, so what are the chances he'd release the source, even for money?)
1) Modify Desmume to pause at the song select, and have it save a savestate at this point. 2) Patch in a SWI and an infinite loop after the song select is done, and music is playing. 3) If it works, NOTHING else should run except the music. 4) Reload the savestate and see if it works. 5) Optimize the DS ROM, then zlib it and add in the savestate. 6) Create SR64 mini2sfs. 7) ??? 8) PROFIT! (or maybe rip another game)
Optimisation will be easy. Follow the instructions to add my hack, but instead of replacing the SDAT files, delete everything in the "file" folder except the SDAT files. Then, you'll have deleted all the level, graphics, script, etc data but the code and music will still be there.
Y'see, when you save a state with an unclean ROM, it will keep all the running data (which might include offsets of files in the ROM). When the cleaned ROM is loaded up, the sequence player will say, "Hmm... let's look at 0xDEADBEEF, where the next note for my sequence is stored... AAAGH, WHERE DID IT GO!?! I HAVE TO ALERT THE OS TO CRASH THE ENTIRE SYSTEM!!"
In other words, optimization should go as follows:
1) Load savestate. 2) Look for data reads in ROM space. 3) Dump used data to a ROM, say, "yids.nds.clean.bin" 4) Convert the data to zlib. 5) Create the mini2sfs, and wheehaw, finished.
This optimization process is used by pretty much every xSF-based format. Gsfopt, PJ64usf and PSFLab all use it.
Thing is, I don't know how to program this...
by unknownfile at 12:04 PM EST on February 9, 2007
Desmume's site says Yoshi Touch and Go is apparently not compatible. What happens is that the save data can't be read, and so the game displays such a message. What I'm going to attempt to do is check to see if it does work on Desmume if one is able to skip past the save errors.
Also, some stuff:
The ARM7 runs the sequence player, whereas the ARM9 handles the main gameloop. I can probably patch the ARM9 processor to go into an infinite loop after the song select has been called.
And VC++2005 is yet to be downloaded.
Hang in there, folks, I'll work on it after school.
Desmume has save support. Have you tried changing the save type? The Auto setting doesn't work on all games. For example, New SMB only works with Flash 64kbit - others crash the emulator or give the save data error.
by unknownfile at 1:26 AM EST on February 10, 2007
Got VC++2005 at last! Yippeee!
I am currently going about ways to find the songselect for Sawaru Made in Wario, then I will perhaps party like crazy afterwards.
Code in armcpu.c:
u32 c = 1;
// debug code goes here for NDS games you wish to fuck up-- er, work with if (armcpu->instruct_adr==0x0206FB98) { // just some random instruction. NDS_Pause(); }
// code after here should be protected.
by unknownfile at 10:49 PM EST on February 12, 2007
Read through the Nintendo DS functions list, and here's what I found out:
1) Sequence playing is done on the ARM7. 2) The song select goes in this order:
assign wave bank -> play seq at offset
This means that rather than calling a specific song using an 8-bit integer (like GSFs and USFs), we are dealing with unsigned 32-bit values. Drat.
by unknownfile at 12:01 PM EST on February 13, 2007
I am going to re-write savestate support for Desmume so that zlib will compile. Instead of using gzip compression, I will rewrite the code to use memcpy() and compress().
As for the ROM itself, it will (obviously) be using zlib. NDS games have an interrupt handle that halts the game if the cartridge seems to have been modified so I am going to need to find a way around that, otherwise I can't optimize the ROMs.
Are you sure? My modified YIDS hack runs fine on an emulator, and I saw a proof of concept NSMB level hack once which was run on hardware. So I don't think that will happen.
by unknownfile at 2:14 PM EST on February 13, 2007
Well, let's consider this:
A game is inserted, and the power is turned on. The game loads up, and when the sound select is called, a savestate is made. So far, so good.
Now this is where the problem comes in. When the savestate is loaded into a different ROM, the interrupt handler will detect that the cartridge has been switched, and the game will halt.
There is the possibility that this is not the case in Desmume, though. In any case, savestates will stay in the final format revision.
And for anyone who wants to take a peek at the NDS documentation, annoy me in #usf.
by unknownfile at 4:56 PM EST on February 13, 2007
Got Sawaru Made in Wario playing music only.
It seems sufficient to put an interrupt at 0x02074F14.
However, there are two problems so far:
- I don't know where the wavebank select is. - I can't get Desmume to compile with savestate support.
Tried to post this earlier, but it didn't come out. Saving a state in YIDS secret 4 and then loading it in my music hacked ROM worked perfectly. The game was still playable, but I didn't check music.
by unknownfile at 8:26 PM EST on February 13, 2007
Check this out:
http://unknown.hcs64.com/2sf/desmume_2sf_beta.rar
Comes with a pre-hacked Sawaru Made in Wario savestate. :)
Well, I've been working on other projects and lost the motivation to work on this. I may do it some time, though... (Just wondering, if it's allowed to post it here, could anyone get me a copy of Nitro Composer from the DS devkit? That would probably make it a lot easier to do this, as NC can work with the sound data files (even create your own songs).)
by unknownfile at 9:50 AM EST on February 22, 2007
Hey, go ahead. Nintendo won't mind... after they sue us to death. :)