Author Topic: [FF6] [OPEN BETA] Dancing Mad - FF6 Audio Replacement using MSU-1  (Read 168019 times)

edale

  • *
  • Posts: 23
    • View Profile
So I spent a few days trying to figure out how to record video of gameplay at 720p/60fps so I could upload some videos of the opera in the MSU-1 mod, before finally giving up on various emulator's built-in video recorders, and got pointed to OBS Studio by Insidious.

A few hours playing with the settings and practicing my google-fu to get everything recording and encoded properly, and I come to share the boon of my labor.

View at 720p/60 to listen without an audio fidelity decrease from Youtube's re-encoding, text is the updated opera text from TWUE 2.0:

Final Fantasy VI Original Sound Version Remastered album's version of the Opera:
https://youtu.be/TCyd8STWwtE
This is currently included in the Dancing Mad MSU-1 mod under the OST listing.
There's a slight fidelity increase, but overall you might as well use the SPC audio, it sounds the same.

Game Music Concert 4's version of the Opera:
https://youtu.be/4xo5oQWjXP8
This is the one currently included in the Dancing Mad MSU-1 mod under the OTH listing.

The Black Mages' version of the Opera:
https://youtu.be/pqk7bKMCPj8
https://mega.nz/#!KJRGVKKK!7z_LdxBntuB7EoXA2Z42dN-XO8eokvWH8Ny9PkuUPsY
This is probably my favorite version of the opera for multiple reasons.
-The narration is voiced, although it's too fast to be matched up to the on-screen lyrics.
-When racing to Ultros, the battle between Ralse and Draco, complete with spoken dialog, continues.
-The Black Mages is led by the lead music designer from FFVI.
-First version of the Opera to ever be released in its entirety, allowing fans to find out how it was supposed to end if Ultros/Setzer didn't interfere.
-Electric Guitar. Enough said.

More Friends: Music from Final Fantasy album's version of the Opera:
https://youtu.be/aM407Oxzsew
https://mega.nz/#!nYREHQTL!FuvrBjtOhUOChpa8KeAonCukCRtYG9NZzNu0uDPBsIE
-English.


And those are all the versions of the Opera I've converted so far.

*edit:

Distant Worlds version of the Opera:
https://youtu.be/dIn5t4TGv3w
https://mega.nz/#!CUR2iLRb!X2H5KQVbq6_dqGmE6KveKvf_UGNfVVRYAUYezdjjRw0
-English.

So I converted another one.

And with that, I've converted every professionally done voiced version of the opera I'm aware of (I won't touch the Balance and Ruin remix album's version with a 10-foot pole, as far as inclusion in the actual game goes, NOTHING matches up).

If anyone knows of another performance of the FULL Opera (not just the Aria) that I haven't converted, let me know.
« Last Edit: 2018-03-16 08:08:54 by edale »

Madsiur

  • *
  • Posts: 11
    • View Profile
Nice work on advancing the Beta to an almost final stage!

I tested the mod on a FF6 ExHiROM mod (RotDS more specifically) and the ExHiROM mapping break some instructions more specifically the way you coded JMLs and such. As an example JML 18FA72 will work but an ExHiROM cart or ROM will require it to be JML D8FA72 in order to jump at the same place. I'm not sure if there is an advantage to use first notation but while it work on regular HiROM + FastROM carts and ROM, it breaks on ExHiROM carts / ROMs.

I got the mod working by changing all bank bytes of all problematic instructions, what is to check are JML, JSL, LDA XXXXXX, etc. In vanilla FF3us, all instructions use the HiROM notation for banks.

I'll try to fiddle with the fadeout NMI code soon, I know you tried stuff but I'll try a few things, somebody will get it right eventually!   ;)

edale

  • *
  • Posts: 23
    • View Profile
Nice work on advancing the Beta to an almost final stage!

I tested the mod on a FF6 ExHiROM mod (RotDS more specifically) and the ExHiROM mapping break some instructions more specifically the way you coded JMLs and such. As an example JML 18FA72 will work but an ExHiROM cart or ROM will require it to be JML D8FA72 in order to jump at the same place. I'm not sure if there is an advantage to use first notation but while it work on regular HiROM + FastROM carts and ROM, it breaks on ExHiROM carts / ROMs.

