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

insidious611

  • *
  • Posts: 150
    • View Profile
I admittedly wasn't even aware he'd done any disc two work. Yeah, I'd be happy to include it, provided I can find a download. I purchased a copy of the Disc One album in FLAC form to make the original MSU-1 PCMs, and I'm only finding the Disc Two work in non-downloadable form on SoundCloud atm.

---

Progress report on the hack: At the moment I'm mostly trying to consider how to tackle the current bugs. A lot of them are due to the way I'm handling (or, to be more accurate,  currently *not* handling) the fading commands. Madsiur's list of SPC commands from his patch is really helpful for me as far as trying to fix that issue, but I'm mulling over whether I really want to put in workarounds I'll have to take out later once the actual fade code is in.

To be specific, while I haven't had time to test this theory re issue #73, it and issues #38, and #32 stem primarily from the fact FF6 sometimes relies on a song having faded to 0 in order to have silence in a scene, and as I don't directly handle SPC command $81 at all, the songs continue playing at whatever volume they were last set to instead of fading to 0.

The workaround in this case, at least, the easiest one I can think of atm, would be to hook SPC command $81 with a simple routine that checks the requested volume, and, if it's 0, mute the MSU-1. This would turn all fade outs into sudden silences, *hopefully* not breaking anything in the process but probably fixing these bugs for the moment.

However, this entire routine (aside the actual hooking of SPC command $81 which will likely be vital to the fading code) would need to be cut out whenever actual fading is implemented.

Issue #74, the phantom train issue, is likely a combination of not handling $81 (fading) and not correctly handling $82 (subsong switching). Right now, I only handle $82 for Dancing Mad, because it's the only song (set of songs really) in the game that absolutely *needs* subsong switching to work at all. However, Phantom Train uses subsong switching to switch between the actual song and the train sounds, and my current $82 code ignores any calls that aren't during Dancing Mad.

The subsong part of #74 may be an easy fix, but it may just expose a lingering fading-based issue as I bet the train sound will continue looping at full volume.
« Last Edit: 2018-04-17 16:46:32 by insidious611 »

edale

  • *
  • Posts: 23
    • 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?
Sean Schafianski's tracks are the SSC option in the installer.

*edit- and I totally missed Insidious' reply, and the revelation that we don't have all his tracks already (SS's tracks were done by the previous audio guy, and I haven't really looked at them past getting all the older stuff normalized).

But yea, if I can get a copy of the audio, I can convert them easily.

And @insidious611 there are sites that let you download soundcloud music that soundcloud doesn't natively allow you to download. (*edit- Found a Chrome extension that just adds a download button right to the soundcloud page. EASY downloading)

edit2- Oh wow, I  :-* LOVE :-* this version of Techno de Chocobo!

The Opera stuff is good too (I love any version that vocalizes the narration), but several parts of the Opera are missing, and a broken up version isn't viable in-game (it's why all 8 or so tracks in the Opera are under one option radial in the installer).

And Another World of Beasts... Might be right up there with CrystalChameleon's version of Dark World as one of the best remasters I've ever heard. Of anything.
« Last Edit: 2018-04-17 21:05:40 by edale »

edale

  • *
  • Posts: 23
    • 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?
Sean Schafianski's Disk 2 PCMS:
https://mega.nz/#!SVYyyCxR!9nb0okEsbo3N0-e-zSd2ynjqs-FcBfFs1yaCkIVhpyQ

Enjoy.

They're made from SoundCloud rips, if anyone can find a FLAC copy, I'll redo them.

Just pop these in the folder with the existing PCM files for the mod, overwrite the old ones, and you're good to go.
« Last Edit: 2018-04-19 04:50:07 by edale »

SandmanLobo

  • *
  • Posts: 2
    • View Profile
Sean Schafianski's Disk 2 PCMS:
https://mega.nz/#!SVYyyCxR!9nb0okEsbo3N0-e-zSd2ynjqs-FcBfFs1yaCkIVhpyQ

Enjoy.

They're made from SoundCloud rips, if anyone can find a FLAC copy, I'll redo them.

Just pop these in the folder with the existing PCM files for the mod, overwrite the old ones, and you're good to go.

Wow, that was fast! I really appreciate it, thanks! Also, a pity that he abandoned this project, leaving even the Opera incomplete.

insidious611

  • *
  • Posts: 150
    • View Profile
So this is interesting. Madsiur, remember how you said you didn't know what SPC command $89 does? Well, I still don't know for sure, but I do know where it's used! >.<

The phantom train does *not* use $82 for its subsong switching. When it calls for track $20 (decimal 32, phantom train), the bit with the train noise plays by default, and then it calls $89 when it's time to switch to the actual song (still with $20 and $ff in $1301 and $1302).

This is going to need a lot more investigation than I thought, and it means the fix I tried to make for it is pointless :P

An interesting side effect of this in a vanilla ROM that I never realized before: All of the save rooms in the phantom train segment are specially coded to trigger SPC Command $89 when you leave them. So, when you save and reload your game, it plays the train sound effect, but the minute you go to leave it segues into the music.
« Last Edit: 2018-04-19 22:07:02 by insidious611 »

edale

  • *
  • Posts: 23
    • View Profile
Wow, that was fast! I really appreciate it, thanks! Also, a pity that he abandoned this project, leaving even the Opera incomplete.
The only thing that slows me down is procrastination.  ;) (the last "major" change/fix to one of the audio files I did, I procrastinated about 3 weeks on... it took me 10 min to finish, lol)

Too bad I can't really do much to help with the coding issues...
« Last Edit: 2018-04-19 22:12:52 by edale »

insidious611

  • *
  • Posts: 150
    • View Profile
Okay so, I did an unorthodox thing that seems to have worked. Read the issue for details, https://github.com/Insidious611/DancingMadFF6/issues/74, but basically I'm using a flag setting and checking/clearing routine to make it use the SPC for the train noises where appropriate and then switch to the MSU Phantom Train music when called for. It seems to work perfectly so far, but the amount of changes I needed to make to the "PlayCommand" label in the ASM means I also need to check Dancing Mad for regressions before I can 100% call this a fixed bug.

I can confirm, however, that the situation described in the original bug report (that of the ending to the Phantom Train sequence, where it should be playing train noises followed by silence as Cyan mourns) is in my branch now performing 100% the same as an unmodified ROM.

If anyone else wants to help me test both this and the fade-out workaround (which just sets volume immediately to 0 when a fade-to-zero is called for), apply this IPS from the train-and-fadeout-fixes branch to a clean ROM and replace your Dancing Mad ROM with it.
« Last Edit: 2018-04-19 23:15:17 by insidious611 »

insidious611

  • *
  • Posts: 150
    • View Profile
I need a little bit of help with debugging the Shadow scene bug. Specifically, I need a save (srm format) right before this happens and directions to reproduce, as I don't really have the time atm to organically reach this point in the game to test my fix. Feel free to use one of the action replay "save anywhere" codes to achieve this (do note however that use of these codes in general can sometimes produce... weird situations.)

EDIT: Also, bit of an update regarding that fix. Essentially what I'm doing is muting the volume whenever something calls for a fadeout, as a temporary workaround for when the game should be playing silence and isn't. However, this causes some pretty abrupt musical cuts, noticably (so far in testing) at the end of Dancing Mad Part 3 before Part 4 starts. This is very much a temporary, somewhat heavy handed solution and I'm even considering offering two patches in the installer because I could understand somebody considering this a regression.
« Last Edit: 2018-04-23 20:03:35 by insidious611 »

F-Bomb

  • *
  • Posts: 6
    • View Profile
If you go to https://www.fantasyanime.com/finalfantasy/ff6/ff6saves.htm and use 'save 3: Adventures in the South' under the my saves section. You'll find a save about 10 min before you first recruit shadow. If that is still too far away. Let me know and I'll shoot you one a bit later right outside Kohlingen.

Edit: to reproduce. Recruit Shadow, then just keep staying at the inn until it triggers the dream sequences.

Edit: as a bonus this srm also has a save right outside the opera house.
« Last Edit: 2018-04-26 04:18:21 by F-Bomb »

insidious611

  • *
  • Posts: 150
    • View Profile
Okay so, I was doing testing on a laptop and had a bunch of issues staying connected during the install. Because of this, I've decided I'm going to implement a system where each change to the song list is a new set of md5sums, which the installer checks the install directory against before downloading, so if the installer is interrupted or you're installing on top of a directory that already has all the songs you need in it, it can skip the ones it finds that match. It might make the initial loading time for the installer a little slower though.
« Last Edit: 2018-05-01 20:39:46 by insidious611 »

insidious611

  • *
  • Posts: 150
    • View Profile
:/ Unfortunately, what I hoped would be a fix for the Shadow cutscene bug has turned out not to be. Back to the drawing board, I'm going to have to break down what's happening in this scene as far as SPC commands and see if I'm missing something.

insidious611

  • *
  • Posts: 150
    • View Profile
Two major bugs have just been fixed and their fixes merged to the Master branch, the Phantom Train bug and the Select a Scenario scene bug, both involving music playing when it shouldn't.
Unfortunately the Shadow cutscene bug is still at large, I'll have to prod that scene thoroughly with bsnes-plus's debugger to figure out exactly what's causing the anomalous behavior. This may take a while.

insidious611

  • *
  • Posts: 150
    • View Profile
So this is strange. I'm watching the sequence of events as far as SPC commands when Shadow's dream sequence happens, and it's doing this:

The player walks to the center of the beds, then the screen fades to black:
Command $81 (Fade) volume $00 (silence, should be handled properly by my new code as a mute)

All good so far, but then...
command $10 (play track) track $2a (kids run through the city corner) volume $ff (full volume)

command $18 (play sfx) track $ad (presumably the "wheeoowheeoowheeoo" sound present in shadow's first dream cutscnee) volume $80



So the event is *specifically* asking to play Kids Runs Through The City Corner at *full volume* *after* stopping/muting it. Except there's nothing in the event code that should be causing it to do that! So I don't know why, but that's the source of the issue right there.
I can confirm my current fix re: muting when called with 1300:$81/1302:$00 *does* work for every shadow dream cutscene *after* the first. It's just the first that first mutes then immediately asks to play the music again.

This is with dancing mad applied. I'm going to have to run through the same sequence with a stock ROM to see if it's somehow my code causing it to glitch like that, and if so, how.

EDIT: Talked with madsiur. I've been avoiding doing any mucking about with event code because I want to avoid conflicts with other patches, but it may be worth sticking a call to play Track 00 (silence) in the shadow dream sequences just to make sure this doesn't happen. He gave me pointers on where to start.
« Last Edit: 2018-05-04 10:52:29 by insidious611 »

insidious611

  • *
  • Posts: 150
    • View Profile
Alright so, I went with the above fix (adding a line to set the song to $00 in the event code for all the shadow scenes).

It works, for the most part. You get about a frame worth of the song playing after the scene starts but it's silent otherwise. Also, the inn is silent after the scene finishes, but the music starts backs up when you leave the inn. So not a perfect fix by any means, but it's serviceable and it does the job, and I learned a lot about event scripting in the process, so yay.

I'm also going to do a bit of poking around in zone doctor because the current behavior noted above combined with how the event scripts look implies to me that it's the actual loading of the new map causing the weird song behavior, so maybe there's something I can do there too, to at least stop the 'frame worth of wrong music' problem.

insidious611

  • *
  • Posts: 150
    • View Profile
Unfortunately the zone doctor pokery ended up not very fruitful. Only one map is *specifically* used just for a Shadow scene, and I didn't want to mess up the music in other scenes. So until I can figure out the cause of the game asking track 2a to be played at ff volume, we're just going to have to deal with the imperfect fix we've got for now.

insidious611

  • *
  • Posts: 150
    • View Profile
Just wanted to pop in and give an update. With two exceptions listed on GitHub (look at issues under the tag "patch"), all known issues have been fixed. The shadow scene fix is the above mentioned imperfect fix, and I'll have to do more investigation to try and figure out why it's bugging out like that in the first place, but yeah, we're as close to bug free as we've ever been at this point, knock on wood.

The only thing in the way of Hotfix Three is more work on the installer, specifically a new page to support the various available versions of the opera, and then a round of testing both of the installer and the patch. I would expect Hotfix Three by the end of this month, maybe early next, but I don't do definite release dates. :P

My apologies for the slow work and relative silence of late. I uhh... let's simplify it and say I basically fell out of a tree. I sustained a minor compression fracture to one of my vertebrae and have been out of commision for a while. I'm still not totally healed, but I'm healed enough to do some work at least.

New "features" in Hotfix Three will be proper compatibility with patches that use ExHiROM, full tested compatibility with Brave New World, and the new opera selections, as well as an updated version of TWUE available in the installer.
« Last Edit: 2018-06-11 08:12:09 by insidious611 »

insidious611

  • *
  • Posts: 150
    • View Profile
So, I absolutely missed my original deadline of the end of june, by a few months. This is why I don't generally like making deadlines :P

*but*

I am happy to announce the release of
Dancing Mad Final Beta Hotfix Three

There's a *lot* of bug fixes and new stuff in this version, much of which I'm very excited to get into your hands. Here's a summary taken from the Readme for the installer itself:


Fixed Bugs

* A workaround for the issue where the wrong song plays during some of Shadow's cutscenes was implemented. The wrong song may still play for a split second.
* Installer is now usable without manually resizing the window on High DPI systems.
* Patch now uses a more recent version of wla-dx assembler.
* Phantom Train track now behaves correctly, playing train noises until the music is called for.
* Select-a-scenario menu is now properly silent, instead of playing the last song played.
* Patch is now compatible with ExHIROM patches.
* Installer no longer freezes while testing for the status of mirrors.
* Minor packaging fixes.
* Unused files removed from GitHub tree.

New Features

* Dancing Mad MSU-1 now works along with the Brave New World patch (apply after install). Technical details of this support are that state variables had to be moved to a different place in RAM so as not to conflict with BNW's state variables.
* Five different versions of the opera are now available! These include new versions The Black Mages, Distant Worlds concert and More Friends Concert, as well as the existing Game Music Concert 4 and OST versions. See section 2 for details.
* Installer is now capable of previewing songs! Currently support is only enabled for the Opera selections, but once previews are available for all tracks, a "preview" button will be available in the "custom track" selection table.
* Installer now checks for pre-existing PCM files in the install directory. If these are found, they are compared against the files on the server. Upon a match, the download is skipped. This enables updating your version of Dancing Mad or changing your selection of tracks without redownloading a large number of files.
* Sean Schafianski's "Disc 2" tracks now available to be downloaded/installed.
* Installer now outputs a log to dancing-mad-installer.log in your home directory (e.g., C:\Users\yourusername). Please attach this when reporting installer bugs!


And just to update people, here are the still existing known bugs/issues:

* NOT A BUG - On older versions of BSNES and older SD2SNES firmware, area music will restart after battles. Please see the thread on qhimm.com for discussion of this issue. Area music *will* resume on Higan v096 and later, bsnes-plus, snes9x-msu, and latest SD2SNES firmwares, due to updates to the MSU-1 code. I will not workaround nor fix resume support on earlier versions of Higan or BSNES.
* Tracks do not smoothly fade. Implementing this requires precise NMI timing and is a continuing project. Contributions welcome.
* Installer may look strange on High DPI systems (4K displays, 1080p laptops with small screens). It should at the very least be usable now, but for best effect please use the compatibility settings in Windows to set the DancingMadInstaller.exe to System instead of Application scaling.
* Music may revert to SPC after certain scenes. Known scenes mostly involve the Coin Song and the Figaro theme.

One thing I failed to note in the readme is that the latest versions of snes9x support the MSU-1 natively! No more need to download a specific MSU-1 version of Snes9x.

Downloads!

Windows AMD64 (64-bit) (if you're not sure, this is what you want)

Windows i386 (32-bit)

Linux/OSX/etc.
« Last Edit: 2018-09-03 22:14:06 by insidious611 »

qwertymodo

  • *
  • Posts: 3
    • View Profile
* NOT A BUG
* Tracks do not smoothly fade. Implementing this requires precise NMI timing and is a continuing project. Contributions welcome.

If you'd like, I can send you my Chrono Trigger MSU-1 audio code, which fully supports smooth fading.  I'm pretty sure the CT and FFVI sound engines are largely identical.

insidious611

  • *
  • Posts: 150
    • View Profile
I just discovered an amazing thing. The audio code we patch is identical between the Japanese, US, and US v1.1 versions of FF3. That is to say, it should be completely possible to *as is*, use Dancing Mad on both Japanese and V1.1 US copies of FF3, not just V1.0 US copies. I made an investigation of the files between the different versions and an entire 16kb segment of code starting at where I jump from is identical between different versions. Given said code is exactly what needs modified/replaced, unless any of our own RAM addresses conflict with the Japanese or patched US ROMs, this should mean that, and excuse my big bold words

Dancing Mad is, as far as I can tell, compatible with all known versions of FF6.
Please note that optional patches may or may not work.
I had never gotten around to testing for this compatibility before now, but I can say this with 90% certainty. Please report any bugs trying to run Dancing Mad on these versions!

The installer has now been updated to check for these additional versions.
« Last Edit: 2018-09-04 23:55:31 by insidious611 »

insidious611

  • *
  • Posts: 150
    • View Profile
If you'd like, I can send you my Chrono Trigger MSU-1 audio code, which fully supports smooth fading.  I'm pretty sure the CT and FFVI sound engines are largely identical.

I certainly wouldn't object to another example to look at! Madsiur actually already provided some working fading code for FF6 but I just have not gotten the time to sit down, translate the ASM between dialetcts (bass and wla-dx have very different syntax), or implement it. I had been holding off on that as Madsiur had stated his intent to fork the project and PR a copy himself, though like me he has gotten rather busy.

It's far easier for me at the moment to find time to work on/test/fix bugs in the installer, as not only is coding the ASM a greater cognitive load (I still don't consider myself very familiar or confident with this stuff), but at this point there's so many issues to check for regressions on every time I make a change, and I can't really unit test a ROM hack.

But yeah, I'll definitely give it a look.

qwertymodo

  • *
  • Posts: 3
    • View Profile
What's the best way to send it to you privately?  I'm not posting my updates publicly until I get it into a more stable state where I'm actually ready to have people look at it (no point accepting the bug reports if I'm just going to tear it apart again).  I also have the full, mostly documented disassembly of the SPC code that MathOnNapkins sent me and I transcribed into a form that can be reassembled, which I found to be very helpful in debugging the last annoying issues I was dealing with (especially when it comes to volume and fading, there are actually four entirely separate volume variables, which was a HUGE help once I figured that out and how they interact, you only need to account for two of them on the SNES side for proper MSU-1 handling).  From what I understand, the SPC engine is VERY similar between CT and FFVI, so it should be relevant, even if not everything matches up 100%.

insidious611

  • *
  • Posts: 150
    • View Profile
You can email me. .

insidious611

  • *
  • Posts: 150
    • View Profile
An update here: crashes reported on V1.1 ROMs, improper patching also reported in installer on V1.1 ROMs, further testing is needed

insidious611

  • *
  • Posts: 150
    • View Profile
Just released Hotfix Four here (Click here for a direct link to the Windows 64-bit installer).

Fixes issues with 1.1 and Japanese roms, notably that the installer was allowing people to choose optional patches that would not work on these ROMs. The reported bug on 1.1 (freeze during/after battle) not present in testing without a combination of 1.1 and TWUE.

tl;dr: US V1.1 and Japanese ROMs should now work, but will not let you apply incompatible patches.

If you are already using Dancing Mad on a US V1.0 ROM, there is no reason to update.
« Last Edit: 2019-01-06 12:32:03 by insidious611 »

Ayoyo

  • *
  • Posts: 55
    • View Profile
Always thought myself a purist when it comes to FF music, but Roses and Wine mod for FF8 converted me. If the remaster/remix/cover or whatever is done at a similar tempo&style to the original, it's surprisingly refreshing to hear the old melodies brought to life with whole new vigor. Anyways that's why I'm here, and I was wondering if there's a comprehensive listing of included music and different versions anywhere? There's alot of faithful-to-the-original arrangements online that I would love to see whether any of them have found their way onto this mod.