mirror of
https://github.com/robmcmullen/asmgen.git
synced 2024-09-27 15:55:09 +00:00
optimization to save the X mod value -- it's the same for every row
This commit is contained in:
parent
b3a4a5b5b4
commit
6dfab0efb5
14
HiSprite.py
14
HiSprite.py
@ -410,10 +410,16 @@ class Sprite(Listing):
|
|||||||
self.asm("sta SCRATCH1")
|
self.asm("sta SCRATCH1")
|
||||||
self.asm("lda HGRROWS_L,x")
|
self.asm("lda HGRROWS_L,x")
|
||||||
self.asm("sta SCRATCH0")
|
self.asm("sta SCRATCH0")
|
||||||
self.asm("ldy PARAM0")
|
if row == 0:
|
||||||
self.asm("lda DIV%d_%d,y" % (self.screen.numShifts, self.screen.bitsPerPixel))
|
self.asm("ldy PARAM0")
|
||||||
self.asm("tay")
|
self.asm("lda DIV%d_%d,y" % (self.screen.numShifts, self.screen.bitsPerPixel))
|
||||||
return cycles + 4 + 3 + 4 + 3 + 3 + 4 + 2;
|
self.asm("sta PARAM2") # save the mod lookup; it doesn't change
|
||||||
|
self.asm("tay")
|
||||||
|
cycles += 3 + 4 + 3 + 2
|
||||||
|
else:
|
||||||
|
self.asm("ldy PARAM2")
|
||||||
|
cycles += 2
|
||||||
|
return cycles + 4 + 3 + 4 + 3;
|
||||||
|
|
||||||
|
|
||||||
def shiftStringRight(string, shift, bitsPerPixel, fillerBit):
|
def shiftStringRight(string, shift, bitsPerPixel, fillerBit):
|
||||||
|
Loading…
Reference in New Issue
Block a user