Fix output of incbins for SN64#445
Fix output of incbins for SN64#445ethteck merged 3 commits intoethteck:mainfrom galaxyhaxz:sn64_incbin_fix
Conversation
Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
|
I just noticed you are using modern-asn64. The main advantage of it is being able to not deal with the SN64 assembler's weirdness. In that case you should use other compiler setting in your splat yaml (like |
I actually already do that--I use KMC but override the labels to be Trying to use SN64 instead of KMC forces the SN64 |
|
|
Ah I see now! That makes sense why these macros are added via the script: However, the fix in this PR should still be applied IMO because it ensures it works without having to resort to a macro should you actually use SN64's defaults or .global manually specified. (And thanks to all your work on Rocket Robot on Wheels, btw, for which the pipeline has largely created a framework for dealing with SN games lol) |
|
Two more fixes. The first emits a label for incbin data end points (i.e. |
Yeah, agreed since the incbin segments wouldn't work when using the SN64 preset otherwise. These changes also line up with how splat turns on the corresponding functionality in spimdisasm. |
ASN64 requires labels to be used for globals in order to access them, which by default, are not generated for text/(ro)databins. It is however generated for regular code, as shown here. I simply mimicked the same logic for the incbin generation. With this fix, an SN64 rom can now be split and reassembled to bin exactness without any manual changes done to splat's output, via
modern-asn64.Before:
After: