How to fix custom song glitches on emlators. - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: How to fix custom song glitches on emlators. (/thread-2902.html) Pages:
1
2
|
How to fix custom song glitches on emlators. - madsiur - 06-28-2015 Gi Nattak and I have been trying to understand why some custom song glitches on emulators (and real hardware) except zsnes. The reason is simple: the instruments data overflow sometimes in the SPC-700 RAM in part of the RAM where it doesn't belong to. This will happen when your instruments use too much space total in memory. The reason why the glitch doesn't appear in zsnes is because zsnes runs the SMP (audio CPU) completely out of sync with the CPU. With some testing, Gi Nattak found that the total of blocks (9 bytes each) used by all samples in one song must not exceed 3746. You can see how much blocks an instrument use in FF3usME. For quick reference, here's the size of the original samples: Code: ## size name RE: How to fix custom song glitches on emlators. - Tenkarider - 06-28-2015 I didn't remember string were the heaviest, oh well... Just saying, are the special instruments counted for the block limit? With special instruments i mean those: @0x00 = a 'buzzing-bee' kind of synth. @0x01 = a weird futuristic sounding brass. @0x02 = a less shrill version of 0x01. @0x03 = a lower octave sci-fi sound. @0x04 = a static percussion sound. @0x05 = a sawtooth synth. I like this one the best. @0x06 = a higher octave slightly more funky sawtooth. @0x07 = soft static. (Zozo's rain sound) @0x08 = sounds like a saxophone on crack. Thinking to that better i don't even know their size... RE: How to fix custom song glitches on emlators. - Gi Nattak - 06-28-2015 No those are FF6's waveform generated samples, they don't take up any instrument block space because they only exist in the song data, not in the instrument data. Meaning they don't need to be set as an instrument like the other real instruments, just placed directly in the song data. RE: How to fix custom song glitches on emlators. - madsiur - 06-28-2015 (06-28-2015, 07:46 PM)Tenkarider Wrote: No those are FF6's waveform generated samples, they don't take up any instrument block space because they only exist in the song data, not in the instrument data. I would have thought they take some place in the SPC-700 RAM... They probably do, but maybe not in the memory reserved to brr samples... Have you tested this? RE: How to fix custom song glitches on emlators. - Gi Nattak - 06-28-2015 Test them how? You mean like see if using them can produce glitches in songs, like having it up to the max of 3700 and then adding them into the song data as well? But no I haven't, all I know is they are more or less basically built into the sound engine and aren't set in the 32 byte instrument data like the other instruments so I doubt they would take any memory from the RAM used for the instruments, to be a cause for the glichiness, but I'm not positive. RE: How to fix custom song glitches on emlators. - madsiur - 06-28-2015 (06-28-2015, 09:17 PM)Gi Nattak Wrote: Test them how? You mean like see if using them can produce glitches in songs, like having it up to the max of 3700 and then adding them into the song data as well? Yes. (06-28-2015, 09:17 PM)Gi Nattak Wrote: But no I haven't, all I know is they are more or less basically built into the sound engine. I'm pretty sure they are taken from somewhere in the ROM and aren't build in the SPC-700 or DSP but I'm not sure where they come from... RE: How to fix custom song glitches on emlators. - Tenkarider - 06-29-2015 In the case they really don't take space... anyone knows how to store new instruments in that zone? since the normal instruments start from 0x20, then shouldn't that mean that there are empty slots from 0x09 to 0x19(or it was 0x1F) ? When i tested "empty slots" no sound came out from them, so i guess they are usable slots indeed... RE: How to fix custom song glitches on emlators. - dn - 06-29-2015 So basically the instrument patch has to be scrapped for any kind of emulation accuracy, unless a workaround can be found to load two or more instrument banks separately on an as-needed basis (which would be pretty complex). RE: How to fix custom song glitches on emlators. - madsiur - 06-29-2015 (06-29-2015, 11:12 AM)dn Wrote: So basically the instrument patch has to be scrapped for any kind of emulation accuracy, unless a workaround can be found to load two or more instrument banks separately on an as-needed basis (which would be pretty complex). No. I did not expressed myself clearly. That limit is for each song (I edited the first post). In fact having the RS3 instruments can help in a lot of songs, since they generally take less place than their FF6 counterparts. (06-29-2015, 02:49 AM)Tenkarider Wrote: In the case they really don't take space... I think this is a fast assumption, the only way to really know is to test it. RE: How to fix custom song glitches on emlators. - Gi Nattak - 06-29-2015 After getting a song's (Dancing Mad) instrument block usage right to 3700 and then adding in a ton of waveform generated ones into the song data, the glitch did not happen. They might take up space I suppose, but I think it's a matter of them (brr) having to be in the instrument 32 byte data where it can overflow, and since they are not, no glitch. |