Closed ZornsLemma closed 3 years ago
Looks good.
I suggest using address $08 on all platforms. It's a single, free address. $96 is free, but so is $97, so these might come in handy for a word value instead.
And write it just before $09 in the constant files.
And make sure the comment says it's a one-byte value.
Thanks Fredrik, I've pushed a commit to the same branch with those changes. I think this will give you the option to just click to pull the extra changes but if I need to raise a separate pull request just let me know.
By keeping the low byte of mempointer permanently zero and using the Y register to hold it instead, we can save (on a C64 VMEM build) five cycles in the "same page" case at the cost of one cycle in the "not same page" case.
If you accept this pull request, please double-check the zero page addresses I've chosen (marked with TODO: comments) are actually safe. I also just noticed the comment I added in constants-c128.asm incorrectly says mempointer_y takes 2 bytes; it should say 1 byte.