cvghivebrain / s1disasm

Sonic the Hedgehog (Mega Drive) Hivebrain 2022 disassembly
41 stars 8 forks source link

Align macro is still not fixed #1

Closed Awuwunya closed 2 years ago

Awuwunya commented 2 years ago

This has been a consistent issue with the Git disassembly for years now; The align macro is broken.

The expected behavior is:

    org $4000
    align $2000
    ; PC = $4000

However, with the align macro in this disassembly and the Git disassembly previously, this is what happens:

    org $4000
    align $2000
    ; PC = $6000

ASM68K, AS, and presumably other assemblers use the upper version, so any code written for them will possibly break for the Git disassembly. This is evident with AMPS in Sonic 1 (Git), where this broke Dual PCM beyond repair. Here is a fix I made to the macro itself.

cvghivebrain commented 2 years ago

Thanks, I've implemented your fix.