I got the mod working by changing all bank bytes of all problematic instructions, what is to check are JML, JSL, LDA XXXXXX, etc. In vanilla FF3us, all instructions use the HiROM notation for banks.

I'll try to fiddle with the fadeout NMI code soon, I know you tried stuff but I'll try a few things, somebody will get it right eventually!   ;)
Opened a new issue at: https://github.com/Insidious611/DancingMadFF6/issues/71
and reposted this there.

This is far beyond what I know about, we'll see what Insidious says.

Madsiur

  • *
  • Posts: 11
    • View Profile
Opened a new issue at: https://github.com/Insidious611/DancingMadFF6/issues/71
This is far beyond what I know about, we'll see what Insidious says.

Thanks man! Yeah my message was aimed at insidious, I had the impression he visit daily or so this thread. Basically using HiROM notation for long instructions (bank number + 0xC00000) will make the mod work on every FF6 carts and roms possible, regular FF6 ROM type (HiROM + FastROM) or expanded 6MB ROM type (ExHiROM). I don't fully understand the technicalities underlying the mapping differences between both rom types but I tested both versions on debugger emulator and made a fix after seeing the JML instruction not jumping where it should.

Since he coded this with an ASM file it could even be something not wanted in the first place but that was working with vanilla FF6 ROM type. As I said no instruction in FF6 use absolute bank notation, it's all in HiROM notation.

edale

  • *
  • Posts: 23
    • View Profile
Thanks man! Yeah my message was aimed at insidious, I had the impression he visit daily or so this thread. Basically using HiROM notation for long instructions (bank number + 0xC00000) will make the mod work on every FF6 carts and roms possible, regular FF6 ROM type (HiROM + FastROM) or expanded 6MB ROM type (ExHiROM). I don't fully understand the technicalities underlying the mapping differences between both rom types but I tested both versions on debugger emulator and made a fix after seeing the JML instruction not jumping where it should.

Since he coded this with an ASM file it could even be something not wanted in the first place but that was working with vanilla FF6 ROM type. As I said no instruction in FF6 use absolute bank notation, it's all in HiROM notation.
Always best to centralize the info about any problems with a project like this, rather than it being spread around 6-7 threads on as many forums. Given I check every thread I've ever found about this patch (including a few Insidious probably doesn't know about) frequently, I've taken to moving the relevant info over there when something pops up... Well something that's not fixed by "did you select the right option for your emulator in the installer? No, OK, rename the files like so..." (was quite surprised when I read the credits for the newest version, and saw myself credited with "community outreach" on top of the audio work I've done, lol). Also, I'm pretty sure Insidious gets an email from every post to the GitHub, so he should get the message pretty quick. I can't comment on how often Insidious checks the thread, because I have no idea, lol.

So if I'm understanding this right (I'm not, lol), the patch is coded with LoROM, so it won't work with ExHiROM (but does work with HiROM?) patches? And if Insidious changes the ASM coding to HiROM, it'll work with all other patch types?


Madsiur

  • *
  • Posts: 11
    • View Profile
So if I'm understanding this right (I'm not, lol), the patch is coded with LoROM, so it won't work with ExHiROM (but does work with HiROM?) patches? And if Insidious changes the ASM coding to HiROM, it'll work with all other patch types?

It is something like this... Bank $D8 can be accessed with $18 or $D8 on regular FF6 (I guess loROM work on HiROM) but ExHiROM can only deal correctly with $D8.

edale

  • *
  • Posts: 23
    • View Profile
Quote from: insidious611
I get the jist of what he's saying at least. I'll attempt the change myself when I get time. My only concern is whether or not that notation will cause issues on the actual hardware, but tbh I doubt it will.
Well... Insidious knows what you're talking about, lol.

And I don't know if the mod is using HiROM or LoROM notation, but I know the mod works with the Ted Woolsey Uncencor patch, which has a 4MB expanded ROM (which I think you're explanation earlier said would mean HiROM).

Maybe I should just stick to the audio side of things, lol.
« Last Edit: 2018-03-18 20:24:49 by edale »

Madsiur

  • *
  • Posts: 11
    • View Profile
Well... Insidious knows what you're talking about, lol.

Good news! To answer his concern, all ASM instructions in vanilla FF6 code use HiROM notation, as an example there is never something like JSL 186040 but always JSL D86040. Same goes for all instructions requiring a bank byte (3 bytes offset).

And I don't know if the mod is using HiROM or LoROM notation, but I know the mod works with the Ted Woolsey Uncencor patch, which has a 4MB expanded ROM (which I think you're explanation earlier said would mean HiROM).

A regular FF6 ROM or one expanded to 4MB is HiROM + FastROM type. Once you expand beyond 4MB to like 6MB, you need ExHiROM mapping change because you now need and can access banks $40 to $5F, that are the continuation of $C0 to $FF ($00 to $3F in LoROM / absolute format). I'm no expert in ROM mapping so I'll stop here :P
« Last Edit: 2018-03-18 22:16:16 by Madsiur »

F-Bomb

  • *
  • Posts: 6
    • View Profile
If you post what virus scanner you use, Insidious can report it as a false positive and get that fixed. IIRC he had a problem with this on AVG when he switched to Python 3.6 for coding the installer.

The Black Mages did the following FFVI tracks:
The Decisive Battle
Dancing Mad
The Opera (Darkness and Starlight / Maria and Draco)

The Decisive Battle and Dancing Mad are included in the installer under OTH, for the Opera... See my next post.

The other OTH tracks are either a few good single-track remasters (rather than them remastering the entire album/soundtrack), or in one or two cases one of the existing tracks that I fiddled around with enough to warrant keeping separate rather than replacing (an example would be the Phantom Train's OTH track is the SSC track with train effects added in, so you can hear the train moving on the tracks the entire time you're on the train, really enhances the immersion).

I was using avast free antivirus.

I have basically installed the developer recommended files with dancing mad and decisive battle under OTH.

3 Issues I have found so far.

After the Sabin intro scene the music swapped back to the spc track untill I left the room.

During the Phantom train exit the music kept playing.
Spoiler: show
 I remember it being silent while Cyan mourns the loss of his family.


When I recruited Shadow in Cohlingen after Battle of Narshe, I slept straight away and the town music was still playing in the background
Spoiler: show
while the 1st dream sequence was happening.


I'm doing the opera tonight. I'm going to record it and upload to youtube to see if it is all good.

The rom I'm playing is dancing mad with Brave New World 1.9.0 patched over the top, with some additional changes.
But it still appears to be working mostly fine.

Also if you are interested, I have recorded the intro and ending scenes from the ps1 version. I think I have converted them correctly to msu1 files, but have no real way of testing (other than trying them out in zelda msu1).

If you are interested I'll see if I can upload them somewhere.
« Last Edit: 2018-03-20 03:05:14 by F-Bomb »

edale

  • *
  • Posts: 23
    • View Profile
Good news! To answer his concern, all ASM instructions in vanilla FF6 code use HiROM notation, as an example there is never something like JSL 186040 but always JSL D86040. Same goes for all instructions requiring a bank byte (3 bytes offset).

A regular FF6 ROM or one expanded to 4MB is HiROM + FastROM type. Once you expand beyond 4MB to like 6MB, you need ExHiROM mapping change because you now need and can access banks $40 to $5F, that are the continuation of $C0 to $FF ($00 to $3F in LoROM / absolute format). I'm no expert in ROM mapping so I'll stop here :P
Whelp, Insidius posted a bunch of coding stuff I don't understand, and it'd take like 20 min to convert the formatting for this forum, so just read the last few posts by Insidius at: https://github.com/Insidious611/DancingMadFF6/issues/71

Long story short, test build!
https://github.com/Insidious611/DancingMadFF6/blob/master/patch/ff3msu.ips
Could you try that out and see if everything's working on your ExHiROM game? I have some extensive testing to do on this, but if all goes well it'll be released as hotfix 3.

