ROM Hack Why Isn't My HGSS Music Hack Working?

  • Thread starter Thread starter Kurausukun
  • Start date Start date
  • Views Views 2,605
  • Replies Replies 17
  • Likes Likes 1

Kurausukun

Well-Known Member
Member
Joined
Apr 6, 2014
Messages
221
Reaction score
45
Trophies
0
Age
29
XP
374
Country
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,
  • Like
Reactions: DSoryu
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.
 
  • Like
Reactions: VinsCool
AFAIK, VGMTrans is only for ripping stuff. So I'm taking it you gave up?
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.
 
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 :









 
Last edited by DSoryu,
  • Like
Reactions: Deleted User
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).
 
  • Like
Reactions: Deleted User
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).
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.
 
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,
  • Like
Reactions: Deleted User
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.
Yeah, seems like it should be the same.
Also looks like I remembered the sampling formats incorrectly.
 
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.
 
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.
 
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.
 
the audio samples need to be a smaller size than the original , i had this issue too (the music not playing but sfx still playing) , i just had to compress the new files i wanted to replace and it worked perfectly , though im not sure about pokemon games as i dont really have any interest in messing with those , id imagine it would work the same way though

as for why they came out garbled , it has something to do with the fact that not touching the original ones and just replacing the ones you want corrupts everything , youd need to re export every audio file in the .swar you want to edit with the audio program of your choice (i used ableton as thats what i already have ready and im used to it anyway) . not sure why this happens but its at least an easy fix
 
Last edited by sandwichwater,

Site & Scene News

Popular threads in this forum