pleonex / tinke

Viewer and editor for files of NDS games
GNU General Public License v3.0
353 stars 57 forks source link

Issue Replacing SWARs in SDATs #33

Open Kurausukun opened 8 years ago

Kurausukun commented 8 years ago

If I build a SWAR file using SWAVtoSWAR, and then I attempt to replace the original SWAR in the ROM, it works if the new SWAR is smaller than the original or even if it's slightly bigger, but if it's considerably bigger (I haven't tried to find out exactly how much), it stops working ingame. I don't know if this is an issue over all games; the only one I've tried this with is Pokemon HeartGold. I'm not entirely sure what causes this issue, but I went in with a hex editor after replacing it and I think some of the headers in the SDAT had incorrect sizes and offsets. I don't think it's a problem with actual lack of size; there's plenty of free space in the ROM and I've seen SDATs (and SWARs for that matter) get much bigger than the one I'm trying to replace. I can provide files if you wish.

Something odd to note: Ripping NCSFs from the ROM still works, even though the SDAT itself doesn't work ingame. I don't know if this tells you anything or not.

pleonex commented 8 years ago

Well, it could a problem of RAM memory. I mean, if the audio is to big, it could not fit into the memory of the Nintendo DS so the game is not able to load the file and it crashes. But it could be an issue in the importer. Do you have an example that I can try?

Kurausukun commented 8 years ago

Sure: https://mega.nz/#!iMlSBbZT!N1GtqXJ3cYcCECIr-EmBDOekxDE8lPysQRbrdjh4x3o

This is the SWAR that I've been having issues with. It is meant to replace WAVE_ARC_BASIC in Pokemon HGSS (It doesn't matter which version/language the game is, the sdat is the same for all of them). The filepath in the ROM is data/sound/gs_sound_data.sdat/SWAR/WAVE_ARC_BASIC. I don't think it's an issue with RAM for multiple reasons (I've gotten it to play garbage audio with this before, for one), but I'm definitely not the expert here. Anyway, that's the file that's giving me problems. Thanks for the help.

Kurausukun commented 7 years ago

Sorry to come out of nowhere--is it still unknown whether this is an issue with Tinke's SWAR replacing, or whether I just can't use this SWAR? It just seems unlikely that there's a problem with the game or SDAT itself, but I have no way of checking, and no other tools will do the job for me.