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

xenokain

  • Cool newbie
  • *
  • Posts: 61
  • Karma: 2
    • View Profile
Excited for this one also.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
My Dancing Mad fix is currently causing a very odd bug wherein a certain random track is being played instead of silence in certain other moments of the game, so I'm trying to track that one down but it's so far eluding me. Figured I'd update you all on progress however.

So far my hunch is it has something to do with how I'm overwriting certain code and it's not quite... clean, and I'm causing certain CPU flags to be set that shouldn't be, etc.
« Last Edit: 2016-04-08 05:35:31 by insidious611 »

RetroDan™

  • Fast newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
There seems to have been some updates since, but there doesn't seem to be an .exe for the current (newest?) Alpha, only a .py file...which I can't bloody figure out how to use.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
I haven't yet fully updated the Installer, therefore I haven't created a new EXE for it.

I'm still working on trying to figure out the weird bugs with trying to get the final boss music working.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Alright, I have *finally* got the Dancing Mad parts 1-3, and thus the final battle, 100% working without causing any bugs (that I've found so far anyway) in the rest of the game.

I am going to do some more testing over the next few days, get the Installer 100% working again, test that for a bit, and then at some point after that the open beta should be released. I am not one to give or guarantee release dates, but Soon(TM).

When I do release the open beta, I ask you all to please remember what "beta" means. This will probably have many bugs I and the handful of closed testers have not yet found. It's your job to find them, and give me detailed reports of what caused them. It is not your job to expect a 100% finished product or to complain about this that or the other if it's not a bug, or to give bug reports that are short and unhelpful such as "It doesn't work".
« Last Edit: 2016-06-01 17:41:42 by insidious611 »

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
As we get closer to Open Beta release I'm going to try to give regular updates on my progress. Today I went over the code for the installer, fixed a few minor bugs, and began to set up my environment so that I can turn it into an exe (It's been a while since I've done this so I did not have the correct python packages installed).

Since the last time I did this, Python 3.5 has come out, which requires Windows Vista or newer. For now, I'm sticking with Python 3.4 for the installer as I want this hack to be installable on Windows XP, but I figured I should let you guys know as eventually I may be forced to switch to 3.5.

Covarr

  • Covarr-Let
  • Administrator
  • No life
  • *
  • Posts: 3919
  • Karma: 115
  • The Great Redarr.
    • View Profile
Will you be releasing a python-only non-exe version also? I don't need it myself, but I think it'd come in handy for Linux and Mac users.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Absolutely. Though Linux/Mac users should keep in mind that for that, PyQt5, PyCurl, and python-ips are mandatory dependencies. (The last is usually installable via pip, the first two are usually downloadable via a normal package manager or so)

On Windows these are included with the EXE so there's no worries there.
« Last Edit: 2016-06-02 15:40:31 by insidious611 »

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
The installer has been updated and re-packaged. There was a little bug in the packaging process, which I am doing some testing in order to make sure I've corrected.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
WE HAVE HIT OPEN BETA

Assuming I've got everything properly working, the open beta should now be publically available from https://bitbucket.org/insidious611/dancingmad/downloads/DancingMadInstaller.exe

Linux/OSX users please download from https://bitbucket.org/insidious611/dancingmad/downloads/DancingMadInstaller.tar.xz . Linux/OSX users please remember that PyQt5, PyCurl, and python-ips are necessary dependencies for this installer on your platform. Windows users just grab the exe, you don't need anything special installed.

Please read the readme given in the installer thoroughly. Please report any bugs in the issue tracker here: https://bitbucket.org/insidious611/dancingmad/issues but please keep in mind any bugs that have already been reported.

To summarize some bits found in the readme:

You will need Higan v097 or newer, bsnesplus v073+2 or newer, or an SD2SNES to enjoy this romhack. As far as I'm aware, Higan v097 and newer is the only platform which currently has "resume support", ie, the ability to resume the area music after the conclusion of a battle. SD2SNES will likely gain this support soon.

You will need an unmodified, US v1.0 copy of Final Fantasy III for this romhack. Japanese versions and US v1.1 will be supported at some point in the near future. SMC header stripping is included as part of the installer, but for safety's sake I would suggest using unheadered copies of the ROM.

You will need a reliable internet connection to run the installer. It will download a *considerable* amount of raw PCM audio files from a remote server. If this server is down the installer may crash or otherwise fail. If the installer fails, please contact me. I'll guide you on how to retrieve the install log and give it to me for analysis.

Please, please, *please* if you are going to make a bug report make it as detailed as possible, leave nothing out. Please do not report already known bugs (the issue tracker is there for a reason.)
« Last Edit: 2016-06-03 21:00:22 by insidious611 »

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Just so people are aware, there's currently a bug on the SD2SNES that we're attempting to fix. Head to https://bitbucket.org/insidious611/dancingmad/issues/13 if you want to see the gory details but in general just be aware that I know of this bug and am doing my best to track down the cause and fix it.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
The bugs are partially SD2SNES firmware bugs. Ikari is helping a great deal in this regard and I am very grateful for the assistance. A new version of the patch with basic workarounds in place is available as an IPS here. SD2SNES users, apply this patch to an *unmodified, original* FF3 US v1.0 rom, and replace ff3msu.sfc with it. Other users, the known bugs are simply not applicable to you. Continue to use the official beta. Whether or not this IPS patch becomes part of a second beta release depends on how quickly new versions of the SD2SNES firmware come out and whether or not these workarounds are necessary or beneficial on the new firmware. IOW, consider this a "stopgap" solution.

Madsiur

  • Fast newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
I'm really stoked by the progression of this project!

I had a look at your tracker and the Figaro bug intrigued me. I have little knowledge of bank $C5 code, but know fairly well event stuff. I can't tell if it's the exact cause of the bug, but the flashback event use command $F2 (fade out) and $F3 (resume from pause). Note that the resume command has two jumps to $C50004 and it seems in both command $1301 plays another role than song ID (I'm 100% sure $EB is a fade in/out speed). Maybe the code will help you understand. I can't suggest anything to change in bank $C5 to cover those cases.
Code: [Select]
Fade out current song with speed xx (higher == slower)
(gen. act. F2)
C0/B811: A981    LDA #$81 ;spc command (fade in/out?)
C0/B813: 8D0013  STA $1300
C0/B816: A5EB    LDA $EB ;fade out value (from event code)
C0/B818: 8D0113  STA $1301 ;NOT the song ID
C0/B81B: 9C0213  STZ $1302 ;goal volume (0)
C0/B81E: 220400C5 JSL $C50004 ;play the song (fade out)
C0/B822: A902    LDA #$02
C0/B824: 4C5C9B  JMP $9B5C

Continue song that was previously paused, xx is fade in speed
(gen. act. F3)
C0/B827: A910    LDA #$10 ;expected command is $10 when silence (or no song?) is currently playing like after a fade out
C0/B829: 8D0013  STA $1300
C0/B82C: AD0913  LDA $1309 ;previous song
C0/B82F: 8D0113  STA $1301 ;store as song ID to play
C0/B832: 8D801F  STA $1F80 ;store as current song in SRAM
C0/B835: 9C0213  STZ $1302               ;initial volume (0)
C0/B838: 220400C5 JSL $C50004 ;maybe this just restart the song before the fade in?
C0/B83C: A981    LDA #$81 ;spc command (fade in/out?)
C0/B83E: 8D0013  STA $1300
C0/B841: A5EB    LDA $EB ;fade in speed (from event code)
C0/B843: 8D0113  STA $1301 ;NOT the song ID
C0/B846: A9FF    LDA #$FF ;goal volume (full)
C0/B848: 8D0213  STA $1302     
C0/B84B: 220400C5 JSL $C50004 ;play the song (fade in)
C0/B84F: A902    LDA #$02
C0/B851: 4C5C9B  JMP $9B5C

Finally if you plan on implementing the fade in/out feature during NMI, "adding more than ~70 cycles will start causing major graphic glitches" (quoting a hacker that modified the routine for other purpose). FF3 NMI is pretty tight. You may check if someone like mlarouche has a similar implementation in one of his hack. Thank you so much for making your ASM file and code public! I'll have a better look at it this week!
« Last Edit: 2016-06-27 02:06:59 by Madsiur »

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Hey, always glad to have another eye on the code. And thanks so much for the commented disassembly, this may help, even if just in implementing a single-case workaround.  This project has been literally my first time doing anything serious in ASM, and my first time doing anything with the SNES, so the more the merrier as far as eyeballs. Feel free to submit a patch if you've got a really clever idea.

I've already tried messing with the NMI a little, and yeah, it's *really* tight, and I feel like I'm nowhere near good enough at optimization to touch that atm. I've tried with a variation of mlarouches code and got massive corruption, so clearly CT is much looser as far as how much "extra time" you have during the NMI.

RetroRGB just put up a video he did with an interview with RetroDan, great stuff, really intriguing to watch. It mentioned this project in a couple spots and I'd like to clarify one thing. RetroRGB asked Dan when we were planning for release, and Dan (correctly) stated there's no real planned release date. But I'd like to explain in more detail my thought process as regards a "release".

I kind of cut my teeth programming wise in the open source community. In this community, the concept of the "perpetual beta" is an accepted if sometimes joked about thing. The idea that it'll reach 1.0 when it's perfect, but it's never perfect.

Basically what I'm saying is, don't hold out for a "final release" to try this puppy out, because you might be in for the long haul. I've still got fading, properly timing the the Opera, and even implementing the PSX FMVs to tackle (Something I have to admit I'm terrified about because I've read bits on different wikis about how SNES graphics programming works 3 times and still don't have a clue what's going on). None of these are what I would consider 100% important to enjoying this hack right now, but all of which I would consider necessary for a "1.0".

« Last Edit: 2016-07-03 12:29:25 by insidious611 »

Madsiur

  • Fast newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
Hey, always glad to have another eye on the code. And thanks so much for the commented disassembly, this may help, even if just in implementing a single-case workaround.  This project has been literally my first time doing anything serious in ASM, and my first time doing anything with the SNES, so the more the merrier as far as eyeballs. Feel free to submit a patch if you've got a really clever idea.

I will look into this soon. There are other uses of this event command but I'm not sure if it would affect the song selection elsewhere in your MSU-1 hack.

I've already tried messing with the NMI a little, and yeah, it's *really* tight, and I feel like I'm nowhere near good enough at optimization to touch that atm. I've tried with a variation of mlarouches code and got massive corruption, so clearly CT is much looser as far as how much "extra time" you have during the NMI.

I've never messed with NMI but using an unused RAM variable during the event code to store the fading (0 = song isn't fading, 1 = fade song) and checking the actual volume (0 = fade up to max, max = fade down to 0) *might fit* during NMI. I guess the only way is to try it. That's something that interest me enough to pass some time on it. I'll report back in a week or two.

As for a perpetual beta phase, that's ok as long as there is room for improvement. There can't be a definitive version since more orchestral remix or enhanced OST might see the light of the day sooner or later. Your project has interested quite a few people that have a FF6 hack in development in hope of implementing their own hi-quality OST.

Gotmilk751

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 1
    • View Profile
Hey all! Wanted to report my successes, as well as some bugs.

First off, I got the hack working and am happy to report that it works near perfectly on its own, as well as patched together with Rodimus Primal's Ted Woolsey Uncensored retranslation patch. No errors so far caused by using them together.

I have, however, hit a wall. I chose to use the "Other" selection for the Opera sequence and now the game softlocks at the part where the player is meant to select the correct line in the song. Once the line is selected, Celes walks forward and the game freezes, but the music keeps playing until the whole song has finished then just hangs forever. This is both with and without the retranslation patch, so I think it's the song selection.

Will there be any way in the future to change songs out without reinstalling the hack every time? It'd be nice to not have to sit through a long installation every time I want to change only one or two songs.

Other than that bug, no complaints here! I know it's a beta, so I expected to bump into something, just thought I'd report it.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Well, the thing is, changing the songs requires redownloading them, so pretty much guaranteed you're not going to cut much off the install time.

That said, I do plan on releasing an updater, which will also function as a way to change which songs you have selected.

Please report bugs on the issues tracker in future. https://bitbucket.org/insidious611/dancingmad/issues/

It's really good to have someone who's actually tested the opera scenes though. I was expecting trouble. I'll probably just use the SPC for those in the next version of the patch, because it's probably a timing bug and frankly the amount of fiddling that'd be necessary to get the timing right in that scene... I'd basically have to rewrite the whole thing from scratch I'm pretty sure.


EDIT: To elaborate and get into some technical details: The bit where it's freezing is likely where Celes is supposed to "sing" the words, which probably relies on direct calls to the SPC to do its dirty work, and thus relies on the proper track to be playing on the SPC. The only workaround I could think of that would allow the MSU-1 stuff to play without me having to significantly change the game's behavior would be to mute or significantly quiet the SPC but still have it playing, on top of the MSU-1 music, during that bit. But you wouldn't actually be able to hear Celes singing.


EDIT EDIT: Also, good to know that it works with the retranslation patch!
« Last Edit: 2016-07-23 06:05:30 by insidious611 »

Gotmilk751

  • Fast newbie
  • *
  • Posts: 10
  • Karma: 1
    • View Profile
Ah ok. I wasn't aware of the bug tracker, my apologies. I'll report there if I find anything in the future. I am happy to hear I helped a bit though! I actually haven't been able to play lately but I'll likely just play on a different version of the game until after the Opera scene so I can continue.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Thanks to the flexible nature of the MSU-1, you should be able to continue by removing the opera tracks from your folder... Give me a second to look up which ones those are...

EDIT: assuming you're using Higan, delete

track-38.pcm
track-39.pcm
track-65.pcm
track-66.pcm
track-67.pcm
track-68.pcm
track-69.pcm

from Emulation\Super Famicom\ff3msu.sfc\

If you're using the SD2SNES iirc they'll be named either ff3-38.pcm etc or ff3msu-38.pcm etc. Same numbers, delete them.

This will trigger the MSU-1 to return "badtrack" for these files, which will make it default to SPC music.

I'll be modifying the installer soon to temporarily cause the "Other" versions of these tracks to not be downloadable/selectable, until a solution to this issue can be found.
« Last Edit: 2016-07-25 21:12:31 by insidious611 »

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Currently testing an installer that has the Figaro/Sabin workaround (see https://bitbucket.org/insidious611/dancingmad/issues/16/incorrect-track-is-called-in-figaro-castle) and the current Opera workaround (which reverts to SPC for the opera tracks) (see https://bitbucket.org/insidious611/dancingmad/issues/6/opera-tracks-may-not-be-implemented). If this works, this installer will be bundled up as Beta 2.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Beta 2 is out

This is a minor bugfix release. Changes include:

* Removal of unnecessary requests to Track 0 for MSU-1.
* Workaround for Figaro->Sabin->Figaro bug.
* Workaround for Opera track issues (Opera tracks reverted to SPC)
* Credits section in Readme

As always, download here

WhiteShadow11

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 2
  • You are free.
    • View Profile
Hello,

Started playing FF6 a couple of days ago, discovered Ted Woolsey Uncensored Edition Hack that fixes pretty much everything in the game and now this amazing Audio Mod :D , the game keeps getting better and better.

I am using a different emulator to play, Snes9x+MSU x64 and so far the only bug I have found is when an event plays out, the music that was playing doesn't restart, I need to get out of the scene to get music again. For example scene music is playing, my char goes to sleep *sleep music* then when the he wakes up no music is playing.

I am really glad I found this mod, I was getting tired of the midi's songs :x
Thanks to you I will be able to finally play this amazing game with amazing music until the end.

Madsiur

  • Fast newbie
  • *
  • Posts: 5
  • Karma: 1
    • View Profile
I'm not sure if you saw my post on RHDN but I tried a few weeks ago to implement fade in/out with result of some lags on the dungeons or town maps. I've used CT fading routine bt with some extra stuff that was not necessary I think. A simplified version of the MSU-1 update loop could look like this. I think it worth a second try, but I don'T think I'll have the time really soon to test it:

Code: [Select]
php
rep #$20
pha
lda fadeCount
beq .CallNMI
dec
sta fadeCount
clc
rep #$20
lda fadeVolume
adc fadeStep
sta fadeVolume
sep #$20
lda fadeVolume+1
sta MSU_AUDIO_VOLUME

.CallNMI:
rep #$20
pla
plp
jml $001500

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Just wanted to say a couple things, one, I am still working on this when I have time, I've had a bunch of new obligations come into my life since the last time I posted which is why things went a bit quiet for a while. Still working on the fading code based on Madsiur's work above, and still appreciate any help people can bring in on the ASM side. :)

The second is, the installer will currently fail to download songs due to issues with my domain provider, this will be fixed within the week but if anyone is trying to install right now and wondering why it won't work, that's why.

insidious611

  • Crazy poster
  • *
  • Posts: 117
  • Karma: 3
    • View Profile
Just an update, the DNS issue should be fixed and the installer should be working properly now. Sorry for any inconvenience.