Memblers
Memblers
> If you replace `rand16()` with e.g. a constant `1`, does the inefficiency go away? Good question, yeah it becomes a simple DEX / BNE in that case. > Maybe...
I'm also now noticing there's more inefficiency in the end of this same loop. Same code as linked above: https://godbolt.org/z/rdoaaqheG ``` ldx mos8(.Lmain_zp_stk+2) ; 1-byte Folded Reload dex stx mos8(.Lmain_zp_stk+2)...
I tried a copy/paste of the loop in question, so it runs another copy of that loop. The first copy does the unoptimized X register stuff, and the second copy...
If the value being read is for CMP status flag changes only and discarded afterwards, it seems like CMP can become the second read. Perhaps in a later optimization pass?...
I was able to find a couple different issues also: Baseball (goes straight to gameplay, skipping title screen) Ikari Warriors (high pitched tones throughout audio) Burgertime (displays black screen) Choujikuu...