Compare commits
No commits in common. "bbf12a7ba26fff74bfa470ed7fd114af65a3ff85" and "d9fe32e8f3b81af6a18873cb811bff4ce8177b69" have entirely different histories.
bbf12a7ba2
...
d9fe32e8f3
4 changed files with 13 additions and 12 deletions
|
@ -43,6 +43,9 @@
|
|||
Add_16 >D, <D, #$ff, #$01, !
|
||||
Sub_16 >D, <D, dx, #$00
|
||||
|
||||
jsr pixel_draw ;;only used first pixel. after this relative position is abused
|
||||
LDX X_pos
|
||||
|
||||
selfmod:
|
||||
;; Self modifying code. Makes LDA and SBC instructions each take 1 cycle less.
|
||||
;; You can remove this if you run the loop without # at dy_2 and V.
|
||||
|
@ -63,9 +66,7 @@ selfmod:
|
|||
LDA <V
|
||||
STA case_1 +7
|
||||
end_selfmod:
|
||||
LDY #$01
|
||||
JSR pixel_draw ;;only used first pixel. after this relative position is abused
|
||||
LDX X_pos
|
||||
|
||||
for_x:
|
||||
;; Paints A to address in |btp_mem_pos* + Y|
|
||||
;; Y is pixel position in the chunk. Therefor it may be that Y = 0, 1, 2, 3, 4, ,5 ,6 ,7.
|
||||
|
|
|
@ -39,7 +39,7 @@ selfmod:
|
|||
LDA <V
|
||||
STA case_1 +7
|
||||
end_selfmod:
|
||||
LDY #$01
|
||||
|
||||
jsr pixel_draw
|
||||
LDX Y_pos
|
||||
for_y:
|
||||
|
|
|
@ -36,13 +36,12 @@ selfmod:
|
|||
LDA <dy_2
|
||||
STA case_2 +7
|
||||
LDA >V
|
||||
STA case_1 +3
|
||||
STA case_1 +1
|
||||
LDA <V
|
||||
STA case_1 +9
|
||||
STA case_1 +7
|
||||
end_selfmod:
|
||||
|
||||
jsr pixel_draw
|
||||
LDY #$01
|
||||
Sub_16 >btp_mem_pos, <btp_mem_pos, #$01, #$00 ;; Y has always a offset of at least 1
|
||||
LDX X_pos
|
||||
for_x:
|
||||
LDA byte_to_paint
|
||||
|
@ -61,12 +60,13 @@ increment_pixel_x_end:
|
|||
BEQ end
|
||||
Lag_16 >D, <D, #$00, #$02, case_2
|
||||
case_1:
|
||||
Sub_16 >D, <D, #>V, #<V,!
|
||||
Sub_16_A >D, <D, #>V, #<V, !
|
||||
decrement_y_pos:
|
||||
DEY
|
||||
CPY #$ff
|
||||
BNE for_x
|
||||
move_8px_up:
|
||||
LDY #$08
|
||||
LDY #$07
|
||||
Sub_16 >btp_mem_pos, <btp_mem_pos, #$40, #$01, !
|
||||
jmp for_x
|
||||
decrement_y_pos_end:
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
LDA <V
|
||||
STA case_1 +7
|
||||
end_selfmod:
|
||||
LDY #$01
|
||||
|
||||
jsr pixel_draw
|
||||
LDX Y_pos
|
||||
for_y:
|
||||
|
|
Loading…
Add table
Reference in a new issue