Closed edale2 closed 6 years ago
RotDS = http://rotds.webs.com/
I think.
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.
Still don't understand what he's talking about, lol. But more info!
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
On Sat, Mar 17, 2018, 11:01 PM edale2 notifications@github.com wrote:
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.
Still don't understand what he's talking about, lol. But more info!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Insidious611/DancingMadFF6/issues/71#issuecomment-373969233, or mute the thread https://github.com/notifications/unsubscribe-auth/AASag_sSC0F3AxNr-YjH91245biQz5THks5tfc4MgaJpZM4Su_ge .
I'd be willing to test it on my hardware.
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).
So sayeth Madsuir.
Okay so, here's the problem I'm having ATM. The $18FA72 thing is not something I'm hardcoding, but something created by the way the wla-dx assembler works. Specifically, we're looking here:
.BANK 18
.ORG $FA72
.SECTION "MSU" SIZE 1422 OVERWRITE
Another problem is that it's not "$18FA72", it's "$12FA72", the bank number is in decimal.
So if I add C0 to that, we get D2 or decimal 210.
Which ends up with this:
$ make
Cleaning up...
Creating linker directives...
Assembling...
Pass 1...
ff3msu.asm:101: DIRECTIVE_ERROR: ROM banks == 48, selected bank 210.
ff3msu.asm:101: ERROR: Couldn't parse ".BANK".
If I were to instead use "D8", I get this:
Cleaning up...
Creating linker directives...
Assembling...
Pass 1...
ff3msu.asm:101: DIRECTIVE_ERROR: .BANK number must be zero or positive.
ff3msu.asm:101: ERROR: Couldn't parse ".BANK".
make: *** [Makefile:37: ff3msu.obj] Error 1
I'm sure there's something simple here I'm missing but I don't know of any way to actually make wla-dx use the kind of notation Madsiur is talking about.
Ok, I figured it out.
What you do is at the beginning of the file, after you set up the ROM mapping, you do either .BASE $80 or .BASE $C0 to use fastrom/hirom notation. This adds that number to whatever banks you need.
So using ".BASE $C0" fixed my code afaict. Jumps are now going to $D2xxxx instead of $12xxxx in bsnes-plus.
If the people who want to test could please test the ff3msu.ips in commit 6b81b9d0d91efccd0be6c4daef0dfa73de7ed691 I'd be grateful.
Will make a Hotfix Three release once I'm sure this isn't breaking anything for anyone.
Will test on my sd2snes this week.
Surprised you put this on the master branch, instead of creating a new one.
Ehh, I was considering it but it's such a small change codewise that it's almost not worth the overhead of a new branch. It's easy as hell to revert if needbe.
Any updates on testing of this fix?
For now I'm closing this unless someone notices issues, as my own testing has shown this bug to be squashed without any negative consequences.
This was posted by Madsiur over on the Qhimm Forums:
This is beyond what I know anything about, so passing it along.