yoshisisland-disassembly icon indicating copy to clipboard operation
yoshisisland-disassembly copied to clipboard

Current master branch doesn't assemble

Open meat-loaf opened this issue 1 year ago • 5 comments

I can't assemble the ROM from the current master: the most recent revision that assembles to the hashes in the readme is 4cb3192211f3369c96bede56907e7ea139b2dc2e. 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.

meat-loaf avatar Oct 11 '22 00:10 meat-loaf

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

brunovalads avatar Oct 11 '22 02:10 brunovalads

Yes. I'm currently working on a branch at the moment that fixes it up....it seems to have been introduced in commit c0b05024f5a0d984569a9b8511d84cfc2890eee5. 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.

meat-loaf avatar Oct 11 '22 02:10 meat-loaf

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

brunovalads avatar Oct 11 '22 02:10 brunovalads

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 ef98aaceb6f64327ac3fdccee3cd4b8ecea59b27) 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.

meat-loaf avatar Oct 11 '22 03:10 meat-loaf

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

  • 728fab0aa37c903c1226ed2ae9dfbe92703d3fbe 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;
  • 78a22e5d07b649952a0d4b9bb264312b8975a62f 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.

brunovalads avatar Oct 12 '22 17:10 brunovalads

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

meat-loaf avatar Oct 14 '22 03:10 meat-loaf

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.

meat-loaf avatar Oct 15 '22 16:10 meat-loaf

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.

brunovalads avatar Oct 15 '22 19:10 brunovalads

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

meat-loaf avatar Oct 15 '22 20:10 meat-loaf