Why Isn't My HGSS Music Hack Working?

Discussion in 'NDS - ROM Hacking and Translations' started by Kurausukun, Mar 16, 2016.

  1. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    I made a little hack for HGSS that replaces some of the instruments contained within the .SWARs to higher quality versions found in B/W. If I use a ripping tool to make 2sf or NCSF sets, they play fine, but if I play the actual edited ROM in an emulator, there is no BGM or sound effects; only Pokemon cries remain. Is there anyone who is well-versed in SDAT hacking who can tell me why this might be happening?

    EDIT: I don't know if this is relevant, but I made the new SWARs with Swav2Swar, and I did all of the file replacement with Tinke 0.9.0.
     
    Last edited by Kurausukun, Mar 16, 2016
    Dartz150 likes this.
  2. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    Are you using Tinke? Tinke is shit when it comes to saving SDATs with altered SWARs. It wrecked everything when I was trying to inject EarthBound instruments into HeartGold.
     
    VinsCool likes this.
  3. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    Indeed I am, I just edited that in. Do you know of another tool that works?
     
  4. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    The only other program I can think of would be VGMTrans, but I don't actually remember if it lets you shove new SWARs into SDATs.
     
  5. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    AFAIK, VGMTrans is only for ripping stuff. So I'm taking it you gave up?
     
    Tomato Hentai likes this.
  6. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    Yeah, I did eventually.
    I had come up with some extremely convoluted way of doing it, but I don't really remember what it was, and I don't think I ever actually tested it to see if it worked.
     
  7. Dartz150

    Dartz150 GBATemp Official Lolicon Onii-chan™

    Member
    1,406
    845
    May 5, 2010
    Mexico
    On a Strange Journey
    Oh, the memories... too long ago I tried to do the same but with platinum, in fact that was the reason I joined the Temp around those times..

    There are not usefull tools (yet) to do this without messing the hack.
    The most I could do was extracting and replacing the SBANK, and convert it to sf2.

    Gave up too. The only solution is to edit those with hex editor and is a pain in the ass.

    Any NDS good hacker who can help? I still have my work there waiting to be finished, but couldn't find any useful tool to reinject the new instruments.

    @Apache Thunder Do you know something or anyone?

    EDIT: Here's the reason why things like this would be very beautifull hacks, all those where made and ripped by me @Tomato Hentai @Kurausukun :

    Warning: Spoilers inside!
     
    Last edited by Dartz150, Mar 16, 2016
    Tomato Hentai likes this.
  8. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    Well I tried opening the SDAT in a hex editor and overwriting the SWAR with my new one, and it had sound... but it was horribly garbled and incorrect. I'm pretty sure there's some header info or something that needs to be edited for it to work right, but I don't know anything about the SDAT format itself, and I think I would need a tool to do it (which apparently doesn't exist).
     
    Tomato Hentai likes this.
  9. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    Yeah's there's header information such as sampling rate, sample format (DS-ADPCM, which is just ADPCM with two channels, and then 16 and 32 bit WAV) and if/where the sample loops.
     
  10. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    Wouldn't that be the header info for an .swav file? I'm very familiar with that since I had to manually hex edit in loops for some of the files I replaced. There's a bit that's the loop flag, there's a bit that's the wav type (IMA-ADPCM, PCM8, PCM16), and there's some info about the loop offset and non-loop length.
     
    Last edited by Kurausukun, Mar 16, 2016
    Tomato Hentai likes this.
  11. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    Yeah, seems like it should be the same.
    Also looks like I remembered the sampling formats incorrectly.
     
  12. Dartz150

    Dartz150 GBATemp Official Lolicon Onii-chan™

    Member
    1,406
    845
    May 5, 2010
    Mexico
    On a Strange Journey
    Have you made any progress?
     
  13. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    No, not really. As I mentioned, I tried manually hex editing the SWAR into the SDAT, but the sound comes out horribly garbled if I do that, so I'm pretty sure there's something in the SDAT header I need to edit. By the way, I didn't mention this earlier since it didn't seem relevant, but I did a similar thing with Platinum, and it worked--but I only replaced 3 samples in that one. So I'm not sure if the size is an issue or if it's something else, but I really do need some more info on the SDAT format if I'm going to have any chance of this working I think.
     
  14. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    Minor breakthrough: if the edited SWAR is only a little bigger than the original, it works fine. So the problem seems to be size-related, but I'm not sure how to fix that. There's plenty of free space in the ROM itself, but I don't think there's much free space in the SDAT, although I also think the size of the SDAT itself shouldn't be a problem... not sure if I'll be able to do anything about this soon, I'd really like some help from someone who's well-versed in this.
     
  15. CeeDee

    CeeDee hm?

    Member
    3,807
    5,320
    May 4, 2014
    United States
    somewhere
    THAT SOUNDS FUCKING AMAZING

    (did you ever succeed?)
     
    Tomato Hentai likes this.
  16. Tomato Hentai

    Tomato Hentai baja boner blast

    Member
    3,731
    6,034
    Oct 30, 2014
    Canada
    actually north korea. please send help
    No, but I might try again sometime in the future, and with MOTHER 3 instruments as well.
     
    CeeDee likes this.
  17. Kurausukun
    OP

    Kurausukun GBAtemp Regular

    Member
    211
    40
    Apr 6, 2014
    United States
    If you have any success, do let me know if it works, especially if your resulting SWAR is bigger than the original. As for me, I found a nice resource that documents the SDAT format (and the formats it contains), so I went through and tried to see if I could find anything obviously wrong. I did find that in the metadata of some headers, the reported block size was wrong, so I corrected them, but it did absolutely nothing in terms of functionality. I might try something else later.