mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-28 11:51:09 +00:00
Added missing word-fragments & synth. Moved to fixed point positions.
This commit is contained in:
parent
9b6f1c6bd1
commit
be7686c954
10
src/main/fragment/_deref_pwuz1_lt_vwuc1_then_la1.asm
Normal file
10
src/main/fragment/_deref_pwuz1_lt_vwuc1_then_la1.asm
Normal file
@ -0,0 +1,10 @@
|
||||
ldy #1
|
||||
lda ({z1}),y
|
||||
cmp #>{c1}
|
||||
bcc {la1}
|
||||
bne !+
|
||||
dey
|
||||
lda ({z1}),y
|
||||
cmp #<{c1}
|
||||
bcc {la1}
|
||||
!:
|
@ -0,0 +1,8 @@
|
||||
lda ({z1}),y
|
||||
sec
|
||||
sbc #1
|
||||
sta ({z1}),y
|
||||
iny
|
||||
lda ({z1}),y
|
||||
sbc #0
|
||||
sta ({z1}),y
|
10
src/main/fragment/pwuz1_derefidx_vbuyy_lt_vwuc1_then_la1.asm
Normal file
10
src/main/fragment/pwuz1_derefidx_vbuyy_lt_vwuc1_then_la1.asm
Normal file
@ -0,0 +1,10 @@
|
||||
iny
|
||||
lda ({z1}),y
|
||||
cmp #>{c1}
|
||||
bcc {la1}
|
||||
bne !+
|
||||
dey
|
||||
lda ({z1}),y
|
||||
cmp #<{c1}
|
||||
bcc {la1}
|
||||
!:
|
9
src/main/fragment/vwuz1=_deref_pwuz2_minus_vwuc1.asm
Normal file
9
src/main/fragment/vwuz1=_deref_pwuz2_minus_vwuc1.asm
Normal file
@ -0,0 +1,9 @@
|
||||
ldy #0
|
||||
lda ({z2}),y
|
||||
sec
|
||||
sbc #<{c1}
|
||||
sta {z1}
|
||||
iny
|
||||
lda ({z2}),y
|
||||
sbc #>{c1}
|
||||
sta {z1}+1
|
@ -0,0 +1,8 @@
|
||||
lda ({z2}),y
|
||||
sec
|
||||
sbc #<{c1}
|
||||
sta {z1}
|
||||
iny
|
||||
lda ({z2}),y
|
||||
sbc #>{c1}
|
||||
sta {z1}+1
|
@ -1,6 +1,8 @@
|
||||
ldy #4
|
||||
!:
|
||||
lsr {z1}+1
|
||||
ror {z1}
|
||||
dey
|
||||
bne !-
|
||||
lsr {z1}+1
|
||||
ror {z1}
|
||||
lsr {z1}+1
|
||||
ror {z1}
|
||||
lsr {z1}+1
|
||||
ror {z1}
|
||||
|
@ -200,26 +200,26 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
}
|
||||
|
||||
private static List<AsmFragmentTemplateSynthesisRule> initFragmentSyntheses() {
|
||||
Map<String, String> mapZ = new LinkedHashMap<>();
|
||||
mapZ.put("z2", "z1");
|
||||
mapZ.put("z3", "z2");
|
||||
mapZ.put("z4", "z3");
|
||||
Map<String, String> mapZ1 = new LinkedHashMap<>();
|
||||
mapZ1.put("z2", "z1");
|
||||
mapZ1.put("z3", "z2");
|
||||
mapZ1.put("z4", "z3");
|
||||
Map<String, String> mapZ2 = new LinkedHashMap<>();
|
||||
mapZ2.put("z3", "z1");
|
||||
Map<String, String> mapZ3 = new LinkedHashMap<>();
|
||||
mapZ3.put("z3", "z2");
|
||||
Map<String, String> mapZ4 = new LinkedHashMap<>();
|
||||
mapZ3.put("z4", "z3");
|
||||
Map<String, String> mapC1 = new LinkedHashMap<>();
|
||||
mapC1.put("c2", "c1");
|
||||
mapC1.put("c3", "c2");
|
||||
mapC1.put("c4", "c3");
|
||||
Map<String, String> mapC2 = new LinkedHashMap<>();
|
||||
mapC2.put("c2", "c1");
|
||||
mapC2.put("c3", "c2");
|
||||
mapC2.put("c4", "c3");
|
||||
Map<String, String> mapC3 = new LinkedHashMap<>();
|
||||
mapC3.put("c3", "c2");
|
||||
mapC3.put("c4", "c3");
|
||||
Map<String, String> mapZC = new LinkedHashMap<>();
|
||||
mapZC.putAll(mapZ);
|
||||
mapZC.putAll(mapC2);
|
||||
mapZC.putAll(mapZ1);
|
||||
mapZC.putAll(mapC1);
|
||||
Map<String, String> mapSToU = new LinkedHashMap<>();
|
||||
mapSToU.put("vbsz1", "vbuz1");
|
||||
mapSToU.put("vbsz2", "vbuz2");
|
||||
@ -289,6 +289,7 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
String twoZ3 = ".*z3.*z3.*";
|
||||
String twoC1 = ".*c1.*c1.*";
|
||||
String twoC2 = ".*c2.*c2.*";
|
||||
String threeC1 = ".*c1.*c1.*c1.*";
|
||||
String threeZ1 = ".*z1.*z1.*z1.*";
|
||||
String threeZ2 = ".*z2.*z2.*z2.*";
|
||||
String threeAa = ".*aa.*aa.*aa.*";
|
||||
@ -340,43 +341,43 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*vb.)yy(.*vb.)yy(.*)", rvalAa, "tya", "$1=$2aa$3aa$4", null, null));
|
||||
|
||||
// Replace Z1 with AA (only one)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalAa+"|"+ twoZ1, "lda {z1}", "$1aa$2", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalAa+"|"+ twoZ1, "lda {z1}", "$1aa$2", null, mapZ1));
|
||||
// Replace two Z1s with AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalAa+"|"+ threeZ1, "lda {z1}", "$1aa$2aa$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalAa+"|"+ threeZ1, "lda {z1}", "$1aa$2aa$3", null, mapZ1));
|
||||
// Replace first (not second) Z1 with AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)z1(.*)", lvalZ1+"|"+rvalAa, "lda {z1}", "$1aa$2z1$3", null, null));
|
||||
// Replace second (not first) Z1 with AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalAa, "lda {z1}", "$1z1$2aa$3", null, null));
|
||||
// Replace non-assigned Z1 with AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...aa)=(.*vb.)z1(.*)", rvalAa+"|"+ twoZ1, "lda {z1}", "$1=$2aa$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...aa)=(.*vb.)z1(.*)", rvalAa+"|"+ twoZ1, "lda {z1}", "$1=$2aa$3", null, mapZ1));
|
||||
// Replace assigned Z1 with AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1aa=$2", "sta {z1}", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1aa=$2", "sta {z1}", mapZ1));
|
||||
|
||||
// Replace Z1 with YY (only one)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalYy+"|"+twoZ1, "ldy {z1}", "$1yy$2", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalYy+"|"+twoZ1, "ldy {z1}", "$1yy$2", null, mapZ1));
|
||||
// Replace two Z1s with YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalYy+"|"+threeZ1, "ldy {z1}", "$1yy$2yy$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalYy+"|"+threeZ1, "ldy {z1}", "$1yy$2yy$3", null, mapZ1));
|
||||
// Replace first (not second) Z1 with YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)z1(.*)", lvalZ1+"|"+rvalYy, "ldy {z1}", "$1yy$2z1$3", null, null));
|
||||
// Replace second (not first) Z1 with YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalYy, "ldy {z1}", "$1z1$2yy$3", null, null));
|
||||
// Replace non-assigned Z1 with YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...yy)=(.*vb.)z1(.*)", twoZ1+"|"+rvalYy, "ldy {z1}", "$1=$2yy$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...yy)=(.*vb.)z1(.*)", twoZ1+"|"+rvalYy, "ldy {z1}", "$1=$2yy$3", null, mapZ1));
|
||||
// Replace assigned Z1 with YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1yy=$2", "sty {z1}", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1yy=$2", "sty {z1}", mapZ1));
|
||||
|
||||
// Replace Z1 with XX (only one)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalXx+"|"+twoZ1, "ldx {z1}", "$1xx$2", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)", lvalZ1+"|"+rvalXx+"|"+twoZ1, "ldx {z1}", "$1xx$2", null, mapZ1));
|
||||
// Replace two Z1s with XX
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalXx+"|"+threeZ1, "ldx {z1}", "$1xx$2xx$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalXx+"|"+threeZ1, "ldx {z1}", "$1xx$2xx$3", null, mapZ1));
|
||||
// Replace first (not second) Z1 with XX
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z1(.*)z1(.*)", lvalZ1+"|"+rvalXx, "ldx {z1}", "$1xx$2z1$3", null, null));
|
||||
// Replace second (not first) Z1 with XX
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z1(.*vb.)z1(.*)", lvalZ1+"|"+rvalXx, "ldx {z1}", "$1z1$2xx$3", null, null));
|
||||
// Replace non-assigned Z1 with XX
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...xx)=(.*vb.)z1(.*)", twoZ1+"|"+rvalXx, "ldx {z1}", "$1=$2xx$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(...xx)=(.*vb.)z1(.*)", twoZ1+"|"+rvalXx, "ldx {z1}", "$1=$2xx$3", null, mapZ1));
|
||||
// Replace assigned Z1 with XX
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1xx=$2", "stx {z1}", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vb.)z1=(.*)", twoZ1, null, "$1xx=$2", "stx {z1}", mapZ1));
|
||||
|
||||
// Replace Z2 with AA (only one)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z2(.*)", lvalZ2+"|"+rvalAa+"|"+twoZ2, "lda {z2}", "$1aa$2", null, mapZ3));
|
||||
@ -440,18 +441,18 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
// Rewrite Assignments to Y from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vb(.)yy=(.*)", null, null, "vb$1aa=$2", "tay", null));
|
||||
// Rewrite Assignments to Z1 from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vb(.)z1=(.*)", twoZ1, null, "vb$1aa=$2", "sta {z1}", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vb(.)z1=(.*)", twoZ1, null, "vb$1aa=$2", "sta {z1}", mapZ1));
|
||||
// Rewrite Assignments to Z1 from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vb(.)z1=(.*z1.*)", null, null, "vb$1aa=$2", "sta {z1}", null));
|
||||
// Rewrite Assignments to *C1 from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("_deref_pb(.)c1=(.*)", null, null, "vb$1aa=$2", "sta {c1}", null));
|
||||
// Rewrite Assignments to *Z1 from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("_deref_pb(.)z1=(.*)", twoZ1, null, "vb$1aa=$2", "ldy #0\n" + "sta ({z1}),y", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("_deref_pb(.)z1=(.*)", twoZ1, null, "vb$1aa=$2", "ldy #0\n" + "sta ({z1}),y", mapZ1));
|
||||
// Rewrite Assignments to *Z1 from A
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("_deref_pb(.)z1=(.*z1.*)", null, null, "vb$1aa=$2", "ldy #0\n" + "sta ({z1}),y", null));
|
||||
|
||||
// Rewrite _deref_pb.z1_ to _vb.aa_ (if no other Z1s)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_deref_pb(.)z1(.*)", twoZ1+"|"+rvalAa+"|"+rvalYy+"|"+ lvalDerefZ1, "ldy #0\n"+"lda ({z1}),y", "$1vb$2aa$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_deref_pb(.)z1(.*)", twoZ1+"|"+rvalAa+"|"+rvalYy+"|"+ lvalDerefZ1, "ldy #0\n"+"lda ({z1}),y", "$1vb$2aa$3", null, mapZ1));
|
||||
// Rewrite _deref_pb.z1_ to _vb.aa_ (if other Z1)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*z1.*)_deref_pb(.)z1(.*)", rvalAa+"|"+rvalYy+"|"+lvalDerefZ1, "ldy #0\n"+"lda ({z1}),y", "$1vb$2aa$3", null, null));
|
||||
// Rewrite _deref_pb.z1_ to _vb.aa_ (if other Z1)
|
||||
@ -481,26 +482,26 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_deref_pb(.)c1(.*)", rvalXx+"|"+lvalDerefC1, "ldx {c1}", "$1vb$2xx$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_deref_pb(.)c1(.*)", rvalYy+"|"+lvalDerefC1, "ldy {c1}", "$1vb$2yy$3", null, null));
|
||||
// Rewrite (Z1),y to AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)pb(.)z1_derefidx_vbuyy(.*)_then_(.*)", twoZ1+"|"+rvalAa, "lda ({z1}),y\n" , "$1vb$2aa$3_then_$4", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)pb(.)z1_derefidx_vbuyy(.*)_then_(.*)", twoZ1+"|"+rvalAa, "lda ({z1}),y\n" , "$1vb$2aa$3_then_$4", null, mapZ1));
|
||||
|
||||
// Rewrite left-size C1,y to use AA and a STA C1,y
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy=(.*)", null, null, "vb$1aa=$2", "sta {c1},y", null, "yy"));
|
||||
// Rewrite C1,y to save and reload YY from $FF
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy=(.*)", null, "sty $ff\n" , "vb$1aa=$2", "ldy $ff\nsta {c1},y", null));
|
||||
// Rewrite (Z1),y to save and reload YY from $FF
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuyy=(.*)", twoZ1, "sty $ff\n" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuyy=(.*)", twoZ1, "sty $ff\n" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ1));
|
||||
|
||||
// Rewrite left-size C1,x to use AA and a STA C1,x
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx=(.*)", null, null, "vb$1aa=$2", "sta {c1},x", null, "xx"));
|
||||
// Rewrite C1,x to save and reload XX from $FF
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx=(.*)", null, "stx $ff\n" , "vb$1aa=$2", "ldx $ff\nsta {c1},x", null));
|
||||
// Rewrite (Z1),x to save Y to $FF and reload it into YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuxx=(.*)", twoZ1, "stx $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuxx=(.*)", twoZ1, "stx $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ1));
|
||||
|
||||
// Rewrite (Z1),a to use TAY prefix
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1+"|"+rvalYy, "tay" , "vb$1aa=$2", "sta ({z1}),y", mapZ, "yy"));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1+"|"+rvalYy, "tay" , "vb$1aa=$2", "sta ({z1}),y", mapZ1, "yy"));
|
||||
// Rewrite (Z1),a to save A to $FF and reload it into YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1, "sta $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)z1_derefidx_vbuaa=(.*)", twoZ1, "sta $ff" , "vb$1aa=$2", "ldy $ff\nsta ({z1}),y", mapZ1));
|
||||
|
||||
// Synthesize some constant pointers as constant words (remove when the above section can be included)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_(lt|gt|le|ge|eq|neq)_p..([cz].)_then_(.*)", null, null, "$1_$2_vwu$3_then_$4", null, null));
|
||||
@ -513,31 +514,37 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("p..([cz].)=_(inc|dec)_p..([cz].)", null, null, "vwu$1=_$2_vwu$3", null, null));
|
||||
|
||||
// Synthesize constants using AA/XX/YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalAa+"|"+"|"+ derefC1, "lda #{c1}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalYy+"|"+"|"+ derefC1, "ldy #{c1}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalXx+"|"+"|"+ derefC1, "ldx #{c1}", "$1vb$2xx$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalAa+"|"+ derefC1, "lda #{c1}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalYy+"|"+ derefC1, "ldy #{c1}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c1(.*)", rvalXx+"|"+ derefC1, "ldx #{c1}", "$1vb$2xx$3", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalAa+"|"+"|"+ derefC2, "lda #{c2}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalYy+"|"+"|"+ derefC2, "ldy #{c2}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalXx+"|"+"|"+ derefC2, "ldx #{c2}", "$1vb$2xx$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalAa+"|"+ derefC2, "lda #{c2}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalYy+"|"+ derefC2, "ldy #{c2}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c2(.*)", rvalXx+"|"+ derefC2, "ldx #{c2}", "$1vb$2xx$3", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalAa+"|"+"|"+ derefC3, "lda #{c3}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalYy+"|"+"|"+ derefC3, "ldy #{c3}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalXx+"|"+"|"+ derefC3, "ldx #{c3}", "$1vb$2xx$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalAa+"|"+ derefC3, "lda #{c3}", "$1vb$2aa$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalYy+"|"+ derefC3, "ldy #{c3}", "$1vb$2yy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)vb(.)c3(.*)", rvalXx+"|"+ derefC3, "ldx #{c3}", "$1vb$2xx$3", null, null));
|
||||
|
||||
// Rewrite any signed dereference (.*_derefidx_vbs.*) to unsigned (.*_derefidx_vbu.*)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbs(.*)", null, null, "$1_derefidx_vbu$2", null, null));
|
||||
|
||||
// If no C1 is present in the signature map other Cs down to take its place
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*c2.*)", ".*c1.*", null, "$1", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*c2.*)", ".*c1.*", null, "$1", null, mapC1));
|
||||
// If no C2 is present in the signature map other Cs down to take its place
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*c3.*)", ".*c2.*", null, "$1", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*c3.*)", ".*c2.*", null, "$1", null, mapC2));
|
||||
|
||||
// Rewrite trailing right-size (Z1),y to use AA
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)z1_derefidx_vbuyy", twoZ1+"|"+rvalAa, "lda ({z1}),y", "$1=$2vb$3aa", null, mapZ, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)z1_derefidx_vbuyy", twoZ1+"|"+rvalAa, "lda ({z1}),y", "$1=$2vb$3aa", null, mapZ1, null));
|
||||
// Rewrite trailing right-size (Z1),y to use AA - when 2 Z1
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)z1(.*)pb(.)z1_derefidx_vbuyy", rvalAa, "lda ({z1}),y", "$1z1$2vb$3aa", null, null, null));
|
||||
|
||||
// Rewrite wv.z1=(word)_ror_4 to wv.z1=(word)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vw(.*)z1=(.*)_ror_4", rvalAa, null, "vw$1z1=$2", "lsr {z1}+1\nror {z1}\nlsr {z1}+1\nror {z1}\nlsr {z1}+1\nror {z1}\nlsr {z1}+1\nror {z1}", null, null));
|
||||
|
||||
// Rewrite multiple _derefidx_vbuc1 to use YY
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuc1(.*)_derefidx_vbuc1(.*)", rvalYy+"|"+ threeC1, "ldy #{c1}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapC1));
|
||||
|
||||
// OLD STYLE REWRITES - written when only one rule could be taken
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*)", twoZ1+"|"+twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZC));
|
||||
@ -548,8 +555,8 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuaa(.*)", rvalYy, "tay", "$1=$2_derefidx_vbuyy$3", null, null));
|
||||
|
||||
// Convert array indexing with zero page to x/y register by prefixing ldx z1 / ldy z1 ( ..._derefidx_vbuzn... -> ..._derefidx_vbuxx... / ..._derefidx_vbuyy... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1=$2_derefidx_vbuxx$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1=$2_derefidx_vbuyy$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1=$2_derefidx_vbuxx$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz1(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1=$2_derefidx_vbuyy$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalXx+"|"+twoZ2, "ldx {z2}", "$1=$2_derefidx_vbuxx$3", null, mapZ3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz2(.*)", rvalYy+"|"+twoZ2, "ldy {z2}", "$1=$2_derefidx_vbuyy$3", null, mapZ3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)_derefidx_vbuz3(.*)", rvalYy, "ldy {z3}", "$1=$2_derefidx_vbuyy$3", null, null));
|
||||
@ -558,42 +565,42 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
// Convert array indexing twice with A/zp1/zp2 to X/Y register with a ldx/ldy prefix ( ..._derefidx_vbunn..._derefidx_vbunn... -> ..._derefidx_vbuxx..._derefidx_vbuxx... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuaa(.*)_derefidx_vbuaa(.*)", threeAa+"|"+rvalXx+"|"+lvalDerefIdxAa, "tax", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuaa(.*)_derefidx_vbuaa(.*)", threeAa+"|"+rvalYy+"|"+lvalDerefIdxAa, "tay", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalXx+"|"+lvalDerefIdxZ1, "ldx {z1}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalYy+"|"+lvalDerefIdxZ1, "ldy {z1}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalXx+"|"+lvalDerefIdxZ2, "ldx {z2}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalYy+"|"+lvalDerefIdxZ2, "ldy {z2}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalXx+"|"+lvalDerefIdxZ1, "ldx {z1}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1(.*)_derefidx_vbuz1(.*)", threeZ1+"|"+rvalYy+"|"+lvalDerefIdxZ1, "ldy {z1}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalXx+"|"+lvalDerefIdxZ2, "ldx {z2}", "$1_derefidx_vbuxx$2_derefidx_vbuxx$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz2(.*)_derefidx_vbuz2(.*)", threeZ2+"|"+rvalYy+"|"+lvalDerefIdxZ2, "ldy {z2}", "$1_derefidx_vbuyy$2_derefidx_vbuyy$3", null, mapZ1));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*c1.*)", twoZ1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*z1.*)", twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*c1.*)", twoZ1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuz1=(.*z1.*)", twoC1, null, "vb$1aa=$2", "ldx {z1}\n" + "sta {c1},x", mapC1));
|
||||
|
||||
// Convert X/Y-based array indexing of a constant pointer into A-register by prefixing lda cn,x / lda cn,y ( ...pb.c1_derefidx_vbuxx... / ...pb.c1_derefidx_vbuyy... -> ...vb.aa... )
|
||||
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalAa+"|"+twoC1, "lda {c1},x", "$1=$2vb$3aa$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalYy+"|"+twoC1, "ldy {c1},x", "$1=$2vb$3yy$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalAa+"|"+twoC1, "lda {c1},x", "$1=$2vb$3aa$4", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*)", rvalYy+"|"+twoC1, "ldy {c1},x", "$1=$2vb$3yy$4", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c1.*)pb(.)c1_derefidx_vbuxx(.*)", rvalAa, "lda {c1},x", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuxx(.*c1.*)", rvalAa, "lda {c1},x", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "$1=$2vb$3aa$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalXx+"|"+twoC1, "ldx {c1},y", "$1=$2vb$3xx$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "$1=$2vb$3aa$4", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*)", rvalXx+"|"+twoC1, "ldx {c1},y", "$1=$2vb$3xx$4", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c1.*)pb(.)c1_derefidx_vbuyy(.*)", rvalAa, "lda {c1},y", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c1_derefidx_vbuyy(.*c1.*)", rvalAa, "lda {c1},y", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalAa+"|"+twoC2, "lda {c2},x", "$1=$2vb$3aa$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalYy+"|"+twoC2, "ldy {c2},x", "$1=$2vb$3yy$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalAa+"|"+twoC2, "lda {c2},x", "$1=$2vb$3aa$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*)", rvalYy+"|"+twoC2, "ldy {c2},x", "$1=$2vb$3yy$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c2.*)pb(.)c2_derefidx_vbuxx(.*)", rvalAa, "lda {c2},x", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuxx(.*c2.*)", rvalAa, "lda {c2},x", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalAa+"|"+twoC2, "lda {c2},y", "$1=$2vb$3aa$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalXx+"|"+twoC2, "ldx {c2},y", "$1=$2vb$3xx$4", null, mapC3));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalAa+"|"+twoC2, "lda {c2},y", "$1=$2vb$3aa$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*)", rvalXx+"|"+twoC2, "ldx {c2},y", "$1=$2vb$3xx$4", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*c2.*)pb(.)c2_derefidx_vbuyy(.*)", rvalAa, "lda {c2},y", "$1=$2vb$3aa$4", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)=(.*)pb(.)c2_derefidx_vbuyy(.*c2.*)", rvalAa, "lda {c2},y", "$1=$2vb$3aa$4", null, null));
|
||||
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1_derefidx_vbuyy_$2", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(lt|gt|le|ge|eq|neq)_(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1_derefidx_vbuxx_$2_$3", null, mapZ));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy_(lt|gt|le|ge|eq|neq)_(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "vb$1aa_$2_$3", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(.*)", rvalYy+"|"+twoZ1, "ldy {z1}", "$1_derefidx_vbuyy_$2", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_derefidx_vbuz1_(lt|gt|le|ge|eq|neq)_(.*)", rvalXx+"|"+twoZ1, "ldx {z1}", "$1_derefidx_vbuxx_$2_$3", null, mapZ1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy_(lt|gt|le|ge|eq|neq)_(.*)", rvalAa+"|"+twoC1, "lda {c1},y", "vb$1aa_$2_$3", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuyy_(lt|gt|le|ge|eq|neq)_(.*c1.*)", rvalAa, "lda {c1},y", "vb$1aa_$2_$3", null, null));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx_(lt|gt|le|ge|eq|neq)_(.*)", rvalAa+"|"+twoC1, "lda {c1},x", "vb$1aa_$2_$3", null, mapC2));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx_(lt|gt|le|ge|eq|neq)_(.*)", rvalAa+"|"+twoC1, "lda {c1},x", "vb$1aa_$2_$3", null, mapC1));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx_(lt|gt|le|ge|eq|neq)_(.*c1.*)", rvalAa, "lda {c1},x", "vb$1aa_$2_$3", null, null));
|
||||
|
||||
// Use unsigned ASM to synthesize signed ASM ( ...vbs... -> ...vbu... )
|
||||
@ -608,11 +615,11 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vds..)=(vds..)_(plus|minus)_(vds..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
|
||||
// Use Z1/Z2 ASM to synthesize Z1-only code ( ...z1...z1... -> ...z1...z2... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(v..)z1_(plus|minus|band|bxor|bor)_(.*)", oneZ2, null, "$1z1=$2z2_$3_$4", null, mapZ, false));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(.*)_(plus|minus|band|bxor|bor)_(v..)z1", oneZ2, null, "$1z1=$2_$3_$4z2", null, mapZ, false));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=_(neg|lo|hi)_(v..)z1", oneZ2, null, "$1z1=_$2_$3z2", null, mapZ, false));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(v..)z1_(plus|minus|band|bxor|bor)_(.*)", oneZ2, null, "$1z1=$2z2_$3_$4", null, mapZ1, false));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(.*)_(plus|minus|band|bxor|bor)_(v..)z1", oneZ2, null, "$1z1=$2_$3_$4z2", null, mapZ1, false));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=_(neg|lo|hi)_(v..)z1", oneZ2, null, "$1z1=_$2_$3z2", null, mapZ1, false));
|
||||
|
||||
//synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(v..)z1_(plus|minus|band|bxor|bor)_(v..)z2", null, null, "$1z1=$2z2_$3_$4z3", null, mapZ, false));
|
||||
//synths.add(new AsmFragmentTemplateSynthesisRule("(v..)z1=(v..)z1_(plus|minus|band|bxor|bor)_(v..)z2", null, null, "$1z1=$2z2_$3_$4z3", null, mapZ1, false));
|
||||
|
||||
// Convert INC/DEC to +1/-1 ( ..._inc_xxx... -> ...xxx_plus_1_... / ..._dec_xxx... -> ...xxx_minus_1_... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("vb(.)aa=_inc_(.*)", null, null, "vb$1aa=$2_plus_1", null, null));
|
||||
|
@ -47,7 +47,7 @@ public class TestPrograms {
|
||||
|
||||
@Test
|
||||
public void testBlackhole() throws IOException, URISyntaxException {
|
||||
compileAndCompare("complex/blackhole/blackhole", log());
|
||||
compileAndCompare("complex/blackhole/blackhole", log().verboseFragmentLog());
|
||||
}
|
||||
|
||||
// TODO: Optimize unused IRQ's away (and other unused funtions that reference each other circularly)
|
||||
|
@ -30,10 +30,10 @@ const word NOT_FOUND = 0xffff;
|
||||
|
||||
// Struct holding sprite being processed
|
||||
struct ProcessingSprite {
|
||||
// sprite x-position (24-336)
|
||||
// sprite x-position. Fixed point [12.4]. Values (24-336)
|
||||
word x;
|
||||
// sprite y-position (30-228)
|
||||
byte y;
|
||||
// sprite y-position. Fixed point [12.4]. Values (30-228)
|
||||
word y;
|
||||
// sprite ID (0-7)
|
||||
byte id;
|
||||
// sprite pointer (0-255)
|
||||
@ -55,14 +55,14 @@ struct ProcessingSprite[NUM_PROCESSING] PROCESSING;
|
||||
void main() {
|
||||
// Init squares table
|
||||
initSquareTables();
|
||||
// Copy screen to screen copy
|
||||
for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) *dst = *src;
|
||||
// Init processing array
|
||||
for( byte i: 0..NUM_PROCESSING-1 ) PROCESSING[i] = { 0, 0, 0, 0, STATUS_FREE, 0};
|
||||
// Init sprites
|
||||
initSprites();
|
||||
// Set-up raster interrupts
|
||||
setupRasterIrq(RASTER_IRQ_TOP, &irqTop);
|
||||
// Copy screen to screen copy
|
||||
for( byte* src=SCREEN, dst=SCREEN_COPY; src!=SCREEN+1000; src++, dst++) *dst = *src;
|
||||
// Main loop
|
||||
do {
|
||||
// Look for the non-space closest to the screen center
|
||||
@ -72,10 +72,34 @@ void main() {
|
||||
startProcessing(center);
|
||||
} while(true);
|
||||
do {
|
||||
(*(SCREEN+999))++;
|
||||
(*(COLS+999))++;
|
||||
} while (true);
|
||||
}
|
||||
|
||||
// Find the non-space char closest to the center of the screen
|
||||
// If no non-space char is found the distance will be 0xffff
|
||||
struct ProcessingChar getCharToProcess() {
|
||||
struct ProcessingChar closest = { 0, 0, NOT_FOUND };
|
||||
byte* screen_line = SCREEN_COPY;
|
||||
for( byte y: 0..24) {
|
||||
for( byte x: 0..39) {
|
||||
if(screen_line[x]!=' ') {
|
||||
word dist = SQUARES_X[x]+SQUARES_Y[y];
|
||||
if(dist<closest.dist) {
|
||||
// Update closest char
|
||||
closest = { x, y, dist };
|
||||
}
|
||||
}
|
||||
}
|
||||
screen_line += 40;
|
||||
}
|
||||
if(closest.dist != NOT_FOUND) {
|
||||
// clear the found char on the screen copy
|
||||
*(SCREEN_COPY+(word)closest.y*40+closest.x) = ' ';
|
||||
}
|
||||
return closest;
|
||||
}
|
||||
|
||||
// Start processing a char - by inserting it into the PROCESSING array
|
||||
void startProcessing(struct ProcessingChar center) {
|
||||
// Busy-wait while finding an empty slot in the PROCESSING array
|
||||
@ -104,15 +128,19 @@ void startProcessing(struct ProcessingChar center) {
|
||||
}
|
||||
*PROCPORT = PROCPORT_RAM_IO;
|
||||
asm { cli }
|
||||
word spriteX = BORDER_XPOS_LEFT + (word)center.x*8;
|
||||
byte spriteY = BORDER_YPOS_TOP + center.y*8;
|
||||
word spriteX = (BORDER_XPOS_LEFT + (word)center.x*8) << 4;
|
||||
word spriteY = (BORDER_YPOS_TOP + (word)center.y*8) << 4;
|
||||
byte spritePtr = (byte)(SPRITE_DATA/64)+spriteIdx;
|
||||
// Put the sprite into the PROCESSING array
|
||||
PROCESSING[spriteIdx] = { spriteX, spriteY, spriteIdx, spritePtr, STATUS_NEW, screenPtr };
|
||||
}
|
||||
|
||||
const word XPOS_LEFTMOST = (word)(BORDER_XPOS_LEFT-8)<<4;
|
||||
const word YPOS_UPMOST = (word)(BORDER_YPOS_TOP-8)<<4;
|
||||
|
||||
// Process any chars in the PROCESSING array
|
||||
void processChars() {
|
||||
byte numActive = 0;
|
||||
for( byte i: 0..NUM_PROCESSING-1 ) {
|
||||
struct ProcessingSprite* processing = PROCESSING+i;
|
||||
byte bitmask = 1<<processing->id;
|
||||
@ -127,27 +155,30 @@ void processChars() {
|
||||
// Set status
|
||||
processing->status = STATUS_PROCESSING;
|
||||
}
|
||||
word xpos = processing->x >> 4;
|
||||
// Set sprite position
|
||||
if(>processing->x) {
|
||||
if(>xpos) {
|
||||
*SPRITES_XMSB |= bitmask;
|
||||
} else {
|
||||
*SPRITES_XMSB &= 0xff ^ bitmask;
|
||||
}
|
||||
SPRITES_XPOS[i*2] = (byte)processing->x;
|
||||
SPRITES_YPOS[i*2] = processing->y;
|
||||
SPRITES_XPOS[i*2] = (byte)xpos;
|
||||
SPRITES_YPOS[i*2] = (byte)(processing->y>>4);
|
||||
|
||||
// Move sprite
|
||||
if(processing->x==BORDER_XPOS_LEFT-8 || processing->y==BORDER_YPOS_TOP-8) {
|
||||
if(processing->x < XPOS_LEFTMOST || processing->y < YPOS_UPMOST) {
|
||||
// Set status to FREE
|
||||
processing->status = STATUS_FREE;
|
||||
// Disable the sprite
|
||||
*SPRITES_ENABLE &= 0xff ^ bitmask;
|
||||
} else {
|
||||
(processing->y)--;
|
||||
(processing->x)--;
|
||||
processing->y = processing->y - 16;
|
||||
processing->x = processing->x - 16;
|
||||
}
|
||||
numActive++;
|
||||
}
|
||||
}
|
||||
*(SCREEN+999) = '0'+numActive;
|
||||
}
|
||||
|
||||
// SQUARES_X[i] = (i-20)*(i-20)
|
||||
@ -180,31 +211,6 @@ void initSprites() {
|
||||
*SPRITES_EXPAND_Y = 0;
|
||||
}
|
||||
|
||||
// Find the non-space char closest to the center of the screen
|
||||
// If no non-space char is found the distance will be 0xffff
|
||||
struct ProcessingChar getCharToProcess() {
|
||||
struct ProcessingChar closest = { 0, 0, NOT_FOUND };
|
||||
byte* screen_line = SCREEN_COPY;
|
||||
for( byte y: 0..24) {
|
||||
for( byte x: 0..39) {
|
||||
if(screen_line[x]!=' ') {
|
||||
word dist = SQUARES_X[x]+SQUARES_Y[y];
|
||||
if(dist<closest.dist) {
|
||||
// Update closest char
|
||||
closest = { x, y, dist };
|
||||
}
|
||||
}
|
||||
}
|
||||
screen_line += 40;
|
||||
}
|
||||
if(closest.dist != NOT_FOUND) {
|
||||
// clear the found char on the screen copy
|
||||
*(SCREEN_COPY+(word)closest.y*40+closest.x) = ' ';
|
||||
}
|
||||
return closest;
|
||||
}
|
||||
|
||||
|
||||
// Setup Raster IRQ
|
||||
void setupRasterIrq(word raster, void()* irqRoutine) {
|
||||
asm { sei }
|
||||
|
@ -6,8 +6,10 @@ typedef struct PointDef {
|
||||
uint8 y;
|
||||
} Point;
|
||||
|
||||
typedef Point* PointPtr;
|
||||
|
||||
void main() {
|
||||
Point p = { 4, 7 };
|
||||
Point* SCREEN = 0x0400;
|
||||
PointPtr SCREEN = 0x0400;
|
||||
*SCREEN = p;
|
||||
}
|
@ -3,10 +3,10 @@
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_Y = 2
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 3
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 4
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = 5
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = 6
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 4
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 5
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = 6
|
||||
.const OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = 7
|
||||
// Processor port data direction register
|
||||
.label PROCPORT_DDR = 0
|
||||
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
||||
@ -42,6 +42,8 @@
|
||||
.label IRQ_ENABLE = $d01a
|
||||
// Bits for the IRQ Status/Enable Registers
|
||||
.const IRQ_RASTER = 1
|
||||
// Color Ram
|
||||
.label COLS = $d800
|
||||
// CIA#1 Interrupt Status & Control Register
|
||||
.label CIA1_INTERRUPT = $dc0d
|
||||
// Value that disables all CIA interrupts when stored to the CIA Interrupt registers
|
||||
@ -65,35 +67,13 @@
|
||||
.const STATUS_PROCESSING = 2
|
||||
.const RASTER_IRQ_TOP = $30
|
||||
.const RASTER_IRQ_MIDDLE = $ff
|
||||
.const XPOS_LEFTMOST = BORDER_XPOS_LEFT-8<<4
|
||||
.const YPOS_UPMOST = BORDER_YPOS_TOP-8<<4
|
||||
main: {
|
||||
.label src = 2
|
||||
.label dst = 4
|
||||
.label center_dist = $13
|
||||
jsr initSquareTables
|
||||
ldy #0
|
||||
// Init processing array
|
||||
b1:
|
||||
tya
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
tax
|
||||
lda #0
|
||||
sta PROCESSING,x
|
||||
sta PROCESSING+1,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
||||
lda #STATUS_FREE
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
||||
lda #<0
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
||||
iny
|
||||
cpy #NUM_PROCESSING-1+1
|
||||
bne b1
|
||||
jsr initSprites
|
||||
jsr setupRasterIrq
|
||||
lda #<SCREEN_COPY
|
||||
sta dst
|
||||
lda #>SCREEN_COPY
|
||||
@ -103,7 +83,7 @@ main: {
|
||||
lda #>SCREEN
|
||||
sta src+1
|
||||
// Copy screen to screen copy
|
||||
b3:
|
||||
b1:
|
||||
ldy #0
|
||||
lda (src),y
|
||||
sta (dst),y
|
||||
@ -117,15 +97,43 @@ main: {
|
||||
!:
|
||||
lda src+1
|
||||
cmp #>SCREEN+$3e8
|
||||
bne b3
|
||||
bne b1
|
||||
lda src
|
||||
cmp #<SCREEN+$3e8
|
||||
bne b3
|
||||
bne b1
|
||||
ldy #0
|
||||
// Init processing array
|
||||
b2:
|
||||
tya
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
sty $ff
|
||||
clc
|
||||
adc $ff
|
||||
tax
|
||||
lda #0
|
||||
sta PROCESSING,x
|
||||
sta PROCESSING+1,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x
|
||||
lda #STATUS_FREE
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x
|
||||
lda #<0
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
|
||||
iny
|
||||
cpy #NUM_PROCESSING-1+1
|
||||
bne b2
|
||||
jsr initSprites
|
||||
jsr setupRasterIrq
|
||||
b3:
|
||||
// Main loop
|
||||
jsr getCharToProcess
|
||||
ldy getCharToProcess.return_x
|
||||
ldx getCharToProcess.return_y
|
||||
ldx getCharToProcess.return_x
|
||||
ldy getCharToProcess.return_y
|
||||
lda center_dist+1
|
||||
cmp #>NOT_FOUND
|
||||
bne b5
|
||||
@ -133,37 +141,42 @@ main: {
|
||||
cmp #<NOT_FOUND
|
||||
bne b5
|
||||
b6:
|
||||
inc SCREEN+$3e7
|
||||
inc COLS+$3e7
|
||||
jmp b6
|
||||
b5:
|
||||
sty startProcessing.center_x
|
||||
stx startProcessing.center_y
|
||||
stx startProcessing.center_x
|
||||
sty startProcessing.center_y
|
||||
jsr startProcessing
|
||||
jmp b2
|
||||
jmp b3
|
||||
}
|
||||
// Start processing a char - by inserting it into the PROCESSING array
|
||||
// startProcessing(byte zeropage($1e) center_x, byte zeropage($1f) center_y)
|
||||
// startProcessing(byte zeropage($1f) center_x, byte zeropage($20) center_y)
|
||||
startProcessing: {
|
||||
.label _0 = $20
|
||||
.label _1 = $20
|
||||
.label _2 = $20
|
||||
.label _0 = $21
|
||||
.label _1 = $21
|
||||
.label _2 = $21
|
||||
.label _4 = 9
|
||||
.label _5 = 9
|
||||
.label _7 = 7
|
||||
.label _8 = 7
|
||||
.label _10 = $26
|
||||
.label _11 = $26
|
||||
.label center_x = $1e
|
||||
.label center_y = $1f
|
||||
.label _10 = $27
|
||||
.label _11 = $27
|
||||
.label _12 = $27
|
||||
.label _14 = $29
|
||||
.label _15 = $29
|
||||
.label _16 = $29
|
||||
.label center_x = $1f
|
||||
.label center_y = $20
|
||||
.label i = 6
|
||||
.label screenPtr = $24
|
||||
.label screenPtr = $25
|
||||
.label spriteData = 9
|
||||
.label chargenData = 7
|
||||
.label spriteX = $26
|
||||
.label spritePtr = $28
|
||||
.label spriteX = $27
|
||||
.label spriteY = $29
|
||||
.label spritePtr = $2b
|
||||
.label freeIdx = 6
|
||||
.label _33 = $22
|
||||
.label _34 = $20
|
||||
.label _38 = $23
|
||||
.label _39 = $21
|
||||
ldx #$ff
|
||||
b1:
|
||||
lda #0
|
||||
@ -173,6 +186,8 @@ startProcessing: {
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc i
|
||||
tay
|
||||
lda #STATUS_FREE
|
||||
cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y
|
||||
@ -191,19 +206,19 @@ startProcessing: {
|
||||
sta _0+1
|
||||
lda _0
|
||||
asl
|
||||
sta _33
|
||||
sta _38
|
||||
lda _0+1
|
||||
rol
|
||||
sta _33+1
|
||||
asl _33
|
||||
rol _33+1
|
||||
lda _34
|
||||
sta _38+1
|
||||
asl _38
|
||||
rol _38+1
|
||||
lda _39
|
||||
clc
|
||||
adc _33
|
||||
sta _34
|
||||
lda _34+1
|
||||
adc _33+1
|
||||
sta _34+1
|
||||
adc _38
|
||||
sta _39
|
||||
lda _39+1
|
||||
adc _38+1
|
||||
sta _39+1
|
||||
asl _1
|
||||
rol _1+1
|
||||
asl _1
|
||||
@ -302,18 +317,44 @@ startProcessing: {
|
||||
rol _11+1
|
||||
lda #BORDER_XPOS_LEFT
|
||||
clc
|
||||
adc spriteX
|
||||
sta spriteX
|
||||
adc _12
|
||||
sta _12
|
||||
bcc !+
|
||||
inc spriteX+1
|
||||
inc _12+1
|
||||
!:
|
||||
asl spriteX
|
||||
rol spriteX+1
|
||||
asl spriteX
|
||||
rol spriteX+1
|
||||
asl spriteX
|
||||
rol spriteX+1
|
||||
asl spriteX
|
||||
rol spriteX+1
|
||||
lda center_y
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
sta _14
|
||||
lda #0
|
||||
sta _14+1
|
||||
asl _15
|
||||
rol _15+1
|
||||
asl _15
|
||||
rol _15+1
|
||||
asl _15
|
||||
rol _15+1
|
||||
lda #BORDER_YPOS_TOP
|
||||
clc
|
||||
adc #BORDER_YPOS_TOP
|
||||
tay
|
||||
adc _16
|
||||
sta _16
|
||||
bcc !+
|
||||
inc _16+1
|
||||
!:
|
||||
asl spriteY
|
||||
rol spriteY+1
|
||||
asl spriteY
|
||||
rol spriteY+1
|
||||
asl spriteY
|
||||
rol spriteY+1
|
||||
asl spriteY
|
||||
rol spriteY+1
|
||||
lax freeIdx
|
||||
axs #-[SPRITE_DATA/$40]
|
||||
stx spritePtr
|
||||
@ -321,13 +362,17 @@ startProcessing: {
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc freeIdx
|
||||
tax
|
||||
lda spriteX
|
||||
sta PROCESSING,x
|
||||
lda spriteX+1
|
||||
sta PROCESSING+1,x
|
||||
tya
|
||||
lda spriteY
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x
|
||||
lda spriteY+1
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y+1,x
|
||||
lda freeIdx
|
||||
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x
|
||||
lda spritePtr
|
||||
@ -355,9 +400,9 @@ startProcessing: {
|
||||
// Find the non-space char closest to the center of the screen
|
||||
// If no non-space char is found the distance will be 0xffff
|
||||
getCharToProcess: {
|
||||
.label _9 = $29
|
||||
.label _10 = $29
|
||||
.label _11 = $29
|
||||
.label _9 = $2c
|
||||
.label _10 = $2c
|
||||
.label _11 = $2c
|
||||
.label return_dist = $13
|
||||
.label x = $e
|
||||
.label dist = $13
|
||||
@ -368,8 +413,8 @@ getCharToProcess: {
|
||||
.label closest_dist = $f
|
||||
.label closest_x = $11
|
||||
.label closest_y = $12
|
||||
.label _15 = $2b
|
||||
.label _16 = $29
|
||||
.label _15 = $2e
|
||||
.label _16 = $2c
|
||||
lda #0
|
||||
sta closest_y
|
||||
sta closest_x
|
||||
@ -712,10 +757,16 @@ irqBottom: {
|
||||
}
|
||||
// Process any chars in the PROCESSING array
|
||||
processChars: {
|
||||
.label processing = $2d
|
||||
.label bitmask = $2f
|
||||
.label _17 = $35
|
||||
.label _22 = $37
|
||||
.label _23 = $39
|
||||
.label processing = $30
|
||||
.label bitmask = $32
|
||||
.label i = $1d
|
||||
.label xpos = $33
|
||||
.label numActive = $1e
|
||||
lda #0
|
||||
sta numActive
|
||||
sta i
|
||||
b1:
|
||||
lda i
|
||||
@ -723,6 +774,8 @@ processChars: {
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc i
|
||||
clc
|
||||
adc #<PROCESSING
|
||||
sta processing
|
||||
lda #>PROCESSING
|
||||
@ -778,11 +831,26 @@ processChars: {
|
||||
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
|
||||
sta (processing),y
|
||||
b3:
|
||||
ldy #1
|
||||
ldy #0
|
||||
lda (processing),y
|
||||
sta xpos
|
||||
iny
|
||||
lda (processing),y
|
||||
sta xpos+1
|
||||
lsr xpos+1
|
||||
ror xpos
|
||||
lsr xpos+1
|
||||
ror xpos
|
||||
lsr xpos+1
|
||||
ror xpos
|
||||
lsr xpos+1
|
||||
ror xpos
|
||||
lda xpos+1
|
||||
// Set sprite position
|
||||
cmp #0
|
||||
bne b4
|
||||
beq !b4+
|
||||
jmp b4
|
||||
!b4:
|
||||
lda #$ff
|
||||
eor bitmask
|
||||
and SPRITES_XMSB
|
||||
@ -791,40 +859,78 @@ processChars: {
|
||||
lda i
|
||||
asl
|
||||
tax
|
||||
ldy #0
|
||||
lda (processing),y
|
||||
lda xpos
|
||||
sta SPRITES_XPOS,x
|
||||
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
||||
lda (processing),y
|
||||
sta SPRITES_YPOS,x
|
||||
// Move sprite
|
||||
ldy #0
|
||||
lda (processing),y
|
||||
cmp #<BORDER_XPOS_LEFT-8
|
||||
bne !+
|
||||
sta _17
|
||||
iny
|
||||
lda (processing),y
|
||||
cmp #>BORDER_XPOS_LEFT-8
|
||||
beq b6
|
||||
sta _17+1
|
||||
lsr _17+1
|
||||
ror _17
|
||||
lsr _17+1
|
||||
ror _17
|
||||
lsr _17+1
|
||||
ror _17
|
||||
lsr _17+1
|
||||
ror _17
|
||||
lda _17
|
||||
sta SPRITES_YPOS,x
|
||||
// Move sprite
|
||||
ldy #1
|
||||
lda (processing),y
|
||||
cmp #>XPOS_LEFTMOST
|
||||
bcc b6
|
||||
bne !+
|
||||
dey
|
||||
lda (processing),y
|
||||
cmp #<XPOS_LEFTMOST
|
||||
bcc b6
|
||||
!:
|
||||
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
||||
iny
|
||||
lda (processing),y
|
||||
cmp #>YPOS_UPMOST
|
||||
bcc b6
|
||||
bne !+
|
||||
dey
|
||||
lda (processing),y
|
||||
cmp #<YPOS_UPMOST
|
||||
bcc b6
|
||||
!:
|
||||
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
||||
lda (processing),y
|
||||
cmp #BORDER_YPOS_TOP-8
|
||||
beq b6
|
||||
lda (processing),y
|
||||
sty $ff
|
||||
sec
|
||||
sbc #1
|
||||
sbc #<$10
|
||||
sta _22
|
||||
iny
|
||||
lda (processing),y
|
||||
sbc #>$10
|
||||
sta _22+1
|
||||
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
|
||||
lda _22
|
||||
sta (processing),y
|
||||
iny
|
||||
lda _22+1
|
||||
sta (processing),y
|
||||
ldy #0
|
||||
lda (processing),y
|
||||
sec
|
||||
sbc #1
|
||||
sta (processing),y
|
||||
sbc #<$10
|
||||
sta _23
|
||||
iny
|
||||
lda (processing),y
|
||||
sbc #0
|
||||
sbc #>$10
|
||||
sta _23+1
|
||||
ldy #0
|
||||
lda _23
|
||||
sta (processing),y
|
||||
iny
|
||||
lda _23+1
|
||||
sta (processing),y
|
||||
b7:
|
||||
inc numActive
|
||||
b2:
|
||||
inc i
|
||||
lda #NUM_PROCESSING-1+1
|
||||
@ -832,6 +938,9 @@ processChars: {
|
||||
beq !b1+
|
||||
jmp b1
|
||||
!b1:
|
||||
lax numActive
|
||||
axs #-['0']
|
||||
stx SCREEN+$3e7
|
||||
rts
|
||||
b6:
|
||||
// Set status to FREE
|
||||
@ -843,7 +952,7 @@ processChars: {
|
||||
// Disable the sprite
|
||||
and SPRITES_ENABLE
|
||||
sta SPRITES_ENABLE
|
||||
jmp b2
|
||||
jmp b7
|
||||
b4:
|
||||
lda SPRITES_XMSB
|
||||
ora bitmask
|
||||
@ -897,4 +1006,4 @@ irqTop: {
|
||||
// SQUARES_Y[i] = (i-12)*(i-12)
|
||||
SQUARES_Y: .fill 2*$19, 0
|
||||
// Sprites currently being processed in the interrupt
|
||||
PROCESSING: .fill 8*NUM_PROCESSING, 0
|
||||
PROCESSING: .fill 9*NUM_PROCESSING, 0
|
||||
|
@ -12,414 +12,435 @@ main: scope:[main] from @1
|
||||
[5] call initSquareTables
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main main::@1
|
||||
[6] (byte) main::i#2 ← phi( main::@1/(byte) main::i#1 main/(byte) 0 )
|
||||
[7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3
|
||||
[8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0
|
||||
[9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0
|
||||
[10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0
|
||||
[11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0
|
||||
[12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0
|
||||
[13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0
|
||||
[14] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[15] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1
|
||||
[6] (byte*) main::dst#2 ← phi( main::@1/(byte*) main::dst#1 main/(const byte[$3e8]) SCREEN_COPY#0 )
|
||||
[6] (byte*) main::src#2 ← phi( main::@1/(byte*) main::src#1 main/(const byte*) SCREEN#0 )
|
||||
[7] *((byte*) main::dst#2) ← *((byte*) main::src#2)
|
||||
[8] (byte*) main::src#1 ← ++ (byte*) main::src#2
|
||||
[9] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
|
||||
[10] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[16] phi()
|
||||
[17] call initSprites
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@2
|
||||
[18] phi()
|
||||
[19] call setupRasterIrq
|
||||
main::@2: scope:[main] from main::@1 main::@2
|
||||
[11] (byte) main::i#2 ← phi( main::@1/(byte) 0 main::@2/(byte) main::i#1 )
|
||||
[12] (byte) main::$22 ← (byte) main::i#2 << (byte) 3
|
||||
[13] (byte~) main::$15 ← (byte) main::$22 + (byte) main::i#2
|
||||
[14] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0
|
||||
[15] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0
|
||||
[16] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0
|
||||
[17] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0
|
||||
[18] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0
|
||||
[19] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0
|
||||
[20] (byte) main::i#1 ← ++ (byte) main::i#2
|
||||
[21] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@2
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@3 main::@7
|
||||
[20] (byte*) main::dst#2 ← phi( main::@7/(const byte[$3e8]) SCREEN_COPY#0 main::@3/(byte*) main::dst#1 )
|
||||
[20] (byte*) main::src#2 ← phi( main::@7/(const byte*) SCREEN#0 main::@3/(byte*) main::src#1 )
|
||||
[21] *((byte*) main::dst#2) ← *((byte*) main::src#2)
|
||||
[22] (byte*) main::src#1 ← ++ (byte*) main::src#2
|
||||
[23] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
|
||||
[24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[22] phi()
|
||||
[23] call initSprites
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::@3
|
||||
[24] phi()
|
||||
[25] call setupRasterIrq
|
||||
to:main::@4
|
||||
main::@4: scope:[main] from main::@3 main::@5
|
||||
[25] phi()
|
||||
[26] call getCharToProcess
|
||||
[27] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
|
||||
[28] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
|
||||
[29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
|
||||
main::@4: scope:[main] from main::@5 main::@7
|
||||
[26] phi()
|
||||
[27] call getCharToProcess
|
||||
[28] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
|
||||
[29] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
|
||||
[30] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::@4
|
||||
[30] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
|
||||
[31] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
|
||||
[32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
|
||||
[33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5
|
||||
[31] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
|
||||
[32] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
|
||||
[33] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
|
||||
[34] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::@6 main::@8
|
||||
[34] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7)
|
||||
[35] *((const byte*) COLS#0+(word) $3e7) ← ++ *((const byte*) COLS#0+(word) $3e7)
|
||||
to:main::@6
|
||||
main::@5: scope:[main] from main::@8
|
||||
[35] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
|
||||
[36] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
|
||||
[37] call startProcessing
|
||||
[36] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
|
||||
[37] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
|
||||
[38] call startProcessing
|
||||
to:main::@4
|
||||
startProcessing: scope:[startProcessing] from main::@5
|
||||
[38] phi()
|
||||
[39] phi()
|
||||
to:startProcessing::@1
|
||||
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
|
||||
[39] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
|
||||
[40] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
|
||||
to:startProcessing::@2
|
||||
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
|
||||
[40] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
|
||||
[41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3
|
||||
[42] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$24)!=(const byte) STATUS_FREE#0) goto startProcessing::@3
|
||||
[41] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
|
||||
[42] (byte) startProcessing::$36 ← (byte) startProcessing::i#2 << (byte) 3
|
||||
[43] (byte~) startProcessing::$27 ← (byte) startProcessing::$36 + (byte) startProcessing::i#2
|
||||
[44] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$27)!=(const byte) STATUS_FREE#0) goto startProcessing::@3
|
||||
to:startProcessing::@4
|
||||
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
|
||||
[43] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
|
||||
[44] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
|
||||
[45] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
|
||||
[46] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
|
||||
to:startProcessing::@5
|
||||
startProcessing::@5: scope:[startProcessing] from startProcessing::@4
|
||||
[45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0
|
||||
[46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2
|
||||
[47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0
|
||||
[48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3
|
||||
[49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1
|
||||
[50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0
|
||||
[51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2
|
||||
[52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6
|
||||
[53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5
|
||||
[54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0)
|
||||
[55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0
|
||||
[56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3
|
||||
[57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8
|
||||
[47] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0
|
||||
[48] (word) startProcessing::$38 ← (word~) startProcessing::$0 << (byte) 2
|
||||
[49] (word) startProcessing::$39 ← (word) startProcessing::$38 + (word~) startProcessing::$0
|
||||
[50] (word~) startProcessing::$1 ← (word) startProcessing::$39 << (byte) 3
|
||||
[51] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1
|
||||
[52] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0
|
||||
[53] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2
|
||||
[54] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6
|
||||
[55] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5
|
||||
[56] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0)
|
||||
[57] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0
|
||||
[58] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3
|
||||
[59] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8
|
||||
asm { sei }
|
||||
[59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0
|
||||
[61] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0
|
||||
to:startProcessing::@6
|
||||
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
|
||||
[60] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
|
||||
[60] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
|
||||
[60] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 )
|
||||
[61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2)
|
||||
[62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
|
||||
[63] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2
|
||||
[64] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
|
||||
[65] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
|
||||
[62] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
|
||||
[62] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
|
||||
[62] (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@5/(byte*) startProcessing::chargenData#0 startProcessing::@6/(byte*) startProcessing::chargenData#1 )
|
||||
[63] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2)
|
||||
[64] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
|
||||
[65] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2
|
||||
[66] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
|
||||
[67] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6
|
||||
to:startProcessing::@7
|
||||
startProcessing::@7: scope:[startProcessing] from startProcessing::@6
|
||||
[66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[68] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
asm { cli }
|
||||
[68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0
|
||||
[69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3
|
||||
[70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11
|
||||
[71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3
|
||||
[72] (byte) startProcessing::spriteY#0 ← (const byte) BORDER_YPOS_TOP#0 + (byte~) startProcessing::$13
|
||||
[73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
|
||||
[74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3
|
||||
[75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0
|
||||
[76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0
|
||||
[77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2
|
||||
[78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0
|
||||
[79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0
|
||||
[80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0
|
||||
[70] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0
|
||||
[71] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3
|
||||
[72] (word~) startProcessing::$12 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11
|
||||
[73] (word) startProcessing::spriteX#0 ← (word~) startProcessing::$12 << (byte) 4
|
||||
[74] (word~) startProcessing::$14 ← (word)(byte) startProcessing::center_y#0
|
||||
[75] (word~) startProcessing::$15 ← (word~) startProcessing::$14 << (byte) 3
|
||||
[76] (word~) startProcessing::$16 ← (const byte) BORDER_YPOS_TOP#0 + (word~) startProcessing::$15
|
||||
[77] (word) startProcessing::spriteY#0 ← (word~) startProcessing::$16 << (byte) 4
|
||||
[78] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
|
||||
[79] (byte) startProcessing::$41 ← (byte) startProcessing::freeIdx#2 << (byte) 3
|
||||
[80] (byte~) startProcessing::$28 ← (byte) startProcessing::$41 + (byte) startProcessing::freeIdx#2
|
||||
[81] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$28) ← (word) startProcessing::spriteX#0
|
||||
[82] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$28) ← (word) startProcessing::spriteY#0
|
||||
[83] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$28) ← (byte) startProcessing::freeIdx#2
|
||||
[84] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$28) ← (byte) startProcessing::spritePtr#0
|
||||
[85] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$28) ← (const byte) STATUS_NEW#0
|
||||
[86] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$28) ← (byte*) startProcessing::screenPtr#0
|
||||
to:startProcessing::@return
|
||||
startProcessing::@return: scope:[startProcessing] from startProcessing::@7
|
||||
[81] return
|
||||
[87] return
|
||||
to:@return
|
||||
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
|
||||
[82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
|
||||
[88] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
|
||||
to:startProcessing::@1
|
||||
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
|
||||
[83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
|
||||
[84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2
|
||||
[89] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
|
||||
[90] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2
|
||||
to:startProcessing::@9
|
||||
startProcessing::@9: scope:[startProcessing] from startProcessing::@3
|
||||
[85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
|
||||
[91] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
|
||||
to:startProcessing::@4
|
||||
getCharToProcess: scope:[getCharToProcess] from main::@4
|
||||
[86] phi()
|
||||
[92] phi()
|
||||
to:getCharToProcess::@1
|
||||
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
|
||||
[87] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
|
||||
[87] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
|
||||
[87] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
|
||||
[87] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
|
||||
[87] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
|
||||
[93] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
|
||||
[93] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
|
||||
[93] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
|
||||
[93] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
|
||||
[93] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
|
||||
to:getCharToProcess::@2
|
||||
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
|
||||
[88] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
|
||||
[88] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
|
||||
[88] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
|
||||
[88] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
|
||||
[89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
|
||||
[94] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
|
||||
[94] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
|
||||
[94] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
|
||||
[94] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
|
||||
[95] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
|
||||
to:getCharToProcess::@4
|
||||
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
|
||||
[90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
|
||||
[91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
|
||||
[92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
|
||||
[93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
|
||||
[96] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
|
||||
[97] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
|
||||
[98] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
|
||||
[99] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
|
||||
to:getCharToProcess::@5
|
||||
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
|
||||
[94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
|
||||
[95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
|
||||
[100] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
|
||||
[101] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
|
||||
to:getCharToProcess::@3
|
||||
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
|
||||
[96] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
|
||||
[96] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
|
||||
[96] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
|
||||
[97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
|
||||
[98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
|
||||
[102] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
|
||||
[102] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
|
||||
[102] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
|
||||
[103] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
|
||||
[104] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
|
||||
to:getCharToProcess::@6
|
||||
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
|
||||
[99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
|
||||
[100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
|
||||
[101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
|
||||
[105] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
|
||||
[106] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
|
||||
[107] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
|
||||
to:getCharToProcess::@7
|
||||
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
|
||||
[102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
|
||||
[108] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
|
||||
to:getCharToProcess::@8
|
||||
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
|
||||
[103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
|
||||
[104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
|
||||
[105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
|
||||
[106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
|
||||
[107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
|
||||
[108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
|
||||
[109] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
|
||||
[110] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
|
||||
[111] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
|
||||
[112] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
|
||||
[113] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
|
||||
[114] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
|
||||
to:getCharToProcess::@return
|
||||
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
|
||||
[109] return
|
||||
[115] return
|
||||
to:@return
|
||||
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
|
||||
[110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
|
||||
[116] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
|
||||
to:getCharToProcess::@1
|
||||
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
|
||||
[111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
|
||||
[117] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
|
||||
to:getCharToProcess::@2
|
||||
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
|
||||
[112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
|
||||
[118] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
|
||||
to:getCharToProcess::@3
|
||||
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
|
||||
[113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
|
||||
[119] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
|
||||
to:getCharToProcess::@3
|
||||
setupRasterIrq: scope:[setupRasterIrq] from main::@7
|
||||
asm { sei }
|
||||
[115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
|
||||
[121] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
|
||||
[122] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
|
||||
[123] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
|
||||
to:setupRasterIrq::@1
|
||||
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
|
||||
[118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
|
||||
[124] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
|
||||
to:setupRasterIrq::@2
|
||||
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
|
||||
[119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
|
||||
[120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
|
||||
[121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
|
||||
[125] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
|
||||
[126] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
|
||||
[127] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
|
||||
asm { cli }
|
||||
to:setupRasterIrq::@return
|
||||
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
|
||||
[123] return
|
||||
[129] return
|
||||
to:@return
|
||||
initSprites: scope:[initSprites] from main::@2
|
||||
[124] phi()
|
||||
initSprites: scope:[initSprites] from main::@3
|
||||
[130] phi()
|
||||
to:initSprites::@1
|
||||
initSprites::@1: scope:[initSprites] from initSprites initSprites::@1
|
||||
[125] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
|
||||
[126] *((byte*) initSprites::sp#2) ← (byte) 0
|
||||
[127] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
|
||||
[128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
|
||||
[131] (byte*) initSprites::sp#2 ← phi( initSprites/(const byte*) SPRITE_DATA#0 initSprites::@1/(byte*) initSprites::sp#1 )
|
||||
[132] *((byte*) initSprites::sp#2) ← (byte) 0
|
||||
[133] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2
|
||||
[134] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1
|
||||
to:initSprites::@2
|
||||
initSprites::@2: scope:[initSprites] from initSprites::@1 initSprites::@2
|
||||
[129] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
|
||||
[130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
|
||||
[131] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
|
||||
[132] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
|
||||
[135] (byte) initSprites::i#2 ← phi( initSprites::@1/(byte) 0 initSprites::@2/(byte) initSprites::i#1 )
|
||||
[136] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0
|
||||
[137] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2
|
||||
[138] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2
|
||||
to:initSprites::@3
|
||||
initSprites::@3: scope:[initSprites] from initSprites::@2
|
||||
[133] *((const byte*) SPRITES_MC#0) ← (byte) 0
|
||||
[134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
|
||||
[135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
|
||||
[139] *((const byte*) SPRITES_MC#0) ← (byte) 0
|
||||
[140] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0
|
||||
[141] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0
|
||||
to:initSprites::@return
|
||||
initSprites::@return: scope:[initSprites] from initSprites::@3
|
||||
[136] return
|
||||
[142] return
|
||||
to:@return
|
||||
initSquareTables: scope:[initSquareTables] from main
|
||||
[137] phi()
|
||||
[143] phi()
|
||||
to:initSquareTables::@1
|
||||
initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@9
|
||||
[138] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 )
|
||||
[139] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
|
||||
[144] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 )
|
||||
[145] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
|
||||
to:initSquareTables::@3
|
||||
initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1
|
||||
[140] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
|
||||
[146] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
|
||||
to:initSquareTables::@4
|
||||
initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3
|
||||
[141] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 )
|
||||
[142] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
|
||||
[143] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
||||
[144] call mul8u
|
||||
[145] (word) mul8u::return#2 ← (word) mul8u::res#2
|
||||
[147] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 )
|
||||
[148] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
|
||||
[149] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
|
||||
[150] call mul8u
|
||||
[151] (word) mul8u::return#2 ← (word) mul8u::res#2
|
||||
to:initSquareTables::@9
|
||||
initSquareTables::@9: scope:[initSquareTables] from initSquareTables::@4
|
||||
[146] (word~) initSquareTables::$6 ← (word) mul8u::return#2
|
||||
[147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1
|
||||
[148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
|
||||
[149] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2
|
||||
[150] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1
|
||||
[152] (word~) initSquareTables::$6 ← (word) mul8u::return#2
|
||||
[153] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1
|
||||
[154] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
|
||||
[155] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2
|
||||
[156] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1
|
||||
to:initSquareTables::@5
|
||||
initSquareTables::@5: scope:[initSquareTables] from initSquareTables::@10 initSquareTables::@9
|
||||
[151] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 )
|
||||
[152] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6
|
||||
[157] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 )
|
||||
[158] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6
|
||||
to:initSquareTables::@7
|
||||
initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5
|
||||
[153] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
|
||||
[159] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
|
||||
to:initSquareTables::@8
|
||||
initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@6 initSquareTables::@7
|
||||
[154] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 )
|
||||
[155] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
|
||||
[156] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
||||
[157] call mul8u
|
||||
[158] (word) mul8u::return#3 ← (word) mul8u::res#2
|
||||
[160] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 )
|
||||
[161] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
|
||||
[162] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
|
||||
[163] call mul8u
|
||||
[164] (word) mul8u::return#3 ← (word) mul8u::res#2
|
||||
to:initSquareTables::@10
|
||||
initSquareTables::@10: scope:[initSquareTables] from initSquareTables::@8
|
||||
[159] (word~) initSquareTables::$14 ← (word) mul8u::return#3
|
||||
[160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1
|
||||
[161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
|
||||
[162] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2
|
||||
[163] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5
|
||||
[165] (word~) initSquareTables::$14 ← (word) mul8u::return#3
|
||||
[166] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1
|
||||
[167] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
|
||||
[168] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2
|
||||
[169] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5
|
||||
to:initSquareTables::@return
|
||||
initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@10
|
||||
[164] return
|
||||
to:@return
|
||||
initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5
|
||||
[165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2
|
||||
to:initSquareTables::@8
|
||||
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
|
||||
[166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2
|
||||
to:initSquareTables::@4
|
||||
mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8
|
||||
[167] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
|
||||
[167] (word) mul8u::mb#0 ← phi( initSquareTables::@8/(byte) mul8u::b#1 initSquareTables::@4/(byte) mul8u::b#0 )
|
||||
to:mul8u::@1
|
||||
mul8u::@1: scope:[mul8u] from mul8u mul8u::@3
|
||||
[168] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 )
|
||||
[168] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 )
|
||||
[168] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 )
|
||||
[169] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
|
||||
to:mul8u::@return
|
||||
mul8u::@return: scope:[mul8u] from mul8u::@1
|
||||
[170] return
|
||||
to:@return
|
||||
initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5
|
||||
[171] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2
|
||||
to:initSquareTables::@8
|
||||
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
|
||||
[172] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2
|
||||
to:initSquareTables::@4
|
||||
mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8
|
||||
[173] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
|
||||
[173] (word) mul8u::mb#0 ← phi( initSquareTables::@8/(byte) mul8u::b#1 initSquareTables::@4/(byte) mul8u::b#0 )
|
||||
to:mul8u::@1
|
||||
mul8u::@1: scope:[mul8u] from mul8u mul8u::@3
|
||||
[174] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 )
|
||||
[174] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 )
|
||||
[174] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 )
|
||||
[175] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
|
||||
to:mul8u::@return
|
||||
mul8u::@return: scope:[mul8u] from mul8u::@1
|
||||
[176] return
|
||||
to:@return
|
||||
mul8u::@2: scope:[mul8u] from mul8u::@1
|
||||
[171] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
|
||||
[172] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
|
||||
[177] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
|
||||
[178] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
|
||||
to:mul8u::@4
|
||||
mul8u::@4: scope:[mul8u] from mul8u::@2
|
||||
[173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
|
||||
[179] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2
|
||||
to:mul8u::@3
|
||||
mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4
|
||||
[174] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
|
||||
[175] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1
|
||||
[176] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
|
||||
[180] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
|
||||
[181] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1
|
||||
[182] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
|
||||
to:mul8u::@1
|
||||
irqBottom: scope:[irqBottom] from
|
||||
[177] phi()
|
||||
[183] phi()
|
||||
to:irqBottom::@1
|
||||
irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1
|
||||
[178] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 )
|
||||
[179] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2
|
||||
[180] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1
|
||||
[184] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 )
|
||||
[185] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2
|
||||
[186] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1
|
||||
to:irqBottom::@2
|
||||
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
|
||||
[181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
||||
[182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
||||
[183] call processChars
|
||||
[187] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
||||
[188] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
||||
[189] call processChars
|
||||
to:irqBottom::@3
|
||||
irqBottom::@3: scope:[irqBottom] from irqBottom::@2
|
||||
[184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
||||
[186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
|
||||
[187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
[188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
[190] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[191] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
||||
[192] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
|
||||
[193] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
[194] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
to:irqBottom::@return
|
||||
irqBottom::@return: scope:[irqBottom] from irqBottom::@3
|
||||
[189] return
|
||||
[195] return
|
||||
to:@return
|
||||
processChars: scope:[processChars] from irqBottom::@2
|
||||
[190] phi()
|
||||
[196] phi()
|
||||
to:processChars::@1
|
||||
processChars::@1: scope:[processChars] from processChars processChars::@2
|
||||
[191] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
|
||||
[192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3
|
||||
[193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21
|
||||
[194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
||||
[195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2
|
||||
to:processChars::@9
|
||||
processChars::@9: scope:[processChars] from processChars::@1
|
||||
[196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
|
||||
[197] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
|
||||
[197] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
|
||||
[198] (byte) processChars::$44 ← (byte) processChars::i#10 << (byte) 3
|
||||
[199] (byte~) processChars::$26 ← (byte) processChars::$44 + (byte) processChars::i#10
|
||||
[200] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$26
|
||||
[201] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
|
||||
[202] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2
|
||||
to:processChars::@10
|
||||
processChars::@10: scope:[processChars] from processChars::@9
|
||||
[197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
|
||||
[198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
|
||||
[199] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
|
||||
[200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
|
||||
to:processChars::@3
|
||||
processChars::@3: scope:[processChars] from processChars::@10 processChars::@9
|
||||
[201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0)
|
||||
[202] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4
|
||||
to:processChars::@7
|
||||
processChars::@7: scope:[processChars] from processChars::@3
|
||||
[203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
||||
[204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10
|
||||
to:processChars::@5
|
||||
processChars::@5: scope:[processChars] from processChars::@4 processChars::@7
|
||||
[205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1
|
||||
[206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0)
|
||||
[207] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12
|
||||
[208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)
|
||||
[209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6
|
||||
processChars::@10: scope:[processChars] from processChars::@1
|
||||
[203] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
|
||||
to:processChars::@11
|
||||
processChars::@11: scope:[processChars] from processChars::@5
|
||||
[210] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)==(const byte) BORDER_YPOS_TOP#0-(byte) 8) goto processChars::@6
|
||||
processChars::@11: scope:[processChars] from processChars::@10
|
||||
[204] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
|
||||
[205] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
|
||||
[206] *((const byte*) SCREEN#0+(const word) SPRITE_PTRS#0 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR)
|
||||
[207] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
|
||||
to:processChars::@3
|
||||
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
|
||||
[208] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
|
||||
[209] (byte~) processChars::$12 ← > (word) processChars::xpos#0
|
||||
[210] if((byte) 0!=(byte~) processChars::$12) goto processChars::@4
|
||||
to:processChars::@8
|
||||
processChars::@8: scope:[processChars] from processChars::@11
|
||||
[211] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← -- *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)
|
||||
[212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0)
|
||||
processChars::@8: scope:[processChars] from processChars::@3
|
||||
[211] (byte~) processChars::$13 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
||||
[212] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$13
|
||||
to:processChars::@5
|
||||
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
|
||||
[213] (byte~) processChars::$16 ← (byte) processChars::i#10 << (byte) 1
|
||||
[214] (byte~) processChars::$15 ← (byte)(word) processChars::xpos#0
|
||||
[215] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$16) ← (byte~) processChars::$15
|
||||
[216] (word~) processChars::$17 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
|
||||
[217] (byte~) processChars::$18 ← (byte)(word~) processChars::$17
|
||||
[218] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$16) ← (byte~) processChars::$18
|
||||
[219] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
|
||||
to:processChars::@13
|
||||
processChars::@13: scope:[processChars] from processChars::@5
|
||||
[220] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_UPMOST#0) goto processChars::@6
|
||||
to:processChars::@9
|
||||
processChars::@9: scope:[processChars] from processChars::@13
|
||||
[221] (word~) processChars::$22 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) - (byte) $10
|
||||
[222] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← (word~) processChars::$22
|
||||
[223] (word~) processChars::$23 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) - (byte) $10
|
||||
[224] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← (word~) processChars::$23
|
||||
to:processChars::@7
|
||||
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
|
||||
[225] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
|
||||
to:processChars::@2
|
||||
processChars::@2: scope:[processChars] from processChars::@1 processChars::@6 processChars::@8
|
||||
[213] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
|
||||
[214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
|
||||
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
|
||||
[226] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
|
||||
[227] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
|
||||
[228] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
|
||||
to:processChars::@12
|
||||
processChars::@12: scope:[processChars] from processChars::@2
|
||||
[229] (byte~) processChars::$1 ← (byte) '0' + (byte) processChars::numActive#3
|
||||
[230] *((const byte*) SCREEN#0+(word) $3e7) ← (byte~) processChars::$1
|
||||
to:processChars::@return
|
||||
processChars::@return: scope:[processChars] from processChars::@2
|
||||
[215] return
|
||||
processChars::@return: scope:[processChars] from processChars::@12
|
||||
[231] return
|
||||
to:@return
|
||||
processChars::@6: scope:[processChars] from processChars::@11 processChars::@5
|
||||
[216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
|
||||
[217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
||||
[218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19
|
||||
to:processChars::@2
|
||||
processChars::@6: scope:[processChars] from processChars::@13 processChars::@5
|
||||
[232] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
|
||||
[233] (byte~) processChars::$24 ← (byte) $ff ^ (byte) processChars::bitmask#0
|
||||
[234] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$24
|
||||
to:processChars::@7
|
||||
processChars::@4: scope:[processChars] from processChars::@3
|
||||
[219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
|
||||
[235] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
|
||||
to:processChars::@5
|
||||
irqTop: scope:[irqTop] from
|
||||
[220] phi()
|
||||
[236] phi()
|
||||
to:irqTop::@1
|
||||
irqTop::@1: scope:[irqTop] from irqTop irqTop::@1
|
||||
[221] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 )
|
||||
[222] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2
|
||||
[223] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1
|
||||
[237] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 )
|
||||
[238] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2
|
||||
[239] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1
|
||||
to:irqTop::@2
|
||||
irqTop::@2: scope:[irqTop] from irqTop::@1
|
||||
[224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
||||
[225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
||||
[240] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
|
||||
[241] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
|
||||
to:irqTop::@3
|
||||
irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3
|
||||
[226] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 )
|
||||
[227] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2
|
||||
[228] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3
|
||||
[242] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 )
|
||||
[243] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2
|
||||
[244] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3
|
||||
to:irqTop::@4
|
||||
irqTop::@4: scope:[irqTop] from irqTop::@3
|
||||
[229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
||||
[231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
|
||||
[232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
|
||||
[233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
[245] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
|
||||
[246] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
|
||||
[247] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
|
||||
[248] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
|
||||
[249] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
|
||||
to:irqTop::@return
|
||||
irqTop::@return: scope:[irqTop] from irqTop::@4
|
||||
[234] return
|
||||
[250] return
|
||||
to:@return
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,8 @@
|
||||
(const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333
|
||||
(byte) CIA_INTERRUPT_CLEAR
|
||||
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
|
||||
(byte*) COLS
|
||||
(const byte*) COLS#0 COLS = (byte*) 55296
|
||||
(void()**) HARDWARE_IRQ
|
||||
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
|
||||
(byte*) IRQ_ENABLE
|
||||
@ -31,10 +33,10 @@
|
||||
(const word) NOT_FOUND#0 NOT_FOUND = (word) $ffff
|
||||
(byte) NUM_PROCESSING
|
||||
(const byte) NUM_PROCESSING#0 NUM_PROCESSING = (byte) 8
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 3
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 4
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = (byte) 6
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = (byte) 5
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 4
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 5
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = (byte) 7
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS OFFSET_STRUCT_PROCESSINGSPRITE_STATUS = (byte) 6
|
||||
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y OFFSET_STRUCT_PROCESSINGSPRITE_Y = (byte) 2
|
||||
(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING
|
||||
(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 PROCESSING = { fill( NUM_PROCESSING#0, 0) }
|
||||
@ -56,7 +58,7 @@
|
||||
(byte*) ProcessingSprite::screenPtr
|
||||
(byte) ProcessingSprite::status
|
||||
(word) ProcessingSprite::x
|
||||
(byte) ProcessingSprite::y
|
||||
(word) ProcessingSprite::y
|
||||
(byte*) RASTER
|
||||
(const byte*) RASTER#0 RASTER = (byte*) 53266
|
||||
(byte) RASTER_IRQ_MIDDLE
|
||||
@ -101,14 +103,18 @@
|
||||
(const byte*) VIC_CONTROL#0 VIC_CONTROL = (byte*) 53265
|
||||
(byte) WHITE
|
||||
(const byte) WHITE#0 WHITE = (byte) 1
|
||||
(word) XPOS_LEFTMOST
|
||||
(const word) XPOS_LEFTMOST#0 XPOS_LEFTMOST = (word)(const byte) BORDER_XPOS_LEFT#0-(byte) 8<<(byte) 4
|
||||
(word) YPOS_UPMOST
|
||||
(const word) YPOS_UPMOST#0 YPOS_UPMOST = (word)(const byte) BORDER_YPOS_TOP#0-(byte) 8<<(byte) 4
|
||||
(struct ProcessingChar()) getCharToProcess()
|
||||
(word~) getCharToProcess::$10 $10 zp ZP_WORD:41 4.0
|
||||
(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:41 4.0
|
||||
(word~) getCharToProcess::$10 $10 zp ZP_WORD:44 4.0
|
||||
(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:44 4.0
|
||||
(byte~) getCharToProcess::$13 reg byte x 1001.0
|
||||
(byte~) getCharToProcess::$14 reg byte a 2002.0
|
||||
(word) getCharToProcess::$15 $15 zp ZP_WORD:43 4.0
|
||||
(word) getCharToProcess::$16 $16 zp ZP_WORD:41 4.0
|
||||
(word~) getCharToProcess::$9 $9 zp ZP_WORD:41 3.0
|
||||
(word) getCharToProcess::$15 $15 zp ZP_WORD:46 4.0
|
||||
(word) getCharToProcess::$16 $16 zp ZP_WORD:44 4.0
|
||||
(word~) getCharToProcess::$9 $9 zp ZP_WORD:44 3.0
|
||||
(label) getCharToProcess::@1
|
||||
(label) getCharToProcess::@10
|
||||
(label) getCharToProcess::@11
|
||||
@ -143,11 +149,11 @@
|
||||
(word~) getCharToProcess::return_dist#5 return_dist zp ZP_WORD:19 2002.0
|
||||
(word~) getCharToProcess::return_dist#6 return_dist zp ZP_WORD:19 2002.0
|
||||
(byte) getCharToProcess::return_x
|
||||
(byte) getCharToProcess::return_x#0 reg byte y 7.333333333333333
|
||||
(byte) getCharToProcess::return_x#0 reg byte x 7.333333333333333
|
||||
(byte) getCharToProcess::return_x#1 return_x zp ZP_BYTE:17 242.23529411764704
|
||||
(byte~) getCharToProcess::return_x#7 return_x zp ZP_BYTE:17 1001.0
|
||||
(byte) getCharToProcess::return_y
|
||||
(byte) getCharToProcess::return_y#0 reg byte x 7.333333333333333
|
||||
(byte) getCharToProcess::return_y#0 reg byte y 7.333333333333333
|
||||
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:18 228.66666666666669
|
||||
(byte~) getCharToProcess::return_y#7 return_y zp ZP_BYTE:18 2002.0
|
||||
(byte*) getCharToProcess::screen_line
|
||||
@ -222,6 +228,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(byte) irqTop::i1#2 reg byte x 22.0
|
||||
(void()) main()
|
||||
(byte~) main::$15 reg byte x 12.833333333333334
|
||||
(byte) main::$22 reg byte a 22.0
|
||||
(struct ProcessingChar~) main::$8
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
@ -235,15 +242,15 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(word) main::center_dist
|
||||
(word) main::center_dist#0 center_dist zp ZP_WORD:19 22.0
|
||||
(byte) main::center_x
|
||||
(byte) main::center_x#0 reg byte y 5.5
|
||||
(byte) main::center_x#0 reg byte x 5.5
|
||||
(byte) main::center_y
|
||||
(byte) main::center_y#0 reg byte x 5.5
|
||||
(byte) main::center_y#0 reg byte y 5.5
|
||||
(byte*) main::dst
|
||||
(byte*) main::dst#1 dst zp ZP_WORD:4 11.0
|
||||
(byte*) main::dst#2 dst zp ZP_WORD:4 11.0
|
||||
(byte) main::i
|
||||
(byte) main::i#1 reg byte y 16.5
|
||||
(byte) main::i#2 reg byte y 4.125
|
||||
(byte) main::i#2 reg byte y 4.888888888888889
|
||||
(byte*) main::src
|
||||
(byte*) main::src#1 src zp ZP_WORD:2 11.0
|
||||
(byte*) main::src#2 src zp ZP_WORD:2 16.5
|
||||
@ -275,15 +282,23 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(word) mul8u::return#2 return zp ZP_WORD:25 22.0
|
||||
(word) mul8u::return#3 return zp ZP_WORD:25 22.0
|
||||
(void()) processChars()
|
||||
(byte~) processChars::$10 reg byte a 22.0
|
||||
(byte~) processChars::$1 reg byte x 4.0
|
||||
(byte~) processChars::$12 reg byte a 22.0
|
||||
(byte~) processChars::$13 reg byte x 11.0
|
||||
(byte~) processChars::$19 reg byte a 22.0
|
||||
(byte~) processChars::$21 reg byte a 22.0
|
||||
(byte~) processChars::$9 reg byte a 22.0
|
||||
(byte~) processChars::$13 reg byte a 22.0
|
||||
(byte~) processChars::$15 reg byte a 22.0
|
||||
(byte~) processChars::$16 reg byte x 6.6000000000000005
|
||||
(word~) processChars::$17 $17 zp ZP_WORD:53 11.0
|
||||
(byte~) processChars::$18 reg byte a 22.0
|
||||
(word~) processChars::$22 $22 zp ZP_WORD:55 22.0
|
||||
(word~) processChars::$23 $23 zp ZP_WORD:57 22.0
|
||||
(byte~) processChars::$24 reg byte a 22.0
|
||||
(byte~) processChars::$26 reg byte a 22.0
|
||||
(byte) processChars::$44 reg byte a 22.0
|
||||
(label) processChars::@1
|
||||
(label) processChars::@10
|
||||
(label) processChars::@11
|
||||
(label) processChars::@12
|
||||
(label) processChars::@13
|
||||
(label) processChars::@2
|
||||
(label) processChars::@3
|
||||
(label) processChars::@4
|
||||
@ -294,12 +309,18 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(label) processChars::@9
|
||||
(label) processChars::@return
|
||||
(byte) processChars::bitmask
|
||||
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:47 2.8947368421052633
|
||||
(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:50 2.5
|
||||
(byte) processChars::i
|
||||
(byte) processChars::i#1 i zp ZP_BYTE:29 16.5
|
||||
(byte) processChars::i#10 i zp ZP_BYTE:29 1.6923076923076923
|
||||
(byte) processChars::i#10 i zp ZP_BYTE:29 1.6176470588235294
|
||||
(byte) processChars::numActive
|
||||
(byte) processChars::numActive#1 numActive zp ZP_BYTE:30 22.0
|
||||
(byte) processChars::numActive#10 numActive zp ZP_BYTE:30 1.03125
|
||||
(byte) processChars::numActive#3 numActive zp ZP_BYTE:30 11.666666666666666
|
||||
(struct ProcessingSprite*) processChars::processing
|
||||
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:45 0.55
|
||||
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:48 0.44
|
||||
(word) processChars::xpos
|
||||
(word) processChars::xpos#0 xpos zp ZP_WORD:51 3.142857142857143
|
||||
(void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine)
|
||||
(label) setupRasterIrq::@1
|
||||
(label) setupRasterIrq::@2
|
||||
@ -308,17 +329,22 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(const void()*) setupRasterIrq::irqRoutine#0 irqRoutine = &interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(word) setupRasterIrq::raster
|
||||
(void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist)
|
||||
(word~) startProcessing::$0 $0 zp ZP_WORD:32 3.0
|
||||
(word~) startProcessing::$1 $1 zp ZP_WORD:32 4.0
|
||||
(word~) startProcessing::$10 $10 zp ZP_WORD:38 4.0
|
||||
(word~) startProcessing::$11 $11 zp ZP_WORD:38 4.0
|
||||
(byte~) startProcessing::$13 reg byte a 4.0
|
||||
(byte*~) startProcessing::$2 $2 zp ZP_WORD:32 1.2000000000000002
|
||||
(byte~) startProcessing::$24 reg byte a 2002.0
|
||||
(byte~) startProcessing::$25 reg byte x 2.333333333333333
|
||||
(word) startProcessing::$33 $33 zp ZP_WORD:34 4.0
|
||||
(word) startProcessing::$34 $34 zp ZP_WORD:32 4.0
|
||||
(word~) startProcessing::$0 $0 zp ZP_WORD:33 3.0
|
||||
(word~) startProcessing::$1 $1 zp ZP_WORD:33 4.0
|
||||
(word~) startProcessing::$10 $10 zp ZP_WORD:39 4.0
|
||||
(word~) startProcessing::$11 $11 zp ZP_WORD:39 4.0
|
||||
(word~) startProcessing::$12 $12 zp ZP_WORD:39 4.0
|
||||
(word~) startProcessing::$14 $14 zp ZP_WORD:41 4.0
|
||||
(word~) startProcessing::$15 $15 zp ZP_WORD:41 4.0
|
||||
(word~) startProcessing::$16 $16 zp ZP_WORD:41 4.0
|
||||
(byte*~) startProcessing::$2 $2 zp ZP_WORD:33 1.2000000000000002
|
||||
(byte~) startProcessing::$27 reg byte a 2002.0
|
||||
(byte~) startProcessing::$28 reg byte x 2.333333333333333
|
||||
(byte) startProcessing::$36 reg byte a 2002.0
|
||||
(word) startProcessing::$38 $38 zp ZP_WORD:35 4.0
|
||||
(word) startProcessing::$39 $39 zp ZP_WORD:33 4.0
|
||||
(word~) startProcessing::$4 $4 zp ZP_WORD:9 4.0
|
||||
(byte) startProcessing::$41 reg byte a 4.0
|
||||
(word~) startProcessing::$5 $5 zp ZP_WORD:9 4.0
|
||||
(word~) startProcessing::$7 $7 zp ZP_WORD:7 4.0
|
||||
(word~) startProcessing::$8 $8 zp ZP_WORD:7 4.0
|
||||
@ -335,9 +361,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(struct ProcessingChar) startProcessing::center
|
||||
(word) startProcessing::center_dist
|
||||
(byte) startProcessing::center_x
|
||||
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:30 0.41666666666666674
|
||||
(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:31 0.40540540540540543
|
||||
(byte) startProcessing::center_y
|
||||
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:31 0.34210526315789475
|
||||
(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:32 0.275
|
||||
(byte) startProcessing::ch
|
||||
(byte) startProcessing::ch#0 reg byte a 2.0
|
||||
(byte*) startProcessing::chargenData
|
||||
@ -345,33 +371,33 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
|
||||
(byte*) startProcessing::chargenData#1 chargenData zp ZP_WORD:7 67.33333333333333
|
||||
(byte*) startProcessing::chargenData#2 chargenData zp ZP_WORD:7 101.66666666666666
|
||||
(byte) startProcessing::freeIdx
|
||||
(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:6 38.52941176470589
|
||||
(byte) startProcessing::freeIdx#6 reg byte x 33.666666666666664
|
||||
(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:6 34.52631578947369
|
||||
(byte) startProcessing::freeIdx#6 reg byte x 28.857142857142858
|
||||
(byte~) startProcessing::freeIdx#7 reg byte x 202.0
|
||||
(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:6 202.0
|
||||
(byte) startProcessing::i
|
||||
(byte) startProcessing::i#1 i zp ZP_BYTE:6 1501.5
|
||||
(byte) startProcessing::i#2 i zp ZP_BYTE:6 1334.6666666666667
|
||||
(byte) startProcessing::i#2 i zp ZP_BYTE:6 1251.25
|
||||
(byte) startProcessing::i1
|
||||
(byte) startProcessing::i1#1 reg byte x 151.5
|
||||
(byte) startProcessing::i1#2 reg byte x 50.5
|
||||
(byte*) startProcessing::screenPtr
|
||||
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:36 0.13333333333333333
|
||||
(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:37 0.11764705882352941
|
||||
(byte*) startProcessing::spriteData
|
||||
(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:9 0.5714285714285714
|
||||
(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:9 50.5
|
||||
(byte*) startProcessing::spriteData#2 spriteData zp ZP_WORD:9 152.5
|
||||
(byte) startProcessing::spriteIdx
|
||||
(byte) startProcessing::spritePtr
|
||||
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:40 0.8
|
||||
(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:43 0.6666666666666666
|
||||
(word) startProcessing::spriteX
|
||||
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:38 0.8
|
||||
(byte) startProcessing::spriteY
|
||||
(byte) startProcessing::spriteY#0 reg byte y 1.0
|
||||
(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:39 0.5
|
||||
(word) startProcessing::spriteY
|
||||
(word) startProcessing::spriteY#0 spriteY zp ZP_WORD:41 0.8
|
||||
|
||||
reg byte y [ main::i#2 main::i#1 ]
|
||||
zp ZP_WORD:2 [ main::src#2 main::src#1 ]
|
||||
zp ZP_WORD:4 [ main::dst#2 main::dst#1 ]
|
||||
reg byte y [ main::i#2 main::i#1 ]
|
||||
reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
|
||||
zp ZP_BYTE:6 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ]
|
||||
zp ZP_WORD:7 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$8 startProcessing::$7 ]
|
||||
@ -397,37 +423,47 @@ zp ZP_WORD:25 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::re
|
||||
zp ZP_WORD:27 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
|
||||
reg byte x [ irqBottom::i#2 irqBottom::i#1 ]
|
||||
zp ZP_BYTE:29 [ processChars::i#10 processChars::i#1 ]
|
||||
zp ZP_BYTE:30 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
|
||||
reg byte x [ irqTop::i#2 irqTop::i#1 ]
|
||||
reg byte x [ irqTop::i1#2 irqTop::i1#1 ]
|
||||
reg byte a [ main::$22 ]
|
||||
reg byte x [ main::$15 ]
|
||||
reg byte y [ getCharToProcess::return_x#0 ]
|
||||
reg byte x [ getCharToProcess::return_y#0 ]
|
||||
reg byte y [ main::center_x#0 ]
|
||||
reg byte x [ main::center_y#0 ]
|
||||
zp ZP_BYTE:30 [ startProcessing::center_x#0 ]
|
||||
zp ZP_BYTE:31 [ startProcessing::center_y#0 ]
|
||||
reg byte a [ startProcessing::$24 ]
|
||||
zp ZP_WORD:32 [ startProcessing::$0 startProcessing::$34 startProcessing::$1 startProcessing::$2 ]
|
||||
zp ZP_WORD:34 [ startProcessing::$33 ]
|
||||
zp ZP_WORD:36 [ startProcessing::screenPtr#0 ]
|
||||
reg byte x [ getCharToProcess::return_x#0 ]
|
||||
reg byte y [ getCharToProcess::return_y#0 ]
|
||||
reg byte x [ main::center_x#0 ]
|
||||
reg byte y [ main::center_y#0 ]
|
||||
zp ZP_BYTE:31 [ startProcessing::center_x#0 ]
|
||||
zp ZP_BYTE:32 [ startProcessing::center_y#0 ]
|
||||
reg byte a [ startProcessing::$36 ]
|
||||
reg byte a [ startProcessing::$27 ]
|
||||
zp ZP_WORD:33 [ startProcessing::$0 startProcessing::$39 startProcessing::$1 startProcessing::$2 ]
|
||||
zp ZP_WORD:35 [ startProcessing::$38 ]
|
||||
zp ZP_WORD:37 [ startProcessing::screenPtr#0 ]
|
||||
reg byte a [ startProcessing::ch#0 ]
|
||||
zp ZP_WORD:38 [ startProcessing::$10 startProcessing::$11 startProcessing::spriteX#0 ]
|
||||
reg byte a [ startProcessing::$13 ]
|
||||
reg byte y [ startProcessing::spriteY#0 ]
|
||||
zp ZP_BYTE:40 [ startProcessing::spritePtr#0 ]
|
||||
reg byte x [ startProcessing::$25 ]
|
||||
zp ZP_WORD:39 [ startProcessing::$10 startProcessing::$11 startProcessing::$12 startProcessing::spriteX#0 ]
|
||||
zp ZP_WORD:41 [ startProcessing::$14 startProcessing::$15 startProcessing::$16 startProcessing::spriteY#0 ]
|
||||
zp ZP_BYTE:43 [ startProcessing::spritePtr#0 ]
|
||||
reg byte a [ startProcessing::$41 ]
|
||||
reg byte x [ startProcessing::$28 ]
|
||||
reg byte x [ getCharToProcess::$13 ]
|
||||
reg byte a [ getCharToProcess::$14 ]
|
||||
zp ZP_WORD:41 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ]
|
||||
zp ZP_WORD:43 [ getCharToProcess::$15 ]
|
||||
zp ZP_WORD:44 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ]
|
||||
zp ZP_WORD:46 [ getCharToProcess::$15 ]
|
||||
reg byte a [ initSquareTables::$16 ]
|
||||
reg byte a [ initSquareTables::$17 ]
|
||||
reg byte a [ mul8u::$1 ]
|
||||
reg byte a [ processChars::$21 ]
|
||||
zp ZP_WORD:45 [ processChars::processing#0 ]
|
||||
zp ZP_BYTE:47 [ processChars::bitmask#0 ]
|
||||
reg byte a [ processChars::$9 ]
|
||||
reg byte a [ processChars::$10 ]
|
||||
reg byte x [ processChars::$13 ]
|
||||
reg byte a [ processChars::$44 ]
|
||||
reg byte a [ processChars::$26 ]
|
||||
zp ZP_WORD:48 [ processChars::processing#0 ]
|
||||
zp ZP_BYTE:50 [ processChars::bitmask#0 ]
|
||||
zp ZP_WORD:51 [ processChars::xpos#0 ]
|
||||
reg byte a [ processChars::$12 ]
|
||||
reg byte a [ processChars::$19 ]
|
||||
reg byte a [ processChars::$13 ]
|
||||
reg byte x [ processChars::$16 ]
|
||||
reg byte a [ processChars::$15 ]
|
||||
zp ZP_WORD:53 [ processChars::$17 ]
|
||||
reg byte a [ processChars::$18 ]
|
||||
zp ZP_WORD:55 [ processChars::$22 ]
|
||||
zp ZP_WORD:57 [ processChars::$23 ]
|
||||
reg byte x [ processChars::$1 ]
|
||||
reg byte a [ processChars::$24 ]
|
||||
|
Loading…
Reference in New Issue
Block a user