1
Misc Audio / Re: [FF6] [OPEN BETA] Dancing Mad - FF6 Audio Replacement using MSU-1
« on: 2018-04-06 04:15:05 »One warning, I noticed you're storing a lot of state variables in $7E1xxx. That's safe most of the time but FF6 craps all over that area of RAM during the ending sequence, which is part of why I laid my variables out partly in there and partly in $1Exx. When I relied on memory in the $7E1xxx block earlier it caused repeated restarts of the ending theme due to not being able to properly check if it was already playing.
$7E0000-$7E1FFF is a mirror of $000000-$001FFF and $001600-$001FFF is save ram, so those unused SRAM bytes are ok to use, unless my info on free SRAM was not accurate. Really the only reason I used it this way is because CT MSU-1 hack had it laid down this way and I did not changed it. Anyway in bass doing a STA.w or LDA.w on a 3 bytes variable result in assembling LDA or STA $1EXX (high byte is ignored). And since majority of time DB is set to $00 in FF6, it write and read from/to $001EXX.
I'm not sure how far you wanted to go with your version or if you wanted to contribute the code directly to the project, but provided you can reach feature parity with current code without any regressions (look at the closed bugs on github), I'd be more than willing to incorporate this version of the patch directly into the project. If you'd rather keep it a seperate project that's cool too. If you're contributing this as is with an eye to me finishing it up, I'm alright with that idea too but it'd take me a while to get truly comfortable with this codebase.
I'll keep this version of the hack for an "enhanced audio" mod I plan to do (some music related mod with Ocarina of Time elements). I find it much simpler dealing with relevant SPC commands ($10 for play, $14 interrupt, $81 fade in/out and the subsong one used for Dancing Mad song) and include extra ones as each "bug" is encountered. But I labeled all SPC command used in game there are 7 or 8 but 2-3 of those are still unknown to me as for their effect. But really this approach and hooking the MSU-1 routine to the calls to $C50004 rather than in $C50004 was easier for me because I was at ease already with FF6 music code and knew a majority of the hooks already.
But you are really close to your goal, I would prefer forking your project on Github and make a separated branch for the fading only and then have people test the thing deeply (because I am a bad tester that don't spend enough time testing) and after submit a merge request to be in the official release when we are sure it is fully compatible and working. It will be a good way to learn WLA too. Howevere I'm busy with university project and finals until end of April so I can't guarantee a short integration in time of the fading code.