Skip to content

Conversation

@InsaneFirebat
Copy link

I was looking for examples of compatibility problems with xkas patches in asar and Benox50 pointed me here. After finding all the missing graphics (by temporarily reverting the "cleanup" commit that deleted them), I cleared up all of the errors asar mentioned.

You might not like the way I handled certain things, like creating _dup defines for adding two numbers that start with #. I didn't want to risk them being used somewhere else and messing something up. Feel free to make suggestions or changes. It does break xkas compatibility to do this, mostly because of the way paths are referenced between the two. Won't bother me if you'd rather not make that sacrifice.

@Quote58
Copy link
Owner

Quote58 commented Jul 5, 2023

Hi,
Sorry I'm only noticing this now!
I think it's very cool that you made this compatible with asar, and I'm surprised there wasn't more that had to be done tbh. I considered making it asar compatible when I was making it, but since I had written everything with xkas as the assumption back in the day, I just decided to leave it as it was and figured someone might make it compatible if they needed to.
I appreciate you doing so, but I think I will leave the original for xkas, in case anyone needs to use xkas still. This way there's a version available for either compiler.

@InsaneFirebat
Copy link
Author

I appreciate you doing so, but I think I will leave the original for xkas, in case anyone needs to use xkas still. This way there's a version available for either compiler.

This could be preserved by making a duplicate of the main branch and repointing this pull to it. I wouldn't expect much effort would be needed to keep it updated if new changes come along in the future.

@InsaneFirebat
Copy link
Author

Sean_D found a bug where a define with math resolved to an 8bit value when it needed to be 16bit. Adding a .w to the opcode forces 16bit.

@ShadowOne333
Copy link

I tried reworking @InsaneFirebat Asar source code to make compilation compatible with the latest Asar 2.0. Here's some of the things I've done so far:

  • Code/decompression.asm has its first "d" lowercase, it should be "Decompression.asm" for it to compile.
  • I also rewrote almost all of the rep opcodes from xkas to instead use proper for statements, which Asar now can use.
  • A lot of the !Labels are defined as #$XXXX, and then used inside db, dw, dl, etc., but those don't take #$XXXX, only $XXXX. What I did for these was create new definitions without the "!" and then overwrite the labels in db/dw to use those instead.

The code compiles, and I can go through Ceres just fine, but as soon as the ship cutscene finished, it seems to crash on me, I'm not sure what I might have done wrong, but here's the code either way:
ACID-engine.zip

Make sure to compile with the latest Asar 2.0 Beta for this:
asar.exe main.asm Super Metroid.sfc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants