-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fading needs to be implemented. #5
Comments
This NMI stuff is honestly kind of over my head. So I really need help with this, especially given how limited my time is as of late. Below is the provided code from the Qhimm/RHDN user Madsiur. Thanks again for your help. 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 |
Was looking around at various bugfix patches for FFVI, and spotted this one: I figured if you have to play with the NMI's to get fading working, this bugfix patch might be necessary to include (testing would be needed to see if your NMI changes trigger this bug). |
I am not sure if this is still on your mind.
So hook at $c1/0BB7 You furthermore need these two flags (instead of 7f/fffX you can of course use any free ram): 7FFFF3: fade flag. This one is set through ingame commands, hook there and give it a value. E.g.: 01: fade out, 02: fade full MSU code:
When fade command is executed ingame hook there (some value is written to $214x or some ram (e.g., Zelda, ALTTP the fade commands were F1-F3 to $2140)). Additional nmi hook:
If you experience problems, pm me at zeldix ;) |
I'm unsure how helpful any of this very, very basic information is going to be. I'm aware of all of it, and other people have tried. The issue is that the NMI for FF6 does not really have the room for a routine like the above. Attempting to fit said causes graphical or input issues or freezing as code that should have been executed during NMI leaks outside of vblank. |
Is this still an issue? If you want I could try to help you... but I have problems with compiling and understanding your code. But the reason why it didn't work in the past hooking the nmi is probably that you need to execute the nmi hook in ram: I'd hook here: At the boot of the rom you need to write the nmi-handler code into ram. I do not know where free ram is but 7e5000 looks good. So, at 0x3138F ($C3/138F): SEP #$20 : LDA $4210 I'd hook to unused ram block Write the nmiHandler code for fading you need to execute in ram to some free space, e.g., 0x12fe00 Now the trick is to transfer this code block at 0x12fe00 ($D2/FE00) to ram $7e5000. You can hook somewhere when the rom boots and write this code: PHB If you execute the nmi handler in ram should solve the problem, I e.g. had a similar problem in star fox. |
This is the bug that is currently the biggest blocker for release. Fading would need to be done during the NMI, and while I have code to hook the NMI I have not, as of the current done any further code as far as tracking fading.
A user on Qhimm has provided a potential NMI routine for this but I have not had the chance to test it. He claimed it caused hangs/lag.
The text was updated successfully, but these errors were encountered: