Here’s an ugly macro that took forever to write:
#define BLRange(pointer) "(pointer - CURRENTOFFSET - 4)>>1"
#define BL(pointer) "SHORT (((BLRange(pointer)>>11)&0x7ff)|0xf000) ((BLRange(pointer)&0x7ff)|0xf800);"
And here’s how you use it:
ORG (hook location)
BL(Hack_start)
...
ORG (other hook location)
BL(Other_hack_start)
...
ORG (hack location)
Hack_start:
#incbin "myhack.dmp"
Other_hack_start:
#incbin "otherhack.dmp"
Also you need to edit \Language Raws\Raw code.txt - make a copy of the BYTE code and rename it CODE. This is because the later versions of EA broke the #incbin function.
No longer do you have to keep track of where each ASM hack starts and ends, or keep updating the bl
calls every single time you add a few lines of code. I just made my life 100x easier with a single line
what do you mean no one else has this problem?