From 89011655476985ef3a1d4ed19209b05923f7801f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 26 Sep 2020 14:31:12 +0200 Subject: [PATCH] Added missing fragment. Closes #515 --- .../cache/fragment-cache-csg65ce02.asm | 2 +- .../cache/fragment-cache-mega45gs02.asm | 286 +++++++++--------- .../fragment/cache/fragment-cache-mos6502.asm | 2 +- .../cache/fragment-cache-mos6502x.asm | 119 +------- .../cache/fragment-cache-wdc65c02.asm | 2 +- .../vwum1=pwuc1_derefidx_vbuxx_rol_2.asm | 8 + .../vwum1=pwuc1_derefidx_vbuxx_rol_3.asm | 10 + .../vwum1=pwuc1_derefidx_vbuxx_rol_4.asm | 4 +- .../vwum1=pwuc1_derefidx_vbuyy_rol_2.asm | 8 + .../vwum1=pwuc1_derefidx_vbuyy_rol_3.asm | 10 + .../vwum1=pwuc1_derefidx_vbuyy_rol_4.asm | 4 +- src/test/ref/line-anim.asm | 4 +- src/test/ref/line-anim.log | 52 ++-- 13 files changed, 215 insertions(+), 296 deletions(-) create mode 100644 src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_2.asm create mode 100644 src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_3.asm create mode 100644 src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_2.asm create mode 100644 src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_3.asm diff --git a/src/main/fragment/cache/fragment-cache-csg65ce02.asm b/src/main/fragment/cache/fragment-cache-csg65ce02.asm index ea78e5d26..88ab8352b 100644 --- a/src/main/fragment/cache/fragment-cache-csg65ce02.asm +++ b/src/main/fragment/cache/fragment-cache-csg65ce02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 185628ba62 185628d2c2 +//KICKC FRAGMENT CACHE 17f3bfb106 17f3bfc988 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mega45gs02.asm b/src/main/fragment/cache/fragment-cache-mega45gs02.asm index f4e3d642b..f3781c344 100644 --- a/src/main/fragment/cache/fragment-cache-mega45gs02.asm +++ b/src/main/fragment/cache/fragment-cache-mega45gs02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 185628ba62 185628d2c2 +//KICKC FRAGMENT CACHE 17f3bfb106 17f3bfc988 //FRAGMENT _deref_pbuc1=vbuc2 lda #{c2} sta {c1} @@ -1278,11 +1278,153 @@ cpz #{c1} bne {la1} //FRAGMENT vbuaa=vbuzz tza +//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 +inc {c1} //FRAGMENT vwuz1=vbuc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 +//FRAGMENT _deref_pbuc1_eq_vbuz1_then_la1 +lda {c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} +//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 +ldx {z1} +inc {c1},x +//FRAGMENT vwuz1=vwuc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT vbuz1=_lo_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=_hi_vwuz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT _deref_pwuc1=vwuc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT _deref_qbuc1=pbuc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT _deref_pbuc1_eq_vbuaa_then_la1 +cmp {c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa +tax +inc {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx +inc {c1},x +//FRAGMENT vbuaa=_lo_vwuz1 +lda {z1} +//FRAGMENT vbuxx=_lo_vwuz1 +ldx {z1} +//FRAGMENT vbuaa=_hi_vwuz1 +lda {z1}+1 +//FRAGMENT vbuxx=_hi_vwuz1 +ldx {z1}+1 +//FRAGMENT vbuz1=vbuxx_bor_vbuz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuz2 +tza +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuaa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuaa +tay +tza +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} +//FRAGMENT vbuyy=_lo_vwuz1 +ldy {z1} +//FRAGMENT vbuzz=_lo_vwuz1 +ldz {z1} +//FRAGMENT vbuyy=_hi_vwuz1 +ldy {z1}+1 +//FRAGMENT vbuzz=_hi_vwuz1 +ldz {z1}+1 +//FRAGMENT vbuz1=vbuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy +lda {c1},y +inc +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=_inc_pbuc1_derefidx_vbuzz +tza +tax +inc {c1},x +//FRAGMENT _deref_pbuc1_eq_vbuxx_then_la1 +cpx {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuyy_then_la1 +cpy {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1 +cpz {c1} +beq {la1} +//FRAGMENT vbuaa=vbuz1_bor_vbuaa +ora {z1} +//FRAGMENT vbuxx=vbuz1_bor_vbuaa +ora {z1} +tax +//FRAGMENT vbuyy=vbuz1_bor_vbuaa +ora {z1} +tay +//FRAGMENT vbuzz=vbuz1_bor_vbuaa +ora {z1} +taz +//FRAGMENT vbuz1=vbuz2_bor_vbuzz +tza +ora {z2} +sta {z1} +//FRAGMENT vbuaa=vbuxx_bor_vbuaa +stx $ff +ora $ff +//FRAGMENT vbuaa=vbuyy_bor_vbuaa +sty $ff +ora $ff +//FRAGMENT vbuaa=vbuzz_bor_vbuaa +tay +tza +sty $ff +ora $ff //FRAGMENT vduz1=vduc1 lda #<{c1} sta {z1} @@ -1336,16 +1478,6 @@ lda {z2} sta {z1} lda {z2}+1 sta {z1}+1 -//FRAGMENT vbuz1=_lo_vwuz2 -lda {z2} -sta {z1} -//FRAGMENT vbuz1=_hi_vwuz2 -lda {z2}+1 -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuz3 -lda {z2} -ora {z3} -sta {z1} //FRAGMENT vduz1=vduz2_ror_4 lda {z2}+3 lsr @@ -1932,49 +2064,6 @@ dey bne !- !e: taz -//FRAGMENT vbuaa=_lo_vwuz1 -lda {z1} -//FRAGMENT vbuxx=_lo_vwuz1 -ldx {z1} -//FRAGMENT vbuaa=_hi_vwuz1 -lda {z1}+1 -//FRAGMENT vbuxx=_hi_vwuz1 -ldx {z1}+1 -//FRAGMENT vbuz1=vbuxx_bor_vbuz2 -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuz2 -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuz2 -tza -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuaa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuaa -stx $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuaa -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuaa -tay -tza -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuxx -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuxx -stx {z1} //FRAGMENT vbuaa=_hi__word_vduz1 lda {z1}+1 //FRAGMENT vbuxx=_hi__word_vduz1 @@ -2039,20 +2128,6 @@ tay tza ora {z1} taz -//FRAGMENT vbuaa=vbuz1_bor_vbuaa -ora {z1} -//FRAGMENT vbuxx=vbuz1_bor_vbuaa -ora {z1} -tax -//FRAGMENT vbuyy=vbuz1_bor_vbuaa -ora {z1} -tay -//FRAGMENT vbuzz=vbuz1_bor_vbuaa -ora {z1} -taz -//FRAGMENT vbuaa=vbuxx_bor_vbuaa -stx $ff -ora $ff //FRAGMENT vbuxx=vbuxx_bor_vbuaa stx $ff ora $ff @@ -2065,9 +2140,6 @@ tay stx $ff ora $ff taz -//FRAGMENT vbuaa=vbuyy_bor_vbuaa -sty $ff -ora $ff //FRAGMENT vbuxx=vbuyy_bor_vbuaa sty $ff ora $ff @@ -2080,11 +2152,6 @@ tay sty $ff ora $ff taz -//FRAGMENT vbuaa=vbuzz_bor_vbuaa -tay -tza -sty $ff -ora $ff //FRAGMENT vbuxx=vbuzz_bor_vbuaa tax tza @@ -2118,18 +2185,6 @@ tay txa ora {z1} taz -//FRAGMENT vbuyy=_lo_vwuz1 -ldy {z1} -//FRAGMENT vbuzz=_lo_vwuz1 -ldz {z1} -//FRAGMENT vbuyy=_hi_vwuz1 -ldy {z1}+1 -//FRAGMENT vbuzz=_hi_vwuz1 -ldz {z1}+1 -//FRAGMENT vbuz1=vbuz2_bor_vbuyy -tya -ora {z2} -sta {z1} //FRAGMENT vbuyy=_hi__word_vduz1 ldy {z1}+1 //FRAGMENT vbuzz=_hi__word_vduz1 @@ -2163,10 +2218,6 @@ sty {z1} //FRAGMENT vbuz1=vbuzz tza sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuzz -tza -ora {z2} -sta {z1} //FRAGMENT vbuxx=vbuaa tax //FRAGMENT vbuyy=vbuaa @@ -2237,54 +2288,3 @@ sta {z1}+3 NO_SYNTHESIS //FRAGMENT vduz1=vwsc1 NO_SYNTHESIS -//FRAGMENT _deref_pwuc1=vwuc2 -lda #<{c2} -sta {c1} -lda #>{c2} -sta {c1}+1 -//FRAGMENT _deref_qbuc1=pbuc2 -lda #<{c2} -sta {c1} -lda #>{c2} -sta {c1}+1 -//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 -inc {c1} -//FRAGMENT _deref_pbuc1_eq_vbuz1_then_la1 -lda {c1} -cmp {z1} -beq {la1} -//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 -dec {c1} -//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 -ldx {z1} -inc {c1},x -//FRAGMENT vwuz1=vwuc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT _deref_pbuc1_eq_vbuaa_then_la1 -cmp {c1} -beq {la1} -//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa -tax -inc {c1},x -//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx -inc {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy -lda {c1},y -inc -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuzz=_inc_pbuc1_derefidx_vbuzz -tza -tax -inc {c1},x -//FRAGMENT _deref_pbuc1_eq_vbuxx_then_la1 -cpx {c1} -beq {la1} -//FRAGMENT _deref_pbuc1_eq_vbuyy_then_la1 -cpy {c1} -beq {la1} -//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1 -cpz {c1} -beq {la1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502.asm b/src/main/fragment/cache/fragment-cache-mos6502.asm index 3af374995..3927740fb 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 185628ba62 185628d2c2 +//KICKC FRAGMENT CACHE 17f3bfb106 17f3bfc988 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm index 218b8acf4..a0b0ce1cb 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 185628ba62 185628d2c2 +//KICKC FRAGMENT CACHE 17f3bfb106 17f3bfc988 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} @@ -17491,123 +17491,6 @@ lda {z1} cmp #<{c1} bcc {la1} !: -//FRAGMENT vwsz1=pwsc1_derefidx_vbuz2_minus_pwsc2_derefidx_vbuz2 -ldy {z2} -sec -lda {c1},y -sbc {c2},y -sta {z1} -lda {c1}+1,y -sbc {c2}+1,y -sta {z1}+1 -//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=pwuc1_derefidx_vbuz2_rol_4 -ldy {z2} -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -//FRAGMENT pbsc1_derefidx_vbuz1=vbsc2 -lda #{c2} -ldy {z1} -sta {c1},y -//FRAGMENT vwsz1=pwsc1_derefidx_vbuaa_minus_pwsc2_derefidx_vbuaa -tay -sec -lda {c1},y -sbc {c2},y -sta {z1} -lda {c1}+1,y -sbc {c2}+1,y -sta {z1}+1 -//FRAGMENT vwsz1=pwsc1_derefidx_vbuxx_minus_pwsc2_derefidx_vbuxx -sec -lda {c1},x -sbc {c2},x -sta {z1} -lda {c1}+1,x -sbc {c2}+1,x -sta {z1}+1 -//FRAGMENT vwsz1=pwsc1_derefidx_vbuyy_minus_pwsc2_derefidx_vbuyy -sec -lda {c1},y -sbc {c2},y -sta {z1} -lda {c1}+1,y -sbc {c2}+1,y -sta {z1}+1 -//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuxx -lda {c1},x -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwsz1=_sword_pbuc1_derefidx_vbuyy -lda {c1},y -sta {z1} -lda #0 -sta {z1}+1 -//FRAGMENT vwuz1=pwuc1_derefidx_vbuaa_rol_4 -tay -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -//FRAGMENT vwuz1=pwuc1_derefidx_vbuxx_rol_4 -lda {c1},x -sta {z1} -lda {c1}+1,x -sta {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -//FRAGMENT vwuz1=pwuc1_derefidx_vbuyy_rol_4 -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -asl {z1} -rol {z1}+1 -//FRAGMENT pbsc1_derefidx_vbuxx=vbsc2 -lda #{c2} -sta {c1},x -//FRAGMENT pbsc1_derefidx_vbuyy=vbsc2 -lda #{c2} -sta {c1},y -//FRAGMENT pbsc1_derefidx_vbuz1=vbsaa -ldy {z1} -sta {c1},y //FRAGMENT _deref_pwuc1=_deref_pwuc1_plus_vwuc2 lda #<{c2} clc diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index 569729b54..0e5f273e8 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 185628ba62 185628d2c2 +//KICKC FRAGMENT CACHE 17f3bfb106 17f3bfc988 //FRAGMENT vbuz1=_deref_pbuc1 lda {c1} sta {z1} diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_2.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_2.asm new file mode 100644 index 000000000..b10e36456 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_2.asm @@ -0,0 +1,8 @@ +lda {c1},x +asl +sta {m1} +lda {c1}+1,x +rol +sta {m1}+1 +asl {m1} +rol {m1}+1 diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_3.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_3.asm new file mode 100644 index 000000000..9b5af0a0d --- /dev/null +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_3.asm @@ -0,0 +1,10 @@ +lda {c1},x +asl +sta {m1} +lda {c1}+1,x +rol +sta {m1}+1 +asl {m1} +rol {m1}+1 +asl {m1} +rol {m1}+1 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_4.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_4.asm index 2cdf36a42..e56afd3b4 100644 --- a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_4.asm +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuxx_rol_4.asm @@ -1,6 +1,8 @@ lda {c1},x +asl sta {m1} lda {c1}+1,x +rol sta {m1}+1 asl {m1} rol {m1}+1 @@ -8,6 +10,4 @@ asl {m1} rol {m1}+1 asl {m1} rol {m1}+1 -asl {m1} -rol {m1}+1 diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_2.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_2.asm new file mode 100644 index 000000000..18e864911 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_2.asm @@ -0,0 +1,8 @@ +lda {c1},y +asl +sta {m1} +lda {c1}+1,y +rol +sta {m1}+1 +asl {m1} +rol {m1}+1 diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_3.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_3.asm new file mode 100644 index 000000000..6ad0b5299 --- /dev/null +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_3.asm @@ -0,0 +1,10 @@ +lda {c1},y +asl +sta {m1} +lda {c1}+1,y +rol +sta {m1}+1 +asl {m1} +rol {m1}+1 +asl {m1} +rol {m1}+1 \ No newline at end of file diff --git a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_4.asm b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_4.asm index 9c4e01a08..c4e9021a6 100644 --- a/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_4.asm +++ b/src/main/fragment/mos6502-common/vwum1=pwuc1_derefidx_vbuyy_rol_4.asm @@ -1,6 +1,8 @@ lda {c1},y +asl sta {m1} lda {c1}+1,y +rol sta {m1}+1 asl {m1} rol {m1}+1 @@ -8,6 +10,4 @@ asl {m1} rol {m1}+1 asl {m1} rol {m1}+1 -asl {m1} -rol {m1}+1 diff --git a/src/test/ref/line-anim.asm b/src/test/ref/line-anim.asm index 61c6f9b7a..d4e430ab8 100644 --- a/src/test/ref/line-anim.asm +++ b/src/test/ref/line-anim.asm @@ -298,8 +298,10 @@ point_init: { asl tax lda x_start,x + asl sta.z __5 lda x_start+1,x + rol sta.z __5+1 asl.z __5 rol.z __5+1 @@ -307,8 +309,6 @@ point_init: { rol.z __5+1 asl.z __5 rol.z __5+1 - asl.z __5 - rol.z __5+1 // x_cur[point_idx] = x_start[point_idx]*$10 lda.z __5 sta x_cur,x diff --git a/src/test/ref/line-anim.log b/src/test/ref/line-anim.log index f54d16d03..eaf43f06f 100644 --- a/src/test/ref/line-anim.log +++ b/src/test/ref/line-anim.log @@ -3098,8 +3098,10 @@ point_init: { // [81] (word~) point_init::$5 ← *((const word*) x_start + (byte~) point_init::$13) << (byte) 4 -- vwuz1=pwuc1_derefidx_vbuz2_rol_4 ldy.z __13 lda x_start,y + asl sta.z __5 lda x_start+1,y + rol sta.z __5+1 asl.z __5 rol.z __5+1 @@ -3107,8 +3109,6 @@ point_init: { rol.z __5+1 asl.z __5 rol.z __5+1 - asl.z __5 - rol.z __5+1 // [82] *((const word*) x_cur + (byte~) point_init::$13) ← (word~) point_init::$5 -- pwuc1_derefidx_vbuz1=vwuz2 ldy.z __13 lda.z __5 @@ -3821,34 +3821,34 @@ Uplift Scope [MOS6569_VICII] Uplift Scope [MOS6581_SID] Uplift Scope [] -Uplifting [divr16u] best 30425 combination zp[2]:27 [ divr16u::rem#4 divr16u::rem#3 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp[2]:31 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp[2]:29 [ divr16u::dividend#2 divr16u::dividend#0 ] zp[2]:82 [ divr16u::divisor#0 ] zp[2]:84 [ divr16u::return#2 ] -Uplifting [divr16s] best 30414 combination zp[2]:22 [ divr16s::divisoru#3 divr16s::divisoru#4 divr16s::divisoru#5 ] zp[2]:25 [ divr16s::return#2 divr16s::return#6 divr16s::return#1 ] zp[2]:20 [ divr16s::remu#3 divr16s::remu#7 divr16s::remu#8 ] reg byte y [ divr16s::neg#4 divr16s::neg#2 divr16s::neg#3 ] zp[2]:90 [ divr16s::remu#1 ] zp[2]:63 [ divr16s::rem#0 ] zp[2]:86 [ divr16s::resultu#0 ] zp[2]:88 [ divr16s::divisoru#1 ] zp[2]:61 [ divr16s::divisor#0 ] zp[2]:65 [ divr16s::return#3 ] -Uplifting [bitmap_clear] best 29514 combination zp[2]:9 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp[1]:8 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp[2]:43 [ bitmap_clear::bitmap#0 ] -Uplifting [screen_fill] best 28614 combination zp[2]:13 [ screen_fill::screen#2 screen_fill::screen#3 screen_fill::screen#1 ] reg byte x [ screen_fill::x#2 screen_fill::x#1 ] zp[1]:12 [ screen_fill::y#4 screen_fill::y#1 ] -Uplifting [point_init] best 28588 combination zp[2]:18 [ point_init::abs16s2_return#2 point_init::abs16s2_return#5 point_init::abs16s2_return#6 ] zp[2]:16 [ point_init::abs16s1_return#2 point_init::abs16s1_return#5 point_init::abs16s1_return#6 ] zp[2]:50 [ point_init::$18 ] zp[2]:55 [ point_init::$5 ] zp[2]:57 [ point_init::$19 ] zp[2]:59 [ point_init::$6 ] zp[2]:67 [ point_init::x_stepf#0 ] reg byte a [ point_init::$9 ] reg byte a [ point_init::$11 ] zp[2]:48 [ point_init::$17 ] reg byte a [ point_init::$10 ] zp[2]:71 [ point_init::abs16s2_return#0 ] zp[2]:73 [ point_init::abs16s1_return#0 ] reg byte x [ point_init::$13 ] zp[2]:46 [ point_init::x_diff#1 ] zp[2]:52 [ point_init::y_diff#0 ] zp[1]:34 [ point_init::point_idx#0 ] +Uplifting [divr16u] best 30419 combination zp[2]:27 [ divr16u::rem#4 divr16u::rem#3 divr16u::rem#9 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp[2]:31 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp[2]:29 [ divr16u::dividend#2 divr16u::dividend#0 ] zp[2]:82 [ divr16u::divisor#0 ] zp[2]:84 [ divr16u::return#2 ] +Uplifting [divr16s] best 30408 combination zp[2]:22 [ divr16s::divisoru#3 divr16s::divisoru#4 divr16s::divisoru#5 ] zp[2]:25 [ divr16s::return#2 divr16s::return#6 divr16s::return#1 ] zp[2]:20 [ divr16s::remu#3 divr16s::remu#7 divr16s::remu#8 ] reg byte y [ divr16s::neg#4 divr16s::neg#2 divr16s::neg#3 ] zp[2]:90 [ divr16s::remu#1 ] zp[2]:63 [ divr16s::rem#0 ] zp[2]:86 [ divr16s::resultu#0 ] zp[2]:88 [ divr16s::divisoru#1 ] zp[2]:61 [ divr16s::divisor#0 ] zp[2]:65 [ divr16s::return#3 ] +Uplifting [bitmap_clear] best 29508 combination zp[2]:9 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp[1]:8 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp[2]:43 [ bitmap_clear::bitmap#0 ] +Uplifting [screen_fill] best 28608 combination zp[2]:13 [ screen_fill::screen#2 screen_fill::screen#3 screen_fill::screen#1 ] reg byte x [ screen_fill::x#2 screen_fill::x#1 ] zp[1]:12 [ screen_fill::y#4 screen_fill::y#1 ] +Uplifting [point_init] best 28582 combination zp[2]:18 [ point_init::abs16s2_return#2 point_init::abs16s2_return#5 point_init::abs16s2_return#6 ] zp[2]:16 [ point_init::abs16s1_return#2 point_init::abs16s1_return#5 point_init::abs16s1_return#6 ] zp[2]:50 [ point_init::$18 ] zp[2]:55 [ point_init::$5 ] zp[2]:57 [ point_init::$19 ] zp[2]:59 [ point_init::$6 ] zp[2]:67 [ point_init::x_stepf#0 ] reg byte a [ point_init::$9 ] reg byte a [ point_init::$11 ] zp[2]:48 [ point_init::$17 ] reg byte a [ point_init::$10 ] zp[2]:71 [ point_init::abs16s2_return#0 ] zp[2]:73 [ point_init::abs16s1_return#0 ] reg byte x [ point_init::$13 ] zp[2]:46 [ point_init::x_diff#1 ] zp[2]:52 [ point_init::y_diff#0 ] zp[1]:34 [ point_init::point_idx#0 ] Limited combination testing to 100 combinations of 576 possible. -Uplifting [bitmap_init] best 28078 combination zp[2]:6 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:41 [ bitmap_init::$5 ] zp[1]:42 [ bitmap_init::$6 ] zp[1]:39 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 28072 combination zp[2]:6 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte a [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$4 ] zp[1]:41 [ bitmap_init::$5 ] zp[1]:42 [ bitmap_init::$6 ] zp[1]:39 [ bitmap_init::$7 ] Limited combination testing to 100 combinations of 15360 possible. -Uplifting [bitmap_plot] best 28039 combination reg byte x [ bitmap_plot::y#0 ] zp[2]:77 [ bitmap_plot::$0 ] reg byte x [ bitmap_plot::$1 ] zp[2]:79 [ bitmap_plot::plotter#1 ] zp[2]:75 [ bitmap_plot::plotter#0 ] zp[2]:36 [ bitmap_plot::x#0 ] -Uplifting [main] best 27999 combination zp[1]:2 [ main::i#2 main::i#1 ] reg byte a [ main::$10 ] -Uplifting [MOS6526_CIA] best 27999 combination -Uplifting [MOS6569_VICII] best 27999 combination -Uplifting [MOS6581_SID] best 27999 combination -Uplifting [] best 27999 combination +Uplifting [bitmap_plot] best 28033 combination reg byte x [ bitmap_plot::y#0 ] zp[2]:77 [ bitmap_plot::$0 ] reg byte x [ bitmap_plot::$1 ] zp[2]:79 [ bitmap_plot::plotter#1 ] zp[2]:75 [ bitmap_plot::plotter#0 ] zp[2]:36 [ bitmap_plot::x#0 ] +Uplifting [main] best 27993 combination zp[1]:2 [ main::i#2 main::i#1 ] reg byte a [ main::$10 ] +Uplifting [MOS6526_CIA] best 27993 combination +Uplifting [MOS6569_VICII] best 27993 combination +Uplifting [MOS6581_SID] best 27993 combination +Uplifting [] best 27993 combination Attempting to uplift remaining variables inzp[1]:41 [ bitmap_init::$5 ] -Uplifting [bitmap_init] best 27939 combination reg byte a [ bitmap_init::$5 ] +Uplifting [bitmap_init] best 27933 combination reg byte a [ bitmap_init::$5 ] Attempting to uplift remaining variables inzp[1]:42 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 27879 combination reg byte a [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 27873 combination reg byte a [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp[1]:8 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Uplifting [bitmap_clear] best 27879 combination zp[1]:8 [ bitmap_clear::y#4 bitmap_clear::y#1 ] +Uplifting [bitmap_clear] best 27873 combination zp[1]:8 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Attempting to uplift remaining variables inzp[1]:12 [ screen_fill::y#4 screen_fill::y#1 ] -Uplifting [screen_fill] best 27879 combination zp[1]:12 [ screen_fill::y#4 screen_fill::y#1 ] +Uplifting [screen_fill] best 27873 combination zp[1]:12 [ screen_fill::y#4 screen_fill::y#1 ] Attempting to uplift remaining variables inzp[1]:39 [ bitmap_init::$7 ] -Uplifting [bitmap_init] best 27879 combination zp[1]:39 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 27873 combination zp[1]:39 [ bitmap_init::$7 ] Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ] -Uplifting [main] best 27879 combination zp[1]:2 [ main::i#2 main::i#1 ] +Uplifting [main] best 27873 combination zp[1]:2 [ main::i#2 main::i#1 ] Attempting to uplift remaining variables inzp[1]:34 [ point_init::point_idx#0 ] -Uplifting [point_init] best 27879 combination zp[1]:34 [ point_init::point_idx#0 ] +Uplifting [point_init] best 27873 combination zp[1]:34 [ point_init::point_idx#0 ] Coalescing zero page register [ zp[2]:25 [ divr16s::return#2 divr16s::return#6 divr16s::return#1 ] ] with [ zp[2]:86 [ divr16s::resultu#0 ] ] - score: 2 Coalescing zero page register [ zp[1]:2 [ main::i#2 main::i#1 ] ] with [ zp[1]:34 [ point_init::point_idx#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:9 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] ] with [ zp[2]:43 [ bitmap_clear::bitmap#0 ] ] - score: 1 @@ -4397,8 +4397,10 @@ point_init: { tax // [81] (word~) point_init::$5 ← *((const word*) x_start + (byte~) point_init::$13) << (byte) 4 -- vwuz1=pwuc1_derefidx_vbuxx_rol_4 lda x_start,x + asl sta.z __5 lda x_start+1,x + rol sta.z __5+1 asl.z __5 rol.z __5+1 @@ -4406,8 +4408,6 @@ point_init: { rol.z __5+1 asl.z __5 rol.z __5+1 - asl.z __5 - rol.z __5+1 // [82] *((const word*) x_cur + (byte~) point_init::$13) ← (word~) point_init::$5 -- pwuc1_derefidx_vbuxx=vwuz1 lda.z __5 sta x_cur,x @@ -5348,7 +5348,7 @@ reg byte a [ divr16u::$2 ] FINAL ASSEMBLER -Score: 21967 +Score: 21961 // File Comments // Animated lines drawn on a single color bitmap @@ -5814,8 +5814,10 @@ point_init: { tax // [81] (word~) point_init::$5 ← *((const word*) x_start + (byte~) point_init::$13) << (byte) 4 -- vwuz1=pwuc1_derefidx_vbuxx_rol_4 lda x_start,x + asl sta.z __5 lda x_start+1,x + rol sta.z __5+1 asl.z __5 rol.z __5+1 @@ -5823,8 +5825,6 @@ point_init: { rol.z __5+1 asl.z __5 rol.z __5+1 - asl.z __5 - rol.z __5+1 // x_cur[point_idx] = x_start[point_idx]*$10 // [82] *((const word*) x_cur + (byte~) point_init::$13) ← (word~) point_init::$5 -- pwuc1_derefidx_vbuxx=vwuz1 lda.z __5