I was using avast free antivirus.

I have basically installed the developer recommended files with dancing mad and decisive battle under OTH.

3 Issues I have found so far.

After the Sabin intro scene the music swapped back to the spc track untill I left the room.

During the Phantom train exit the music kept playing.
Spoiler: show
 I remember it being silent while Cyan mourns the loss of his family.


When I recruited Shadow in Cohlingen after Battle of Narshe, I slept straight away and the town music was still playing in the background
Spoiler: show
while the 1st dream sequence was happening.


I'm doing the opera tonight. I'm going to record it and upload to youtube to see if it is all good.

The rom I'm playing is dancing mad with Brave New World 1.9.0 patched over the top, with some additional changes.
But it still appears to be working mostly fine.

Also if you are interested, I have recorded the intro and ending scenes from the ps1 version. I think I have converted them correctly to msu1 files, but have no real way of testing (other than trying them out in zelda msu1).

If you are interested I'll see if I can upload them somewhere.
Avast false-positive reported on GitHub:https://github.com/Insidious611/DancingMadFF6/issues/72

Town music playing during Shadows dream sequence reported on GitHub: https://github.com/Insidious611/DancingMadFF6/issues/73

I'll test the end of the Phantom Train on a vanilla ROM to see how the music is handled there. If it is silent, then it's probably silenced through a fade, if that's the case it'll likely remain broken until Insidious figures out fading.

The Sabin intro scene you're referring to is the one in Figaro Castle? If so it's a known issue, there's something unique about how the game handles the music there that Insidious hasn't been able to pin down as of yet. The brief bit of SPC audio is the best fix we have atm.

Please use this tool: https://www.romhacking.net/utilities/1080/
Or this tool: https://www.romhacking.net/utilities/1386/ (newer and better program just released a month or two ago, but I haven't had a chance to check it out yet, so can't comment)
To check and make sure all the patches you're using are compatible with each other and the MSU-1 mod.

I've already uploaded video of every version of the Opera I've converted for this project to youtube: http://forums.qhimm.com/index.php?topic=16077.msg256264#msg256264
So the only changes will be the ones Brave New World made. (I make no claims the Opera's lyrics will line up with the text in the BNW mod, I timed the audio to match TWUE 2.0's Updated Opera)

I actually have the raw video files from the PSX version sitting on my HDD somewhere, picked them up when I converted the PSX soundtrack for this mod. Actually finished the conversion, every last track, but I couldn't find a full rip of PSX's Dancing Mad ANYWHERE, just the first movement, so had to scrap the whole thing. That said, video is likely not going to be added to the mod by Insidious any time soon; maybe he'll consider it once he figures out fading and gets the audio working 100%.


insidious611

  • *
  • Posts: 150
    • View Profile
Good bugs! I'll try to get time to work on them, but I've gone back to school so my time is more limited atm.

The shadow thing is odd, if it calls for shadow's theme via normal means that should be caught

edale is likely on track with the Phantom Train thing. It's likely a fade-to-silence and we've not cracked getting fading working without glitches yet.

insidious611

  • *
  • Posts: 150
    • View Profile
Were you running the i386 installer or the amd64 one?

Ehh, I'll just report both.

F-Bomb

  • *
  • Posts: 6
    • View Profile
I386.

I think its another fade issue. I think the town music didnt fade out. The Shadow theme had already finished playing.
Its not the Shadow theme. It's the first Shadow dream. Where it just has a singular low note over and over.

Hope this helps.

Madsiur

  • *
  • Posts: 11
    • View Profile
Thanks for this quick fix. I'll test this tomorrow.. and sorry about the typo D8 instead of D2 if it was misleading, I kinda assumed it was hex when writing my post, I even debugged the thing before this and I was in the correct bank lol.

On a side note I was partially wrong about the FF6 ROM always using $C0 as a base, the only case I've found in original ROM is the NMI hook (JSL $001500) at C0/FF10 and some bank $C3 function that queue function calls by code and do not use and bank number based on $C0.

edale

  • *
  • Posts: 23
    • View Profile
Good bugs! I'll try to get time to work on them, but I've gone back to school so my time is more limited atm.

The shadow thing is odd, if it calls for shadow's theme via normal means that should be caught

edale is likely on track with the Phantom Train thing. It's likely a fade-to-silence and we've not cracked getting fading working without glitches yet.
I was waiting to test the phantom train bit before reposting it on the GitHub, so I knew how to report it, or if it was working as it was supposed to.

For Shadow's dreams... Maybe it uses a similar routine as the Sabin intro in Figaro Castle? Didn't that scene used to have a similar problem before you put whatever fix you currently have for it in?

edale

  • *
  • Posts: 23
    • View Profile
Phantom train scene reported on GitHub: https://github.com/Insidious611/DancingMadFF6/issues/74

After some testing, I'm still mostly sure it's a fading issue, but there are a few special tracks called around the phantom train section of the game, and I think the "train pulling away from the station" sound effect might be one of those effects, so there's a chance it's linked to that.

F-Bomb

  • *
  • Posts: 6
    • View Profile
Last night I did the opera scene on the sd2snes with Brave New World over Dancing mad. It all lines up pretty well. Only for the very last page (4 or so lines) did it start to get out of sync, but not by much. I think it all went over very well. I did notice a bit of a rough cut/jump when Draco sings when he comes in on the chocobo. But I was really quite impressed.

I did record it, but You Tube wouldn't let me upload it. Probably due to my account settings.

insidious611

  • *
  • Posts: 150
    • View Profile
Avast just got back to me on the false positive. They've fixed it in their definitions which should be updated within 24-48 hours :)

F-Bomb

  • *
  • Posts: 6
    • View Profile
When using this hack on Brave New World all seemed to be going well. Untill I got to the floating continent. When here it stopped Shadow gaining SP (spell learning points used in BNW), and when he left the party all the SP appeared to go to another character.

I also cross checked it with BNW without Dancing Mad, and the SP gain worked as normal
I'm pretty sure that this may be outside the scope of things you want to fix. But I thought i'd let you know.

Cheers.

Madsiur

  • *
  • Posts: 11
    • View Profile
[post removed because what was stated is not true, I don't know what I did or test but it doesn't work]
« Last Edit: 2021-02-14 12:33:11 by Madsiur »

insidious611

  • *
  • Posts: 150
    • View Profile
This is honestly pretty excellent work! I love how well structured the code is. I'm still pretty new to ASM and have never used bass, but I could understand what you were doing pretty well! No slight against DarkShock's work but I had a much harder time understanding it when I was first getting started with this project. I particularly like your clever use of macros and how clean they make everything.

If you have any questions about what I'm doing in the current version and why, feel free to ask.

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.

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.

On an only semi-related note, I wanted to apologize to everyone for the lack of bug fixing movement lately. I went back to college as of a month ago and have been super busy, so I haven't really had the time to devote to this project that I want to. Rest assured bug reports *are* being paid attention to and I've been brainstorming fixes.
« Last Edit: 2018-04-06 03:26:08 by insidious611 »

Madsiur

  • *
  • Posts: 11
    • View Profile
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.
« Last Edit: 2018-04-06 04:21:36 by Madsiur »

insidious611

  • *
  • Posts: 150
    • View Profile
Sounds like a good plan, fork away! And no rush, as I said I'm pretty busy myself at the moment.

edale

  • *
  • Posts: 23
    • View Profile
*head perks up* Did someone say testing?  :-D (granted, I haven't even touched testing the new ExHiROM mod to the codebase yet...)

I'm already pretty familiar with the bigger issues we've had with fading (might I finally be able to get my PCM for the 'wind' effect working in South Figaro's Rich Man's House? Not to mention the recently discovered Phantom Train scene issue).

Looking forward to this fork showing up on the GitHub.

SandmanLobo

  • *
  • Posts: 2
    • View Profile
Guys, I just found out about this mod and was listening to the many remastered editions of FFVI to choose which ones to patch into my game, and I just fell in love with Sean Schafianski's versions of the tracks. Is there any chance you guys are gonna include his unfinished Disk 2 tracks to the mod?