modify line.s to make it work if X_pos > X_end
This commit is contained in:
parent
f7d4a4e83f
commit
cd0a91b34e
3 changed files with 49 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -4,4 +4,5 @@
|
||||||
*.lst
|
*.lst
|
||||||
*.lst
|
*.lst
|
||||||
*.note
|
*.note
|
||||||
./build/*
|
*.lbl
|
||||||
|
build/*
|
||||||
|
|
|
@ -23,10 +23,23 @@ do_not_fix_y_end:
|
||||||
SEC
|
SEC
|
||||||
LDA X_end
|
LDA X_end
|
||||||
SBC X_pos
|
SBC X_pos
|
||||||
STA dx
|
BCS dx_no_underflow;; X_end >= X_pos
|
||||||
BCC dx_no_underflow;; X_end >= X_pos
|
|
||||||
EOR #$ff ; Fix bit underflow
|
EOR #$ff ; Fix bit underflow
|
||||||
|
STA dx
|
||||||
|
;; line_* expect X_pos < X_end and now its not the case.
|
||||||
|
;; Lets move them around
|
||||||
|
LDX X_pos
|
||||||
|
LDY X_end
|
||||||
|
STX X_end
|
||||||
|
STY X_pos
|
||||||
|
LDX Y_pos
|
||||||
|
LDY Y_end
|
||||||
|
STX Y_end
|
||||||
|
STY Y_pos
|
||||||
|
|
||||||
|
|
||||||
dx_no_underflow:
|
dx_no_underflow:
|
||||||
|
STA dx
|
||||||
SEC
|
SEC
|
||||||
LDA Y_pos
|
LDA Y_pos
|
||||||
SBC Y_end
|
SBC Y_end
|
||||||
|
|
|
@ -98,4 +98,36 @@ long_line_test_b:
|
||||||
LDA Y_pos_
|
LDA Y_pos_
|
||||||
CMP #$ff
|
CMP #$ff
|
||||||
BNE @loop
|
BNE @loop
|
||||||
|
|
||||||
|
clear_screen__:
|
||||||
|
;;Paint the bitmap black. More bitmap: https://www.c64-wiki.com/wiki/53272, https://www.c64-wiki.com/wiki/Screen_RAM#Moving_of_screen_RAM
|
||||||
|
Mov_16 A_start, A_start + 1, #<VIC_bank, #>VIC_bank
|
||||||
|
Mov_16 length, length + 1, #<$1f40, #>$1f40
|
||||||
|
LDA #$00
|
||||||
|
jsr memset
|
||||||
|
|
||||||
|
long_line_test_b_pos_end_swapped:
|
||||||
|
LDA #$00
|
||||||
|
STA X_end_
|
||||||
|
LDA #$00
|
||||||
|
STA Y_end_
|
||||||
|
LDA #$ff
|
||||||
|
STA X_pos_
|
||||||
|
LDA #$60
|
||||||
|
STA Y_pos_
|
||||||
|
@loop:
|
||||||
|
LDA Y_end_
|
||||||
|
STA Y_end
|
||||||
|
LDA X_end_
|
||||||
|
STA X_end
|
||||||
|
LDA X_pos_
|
||||||
|
STA X_pos
|
||||||
|
LDA Y_pos_
|
||||||
|
STA Y_pos
|
||||||
|
jsr line
|
||||||
|
INC Y_end_
|
||||||
|
LDA Y_end_
|
||||||
|
CMP #$ff
|
||||||
|
BNE @loop
|
||||||
|
|
||||||
.endscope
|
.endscope
|
||||||
|
|
Loading…
Add table
Reference in a new issue