Jump to content


  • Please log in to reply

GBATemp rom hacking documentation project (WIP)

, 0 to rom hacker in one quick guide.
FAST6191 Post #106 Posted 01 March 2011 - 06:05 PM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

NDSSDNext
http://www.4shared.com/file/Ut_RM4Pi/ndssndext_v04.html

Vgmtrans
http://hcs64.com/mboard/forum.php?showthre...&showpage=1 (also an older version on my site somewhere)

Those two programs can usually allow you to figure out what it what at least. Crystaltile2 ( http://filetrip.net/f23649-CrystalTile2-2010-09-06.html ) has some playback but it is somewhat broken. Nice for getting offsets and everything though.
Also http://filetrip.net/f5658-NDS-Editor-0-1.html can be of some use but I would not count on it for much.

As for PS2 isos I believe you can fiddle with them as a normal iso most of the time, some isos have hidden files (mainly square enix stuff- you can pull them apart manually though) and there is the usual packing formats and wrappers to deal with- most ps2 tools scan for files.
Still there is a tool called xpert2 that is quite liked among PS2 (and PSP) hackers.
Equally we have decent emulation (from a hacker perspective anyway) if you come unstuck.
I have not done much in the way of PS2 hacking though so I am not going to be very helpful on the odd cases.



SparkFenix Post #107 Posted 01 March 2011 - 11:10 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 306
  • Member No.: 257,375
  • Joined: 06-July 10

  •  

That vgmtrans link 404'd and I couldn't find it on your site

But I did find out what song is what in the SDAT now all that's left is ripping the songs from the ps2 iso and replacing them into the rom

Do you know if the music in the ps2 iso is in SSEQ and banks?

EDIT: I tried xpert2 but didn't a tool to explore the iso or anything of the like just some conversion tools
I can explore the iso the normal way, put ito n a drive and open it, but don't know the bgm format

Edited by SparkFenix, 01 March 2011 - 11:22 PM.


FAST6191 Post #108 Posted 01 March 2011 - 11:36 PM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

My bad, I should have tested the link
http://www.mediafire.com/?nzniwmyngg1 (from the first page in the thread)

Also whoa I appeared to have not been paying attention (and it was only 2am when I wrote that)- I missed DQ8 was a PS2 title (for some reason i thought it was one of the ones ported to the DS). This makes things a lot more troublesome and indeed we are venturing into areas I do not know about. In theory at least the SDAT music player coupled with the DS hardware allows anything at any point but I have not experimented much with turning one form of audio into another (most people replace like with like).

PS2 music. Looking around they appear to use the the PSF2 format like many other PS2 titles. There are even winamp plugins for it so conversion/extraction should be easy enough.

Wave to midi conversion does not exist in practical terms so I am not even going to suggest it.
This means you are going to have to get the game to play wave audio. SDAT has the facilities in the likes of STRM (see http://gbatemp.net/t243430-swav-to-swar-converter if going manual does not float your boat- they are little more than simple PCM audio streams mind) and maybe SWAR/SWAV (I have not pushed this format so I have no idea here).

The audio does have something of a header/lookup option (it is why the simple pointer hacks work) and is fairly resilient (see all the quick and dirty hacks to the format over the years) so you stand a chance. It will however be one of those hacks that breaks new ground in a fairly big way.


SparkFenix Post #109 Posted 01 March 2011 - 11:52 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 306
  • Member No.: 257,375
  • Joined: 06-July 10

  •  

Well this is gonna be trickier than I thought mind if I ask for your help through msn?


FAST6191 Post #110 Posted 02 March 2011 - 02:02 AM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

Assuming I still had an MSN account I am not sure how my being able to chat at once is any better than forums. In fact it might even be worse as I can spend 5 minutes (I have certainly pondered replies to hacking related posts for that long if not longer) knocking together a picture for a forum post and nothing is lost from that but a 5 minute break in a conversation is not so good.

I shall revise my earlier statement as well- it is still new and untested but in theory at least it should be no harder than a conventional inject and repoint. I shall have to have a look at some of the roms that lost things in translation (the first megaman platformer, maybe castlevania and almost certainly Spectral Genesis) as they will give clues as to what goes and what can be done. Worst case scenario- we go looking to see how the DS works with SDAT files at a code level (something I have not seen done yet or tried my own hand at).


SparkFenix Post #111 Posted 02 March 2011 - 08:36 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 306
  • Member No.: 257,375
  • Joined: 06-July 10

  •  

Well since I couldn't figure out how to rip the music from the iso, I tried just switching some music in the game for the meantime

But when I try to import it back into the rom it says file size incorrect
I've checked and the file size is actually the same


FAST6191 Post #112 Posted 03 March 2011 - 12:01 AM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

Very odd. Perhaps rebuild the rom with your hacked SDAT file instead. Equally I have heard of things including padding 00's that come between files in the past- is that the case here perhaps.

As for the PSF format I did some digging and apparently it supports sequenced music as well.
Likewise I found a PSF pack for dragon quest 8 and they were all some 800k each for tracks lasting several minutes (at the quality they played back they can not have been heavily compressed/badly sampled PCM). I am not necessarily calling sequenced audio but it raises an eyebrow not to mention we barely have a working midi2SSEQ converter let alone something more exotic.
One player than can convert/dump to wave
http://www.bannister.org/software/ao.htm


SparkFenix Post #113 Posted 03 March 2011 - 12:08 AM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 306
  • Member No.: 257,375
  • Joined: 06-July 10

  •  

Problem is I can't seem to find the PSF files in the disc (I am doing this by just popping it in my disk tray and opening it with windows explorer so maybe I'm doing something wrong there)

Also, unless I missed the post, how do I rebuild the rom from the hacked SDAT?


FAST6191 Post #114 Posted 03 March 2011 - 01:46 PM

    Techromancer


  • Group: Reporters
  • Posts: 10,962
  • Member No.: 32,303
  • Joined: 21-November 05

  •  

Yeah apparently a lot of square enix games use "protection"- part of the disc structure uses the standard iso file sectors but other parts might simply read the data from the raw disc (LBA reads). Most games stuck with the simple method but SE games are well known to use LBA stuff apparently- several tools even are geared towards scanning the iso (made by ripping every single sector) for them. There might be a guide to tell you where the sound sits, you can use an emulator and monitor read commands or just find a pack someone released (there are a few it seems).

There are several ways to replace files although as I very much doubt you will have a hacked file as big or smaller than the original some methods like NDSTS are off the table-
the easiest is ndstool (what DSLazy and DSBuff use) but that breaks some roms (mainly first party Nintendo games but it is not limited to them) and is not very clean.
<a href="http://gbatemp.net/t73394-gbatemp-rom-hacking-documentation-project-wip?st=0&p=1799596&#entry1799596" target="_blank">http://gbatemp.net/t73394-gbatemp-rom-hack...p;#entry1799596</a> has some on the basic theory behind that

FileTrip Download Link Crystaltile2 (general wonder hacking tool) <a href="http://filetrip.net/f23649-CrystalTile2-2010-09-06.html" target="_blank">http://filetrip.net/f23649-CrystalTile2-2010-09-06.html</a> has the option to rebuild an entire DS file as well (others reading be warned it is not compatible with the standard ndstool rebuild method).
Open the rom, click on the little DS icon and under the first pulldown menu should be the options to extract and rebuild roms.

Nitroexplorer (a tool built to replace ndstool) can also do it. <a href="http://treeki.shacknet.nu/" target="_blank">http://treeki.shacknet.nu/</a>

Lastly you can also rebuild by hand- change the rom length in the header, change the location of the SDAT to the blank space at the end of the rom and place your SDAT data in there. Space issues aside this is very clean and will generate nice patches.

In general rebuilding can get a bit tricky if you want to release conventional patches (IPS, BSDiff, PPF and Xdelta being the big 4) as it has a habit of changing file locations and that does not play well with more traditional patching methods (Deufeufeu did a fair bit of work with this for Jump Ultimate stars and others release batch files that extract, change individual files and rebuild the iso or methods to do it (this is mainly for the wii though)). As the sound is copyrighted you probably are not going to have problems with this- you can not post/share such a patch anywhere that handles DS hacks really.


SparkFenix Post #115 Posted 06 March 2011 - 10:20 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 306
  • Member No.: 257,375
  • Joined: 06-July 10

  •  

Okay so I used the first link you gave me along with nitroexplorer and was able to switch songs inside the game

But the song that plays isn't complete, it's only the tune withotu the effects which should be the SBNK

Also I got winamp and the plugin for PSF2 but it fails to convert to wav
Can I use mp3 music instead of the PSF2?

EDIT: I fixed the sound swap and replaced all the files, now the sound is glitchy in the DS but plays fine in VGMTrans

EDIT2: Fixed now it plays normally all that's left is to replace the music in the sdat with the music from DQ VIII

Edited by SparkFenix, 08 March 2011 - 04:01 PM.


AsPika2219 Post #116 Posted 24 March 2011 - 07:01 AM

    Boboiboy kuasa tiga!

  • PipPipPipPipPip

  • Group: Members
  • Posts: 633
  • Member No.: 256,018
  • Joined: 17-June 10
  • Location: Cats City

  •  

Thanks for the nice tools! Is time to learning ASM codes right now.


YamiHoshi.nl Post #117 Posted 14 August 2011 - 07:42 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 158
  • Member No.: 279,221
  • Joined: 23-May 11

  •  

Sorry for the bump, and late reply.
I was sure I deleted the fake DLL file, after Frozen Cartridge from DSHack Forums told me it's fake, so I'm surprised it was still available.
Well, now I've deleted the MagicSSEQ non-sense for sure.


Team Fail Post #118 Posted 16 August 2011 - 06:21 PM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,411
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

QUOTE(YamiHoshi.nl @ Aug 14 2011, 12:42 PM) <{POST_SNAPBACK}>
Sorry for the bump, and late reply.
I was sure I deleted the fake DLL file, after Frozen Cartridge from DSHack Forums told me it's fake, so I'm surprised it was still available.
Well, now I've deleted the MagicSSEQ non-sense for sure.

Well, what would be cool is if someone did create a MagicSSEQ plugin. Doubt it highly though.


polu178 Post #119 Posted 02 November 2011 - 09:24 AM

    Newbie


  • Group: Newcomers
  • Posts: 3
  • Member No.: 286,545
  • Joined: 02-November 11

  •  

Hi everyone! I'm translating Rune Factory 3(US) into my language. But it not have font.bin file, so i can't edit that font. Please help me to find font of Rune Factory 3(US)
Thank Everyone!
Sorry my bad english!


Team Fail Post #120 Posted 12 November 2011 - 07:58 AM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,411
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

View PostTeam Fail, on 16 August 2011 - 06:21 PM, said:


QUOTE(YamiHoshi.nl @ Aug 14 2011, 12:42 PM)
Sorry for the bump, and late reply.

I was sure I deleted the fake DLL file, after Frozen Cartridge from DSHack Forums told me it's fake, so I'm surprised it was still available.
Well, now I've deleted the MagicSSEQ non-sense for sure.

Well, what would be cool is if someone did create a MagicSSEQ plugin. Doubt it highly though.

UPDATE: I found a YouTube video on this and it does look legit. It's possibly real, but I'm taking it with a grain of salt.

And, a question that has been pondering me for a while- Is it possible to insert NEW soundbanks and wave archives, then point an SSEQ to play from them without replacing old ones? I'd like to try this as I'd like to add a song from Black and White into Diamond with the same banks and archives so I don't have to do any modifications.







Users browsing this topic

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users