Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels in incbin math stopped working in Asar 1.9 #335

Open
RPGHacker opened this issue Oct 1, 2024 · 1 comment
Open

Labels in incbin math stopped working in Asar 1.9 #335

RPGHacker opened this issue Oct 1, 2024 · 1 comment
Labels

Comments

@RPGHacker
Copy link
Owner

From Yoshifanatic's Discord server:

Hey, something I just noticed, but asar 1.91 gives me error "Eno_labels_here" when I do this. This setup with incbin offsets allows me to handle game files that are stored across lorom bank boundries in cases where "check bankcross off" wouldn't make sense. This worked prior to asar 1.9, which is ironic considering asar 1.9 made static labels usable in more places.

incbin "SPC700/SPC700DataBlocks_SMAS.bin":!StartOffset..!StartOffset+(($010000-.Block3Start)&$00FFFF)

incbin "SPC700/SPC700DataBlocks_SMAS.bin":!StartOffset+(Section1_Block3End-Section1_Block3Start)..!EndOffset

I couldn't find this change documented anywhere. Is this something that we removed intentionally?

@RPGHacker RPGHacker added the bug label Oct 1, 2024
@RPGHacker
Copy link
Owner Author

A bit of additional context:

[...] This was taken from my Earthworm Jim 2 disassembly, with updated syntax. [...]

[...] some of my disassemblies do this because some game developers decided to put files at the end/start of two code banks to fill in what would otherwise be empty space. That's why "check bankcross off" is a bad idea in this context, since code could end up crossing a bank if the user moves the file. I can't think of a way to do this without labels, aside from hardcoding the address these files are inserted.

DATA_C1EC50:
	incbin "SPC700/DATA_C1EC50.bin":$00..($010000-DATA_C1EC50)&$00FFFF
.End:

CODE_C20000:
	incbin "SPC700/DATA_C1EC50.bin":DATA_C1EC50_End-DATA_C1EC50..$00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant