User Tools

Site Tools


base:20-pixel_sprite_interleave

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
base:20-pixel_sprite_interleave [2020-10-15 14:42] raistlinbase:20-pixel_sprite_interleave [2020-10-15 14:45] raistlin
Line 69: Line 69:
 </code> </code>
  
-What matters to us here is the cycle count between our first write to the sprite values and our last. So that's 7x2 + 7x4 = 42. To reduce this, we can use the illegal opcode, SAX:-+What matters to us here is the cycle count between our first write to the sprite values and our last. So that's 7x2 + 7x4 = 42 cycles. To reduce this, we can use the illegal opcode, SAX:-
  
 <code> <code>
       LDA #64 + 4       LDA #64 + 4
-      LDX #fb +      LDX #$fb 
-      SAX ScreenAddr + $3f8 + 0; <-- SAX will write A&X .. ie. 64 in this case (we mask out bit 2)+      SAX ScreenAddr + $3f8 + 0; <-- SAX will write "A & X.. ie. 64 here
       STA ScreenAddr + $3f8 + 4       STA ScreenAddr + $3f8 + 4
       INX       INX