Previous Page | Next Page
- by hcs at 6:24 PM EDT on October 16, 2007
- Hum. Well, that's disappointing.
I suppose it could be that the swap in the .baa fails while attempting to load the correct samples, whereas the swap in sequence lookup table only fails when it hits the particular missing samples?
Could you try, say, replacing one of the streams (TITLE_BACK?) with a sequence and see what that does?
edited 6:29 PM EDT October 16, 2007
- by valiant at 7:01 PM EDT on October 16, 2007
- Neat idea.
I first tried to replace TITLE_BACK with STAGE_SELECT_E3 (another stream). That worked flawlessly - the arranged overworld theme played at the title screen.
The sequence swap however didn't (did it with TEMPLE_OF_TIME).
Then I used your BAA-swap method at the Hidden Village. It loaded the Faron Woods theme (just like in the Z2SoundSeqs.arc-method) and played the few samples that I got earlier.
So that means: The BMS files are really swapped and played, but it seems the AW banks are not loaded into the memory at the same time, but a little earlier and that the BAA swap doesn't have anything to do with the specified AWs that are loaded.
Now, if I knew which BMS used which AW banks, I could probably replace them on the fly... But how am I to know?
edited 7:07 PM EDT October 16, 2007
- by hcs at 8:29 PM EDT on October 16, 2007
- Just a few stupid questions:
Are you sure that the songs you're trying to play work with the setup you've got?
So replacing a stream with a sequence doesn't seem to work, how about the other way around (to at least see if the mechanism can be changed)?
Are you replacing all 4 bytes of the entry (no offense, just frustrated with the mystery)?
Who knows where the bank loading mechanism may be lurking... it may be done directly in the code, but that sounds like a stupid design decision.
[edit]
Alternative:
check out this list. If my interpretation of the operation of the BST table is correct but somehow switching things doesn't work, this should be grouped by sample banks, so switching sequences within a group should work.
This'll at least put to rest this theory if it doesn't work consistently.
edited 8:41 PM EDT October 16, 2007
edited 8:53 PM EDT October 16, 2007
- by unknownfile at 8:59 PM EDT on October 16, 2007
- Let me step in for a moment.
At first I thought that sample banks were controlled by the BMS format itself, but it is controlled by a few functions. The prototypes are:
Bank_Get(unsigned long)
Bank_GetInstKeymap(Inst_ *, unsigned char)
Bank_GetInstVmap(Inst_ *, unsigned char, unsigned char)
Bank_GetPercVmap(Perc_ *, unsigned char, unsigned char)
Bank_Init(void)
Bank_InstChange(Bank_ *, unsigned long)
Bank_OscToOfs(Osc_ *, Oscbuf_ *)
Bank_PercChange(Bank_ *, unsigned long)
Bank_RandToOfs(Rand_ *)
Bank_Regist(void *, unsigned long)
Bank_SenseToOfs(Sense_ *, unsigned char)
Bank_Test(unsigned char *)
These might do with sequence banks or sample banks, but it shows that something is set up in a way so that files are swapped in memory. This function list is actually from Pikmin, but the Zelda TP jaudio library should do similar functions.
- by valiant at 9:17 PM EDT on October 16, 2007
- Are you sure that the songs you're trying to play work with the setup you've got?
Well, I don't quite get what you mean by that. If you're referring to wether there's one sequence file that doesn't blip at the start because no data is loaded, then yes: the track at Ganon's Tower (d_lv09_02.bms/Z2BGM_DUNGEON_LV9_02, I guess) plays seamlessly from the beginning.
If it's necessary to replace all 4 bytes, I do just that. But for similar entries like 600048d8 and 600049a8, I just change the "8d" to "9a". However, I don't think I'm doing anything wrong, seeing how I got the other streaming track playing at the title screen. ^_^
Replacing a sequenced song with a streamed one didn't work - only silence. So I guess you can't change sequenced songs to streamed ones and vice-versa.
Replacing two sequenced songs using the same bank gave me a similar result to the earlier experiment in the Hidden Village: This time, only strings, the recorder and some guitar samples are played.
Well, if I knew which BMS file uses which AW file, I could probably exchange the AW file names in the ISO, in conjunction with the BAA swap procedure.
edited 9:20 PM EDT October 16, 2007
- by hcs at 9:34 PM EDT on October 16, 2007
- At this point I could dump the samples and you could try to guess from there...
If we could tell directly what maps where we would be able to change the reference right there, no need for anything else.
edited 9:36 PM EDT October 16, 2007
- by ugetab at 9:36 PM EDT on October 16, 2007
- I wonder what would happen if you changed the SE at 1680C to ST...would it kill all SFX? Would it kill the music too, because of the error?
- by valiant at 9:43 PM EDT on October 16, 2007
- I may be hallucinating right now, but I think I remember seeing AW file names in the map files or something. I'll try to find it again.
@ugetab: We've already disabled the sound effects by zeroing out all the SE AW files. :-) That's not the problem anymore. Now we're trying to swap the files in order to counter the blips at the beginning of the tracks.
- by unknownfile at 9:47 PM EDT on October 16, 2007
- the best possible solution is that you get a debugger out and start monitoring calls to the sequence loader. you have the addresses, so go for it.
- by hcs at 11:17 PM EDT on October 16, 2007
- I'm examining the SC section now, the code seems to refer to it as a sequence and sound effect "collection".
Dang, seems to be just sound effects. There is a structure identical to that of the /SE subdirectory in it.
edited 11:28 PM EDT October 16, 2007
Previous Page | Next Page
Go to Page 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Search this thread
Show all threads
Reply to this thread:
HCS Forum Index
Halley's Comet Software
forum source