brunovalads/yoshisisland-disassembly

Current master branch doesn't assemble

meat-loaf opened this issue · 9 comments

I can't assemble the ROM from the current master: the most recent revision that assembles to the hashes in the readme is 4cb3192. I am using a rather recent version of asar, but I tested with the version provided in the repository and seem to run into the same issue.

Thanks for pointing out!
What error do you get? It bank border breach at bank01.asm?

Yes. I'm currently working on a branch at the moment that fixes it up....it seems to have been introduced in commit c0b0502. I tested with a rebase commit to drop this commit and the following which yielded a bunch of other errors...I'm working on a branch now that picks the rest of the commits up until now (there are also some commits along the line that fail to maintain the integrity of the generated ROM image, as the checksums I get when picking some of them are not the same).
I'll issue a pull request when I get something working, if you like.

That would help! I have the bad habit of not assembling when I make/recieve a commit. I'm making some tests here too.

Ok, so I've had trouble getting something mergeable, as it seems some problems have been introduced in a variety of commits along the way. But I have this branch: https://github.com/meat-loaf/yoshisisland-disassembly/tree/meatloaf_build_fix
Which is messy, but starts at the last known good commit and cherry-picks along the way commits that don't fail the build for one reason or another and don't introduce incorrect changes (this branch actually builds and has the appropriate hashes).
I've another branch directly on top of master which reverts part of one bad change (specifically part of ef98aac) and adds a makefile to use to check the build: https://github.com/meat-loaf/yoshisisland-disassembly/tree/build_fix (e: ive updated this branch with some reversions and fixes, so it now builds but the hash is incorrect.)
It's the most I have time for for now, I will continue this when I can.

Nice, you found the same issues I did. But I guess we can adapt some things:

  • 728fab0 At $0BDAAB you can really spot those pointers, the only issue was a couple of pointers were swapped, and the address commented were wrong (not relevant for the build), here's my proposal;
  • 78a22e5 Can leave bank $0C as is, I prefer leaving the commented sound IDs as 8 bit since the sound queue can only handle 8 bit anyways.

Sure, I can fix that stuff. Bank $0C changes were likely a mistake, I'll clean up these things tomorrow.

I patched up the table in bank 0B as you proposed. However, pulling Bank $0C from the current master branch causes assembly to fail: I get a bank border crossing error (disassembly/bank0C.asm:15553: error: (E5032): A bank border was crossed, SNES address $0D0002. [db $FF,$FF,$FF,$FF,$FF,$FF,$FF])
I can't see why this file would assemble to be two bytes larger than the original, though.

assemble to be two bytes larger than the original

Try removing the last 2 bytes, assemble, and diff to the original to see where the mistake was.

Turns out the issue was caused by a stray comma at line 14614. It's patched up now.