|
Post by Arkhan on Nov 20, 2019 19:17:22 GMT
The plot thickens.
Or depressens?
There's copious usage of #page() within MagicKit and such so you can't really reliably determine if ANY of the user areas are permanently usable.
maplibfunc uses 5, other stuff voluntarily uses 3/4, at least one thing uses 6.
These things all set/restore everything, so I cant really just reliably map the CD RAM bank into one of the pages and leave it there. It will fuck something up.
The bank switching overhead makes it so reading from VRAM directly is a better idea.
Even so, if I COULD leave it switched in, I think the setup to read from RAM ends up making it where it's not really any faster and might actually be slower than the VRAM read anyways, even with delays accounted for.
My cycle counts could be wrong though. It was 4am and the cake was wearing off.
I might be able to optimize the code some. You calculate the tile offset, but in RAM have to then multiply that by two since youre reading words and need to be at the right spot. That extra step of multiplying by two sucks even if you're using the zp registers to do the math.
when you read straight from VRAM, you don't have to do that. It's already read as words, so you can just use the tile offset as the spot to read from.
|
|