From 8ee499f9a815861a47e2bf213e50334f4ddf3895 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Wed, 12 Jun 2019 23:54:21 +0200 Subject: [PATCH] Added up/left sprite movement. --- .../_deref_pwuz1_eq_vwuc1_then_la1.asm | 9 + src/main/kc/stdlib/c64.kc | 4 + src/test/kc/complex/blackhole/blackhole.kc | 71 +- src/test/ref/complex/blackhole/blackhole.asm | 426 +- src/test/ref/complex/blackhole/blackhole.cfg | 524 +- src/test/ref/complex/blackhole/blackhole.log | 7725 +++++++++-------- src/test/ref/complex/blackhole/blackhole.sym | 222 +- 7 files changed, 4802 insertions(+), 4179 deletions(-) create mode 100644 src/main/fragment/_deref_pwuz1_eq_vwuc1_then_la1.asm diff --git a/src/main/fragment/_deref_pwuz1_eq_vwuc1_then_la1.asm b/src/main/fragment/_deref_pwuz1_eq_vwuc1_then_la1.asm new file mode 100644 index 000000000..c59b6b7d5 --- /dev/null +++ b/src/main/fragment/_deref_pwuz1_eq_vwuc1_then_la1.asm @@ -0,0 +1,9 @@ +ldy #0 +lda ({z1}),y +cmp #<{c1} +bne !+ +iny +lda ({z1}),y +cmp #>{c1} +beq {la1} +!: \ No newline at end of file diff --git a/src/main/kc/stdlib/c64.kc b/src/main/kc/stdlib/c64.kc index 42d5083cb..2ada54165 100644 --- a/src/main/kc/stdlib/c64.kc +++ b/src/main/kc/stdlib/c64.kc @@ -21,6 +21,10 @@ const byte PROCPORT_BASIC_KERNEL_IO = %00110111; // The address of the CHARGEN character set const byte* CHARGEN = $d000; +// Positions of the border (in sprite positions) +const byte BORDER_XPOS_LEFT=24; +const byte BORDER_YPOS_TOP=50; + // The offset of the sprite pointers from the screen start address const word SPRITE_PTRS = $3f8; diff --git a/src/test/kc/complex/blackhole/blackhole.kc b/src/test/kc/complex/blackhole/blackhole.kc index 4aa9c4f87..3e8f39942 100644 --- a/src/test/kc/complex/blackhole/blackhole.kc +++ b/src/test/kc/complex/blackhole/blackhole.kc @@ -53,25 +53,16 @@ const byte STATUS_PROCESSING = 2; struct ProcessingSprite[NUM_PROCESSING] PROCESSING; void main() { - // Init processing array - for( byte i: 0..NUM_PROCESSING-1 ) PROCESSING[i] = { 0, 0, 0, 0, STATUS_FREE, 0}; - // Clear sprites - for( byte* sp = SPRITE_DATA; spx; SPRITES_YPOS[i*2] = processing->y; + // Move sprite - if(--(processing->x)==0) { - // Set status + if(processing->x==BORDER_XPOS_LEFT-8 || processing->y==BORDER_YPOS_TOP-8) { + // Set status to FREE processing->status = STATUS_FREE; // Disable the sprite *SPRITES_ENABLE &= 0xff ^ bitmask; + } else { + (processing->y)--; + (processing->x)--; } } } @@ -166,6 +167,19 @@ void initSquareTables() { } } +// Initialize sprites +void initSprites() { + // Clear sprite data + for( byte* sp = SPRITE_DATA; spSPRITE_DATA - sta sp+1 - // Clear sprites - b2: - lda #0 - tay - sta (sp),y - inc sp - bne !+ - inc sp+1 - !: - lda sp+1 - cmp #>SPRITE_DATA+NUM_PROCESSING*$40 - bcc b2 - bne !+ - lda sp - cmp #SCREEN sta src+1 - // Fill screen with some chars - //for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(SCREEN+$3e8 - bne b5 + bne b3 lda src cmp #NOT_FOUND - bne b8 + bne b5 lda center_dist cmp #SCREEN + sta _2+1 + lda center_x + clc + adc _2 + sta screenPtr + lda #0 + adc _2+1 + sta screenPtr+1 + lda freeIdx + sta _4 + lda #0 + sta _4+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + clc lda spriteData adc #SPRITE_DATA sta spriteData+1 + ldy center_x + lda (_2),y + sta _7 + lda #0 + sta _7+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + clc + lda chargenData + adc #CHARGEN + sta chargenData+1 + sei + lda #PROCPORT_RAM_CHARROM + sta PROCPORT ldx #0 b6: - lda #$ff ldy #0 + lda (chargenData),y sta (spriteData),y lda #3 clc @@ -244,21 +279,28 @@ startProcessing: { sta spriteData bcc !+ inc spriteData+1 + !: + inc chargenData + bne !+ + inc chargenData+1 !: inx cpx #8 bne b6 + lda #PROCPORT_RAM_IO + sta PROCPORT + cli lda center_x - sta _3 + sta _10 lda #0 - sta _3+1 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - lda #$18 + sta _10+1 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + lda #BORDER_XPOS_LEFT clc adc spriteX sta spriteX @@ -270,50 +312,11 @@ startProcessing: { asl asl clc - adc #$32 + adc #BORDER_YPOS_TOP tay lax freeIdx axs #-[SPRITE_DATA/$40] stx spritePtr - lda center_y - sta _11 - lda #0 - sta _11+1 - lda _11 - asl - sta _30 - lda _11+1 - rol - sta _30+1 - asl _30 - rol _30+1 - lda _31 - clc - adc _30 - sta _31 - lda _31+1 - adc _30+1 - sta _31+1 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - clc - lda _13 - adc #SCREEN - sta _13+1 - lda center_x - clc - adc screenPtr - sta screenPtr - bcc !+ - inc screenPtr+1 - !: lda freeIdx asl asl @@ -352,9 +355,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 = $25 - .label _10 = $25 - .label _11 = $25 + .label _9 = $29 + .label _10 = $29 + .label _11 = $29 .label return_dist = $13 .label x = $e .label dist = $13 @@ -365,8 +368,8 @@ getCharToProcess: { .label closest_dist = $f .label closest_x = $11 .label closest_y = $12 - .label _15 = $27 - .label _16 = $25 + .label _15 = $2b + .label _16 = $29 lda #0 sta closest_y sta closest_x @@ -504,12 +507,78 @@ getCharToProcess: { sta return_dist+1 jmp b3 } +// Setup Raster IRQ +setupRasterIrq: { + .label irqRoutine = irqTop + sei + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + lda #PROCPORT_RAM_IO + sta PROCPORT + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + lda #$7f + and VIC_CONTROL + sta VIC_CONTROL + lda #RASTER_IRQ_TOP + sta RASTER + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + // Set the IRQ routine + lda #irqRoutine + sta HARDWARE_IRQ+1 + cli + rts +} +// Initialize sprites +initSprites: { + .label sp = $15 + lda #SPRITE_DATA + sta sp+1 + // Clear sprite data + b1: + lda #0 + tay + sta (sp),y + inc sp + bne !+ + inc sp+1 + !: + lda sp+1 + cmp #>SPRITE_DATA+NUM_PROCESSING*$40 + bcc b1 + bne !+ + lda sp + cmp #irqRoutine - sta HARDWARE_IRQ+1 - cli - rts -} // Raster Interrupt at the middle of the screen irqBottom: { sta rega+1 @@ -671,9 +712,9 @@ irqBottom: { } // Process any chars in the PROCESSING array processChars: { - .label processing = $29 - .label bitmask = $2b - .label i = $1b + .label processing = $2d + .label bitmask = $2f + .label i = $1d lda #0 sta i b1: @@ -756,6 +797,25 @@ processChars: { ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta SPRITES_YPOS,x + // Move sprite + ldy #0 + lda (processing),y + cmp #BORDER_XPOS_LEFT-8 + beq b6 + !: + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + cmp #BORDER_YPOS_TOP-8 + beq b6 + lda (processing),y + sty $ff + sec + sbc #1 + sta (processing),y ldy #0 lda (processing),y sec @@ -765,21 +825,6 @@ processChars: { lda (processing),y sbc #0 sta (processing),y - ldy #0 - lda (processing),y - bne b2 - iny - lda (processing),y - bne b2 - // Set status - lda #STATUS_FREE - ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - sta (processing),y - lda #$ff - eor bitmask - // Disable the sprite - and SPRITES_ENABLE - sta SPRITES_ENABLE b2: inc i lda #NUM_PROCESSING-1+1 @@ -788,6 +833,17 @@ processChars: { jmp b1 !b1: rts + b6: + // Set status to FREE + lda #STATUS_FREE + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + sta (processing),y + lda #$ff + eor bitmask + // Disable the sprite + and SPRITES_ENABLE + sta SPRITES_ENABLE + jmp b2 b4: lda SPRITES_XMSB ora bitmask diff --git a/src/test/ref/complex/blackhole/blackhole.cfg b/src/test/ref/complex/blackhole/blackhole.cfg index e5cd1f6c0..389e328cc 100644 --- a/src/test/ref/complex/blackhole/blackhole.cfg +++ b/src/test/ref/complex/blackhole/blackhole.cfg @@ -9,118 +9,115 @@ [3] phi() main: scope:[main] from @1 [4] phi() + [5] call initSquareTables to:main::@1 main::@1: scope:[main] from main main::@1 - [5] (byte) main::i#2 ← phi( main/(byte) 0 main::@1/(byte) main::i#1 ) - [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 - [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 - [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 - [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 - [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 - [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 - [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 - [13] (byte) main::i#1 ← ++ (byte) main::i#2 - [14] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto 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 to:main::@2 -main::@2: scope:[main] from main::@1 main::@2 - [15] (byte*) main::sp#2 ← phi( main::@1/(const byte*) SPRITE_DATA#0 main::@2/(byte*) main::sp#1 ) - [16] *((byte*) main::sp#2) ← (byte) 0 - [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 - [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto 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 to:main::@3 -main::@3: scope:[main] from main::@2 main::@3 - [19] (byte) main::i1#2 ← phi( main::@2/(byte) 0 main::@3/(byte) main::i1#1 ) - [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 - [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 - [22] if((byte) main::i1#1!=(byte) 8) goto 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 to:main::@4 -main::@4: scope:[main] from main::@3 - [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 - [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 - [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 - [26] call setupRasterIrq - to:main::@5 -main::@5: scope:[main] from main::@4 main::@5 - [27] (byte*) main::dst#2 ← phi( main::@4/(const byte[$3e8]) SCREEN_COPY#0 main::@5/(byte*) main::dst#1 ) - [27] (byte*) main::src#2 ← phi( main::@4/(const byte*) SCREEN#0 main::@5/(byte*) main::src#1 ) - [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) - [29] (byte*) main::src#1 ← ++ (byte*) main::src#2 - [30] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 - [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 +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 + 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 to:main::@6 -main::@6: scope:[main] from main::@5 - [32] phi() - [33] call initSquareTables - to:main::@7 -main::@7: scope:[main] from main::@6 main::@8 - [34] phi() - [35] call getCharToProcess - [36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 - [37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 - [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 - to:main::@10 -main::@10: scope:[main] from main::@7 - [39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 - [40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 - [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 - [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 - to:main::@9 -main::@9: scope:[main] from main::@10 main::@9 - [43] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7) - to:main::@9 -main::@8: scope:[main] from main::@10 - [44] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 - [45] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 - [46] call startProcessing - to:main::@7 -startProcessing: scope:[startProcessing] from main::@8 - [47] phi() +main::@6: scope:[main] from main::@6 main::@8 + [34] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#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 + to:main::@4 +startProcessing: scope:[startProcessing] from main::@5 + [38] phi() to:startProcessing::@1 startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8 - [48] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 ) + [39] (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 - [49] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 ) - [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 - [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto 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 to:startProcessing::@4 startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9 - [52] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 ) - [53] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 + [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 to:startProcessing::@5 startProcessing::@5: scope:[startProcessing] from startProcessing::@4 - [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 - [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 - [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 + [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 + asm { sei } + [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 to:startProcessing::@6 startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6 - [57] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 ) - [57] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 ) - [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff - [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 - [60] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 - [61] if((byte) startProcessing::i1#1!=(byte) 8) goto 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 to:startProcessing::@7 startProcessing::@7: scope:[startProcessing] from startProcessing::@6 - [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 - [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 - [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 - [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 - [66] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 - [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 - [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 - [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 - [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 - [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 - [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 - [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 - [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 - [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 - [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 - [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 - [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 - [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 - [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 + [66] *((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 to:startProcessing::@return startProcessing::@return: scope:[startProcessing] from startProcessing::@7 [81] return @@ -135,7 +132,7 @@ startProcessing::@3: scope:[startProcessing] from startProcessing::@2 startProcessing::@9: scope:[startProcessing] from startProcessing::@3 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 to:startProcessing::@4 -getCharToProcess: scope:[getCharToProcess] from main::@7 +getCharToProcess: scope:[getCharToProcess] from main::@4 [86] phi() to:getCharToProcess::@1 getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9 @@ -200,200 +197,229 @@ getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4 getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 to:getCharToProcess::@3 -initSquareTables: scope:[initSquareTables] from main::@6 - [114] phi() - to:initSquareTables::@1 -initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@9 - [115] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 ) - [116] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 - to:initSquareTables::@3 -initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1 - [117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 - to:initSquareTables::@4 -initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3 - [118] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 ) - [119] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 - [120] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 - [121] call mul8u - [122] (word) mul8u::return#2 ← (word) mul8u::res#2 - to:initSquareTables::@9 -initSquareTables::@9: scope:[initSquareTables] from initSquareTables::@4 - [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 - [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 - [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 - [126] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 - [127] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 - to:initSquareTables::@5 -initSquareTables::@5: scope:[initSquareTables] from initSquareTables::@10 initSquareTables::@9 - [128] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 ) - [129] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 - to:initSquareTables::@7 -initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5 - [130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c - to:initSquareTables::@8 -initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@6 initSquareTables::@7 - [131] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 ) - [132] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 - [133] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 - [134] call mul8u - [135] (word) mul8u::return#3 ← (word) mul8u::res#2 - to:initSquareTables::@10 -initSquareTables::@10: scope:[initSquareTables] from initSquareTables::@8 - [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 - [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 - [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 - [139] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 - [140] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 - to:initSquareTables::@return -initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@10 - [141] return - to:@return -initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5 - [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 - to:initSquareTables::@8 -initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1 - [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 - to:initSquareTables::@4 -mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8 - [144] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 ) - [144] (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 - [145] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 ) - [145] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 ) - [145] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 ) - [146] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 - to:mul8u::@return -mul8u::@return: scope:[mul8u] from mul8u::@1 - [147] return - to:@return -mul8u::@2: scope:[mul8u] from mul8u::@1 - [148] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 - [149] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 - to:mul8u::@4 -mul8u::@4: scope:[mul8u] from mul8u::@2 - [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 - to:mul8u::@3 -mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4 - [151] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 ) - [152] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 - [153] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 - to:mul8u::@1 -setupRasterIrq: scope:[setupRasterIrq] from main::@4 +setupRasterIrq: scope:[setupRasterIrq] from main::@7 asm { sei } - [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [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 to:setupRasterIrq::@1 setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq - [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f + [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f to:setupRasterIrq::@2 setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 - [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 - [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 + [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 asm { cli } to:setupRasterIrq::@return setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 - [163] return + [123] return to:@return +initSprites: scope:[initSprites] from main::@2 + [124] 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 + 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 + 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 + to:initSprites::@return +initSprites::@return: scope:[initSprites] from initSprites::@3 + [136] return + to:@return +initSquareTables: scope:[initSquareTables] from main + [137] 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 + to:initSquareTables::@3 +initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1 + [140] (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 + 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 + 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 + to:initSquareTables::@7 +initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5 + [153] (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 + 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 + 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 +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 + to:mul8u::@4 +mul8u::@4: scope:[mul8u] from mul8u::@2 + [173] (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 + to:mul8u::@1 irqBottom: scope:[irqBottom] from - [164] phi() + [177] phi() to:irqBottom::@1 irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1 - [165] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 ) - [166] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 - [167] if((byte) irqBottom::i#1!=(byte) 5) goto 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 to:irqBottom::@2 irqBottom::@2: scope:[irqBottom] from irqBottom::@1 - [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 - [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [170] call processChars + [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 + [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [183] call processChars to:irqBottom::@3 irqBottom::@3: scope:[irqBottom] from irqBottom::@2 - [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 - [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 - [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 - [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() - [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [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 to:irqBottom::@return irqBottom::@return: scope:[irqBottom] from irqBottom::@3 - [176] return + [189] return to:@return processChars: scope:[processChars] from irqBottom::@2 - [177] phi() + [190] phi() to:processChars::@1 processChars::@1: scope:[processChars] from processChars processChars::@2 - [178] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) - [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 - [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 - [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) - [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 - to:processChars::@8 -processChars::@8: scope:[processChars] from processChars::@1 - [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 + [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::@8 - [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' - [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 - [186] *((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) - [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 +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 + 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::@8 processChars::@9 - [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) - [189] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 - to:processChars::@6 -processChars::@6: scope:[processChars] from processChars::@3 - [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 - to:processChars::@5 -processChars::@5: scope:[processChars] from processChars::@4 processChars::@6 - [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 - [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) - [194] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 - [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) - [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) - [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 +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::@5 - [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 - [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 +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 + 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 + 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) to:processChars::@2 -processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@7 - [201] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 - [202] 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::@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 to:processChars::@return processChars::@return: scope:[processChars] from processChars::@2 - [203] return + [215] 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::@4: scope:[processChars] from processChars::@3 - [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 + [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 irqTop: scope:[irqTop] from - [205] phi() + [220] phi() to:irqTop::@1 irqTop::@1: scope:[irqTop] from irqTop irqTop::@1 - [206] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 ) - [207] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 - [208] if((byte) irqTop::i#1!=(byte) 5) goto 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 to:irqTop::@2 irqTop::@2: scope:[irqTop] from irqTop::@1 - [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 - [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 + [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 to:irqTop::@3 irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3 - [211] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 ) - [212] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 - [213] if((byte) irqTop::i1#1!=(byte) 8) goto 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 to:irqTop::@4 irqTop::@4: scope:[irqTop] from irqTop::@3 - [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 - [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 - [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 - [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() - [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [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 to:irqTop::@return irqTop::@return: scope:[irqTop] from irqTop::@4 - [219] return + [234] return to:@return diff --git a/src/test/ref/complex/blackhole/blackhole.log b/src/test/ref/complex/blackhole/blackhole.log index 73796890a..2a760a40b 100644 --- a/src/test/ref/complex/blackhole/blackhole.log +++ b/src/test/ref/complex/blackhole/blackhole.log @@ -14,10 +14,10 @@ Created struct value member variable (byte) main::center_x Created struct value member variable (byte) main::center_y Created struct value member variable (word) main::center_dist Converted struct value to member variables (struct ProcessingChar) main::center -Created struct value member variable (byte) main::$11_x -Created struct value member variable (byte) main::$11_y -Created struct value member variable (word) main::$11_dist -Converted struct value to member variables (struct ProcessingChar~) main::$11 +Created struct value member variable (byte) main::$8_x +Created struct value member variable (byte) main::$8_y +Created struct value member variable (word) main::$8_dist +Converted struct value to member variables (struct ProcessingChar~) main::$8 Created struct value member variable (byte) startProcessing::center_x Created struct value member variable (byte) startProcessing::center_y Created struct value member variable (word) startProcessing::center_dist @@ -31,23 +31,23 @@ Created struct value member variable (byte) getCharToProcess::closest_y Created struct value member variable (word) getCharToProcess::closest_dist Converted struct value to member variables (struct ProcessingChar) getCharToProcess::closest Converted procedure struct value parameter to member variables (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist) -Adding struct value list initializer *((word*) main::$19 + (byte~) main::$18) ← (number) 0 -Adding struct value list initializer *((byte*) main::$20 + (byte~) main::$18) ← (number) 0 -Adding struct value list initializer *((byte*) main::$21 + (byte~) main::$18) ← (number) 0 -Adding struct value list initializer *((byte*) main::$22 + (byte~) main::$18) ← (number) 0 -Adding struct value list initializer *((byte*) main::$23 + (byte~) main::$18) ← (byte) STATUS_FREE -Adding struct value list initializer *((byte**) main::$24 + (byte~) main::$18) ← (number) 0 -Converted procedure call LValue to member variables { (byte) main::$11_x, (byte) main::$11_y, (word) main::$11_dist } ← call getCharToProcess -Adding struct value member variable copy (byte) main::center_x ← (byte) main::$11_x -Adding struct value member variable copy (byte) main::center_y ← (byte) main::$11_y -Adding struct value member variable copy (word) main::center_dist ← (word) main::$11_dist -Converted procedure struct value parameter to member variables in call (void~) main::$14 ← call startProcessing (byte) main::center_x (byte) main::center_y (word) main::center_dist -Adding struct value list initializer *((word*) startProcessing::$23 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX -Adding struct value list initializer *((byte*) startProcessing::$24 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY -Adding struct value list initializer *((byte*) startProcessing::$25 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteIdx -Adding struct value list initializer *((byte*) startProcessing::$26 + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr -Adding struct value list initializer *((byte*) startProcessing::$27 + (byte~) startProcessing::$22) ← (byte) STATUS_NEW -Adding struct value list initializer *((byte**) startProcessing::$28 + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr +Adding struct value list initializer *((word*) main::$16 + (byte~) main::$15) ← (number) 0 +Adding struct value list initializer *((byte*) main::$17 + (byte~) main::$15) ← (number) 0 +Adding struct value list initializer *((byte*) main::$18 + (byte~) main::$15) ← (number) 0 +Adding struct value list initializer *((byte*) main::$19 + (byte~) main::$15) ← (number) 0 +Adding struct value list initializer *((byte*) main::$20 + (byte~) main::$15) ← (byte) STATUS_FREE +Adding struct value list initializer *((byte**) main::$21 + (byte~) main::$15) ← (number) 0 +Converted procedure call LValue to member variables { (byte) main::$8_x, (byte) main::$8_y, (word) main::$8_dist } ← call getCharToProcess +Adding struct value member variable copy (byte) main::center_x ← (byte) main::$8_x +Adding struct value member variable copy (byte) main::center_y ← (byte) main::$8_y +Adding struct value member variable copy (word) main::center_dist ← (word) main::$8_dist +Converted procedure struct value parameter to member variables in call (void~) main::$11 ← call startProcessing (byte) main::center_x (byte) main::center_y (word) main::center_dist +Adding struct value list initializer *((word*) startProcessing::$26 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX +Adding struct value list initializer *((byte*) startProcessing::$27 + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY +Adding struct value list initializer *((byte*) startProcessing::$28 + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteIdx +Adding struct value list initializer *((byte*) startProcessing::$29 + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr +Adding struct value list initializer *((byte*) startProcessing::$30 + (byte~) startProcessing::$25) ← (byte) STATUS_NEW +Adding struct value list initializer *((byte**) startProcessing::$31 + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr Adding struct value list initializer (byte) getCharToProcess::closest_x ← (number) 0 Adding struct value list initializer (byte) getCharToProcess::closest_y ← (number) 0 Adding struct value list initializer (word) getCharToProcess::closest_dist ← (word) NOT_FOUND @@ -62,15 +62,15 @@ Adding struct value member variable copy (byte) getCharToProcess::return_y ← ( Adding struct value member variable copy (word) getCharToProcess::return_dist ← (word) getCharToProcess::return_dist Converted procedure struct return value to member variables return { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (word) getCharToProcess::return_dist } Replacing struct member reference (struct ProcessingChar) main::center.dist with member variable reference (word) main::center_dist -Replacing struct member reference (struct ProcessingChar) startProcessing::center.x with member variable reference (byte) startProcessing::center_x -Replacing struct member reference (struct ProcessingChar) startProcessing::center.y with member variable reference (byte) startProcessing::center_y Replacing struct member reference (struct ProcessingChar) startProcessing::center.y with member variable reference (byte) startProcessing::center_y Replacing struct member reference (struct ProcessingChar) startProcessing::center.x with member variable reference (byte) startProcessing::center_x +Replacing struct member reference (struct ProcessingChar) startProcessing::center.x with member variable reference (byte) startProcessing::center_x +Replacing struct member reference (struct ProcessingChar) startProcessing::center.y with member variable reference (byte) startProcessing::center_y Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member variable reference (word) getCharToProcess::closest_dist Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.dist with member variable reference (word) getCharToProcess::closest_dist Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.y with member variable reference (byte) getCharToProcess::closest_y Replacing struct member reference (struct ProcessingChar) getCharToProcess::closest.x with member variable reference (byte) getCharToProcess::closest_x -Rewriting struct pointer member access *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte~) startProcessing::$21).status +Rewriting struct pointer member access *((struct ProcessingSprite[NUM_PROCESSING]) PROCESSING + (byte~) startProcessing::$24).status Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).id Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status @@ -82,9 +82,12 @@ Rewriting struct pointer member access *((struct ProcessingSprite*) processChars Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x -Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x -Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x +Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).status +Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y +Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).y +Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x +Rewriting struct pointer member access *((struct ProcessingSprite*) processChars::processing).x Warning! Adding boolean cast to non-boolean condition (byte~) processChars::$9 Adding pointer type conversion cast (byte*) PROCPORT_DDR in (byte*) PROCPORT_DDR ← (number) 0 Adding pointer type conversion cast (byte*) PROCPORT in (byte*) PROCPORT ← (number) 1 @@ -132,8 +135,8 @@ Adding pointer type conversion cast (void()**) KERNEL_IRQ in (void()**) KERNEL_I Adding pointer type conversion cast (void()**) HARDWARE_IRQ in (void()**) HARDWARE_IRQ ← (number) $fffe Adding pointer type conversion cast (byte*) SCREEN in (byte*) SCREEN ← (number) $400 Adding pointer type conversion cast (byte*) SPRITE_DATA in (byte*) SPRITE_DATA ← (number) $2000 -Adding pointer type conversion cast (byte*) *(main::$24 + main::$18) in *((byte**) main::$24 + (byte~) main::$18) ← (number) 0 -Inlined call [105] (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx +Adding pointer type conversion cast (byte*) *(main::$21 + main::$15) in *((byte**) main::$21 + (byte~) main::$15) ← (number) 0 +Inlined call [107] (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx Culled Empty Block (label) @1 Culled Empty Block (label) @2 Culled Empty Block (label) @3 @@ -146,29 +149,32 @@ Culled Empty Block (label) @5 Culled Empty Block (label) @6 Culled Empty Block (label) @7 Culled Empty Block (label) @8 +Culled Empty Block (label) main::@4 +Culled Empty Block (label) main::@8 +Culled Empty Block (label) main::@7 +Culled Empty Block (label) main::@9 +Culled Empty Block (label) main::@10 Culled Empty Block (label) main::@12 -Culled Empty Block (label) main::@11 -Culled Empty Block (label) main::@13 -Culled Empty Block (label) main::@14 -Culled Empty Block (label) main::@16 Culled Empty Block (label) @10 Culled Empty Block (label) startProcessing::@6 Culled Empty Block (label) startProcessing::@7 Culled Empty Block (label) @11 -Culled Empty Block (label) processChars::@8 -Culled Empty Block (label) processChars::@6 -Culled Empty Block (label) processChars::@12 +Culled Empty Block (label) processChars::@9 +Culled Empty Block (label) processChars::@7 +Culled Empty Block (label) processChars::@11 +Culled Empty Block (label) processChars::@14 Culled Empty Block (label) initSquareTables::@5 Culled Empty Block (label) initSquareTables::@6 Culled Empty Block (label) initSquareTables::@12 Culled Empty Block (label) initSquareTables::@13 Culled Empty Block (label) initSquareTables::@14 Culled Empty Block (label) @13 +Culled Empty Block (label) @14 Culled Empty Block (label) getCharToProcess::@6 Culled Empty Block (label) getCharToProcess::@2 -Culled Empty Block (label) @14 +Culled Empty Block (label) @15 Culled Empty Block (label) setupRasterIrq::@4 -Unwinding list assignment { (byte) main::$11_x, (byte) main::$11_y, (word) main::$11_dist } ← { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (word) getCharToProcess::return_dist } +Unwinding list assignment { (byte) main::$8_x, (byte) main::$8_y, (word) main::$8_dist } ← { (byte) getCharToProcess::return_x, (byte) getCharToProcess::return_y, (word) getCharToProcess::return_dist } Unwinding list assignment { (byte) getCharToProcess::return_x#0, (byte) getCharToProcess::return_y#0, (word) getCharToProcess::return_dist#0 } ← { (byte) getCharToProcess::return_x#2, (byte) getCharToProcess::return_y#2, (word) getCharToProcess::return_dist#2 } CONTROL FLOW GRAPH SSA @@ -177,6 +183,10 @@ CONTROL FLOW GRAPH SSA (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 (byte*) PROCPORT#0 ← ((byte*)) (number) 1 (byte) PROCPORT_RAM_IO#0 ← (number) $35 + (byte) PROCPORT_RAM_CHARROM#0 ← (number) $31 + (byte*) CHARGEN#0 ← ((byte*)) (number) $d000 + (byte) BORDER_XPOS_LEFT#0 ← (number) $18 + (byte) BORDER_YPOS_TOP#0 ← (number) $32 (word) SPRITE_PTRS#0 ← (number) $3f8 (byte*) SPRITES_XPOS#0 ← ((byte*)) (number) $d000 (byte*) SPRITES_YPOS#0 ← ((byte*)) (number) $d001 @@ -258,220 +268,209 @@ mul8u::@return: scope:[mul8u] from mul8u::@3 (byte) STATUS_PROCESSING#0 ← (number) 2 (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } to:@12 -main: scope:[main] from @17 - (number~) main::$3 ← (byte) NUM_PROCESSING#0 - (number) 1 +main: scope:[main] from @18 + call initSquareTables + to:main::@13 +main::@13: scope:[main] from main + (number~) main::$4 ← (byte) NUM_PROCESSING#0 - (number) 1 (byte) main::i#0 ← (byte) 0 to:main::@1 -main::@1: scope:[main] from main main::@1 - (byte) main::i#2 ← phi( main/(byte) main::i#0 main::@1/(byte) main::i#1 ) - (byte~) main::$18 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (word*) main::$19 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - *((word*) main::$19 + (byte~) main::$18) ← (number) 0 - (byte*) main::$20 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y - *((byte*) main::$20 + (byte~) main::$18) ← (number) 0 - (byte*) main::$21 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - *((byte*) main::$21 + (byte~) main::$18) ← (number) 0 - (byte*) main::$22 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR - *((byte*) main::$22 + (byte~) main::$18) ← (number) 0 - (byte*) main::$23 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - *((byte*) main::$23 + (byte~) main::$18) ← (byte) STATUS_FREE#0 - (byte**) main::$24 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR - *((byte**) main::$24 + (byte~) main::$18) ← ((byte*)) (number) 0 - (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,main::$3) - (bool~) main::$4 ← (byte) main::i#1 != rangelast(0,main::$3) - if((bool~) main::$4) goto main::@1 +main::@1: scope:[main] from main::@1 main::@13 + (byte) main::i#2 ← phi( main::@1/(byte) main::i#1 main::@13/(byte) main::i#0 ) + (byte~) main::$15 ← (byte) main::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE + (word*) main::$16 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + *((word*) main::$16 + (byte~) main::$15) ← (number) 0 + (byte*) main::$17 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + *((byte*) main::$17 + (byte~) main::$15) ← (number) 0 + (byte*) main::$18 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + *((byte*) main::$18 + (byte~) main::$15) ← (number) 0 + (byte*) main::$19 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + *((byte*) main::$19 + (byte~) main::$15) ← (number) 0 + (byte*) main::$20 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + *((byte*) main::$20 + (byte~) main::$15) ← (byte) STATUS_FREE#0 + (byte**) main::$21 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + *((byte**) main::$21 + (byte~) main::$15) ← ((byte*)) (number) 0 + (byte) main::i#1 ← (byte) main::i#2 + rangenext(0,main::$4) + (bool~) main::$5 ← (byte) main::i#1 != rangelast(0,main::$4) + if((bool~) main::$5) goto main::@1 to:main::@2 main::@2: scope:[main] from main::@1 - (byte*) main::sp#0 ← (byte*) SPRITE_DATA#0 - to:main::@3 -main::@3: scope:[main] from main::@2 main::@3 - (byte*) main::sp#2 ← phi( main::@2/(byte*) main::sp#0 main::@3/(byte*) main::sp#1 ) - *((byte*) main::sp#2) ← (number) 0 - (byte*) main::sp#1 ← ++ (byte*) main::sp#2 - (number~) main::$5 ← (byte) NUM_PROCESSING#0 * (number) $40 - (byte*~) main::$6 ← (byte*) SPRITE_DATA#0 + (number~) main::$5 - (bool~) main::$7 ← (byte*) main::sp#1 < (byte*~) main::$6 - if((bool~) main::$7) goto main::@3 - to:main::@4 -main::@4: scope:[main] from main::@3 - (byte) main::i1#0 ← (byte) 0 - to:main::@5 -main::@5: scope:[main] from main::@4 main::@5 - (byte) main::i1#2 ← phi( main::@4/(byte) main::i1#0 main::@5/(byte) main::i1#1 ) - *((byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (byte) WHITE#0 - (byte) main::i1#1 ← (byte) main::i1#2 + rangenext(0,7) - (bool~) main::$8 ← (byte) main::i1#1 != rangelast(0,7) - if((bool~) main::$8) goto main::@5 - to:main::@6 -main::@6: scope:[main] from main::@5 - *((byte*) SPRITES_MC#0) ← (number) 0 - *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 - *((byte*) SPRITES_EXPAND_Y#0) ← (number) 0 - (void()*~) main::$0 ← & interrupt(HARDWARE_ALL)(void()) irqTop() + call initSprites + to:main::@14 +main::@14: scope:[main] from main::@2 + (void()*~) main::$2 ← & interrupt(HARDWARE_ALL)(void()) irqTop() (word) setupRasterIrq::raster#0 ← (byte) RASTER_IRQ_TOP#0 - (void()*) setupRasterIrq::irqRoutine#0 ← (void()*~) main::$0 + (void()*) setupRasterIrq::irqRoutine#0 ← (void()*~) main::$2 call setupRasterIrq - to:main::@17 -main::@17: scope:[main] from main::@6 + to:main::@15 +main::@15: scope:[main] from main::@14 (byte*) main::src#0 ← (byte*) SCREEN#0 (byte*) main::dst#0 ← (byte[$3e8]) SCREEN_COPY#0 - to:main::@7 -main::@7: scope:[main] from main::@17 main::@7 - (byte*) main::dst#2 ← phi( main::@17/(byte*) main::dst#0 main::@7/(byte*) main::dst#1 ) - (byte*) main::src#2 ← phi( main::@17/(byte*) main::src#0 main::@7/(byte*) main::src#1 ) + to:main::@3 +main::@3: scope:[main] from main::@15 main::@3 + (byte*) main::dst#2 ← phi( main::@15/(byte*) main::dst#0 main::@3/(byte*) main::dst#1 ) + (byte*) main::src#2 ← phi( main::@15/(byte*) main::src#0 main::@3/(byte*) main::src#1 ) *((byte*) main::dst#2) ← *((byte*) main::src#2) (byte*) main::src#1 ← ++ (byte*) main::src#2 (byte*) main::dst#1 ← ++ (byte*) main::dst#2 - (byte*~) main::$9 ← (byte*) SCREEN#0 + (number) $3e8 - (bool~) main::$10 ← (byte*) main::src#1 != (byte*~) main::$9 - if((bool~) main::$10) goto main::@7 - to:main::@8 -main::@8: scope:[main] from main::@7 - call initSquareTables - to:main::@18 -main::@18: scope:[main] from main::@8 - to:main::@9 -main::@9: scope:[main] from main::@18 main::@20 + (byte*~) main::$6 ← (byte*) SCREEN#0 + (number) $3e8 + (bool~) main::$7 ← (byte*) main::src#1 != (byte*~) main::$6 + if((bool~) main::$7) goto main::@3 + to:main::@5 +main::@5: scope:[main] from main::@17 main::@3 call getCharToProcess (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#2 (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#2 (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#2 - to:main::@19 -main::@19: scope:[main] from main::@9 - (word) getCharToProcess::return_dist#3 ← phi( main::@9/(word) getCharToProcess::return_dist#0 ) - (byte) getCharToProcess::return_y#3 ← phi( main::@9/(byte) getCharToProcess::return_y#0 ) - (byte) getCharToProcess::return_x#3 ← phi( main::@9/(byte) getCharToProcess::return_x#0 ) - (byte) main::$11_x ← (byte) getCharToProcess::return_x#3 - (byte) main::$11_y ← (byte) getCharToProcess::return_y#3 - (word) main::$11_dist ← (word) getCharToProcess::return_dist#3 - (byte) main::center_x#0 ← (byte) main::$11_x - (byte) main::center_y#0 ← (byte) main::$11_y - (word) main::center_dist#0 ← (word) main::$11_dist - (bool~) main::$12 ← (word) main::center_dist#0 == (word) NOT_FOUND#0 - (bool~) main::$13 ← ! (bool~) main::$12 - if((bool~) main::$13) goto main::@10 - to:main::@15 -main::@10: scope:[main] from main::@19 - (word) main::center_dist#1 ← phi( main::@19/(word) main::center_dist#0 ) - (byte) main::center_y#1 ← phi( main::@19/(byte) main::center_y#0 ) - (byte) main::center_x#1 ← phi( main::@19/(byte) main::center_x#0 ) + to:main::@16 +main::@16: scope:[main] from main::@5 + (word) getCharToProcess::return_dist#3 ← phi( main::@5/(word) getCharToProcess::return_dist#0 ) + (byte) getCharToProcess::return_y#3 ← phi( main::@5/(byte) getCharToProcess::return_y#0 ) + (byte) getCharToProcess::return_x#3 ← phi( main::@5/(byte) getCharToProcess::return_x#0 ) + (byte) main::$8_x ← (byte) getCharToProcess::return_x#3 + (byte) main::$8_y ← (byte) getCharToProcess::return_y#3 + (word) main::$8_dist ← (word) getCharToProcess::return_dist#3 + (byte) main::center_x#0 ← (byte) main::$8_x + (byte) main::center_y#0 ← (byte) main::$8_y + (word) main::center_dist#0 ← (word) main::$8_dist + (bool~) main::$9 ← (word) main::center_dist#0 == (word) NOT_FOUND#0 + (bool~) main::$10 ← ! (bool~) main::$9 + if((bool~) main::$10) goto main::@6 + to:main::@11 +main::@6: scope:[main] from main::@16 + (word) main::center_dist#1 ← phi( main::@16/(word) main::center_dist#0 ) + (byte) main::center_y#1 ← phi( main::@16/(byte) main::center_y#0 ) + (byte) main::center_x#1 ← phi( main::@16/(byte) main::center_x#0 ) (byte) startProcessing::center_x#0 ← (byte) main::center_x#1 (byte) startProcessing::center_y#0 ← (byte) main::center_y#1 (word) startProcessing::center_dist#0 ← (word) main::center_dist#1 call startProcessing - to:main::@20 -main::@20: scope:[main] from main::@10 - if(true) goto main::@9 - to:main::@15 -main::@15: scope:[main] from main::@15 main::@19 main::@20 - (byte*~) main::$17 ← (byte*) SCREEN#0 + (number) $3e7 - *((byte*~) main::$17) ← ++ *((byte*~) main::$17) - if(true) goto main::@15 + to:main::@17 +main::@17: scope:[main] from main::@6 + if(true) goto main::@5 + to:main::@11 +main::@11: scope:[main] from main::@11 main::@16 main::@17 + (byte*~) main::$14 ← (byte*) SCREEN#0 + (number) $3e7 + *((byte*~) main::$14) ← ++ *((byte*~) main::$14) + if(true) goto main::@11 to:main::@return -main::@return: scope:[main] from main::@15 +main::@return: scope:[main] from main::@11 return to:@return -startProcessing: scope:[startProcessing] from main::@10 - (byte) startProcessing::center_y#9 ← phi( main::@10/(byte) startProcessing::center_y#0 ) - (byte) startProcessing::center_x#9 ← phi( main::@10/(byte) startProcessing::center_x#0 ) +startProcessing: scope:[startProcessing] from main::@6 + (byte) startProcessing::center_x#9 ← phi( main::@6/(byte) startProcessing::center_x#0 ) + (byte) startProcessing::center_y#9 ← phi( main::@6/(byte) startProcessing::center_y#0 ) (byte) startProcessing::freeIdx#0 ← (number) $ff to:startProcessing::@1 startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@4 - (byte) startProcessing::center_y#8 ← phi( startProcessing/(byte) startProcessing::center_y#9 startProcessing::@4/(byte) startProcessing::center_y#4 ) - (byte) startProcessing::center_x#8 ← phi( startProcessing/(byte) startProcessing::center_x#9 startProcessing::@4/(byte) startProcessing::center_x#4 ) + (byte) startProcessing::center_x#8 ← phi( startProcessing/(byte) startProcessing::center_x#9 startProcessing::@4/(byte) startProcessing::center_x#3 ) + (byte) startProcessing::center_y#8 ← phi( startProcessing/(byte) startProcessing::center_y#9 startProcessing::@4/(byte) startProcessing::center_y#3 ) (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) startProcessing::freeIdx#0 startProcessing::@4/(byte) startProcessing::freeIdx#2 ) - (number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (number) 1 + (number~) startProcessing::$18 ← (byte) NUM_PROCESSING#0 - (number) 1 (byte) startProcessing::i#0 ← (byte) 0 to:startProcessing::@2 startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3 - (byte) startProcessing::center_y#7 ← phi( startProcessing::@1/(byte) startProcessing::center_y#8 startProcessing::@3/(byte) startProcessing::center_y#5 ) (byte) startProcessing::center_x#7 ← phi( startProcessing::@1/(byte) startProcessing::center_x#8 startProcessing::@3/(byte) startProcessing::center_x#5 ) + (byte) startProcessing::center_y#7 ← phi( startProcessing::@1/(byte) startProcessing::center_y#8 startProcessing::@3/(byte) startProcessing::center_y#5 ) (byte) startProcessing::freeIdx#5 ← phi( startProcessing::@1/(byte) startProcessing::freeIdx#6 startProcessing::@3/(byte) startProcessing::freeIdx#4 ) (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) startProcessing::i#0 startProcessing::@3/(byte) startProcessing::i#1 ) - (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (byte*) startProcessing::$29 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - (bool~) startProcessing::$16 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) == (byte) STATUS_FREE#0 - (bool~) startProcessing::$17 ← ! (bool~) startProcessing::$16 - if((bool~) startProcessing::$17) goto startProcessing::@3 + (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE + (byte*) startProcessing::$32 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (bool~) startProcessing::$19 ← *((byte*) startProcessing::$32 + (byte~) startProcessing::$24) == (byte) STATUS_FREE#0 + (bool~) startProcessing::$20 ← ! (bool~) startProcessing::$19 + if((bool~) startProcessing::$20) goto startProcessing::@3 to:startProcessing::@5 startProcessing::@3: scope:[startProcessing] from startProcessing::@2 - (byte) startProcessing::center_y#5 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 ) (byte) startProcessing::center_x#5 ← phi( startProcessing::@2/(byte) startProcessing::center_x#7 ) + (byte) startProcessing::center_y#5 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 ) (byte) startProcessing::freeIdx#4 ← phi( startProcessing::@2/(byte) startProcessing::freeIdx#5 ) (byte) startProcessing::i#3 ← phi( startProcessing::@2/(byte) startProcessing::i#2 ) - (byte) startProcessing::i#1 ← (byte) startProcessing::i#3 + rangenext(0,startProcessing::$15) - (bool~) startProcessing::$18 ← (byte) startProcessing::i#1 != rangelast(0,startProcessing::$15) - if((bool~) startProcessing::$18) goto startProcessing::@2 + (byte) startProcessing::i#1 ← (byte) startProcessing::i#3 + rangenext(0,startProcessing::$18) + (bool~) startProcessing::$21 ← (byte) startProcessing::i#1 != rangelast(0,startProcessing::$18) + if((bool~) startProcessing::$21) goto startProcessing::@2 to:startProcessing::@4 startProcessing::@5: scope:[startProcessing] from startProcessing::@2 - (byte) startProcessing::center_y#6 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 ) (byte) startProcessing::center_x#6 ← phi( startProcessing::@2/(byte) startProcessing::center_x#7 ) + (byte) startProcessing::center_y#6 ← phi( startProcessing::@2/(byte) startProcessing::center_y#7 ) (byte) startProcessing::i#4 ← phi( startProcessing::@2/(byte) startProcessing::i#2 ) (byte) startProcessing::freeIdx#1 ← (byte) startProcessing::i#4 to:startProcessing::@4 startProcessing::@4: scope:[startProcessing] from startProcessing::@3 startProcessing::@5 - (byte) startProcessing::center_y#4 ← phi( startProcessing::@3/(byte) startProcessing::center_y#5 startProcessing::@5/(byte) startProcessing::center_y#6 ) - (byte) startProcessing::center_x#4 ← phi( startProcessing::@3/(byte) startProcessing::center_x#5 startProcessing::@5/(byte) startProcessing::center_x#6 ) + (byte) startProcessing::center_x#3 ← phi( startProcessing::@3/(byte) startProcessing::center_x#5 startProcessing::@5/(byte) startProcessing::center_x#6 ) + (byte) startProcessing::center_y#3 ← phi( startProcessing::@3/(byte) startProcessing::center_y#5 startProcessing::@5/(byte) startProcessing::center_y#6 ) (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@3/(byte) startProcessing::freeIdx#4 startProcessing::@5/(byte) startProcessing::freeIdx#1 ) - (bool~) startProcessing::$19 ← (byte) startProcessing::freeIdx#2 == (number) $ff - if((bool~) startProcessing::$19) goto startProcessing::@1 + (bool~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 == (number) $ff + if((bool~) startProcessing::$22) goto startProcessing::@1 to:startProcessing::@8 startProcessing::@8: scope:[startProcessing] from startProcessing::@4 - (byte) startProcessing::center_y#3 ← phi( startProcessing::@4/(byte) startProcessing::center_y#4 ) - (byte) startProcessing::center_x#3 ← phi( startProcessing::@4/(byte) startProcessing::center_x#4 ) + (byte) startProcessing::center_x#1 ← phi( startProcessing::@4/(byte) startProcessing::center_x#3 ) + (byte) startProcessing::center_y#1 ← phi( startProcessing::@4/(byte) startProcessing::center_y#3 ) (byte) startProcessing::freeIdx#3 ← phi( startProcessing::@4/(byte) startProcessing::freeIdx#2 ) (byte) startProcessing::spriteIdx#0 ← (byte) startProcessing::freeIdx#3 - (word~) startProcessing::$0 ← ((word)) (byte) startProcessing::spriteIdx#0 - (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $40 - (byte*~) startProcessing::$2 ← (byte*) SPRITE_DATA#0 + (number~) startProcessing::$1 - (byte*) startProcessing::spriteData#0 ← (byte*~) startProcessing::$2 + (word~) startProcessing::$0 ← ((word)) (byte) startProcessing::center_y#1 + (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $28 + (byte*~) startProcessing::$2 ← (byte*) SCREEN#0 + (number~) startProcessing::$1 + (byte*~) startProcessing::$3 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#1 + (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$3 + (word~) startProcessing::$4 ← ((word)) (byte) startProcessing::spriteIdx#0 + (number~) startProcessing::$5 ← (word~) startProcessing::$4 * (number) $40 + (byte*~) startProcessing::$6 ← (byte*) SPRITE_DATA#0 + (number~) startProcessing::$5 + (byte*) startProcessing::spriteData#0 ← (byte*~) startProcessing::$6 + (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) + (word~) startProcessing::$7 ← ((word)) (byte) startProcessing::ch#0 + (number~) startProcessing::$8 ← (word~) startProcessing::$7 * (number) 8 + (byte*~) startProcessing::$9 ← (byte*) CHARGEN#0 + (number~) startProcessing::$8 + (byte*) startProcessing::chargenData#0 ← (byte*~) startProcessing::$9 + asm { sei } + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0 (byte) startProcessing::i1#0 ← (byte) 0 to:startProcessing::@9 startProcessing::@9: scope:[startProcessing] from startProcessing::@8 startProcessing::@9 + (byte*) startProcessing::screenPtr#2 ← phi( startProcessing::@8/(byte*) startProcessing::screenPtr#0 startProcessing::@9/(byte*) startProcessing::screenPtr#2 ) (byte) startProcessing::spriteIdx#2 ← phi( startProcessing::@8/(byte) startProcessing::spriteIdx#0 startProcessing::@9/(byte) startProcessing::spriteIdx#2 ) - (byte) startProcessing::center_y#2 ← phi( startProcessing::@8/(byte) startProcessing::center_y#3 startProcessing::@9/(byte) startProcessing::center_y#2 ) - (byte) startProcessing::center_x#2 ← phi( startProcessing::@8/(byte) startProcessing::center_x#3 startProcessing::@9/(byte) startProcessing::center_x#2 ) + (byte) startProcessing::center_y#4 ← phi( startProcessing::@8/(byte) startProcessing::center_y#1 startProcessing::@9/(byte) startProcessing::center_y#4 ) + (byte) startProcessing::center_x#4 ← phi( startProcessing::@8/(byte) startProcessing::center_x#1 startProcessing::@9/(byte) startProcessing::center_x#4 ) (byte) startProcessing::i1#2 ← phi( startProcessing::@8/(byte) startProcessing::i1#0 startProcessing::@9/(byte) startProcessing::i1#1 ) (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@8/(byte*) startProcessing::spriteData#0 startProcessing::@9/(byte*) startProcessing::spriteData#1 ) - *((byte*) startProcessing::spriteData#2) ← (number) $ff + (byte*) startProcessing::chargenData#2 ← phi( startProcessing::@8/(byte*) startProcessing::chargenData#0 startProcessing::@9/(byte*) startProcessing::chargenData#1 ) + *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (number) 3 + (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 (byte) startProcessing::i1#1 ← (byte) startProcessing::i1#2 + rangenext(0,7) - (bool~) startProcessing::$20 ← (byte) startProcessing::i1#1 != rangelast(0,7) - if((bool~) startProcessing::$20) goto startProcessing::@9 + (bool~) startProcessing::$23 ← (byte) startProcessing::i1#1 != rangelast(0,7) + if((bool~) startProcessing::$23) goto startProcessing::@9 to:startProcessing::@10 startProcessing::@10: scope:[startProcessing] from startProcessing::@9 + (byte*) startProcessing::screenPtr#1 ← phi( startProcessing::@9/(byte*) startProcessing::screenPtr#2 ) (byte) startProcessing::spriteIdx#1 ← phi( startProcessing::@9/(byte) startProcessing::spriteIdx#2 ) - (byte) startProcessing::center_y#1 ← phi( startProcessing::@9/(byte) startProcessing::center_y#2 ) - (byte) startProcessing::center_x#1 ← phi( startProcessing::@9/(byte) startProcessing::center_x#2 ) - (word~) startProcessing::$3 ← ((word)) (byte) startProcessing::center_x#1 - (number~) startProcessing::$4 ← (word~) startProcessing::$3 * (number) 8 - (number~) startProcessing::$5 ← (number) $18 + (number~) startProcessing::$4 - (word) startProcessing::spriteX#0 ← (number~) startProcessing::$5 - (number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (number) 8 - (number~) startProcessing::$7 ← (number) $32 + (number~) startProcessing::$6 - (byte) startProcessing::spriteY#0 ← (number~) startProcessing::$7 - (byte*~) startProcessing::$8 ← (byte*) SPRITE_DATA#0 / (number) $40 - (byte~) startProcessing::$9 ← ((byte)) (byte*~) startProcessing::$8 - (byte~) startProcessing::$10 ← (byte~) startProcessing::$9 + (byte) startProcessing::spriteIdx#1 - (byte) startProcessing::spritePtr#0 ← (byte~) startProcessing::$10 - (word~) startProcessing::$11 ← ((word)) (byte) startProcessing::center_y#1 - (number~) startProcessing::$12 ← (word~) startProcessing::$11 * (number) $28 - (byte*~) startProcessing::$13 ← (byte*) SCREEN#0 + (number~) startProcessing::$12 - (byte*~) startProcessing::$14 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#1 - (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$14 - (byte~) startProcessing::$22 ← (byte) startProcessing::spriteIdx#1 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (word*) startProcessing::$23 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - *((word*) startProcessing::$23 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 - (byte*) startProcessing::$24 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y - *((byte*) startProcessing::$24 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 - (byte*) startProcessing::$25 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - *((byte*) startProcessing::$25 + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteIdx#1 - (byte*) startProcessing::$26 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR - *((byte*) startProcessing::$26 + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 - (byte*) startProcessing::$27 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - *((byte*) startProcessing::$27 + (byte~) startProcessing::$22) ← (byte) STATUS_NEW#0 - (byte**) startProcessing::$28 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR - *((byte**) startProcessing::$28 + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 + (byte) startProcessing::center_y#2 ← phi( startProcessing::@9/(byte) startProcessing::center_y#4 ) + (byte) startProcessing::center_x#2 ← phi( startProcessing::@9/(byte) startProcessing::center_x#4 ) + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 + asm { cli } + (word~) startProcessing::$10 ← ((word)) (byte) startProcessing::center_x#2 + (number~) startProcessing::$11 ← (word~) startProcessing::$10 * (number) 8 + (number~) startProcessing::$12 ← (byte) BORDER_XPOS_LEFT#0 + (number~) startProcessing::$11 + (word) startProcessing::spriteX#0 ← (number~) startProcessing::$12 + (number~) startProcessing::$13 ← (byte) startProcessing::center_y#2 * (number) 8 + (number~) startProcessing::$14 ← (byte) BORDER_YPOS_TOP#0 + (number~) startProcessing::$13 + (byte) startProcessing::spriteY#0 ← (number~) startProcessing::$14 + (byte*~) startProcessing::$15 ← (byte*) SPRITE_DATA#0 / (number) $40 + (byte~) startProcessing::$16 ← ((byte)) (byte*~) startProcessing::$15 + (byte~) startProcessing::$17 ← (byte~) startProcessing::$16 + (byte) startProcessing::spriteIdx#1 + (byte) startProcessing::spritePtr#0 ← (byte~) startProcessing::$17 + (byte~) startProcessing::$25 ← (byte) startProcessing::spriteIdx#1 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE + (word*) startProcessing::$26 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + *((word*) startProcessing::$26 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 + (byte*) startProcessing::$27 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + *((byte*) startProcessing::$27 + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 + (byte*) startProcessing::$28 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + *((byte*) startProcessing::$28 + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteIdx#1 + (byte*) startProcessing::$29 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + *((byte*) startProcessing::$29 + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 + (byte*) startProcessing::$30 ← (byte*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + *((byte*) startProcessing::$30 + (byte~) startProcessing::$25) ← (byte) STATUS_NEW#0 + (byte**) startProcessing::$31 ← (byte**)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + *((byte**) startProcessing::$31 + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#1 to:startProcessing::@return startProcessing::@return: scope:[startProcessing] from startProcessing::@10 return @@ -482,96 +481,107 @@ processChars: scope:[processChars] from irqBottom::@2 to:processChars::@1 processChars::@1: scope:[processChars] from processChars processChars::@2 (byte) processChars::i#2 ← phi( processChars/(byte) processChars::i#0 processChars::@2/(byte) processChars::i#1 ) - (byte~) processChars::$18 ← (byte) processChars::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE - (struct ProcessingSprite*~) processChars::$1 ← (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 + (byte~) processChars::$21 ← (byte) processChars::i#2 * (const byte) SIZEOF_STRUCT_PROCESSINGSPRITE + (struct ProcessingSprite*~) processChars::$1 ← (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 (struct ProcessingSprite*) processChars::processing#0 ← (struct ProcessingSprite*~) processChars::$1 - (byte*) processChars::$19 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - (number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$19) + (byte*) processChars::$22 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$22) (byte) processChars::bitmask#0 ← (number~) processChars::$2 - (byte*) processChars::$20 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - (bool~) processChars::$3 ← *((byte*) processChars::$20) != (byte) STATUS_FREE#0 + (byte*) processChars::$23 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (bool~) processChars::$3 ← *((byte*) processChars::$23) != (byte) STATUS_FREE#0 (bool~) processChars::$4 ← ! (bool~) processChars::$3 if((bool~) processChars::$4) goto processChars::@2 - to:processChars::@10 -processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@9 - (byte) processChars::i#3 ← phi( processChars::@1/(byte) processChars::i#2 processChars::@5/(byte) processChars::i#4 processChars::@9/(byte) processChars::i#5 ) + to:processChars::@12 +processChars::@2: scope:[processChars] from processChars::@1 processChars::@10 processChars::@6 + (byte) processChars::i#3 ← phi( processChars::@1/(byte) processChars::i#2 processChars::@10/(byte) processChars::i#5 processChars::@6/(byte) processChars::i#6 ) (byte) processChars::i#1 ← (byte) processChars::i#3 + rangenext(0,processChars::$0) - (bool~) processChars::$17 ← (byte) processChars::i#1 != rangelast(0,processChars::$0) - if((bool~) processChars::$17) goto processChars::@1 + (bool~) processChars::$20 ← (byte) processChars::i#1 != rangelast(0,processChars::$0) + if((bool~) processChars::$20) goto processChars::@1 to:processChars::@return -processChars::@10: scope:[processChars] from processChars::@1 - (byte) processChars::i#9 ← phi( processChars::@1/(byte) processChars::i#2 ) +processChars::@12: scope:[processChars] from processChars::@1 + (byte) processChars::i#10 ← phi( processChars::@1/(byte) processChars::i#2 ) (byte) processChars::bitmask#5 ← phi( processChars::@1/(byte) processChars::bitmask#0 ) (struct ProcessingSprite*) processChars::processing#1 ← phi( processChars::@1/(struct ProcessingSprite*) processChars::processing#0 ) - (byte*) processChars::$21 ← (byte*)(struct ProcessingSprite*) processChars::processing#1 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - (bool~) processChars::$5 ← *((byte*) processChars::$21) == (byte) STATUS_NEW#0 + (byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#1 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (bool~) processChars::$5 ← *((byte*) processChars::$24) == (byte) STATUS_NEW#0 (bool~) processChars::$6 ← ! (bool~) processChars::$5 if((bool~) processChars::$6) goto processChars::@3 - to:processChars::@11 -processChars::@3: scope:[processChars] from processChars::@10 processChars::@11 - (byte) processChars::i#8 ← phi( processChars::@10/(byte) processChars::i#9 processChars::@11/(byte) processChars::i#10 ) - (byte) processChars::bitmask#6 ← phi( processChars::@10/(byte) processChars::bitmask#5 processChars::@11/(byte) processChars::bitmask#1 ) - (struct ProcessingSprite*) processChars::processing#2 ← phi( processChars::@10/(struct ProcessingSprite*) processChars::processing#1 processChars::@11/(struct ProcessingSprite*) processChars::processing#3 ) - (word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#2 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - (byte~) processChars::$9 ← > *((word*) processChars::$22) - (bool~) processChars::$33 ← (number) 0 != (byte~) processChars::$9 - if((bool~) processChars::$33) goto processChars::@4 - to:processChars::@7 -processChars::@11: scope:[processChars] from processChars::@10 - (byte) processChars::i#10 ← phi( processChars::@10/(byte) processChars::i#9 ) - (byte) processChars::bitmask#1 ← phi( processChars::@10/(byte) processChars::bitmask#5 ) - (struct ProcessingSprite*) processChars::processing#3 ← phi( processChars::@10/(struct ProcessingSprite*) processChars::processing#1 ) - (byte**) processChars::$23 ← (byte**)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR - *(*((byte**) processChars::$23)) ← (byte) ' ' + to:processChars::@13 +processChars::@3: scope:[processChars] from processChars::@12 processChars::@13 + (byte) processChars::i#9 ← phi( processChars::@12/(byte) processChars::i#10 processChars::@13/(byte) processChars::i#11 ) + (byte) processChars::bitmask#6 ← phi( processChars::@12/(byte) processChars::bitmask#5 processChars::@13/(byte) processChars::bitmask#1 ) + (struct ProcessingSprite*) processChars::processing#2 ← phi( processChars::@12/(struct ProcessingSprite*) processChars::processing#1 processChars::@13/(struct ProcessingSprite*) processChars::processing#3 ) + (word*) processChars::$25 ← (word*)(struct ProcessingSprite*) processChars::processing#2 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) processChars::$9 ← > *((word*) processChars::$25) + (bool~) processChars::$39 ← (number) 0 != (byte~) processChars::$9 + if((bool~) processChars::$39) goto processChars::@4 + to:processChars::@8 +processChars::@13: scope:[processChars] from processChars::@12 + (byte) processChars::i#11 ← phi( processChars::@12/(byte) processChars::i#10 ) + (byte) processChars::bitmask#1 ← phi( processChars::@12/(byte) processChars::bitmask#5 ) + (struct ProcessingSprite*) processChars::processing#3 ← phi( processChars::@12/(struct ProcessingSprite*) processChars::processing#1 ) + (byte**) processChars::$26 ← (byte**)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + *(*((byte**) processChars::$26)) ← (byte) ' ' *((byte*) SPRITES_ENABLE#0) ← *((byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#1 (byte*~) processChars::$7 ← (byte*) SCREEN#0 + (word) SPRITE_PTRS#0 - (byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID - (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$24) - (byte*) processChars::$25 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR - *((byte*~) processChars::$8) ← *((byte*) processChars::$25) - (byte*) processChars::$26 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - *((byte*) processChars::$26) ← (byte) STATUS_PROCESSING#0 + (byte*) processChars::$27 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$27) + (byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + *((byte*~) processChars::$8) ← *((byte*) processChars::$28) + (byte*) processChars::$29 ← (byte*)(struct ProcessingSprite*) processChars::processing#3 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + *((byte*) processChars::$29) ← (byte) STATUS_PROCESSING#0 to:processChars::@3 processChars::@4: scope:[processChars] from processChars::@3 - (struct ProcessingSprite*) processChars::processing#6 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 ) - (byte) processChars::i#6 ← phi( processChars::@3/(byte) processChars::i#8 ) + (struct ProcessingSprite*) processChars::processing#7 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 ) + (byte) processChars::i#7 ← phi( processChars::@3/(byte) processChars::i#9 ) (byte) processChars::bitmask#2 ← phi( processChars::@3/(byte) processChars::bitmask#6 ) *((byte*) SPRITES_XMSB#0) ← *((byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#2 to:processChars::@5 -processChars::@7: scope:[processChars] from processChars::@3 - (struct ProcessingSprite*) processChars::processing#7 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 ) - (byte) processChars::i#7 ← phi( processChars::@3/(byte) processChars::i#8 ) +processChars::@8: scope:[processChars] from processChars::@3 + (struct ProcessingSprite*) processChars::processing#8 ← phi( processChars::@3/(struct ProcessingSprite*) processChars::processing#2 ) + (byte) processChars::i#8 ← phi( processChars::@3/(byte) processChars::i#9 ) (byte) processChars::bitmask#3 ← phi( processChars::@3/(byte) processChars::bitmask#6 ) (number~) processChars::$10 ← (number) $ff ^ (byte) processChars::bitmask#3 *((byte*) SPRITES_XMSB#0) ← *((byte*) SPRITES_XMSB#0) & (number~) processChars::$10 to:processChars::@5 -processChars::@5: scope:[processChars] from processChars::@4 processChars::@7 - (byte) processChars::bitmask#7 ← phi( processChars::@4/(byte) processChars::bitmask#2 processChars::@7/(byte) processChars::bitmask#3 ) - (struct ProcessingSprite*) processChars::processing#4 ← phi( processChars::@4/(struct ProcessingSprite*) processChars::processing#6 processChars::@7/(struct ProcessingSprite*) processChars::processing#7 ) - (byte) processChars::i#4 ← phi( processChars::@4/(byte) processChars::i#6 processChars::@7/(byte) processChars::i#7 ) +processChars::@5: scope:[processChars] from processChars::@4 processChars::@8 + (byte) processChars::bitmask#7 ← phi( processChars::@4/(byte) processChars::bitmask#2 processChars::@8/(byte) processChars::bitmask#3 ) + (struct ProcessingSprite*) processChars::processing#4 ← phi( processChars::@4/(struct ProcessingSprite*) processChars::processing#7 processChars::@8/(struct ProcessingSprite*) processChars::processing#8 ) + (byte) processChars::i#4 ← phi( processChars::@4/(byte) processChars::i#7 processChars::@8/(byte) processChars::i#8 ) (number~) processChars::$11 ← (byte) processChars::i#4 * (number) 2 - (word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - (byte~) processChars::$12 ← ((byte)) *((word*) processChars::$27) + (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (byte~) processChars::$12 ← ((byte)) *((word*) processChars::$30) *((byte*) SPRITES_XPOS#0 + (number~) processChars::$11) ← (byte~) processChars::$12 (number~) processChars::$13 ← (byte) processChars::i#4 * (number) 2 - (byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y - *((byte*) SPRITES_YPOS#0 + (number~) processChars::$13) ← *((byte*) processChars::$28) - (word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - *((word*) processChars::$30) ← -- *((word*) processChars::$29) - (word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X - (bool~) processChars::$14 ← *((word*) processChars::$31) == (number) 0 - (bool~) processChars::$15 ← ! (bool~) processChars::$14 - if((bool~) processChars::$15) goto processChars::@2 - to:processChars::@9 -processChars::@9: scope:[processChars] from processChars::@5 - (byte) processChars::i#5 ← phi( processChars::@5/(byte) processChars::i#4 ) + (byte*) processChars::$31 ← (byte*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + *((byte*) SPRITES_YPOS#0 + (number~) processChars::$13) ← *((byte*) processChars::$31) + (number~) processChars::$14 ← (byte) BORDER_XPOS_LEFT#0 - (number) 8 + (word*) processChars::$32 ← (word*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (bool~) processChars::$15 ← *((word*) processChars::$32) == (number~) processChars::$14 + (number~) processChars::$16 ← (byte) BORDER_YPOS_TOP#0 - (number) 8 + (byte*) processChars::$33 ← (byte*)(struct ProcessingSprite*) processChars::processing#4 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (bool~) processChars::$17 ← *((byte*) processChars::$33) == (number~) processChars::$16 + (bool~) processChars::$18 ← (bool~) processChars::$15 || (bool~) processChars::$17 + if((bool~) processChars::$18) goto processChars::@6 + to:processChars::@10 +processChars::@6: scope:[processChars] from processChars::@5 + (byte) processChars::i#6 ← phi( processChars::@5/(byte) processChars::i#4 ) (byte) processChars::bitmask#4 ← phi( processChars::@5/(byte) processChars::bitmask#7 ) (struct ProcessingSprite*) processChars::processing#5 ← phi( processChars::@5/(struct ProcessingSprite*) processChars::processing#4 ) - (byte*) processChars::$32 ← (byte*)(struct ProcessingSprite*) processChars::processing#5 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - *((byte*) processChars::$32) ← (byte) STATUS_FREE#0 - (number~) processChars::$16 ← (number) $ff ^ (byte) processChars::bitmask#4 - *((byte*) SPRITES_ENABLE#0) ← *((byte*) SPRITES_ENABLE#0) & (number~) processChars::$16 + (byte*) processChars::$34 ← (byte*)(struct ProcessingSprite*) processChars::processing#5 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + *((byte*) processChars::$34) ← (byte) STATUS_FREE#0 + (number~) processChars::$19 ← (number) $ff ^ (byte) processChars::bitmask#4 + *((byte*) SPRITES_ENABLE#0) ← *((byte*) SPRITES_ENABLE#0) & (number~) processChars::$19 + to:processChars::@2 +processChars::@10: scope:[processChars] from processChars::@5 + (byte) processChars::i#5 ← phi( processChars::@5/(byte) processChars::i#4 ) + (struct ProcessingSprite*) processChars::processing#6 ← phi( processChars::@5/(struct ProcessingSprite*) processChars::processing#4 ) + (byte*) processChars::$35 ← (byte*)(struct ProcessingSprite*) processChars::processing#6 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte*) processChars::$36 ← (byte*)(struct ProcessingSprite*) processChars::processing#6 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + *((byte*) processChars::$36) ← -- *((byte*) processChars::$35) + (word*) processChars::$37 ← (word*)(struct ProcessingSprite*) processChars::processing#6 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + (word*) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#6 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X + *((word*) processChars::$38) ← -- *((word*) processChars::$37) to:processChars::@2 processChars::@return: scope:[processChars] from processChars::@2 return @@ -579,8 +589,8 @@ processChars::@return: scope:[processChars] from processChars::@2 @12: scope:[] from @9 (word[$28]) SQUARES_X#0 ← { fill( $28, 0) } (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) } - to:@15 -initSquareTables: scope:[initSquareTables] from main::@8 + to:@16 +initSquareTables: scope:[initSquareTables] from main (byte) initSquareTables::x#0 ← (byte) 0 to:initSquareTables::@1 initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@15 @@ -657,7 +667,37 @@ initSquareTables::@16: scope:[initSquareTables] from initSquareTables::@11 initSquareTables::@return: scope:[initSquareTables] from initSquareTables::@16 return to:@return -getCharToProcess: scope:[getCharToProcess] from main::@9 +initSprites: scope:[initSprites] from main::@2 + (byte*) initSprites::sp#0 ← (byte*) SPRITE_DATA#0 + to:initSprites::@1 +initSprites::@1: scope:[initSprites] from initSprites initSprites::@1 + (byte*) initSprites::sp#2 ← phi( initSprites/(byte*) initSprites::sp#0 initSprites::@1/(byte*) initSprites::sp#1 ) + *((byte*) initSprites::sp#2) ← (number) 0 + (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 + (number~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (number) $40 + (byte*~) initSprites::$1 ← (byte*) SPRITE_DATA#0 + (number~) initSprites::$0 + (bool~) initSprites::$2 ← (byte*) initSprites::sp#1 < (byte*~) initSprites::$1 + if((bool~) initSprites::$2) goto initSprites::@1 + to:initSprites::@2 +initSprites::@2: scope:[initSprites] from initSprites::@1 + (byte) initSprites::i#0 ← (byte) 0 + to:initSprites::@3 +initSprites::@3: scope:[initSprites] from initSprites::@2 initSprites::@3 + (byte) initSprites::i#2 ← phi( initSprites::@2/(byte) initSprites::i#0 initSprites::@3/(byte) initSprites::i#1 ) + *((byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (byte) LIGHT_BLUE#0 + (byte) initSprites::i#1 ← (byte) initSprites::i#2 + rangenext(0,7) + (bool~) initSprites::$3 ← (byte) initSprites::i#1 != rangelast(0,7) + if((bool~) initSprites::$3) goto initSprites::@3 + to:initSprites::@4 +initSprites::@4: scope:[initSprites] from initSprites::@3 + *((byte*) SPRITES_MC#0) ← (number) 0 + *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 + *((byte*) SPRITES_EXPAND_Y#0) ← (number) 0 + to:initSprites::@return +initSprites::@return: scope:[initSprites] from initSprites::@4 + return + to:@return +getCharToProcess: scope:[getCharToProcess] from main::@5 (byte) getCharToProcess::closest_x#0 ← (number) 0 (byte) getCharToProcess::closest_y#0 ← (number) 0 (word) getCharToProcess::closest_dist#0 ← (word) NOT_FOUND#0 @@ -764,9 +804,9 @@ getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@1 (word) getCharToProcess::return_dist#2 ← (word) getCharToProcess::return_dist#4 return to:@return -setupRasterIrq: scope:[setupRasterIrq] from main::@6 - (void()*) setupRasterIrq::irqRoutine#4 ← phi( main::@6/(void()*) setupRasterIrq::irqRoutine#0 ) - (word) setupRasterIrq::raster#1 ← phi( main::@6/(word) setupRasterIrq::raster#0 ) +setupRasterIrq: scope:[setupRasterIrq] from main::@14 + (void()*) setupRasterIrq::irqRoutine#4 ← phi( main::@14/(void()*) setupRasterIrq::irqRoutine#0 ) + (word) setupRasterIrq::raster#1 ← phi( main::@14/(word) setupRasterIrq::raster#0 ) asm { sei } *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 @@ -796,9 +836,9 @@ setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 setupRasterI setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 return to:@return -@15: scope:[] from @12 +@16: scope:[] from @12 (byte) RASTER_IRQ_TOP#0 ← (number) $30 - to:@16 + to:@17 irqTop: scope:[irqTop] from (byte) irqTop::i#0 ← (byte) 0 to:irqTop::@1 @@ -830,9 +870,9 @@ irqTop::@4: scope:[irqTop] from irqTop::@3 irqTop::@return: scope:[irqTop] from irqTop::@4 return to:@return -@16: scope:[] from @15 +@17: scope:[] from @16 (byte) RASTER_IRQ_MIDDLE#0 ← (number) $ff - to:@17 + to:@18 irqBottom: scope:[irqBottom] from (byte) irqBottom::i#0 ← (byte) 0 to:irqBottom::@1 @@ -858,19 +898,19 @@ irqBottom::@3: scope:[irqBottom] from irqBottom::@2 irqBottom::@return: scope:[irqBottom] from irqBottom::@3 return to:@return -@17: scope:[] from @16 - call main - to:@18 @18: scope:[] from @17 + call main + to:@19 +@19: scope:[] from @18 to:@end -@end: scope:[] from @18 +@end: scope:[] from @19 SYMBOL TABLE SSA (label) @12 -(label) @15 (label) @16 (label) @17 (label) @18 +(label) @19 (label) @9 (label) @begin (label) @end @@ -880,6 +920,12 @@ SYMBOL TABLE SSA (byte) BLUE#0 (byte*) BORDERCOL (byte*) BORDERCOL#0 +(byte) BORDER_XPOS_LEFT +(byte) BORDER_XPOS_LEFT#0 +(byte) BORDER_YPOS_TOP +(byte) BORDER_YPOS_TOP#0 +(byte*) CHARGEN +(byte*) CHARGEN#0 (byte*) CIA1_INTERRUPT (byte*) CIA1_INTERRUPT#0 (byte) CIA_INTERRUPT_CLEAR @@ -912,6 +958,8 @@ SYMBOL TABLE SSA (byte*) PROCPORT_DDR#0 (byte) PROCPORT_DDR_MEMORY_MASK (byte) PROCPORT_DDR_MEMORY_MASK#0 +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_CHARROM#0 (byte) PROCPORT_RAM_IO (byte) PROCPORT_RAM_IO#0 (word) ProcessingChar::dist @@ -1076,6 +1124,24 @@ SYMBOL TABLE SSA (byte) getCharToProcess::y#5 (byte) getCharToProcess::y#6 (byte) getCharToProcess::y#7 +(void()) initSprites() +(number~) initSprites::$0 +(byte*~) initSprites::$1 +(bool~) initSprites::$2 +(bool~) initSprites::$3 +(label) initSprites::@1 +(label) initSprites::@2 +(label) initSprites::@3 +(label) initSprites::@4 +(label) initSprites::@return +(byte) initSprites::i +(byte) initSprites::i#0 +(byte) initSprites::i#1 +(byte) initSprites::i#2 +(byte*) initSprites::sp +(byte*) initSprites::sp#0 +(byte*) initSprites::sp#1 +(byte*) initSprites::sp#2 (void()) initSquareTables() (bool~) initSquareTables::$0 (number~) initSquareTables::$1 @@ -1156,44 +1222,36 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) irqTop::i1#1 (byte) irqTop::i1#2 (void()) main() -(void()*~) main::$0 (bool~) main::$10 -(struct ProcessingChar~) main::$11 -(word) main::$11_dist -(byte) main::$11_x -(byte) main::$11_y -(bool~) main::$12 -(bool~) main::$13 -(byte*~) main::$17 -(byte~) main::$18 -(word*) main::$19 +(byte*~) main::$14 +(byte~) main::$15 +(word*) main::$16 +(byte*) main::$17 +(byte*) main::$18 +(byte*) main::$19 +(void()*~) main::$2 (byte*) main::$20 -(byte*) main::$21 -(byte*) main::$22 -(byte*) main::$23 -(byte**) main::$24 -(number~) main::$3 -(bool~) main::$4 -(number~) main::$5 +(byte**) main::$21 +(number~) main::$4 +(bool~) main::$5 (byte*~) main::$6 (bool~) main::$7 -(bool~) main::$8 -(byte*~) main::$9 +(struct ProcessingChar~) main::$8 +(word) main::$8_dist +(byte) main::$8_x +(byte) main::$8_y +(bool~) main::$9 (label) main::@1 -(label) main::@10 +(label) main::@11 +(label) main::@13 +(label) main::@14 (label) main::@15 +(label) main::@16 (label) main::@17 -(label) main::@18 -(label) main::@19 (label) main::@2 -(label) main::@20 (label) main::@3 -(label) main::@4 (label) main::@5 (label) main::@6 -(label) main::@7 -(label) main::@8 -(label) main::@9 (label) main::@return (struct ProcessingChar) main::center (word) main::center_dist @@ -1213,14 +1271,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) main::i#0 (byte) main::i#1 (byte) main::i#2 -(byte) main::i1 -(byte) main::i1#0 -(byte) main::i1#1 -(byte) main::i1#2 -(byte*) main::sp -(byte*) main::sp#0 -(byte*) main::sp#1 -(byte*) main::sp#2 (byte*) main::src (byte*) main::src#0 (byte*) main::src#1 @@ -1282,28 +1332,34 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (number~) processChars::$11 (byte~) processChars::$12 (number~) processChars::$13 -(bool~) processChars::$14 +(number~) processChars::$14 (bool~) processChars::$15 (number~) processChars::$16 (bool~) processChars::$17 -(byte~) processChars::$18 -(byte*) processChars::$19 +(bool~) processChars::$18 +(number~) processChars::$19 (number~) processChars::$2 -(byte*) processChars::$20 -(byte*) processChars::$21 -(word*) processChars::$22 -(byte**) processChars::$23 +(bool~) processChars::$20 +(byte~) processChars::$21 +(byte*) processChars::$22 +(byte*) processChars::$23 (byte*) processChars::$24 -(byte*) processChars::$25 -(byte*) processChars::$26 -(word*) processChars::$27 +(word*) processChars::$25 +(byte**) processChars::$26 +(byte*) processChars::$27 (byte*) processChars::$28 -(word*) processChars::$29 +(byte*) processChars::$29 (bool~) processChars::$3 (word*) processChars::$30 -(word*) processChars::$31 -(byte*) processChars::$32 -(bool~) processChars::$33 +(byte*) processChars::$31 +(word*) processChars::$32 +(byte*) processChars::$33 +(byte*) processChars::$34 +(byte*) processChars::$35 +(byte*) processChars::$36 +(word*) processChars::$37 +(word*) processChars::$38 +(bool~) processChars::$39 (bool~) processChars::$4 (bool~) processChars::$5 (bool~) processChars::$6 @@ -1312,13 +1368,14 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte~) processChars::$9 (label) processChars::@1 (label) processChars::@10 -(label) processChars::@11 +(label) processChars::@12 +(label) processChars::@13 (label) processChars::@2 (label) processChars::@3 (label) processChars::@4 (label) processChars::@5 -(label) processChars::@7 -(label) processChars::@9 +(label) processChars::@6 +(label) processChars::@8 (label) processChars::@return (byte) processChars::bitmask (byte) processChars::bitmask#0 @@ -1333,6 +1390,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) processChars::i#0 (byte) processChars::i#1 (byte) processChars::i#10 +(byte) processChars::i#11 (byte) processChars::i#2 (byte) processChars::i#3 (byte) processChars::i#4 @@ -1350,6 +1408,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (struct ProcessingSprite*) processChars::processing#5 (struct ProcessingSprite*) processChars::processing#6 (struct ProcessingSprite*) processChars::processing#7 +(struct ProcessingSprite*) processChars::processing#8 (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (bool~) setupRasterIrq::$0 (byte~) setupRasterIrq::$1 @@ -1372,34 +1431,37 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist) (word~) startProcessing::$0 (number~) startProcessing::$1 -(byte~) startProcessing::$10 -(word~) startProcessing::$11 +(word~) startProcessing::$10 +(number~) startProcessing::$11 (number~) startProcessing::$12 -(byte*~) startProcessing::$13 -(byte*~) startProcessing::$14 -(number~) startProcessing::$15 -(bool~) startProcessing::$16 -(bool~) startProcessing::$17 -(bool~) startProcessing::$18 +(number~) startProcessing::$13 +(number~) startProcessing::$14 +(byte*~) startProcessing::$15 +(byte~) startProcessing::$16 +(byte~) startProcessing::$17 +(number~) startProcessing::$18 (bool~) startProcessing::$19 (byte*~) startProcessing::$2 (bool~) startProcessing::$20 -(byte~) startProcessing::$21 -(byte~) startProcessing::$22 -(word*) startProcessing::$23 -(byte*) startProcessing::$24 -(byte*) startProcessing::$25 -(byte*) startProcessing::$26 +(bool~) startProcessing::$21 +(bool~) startProcessing::$22 +(bool~) startProcessing::$23 +(byte~) startProcessing::$24 +(byte~) startProcessing::$25 +(word*) startProcessing::$26 (byte*) startProcessing::$27 -(byte**) startProcessing::$28 +(byte*) startProcessing::$28 (byte*) startProcessing::$29 -(word~) startProcessing::$3 -(number~) startProcessing::$4 +(byte*~) startProcessing::$3 +(byte*) startProcessing::$30 +(byte**) startProcessing::$31 +(byte*) startProcessing::$32 +(word~) startProcessing::$4 (number~) startProcessing::$5 -(number~) startProcessing::$6 -(number~) startProcessing::$7 -(byte*~) startProcessing::$8 -(byte~) startProcessing::$9 +(byte*~) startProcessing::$6 +(word~) startProcessing::$7 +(number~) startProcessing::$8 +(byte*~) startProcessing::$9 (label) startProcessing::@1 (label) startProcessing::@10 (label) startProcessing::@2 @@ -1434,6 +1496,12 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) startProcessing::center_y#7 (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#9 +(byte) startProcessing::ch +(byte) startProcessing::ch#0 +(byte*) startProcessing::chargenData +(byte*) startProcessing::chargenData#0 +(byte*) startProcessing::chargenData#1 +(byte*) startProcessing::chargenData#2 (byte) startProcessing::freeIdx (byte) startProcessing::freeIdx#0 (byte) startProcessing::freeIdx#1 @@ -1454,6 +1522,8 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) startProcessing::i1#2 (byte*) startProcessing::screenPtr (byte*) startProcessing::screenPtr#0 +(byte*) startProcessing::screenPtr#1 +(byte*) startProcessing::screenPtr#2 (byte*) startProcessing::spriteData (byte*) startProcessing::spriteData#0 (byte*) startProcessing::spriteData#1 @@ -1471,6 +1541,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop() Adding number conversion cast (unumber) 7 in (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (number) 7 Adding number conversion cast (unumber) $35 in (byte) PROCPORT_RAM_IO#0 ← (number) $35 +Adding number conversion cast (unumber) $31 in (byte) PROCPORT_RAM_CHARROM#0 ← (number) $31 +Adding number conversion cast (unumber) $18 in (byte) BORDER_XPOS_LEFT#0 ← (number) $18 +Adding number conversion cast (unumber) $32 in (byte) BORDER_YPOS_TOP#0 ← (number) $32 Adding number conversion cast (unumber) $3f8 in (word) SPRITE_PTRS#0 ← (number) $3f8 Adding number conversion cast (unumber) 1 in (byte) IRQ_RASTER#0 ← (number) 1 Adding number conversion cast (unumber) $7f in (byte) CIA_INTERRUPT_CLEAR#0 ← (number) $7f @@ -1489,53 +1562,49 @@ Adding number conversion cast (unumber) $ffff in (word) NOT_FOUND#0 ← (number) Adding number conversion cast (unumber) 0 in (byte) STATUS_FREE#0 ← (number) 0 Adding number conversion cast (unumber) 1 in (byte) STATUS_NEW#0 ← (number) 1 Adding number conversion cast (unumber) 2 in (byte) STATUS_PROCESSING#0 ← (number) 2 -Adding number conversion cast (unumber) 1 in (number~) main::$3 ← (byte) NUM_PROCESSING#0 - (number) 1 -Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1 -Adding number conversion cast (unumber) 0 in *((word*) main::$19 + (byte~) main::$18) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) main::$20 + (byte~) main::$18) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) main::$21 + (byte~) main::$18) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) main::$22 + (byte~) main::$18) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) main::sp#2) ← (number) 0 -Adding number conversion cast (unumber) $40 in (number~) main::$5 ← (byte) NUM_PROCESSING#0 * (number) $40 -Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) NUM_PROCESSING#0 * (unumber)(number) $40 -Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_MC#0) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 -Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_EXPAND_Y#0) ← (number) 0 -Adding number conversion cast (unumber) $3e8 in (byte*~) main::$9 ← (byte*) SCREEN#0 + (number) $3e8 -Adding number conversion cast (unumber) $3e7 in (byte*~) main::$17 ← (byte*) SCREEN#0 + (number) $3e7 +Adding number conversion cast (unumber) 1 in (number~) main::$4 ← (byte) NUM_PROCESSING#0 - (number) 1 +Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in *((word*) main::$16 + (byte~) main::$15) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) main::$17 + (byte~) main::$15) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) main::$18 + (byte~) main::$15) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) main::$19 + (byte~) main::$15) ← (number) 0 +Adding number conversion cast (unumber) $3e8 in (byte*~) main::$6 ← (byte*) SCREEN#0 + (number) $3e8 +Adding number conversion cast (unumber) $3e7 in (byte*~) main::$14 ← (byte*) SCREEN#0 + (number) $3e7 Adding number conversion cast (unumber) $ff in (byte) startProcessing::freeIdx#0 ← (number) $ff -Adding number conversion cast (unumber) 1 in (number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (number) 1 -Adding number conversion cast (unumber) startProcessing::$15 in (number~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1 -Adding number conversion cast (unumber) $ff in (bool~) startProcessing::$19 ← (byte) startProcessing::freeIdx#2 == (number) $ff -Adding number conversion cast (unumber) $40 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $40 -Adding number conversion cast (unumber) startProcessing::$1 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (unumber)(number) $40 -Adding number conversion cast (unumber) $ff in *((byte*) startProcessing::spriteData#2) ← (number) $ff +Adding number conversion cast (unumber) 1 in (number~) startProcessing::$18 ← (byte) NUM_PROCESSING#0 - (number) 1 +Adding number conversion cast (unumber) startProcessing::$18 in (number~) startProcessing::$18 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1 +Adding number conversion cast (unumber) $ff in (bool~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 == (number) $ff +Adding number conversion cast (unumber) $28 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (number) $28 +Adding number conversion cast (unumber) startProcessing::$1 in (number~) startProcessing::$1 ← (word~) startProcessing::$0 * (unumber)(number) $28 +Adding number conversion cast (unumber) $40 in (number~) startProcessing::$5 ← (word~) startProcessing::$4 * (number) $40 +Adding number conversion cast (unumber) startProcessing::$5 in (number~) startProcessing::$5 ← (word~) startProcessing::$4 * (unumber)(number) $40 +Adding number conversion cast (unumber) 8 in (number~) startProcessing::$8 ← (word~) startProcessing::$7 * (number) 8 +Adding number conversion cast (unumber) startProcessing::$8 in (number~) startProcessing::$8 ← (word~) startProcessing::$7 * (unumber)(number) 8 Adding number conversion cast (unumber) 3 in (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (number) 3 -Adding number conversion cast (unumber) 8 in (number~) startProcessing::$4 ← (word~) startProcessing::$3 * (number) 8 -Adding number conversion cast (unumber) startProcessing::$4 in (number~) startProcessing::$4 ← (word~) startProcessing::$3 * (unumber)(number) 8 -Adding number conversion cast (unumber) $18 in (number~) startProcessing::$5 ← (number) $18 + (unumber~) startProcessing::$4 -Adding number conversion cast (unumber) startProcessing::$5 in (number~) startProcessing::$5 ← (unumber)(number) $18 + (unumber~) startProcessing::$4 -Adding number conversion cast (unumber) 8 in (number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (number) 8 -Adding number conversion cast (unumber) startProcessing::$6 in (number~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (unumber)(number) 8 -Adding number conversion cast (unumber) $32 in (number~) startProcessing::$7 ← (number) $32 + (unumber~) startProcessing::$6 -Adding number conversion cast (unumber) startProcessing::$7 in (number~) startProcessing::$7 ← (unumber)(number) $32 + (unumber~) startProcessing::$6 -Adding number conversion cast (unumber) $40 in (byte*~) startProcessing::$8 ← (byte*) SPRITE_DATA#0 / (number) $40 -Adding number conversion cast (unumber) $28 in (number~) startProcessing::$12 ← (word~) startProcessing::$11 * (number) $28 -Adding number conversion cast (unumber) startProcessing::$12 in (number~) startProcessing::$12 ← (word~) startProcessing::$11 * (unumber)(number) $28 +Adding number conversion cast (unumber) 8 in (number~) startProcessing::$11 ← (word~) startProcessing::$10 * (number) 8 +Adding number conversion cast (unumber) startProcessing::$11 in (number~) startProcessing::$11 ← (word~) startProcessing::$10 * (unumber)(number) 8 +Adding number conversion cast (unumber) startProcessing::$12 in (number~) startProcessing::$12 ← (byte) BORDER_XPOS_LEFT#0 + (unumber~) startProcessing::$11 +Adding number conversion cast (unumber) 8 in (number~) startProcessing::$13 ← (byte) startProcessing::center_y#2 * (number) 8 +Adding number conversion cast (unumber) startProcessing::$13 in (number~) startProcessing::$13 ← (byte) startProcessing::center_y#2 * (unumber)(number) 8 +Adding number conversion cast (unumber) startProcessing::$14 in (number~) startProcessing::$14 ← (byte) BORDER_YPOS_TOP#0 + (unumber~) startProcessing::$13 +Adding number conversion cast (unumber) $40 in (byte*~) startProcessing::$15 ← (byte*) SPRITE_DATA#0 / (number) $40 Adding number conversion cast (unumber) 1 in (number~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (number) 1 Adding number conversion cast (unumber) processChars::$0 in (number~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (unumber)(number) 1 -Adding number conversion cast (unumber) 1 in (number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$19) -Adding number conversion cast (unumber) processChars::$2 in (number~) processChars::$2 ← (unumber)(number) 1 << *((byte*) processChars::$19) -Adding number conversion cast (unumber) 0 in (bool~) processChars::$33 ← (number) 0 != (byte~) processChars::$9 +Adding number conversion cast (unumber) 1 in (number~) processChars::$2 ← (number) 1 << *((byte*) processChars::$22) +Adding number conversion cast (unumber) processChars::$2 in (number~) processChars::$2 ← (unumber)(number) 1 << *((byte*) processChars::$22) +Adding number conversion cast (unumber) 0 in (bool~) processChars::$39 ← (number) 0 != (byte~) processChars::$9 Adding number conversion cast (unumber) $ff in (number~) processChars::$10 ← (number) $ff ^ (byte) processChars::bitmask#3 Adding number conversion cast (unumber) processChars::$10 in (number~) processChars::$10 ← (unumber)(number) $ff ^ (byte) processChars::bitmask#3 Adding number conversion cast (unumber) 2 in (number~) processChars::$11 ← (byte) processChars::i#4 * (number) 2 Adding number conversion cast (unumber) processChars::$11 in (number~) processChars::$11 ← (byte) processChars::i#4 * (unumber)(number) 2 Adding number conversion cast (unumber) 2 in (number~) processChars::$13 ← (byte) processChars::i#4 * (number) 2 Adding number conversion cast (unumber) processChars::$13 in (number~) processChars::$13 ← (byte) processChars::i#4 * (unumber)(number) 2 -Adding number conversion cast (unumber) 0 in (bool~) processChars::$14 ← *((word*) processChars::$31) == (number) 0 -Adding number conversion cast (unumber) $ff in (number~) processChars::$16 ← (number) $ff ^ (byte) processChars::bitmask#4 -Adding number conversion cast (unumber) processChars::$16 in (number~) processChars::$16 ← (unumber)(number) $ff ^ (byte) processChars::bitmask#4 +Adding number conversion cast (unumber) 8 in (number~) processChars::$14 ← (byte) BORDER_XPOS_LEFT#0 - (number) 8 +Adding number conversion cast (unumber) processChars::$14 in (number~) processChars::$14 ← (byte) BORDER_XPOS_LEFT#0 - (unumber)(number) 8 +Adding number conversion cast (unumber) 8 in (number~) processChars::$16 ← (byte) BORDER_YPOS_TOP#0 - (number) 8 +Adding number conversion cast (unumber) processChars::$16 in (number~) processChars::$16 ← (byte) BORDER_YPOS_TOP#0 - (unumber)(number) 8 +Adding number conversion cast (unumber) $ff in (number~) processChars::$19 ← (number) $ff ^ (byte) processChars::bitmask#4 +Adding number conversion cast (unumber) processChars::$19 in (number~) processChars::$19 ← (unumber)(number) $ff ^ (byte) processChars::bitmask#4 Adding number conversion cast (unumber) $14 in (bool~) initSquareTables::$0 ← (byte) initSquareTables::x#2 < (number) $14 Adding number conversion cast (unumber) $14 in (number~) initSquareTables::$3 ← (number) $14 - (byte) initSquareTables::x#3 Adding number conversion cast (unumber) initSquareTables::$3 in (number~) initSquareTables::$3 ← (unumber)(number) $14 - (byte) initSquareTables::x#3 @@ -1554,6 +1623,12 @@ Adding number conversion cast (unumber) initSquareTables::$9 in (number~) initSq Adding number conversion cast (unumber) initSquareTables::$10 in (number~) initSquareTables::$10 ← (unumber~) initSquareTables::$9 Adding number conversion cast (unumber) initSquareTables::$13 in (byte) initSquareTables::y#6 ← phi( initSquareTables::@10/(byte) initSquareTables::y#4 initSquareTables::@9/(byte) initSquareTables::y#3 ) (number~) initSquareTables::$13 ← phi( initSquareTables::@9/(unumber~) initSquareTables::$12 initSquareTables::@10/(unumber~) initSquareTables::$10 ) +Adding number conversion cast (unumber) 0 in *((byte*) initSprites::sp#2) ← (number) 0 +Adding number conversion cast (unumber) $40 in (number~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (number) $40 +Adding number conversion cast (unumber) initSprites::$0 in (number~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (unumber)(number) $40 +Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_MC#0) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_EXPAND_X#0) ← (number) 0 +Adding number conversion cast (unumber) 0 in *((byte*) SPRITES_EXPAND_Y#0) ← (number) 0 Adding number conversion cast (unumber) 0 in (byte) getCharToProcess::closest_x#0 ← (number) 0 Adding number conversion cast (unumber) 0 in (byte) getCharToProcess::closest_y#0 ← (number) 0 Adding number conversion cast (unumber) $28 in (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#3 + (number) $28 @@ -1569,6 +1644,10 @@ Inlining cast (byte*) PROCPORT_DDR#0 ← (byte*)(number) 0 Inlining cast (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (unumber)(number) 7 Inlining cast (byte*) PROCPORT#0 ← (byte*)(number) 1 Inlining cast (byte) PROCPORT_RAM_IO#0 ← (unumber)(number) $35 +Inlining cast (byte) PROCPORT_RAM_CHARROM#0 ← (unumber)(number) $31 +Inlining cast (byte*) CHARGEN#0 ← (byte*)(number) $d000 +Inlining cast (byte) BORDER_XPOS_LEFT#0 ← (unumber)(number) $18 +Inlining cast (byte) BORDER_YPOS_TOP#0 ← (unumber)(number) $32 Inlining cast (word) SPRITE_PTRS#0 ← (unumber)(number) $3f8 Inlining cast (byte*) SPRITES_XPOS#0 ← (byte*)(number) $d000 Inlining cast (byte*) SPRITES_YPOS#0 ← (byte*)(number) $d001 @@ -1599,22 +1678,22 @@ Inlining cast (word) NOT_FOUND#0 ← (unumber)(number) $ffff Inlining cast (byte) STATUS_FREE#0 ← (unumber)(number) 0 Inlining cast (byte) STATUS_NEW#0 ← (unumber)(number) 1 Inlining cast (byte) STATUS_PROCESSING#0 ← (unumber)(number) 2 -Inlining cast *((word*) main::$19 + (byte~) main::$18) ← (unumber)(number) 0 -Inlining cast *((byte*) main::$20 + (byte~) main::$18) ← (unumber)(number) 0 -Inlining cast *((byte*) main::$21 + (byte~) main::$18) ← (unumber)(number) 0 -Inlining cast *((byte*) main::$22 + (byte~) main::$18) ← (unumber)(number) 0 -Inlining cast *((byte**) main::$24 + (byte~) main::$18) ← (byte*)(number) 0 -Inlining cast *((byte*) main::sp#2) ← (unumber)(number) 0 +Inlining cast *((word*) main::$16 + (byte~) main::$15) ← (unumber)(number) 0 +Inlining cast *((byte*) main::$17 + (byte~) main::$15) ← (unumber)(number) 0 +Inlining cast *((byte*) main::$18 + (byte~) main::$15) ← (unumber)(number) 0 +Inlining cast *((byte*) main::$19 + (byte~) main::$15) ← (unumber)(number) 0 +Inlining cast *((byte**) main::$21 + (byte~) main::$15) ← (byte*)(number) 0 +Inlining cast (byte) startProcessing::freeIdx#0 ← (unumber)(number) $ff +Inlining cast (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#1 +Inlining cast (word~) startProcessing::$4 ← (word)(byte) startProcessing::spriteIdx#0 +Inlining cast (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 +Inlining cast (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#2 +Inlining cast (byte~) startProcessing::$16 ← (byte)(byte*~) startProcessing::$15 +Inlining cast (byte~) processChars::$12 ← (byte)*((word*) processChars::$30) +Inlining cast *((byte*) initSprites::sp#2) ← (unumber)(number) 0 Inlining cast *((byte*) SPRITES_MC#0) ← (unumber)(number) 0 Inlining cast *((byte*) SPRITES_EXPAND_X#0) ← (unumber)(number) 0 Inlining cast *((byte*) SPRITES_EXPAND_Y#0) ← (unumber)(number) 0 -Inlining cast (byte) startProcessing::freeIdx#0 ← (unumber)(number) $ff -Inlining cast (word~) startProcessing::$0 ← (word)(byte) startProcessing::spriteIdx#0 -Inlining cast *((byte*) startProcessing::spriteData#2) ← (unumber)(number) $ff -Inlining cast (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#1 -Inlining cast (byte~) startProcessing::$9 ← (byte)(byte*~) startProcessing::$8 -Inlining cast (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#1 -Inlining cast (byte~) processChars::$12 ← (byte)*((word*) processChars::$27) Inlining cast (byte) getCharToProcess::closest_x#0 ← (unumber)(number) 0 Inlining cast (byte) getCharToProcess::closest_y#0 ← (unumber)(number) 0 Inlining cast (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::closest_y#3 @@ -1625,6 +1704,10 @@ Simplifying constant pointer cast (byte*) 0 Simplifying constant integer cast 7 Simplifying constant pointer cast (byte*) 1 Simplifying constant integer cast $35 +Simplifying constant integer cast $31 +Simplifying constant pointer cast (byte*) 53248 +Simplifying constant integer cast $18 +Simplifying constant integer cast $32 Simplifying constant integer cast $3f8 Simplifying constant pointer cast (byte*) 53248 Simplifying constant pointer cast (byte*) 53249 @@ -1666,32 +1749,26 @@ Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant pointer cast (byte*) 0 -Simplifying constant integer cast 0 -Simplifying constant integer cast $40 -Simplifying constant integer cast 0 -Simplifying constant integer cast 0 -Simplifying constant integer cast 0 Simplifying constant integer cast $3e8 Simplifying constant integer cast $3e7 Simplifying constant integer cast $ff Simplifying constant integer cast 1 Simplifying constant integer cast $ff +Simplifying constant integer cast $28 Simplifying constant integer cast $40 -Simplifying constant integer cast $ff +Simplifying constant integer cast 8 Simplifying constant integer cast 3 Simplifying constant integer cast 8 -Simplifying constant integer cast $18 Simplifying constant integer cast 8 -Simplifying constant integer cast $32 Simplifying constant integer cast $40 -Simplifying constant integer cast $28 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $ff Simplifying constant integer cast 2 Simplifying constant integer cast 2 -Simplifying constant integer cast 0 +Simplifying constant integer cast 8 +Simplifying constant integer cast 8 Simplifying constant integer cast $ff Simplifying constant integer cast $14 Simplifying constant integer cast $14 @@ -1700,6 +1777,11 @@ Simplifying constant integer cast $c Simplifying constant integer cast $c Simplifying constant integer cast $c Simplifying constant integer cast 0 +Simplifying constant integer cast $40 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 +Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast $28 Simplifying constant integer cast $28 @@ -1711,6 +1793,9 @@ Simplifying constant integer cast $ff Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 7 Finalized unsigned number type (byte) $35 +Finalized unsigned number type (byte) $31 +Finalized unsigned number type (byte) $18 +Finalized unsigned number type (byte) $32 Finalized unsigned number type (word) $3f8 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $7f @@ -1733,32 +1818,26 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) $40 -Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) 0 -Finalized unsigned number type (byte) 0 Finalized unsigned number type (word) $3e8 Finalized unsigned number type (word) $3e7 Finalized unsigned number type (byte) $ff Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $40 -Finalized unsigned number type (byte) $ff +Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 3 Finalized unsigned number type (byte) 8 -Finalized unsigned number type (byte) $18 Finalized unsigned number type (byte) 8 -Finalized unsigned number type (byte) $32 Finalized unsigned number type (byte) $40 -Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $ff Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 2 -Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) $ff Finalized unsigned number type (byte) $14 Finalized unsigned number type (byte) $14 @@ -1767,6 +1846,11 @@ Finalized unsigned number type (byte) $c Finalized unsigned number type (byte) $c Finalized unsigned number type (byte) $c Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $28 @@ -1777,21 +1861,23 @@ Finalized unsigned number type (byte) $30 Finalized unsigned number type (byte) $ff Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) mul8u::$1 ← (byte) mul8u::a#4 & (byte) 1 -Inferred type updated to byte in (unumber~) main::$3 ← (byte) NUM_PROCESSING#0 - (byte) 1 -Inferred type updated to byte in (unumber~) main::$5 ← (byte) NUM_PROCESSING#0 * (byte) $40 -Inferred type updated to byte in (unumber~) startProcessing::$15 ← (byte) NUM_PROCESSING#0 - (byte) 1 -Inferred type updated to word in (unumber~) startProcessing::$1 ← (word~) startProcessing::$0 * (byte) $40 -Inferred type updated to word in (unumber~) startProcessing::$4 ← (word~) startProcessing::$3 * (byte) 8 -Inferred type updated to word in (unumber~) startProcessing::$5 ← (byte) $18 + (word~) startProcessing::$4 -Inferred type updated to byte in (unumber~) startProcessing::$6 ← (byte) startProcessing::center_y#1 * (byte) 8 -Inferred type updated to byte in (unumber~) startProcessing::$7 ← (byte) $32 + (byte~) startProcessing::$6 -Inferred type updated to word in (unumber~) startProcessing::$12 ← (word~) startProcessing::$11 * (byte) $28 +Inferred type updated to byte in (unumber~) main::$4 ← (byte) NUM_PROCESSING#0 - (byte) 1 +Inferred type updated to byte in (unumber~) startProcessing::$18 ← (byte) NUM_PROCESSING#0 - (byte) 1 +Inferred type updated to word in (unumber~) startProcessing::$1 ← (word~) startProcessing::$0 * (byte) $28 +Inferred type updated to word in (unumber~) startProcessing::$5 ← (word~) startProcessing::$4 * (byte) $40 +Inferred type updated to word in (unumber~) startProcessing::$8 ← (word~) startProcessing::$7 * (byte) 8 +Inferred type updated to word in (unumber~) startProcessing::$11 ← (word~) startProcessing::$10 * (byte) 8 +Inferred type updated to word in (unumber~) startProcessing::$12 ← (byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 +Inferred type updated to byte in (unumber~) startProcessing::$13 ← (byte) startProcessing::center_y#2 * (byte) 8 +Inferred type updated to byte in (unumber~) startProcessing::$14 ← (byte) BORDER_YPOS_TOP#0 + (byte~) startProcessing::$13 Inferred type updated to byte in (unumber~) processChars::$0 ← (byte) NUM_PROCESSING#0 - (byte) 1 -Inferred type updated to byte in (unumber~) processChars::$2 ← (byte) 1 << *((byte*) processChars::$19) +Inferred type updated to byte in (unumber~) processChars::$2 ← (byte) 1 << *((byte*) processChars::$22) Inferred type updated to byte in (unumber~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#3 Inferred type updated to byte in (unumber~) processChars::$11 ← (byte) processChars::i#4 * (byte) 2 Inferred type updated to byte in (unumber~) processChars::$13 ← (byte) processChars::i#4 * (byte) 2 -Inferred type updated to byte in (unumber~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#4 +Inferred type updated to byte in (unumber~) processChars::$14 ← (byte) BORDER_XPOS_LEFT#0 - (byte) 8 +Inferred type updated to byte in (unumber~) processChars::$16 ← (byte) BORDER_YPOS_TOP#0 - (byte) 8 +Inferred type updated to byte in (unumber~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#4 Inferred type updated to byte in (unumber~) initSquareTables::$3 ← (byte) $14 - (byte) initSquareTables::x#3 Inferred type updated to byte in (unumber~) initSquareTables::$4 ← (byte~) initSquareTables::$3 Inferred type updated to byte in (unumber~) initSquareTables::$1 ← (byte) initSquareTables::x#4 - (byte) $14 @@ -1802,16 +1888,16 @@ Inferred type updated to byte in (unumber~) initSquareTables::$12 ← (byte~) in Inferred type updated to byte in (unumber~) initSquareTables::$9 ← (byte) initSquareTables::y#4 - (byte) $c Inferred type updated to byte in (unumber~) initSquareTables::$10 ← (byte~) initSquareTables::$9 Inferred type updated to byte for (unumber~) initSquareTables::$13 +Inferred type updated to byte in (unumber~) initSprites::$0 ← (byte) NUM_PROCESSING#0 * (byte) $40 Inferred type updated to word in (unumber~) getCharToProcess::$10 ← (word~) getCharToProcess::$9 * (byte) $28 -Inversing boolean not [35] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [34] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0 -Inversing boolean not [121] (bool~) main::$13 ← (word) main::center_dist#0 != (word) NOT_FOUND#0 from [120] (bool~) main::$12 ← (word) main::center_dist#0 == (word) NOT_FOUND#0 -Inversing boolean not [142] (bool~) startProcessing::$17 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) != (byte) STATUS_FREE#0 from [141] (bool~) startProcessing::$16 ← *((byte*) startProcessing::$29 + (byte~) startProcessing::$21) == (byte) STATUS_FREE#0 -Inversing boolean not [208] (bool~) processChars::$4 ← *((byte*) processChars::$20) == (byte) STATUS_FREE#0 from [207] (bool~) processChars::$3 ← *((byte*) processChars::$20) != (byte) STATUS_FREE#0 -Inversing boolean not [217] (bool~) processChars::$6 ← *((byte*) processChars::$21) != (byte) STATUS_NEW#0 from [216] (bool~) processChars::$5 ← *((byte*) processChars::$21) == (byte) STATUS_NEW#0 -Inversing boolean not [253] (bool~) processChars::$15 ← *((word*) processChars::$31) != (byte) 0 from [252] (bool~) processChars::$14 ← *((word*) processChars::$31) == (byte) 0 -Inversing boolean not [319] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [318] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' ' -Inversing boolean not [331] (bool~) getCharToProcess::$6 ← (word) getCharToProcess::dist#0 >= (word) getCharToProcess::closest_dist#2 from [330] (bool~) getCharToProcess::$5 ← (word) getCharToProcess::dist#0 < (word) getCharToProcess::closest_dist#2 -Inversing boolean not [344] (bool~) getCharToProcess::$1 ← (word) getCharToProcess::closest_dist#3 == (word) NOT_FOUND#0 from [343] (bool~) getCharToProcess::$0 ← (word) getCharToProcess::closest_dist#3 != (word) NOT_FOUND#0 +Inversing boolean not [39] (bool~) mul8u::$3 ← (byte~) mul8u::$1 == (byte) 0 from [38] (bool~) mul8u::$2 ← (byte~) mul8u::$1 != (byte) 0 +Inversing boolean not [109] (bool~) main::$10 ← (word) main::center_dist#0 != (word) NOT_FOUND#0 from [108] (bool~) main::$9 ← (word) main::center_dist#0 == (word) NOT_FOUND#0 +Inversing boolean not [130] (bool~) startProcessing::$20 ← *((byte*) startProcessing::$32 + (byte~) startProcessing::$24) != (byte) STATUS_FREE#0 from [129] (bool~) startProcessing::$19 ← *((byte*) startProcessing::$32 + (byte~) startProcessing::$24) == (byte) STATUS_FREE#0 +Inversing boolean not [206] (bool~) processChars::$4 ← *((byte*) processChars::$23) == (byte) STATUS_FREE#0 from [205] (bool~) processChars::$3 ← *((byte*) processChars::$23) != (byte) STATUS_FREE#0 +Inversing boolean not [215] (bool~) processChars::$6 ← *((byte*) processChars::$24) != (byte) STATUS_NEW#0 from [214] (bool~) processChars::$5 ← *((byte*) processChars::$24) == (byte) STATUS_NEW#0 +Inversing boolean not [343] (bool~) getCharToProcess::$3 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) == (byte) ' ' from [342] (bool~) getCharToProcess::$2 ← *((byte*) getCharToProcess::screen_line#2 + (byte) getCharToProcess::x#2) != (byte) ' ' +Inversing boolean not [355] (bool~) getCharToProcess::$6 ← (word) getCharToProcess::dist#0 >= (word) getCharToProcess::closest_dist#2 from [354] (bool~) getCharToProcess::$5 ← (word) getCharToProcess::dist#0 < (word) getCharToProcess::closest_dist#2 +Inversing boolean not [368] (bool~) getCharToProcess::$1 ← (word) getCharToProcess::closest_dist#3 == (word) NOT_FOUND#0 from [367] (bool~) getCharToProcess::$0 ← (word) getCharToProcess::closest_dist#3 != (word) NOT_FOUND#0 Successful SSA optimization Pass2UnaryNotSimplification Alias (word) mul8u::mb#0 = (byte) mul8u::b#2 Alias (byte) mul8u::a#3 = (byte) mul8u::a#4 (byte) mul8u::a#7 @@ -1820,37 +1906,39 @@ Alias (word) mul8u::res#2 = (word) mul8u::res#5 (word) mul8u::res#4 (word) mul8u Alias (byte) mul8u::a#0 = (byte~) mul8u::$5 Alias (word) mul8u::mb#1 = (word~) mul8u::$6 Alias (word) mul8u::res#1 = (word~) mul8u::$4 -Alias (void()*) setupRasterIrq::irqRoutine#0 = (void()*~) main::$0 +Alias (void()*) setupRasterIrq::irqRoutine#0 = (void()*~) main::$2 Alias (byte) getCharToProcess::return_x#0 = (byte) getCharToProcess::return_x#3 Alias (byte) getCharToProcess::return_y#0 = (byte) getCharToProcess::return_y#3 Alias (word) getCharToProcess::return_dist#0 = (word) getCharToProcess::return_dist#3 -Alias (byte) main::center_x#0 = (byte) main::$11_x (byte) main::center_x#1 -Alias (byte) main::center_y#0 = (byte) main::$11_y (byte) main::center_y#1 -Alias (word) main::center_dist#0 = (word) main::$11_dist (word) main::center_dist#1 +Alias (byte) main::center_x#0 = (byte) main::$8_x (byte) main::center_x#1 +Alias (byte) main::center_y#0 = (byte) main::$8_y (byte) main::center_y#1 +Alias (word) main::center_dist#0 = (word) main::$8_dist (word) main::center_dist#1 Alias (byte) startProcessing::i#2 = (byte) startProcessing::i#3 (byte) startProcessing::i#4 (byte) startProcessing::freeIdx#1 Alias (byte) startProcessing::freeIdx#4 = (byte) startProcessing::freeIdx#5 -Alias (byte) startProcessing::center_x#5 = (byte) startProcessing::center_x#7 (byte) startProcessing::center_x#6 Alias (byte) startProcessing::center_y#5 = (byte) startProcessing::center_y#7 (byte) startProcessing::center_y#6 +Alias (byte) startProcessing::center_x#5 = (byte) startProcessing::center_x#7 (byte) startProcessing::center_x#6 Alias (byte) startProcessing::freeIdx#2 = (byte) startProcessing::freeIdx#3 (byte) startProcessing::spriteIdx#0 -Alias (byte) startProcessing::center_x#3 = (byte) startProcessing::center_x#4 -Alias (byte) startProcessing::center_y#3 = (byte) startProcessing::center_y#4 -Alias (byte*) startProcessing::spriteData#0 = (byte*~) startProcessing::$2 -Alias (byte) startProcessing::center_x#1 = (byte) startProcessing::center_x#2 -Alias (byte) startProcessing::center_y#1 = (byte) startProcessing::center_y#2 +Alias (byte) startProcessing::center_y#1 = (byte) startProcessing::center_y#3 +Alias (byte) startProcessing::center_x#1 = (byte) startProcessing::center_x#3 +Alias (byte*) startProcessing::screenPtr#0 = (byte*~) startProcessing::$3 +Alias (byte*) startProcessing::spriteData#0 = (byte*~) startProcessing::$6 +Alias (byte*) startProcessing::chargenData#0 = (byte*~) startProcessing::$9 +Alias (byte) startProcessing::center_x#2 = (byte) startProcessing::center_x#4 +Alias (byte) startProcessing::center_y#2 = (byte) startProcessing::center_y#4 Alias (byte) startProcessing::spriteIdx#1 = (byte) startProcessing::spriteIdx#2 -Alias (word) startProcessing::spriteX#0 = (word~) startProcessing::$5 -Alias (byte) startProcessing::spriteY#0 = (byte~) startProcessing::$7 -Alias (byte) startProcessing::spritePtr#0 = (byte~) startProcessing::$10 -Alias (byte*) startProcessing::screenPtr#0 = (byte*~) startProcessing::$14 +Alias (byte*) startProcessing::screenPtr#1 = (byte*) startProcessing::screenPtr#2 +Alias (word) startProcessing::spriteX#0 = (word~) startProcessing::$12 +Alias (byte) startProcessing::spriteY#0 = (byte~) startProcessing::$14 +Alias (byte) startProcessing::spritePtr#0 = (byte~) startProcessing::$17 Alias (struct ProcessingSprite*) processChars::processing#0 = (struct ProcessingSprite*~) processChars::$1 (struct ProcessingSprite*) processChars::processing#1 (struct ProcessingSprite*) processChars::processing#3 Alias (byte) processChars::bitmask#0 = (byte~) processChars::$2 (byte) processChars::bitmask#5 (byte) processChars::bitmask#1 -Alias (byte) processChars::i#10 = (byte) processChars::i#9 (byte) processChars::i#2 +Alias (byte) processChars::i#10 = (byte) processChars::i#2 (byte) processChars::i#11 Alias (byte) processChars::bitmask#2 = (byte) processChars::bitmask#6 (byte) processChars::bitmask#3 -Alias (byte) processChars::i#6 = (byte) processChars::i#8 (byte) processChars::i#7 -Alias (struct ProcessingSprite*) processChars::processing#2 = (struct ProcessingSprite*) processChars::processing#6 (struct ProcessingSprite*) processChars::processing#7 -Alias (struct ProcessingSprite*) processChars::processing#4 = (struct ProcessingSprite*) processChars::processing#5 +Alias (byte) processChars::i#7 = (byte) processChars::i#9 (byte) processChars::i#8 +Alias (struct ProcessingSprite*) processChars::processing#2 = (struct ProcessingSprite*) processChars::processing#7 (struct ProcessingSprite*) processChars::processing#8 +Alias (struct ProcessingSprite*) processChars::processing#4 = (struct ProcessingSprite*) processChars::processing#5 (struct ProcessingSprite*) processChars::processing#6 Alias (byte) processChars::bitmask#4 = (byte) processChars::bitmask#7 -Alias (byte) processChars::i#4 = (byte) processChars::i#5 +Alias (byte) processChars::i#4 = (byte) processChars::i#6 (byte) processChars::i#5 Alias (byte) initSquareTables::x#2 = (byte) initSquareTables::x#3 (byte) initSquareTables::x#4 Alias (byte~) initSquareTables::$4 = (byte~) initSquareTables::$3 Alias (byte~) initSquareTables::$2 = (byte~) initSquareTables::$1 @@ -1887,11 +1975,11 @@ Alias candidate removed (solo) (byte) getCharToProcess::x#3 = Alias candidate removed (solo) (byte) getCharToProcess::y#4 = Alias (byte) mul8u::a#3 = (byte) mul8u::a#5 Alias (word) mul8u::mb#2 = (word) mul8u::mb#3 -Alias (byte) startProcessing::center_x#3 = (byte) startProcessing::center_x#5 -Alias (byte) startProcessing::center_y#3 = (byte) startProcessing::center_y#5 +Alias (byte) startProcessing::center_y#1 = (byte) startProcessing::center_y#5 +Alias (byte) startProcessing::center_x#1 = (byte) startProcessing::center_x#5 Alias (struct ProcessingSprite*) processChars::processing#0 = (struct ProcessingSprite*) processChars::processing#2 (struct ProcessingSprite*) processChars::processing#4 Alias (byte) processChars::bitmask#0 = (byte) processChars::bitmask#2 (byte) processChars::bitmask#4 -Alias (byte) processChars::i#10 = (byte) processChars::i#6 (byte) processChars::i#4 +Alias (byte) processChars::i#10 = (byte) processChars::i#7 (byte) processChars::i#4 Alias (byte) initSquareTables::x#2 = (byte) initSquareTables::x#5 Alias (byte) initSquareTables::y#2 = (byte) initSquareTables::y#5 Alias (byte*) getCharToProcess::screen_line#2 = (byte*) getCharToProcess::screen_line#3 @@ -1912,70 +2000,77 @@ Alias candidate removed (phi-usage) (byte) getCharToProcess::y#2 Alias candidate removed (solo) (byte) getCharToProcess::x#3 = Alias candidate removed (solo) (byte) getCharToProcess::y#4 = Self Phi Eliminated (byte) startProcessing::freeIdx#4 -Self Phi Eliminated (byte) startProcessing::center_x#3 -Self Phi Eliminated (byte) startProcessing::center_y#3 -Self Phi Eliminated (byte) startProcessing::center_x#1 Self Phi Eliminated (byte) startProcessing::center_y#1 +Self Phi Eliminated (byte) startProcessing::center_x#1 +Self Phi Eliminated (byte) startProcessing::center_x#2 +Self Phi Eliminated (byte) startProcessing::center_y#2 Self Phi Eliminated (byte) startProcessing::spriteIdx#1 +Self Phi Eliminated (byte*) startProcessing::screenPtr#1 Self Phi Eliminated (byte*) getCharToProcess::screen_line#2 Successful SSA optimization Pass2SelfPhiElimination -Identical Phi Values (byte) startProcessing::center_x#9 (byte) startProcessing::center_x#0 Identical Phi Values (byte) startProcessing::center_y#9 (byte) startProcessing::center_y#0 +Identical Phi Values (byte) startProcessing::center_x#9 (byte) startProcessing::center_x#0 Identical Phi Values (byte) startProcessing::freeIdx#4 (byte) startProcessing::freeIdx#6 -Identical Phi Values (byte) startProcessing::center_x#3 (byte) startProcessing::center_x#8 -Identical Phi Values (byte) startProcessing::center_y#3 (byte) startProcessing::center_y#8 -Identical Phi Values (byte) startProcessing::center_x#1 (byte) startProcessing::center_x#3 -Identical Phi Values (byte) startProcessing::center_y#1 (byte) startProcessing::center_y#3 +Identical Phi Values (byte) startProcessing::center_y#1 (byte) startProcessing::center_y#8 +Identical Phi Values (byte) startProcessing::center_x#1 (byte) startProcessing::center_x#8 +Identical Phi Values (byte) startProcessing::center_x#2 (byte) startProcessing::center_x#1 +Identical Phi Values (byte) startProcessing::center_y#2 (byte) startProcessing::center_y#1 Identical Phi Values (byte) startProcessing::spriteIdx#1 (byte) startProcessing::freeIdx#2 +Identical Phi Values (byte*) startProcessing::screenPtr#1 (byte*) startProcessing::screenPtr#0 Identical Phi Values (byte*) getCharToProcess::screen_line#2 (byte*) getCharToProcess::screen_line#4 Identical Phi Values (byte) getCharToProcess::x#3 (byte) getCharToProcess::x#2 Identical Phi Values (byte) getCharToProcess::y#4 (byte) getCharToProcess::y#2 Identical Phi Values (word) setupRasterIrq::raster#1 (word) setupRasterIrq::raster#0 Identical Phi Values (void()*) setupRasterIrq::irqRoutine#1 (void()*) setupRasterIrq::irqRoutine#0 Successful SSA optimization Pass2IdenticalPhiElimination -Identified duplicate assignment right side [245] (byte~) processChars::$13 ← (byte) processChars::i#10 * (byte) 2 +Identified duplicate assignment right side [243] (byte~) processChars::$13 ← (byte) processChars::i#10 * (byte) 2 Successful SSA optimization Pass2DuplicateRValueIdentification -Simple Condition (bool~) mul8u::$0 [31] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -Simple Condition (bool~) mul8u::$3 [36] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 -Simple Condition (bool~) main::$4 [77] if((byte) main::i#1!=rangelast(0,main::$3)) goto main::@1 -Simple Condition (bool~) main::$7 [85] if((byte*) main::sp#1<(byte*~) main::$6) goto main::@3 -Simple Condition (bool~) main::$8 [91] if((byte) main::i1#1!=rangelast(0,7)) goto main::@5 -Simple Condition (bool~) main::$10 [107] if((byte*) main::src#1!=(byte*~) main::$9) goto main::@7 -Simple Condition (bool~) main::$13 [122] if((word) main::center_dist#0!=(word) NOT_FOUND#0) goto main::@10 -Simple Condition (bool~) startProcessing::$17 [143] if(*((byte*) startProcessing::$29 + (byte~) startProcessing::$21)!=(byte) STATUS_FREE#0) goto startProcessing::@3 -Simple Condition (bool~) startProcessing::$18 [147] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$15)) goto startProcessing::@2 -Simple Condition (bool~) startProcessing::$19 [152] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 -Simple Condition (bool~) startProcessing::$20 [165] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 -Simple Condition (bool~) processChars::$4 [209] if(*((byte*) processChars::$20)==(byte) STATUS_FREE#0) goto processChars::@2 -Simple Condition (bool~) processChars::$17 [213] if((byte) processChars::i#1!=rangelast(0,processChars::$0)) goto processChars::@1 -Simple Condition (bool~) processChars::$6 [218] if(*((byte*) processChars::$21)!=(byte) STATUS_NEW#0) goto processChars::@3 -Simple Condition (bool~) processChars::$33 [223] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -Simple Condition (bool~) processChars::$15 [254] if(*((word*) processChars::$31)!=(byte) 0) goto processChars::@2 -Simple Condition (bool~) initSquareTables::$0 [266] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -Simple Condition (bool~) initSquareTables::$7 [285] if((byte) initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 -Simple Condition (bool~) initSquareTables::$8 [289] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@9 -Simple Condition (bool~) initSquareTables::$15 [308] if((byte) initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 -Simple Condition (bool~) getCharToProcess::$3 [320] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$7 [324] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 -Simple Condition (bool~) getCharToProcess::$6 [332] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 -Simple Condition (bool~) getCharToProcess::$8 [341] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 -Simple Condition (bool~) getCharToProcess::$1 [345] if((word) getCharToProcess::return_dist#1==(word) NOT_FOUND#0) goto getCharToProcess::@1 -Simple Condition (bool~) setupRasterIrq::$0 [367] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 -Simple Condition (bool~) irqTop::$1 [384] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@1 -Simple Condition (bool~) irqTop::$2 [391] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3 -Simple Condition (bool~) irqBottom::$2 [404] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1 +Simple Condition (bool~) mul8u::$0 [35] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 +Simple Condition (bool~) mul8u::$3 [40] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@4 +Simple Condition (bool~) main::$5 [82] if((byte) main::i#1!=rangelast(0,main::$4)) goto main::@1 +Simple Condition (bool~) main::$7 [96] if((byte*) main::src#1!=(byte*~) main::$6) goto main::@3 +Simple Condition (bool~) main::$10 [110] if((word) main::center_dist#0!=(word) NOT_FOUND#0) goto main::@6 +Simple Condition (bool~) startProcessing::$20 [131] if(*((byte*) startProcessing::$32 + (byte~) startProcessing::$24)!=(byte) STATUS_FREE#0) goto startProcessing::@3 +Simple Condition (bool~) startProcessing::$21 [135] if((byte) startProcessing::i#1!=rangelast(0,startProcessing::$18)) goto startProcessing::@2 +Simple Condition (bool~) startProcessing::$22 [140] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@1 +Simple Condition (bool~) startProcessing::$23 [166] if((byte) startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 +Simple Condition (bool~) processChars::$4 [207] if(*((byte*) processChars::$23)==(byte) STATUS_FREE#0) goto processChars::@2 +Simple Condition (bool~) processChars::$20 [211] if((byte) processChars::i#1!=rangelast(0,processChars::$0)) goto processChars::@1 +Simple Condition (bool~) processChars::$6 [216] if(*((byte*) processChars::$24)!=(byte) STATUS_NEW#0) goto processChars::@3 +Simple Condition (bool~) processChars::$39 [221] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 +Simple Condition (bool~) initSquareTables::$0 [272] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 +Simple Condition (bool~) initSquareTables::$7 [291] if((byte) initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 +Simple Condition (bool~) initSquareTables::$8 [295] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@9 +Simple Condition (bool~) initSquareTables::$15 [314] if((byte) initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 +Simple Condition (bool~) initSprites::$2 [323] if((byte*) initSprites::sp#1<(byte*~) initSprites::$1) goto initSprites::@1 +Simple Condition (bool~) initSprites::$3 [329] if((byte) initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 +Simple Condition (bool~) getCharToProcess::$3 [344] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$7 [348] if((byte) getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 +Simple Condition (bool~) getCharToProcess::$6 [356] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@5 +Simple Condition (bool~) getCharToProcess::$8 [365] if((byte) getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 +Simple Condition (bool~) getCharToProcess::$1 [369] if((word) getCharToProcess::return_dist#1==(word) NOT_FOUND#0) goto getCharToProcess::@1 +Simple Condition (bool~) setupRasterIrq::$0 [391] if((word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +Simple Condition (bool~) irqTop::$1 [408] if((byte) irqTop::i#1!=rangelast(0,4)) goto irqTop::@1 +Simple Condition (bool~) irqTop::$2 [415] if((byte) irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3 +Simple Condition (bool~) irqBottom::$2 [428] if((byte) irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1 Successful SSA optimization Pass2ConditionalJumpSimplification -Constant right-side identified [52] (byte[$3e8]) SCREEN_COPY#0 ← { fill( $3e8, 0) } -Constant right-side identified [95] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop() -Constant right-side identified [261] (word[$28]) SQUARES_X#0 ← { fill( $28, 0) } -Constant right-side identified [262] (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) } -Constant right-side identified [395] (void()*~) irqTop::$0 ← & interrupt(HARDWARE_ALL)(void()) irqBottom() -Constant right-side identified [411] (void()*~) irqBottom::$1 ← & interrupt(HARDWARE_ALL)(void()) irqTop() +Rewriting || if()-condition to two if()s [252] (bool~) processChars::$18 ← (bool~) processChars::$15 || (bool~) processChars::$17 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Constant right-side identified [56] (byte[$3e8]) SCREEN_COPY#0 ← { fill( $3e8, 0) } +Constant right-side identified [84] (void()*) setupRasterIrq::irqRoutine#0 ← & interrupt(HARDWARE_ALL)(void()) irqTop() +Constant right-side identified [267] (word[$28]) SQUARES_X#0 ← { fill( $28, 0) } +Constant right-side identified [268] (word[$19]) SQUARES_Y#0 ← { fill( $19, 0) } +Constant right-side identified [419] (void()*~) irqTop::$0 ← & interrupt(HARDWARE_ALL)(void()) irqBottom() +Constant right-side identified [435] (void()*~) irqBottom::$1 ← & interrupt(HARDWARE_ALL)(void()) irqTop() Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) PROCPORT_DDR#0 = (byte*) 0 Constant (const byte) PROCPORT_DDR_MEMORY_MASK#0 = 7 Constant (const byte*) PROCPORT#0 = (byte*) 1 Constant (const byte) PROCPORT_RAM_IO#0 = $35 +Constant (const byte) PROCPORT_RAM_CHARROM#0 = $31 +Constant (const byte*) CHARGEN#0 = (byte*) 53248 +Constant (const byte) BORDER_XPOS_LEFT#0 = $18 +Constant (const byte) BORDER_YPOS_TOP#0 = $32 Constant (const word) SPRITE_PTRS#0 = $3f8 Constant (const byte*) SPRITES_XPOS#0 = (byte*) 53248 Constant (const byte*) SPRITES_YPOS#0 = (byte*) 53249 @@ -2008,7 +2103,6 @@ Constant (const byte) STATUS_FREE#0 = 0 Constant (const byte) STATUS_NEW#0 = 1 Constant (const byte) STATUS_PROCESSING#0 = 2 Constant (const byte) main::i#0 = 0 -Constant (const byte) main::i1#0 = 0 Constant (const void()*) setupRasterIrq::irqRoutine#0 = &irqTop Constant (const byte) startProcessing::freeIdx#0 = $ff Constant (const byte) startProcessing::i#0 = 0 @@ -2018,6 +2112,7 @@ Constant (const word[$28]) SQUARES_X#0 = { fill( $28, 0) } Constant (const word[$19]) SQUARES_Y#0 = { fill( $19, 0) } Constant (const byte) initSquareTables::x#0 = 0 Constant (const byte) initSquareTables::y#0 = 0 +Constant (const byte) initSprites::i#0 = 0 Constant (const byte) getCharToProcess::closest_x#0 = 0 Constant (const byte) getCharToProcess::closest_y#0 = 0 Constant (const byte) getCharToProcess::y#0 = 0 @@ -2030,93 +2125,100 @@ Constant (const byte) RASTER_IRQ_MIDDLE#0 = $ff Constant (const byte) irqBottom::i#0 = 0 Constant (const void()*) irqBottom::$1 = &irqTop Successful SSA optimization Pass2ConstantIdentification -Constant (const byte*) main::sp#0 = SPRITE_DATA#0 Constant (const word) setupRasterIrq::raster#0 = RASTER_IRQ_TOP#0 Constant (const byte*) main::src#0 = SCREEN#0 Constant (const byte*) main::dst#0 = SCREEN_COPY#0 +Constant (const byte*) initSprites::sp#0 = SPRITE_DATA#0 Constant (const word) getCharToProcess::closest_dist#0 = NOT_FOUND#0 Constant (const byte*) getCharToProcess::screen_line#0 = SCREEN_COPY#0 Successful SSA optimization Pass2ConstantIdentification -Constant value identified { fill( NUM_PROCESSING#0, 0) } in [58] (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } +Constant value identified { fill( NUM_PROCESSING#0, 0) } in [62] (struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 ← { fill( NUM_PROCESSING#0, 0) } Successful SSA optimization Pass2ConstantValues -if() condition always true - replacing block destination [128] if(true) goto main::@9 -if() condition always true - replacing block destination [131] if(true) goto main::@15 -if() condition always true - replacing block destination [367] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 +if() condition always true - replacing block destination [116] if(true) goto main::@5 +if() condition always true - replacing block destination [119] if(true) goto main::@11 +if() condition always true - replacing block destination [391] if((const word) setupRasterIrq::raster#0<(word) $100) goto setupRasterIrq::@1 Successful SSA optimization Pass2ConstantIfs -Resolved ranged next value [89] main::i1#1 ← ++ main::i1#2 to ++ -Resolved ranged comparison value [91] if(main::i1#1!=rangelast(0,7)) goto main::@5 to (number) 8 -Resolved ranged next value [163] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ -Resolved ranged comparison value [165] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 -Resolved ranged next value [283] initSquareTables::x#1 ← ++ initSquareTables::x#2 to ++ -Resolved ranged comparison value [285] if(initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 to (number) $28 -Resolved ranged next value [306] initSquareTables::y#1 ← ++ initSquareTables::y#2 to ++ -Resolved ranged comparison value [308] if(initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 to (number) $19 -Resolved ranged next value [322] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++ -Resolved ranged comparison value [324] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28 -Resolved ranged next value [339] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++ -Resolved ranged comparison value [341] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19 -Resolved ranged next value [382] irqTop::i#1 ← ++ irqTop::i#2 to ++ -Resolved ranged comparison value [384] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@1 to (number) 5 -Resolved ranged next value [389] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ -Resolved ranged comparison value [391] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3 to (number) 8 -Resolved ranged next value [402] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ -Resolved ranged comparison value [404] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1 to (number) 5 -Converting *(pointer+n) to pointer[n] [204] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$19) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [209] if(*((byte*) processChars::$20)==(const byte) STATUS_FREE#0) goto processChars::@2 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [218] if(*((byte*) processChars::$21)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [221] (byte~) processChars::$9 ← > *((word*) processChars::$22) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [226] *(*((byte**) processChars::$23)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) -Converting *(pointer+n) to pointer[n] [230] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$24) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Converting *(pointer+n) to pointer[n] [232] *((byte*~) processChars::$8) ← *((byte*) processChars::$25) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -Converting *(pointer+n) to pointer[n] [232] *((byte*~) processChars::$8) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$7 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) -Converting *(pointer+n) to pointer[n] [234] *((byte*) processChars::$26) ← (const byte) STATUS_PROCESSING#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [243] (byte~) processChars::$12 ← (byte)*((word*) processChars::$27) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [247] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*) processChars::$28) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) -Converting *(pointer+n) to pointer[n] [250] *((word*) processChars::$30) ← -- *((word*) processChars::$29) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [250] *((word*) processChars::$30) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [254] if(*((word*) processChars::$31)!=(byte) 0) goto processChars::@2 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) -Converting *(pointer+n) to pointer[n] [257] *((byte*) processChars::$32) ← (const byte) STATUS_FREE#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) -Converting *(pointer+n) to pointer[n] [355] *((byte*~) getCharToProcess::$12) ← (byte) ' ' -- *(getCharToProcess::$11 + getCharToProcess::return_x#1) +Resolved ranged next value [164] startProcessing::i1#1 ← ++ startProcessing::i1#2 to ++ +Resolved ranged comparison value [166] if(startProcessing::i1#1!=rangelast(0,7)) goto startProcessing::@9 to (number) 8 +Resolved ranged next value [289] initSquareTables::x#1 ← ++ initSquareTables::x#2 to ++ +Resolved ranged comparison value [291] if(initSquareTables::x#1!=rangelast(0,$27)) goto initSquareTables::@1 to (number) $28 +Resolved ranged next value [312] initSquareTables::y#1 ← ++ initSquareTables::y#2 to ++ +Resolved ranged comparison value [314] if(initSquareTables::y#1!=rangelast(0,$18)) goto initSquareTables::@8 to (number) $19 +Resolved ranged next value [327] initSprites::i#1 ← ++ initSprites::i#2 to ++ +Resolved ranged comparison value [329] if(initSprites::i#1!=rangelast(0,7)) goto initSprites::@3 to (number) 8 +Resolved ranged next value [346] getCharToProcess::x#1 ← ++ getCharToProcess::x#2 to ++ +Resolved ranged comparison value [348] if(getCharToProcess::x#1!=rangelast(0,$27)) goto getCharToProcess::@4 to (number) $28 +Resolved ranged next value [363] getCharToProcess::y#1 ← ++ getCharToProcess::y#2 to ++ +Resolved ranged comparison value [365] if(getCharToProcess::y#1!=rangelast(0,$18)) goto getCharToProcess::@3 to (number) $19 +Resolved ranged next value [406] irqTop::i#1 ← ++ irqTop::i#2 to ++ +Resolved ranged comparison value [408] if(irqTop::i#1!=rangelast(0,4)) goto irqTop::@1 to (number) 5 +Resolved ranged next value [413] irqTop::i1#1 ← ++ irqTop::i1#2 to ++ +Resolved ranged comparison value [415] if(irqTop::i1#1!=rangelast(0,7)) goto irqTop::@3 to (number) 8 +Resolved ranged next value [426] irqBottom::i#1 ← ++ irqBottom::i#2 to ++ +Resolved ranged comparison value [428] if(irqBottom::i#1!=rangelast(0,4)) goto irqBottom::@1 to (number) 5 +Converting *(pointer+n) to pointer[n] [152] (byte) startProcessing::ch#0 ← *((byte*) startProcessing::screenPtr#0) -- *(startProcessing::$2 + startProcessing::center_x#8) +Converting *(pointer+n) to pointer[n] [202] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*) processChars::$22) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [207] if(*((byte*) processChars::$23)==(const byte) STATUS_FREE#0) goto processChars::@2 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [216] if(*((byte*) processChars::$24)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [219] (byte~) processChars::$9 ← > *((word*) processChars::$25) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [224] *(*((byte**) processChars::$26)) ← (byte) ' ' -- *((byte**)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR) +Converting *(pointer+n) to pointer[n] [228] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*) processChars::$27) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Converting *(pointer+n) to pointer[n] [230] *((byte*~) processChars::$8) ← *((byte*) processChars::$28) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_PTR) +Converting *(pointer+n) to pointer[n] [230] *((byte*~) processChars::$8) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR) -- *(processChars::$7 + *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_ID)) +Converting *(pointer+n) to pointer[n] [232] *((byte*) processChars::$29) ← (const byte) STATUS_PROCESSING#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [241] (byte~) processChars::$12 ← (byte)*((word*) processChars::$30) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [245] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*) processChars::$31) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [248] (bool~) processChars::$15 ← *((word*) processChars::$32) == (byte~) processChars::$14 -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [251] (bool~) processChars::$17 ← *((byte*) processChars::$33) == (byte~) processChars::$16 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [256] *((byte*) processChars::$34) ← (const byte) STATUS_FREE#0 -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) +Converting *(pointer+n) to pointer[n] [262] *((byte*) processChars::$36) ← -- *((byte*) processChars::$35) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [262] *((byte*) processChars::$36) ← -- *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- *((byte*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_Y) +Converting *(pointer+n) to pointer[n] [265] *((word*) processChars::$38) ← -- *((word*) processChars::$37) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [265] *((word*) processChars::$38) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -- *((word*)processChars::processing#0 + OFFSET_STRUCT_PROCESSINGSPRITE_X) +Converting *(pointer+n) to pointer[n] [379] *((byte*~) getCharToProcess::$12) ← (byte) ' ' -- *(getCharToProcess::$11 + getCharToProcess::return_x#1) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero (word*)PROCESSING#0 in [63] (word*) main::$19 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)PROCESSING#0 in [184] (word*) startProcessing::$23 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [220] (word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [221] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -Simplifying expression containing zero (word*)processChars::processing#0 in [242] (word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [243] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -Simplifying expression containing zero (word*)processChars::processing#0 in [248] (word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [249] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [250] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) -Simplifying expression containing zero (word*)processChars::processing#0 in [250] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -Simplifying expression containing zero (word*)processChars::processing#0 in [251] (word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X -Simplifying expression containing zero (word*)processChars::processing#0 in [254] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X)!=(byte) 0) goto processChars::@2 +Simplifying expression containing zero (word*)PROCESSING#0 in [68] (word*) main::$16 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)PROCESSING#0 in [182] (word*) startProcessing::$26 ← (word*)(struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [218] (word*) processChars::$25 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [219] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) +Simplifying expression containing zero (word*)processChars::processing#0 in [240] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [241] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) +Simplifying expression containing zero (word*)processChars::processing#0 in [247] (word*) processChars::$32 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [248] (bool~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) == (byte~) processChars::$14 +Simplifying expression containing zero (word*)processChars::processing#0 in [263] (word*) processChars::$37 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [264] (word*) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X +Simplifying expression containing zero (word*)processChars::processing#0 in [265] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) +Simplifying expression containing zero (word*)processChars::processing#0 in [265] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) Successful SSA optimization PassNSimplifyExpressionWithZero -Eliminating unused variable (word) startProcessing::center_dist#0 and assignment [59] (word) startProcessing::center_dist#0 ← (word) main::center_dist#0 -Eliminating unused variable (byte*) processChars::$19 and assignment [112] (byte*) processChars::$19 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Eliminating unused variable (byte*) processChars::$20 and assignment [114] (byte*) processChars::$20 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (byte*) processChars::$21 and assignment [118] (byte*) processChars::$21 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (word*) processChars::$22 and assignment [120] (word*) processChars::$22 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (byte**) processChars::$23 and assignment [123] (byte**) processChars::$23 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR -Eliminating unused variable (byte*) processChars::$24 and assignment [127] (byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID -Eliminating unused variable (byte*~) processChars::$8 and assignment [128] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -Eliminating unused variable (byte*) processChars::$25 and assignment [129] (byte*) processChars::$25 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR -Eliminating unused variable (byte*) processChars::$26 and assignment [131] (byte*) processChars::$26 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (word*) processChars::$27 and assignment [137] (word*) processChars::$27 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (byte*) processChars::$28 and assignment [141] (byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y -Eliminating unused variable (word*) processChars::$29 and assignment [143] (word*) processChars::$29 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$30 and assignment [144] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (word*) processChars::$31 and assignment [146] (word*) processChars::$31 ← (word*)(struct ProcessingSprite*) processChars::processing#0 -Eliminating unused variable (byte*) processChars::$32 and assignment [148] (byte*) processChars::$32 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS -Eliminating unused variable (byte*~) getCharToProcess::$12 and assignment [199] (byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1 +Eliminating unused variable (word) startProcessing::center_dist#0 and assignment [47] (word) startProcessing::center_dist#0 ← (word) main::center_dist#0 +Eliminating unused variable (byte*) processChars::$22 and assignment [109] (byte*) processChars::$22 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID +Eliminating unused variable (byte*) processChars::$23 and assignment [111] (byte*) processChars::$23 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (byte*) processChars::$24 and assignment [115] (byte*) processChars::$24 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (word*) processChars::$25 and assignment [117] (word*) processChars::$25 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (byte**) processChars::$26 and assignment [120] (byte**) processChars::$26 ← (byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR +Eliminating unused variable (byte*) processChars::$27 and assignment [124] (byte*) processChars::$27 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID +Eliminating unused variable (byte*~) processChars::$8 and assignment [125] (byte*~) processChars::$8 ← (byte*~) processChars::$7 + *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) +Eliminating unused variable (byte*) processChars::$28 and assignment [126] (byte*) processChars::$28 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR +Eliminating unused variable (byte*) processChars::$29 and assignment [128] (byte*) processChars::$29 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (word*) processChars::$30 and assignment [134] (word*) processChars::$30 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (byte*) processChars::$31 and assignment [138] (byte*) processChars::$31 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (word*) processChars::$32 and assignment [141] (word*) processChars::$32 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (byte*) processChars::$33 and assignment [144] (byte*) processChars::$33 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (byte*) processChars::$34 and assignment [147] (byte*) processChars::$34 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Eliminating unused variable (byte*) processChars::$35 and assignment [151] (byte*) processChars::$35 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (byte*) processChars::$36 and assignment [152] (byte*) processChars::$36 ← (byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y +Eliminating unused variable (word*) processChars::$37 and assignment [154] (word*) processChars::$37 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (word*) processChars::$38 and assignment [155] (word*) processChars::$38 ← (word*)(struct ProcessingSprite*) processChars::processing#0 +Eliminating unused variable (byte*~) getCharToProcess::$12 and assignment [218] (byte*~) getCharToProcess::$12 ← (byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1 Eliminating unused constant (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_X Successful SSA optimization PassNEliminateUnusedVars Removing unused block main::@return Removing unused block setupRasterIrq::@3 Successful SSA optimization Pass2EliminateUnusedBlocks -Adding number conversion cast (unumber) 8 in if((byte) main::i1#1!=(number) 8) goto main::@5 Adding number conversion cast (unumber) 8 in if((byte) startProcessing::i1#1!=(number) 8) goto startProcessing::@9 Adding number conversion cast (unumber) $28 in if((byte) initSquareTables::x#1!=(number) $28) goto initSquareTables::@1 Adding number conversion cast (unumber) $19 in if((byte) initSquareTables::y#1!=(number) $19) goto initSquareTables::@8 +Adding number conversion cast (unumber) 8 in if((byte) initSprites::i#1!=(number) 8) goto initSprites::@3 Adding number conversion cast (unumber) $28 in if((byte) getCharToProcess::x#1!=(number) $28) goto getCharToProcess::@4 Adding number conversion cast (unumber) $19 in if((byte) getCharToProcess::y#1!=(number) $19) goto getCharToProcess::@3 Adding number conversion cast (unumber) 5 in if((byte) irqTop::i#1!=(number) 5) goto irqTop::@1 @@ -2124,9 +2226,9 @@ Adding number conversion cast (unumber) 8 in if((byte) irqTop::i1#1!=(number) 8) Adding number conversion cast (unumber) 5 in if((byte) irqBottom::i#1!=(number) 5) goto irqBottom::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 8 -Simplifying constant integer cast 8 Simplifying constant integer cast $28 Simplifying constant integer cast $19 +Simplifying constant integer cast 8 Simplifying constant integer cast $28 Simplifying constant integer cast $19 Simplifying constant integer cast 5 @@ -2134,9 +2236,9 @@ Simplifying constant integer cast 8 Simplifying constant integer cast 5 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 8 -Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $19 +Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $19 Finalized unsigned number type (byte) 5 @@ -2145,66 +2247,73 @@ Finalized unsigned number type (byte) 5 Successful SSA optimization PassNFinalizeNumberTypeConversions Alias (byte~) processChars::$13 = (byte~) processChars::$11 Successful SSA optimization Pass2AliasElimination -Self Phi Eliminated (byte) startProcessing::center_x#8 Self Phi Eliminated (byte) startProcessing::center_y#8 +Self Phi Eliminated (byte) startProcessing::center_x#8 Self Phi Eliminated (byte) getCharToProcess::y#2 Successful SSA optimization Pass2SelfPhiElimination -Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0 Identical Phi Values (byte) startProcessing::center_y#8 (byte) startProcessing::center_y#0 +Identical Phi Values (byte) startProcessing::center_x#8 (byte) startProcessing::center_x#0 Identical Phi Values (byte) getCharToProcess::y#2 (byte) getCharToProcess::y#7 Successful SSA optimization Pass2IdenticalPhiElimination -Constant right-side identified [11] (byte~) main::$3 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [31] (byte~) main::$5 ← (const byte) NUM_PROCESSING#0 * (byte) $40 -Constant right-side identified [46] (byte*~) main::$9 ← (const byte*) SCREEN#0 + (word) $3e8 -Constant right-side identified [60] (byte*~) main::$17 ← (const byte*) SCREEN#0 + (word) $3e7 -Constant right-side identified [63] (byte~) startProcessing::$15 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [85] (byte*~) startProcessing::$8 ← (const byte*) SPRITE_DATA#0 / (byte) $40 -Constant right-side identified [106] (byte~) processChars::$0 ← (const byte) NUM_PROCESSING#0 - (byte) 1 -Constant right-side identified [119] (byte*~) processChars::$7 ← (const byte*) SCREEN#0 + (const word) SPRITE_PTRS#0 -Constant right-side identified [189] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 +Simple Condition (bool~) processChars::$15 [131] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(byte~) processChars::$14) goto processChars::@6 +Simple Condition (bool~) processChars::$17 [238] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)==(byte~) processChars::$16) goto processChars::@6 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant right-side identified [12] (byte~) main::$4 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [35] (byte*~) main::$6 ← (const byte*) SCREEN#0 + (word) $3e8 +Constant right-side identified [48] (byte*~) main::$14 ← (const byte*) SCREEN#0 + (word) $3e7 +Constant right-side identified [51] (byte~) startProcessing::$18 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [86] (byte*~) startProcessing::$15 ← (const byte*) SPRITE_DATA#0 / (byte) $40 +Constant right-side identified [103] (byte~) processChars::$0 ← (const byte) NUM_PROCESSING#0 - (byte) 1 +Constant right-side identified [116] (byte*~) processChars::$7 ← (const byte*) SCREEN#0 + (const word) SPRITE_PTRS#0 +Constant right-side identified [127] (byte~) processChars::$14 ← (const byte) BORDER_XPOS_LEFT#0 - (byte) 8 +Constant right-side identified [129] (byte~) processChars::$16 ← (const byte) BORDER_YPOS_TOP#0 - (byte) 8 +Constant right-side identified [170] (byte~) initSprites::$0 ← (const byte) NUM_PROCESSING#0 * (byte) $40 +Constant right-side identified [205] (byte~) setupRasterIrq::$1 ← < (const word) setupRasterIrq::raster#0 Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 = { fill( NUM_PROCESSING#0, 0) } -Constant (const byte) main::$3 = NUM_PROCESSING#0-1 -Constant (const byte) main::$5 = NUM_PROCESSING#0*$40 -Constant (const byte*) main::$9 = SCREEN#0+$3e8 -Constant (const byte*) main::$17 = SCREEN#0+$3e7 -Constant (const byte) startProcessing::$15 = NUM_PROCESSING#0-1 -Constant (const byte*) startProcessing::$8 = SPRITE_DATA#0/$40 +Constant (const byte) main::$4 = NUM_PROCESSING#0-1 +Constant (const byte*) main::$6 = SCREEN#0+$3e8 +Constant (const byte*) main::$14 = SCREEN#0+$3e7 +Constant (const byte) startProcessing::$18 = NUM_PROCESSING#0-1 +Constant (const byte*) startProcessing::$15 = SPRITE_DATA#0/$40 Constant (const byte) processChars::$0 = NUM_PROCESSING#0-1 Constant (const byte*) processChars::$7 = SCREEN#0+SPRITE_PTRS#0 +Constant (const byte) processChars::$14 = BORDER_XPOS_LEFT#0-8 +Constant (const byte) processChars::$16 = BORDER_YPOS_TOP#0-8 +Constant (const byte) initSprites::$0 = NUM_PROCESSING#0*$40 Constant (const byte) setupRasterIrq::$1 = > (byte) 1 - [153] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 - to:mul8u::@1 -setupRasterIrq: scope:[setupRasterIrq] from main::@4 +setupRasterIrq: scope:[setupRasterIrq] from main::@7 asm { sei } - [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 - [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 - [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 + [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 to:setupRasterIrq::@1 setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq - [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f + [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f to:setupRasterIrq::@2 setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1 - [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 - [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 - [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 + [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 asm { cli } to:setupRasterIrq::@return setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2 - [163] return + [123] return to:@return +initSprites: scope:[initSprites] from main::@2 + [124] 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 + 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 + 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 + to:initSprites::@return +initSprites::@return: scope:[initSprites] from initSprites::@3 + [136] return + to:@return +initSquareTables: scope:[initSquareTables] from main + [137] 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 + to:initSquareTables::@3 +initSquareTables::@3: scope:[initSquareTables] from initSquareTables::@1 + [140] (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 + 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 + 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 + to:initSquareTables::@7 +initSquareTables::@7: scope:[initSquareTables] from initSquareTables::@5 + [153] (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 + 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 + 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 +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 + to:mul8u::@4 +mul8u::@4: scope:[mul8u] from mul8u::@2 + [173] (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 + to:mul8u::@1 irqBottom: scope:[irqBottom] from - [164] phi() + [177] phi() to:irqBottom::@1 irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1 - [165] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 ) - [166] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 - [167] if((byte) irqBottom::i#1!=(byte) 5) goto 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 to:irqBottom::@2 irqBottom::@2: scope:[irqBottom] from irqBottom::@1 - [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 - [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 - [170] call processChars + [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 + [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [183] call processChars to:irqBottom::@3 irqBottom::@3: scope:[irqBottom] from irqBottom::@2 - [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 - [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 - [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 - [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() - [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [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 to:irqBottom::@return irqBottom::@return: scope:[irqBottom] from irqBottom::@3 - [176] return + [189] return to:@return processChars: scope:[processChars] from irqBottom::@2 - [177] phi() + [190] phi() to:processChars::@1 processChars::@1: scope:[processChars] from processChars processChars::@2 - [178] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 ) - [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 - [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 - [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) - [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 - to:processChars::@8 -processChars::@8: scope:[processChars] from processChars::@1 - [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 + [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::@8 - [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' - [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 - [186] *((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) - [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 +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 + 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::@8 processChars::@9 - [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) - [189] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 - to:processChars::@6 -processChars::@6: scope:[processChars] from processChars::@3 - [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 - to:processChars::@5 -processChars::@5: scope:[processChars] from processChars::@4 processChars::@6 - [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 - [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) - [194] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 - [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) - [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) - [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 +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::@5 - [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 - [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 - [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 +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 + 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 + 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) to:processChars::@2 -processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@7 - [201] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 - [202] 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::@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 to:processChars::@return processChars::@return: scope:[processChars] from processChars::@2 - [203] return + [215] 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::@4: scope:[processChars] from processChars::@3 - [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 + [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 to:processChars::@5 irqTop: scope:[irqTop] from - [205] phi() + [220] phi() to:irqTop::@1 irqTop::@1: scope:[irqTop] from irqTop irqTop::@1 - [206] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 ) - [207] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 - [208] if((byte) irqTop::i#1!=(byte) 5) goto 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 to:irqTop::@2 irqTop::@2: scope:[irqTop] from irqTop::@1 - [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 - [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 + [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 + [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 to:irqTop::@3 irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3 - [211] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 ) - [212] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 - [213] if((byte) irqTop::i1#1!=(byte) 8) goto 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 to:irqTop::@4 irqTop::@4: scope:[irqTop] from irqTop::@3 - [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 - [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 - [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 - [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() - [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 + [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 to:irqTop::@return irqTop::@return: scope:[irqTop] from irqTop::@4 - [219] return + [234] return to:@return @@ -2924,6 +3065,9 @@ VARIABLE REGISTER WEIGHTS (byte*) BGCOL (byte) BLUE (byte*) BORDERCOL +(byte) BORDER_XPOS_LEFT +(byte) BORDER_YPOS_TOP +(byte*) CHARGEN (byte*) CIA1_INTERRUPT (byte) CIA_INTERRUPT_CLEAR (void()**) HARDWARE_IRQ @@ -2937,6 +3081,7 @@ VARIABLE REGISTER WEIGHTS (byte*) PROCPORT (byte*) PROCPORT_DDR (byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_RAM_CHARROM (byte) PROCPORT_RAM_IO (word) ProcessingChar::dist (byte) ProcessingChar::x @@ -3014,6 +3159,13 @@ VARIABLE REGISTER WEIGHTS (byte) getCharToProcess::y (byte) getCharToProcess::y#1 101.0 (byte) getCharToProcess::y#7 137.75 +(void()) initSprites() +(byte) initSprites::i +(byte) initSprites::i#1 16.5 +(byte) initSprites::i#2 16.5 +(byte*) initSprites::sp +(byte*) initSprites::sp#1 16.5 +(byte*) initSprites::sp#2 16.5 (void()) initSquareTables() (byte~) initSquareTables::$10 22.0 (byte~) initSquareTables::$12 22.0 @@ -3045,8 +3197,8 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) irqTop::i1#1 16.5 (byte) irqTop::i1#2 22.0 (void()) main() -(struct ProcessingChar~) main::$11 -(byte~) main::$18 12.833333333333334 +(byte~) main::$15 12.833333333333334 +(struct ProcessingChar~) main::$8 (struct ProcessingChar) main::center (word) main::center_dist (word) main::center_dist#0 22.0 @@ -3060,12 +3212,6 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) main::i (byte) main::i#1 16.5 (byte) main::i#2 4.125 -(byte) main::i1 -(byte) main::i1#1 16.5 -(byte) main::i1#2 16.5 -(byte*) main::sp -(byte*) main::sp#1 16.5 -(byte*) main::sp#2 16.5 (byte*) main::src (byte*) main::src#1 11.0 (byte*) main::src#2 16.5 @@ -3095,40 +3241,48 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte~) processChars::$10 22.0 (byte~) processChars::$12 22.0 (byte~) processChars::$13 11.0 -(byte~) processChars::$16 22.0 -(byte~) processChars::$18 22.0 +(byte~) processChars::$19 22.0 +(byte~) processChars::$21 22.0 (byte~) processChars::$9 22.0 (byte) processChars::bitmask (byte) processChars::bitmask#0 2.8947368421052633 (byte) processChars::i (byte) processChars::i#1 16.5 -(byte) processChars::i#10 1.8333333333333333 +(byte) processChars::i#10 1.6923076923076923 (struct ProcessingSprite*) processChars::processing -(struct ProcessingSprite*) processChars::processing#0 0.5789473684210527 +(struct ProcessingSprite*) processChars::processing#0 0.55 (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (void()*) setupRasterIrq::irqRoutine (word) setupRasterIrq::raster (void()) startProcessing((byte) startProcessing::center_x , (byte) startProcessing::center_y , (word) startProcessing::center_dist) -(word~) startProcessing::$0 4.0 +(word~) startProcessing::$0 3.0 (word~) startProcessing::$1 4.0 -(word~) startProcessing::$11 3.0 -(word~) startProcessing::$12 4.0 -(byte*~) startProcessing::$13 4.0 -(byte~) startProcessing::$21 2002.0 -(byte~) startProcessing::$22 2.333333333333333 -(word~) startProcessing::$3 4.0 -(word) startProcessing::$30 4.0 -(word) startProcessing::$31 4.0 +(word~) startProcessing::$10 4.0 +(word~) startProcessing::$11 4.0 +(byte~) startProcessing::$13 4.0 +(byte*~) startProcessing::$2 1.2000000000000002 +(byte~) startProcessing::$24 2002.0 +(byte~) startProcessing::$25 2.333333333333333 +(word) startProcessing::$33 4.0 +(word) startProcessing::$34 4.0 (word~) startProcessing::$4 4.0 -(byte~) startProcessing::$6 4.0 +(word~) startProcessing::$5 4.0 +(word~) startProcessing::$7 4.0 +(word~) startProcessing::$8 4.0 (struct ProcessingChar) startProcessing::center (word) startProcessing::center_dist (byte) startProcessing::center_x -(byte) startProcessing::center_x#0 0.40625 +(byte) startProcessing::center_x#0 0.41666666666666674 (byte) startProcessing::center_y -(byte) startProcessing::center_y#0 0.5 +(byte) startProcessing::center_y#0 0.34210526315789475 +(byte) startProcessing::ch +(byte) startProcessing::ch#0 2.0 +(byte*) startProcessing::chargenData +(byte*) startProcessing::chargenData#0 1.3333333333333333 +(byte*) startProcessing::chargenData#1 67.33333333333333 +(byte*) startProcessing::chargenData#2 101.66666666666666 (byte) startProcessing::freeIdx -(byte) startProcessing::freeIdx#2 52.39999999999999 +(byte) startProcessing::freeIdx#2 38.52941176470589 (byte) startProcessing::freeIdx#6 33.666666666666664 (byte~) startProcessing::freeIdx#7 202.0 (byte~) startProcessing::freeIdx#8 202.0 @@ -3137,31 +3291,30 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) startProcessing::i#2 1334.6666666666667 (byte) startProcessing::i1 (byte) startProcessing::i1#1 151.5 -(byte) startProcessing::i1#2 67.33333333333333 +(byte) startProcessing::i1#2 50.5 (byte*) startProcessing::screenPtr -(byte*) startProcessing::screenPtr#0 0.5714285714285714 +(byte*) startProcessing::screenPtr#0 0.13333333333333333 (byte*) startProcessing::spriteData -(byte*) startProcessing::spriteData#0 4.0 -(byte*) startProcessing::spriteData#1 67.33333333333333 +(byte*) startProcessing::spriteData#0 0.5714285714285714 +(byte*) startProcessing::spriteData#1 50.5 (byte*) startProcessing::spriteData#2 152.5 (byte) startProcessing::spriteIdx (byte) startProcessing::spritePtr -(byte) startProcessing::spritePtr#0 0.36363636363636365 +(byte) startProcessing::spritePtr#0 0.8 (word) startProcessing::spriteX -(word) startProcessing::spriteX#0 0.36363636363636365 +(word) startProcessing::spriteX#0 0.8 (byte) startProcessing::spriteY -(byte) startProcessing::spriteY#0 0.4 +(byte) startProcessing::spriteY#0 1.0 Not consolidating phi with different size mul8u::mb#0 mul8u::b#1 Not consolidating phi with different size mul8u::mb#0 mul8u::b#0 Initial phi equivalence classes [ main::i#2 main::i#1 ] -[ main::sp#2 main::sp#1 ] -[ main::i1#2 main::i1#1 ] [ main::src#2 main::src#1 ] [ main::dst#2 main::dst#1 ] [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +[ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] [ startProcessing::i1#2 startProcessing::i1#1 ] [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] @@ -3171,6 +3324,8 @@ Initial phi equivalence classes [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] +[ initSprites::sp#2 initSprites::sp#1 ] +[ initSprites::i#2 initSprites::i#1 ] [ initSquareTables::x#2 initSquareTables::x#1 ] [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] [ initSquareTables::y#2 initSquareTables::y#1 ] @@ -3184,7 +3339,7 @@ Initial phi equivalence classes [ processChars::i#10 processChars::i#1 ] [ irqTop::i#2 irqTop::i#1 ] [ irqTop::i1#2 irqTop::i1#1 ] -Added variable main::$18 to zero page equivalence class [ main::$18 ] +Added variable main::$15 to zero page equivalence class [ main::$15 ] Added variable getCharToProcess::return_x#0 to zero page equivalence class [ getCharToProcess::return_x#0 ] Added variable getCharToProcess::return_y#0 to zero page equivalence class [ getCharToProcess::return_y#0 ] Added variable getCharToProcess::return_dist#0 to zero page equivalence class [ getCharToProcess::return_dist#0 ] @@ -3193,22 +3348,25 @@ Added variable main::center_y#0 to zero page equivalence class [ main::center_y# Added variable main::center_dist#0 to zero page equivalence class [ main::center_dist#0 ] Added variable startProcessing::center_x#0 to zero page equivalence class [ startProcessing::center_x#0 ] Added variable startProcessing::center_y#0 to zero page equivalence class [ startProcessing::center_y#0 ] -Added variable startProcessing::$21 to zero page equivalence class [ startProcessing::$21 ] +Added variable startProcessing::$24 to zero page equivalence class [ startProcessing::$24 ] Added variable startProcessing::$0 to zero page equivalence class [ startProcessing::$0 ] +Added variable startProcessing::$33 to zero page equivalence class [ startProcessing::$33 ] +Added variable startProcessing::$34 to zero page equivalence class [ startProcessing::$34 ] Added variable startProcessing::$1 to zero page equivalence class [ startProcessing::$1 ] -Added variable startProcessing::$3 to zero page equivalence class [ startProcessing::$3 ] +Added variable startProcessing::$2 to zero page equivalence class [ startProcessing::$2 ] +Added variable startProcessing::screenPtr#0 to zero page equivalence class [ startProcessing::screenPtr#0 ] Added variable startProcessing::$4 to zero page equivalence class [ startProcessing::$4 ] +Added variable startProcessing::$5 to zero page equivalence class [ startProcessing::$5 ] +Added variable startProcessing::ch#0 to zero page equivalence class [ startProcessing::ch#0 ] +Added variable startProcessing::$7 to zero page equivalence class [ startProcessing::$7 ] +Added variable startProcessing::$8 to zero page equivalence class [ startProcessing::$8 ] +Added variable startProcessing::$10 to zero page equivalence class [ startProcessing::$10 ] +Added variable startProcessing::$11 to zero page equivalence class [ startProcessing::$11 ] Added variable startProcessing::spriteX#0 to zero page equivalence class [ startProcessing::spriteX#0 ] -Added variable startProcessing::$6 to zero page equivalence class [ startProcessing::$6 ] +Added variable startProcessing::$13 to zero page equivalence class [ startProcessing::$13 ] Added variable startProcessing::spriteY#0 to zero page equivalence class [ startProcessing::spriteY#0 ] Added variable startProcessing::spritePtr#0 to zero page equivalence class [ startProcessing::spritePtr#0 ] -Added variable startProcessing::$11 to zero page equivalence class [ startProcessing::$11 ] -Added variable startProcessing::$30 to zero page equivalence class [ startProcessing::$30 ] -Added variable startProcessing::$31 to zero page equivalence class [ startProcessing::$31 ] -Added variable startProcessing::$12 to zero page equivalence class [ startProcessing::$12 ] -Added variable startProcessing::$13 to zero page equivalence class [ startProcessing::$13 ] -Added variable startProcessing::screenPtr#0 to zero page equivalence class [ startProcessing::screenPtr#0 ] -Added variable startProcessing::$22 to zero page equivalence class [ startProcessing::$22 ] +Added variable startProcessing::$25 to zero page equivalence class [ startProcessing::$25 ] Added variable getCharToProcess::$13 to zero page equivalence class [ getCharToProcess::$13 ] Added variable getCharToProcess::$14 to zero page equivalence class [ getCharToProcess::$14 ] Added variable getCharToProcess::$9 to zero page equivalence class [ getCharToProcess::$9 ] @@ -3223,22 +3381,21 @@ Added variable mul8u::return#3 to zero page equivalence class [ mul8u::return#3 Added variable initSquareTables::$14 to zero page equivalence class [ initSquareTables::$14 ] Added variable initSquareTables::$17 to zero page equivalence class [ initSquareTables::$17 ] Added variable mul8u::$1 to zero page equivalence class [ mul8u::$1 ] -Added variable processChars::$18 to zero page equivalence class [ processChars::$18 ] +Added variable processChars::$21 to zero page equivalence class [ processChars::$21 ] Added variable processChars::processing#0 to zero page equivalence class [ processChars::processing#0 ] Added variable processChars::bitmask#0 to zero page equivalence class [ processChars::bitmask#0 ] Added variable processChars::$9 to zero page equivalence class [ processChars::$9 ] Added variable processChars::$10 to zero page equivalence class [ processChars::$10 ] Added variable processChars::$13 to zero page equivalence class [ processChars::$13 ] Added variable processChars::$12 to zero page equivalence class [ processChars::$12 ] -Added variable processChars::$16 to zero page equivalence class [ processChars::$16 ] +Added variable processChars::$19 to zero page equivalence class [ processChars::$19 ] Complete equivalence classes [ main::i#2 main::i#1 ] -[ main::sp#2 main::sp#1 ] -[ main::i1#2 main::i1#1 ] [ main::src#2 main::src#1 ] [ main::dst#2 main::dst#1 ] [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +[ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] [ startProcessing::i1#2 startProcessing::i1#1 ] [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] @@ -3248,6 +3405,8 @@ Complete equivalence classes [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] +[ initSprites::sp#2 initSprites::sp#1 ] +[ initSprites::i#2 initSprites::i#1 ] [ initSquareTables::x#2 initSquareTables::x#1 ] [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] [ initSquareTables::y#2 initSquareTables::y#1 ] @@ -3261,7 +3420,7 @@ Complete equivalence classes [ processChars::i#10 processChars::i#1 ] [ irqTop::i#2 irqTop::i#1 ] [ irqTop::i1#2 irqTop::i1#1 ] -[ main::$18 ] +[ main::$15 ] [ getCharToProcess::return_x#0 ] [ getCharToProcess::return_y#0 ] [ getCharToProcess::return_dist#0 ] @@ -3270,22 +3429,25 @@ Complete equivalence classes [ main::center_dist#0 ] [ startProcessing::center_x#0 ] [ startProcessing::center_y#0 ] -[ startProcessing::$21 ] +[ startProcessing::$24 ] [ startProcessing::$0 ] +[ startProcessing::$33 ] +[ startProcessing::$34 ] [ startProcessing::$1 ] -[ startProcessing::$3 ] +[ startProcessing::$2 ] +[ startProcessing::screenPtr#0 ] [ startProcessing::$4 ] +[ startProcessing::$5 ] +[ startProcessing::ch#0 ] +[ startProcessing::$7 ] +[ startProcessing::$8 ] +[ startProcessing::$10 ] +[ startProcessing::$11 ] [ startProcessing::spriteX#0 ] -[ startProcessing::$6 ] +[ startProcessing::$13 ] [ startProcessing::spriteY#0 ] [ startProcessing::spritePtr#0 ] -[ startProcessing::$11 ] -[ startProcessing::$30 ] -[ startProcessing::$31 ] -[ startProcessing::$12 ] -[ startProcessing::$13 ] -[ startProcessing::screenPtr#0 ] -[ startProcessing::$22 ] +[ startProcessing::$25 ] [ getCharToProcess::$13 ] [ getCharToProcess::$14 ] [ getCharToProcess::$9 ] @@ -3300,90 +3462,94 @@ Complete equivalence classes [ initSquareTables::$14 ] [ initSquareTables::$17 ] [ mul8u::$1 ] -[ processChars::$18 ] +[ processChars::$21 ] [ processChars::processing#0 ] [ processChars::bitmask#0 ] [ processChars::$9 ] [ processChars::$10 ] [ processChars::$13 ] [ processChars::$12 ] -[ processChars::$16 ] +[ processChars::$19 ] Allocated zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Allocated zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] -Allocated zp ZP_BYTE:5 [ main::i1#2 main::i1#1 ] -Allocated zp ZP_WORD:6 [ main::src#2 main::src#1 ] -Allocated zp ZP_WORD:8 [ main::dst#2 main::dst#1 ] -Allocated zp ZP_BYTE:10 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] -Allocated zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Allocated zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] -Allocated zp ZP_BYTE:14 [ startProcessing::i1#2 startProcessing::i1#1 ] -Allocated zp ZP_WORD:15 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] -Allocated zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Allocated zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Allocated zp ZP_WORD:19 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] -Allocated zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Allocated zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Allocated zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] -Allocated zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] -Allocated zp ZP_BYTE:26 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] -Allocated zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] -Allocated zp ZP_BYTE:28 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] -Allocated zp ZP_BYTE:29 [ mul8u::b#1 ] -Allocated zp ZP_BYTE:30 [ mul8u::b#0 ] -Allocated zp ZP_BYTE:31 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] -Allocated zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] -Allocated zp ZP_WORD:34 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] -Allocated zp ZP_BYTE:36 [ irqBottom::i#2 irqBottom::i#1 ] -Allocated zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Allocated zp ZP_BYTE:38 [ irqTop::i#2 irqTop::i#1 ] -Allocated zp ZP_BYTE:39 [ irqTop::i1#2 irqTop::i1#1 ] -Allocated zp ZP_BYTE:40 [ main::$18 ] -Allocated zp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] -Allocated zp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] -Allocated zp ZP_WORD:43 [ getCharToProcess::return_dist#0 ] -Allocated zp ZP_BYTE:45 [ main::center_x#0 ] -Allocated zp ZP_BYTE:46 [ main::center_y#0 ] -Allocated zp ZP_WORD:47 [ main::center_dist#0 ] -Allocated zp ZP_BYTE:49 [ startProcessing::center_x#0 ] -Allocated zp ZP_BYTE:50 [ startProcessing::center_y#0 ] -Allocated zp ZP_BYTE:51 [ startProcessing::$21 ] -Allocated zp ZP_WORD:52 [ startProcessing::$0 ] -Allocated zp ZP_WORD:54 [ startProcessing::$1 ] -Allocated zp ZP_WORD:56 [ startProcessing::$3 ] -Allocated zp ZP_WORD:58 [ startProcessing::$4 ] -Allocated zp ZP_WORD:60 [ startProcessing::spriteX#0 ] -Allocated zp ZP_BYTE:62 [ startProcessing::$6 ] -Allocated zp ZP_BYTE:63 [ startProcessing::spriteY#0 ] -Allocated zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Allocated zp ZP_WORD:65 [ startProcessing::$11 ] -Allocated zp ZP_WORD:67 [ startProcessing::$30 ] -Allocated zp ZP_WORD:69 [ startProcessing::$31 ] -Allocated zp ZP_WORD:71 [ startProcessing::$12 ] -Allocated zp ZP_WORD:73 [ startProcessing::$13 ] -Allocated zp ZP_WORD:75 [ startProcessing::screenPtr#0 ] -Allocated zp ZP_BYTE:77 [ startProcessing::$22 ] -Allocated zp ZP_BYTE:78 [ getCharToProcess::$13 ] -Allocated zp ZP_BYTE:79 [ getCharToProcess::$14 ] -Allocated zp ZP_WORD:80 [ getCharToProcess::$9 ] -Allocated zp ZP_WORD:82 [ getCharToProcess::$15 ] -Allocated zp ZP_WORD:84 [ getCharToProcess::$16 ] -Allocated zp ZP_WORD:86 [ getCharToProcess::$10 ] -Allocated zp ZP_WORD:88 [ getCharToProcess::$11 ] -Allocated zp ZP_WORD:90 [ mul8u::return#2 ] -Allocated zp ZP_WORD:92 [ initSquareTables::$6 ] -Allocated zp ZP_BYTE:94 [ initSquareTables::$16 ] -Allocated zp ZP_WORD:95 [ mul8u::return#3 ] -Allocated zp ZP_WORD:97 [ initSquareTables::$14 ] -Allocated zp ZP_BYTE:99 [ initSquareTables::$17 ] -Allocated zp ZP_BYTE:100 [ mul8u::$1 ] -Allocated zp ZP_BYTE:101 [ processChars::$18 ] -Allocated zp ZP_WORD:102 [ processChars::processing#0 ] -Allocated zp ZP_BYTE:104 [ processChars::bitmask#0 ] -Allocated zp ZP_BYTE:105 [ processChars::$9 ] -Allocated zp ZP_BYTE:106 [ processChars::$10 ] -Allocated zp ZP_BYTE:107 [ processChars::$13 ] -Allocated zp ZP_BYTE:108 [ processChars::$12 ] -Allocated zp ZP_BYTE:109 [ processChars::$16 ] +Allocated zp ZP_WORD:3 [ main::src#2 main::src#1 ] +Allocated zp ZP_WORD:5 [ main::dst#2 main::dst#1 ] +Allocated zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] +Allocated zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Allocated zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] +Allocated zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] +Allocated zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] +Allocated zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] +Allocated zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Allocated zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Allocated zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] +Allocated zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Allocated zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Allocated zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] +Allocated zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] +Allocated zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] +Allocated zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] +Allocated zp ZP_BYTE:28 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] +Allocated zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] +Allocated zp ZP_BYTE:30 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] +Allocated zp ZP_BYTE:31 [ mul8u::b#1 ] +Allocated zp ZP_BYTE:32 [ mul8u::b#0 ] +Allocated zp ZP_BYTE:33 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] +Allocated zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] +Allocated zp ZP_WORD:36 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] +Allocated zp ZP_BYTE:38 [ irqBottom::i#2 irqBottom::i#1 ] +Allocated zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Allocated zp ZP_BYTE:40 [ irqTop::i#2 irqTop::i#1 ] +Allocated zp ZP_BYTE:41 [ irqTop::i1#2 irqTop::i1#1 ] +Allocated zp ZP_BYTE:42 [ main::$15 ] +Allocated zp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] +Allocated zp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] +Allocated zp ZP_WORD:45 [ getCharToProcess::return_dist#0 ] +Allocated zp ZP_BYTE:47 [ main::center_x#0 ] +Allocated zp ZP_BYTE:48 [ main::center_y#0 ] +Allocated zp ZP_WORD:49 [ main::center_dist#0 ] +Allocated zp ZP_BYTE:51 [ startProcessing::center_x#0 ] +Allocated zp ZP_BYTE:52 [ startProcessing::center_y#0 ] +Allocated zp ZP_BYTE:53 [ startProcessing::$24 ] +Allocated zp ZP_WORD:54 [ startProcessing::$0 ] +Allocated zp ZP_WORD:56 [ startProcessing::$33 ] +Allocated zp ZP_WORD:58 [ startProcessing::$34 ] +Allocated zp ZP_WORD:60 [ startProcessing::$1 ] +Allocated zp ZP_WORD:62 [ startProcessing::$2 ] +Allocated zp ZP_WORD:64 [ startProcessing::screenPtr#0 ] +Allocated zp ZP_WORD:66 [ startProcessing::$4 ] +Allocated zp ZP_WORD:68 [ startProcessing::$5 ] +Allocated zp ZP_BYTE:70 [ startProcessing::ch#0 ] +Allocated zp ZP_WORD:71 [ startProcessing::$7 ] +Allocated zp ZP_WORD:73 [ startProcessing::$8 ] +Allocated zp ZP_WORD:75 [ startProcessing::$10 ] +Allocated zp ZP_WORD:77 [ startProcessing::$11 ] +Allocated zp ZP_WORD:79 [ startProcessing::spriteX#0 ] +Allocated zp ZP_BYTE:81 [ startProcessing::$13 ] +Allocated zp ZP_BYTE:82 [ startProcessing::spriteY#0 ] +Allocated zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] +Allocated zp ZP_BYTE:84 [ startProcessing::$25 ] +Allocated zp ZP_BYTE:85 [ getCharToProcess::$13 ] +Allocated zp ZP_BYTE:86 [ getCharToProcess::$14 ] +Allocated zp ZP_WORD:87 [ getCharToProcess::$9 ] +Allocated zp ZP_WORD:89 [ getCharToProcess::$15 ] +Allocated zp ZP_WORD:91 [ getCharToProcess::$16 ] +Allocated zp ZP_WORD:93 [ getCharToProcess::$10 ] +Allocated zp ZP_WORD:95 [ getCharToProcess::$11 ] +Allocated zp ZP_WORD:97 [ mul8u::return#2 ] +Allocated zp ZP_WORD:99 [ initSquareTables::$6 ] +Allocated zp ZP_BYTE:101 [ initSquareTables::$16 ] +Allocated zp ZP_WORD:102 [ mul8u::return#3 ] +Allocated zp ZP_WORD:104 [ initSquareTables::$14 ] +Allocated zp ZP_BYTE:106 [ initSquareTables::$17 ] +Allocated zp ZP_BYTE:107 [ mul8u::$1 ] +Allocated zp ZP_BYTE:108 [ processChars::$21 ] +Allocated zp ZP_WORD:109 [ processChars::processing#0 ] +Allocated zp ZP_BYTE:111 [ processChars::bitmask#0 ] +Allocated zp ZP_BYTE:112 [ processChars::$9 ] +Allocated zp ZP_BYTE:113 [ processChars::$10 ] +Allocated zp ZP_BYTE:114 [ processChars::$13 ] +Allocated zp ZP_BYTE:115 [ processChars::$12 ] +Allocated zp ZP_BYTE:116 [ processChars::$19 ] INITIAL ASM //SEG0 File Comments @@ -3406,6 +3572,13 @@ INITIAL ASM .label PROCPORT = 1 // RAM in $A000, $E000 I/O in $D000 .const PROCPORT_RAM_IO = $35 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + // Positions of the border (in sprite positions) + .const BORDER_XPOS_LEFT = $18 + .const BORDER_YPOS_TOP = $32 // The offset of the sprite pointers from the screen start address .const SPRITE_PTRS = $3f8 .label SPRITES_XPOS = $d000 @@ -3467,377 +3640,403 @@ bend_from_b1: bend: //SEG10 main main: { - .label _18 = $28 + .label _15 = $2a .label i = 2 - .label sp = 3 - .label i1 = 5 - .label src = 6 - .label dst = 8 - .label center_x = $2d - .label center_y = $2e - .label center_dist = $2f - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + .label src = 3 + .label dst = 5 + .label center_x = $2f + .label center_y = $30 + .label center_dist = $31 + //SEG11 [5] call initSquareTables + //SEG12 [137] phi from main to initSquareTables [phi:main->initSquareTables] + initSquareTables_from_main: + jsr initSquareTables + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] b1_from_main: - //SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 + //SEG14 [6] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuz1=vbuc1 lda #0 sta i jmp b1 // Init processing array - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1] b1_from_b1: - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy jmp b1 - //SEG15 main::@1 + //SEG17 main::@1 b1: - //SEG16 [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG18 [7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda i asl asl asl - sta _18 - //SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 - lda _18 + sta _15 + //SEG19 [8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0 -- pwuc1_derefidx_vbuz1=vbuc2 + lda _15 ldx #0 tay txa sta PROCESSING,y - //SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG20 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 - ldy _18 + ldy _15 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y - //SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG21 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 - ldy _18 + ldy _15 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y - //SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG22 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #0 - ldy _18 + ldy _15 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y - //SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG23 [12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #STATUS_FREE - ldy _18 + ldy _15 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y - //SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 -- pptc1_derefidx_vbuz1=pbuc2 - ldy _18 + //SEG24 [13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0 -- pptc1_derefidx_vbuz1=pbuc2 + ldy _15 lda #<0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y lda #>0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y - //SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + //SEG25 [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG24 [14] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG26 [15] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b1_from_b1 - //SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG27 [16] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: - //SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1 - lda #SPRITE_DATA - sta sp+1 jmp b2 - // Clear sprites - //SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2] - b2_from_b2: - //SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy - jmp b2 - //SEG29 main::@2 + //SEG28 main::@2 b2: - //SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - ldy #0 - sta (sp),y - //SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1 - inc sp - bne !+ - inc sp+1 - !: - //SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 - lda sp+1 - cmp #>SPRITE_DATA+NUM_PROCESSING*$40 - bcc b2_from_b2 - bne !+ - lda sp - cmp #main::@3] - b3_from_b2: - //SEG34 [19] phi (byte) main::i1#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuz1=vbuc1 - lda #0 - sta i1 - jmp b3 - // Initialize sprites - //SEG35 [19] phi from main::@3 to main::@3 [phi:main::@3->main::@3] - b3_from_b3: - //SEG36 [19] phi (byte) main::i1#2 = (byte) main::i1#1 [phi:main::@3->main::@3#0] -- register_copy - jmp b3 - //SEG37 main::@3 - b3: - //SEG38 [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 -- pbuc1_derefidx_vbuz1=vbuc2 - lda #WHITE - ldy i1 - sta SPRITES_COLS,y - //SEG39 [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuz1=_inc_vbuz1 - inc i1 - //SEG40 [22] if((byte) main::i1#1!=(byte) 8) goto main::@3 -- vbuz1_neq_vbuc1_then_la1 - lda #8 - cmp i1 - bne b3_from_b3 - jmp b4 - //SEG41 main::@4 - b4: - //SEG42 [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_MC - //SEG43 [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_EXPAND_X - //SEG44 [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_EXPAND_Y - //SEG45 [26] call setupRasterIrq + //SEG29 [17] call initSprites + //SEG30 [124] phi from main::@2 to initSprites [phi:main::@2->initSprites] + initSprites_from_b2: + jsr initSprites + //SEG31 [18] phi from main::@2 to main::@7 [phi:main::@2->main::@7] + b7_from_b2: + jmp b7 + //SEG32 main::@7 + b7: + //SEG33 [19] call setupRasterIrq jsr setupRasterIrq - //SEG46 [27] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - b5_from_b4: - //SEG47 [27] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@4->main::@5#0] -- pbuz1=pbuc1 + //SEG34 [20] phi from main::@7 to main::@3 [phi:main::@7->main::@3] + b3_from_b7: + //SEG35 [20] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@7->main::@3#0] -- pbuz1=pbuc1 lda #SCREEN_COPY sta dst+1 - //SEG48 [27] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@4->main::@5#1] -- pbuz1=pbuc1 + //SEG36 [20] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@7->main::@3#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 - jmp b5 - // Fill screen with some chars - //for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(main::@5] - b5_from_b5: - //SEG50 [27] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@5->main::@5#0] -- register_copy - //SEG51 [27] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@5->main::@5#1] -- register_copy - jmp b5 - //SEG52 main::@5 - b5: - //SEG53 [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG37 [20] phi from main::@3 to main::@3 [phi:main::@3->main::@3] + b3_from_b3: + //SEG38 [20] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@3->main::@3#0] -- register_copy + //SEG39 [20] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@3->main::@3#1] -- register_copy + jmp b3 + //SEG40 main::@3 + b3: + //SEG41 [21] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y ldy #0 sta (dst),y - //SEG54 [29] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG42 [22] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG55 [30] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG43 [23] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG56 [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 -- pbuz1_neq_pbuc1_then_la1 + //SEG44 [24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 - bne b5_from_b5 + bne b3_from_b3 lda src cmp #main::@6] - b6_from_b5: - jmp b6 - //SEG58 main::@6 - b6: - //SEG59 [33] call initSquareTables - //SEG60 [114] phi from main::@6 to initSquareTables [phi:main::@6->initSquareTables] - initSquareTables_from_b6: - jsr initSquareTables - //SEG61 [34] phi from main::@6 main::@8 to main::@7 [phi:main::@6/main::@8->main::@7] - b7_from_b6: - b7_from_b8: - jmp b7 + bne b3_from_b3 + //SEG45 [25] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + b4_from_b3: + b4_from_b5: + jmp b4 // Main loop - //SEG62 main::@7 - b7: - //SEG63 [35] call getCharToProcess - //SEG64 [86] phi from main::@7 to getCharToProcess [phi:main::@7->getCharToProcess] - getCharToProcess_from_b7: + //SEG46 main::@4 + b4: + //SEG47 [26] call getCharToProcess + //SEG48 [86] phi from main::@4 to getCharToProcess [phi:main::@4->getCharToProcess] + getCharToProcess_from_b4: jsr getCharToProcess - //SEG65 [36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuz1=vbuz2 + //SEG49 [27] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuz1=vbuz2 lda getCharToProcess.return_x_1 sta getCharToProcess.return_x - //SEG66 [37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuz1=vbuz2 + //SEG50 [28] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuz1=vbuz2 lda getCharToProcess.return_y_1 sta getCharToProcess.return_y - //SEG67 [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG51 [29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda getCharToProcess.return_dist_1 sta getCharToProcess.return_dist lda getCharToProcess.return_dist_1+1 sta getCharToProcess.return_dist+1 - jmp b10 - //SEG68 main::@10 - b10: - //SEG69 [39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 -- vbuz1=vbuz2 + jmp b8 + //SEG52 main::@8 + b8: + //SEG53 [30] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 -- vbuz1=vbuz2 lda getCharToProcess.return_x sta center_x - //SEG70 [40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuz2 + //SEG54 [31] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 -- vbuz1=vbuz2 lda getCharToProcess.return_y sta center_y - //SEG71 [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 -- vwuz1=vwuz2 + //SEG55 [32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 -- vwuz1=vwuz2 lda getCharToProcess.return_dist sta center_dist lda getCharToProcess.return_dist+1 sta center_dist+1 - //SEG72 [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 -- vwuz1_neq_vwuc1_then_la1 + //SEG56 [33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5 -- vwuz1_neq_vwuc1_then_la1 lda center_dist+1 cmp #>NOT_FOUND - bne b8 + bne b5 lda center_dist cmp #startProcessing] - startProcessing_from_b8: + //SEG62 [37] call startProcessing + //SEG63 [38] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] + startProcessing_from_b5: jsr startProcessing - jmp b7_from_b8 + jmp b4_from_b5 } -//SEG80 startProcessing +//SEG64 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($31) center_x, byte zeropage($32) center_y) +// startProcessing(byte zeropage($33) center_x, byte zeropage($34) center_y) startProcessing: { - .label _0 = $34 - .label _1 = $36 - .label _3 = $38 - .label _4 = $3a - .label _6 = $3e - .label _11 = $41 - .label _12 = $47 - .label _13 = $49 - .label _21 = $33 - .label _22 = $4d - .label center_x = $31 - .label center_y = $32 - .label i = $b - .label spriteData = $c - .label i1 = $e - .label spriteX = $3c - .label spriteY = $3f - .label spritePtr = $40 - .label screenPtr = $4b - .label freeIdx = $b - .label freeIdx_6 = $a - .label _30 = $43 - .label _31 = $45 - .label freeIdx_7 = $a - //SEG81 [48] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + .label _0 = $36 + .label _1 = $3c + .label _2 = $3e + .label _4 = $42 + .label _5 = $44 + .label _7 = $47 + .label _8 = $49 + .label _10 = $4b + .label _11 = $4d + .label _13 = $51 + .label _24 = $35 + .label _25 = $54 + .label center_x = $33 + .label center_y = $34 + .label i = 8 + .label screenPtr = $40 + .label spriteData = $b + .label ch = $46 + .label chargenData = 9 + .label i1 = $d + .label spriteX = $4f + .label spriteY = $52 + .label spritePtr = $53 + .label freeIdx = 8 + .label freeIdx_6 = 7 + .label _33 = $38 + .label _34 = $3a + .label freeIdx_7 = 7 + //SEG65 [39] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] b1_from_startProcessing: - //SEG82 [48] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1 + //SEG66 [39] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuz1=vbuc1 lda #$ff sta freeIdx_6 jmp b1 - //SEG83 startProcessing::@1 + //SEG67 startProcessing::@1 b1: - //SEG84 [49] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG68 [40] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] b2_from_b1: - //SEG85 [49] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG69 [40] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 - //SEG86 [49] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG70 [40] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] b2_from_b3: - //SEG87 [49] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG71 [40] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy jmp b2 - //SEG88 startProcessing::@2 + //SEG72 startProcessing::@2 b2: - //SEG89 [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG73 [41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda i asl asl asl - sta _21 - //SEG90 [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 + sta _24 + //SEG74 [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 -- pbuc1_derefidx_vbuz1_neq_vbuc2_then_la1 lda #STATUS_FREE - ldy _21 + ldy _24 cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y bne b3 - //SEG91 [52] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG75 [43] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] b4_from_b2: b4_from_b9: - //SEG92 [52] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG76 [43] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy jmp b4 - //SEG93 startProcessing::@4 + //SEG77 startProcessing::@4 b4: - //SEG94 [53] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG78 [44] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx beq b8 jmp b5 - //SEG95 startProcessing::@5 + //SEG79 startProcessing::@5 b5: - //SEG96 [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 - lda freeIdx + //SEG80 [45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + lda center_y sta _0 lda #0 sta _0+1 - //SEG97 [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz2_rol_6 + //SEG81 [46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _0 asl - sta _1 + sta _33 lda _0+1 rol + sta _33+1 + asl _33 + rol _33+1 + //SEG82 [47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz3 + lda _33 + clc + adc _0 + sta _34 + lda _33+1 + adc _0+1 + sta _34+1 + //SEG83 [48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda _34 + asl + sta _1 + lda _34+1 + rol sta _1+1 asl _1 rol _1+1 asl _1 rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - //SEG98 [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz2 + //SEG84 [49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz2 lda _1 clc + adc #SCREEN + sta _2+1 + //SEG85 [50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz2_plus_vbuz3 + lda center_x + clc + adc _2 + sta screenPtr + lda #0 + adc _2+1 + sta screenPtr+1 + //SEG86 [51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + lda freeIdx + sta _4 + lda #0 + sta _4+1 + //SEG87 [52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6 -- vwuz1=vwuz2_rol_6 + lda _4 + asl + sta _5 + lda _4+1 + rol + sta _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + //SEG88 [53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5 -- pbuz1=pbuc1_plus_vwuz2 + lda _5 + clc adc #SPRITE_DATA sta spriteData+1 - //SEG99 [57] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG89 [54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0) -- vbuz1=pbuz2_derefidx_vbuz3 + ldy center_x + lda (_2),y + sta ch + //SEG90 [55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuz2 + lda ch + sta _7 + lda #0 + sta _7+1 + //SEG91 [56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda _7 + asl + sta _8 + lda _7+1 + rol + sta _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG92 [57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8 -- pbuz1=pbuc1_plus_vwuz2 + lda _8 + clc + adc #CHARGEN + sta chargenData+1 + //SEG93 asm { sei } + sei + //SEG94 [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG95 [60] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] b6_from_b5: - //SEG100 [57] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuz1=vbuc1 + //SEG96 [60] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuz1=vbuc1 lda #0 sta i1 - //SEG101 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG97 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG98 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy jmp b6 - //SEG102 [57] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG99 [60] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] b6_from_b6: - //SEG103 [57] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG104 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG100 [60] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG101 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG102 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy jmp b6 - //SEG105 startProcessing::@6 + //SEG103 startProcessing::@6 b6: - //SEG106 [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1 - lda #$ff + //SEG104 [61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (chargenData),y ldy #0 sta (spriteData),y - //SEG107 [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG105 [62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -3845,246 +4044,207 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG108 [60] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuz1=_inc_vbuz1 + //SEG106 [63] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + inc chargenData + bne !+ + inc chargenData+1 + !: + //SEG107 [64] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuz1=_inc_vbuz1 inc i1 - //SEG109 [61] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuz1_neq_vbuc1_then_la1 + //SEG108 [65] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp i1 bne b6_from_b6 jmp b7 - //SEG110 startProcessing::@7 + //SEG109 startProcessing::@7 b7: - //SEG111 [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG110 [66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG111 asm { cli } + cli + //SEG112 [68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x - sta _3 + sta _10 lda #0 - sta _3+1 - //SEG112 [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz2_rol_3 - lda _3 + sta _10+1 + //SEG113 [69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3 -- vwuz1=vwuz2_rol_3 + lda _10 asl - sta _4 - lda _3+1 + sta _11 + lda _10+1 rol - sta _4+1 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - //SEG113 [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz2 - lda #$18 + sta _11+1 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + //SEG114 [70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 -- vwuz1=vbuc1_plus_vwuz2 + lda #BORDER_XPOS_LEFT clc - adc _4 + adc _11 sta spriteX lda #0 - adc _4+1 + adc _11+1 sta spriteX+1 - //SEG114 [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG115 [71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda center_y asl asl asl - sta _6 - //SEG115 [66] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuz1=vbuc1_plus_vbuz2 - lax _6 - axs #-[$32] + sta _13 + //SEG116 [72] (byte) startProcessing::spriteY#0 ← (const byte) BORDER_YPOS_TOP#0 + (byte~) startProcessing::$13 -- vbuz1=vbuc1_plus_vbuz2 + lax _13 + axs #-[BORDER_YPOS_TOP] stx spriteY - //SEG116 [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG117 [73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 lax freeIdx axs #-[SPRITE_DATA/$40] stx spritePtr - //SEG117 [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 - lda center_y - sta _11 - lda #0 - sta _11+1 - //SEG118 [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2 - lda _11 - asl - sta _30 - lda _11+1 - rol - sta _30+1 - asl _30 - rol _30+1 - //SEG119 [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz3 - lda _30 - clc - adc _11 - sta _31 - lda _30+1 - adc _11+1 - sta _31+1 - //SEG120 [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz2_rol_3 - lda _31 - asl - sta _12 - lda _31+1 - rol - sta _12+1 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - //SEG121 [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz2 - lda _12 - clc - adc #SCREEN - sta _13+1 - //SEG122 [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz2_plus_vbuz3 - lda center_x - clc - adc _13 - sta screenPtr - lda #0 - adc _13+1 - sta screenPtr+1 - //SEG123 [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG118 [74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda freeIdx asl asl asl - sta _22 - //SEG124 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2 - ldy _22 + sta _25 + //SEG119 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuz1=vwuz2 + ldy _25 lda spriteX sta PROCESSING,y lda spriteX+1 sta PROCESSING+1,y - //SEG125 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG120 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda spriteY - ldy _22 + ldy _25 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,y - //SEG126 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG121 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuz1=vbuz2 lda freeIdx - ldy _22 + ldy _25 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,y - //SEG127 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG122 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuz1=vbuz2 lda spritePtr - ldy _22 + ldy _25 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,y - //SEG128 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuz1=vbuc2 + //SEG123 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuz1=vbuc2 lda #STATUS_NEW - ldy _22 + ldy _25 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y - //SEG129 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuz1=pbuz2 - ldy _22 + //SEG124 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuz1=pbuz2 + ldy _25 lda screenPtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,y lda screenPtr+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,y jmp breturn - //SEG130 startProcessing::@return + //SEG125 startProcessing::@return breturn: - //SEG131 [81] return + //SEG126 [81] return rts - //SEG132 startProcessing::@8 + //SEG127 startProcessing::@8 b8: - //SEG133 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2 + //SEG128 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuz1=vbuz2 lda freeIdx sta freeIdx_7 - //SEG134 [48] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG129 [39] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] b1_from_b8: - //SEG135 [48] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG130 [39] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG136 startProcessing::@3 + //SEG131 startProcessing::@3 b3: - //SEG137 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG132 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG138 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG133 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b3 jmp b9 - //SEG139 startProcessing::@9 + //SEG134 startProcessing::@9 b9: - //SEG140 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuz2 + //SEG135 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuz2 lda freeIdx_6 sta freeIdx jmp b4_from_b9 } -//SEG141 getCharToProcess +//SEG136 getCharToProcess // 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 = $50 - .label _10 = $56 - .label _11 = $58 - .label _13 = $4e - .label _14 = $4f - .label return_x = $29 - .label return_y = $2a - .label return_dist = $2b - .label x = $12 - .label dist = $17 - .label screen_line = $f - .label y = $11 - .label return_x_1 = $15 - .label return_y_1 = $16 - .label return_dist_1 = $17 - .label closest_dist = $13 - .label closest_x = $15 - .label closest_y = $16 - .label _15 = $52 - .label _16 = $54 - .label return_dist_5 = $17 - .label return_dist_6 = $17 - .label return_x_7 = $15 - .label return_y_7 = $16 - //SEG142 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + .label _9 = $57 + .label _10 = $5d + .label _11 = $5f + .label _13 = $55 + .label _14 = $56 + .label return_x = $2b + .label return_y = $2c + .label return_dist = $2d + .label x = $11 + .label dist = $16 + .label screen_line = $e + .label y = $10 + .label return_x_1 = $14 + .label return_y_1 = $15 + .label return_dist_1 = $16 + .label closest_dist = $12 + .label closest_x = $14 + .label closest_y = $15 + .label _15 = $59 + .label _16 = $5b + .label return_dist_5 = $16 + .label return_dist_6 = $16 + .label return_x_7 = $14 + .label return_y_7 = $15 + //SEG137 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] b1_from_getCharToProcess: - //SEG143 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + //SEG138 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG144 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG139 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 lda #0 sta closest_x - //SEG145 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 + //SEG140 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 lda #NOT_FOUND sta closest_dist+1 - //SEG146 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG141 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #0 sta y - //SEG147 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 + //SEG142 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 lda #SCREEN_COPY sta screen_line+1 jmp b1 - //SEG148 getCharToProcess::@1 + //SEG143 getCharToProcess::@1 b1: - //SEG149 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG144 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] b2_from_b1: - //SEG150 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG151 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG152 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG153 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 + //SEG145 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG146 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG147 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG148 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 lda #0 sta x jmp b2 - //SEG154 getCharToProcess::@2 + //SEG149 getCharToProcess::@2 b2: - //SEG155 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 + //SEG150 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 ldy x lda (screen_line),y cmp #' ' beq b11 jmp b4 - //SEG156 getCharToProcess::@4 + //SEG151 getCharToProcess::@4 b4: - //SEG157 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG152 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x asl sta _13 - //SEG158 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG153 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y asl sta _14 - //SEG159 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc2_derefidx_vbuz3 + //SEG154 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuz2_plus_pwuc2_derefidx_vbuz3 ldx _13 ldy _14 lda SQUARES_X,x @@ -4094,7 +4254,7 @@ getCharToProcess: { lda SQUARES_X+1,x adc SQUARES_Y+1,y sta dist+1 - //SEG160 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 + //SEG155 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 lda closest_dist+1 cmp dist+1 bne !+ @@ -4104,34 +4264,34 @@ getCharToProcess: { !: bcc b12 jmp b5 - //SEG161 getCharToProcess::@5 + //SEG156 getCharToProcess::@5 b5: - //SEG162 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 + //SEG157 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 lda x sta return_x_7 - //SEG163 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG158 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y_7 - //SEG164 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG159 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] b3_from_b11: b3_from_b12: b3_from_b5: - //SEG165 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG166 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG167 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG160 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG161 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG162 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy jmp b3 - //SEG168 getCharToProcess::@3 + //SEG163 getCharToProcess::@3 b3: - //SEG169 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 + //SEG164 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG170 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 + //SEG165 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b10 jmp b6 - //SEG171 getCharToProcess::@6 + //SEG166 getCharToProcess::@6 b6: - //SEG172 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG167 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_line @@ -4139,16 +4299,16 @@ getCharToProcess: { bcc !+ inc screen_line+1 !: - //SEG173 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG168 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG174 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG169 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 jmp b7 - //SEG175 getCharToProcess::@7 + //SEG170 getCharToProcess::@7 b7: - //SEG176 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 + //SEG171 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 lda return_dist_1 cmp #SCREEN_COPY sta _11+1 - //SEG183 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG178 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x_1 sta (_11),y jmp breturn - //SEG184 getCharToProcess::@return + //SEG179 getCharToProcess::@return breturn: - //SEG185 [109] return + //SEG180 [109] return rts - //SEG186 getCharToProcess::@9 + //SEG181 getCharToProcess::@9 b9: - //SEG187 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG182 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist_1 sta closest_dist lda return_dist_1+1 sta closest_dist+1 - //SEG188 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG183 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] b1_from_b9: - //SEG189 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG190 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG191 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG192 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG193 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG184 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG185 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG186 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG187 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG188 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy jmp b1 - //SEG194 getCharToProcess::@10 + //SEG189 getCharToProcess::@10 b10: - //SEG195 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG190 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist_1 sta closest_dist lda return_dist_1+1 sta closest_dist+1 - //SEG196 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG191 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] b2_from_b10: - //SEG197 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG198 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG199 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG200 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG192 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG193 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG194 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG195 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG201 getCharToProcess::@12 + //SEG196 getCharToProcess::@12 b12: - //SEG202 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG197 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist_6 lda closest_dist+1 sta return_dist_6+1 jmp b3_from_b12 - //SEG203 getCharToProcess::@11 + //SEG198 getCharToProcess::@11 b11: - //SEG204 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG199 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist_5 lda closest_dist+1 sta return_dist_5+1 jmp b3_from_b11 } -//SEG205 initSquareTables +//SEG200 setupRasterIrq +// Setup Raster IRQ +setupRasterIrq: { + .label irqRoutine = irqTop + //SEG201 asm { sei } + sei + //SEG202 [115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG203 [116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG204 [117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + jmp b1 + //SEG205 setupRasterIrq::@1 + b1: + //SEG206 [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #$7f + and VIC_CONTROL + sta VIC_CONTROL + jmp b2 + //SEG207 setupRasterIrq::@2 + b2: + //SEG208 [119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + lda #RASTER_IRQ_TOP + sta RASTER + //SEG209 [120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG210 [121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irqRoutine + sta HARDWARE_IRQ+1 + //SEG211 asm { cli } + cli + jmp breturn + //SEG212 setupRasterIrq::@return + breturn: + //SEG213 [123] return + rts +} +//SEG214 initSprites +// Initialize sprites +initSprites: { + .label sp = $18 + .label i = $1a + //SEG215 [125] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + b1_from_initSprites: + //SEG216 [125] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + lda #SPRITE_DATA + sta sp+1 + jmp b1 + // Clear sprite data + //SEG217 [125] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + b1_from_b1: + //SEG218 [125] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + jmp b1 + //SEG219 initSprites::@1 + b1: + //SEG220 [126] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (sp),y + //SEG221 [127] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + inc sp + bne !+ + inc sp+1 + !: + //SEG222 [128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + lda sp+1 + cmp #>SPRITE_DATA+NUM_PROCESSING*$40 + bcc b1_from_b1 + bne !+ + lda sp + cmp #initSprites::@2] + b2_from_b1: + //SEG224 [129] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuz1=vbuc1 + lda #0 + sta i + jmp b2 + // Initialize sprite registers + //SEG225 [129] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + b2_from_b2: + //SEG226 [129] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + jmp b2 + //SEG227 initSprites::@2 + b2: + //SEG228 [130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuz1=vbuc2 + lda #LIGHT_BLUE + ldy i + sta SPRITES_COLS,y + //SEG229 [131] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuz1=_inc_vbuz1 + inc i + //SEG230 [132] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuz1_neq_vbuc1_then_la1 + lda #8 + cmp i + bne b2_from_b2 + jmp b3 + //SEG231 initSprites::@3 + b3: + //SEG232 [133] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_MC + //SEG233 [134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_EXPAND_X + //SEG234 [135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_EXPAND_Y + jmp breturn + //SEG235 initSprites::@return + breturn: + //SEG236 [136] return + rts +} +//SEG237 initSquareTables // initialize SQUARES table initSquareTables: { - .label _2 = $1a - .label _4 = $1a - .label _6 = $5c - .label _10 = $1c - .label _12 = $1c - .label _14 = $61 - .label _16 = $5e - .label _17 = $63 - .label x_dist = $1a - .label x = $19 - .label y_dist = $1c - .label y = $1b - //SEG206 [115] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] + .label _2 = $1c + .label _4 = $1c + .label _6 = $63 + .label _10 = $1e + .label _12 = $1e + .label _14 = $68 + .label _16 = $65 + .label _17 = $6a + .label x_dist = $1c + .label x = $1b + .label y_dist = $1e + .label y = $1d + //SEG238 [138] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] b1_from_initSquareTables: - //SEG207 [115] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 + //SEG239 [138] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 lda #0 sta x jmp b1 - //SEG208 [115] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] + //SEG240 [138] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] b1_from_b9: - //SEG209 [115] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy + //SEG241 [138] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy jmp b1 - //SEG210 initSquareTables::@1 + //SEG242 initSquareTables::@1 b1: - //SEG211 [116] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 + //SEG243 [139] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$14 bcc b2 jmp b3 - //SEG212 initSquareTables::@3 + //SEG244 initSquareTables::@3 b3: - //SEG213 [117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuz1=vbuz2_minus_vbuc1 + //SEG245 [140] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuz1=vbuz2_minus_vbuc1 lax x axs #$14 stx _2 - //SEG214 [118] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] + //SEG246 [141] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] b4_from_b2: b4_from_b3: - //SEG215 [118] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy + //SEG247 [141] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy jmp b4 - //SEG216 initSquareTables::@4 + //SEG248 initSquareTables::@4 b4: - //SEG217 [119] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2 + //SEG249 [142] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2 lda x_dist sta mul8u.a - //SEG218 [120] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2 + //SEG250 [143] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 -- vbuz1=vbuz2 lda x_dist sta mul8u.b - //SEG219 [121] call mul8u - //SEG220 [144] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] + //SEG251 [144] call mul8u + //SEG252 [167] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] mul8u_from_b4: - //SEG221 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy - //SEG222 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuz2 + //SEG253 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy + //SEG254 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuz2 lda mul8u.b sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG223 [122] (word) mul8u::return#2 ← (word) mul8u::res#2 -- vwuz1=vwuz2 + //SEG255 [145] (word) mul8u::return#2 ← (word) mul8u::res#2 -- vwuz1=vwuz2 lda mul8u.res sta mul8u.return lda mul8u.res+1 sta mul8u.return+1 jmp b9 - //SEG224 initSquareTables::@9 + //SEG256 initSquareTables::@9 b9: - //SEG225 [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 -- vwuz1=vwuz2 + //SEG257 [146] (word~) initSquareTables::$6 ← (word) mul8u::return#2 -- vwuz1=vwuz2 lda mul8u.return sta _6 lda mul8u.return+1 sta _6+1 - //SEG226 [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG258 [147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda x asl sta _16 - //SEG227 [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuz1=vwuz2 + //SEG259 [148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuz1=vwuz2 ldy _16 lda _6 sta SQUARES_X,y lda _6+1 sta SQUARES_X+1,y - //SEG228 [126] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 + //SEG260 [149] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG229 [127] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [150] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b1_from_b9 - //SEG230 [128] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] + //SEG262 [151] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] b5_from_b9: - //SEG231 [128] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 + //SEG263 [151] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 lda #0 sta y jmp b5 - //SEG232 [128] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] + //SEG264 [151] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] b5_from_b10: - //SEG233 [128] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy + //SEG265 [151] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy jmp b5 - //SEG234 initSquareTables::@5 + //SEG266 initSquareTables::@5 b5: - //SEG235 [129] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 + //SEG267 [152] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 lda y cmp #$c bcc b6 jmp b7 - //SEG236 initSquareTables::@7 + //SEG268 initSquareTables::@7 b7: - //SEG237 [130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuz1=vbuz2_minus_vbuc1 + //SEG269 [153] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuz1=vbuz2_minus_vbuc1 lax y axs #$c stx _10 - //SEG238 [131] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] + //SEG270 [154] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] b8_from_b6: b8_from_b7: - //SEG239 [131] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy + //SEG271 [154] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy jmp b8 - //SEG240 initSquareTables::@8 + //SEG272 initSquareTables::@8 b8: - //SEG241 [132] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2 + //SEG273 [155] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2 lda y_dist sta mul8u.a - //SEG242 [133] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2 + //SEG274 [156] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 -- vbuz1=vbuz2 lda y_dist sta mul8u.b_1 - //SEG243 [134] call mul8u - //SEG244 [144] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] + //SEG275 [157] call mul8u + //SEG276 [167] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] mul8u_from_b8: - //SEG245 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy - //SEG246 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuz2 + //SEG277 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy + //SEG278 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuz2 lda mul8u.b_1 sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG247 [135] (word) mul8u::return#3 ← (word) mul8u::res#2 -- vwuz1=vwuz2 + //SEG279 [158] (word) mul8u::return#3 ← (word) mul8u::res#2 -- vwuz1=vwuz2 lda mul8u.res sta mul8u.return_3 lda mul8u.res+1 sta mul8u.return_3+1 jmp b10 - //SEG248 initSquareTables::@10 + //SEG280 initSquareTables::@10 b10: - //SEG249 [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 -- vwuz1=vwuz2 + //SEG281 [159] (word~) initSquareTables::$14 ← (word) mul8u::return#3 -- vwuz1=vwuz2 lda mul8u.return_3 sta _14 lda mul8u.return_3+1 sta _14+1 - //SEG250 [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG282 [160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda y asl sta _17 - //SEG251 [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuz1=vwuz2 + //SEG283 [161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuz1=vwuz2 ldy _17 lda _14 sta SQUARES_Y,y lda _14+1 sta SQUARES_Y+1,y - //SEG252 [139] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 + //SEG284 [162] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 inc y - //SEG253 [140] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 + //SEG285 [163] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b5_from_b10 jmp breturn - //SEG254 initSquareTables::@return + //SEG286 initSquareTables::@return breturn: - //SEG255 [141] return + //SEG287 [164] return rts - //SEG256 initSquareTables::@6 + //SEG288 initSquareTables::@6 b6: - //SEG257 [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuz1=vbuc1_minus_vbuz2 + //SEG289 [165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuz1=vbuc1_minus_vbuz2 lda #$c sec sbc y sta _12 jmp b8_from_b6 - //SEG258 initSquareTables::@2 + //SEG290 initSquareTables::@2 b2: - //SEG259 [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuz1=vbuc1_minus_vbuz2 + //SEG291 [166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuz1=vbuc1_minus_vbuz2 lda #$14 sec sbc x sta _4 jmp b4_from_b2 } -//SEG260 mul8u +//SEG292 mul8u // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word -// mul8u(byte zeropage($1f) a, byte zeropage($1e) b) +// mul8u(byte zeropage($21) a, byte zeropage($20) b) mul8u: { - .label _1 = $64 - .label mb = $22 - .label a = $1f - .label res = $20 - .label b = $1e - .label return = $5a - .label b_1 = $1d - .label return_3 = $5f - //SEG261 [145] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] + .label _1 = $6b + .label mb = $24 + .label a = $21 + .label res = $22 + .label b = $20 + .label return = $61 + .label b_1 = $1f + .label return_3 = $66 + //SEG293 [168] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] b1_from_mul8u: - //SEG262 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy - //SEG263 [145] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 + //SEG294 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy + //SEG295 [168] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 lda #0 sta res lda #0 sta res+1 - //SEG264 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy + //SEG296 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy jmp b1 - //SEG265 mul8u::@1 + //SEG297 mul8u::@1 b1: - //SEG266 [146] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuz1_neq_0_then_la1 + //SEG298 [169] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuz1_neq_0_then_la1 lda a cmp #0 bne b2 jmp breturn - //SEG267 mul8u::@return + //SEG299 mul8u::@return breturn: - //SEG268 [147] return + //SEG300 [170] return rts - //SEG269 mul8u::@2 + //SEG301 mul8u::@2 b2: - //SEG270 [148] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 + //SEG302 [171] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuz1=vbuz2_band_vbuc1 lda #1 and a sta _1 - //SEG271 [149] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuz1_eq_0_then_la1 + //SEG303 [172] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuz1_eq_0_then_la1 lda _1 cmp #0 beq b3_from_b2 jmp b4 - //SEG272 mul8u::@4 + //SEG304 mul8u::@4 b4: - //SEG273 [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 + //SEG305 [173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 lda res clc adc mb @@ -4497,138 +4784,90 @@ mul8u: { lda res+1 adc mb+1 sta res+1 - //SEG274 [151] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] + //SEG306 [174] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] b3_from_b2: b3_from_b4: - //SEG275 [151] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy + //SEG307 [174] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy jmp b3 - //SEG276 mul8u::@3 + //SEG308 mul8u::@3 b3: - //SEG277 [152] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 + //SEG309 [175] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuz1=vbuz1_ror_1 lsr a - //SEG278 [153] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG310 [176] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl mb rol mb+1 - //SEG279 [145] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] + //SEG311 [168] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] b1_from_b3: - //SEG280 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy - //SEG281 [145] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy - //SEG282 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy + //SEG312 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy + //SEG313 [168] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy + //SEG314 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy jmp b1 } -//SEG283 setupRasterIrq -// Setup Raster IRQ -setupRasterIrq: { - .label irqRoutine = irqTop - //SEG284 asm { sei } - sei - //SEG285 [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 - // Disable kernal & basic - lda #PROCPORT_DDR_MEMORY_MASK - sta PROCPORT_DDR - //SEG286 [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 - lda #PROCPORT_RAM_IO - sta PROCPORT - //SEG287 [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 - // Disable CIA 1 Timer IRQ - lda #CIA_INTERRUPT_CLEAR - sta CIA1_INTERRUPT - jmp b1 - //SEG288 setupRasterIrq::@1 - b1: - //SEG289 [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 - lda #$7f - and VIC_CONTROL - sta VIC_CONTROL - jmp b2 - //SEG290 setupRasterIrq::@2 - b2: - //SEG291 [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 - lda #RASTER_IRQ_TOP - sta RASTER - //SEG292 [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 - // Enable Raster Interrupt - lda #IRQ_RASTER - sta IRQ_ENABLE - //SEG293 [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 - // Set the IRQ routine - lda #irqRoutine - sta HARDWARE_IRQ+1 - //SEG294 asm { cli } - cli - jmp breturn - //SEG295 setupRasterIrq::@return - breturn: - //SEG296 [163] return - rts -} -//SEG297 irqBottom +//SEG315 irqBottom // Raster Interrupt at the middle of the screen irqBottom: { - .label i = $24 - //SEG298 entry interrupt(HARDWARE_ALL) + .label i = $26 + //SEG316 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG299 [165] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG317 [178] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] b1_from_irqBottom: - //SEG300 [165] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuz1=vbuc1 + //SEG318 [178] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG301 [165] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] + //SEG319 [178] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] b1_from_b1: - //SEG302 [165] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy + //SEG320 [178] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy jmp b1 - //SEG303 irqBottom::@1 + //SEG321 irqBottom::@1 b1: - //SEG304 [166] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuz1=_inc_vbuz1 + //SEG322 [179] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG305 [167] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG323 [180] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp i bne b1_from_b1 jmp b2 - //SEG306 irqBottom::@2 + //SEG324 irqBottom::@2 b2: - //SEG307 [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG325 [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG308 [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG326 [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG309 [170] call processChars - //SEG310 [177] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] + //SEG327 [183] call processChars + //SEG328 [190] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] processChars_from_b2: jsr processChars jmp b3 - //SEG311 irqBottom::@3 + //SEG329 irqBottom::@3 b3: - //SEG312 [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG330 [184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG313 [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG331 [185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG314 [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG332 [186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the top of the screen lda #RASTER_IRQ_TOP sta RASTER - //SEG315 [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG333 [187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG316 [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG334 [188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG317 irqBottom::@return + //SEG335 irqBottom::@return breturn: - //SEG318 [176] return - exit interrupt(HARDWARE_ALL) + //SEG336 [189] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -4637,45 +4876,45 @@ irqBottom: { ldy #00 rti } -//SEG319 processChars +//SEG337 processChars // Process any chars in the PROCESSING array processChars: { - .label _9 = $69 - .label _10 = $6a - .label _12 = $6c - .label _13 = $6b - .label _16 = $6d - .label _18 = $65 - .label processing = $66 - .label bitmask = $68 - .label i = $25 - //SEG320 [178] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + .label _9 = $70 + .label _10 = $71 + .label _12 = $73 + .label _13 = $72 + .label _19 = $74 + .label _21 = $6c + .label processing = $6d + .label bitmask = $6f + .label i = $27 + //SEG338 [191] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] b1_from_processChars: - //SEG321 [178] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + //SEG339 [191] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG322 [178] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG340 [191] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] b1_from_b2: - //SEG323 [178] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG341 [191] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy jmp b1 - //SEG324 processChars::@1 + //SEG342 processChars::@1 b1: - //SEG325 [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 + //SEG343 [192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3 -- vbuz1=vbuz2_rol_3 lda i asl asl asl - sta _18 - //SEG326 [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuz2 - lda _18 + sta _21 + //SEG344 [193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 -- pssz1=pssc1_plus_vbuz2 + lda _21 clc adc #PROCESSING adc #0 sta processing+1 - //SEG327 [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG345 [194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID lda (processing),y tax @@ -4688,23 +4927,23 @@ processChars: { bne !- !e: sta bitmask - //SEG328 [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG346 [195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE beq b2 - jmp b8 - //SEG329 processChars::@8 - b8: - //SEG330 [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + jmp b9 + //SEG347 processChars::@9 + b9: + //SEG348 [196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_NEW bne b3 - jmp b9 - //SEG331 processChars::@9 - b9: - //SEG332 [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + jmp b10 + //SEG349 processChars::@10 + b10: + //SEG350 [197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 // Clear the char on the screen ldx #' ' ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR @@ -4716,12 +4955,12 @@ processChars: { txa !: sta $ffff - //SEG333 [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG351 [198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 // Enable the sprite lda SPRITES_ENABLE ora bitmask sta SPRITES_ENABLE - //SEG334 [186] *((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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG352 [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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR lda (processing),y @@ -4731,55 +4970,86 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG335 [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG353 [200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y jmp b3 - //SEG336 processChars::@3 + //SEG354 processChars::@3 b3: - //SEG337 [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_hi__deref_pwuz2 + //SEG355 [201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_hi__deref_pwuz2 ldy #1 lda (processing),y sta _9 - //SEG338 [189] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuz1_then_la1 + //SEG356 [202] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuz1_then_la1 // Set sprite position lda #0 cmp _9 bne b4 - jmp b6 - //SEG339 processChars::@6 - b6: - //SEG340 [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 + jmp b7 + //SEG357 processChars::@7 + b7: + //SEG358 [203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 lda #$ff eor bitmask sta _10 - //SEG341 [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 lda SPRITES_XMSB and _10 sta SPRITES_XMSB jmp b5 - //SEG342 processChars::@5 + //SEG360 processChars::@5 b5: - //SEG343 [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 + //SEG361 [205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda i asl sta _13 - //SEG344 [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_byte__deref_pwuz2 + //SEG362 [206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuz1=_byte__deref_pwuz2 ldy #0 lda (processing),y sta _12 - //SEG345 [194] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuz1=vbuz2 + //SEG363 [207] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuz1=vbuz2 lda _12 ldy _13 sta SPRITES_XPOS,y - //SEG346 [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuc2 + //SEG364 [208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuz1=pbuz2_derefidx_vbuc2 ldx _13 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta SPRITES_YPOS,x - //SEG347 [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 + //SEG365 [209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6 -- _deref_pwuz1_eq_vwuc1_then_la1 + // Move sprite + ldy #0 + lda (processing),y + cmp #BORDER_XPOS_LEFT-8 + beq b6 + !: + jmp b11 + //SEG366 processChars::@11 + b11: + //SEG367 [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 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + cmp #BORDER_YPOS_TOP-8 + beq b6 + jmp b8 + //SEG368 processChars::@8 + b8: + //SEG369 [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) -- pbuz1_derefidx_vbuc1=_dec_pbuz1_derefidx_vbuc1 + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + sty $ff + sec + sbc #1 + ldy $ff + sta (processing),y + //SEG370 [212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 ldy #0 lda (processing),y sec @@ -4789,132 +5059,125 @@ processChars: { lda (processing),y sbc #0 sta (processing),y - //SEG348 [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1 - ldy #0 - lda (processing),y - bne b2 - iny - lda (processing),y - bne b2 - jmp b7 - //SEG349 processChars::@7 - b7: - //SEG350 [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 - // Set status - lda #STATUS_FREE - ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - sta (processing),y - //SEG351 [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 - lda #$ff - eor bitmask - sta _16 - //SEG352 [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 - // Disable the sprite - lda SPRITES_ENABLE - and _16 - sta SPRITES_ENABLE jmp b2 - //SEG353 processChars::@2 + //SEG371 processChars::@2 b2: - //SEG354 [201] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG372 [213] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG355 [202] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG373 [214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b1_from_b2 jmp breturn - //SEG356 processChars::@return + //SEG374 processChars::@return breturn: - //SEG357 [203] return + //SEG375 [215] return rts - //SEG358 processChars::@4 + //SEG376 processChars::@6 + b6: + //SEG377 [216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 + // Set status to FREE + lda #STATUS_FREE + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + sta (processing),y + //SEG378 [217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuz1=vbuc1_bxor_vbuz2 + lda #$ff + eor bitmask + sta _19 + //SEG379 [218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19 -- _deref_pbuc1=_deref_pbuc1_band_vbuz1 + // Disable the sprite + lda SPRITES_ENABLE + and _19 + sta SPRITES_ENABLE + jmp b2 + //SEG380 processChars::@4 b4: - //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG381 [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora bitmask sta SPRITES_XMSB jmp b5 } -//SEG360 irqTop +//SEG382 irqTop // Raster Interrupt at the top of the screen irqTop: { - .label i = $26 - .label i1 = $27 - //SEG361 entry interrupt(HARDWARE_ALL) + .label i = $28 + .label i1 = $29 + //SEG383 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG362 [206] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] + //SEG384 [221] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] b1_from_irqTop: - //SEG363 [206] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuz1=vbuc1 + //SEG385 [221] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG364 [206] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] + //SEG386 [221] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] b1_from_b1: - //SEG365 [206] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy + //SEG387 [221] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy jmp b1 - //SEG366 irqTop::@1 + //SEG388 irqTop::@1 b1: - //SEG367 [207] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuz1=_inc_vbuz1 + //SEG389 [222] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG368 [208] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG390 [223] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuz1_neq_vbuc1_then_la1 lda #5 cmp i bne b1_from_b1 jmp b2 - //SEG369 irqTop::@2 + //SEG391 irqTop::@2 b2: - //SEG370 [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG392 [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG371 [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG393 [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG372 [211] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] + //SEG394 [226] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] b3_from_b2: - //SEG373 [211] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuz1=vbuc1 + //SEG395 [226] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuz1=vbuc1 lda #0 sta i1 jmp b3 - //SEG374 [211] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] + //SEG396 [226] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] b3_from_b3: - //SEG375 [211] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy + //SEG397 [226] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy jmp b3 - //SEG376 irqTop::@3 + //SEG398 irqTop::@3 b3: - //SEG377 [212] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuz1=_inc_vbuz1 + //SEG399 [227] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuz1=_inc_vbuz1 inc i1 - //SEG378 [213] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuz1_neq_vbuc1_then_la1 + //SEG400 [228] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuz1_neq_vbuc1_then_la1 lda #8 cmp i1 bne b3_from_b3 jmp b4 - //SEG379 irqTop::@4 + //SEG401 irqTop::@4 b4: - //SEG380 [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG402 [229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG381 [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG403 [230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG382 [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG404 [231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the middle of the screen lda #RASTER_IRQ_MIDDLE sta RASTER - //SEG383 [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG405 [232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG384 [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG406 [233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG385 irqTop::@return + //SEG407 irqTop::@return breturn: - //SEG386 [219] return - exit interrupt(HARDWARE_ALL) + //SEG408 [234] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -4933,473 +5196,497 @@ irqTop: { PROCESSING: .fill 8*NUM_PROCESSING, 0 REGISTER UPLIFT POTENTIAL REGISTERS -Statement [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a +Statement [7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Statement [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:40 [ main::$18 ] -Statement [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Statement [16] *((byte*) main::sp#2) ← (byte) 0 [ main::sp#2 ] ( main:2 [ main::sp#2 ] ) always clobbers reg byte a reg byte y -Statement [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2 [ main::sp#1 ] ( main:2 [ main::sp#1 ] ) always clobbers reg byte a -Statement [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:5 [ main::i1#2 main::i1#1 ] -Statement [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a -Statement [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] -Statement [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:45 [ main::center_x#0 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:46 [ main::center_y#0 ] -Statement [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a -Statement [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:49 [ startProcessing::center_x#0 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:50 [ startProcessing::center_y#0 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Statement [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a -Statement [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a -Statement [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a -Statement [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ) always clobbers reg byte a -Statement [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:49 [ startProcessing::center_x#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:50 [ startProcessing::center_y#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ startProcessing::i1#2 startProcessing::i1#1 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ startProcessing::i1#2 startProcessing::i1#1 ] -Statement [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a -Statement [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ) always clobbers reg byte a -Statement [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ) always clobbers reg byte a -Statement [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ) always clobbers reg byte a -Statement [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ) always clobbers reg byte a -Statement [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:63 [ startProcessing::spriteY#0 ] -Statement [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Statement [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ) always clobbers reg byte a -Statement [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ) always clobbers reg byte a -Statement [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ) always clobbers reg byte a -Statement [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a -Statement [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:77 [ startProcessing::$22 ] -Statement [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:46 [ ] ) always clobbers reg byte a -Statement [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Statement [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a -Statement [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:78 [ getCharToProcess::$13 ] -Statement [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a -Statement [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a -Statement [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a -Statement [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a -Statement [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a -Statement [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a -Statement [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a -Statement [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a -Statement [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a -Statement [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a -Statement [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a -Statement [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a -Statement [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a -Statement [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a -Statement [122] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] -Statement [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a -Statement [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a -Statement [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 ] ) always clobbers reg byte a -Statement [135] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] -Statement [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a -Statement [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a -Statement [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 ] ) always clobbers reg byte a -Statement [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a -Statement [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a -Statement [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:33::mul8u:121 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:33::mul8u:134 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:31 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] -Statement [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a -Statement [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [176] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$18 ] ( processChars:170 [ processChars::i#10 processChars::$18 ] ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Statement [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 [ processChars::i#10 processChars::processing#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a -Statement [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Statement [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:104 [ processChars::bitmask#0 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:104 [ processChars::bitmask#0 ] -Statement [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Removing always clobbered register reg byte x as potential for zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Removing always clobbered register reg byte x as potential for zp ZP_BYTE:104 [ processChars::bitmask#0 ] -Statement [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [186] *((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) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y -Statement [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a -Statement [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a -Statement [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y -Removing always clobbered register reg byte a as potential for zp ZP_BYTE:107 [ processChars::$13 ] -Removing always clobbered register reg byte y as potential for zp ZP_BYTE:107 [ processChars::$13 ] -Statement [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$16 ] ( processChars:170 [ processChars::i#10 processChars::$16 ] ) always clobbers reg byte a -Statement [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 [ processChars::i#10 ] ( processChars:170 [ processChars::i#10 ] ) always clobbers reg byte a -Statement [202] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:170 [ processChars::i#1 ] ) always clobbers reg byte a -Statement [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a -Statement [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [219] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$18 ] ( main:2 [ main::i#2 main::$18 ] ) always clobbers reg byte a -Statement [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a -Statement [16] *((byte*) main::sp#2) ← (byte) 0 [ main::sp#2 ] ( main:2 [ main::sp#2 ] ) always clobbers reg byte a reg byte y -Statement [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2 [ main::sp#1 ] ( main:2 [ main::sp#1 ] ) always clobbers reg byte a -Statement [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 [ main::i1#2 ] ( main:2 [ main::i1#2 ] ) always clobbers reg byte a -Statement [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a -Statement [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y -Statement [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a -Statement [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a -Statement [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a -Statement [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a -Statement [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$21 ] ) always clobbers reg byte a -Statement [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a -Statement [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a -Statement [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a -Statement [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#0 ] ) always clobbers reg byte a -Statement [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y -Statement [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a -Statement [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$3 ] ) always clobbers reg byte a -Statement [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$4 ] ) always clobbers reg byte a -Statement [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 ] ) always clobbers reg byte a -Statement [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::$6 ] ) always clobbers reg byte a -Statement [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a -Statement [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 ] ) always clobbers reg byte a -Statement [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$11 startProcessing::$30 ] ) always clobbers reg byte a -Statement [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$31 ] ) always clobbers reg byte a -Statement [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$12 ] ) always clobbers reg byte a -Statement [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ( main:2::startProcessing:46 [ startProcessing::center_x#0 startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$13 ] ) always clobbers reg byte a -Statement [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 ] ) always clobbers reg byte a -Statement [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::freeIdx#2 startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::spritePtr#0 startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$22 ] ( main:2::startProcessing:46 [ startProcessing::screenPtr#0 startProcessing::$22 ] ) always clobbers reg byte a -Statement [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:46 [ ] ) always clobbers reg byte a -Statement [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a -Statement [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a -Statement [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a -Statement [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a -Statement [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a -Statement [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a -Statement [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a -Statement [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a -Statement [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a -Statement [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a -Statement [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a -Statement [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a -Statement [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a -Statement [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a -Statement [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:35 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a -Statement [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a -Statement [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:35 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a -Statement [117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 [ initSquareTables::x#2 initSquareTables::$2 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$2 ] ) always clobbers reg byte a -Statement [122] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a -Statement [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a -Statement [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a -Statement [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 ] ) always clobbers reg byte a -Statement [130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c [ initSquareTables::y#2 initSquareTables::$10 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$10 ] ) always clobbers reg byte a -Statement [135] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a -Statement [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a -Statement [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a -Statement [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 ] ) always clobbers reg byte a -Statement [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:33 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a -Statement [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:33 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a -Statement [148] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 [ mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ( main:2::initSquareTables:33::mul8u:121 [ initSquareTables::x#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] main:2::initSquareTables:33::mul8u:134 [ initSquareTables::y#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ) always clobbers reg byte a -Statement [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:33::mul8u:121 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:33::mul8u:134 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a -Statement [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:26 [ ] ) always clobbers reg byte a -Statement [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a -Statement [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [176] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y -Statement [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$18 ] ( processChars:170 [ processChars::i#10 processChars::$18 ] ) always clobbers reg byte a -Statement [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 [ processChars::i#10 processChars::processing#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a -Statement [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y -Statement [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [186] *((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) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y -Statement [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a -Statement [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a -Statement [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y -Statement [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y -Statement [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$16 ] ( processChars:170 [ processChars::i#10 processChars::$16 ] ) always clobbers reg byte a -Statement [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 [ processChars::i#10 ] ( processChars:170 [ processChars::i#10 ] ) always clobbers reg byte a -Statement [202] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:170 [ processChars::i#1 ] ) always clobbers reg byte a -Statement [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:170 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a -Statement [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a -Statement [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a -Statement [219] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:42 [ main::$15 ] +Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Statement [21] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a +Statement [29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] +Statement [32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:47 [ main::center_x#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:48 [ main::center_y#0 ] +Statement [33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a +Statement [41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$24 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$24 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:51 [ startProcessing::center_x#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:52 [ startProcessing::center_y#0 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Statement [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 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a +Statement [45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a +Statement [46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$33 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$33 ] ) always clobbers reg byte a +Statement [47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$34 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$34 ] ) always clobbers reg byte a +Statement [48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a +Statement [49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 ] ) always clobbers reg byte a +Statement [50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 ] ) always clobbers reg byte a +Statement [51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$4 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$4 ] ) always clobbers reg byte a +Statement [52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$5 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$5 ] ) always clobbers reg byte a +Statement [53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ) always clobbers reg byte a +Statement [54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ) always clobbers reg byte a +Statement [55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$7 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$7 ] ) always clobbers reg byte a +Statement [56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ) always clobbers reg byte a +Statement [57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a +Statement [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a +Statement [61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:51 [ startProcessing::center_x#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:52 [ startProcessing::center_y#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] +Statement [62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a +Statement [66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 ] ) always clobbers reg byte a +Statement [68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$10 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$10 ] ) always clobbers reg byte a +Statement [69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$11 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$11 ] ) always clobbers reg byte a +Statement [70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ) always clobbers reg byte a +Statement [71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$13 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$13 ] ) always clobbers reg byte a +Statement [73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:82 [ startProcessing::spriteY#0 ] +Statement [74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] +Statement [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:84 [ startProcessing::$25 ] +Statement [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2 [ startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:37 [ ] ) always clobbers reg byte a +Statement [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Statement [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a +Statement [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:85 [ getCharToProcess::$13 ] +Statement [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a +Statement [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a +Statement [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a +Statement [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a +Statement [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a +Statement [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a +Statement [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a +Statement [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a +Statement [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a +Statement [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a +Statement [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a +Statement [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a +Statement [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a +Statement [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a +Statement [115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [126] *((byte*) initSprites::sp#2) ← (byte) 0 [ initSprites::sp#2 ] ( main:2::initSprites:17 [ initSprites::sp#2 ] ) always clobbers reg byte a reg byte y +Statement [128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 [ initSprites::sp#1 ] ( main:2::initSprites:17 [ initSprites::sp#1 ] ) always clobbers reg byte a +Statement [130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 [ initSprites::i#2 ] ( main:2::initSprites:17 [ initSprites::i#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] +Statement [133] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [145] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] +Statement [146] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a +Statement [147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a +Statement [148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 ] ) always clobbers reg byte a +Statement [158] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] +Statement [159] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a +Statement [160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a +Statement [161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 ] ) always clobbers reg byte a +Statement [165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a +Statement [166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a +Statement [173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:5::mul8u:144 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:5::mul8u:157 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:33 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] +Statement [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a +Statement [188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [189] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$21 ] ( processChars:183 [ processChars::i#10 processChars::$21 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Statement [193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 [ processChars::i#10 processChars::processing#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a +Statement [194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Statement [195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:111 [ processChars::bitmask#0 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:111 [ processChars::bitmask#0 ] +Statement [196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Removing always clobbered register reg byte x as potential for zp ZP_BYTE:111 [ processChars::bitmask#0 ] +Statement [198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [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) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y +Statement [203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a +Statement [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a +Statement [206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:114 [ processChars::$13 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:114 [ processChars::$13 ] +Statement [208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [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::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [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) [ processChars::i#10 processChars::processing#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y +Statement [212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 ] ( processChars:183 [ processChars::i#10 ] ) always clobbers reg byte a reg byte y +Statement [214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:183 [ processChars::i#1 ] ) always clobbers reg byte a +Statement [216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$19 ] ( processChars:183 [ processChars::i#10 processChars::$19 ] ) always clobbers reg byte a +Statement [218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19 [ processChars::i#10 ] ( processChars:183 [ processChars::i#10 ] ) always clobbers reg byte a +Statement [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a +Statement [233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [234] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0 [ main::i#2 main::$15 ] ( main:2 [ main::i#2 main::$15 ] ) always clobbers reg byte a +Statement [13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0 [ main::i#2 ] ( main:2 [ main::i#2 ] ) always clobbers reg byte a +Statement [21] *((byte*) main::dst#2) ← *((byte*) main::src#2) [ main::src#2 main::dst#2 ] ( main:2 [ main::src#2 main::dst#2 ] ) always clobbers reg byte a reg byte y +Statement [24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3 [ main::src#1 main::dst#1 ] ( main:2 [ main::src#1 main::dst#1 ] ) always clobbers reg byte a +Statement [29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ( main:2 [ getCharToProcess::return_x#0 getCharToProcess::return_y#0 getCharToProcess::return_dist#0 ] ) always clobbers reg byte a +Statement [32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ( main:2 [ main::center_x#0 main::center_y#0 main::center_dist#0 ] ) always clobbers reg byte a +Statement [33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5 [ main::center_x#0 main::center_y#0 ] ( main:2 [ main::center_x#0 main::center_y#0 ] ) always clobbers reg byte a +Statement [41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$24 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 startProcessing::$24 ] ) always clobbers reg byte a +Statement [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 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#6 startProcessing::i#2 ] ) always clobbers reg byte a +Statement [45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 ] ) always clobbers reg byte a +Statement [46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$33 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$0 startProcessing::$33 ] ) always clobbers reg byte a +Statement [47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$34 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$34 ] ) always clobbers reg byte a +Statement [48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$1 ] ) always clobbers reg byte a +Statement [49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 ] ) always clobbers reg byte a +Statement [50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 ] ) always clobbers reg byte a +Statement [51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$4 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$4 ] ) always clobbers reg byte a +Statement [52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$5 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::$5 ] ) always clobbers reg byte a +Statement [53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::$2 startProcessing::screenPtr#0 startProcessing::spriteData#0 ] ) always clobbers reg byte a +Statement [54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::ch#0 ] ) always clobbers reg byte a reg byte y +Statement [55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$7 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$7 ] ) always clobbers reg byte a +Statement [56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::$8 ] ) always clobbers reg byte a +Statement [57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a +Statement [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteData#0 startProcessing::chargenData#0 ] ) always clobbers reg byte a +Statement [61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::spriteData#2 startProcessing::i1#2 ] ) always clobbers reg byte a reg byte y +Statement [62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::chargenData#2 startProcessing::i1#2 startProcessing::spriteData#1 ] ) always clobbers reg byte a +Statement [66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 ] ( main:2::startProcessing:37 [ startProcessing::center_x#0 startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 ] ) always clobbers reg byte a +Statement [68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$10 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$10 ] ) always clobbers reg byte a +Statement [69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$11 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::$11 ] ) always clobbers reg byte a +Statement [70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ( main:2::startProcessing:37 [ startProcessing::center_y#0 startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 ] ) always clobbers reg byte a +Statement [71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$13 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::$13 ] ) always clobbers reg byte a +Statement [73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 ] ) always clobbers reg byte a +Statement [74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteX#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spriteY#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::freeIdx#2 startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2 [ startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::spritePtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 [ startProcessing::screenPtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0 [ startProcessing::screenPtr#0 startProcessing::$25 ] ( main:2::startProcessing:37 [ startProcessing::screenPtr#0 startProcessing::$25 ] ) always clobbers reg byte a +Statement [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0 [ ] ( main:2::startProcessing:37 [ ] ) always clobbers reg byte a +Statement [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 ] ) always clobbers reg byte a +Statement [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 ] ) always clobbers reg byte a +Statement [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::$13 getCharToProcess::$14 ] ) always clobbers reg byte a +Statement [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a +Statement [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_dist#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::dist#0 ] ) always clobbers reg byte a +Statement [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::y#7 getCharToProcess::screen_line#1 ] ) always clobbers reg byte a +Statement [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a +Statement [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 ] ) always clobbers reg byte a +Statement [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$9 getCharToProcess::$15 ] ) always clobbers reg byte a +Statement [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$16 ] ) always clobbers reg byte a +Statement [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$10 ] ) always clobbers reg byte a +Statement [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 getCharToProcess::$11 ] ) always clobbers reg byte a +Statement [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::return_dist#1 ] ) always clobbers reg byte a +Statement [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#1 getCharToProcess::y#1 getCharToProcess::closest_dist#10 ] ) always clobbers reg byte a +Statement [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ( main:2::getCharToProcess:26 [ getCharToProcess::return_x#1 getCharToProcess::return_y#1 getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#1 getCharToProcess::closest_dist#12 ] ) always clobbers reg byte a +Statement [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#6 ] ) always clobbers reg byte a +Statement [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ( main:2::getCharToProcess:26 [ getCharToProcess::screen_line#4 getCharToProcess::y#7 getCharToProcess::x#2 getCharToProcess::closest_x#7 getCharToProcess::closest_y#7 getCharToProcess::return_dist#5 ] ) always clobbers reg byte a +Statement [115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 [ ] ( main:2::setupRasterIrq:19 [ ] ) always clobbers reg byte a +Statement [126] *((byte*) initSprites::sp#2) ← (byte) 0 [ initSprites::sp#2 ] ( main:2::initSprites:17 [ initSprites::sp#2 ] ) always clobbers reg byte a reg byte y +Statement [128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 [ initSprites::sp#1 ] ( main:2::initSprites:17 [ initSprites::sp#1 ] ) always clobbers reg byte a +Statement [130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 [ initSprites::i#2 ] ( main:2::initSprites:17 [ initSprites::i#2 ] ) always clobbers reg byte a +Statement [133] *((const byte*) SPRITES_MC#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 [ ] ( main:2::initSprites:17 [ ] ) always clobbers reg byte a +Statement [140] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 [ initSquareTables::x#2 initSquareTables::$2 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$2 ] ) always clobbers reg byte a +Statement [145] (word) mul8u::return#2 ← (word) mul8u::res#2 [ initSquareTables::x#2 mul8u::return#2 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 mul8u::return#2 ] ) always clobbers reg byte a +Statement [146] (word~) initSquareTables::$6 ← (word) mul8u::return#2 [ initSquareTables::x#2 initSquareTables::$6 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$6 ] ) always clobbers reg byte a +Statement [147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$6 initSquareTables::$16 ] ) always clobbers reg byte a +Statement [148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 [ initSquareTables::x#2 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 ] ) always clobbers reg byte a +Statement [153] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c [ initSquareTables::y#2 initSquareTables::$10 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$10 ] ) always clobbers reg byte a +Statement [158] (word) mul8u::return#3 ← (word) mul8u::res#2 [ initSquareTables::y#2 mul8u::return#3 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 mul8u::return#3 ] ) always clobbers reg byte a +Statement [159] (word~) initSquareTables::$14 ← (word) mul8u::return#3 [ initSquareTables::y#2 initSquareTables::$14 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$14 ] ) always clobbers reg byte a +Statement [160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$14 initSquareTables::$17 ] ) always clobbers reg byte a +Statement [161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 [ initSquareTables::y#2 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 ] ) always clobbers reg byte a +Statement [165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 [ initSquareTables::y#2 initSquareTables::$12 ] ( main:2::initSquareTables:5 [ initSquareTables::y#2 initSquareTables::$12 ] ) always clobbers reg byte a +Statement [166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 [ initSquareTables::x#2 initSquareTables::$4 ] ( main:2::initSquareTables:5 [ initSquareTables::x#2 initSquareTables::$4 ] ) always clobbers reg byte a +Statement [171] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 [ mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ( main:2::initSquareTables:5::mul8u:144 [ initSquareTables::x#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] main:2::initSquareTables:5::mul8u:157 [ initSquareTables::y#2 mul8u::res#2 mul8u::a#3 mul8u::mb#2 mul8u::$1 ] ) always clobbers reg byte a +Statement [173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 [ mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ( main:2::initSquareTables:5::mul8u:144 [ initSquareTables::x#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] main:2::initSquareTables:5::mul8u:157 [ initSquareTables::y#2 mul8u::a#3 mul8u::mb#2 mul8u::res#1 ] ) always clobbers reg byte a +Statement [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() [ ] ( [ ] ) always clobbers reg byte a +Statement [188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [189] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y +Statement [192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3 [ processChars::i#10 processChars::$21 ] ( processChars:183 [ processChars::i#10 processChars::$21 ] ) always clobbers reg byte a +Statement [193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 [ processChars::i#10 processChars::processing#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a +Statement [194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y +Statement [195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte x reg byte y +Statement [198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [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) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$9 ] ) always clobbers reg byte a reg byte y +Statement [203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$10 ] ) always clobbers reg byte a +Statement [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 ] ) always clobbers reg byte a +Statement [206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 processChars::$13 processChars::$12 ] ) always clobbers reg byte a reg byte y +Statement [208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [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::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [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) [ processChars::i#10 processChars::processing#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 ] ) always clobbers reg byte a reg byte y +Statement [212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) [ processChars::i#10 ] ( processChars:183 [ processChars::i#10 ] ) always clobbers reg byte a reg byte y +Statement [214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 [ processChars::i#1 ] ( processChars:183 [ processChars::i#1 ] ) always clobbers reg byte a +Statement [216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 [ processChars::i#10 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::bitmask#0 ] ) always clobbers reg byte a reg byte y +Statement [217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0 [ processChars::i#10 processChars::$19 ] ( processChars:183 [ processChars::i#10 processChars::$19 ] ) always clobbers reg byte a +Statement [218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19 [ processChars::i#10 ] ( processChars:183 [ processChars::i#10 ] ) always clobbers reg byte a +Statement [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ( processChars:183 [ processChars::i#10 processChars::processing#0 processChars::bitmask#0 ] ) always clobbers reg byte a +Statement [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() [ ] ( [ ] ) always clobbers reg byte a +Statement [233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 [ ] ( [ ] ) always clobbers reg byte a +Statement [234] return [ ] ( [ ] ) always clobbers reg byte a reg byte x reg byte y Potential registers zp ZP_BYTE:2 [ main::i#2 main::i#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] : zp ZP_WORD:3 , -Potential registers zp ZP_BYTE:5 [ main::i1#2 main::i1#1 ] : zp ZP_BYTE:5 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:6 [ main::src#2 main::src#1 ] : zp ZP_WORD:6 , -Potential registers zp ZP_WORD:8 [ main::dst#2 main::dst#1 ] : zp ZP_WORD:8 , -Potential registers zp ZP_BYTE:10 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] : zp ZP_BYTE:11 , reg byte x , -Potential registers zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] : zp ZP_WORD:12 , -Potential registers zp ZP_BYTE:14 [ startProcessing::i1#2 startProcessing::i1#1 ] : zp ZP_BYTE:14 , reg byte x , -Potential registers zp ZP_WORD:15 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] : zp ZP_WORD:15 , -Potential registers zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] : zp ZP_BYTE:17 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] : zp ZP_BYTE:18 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:19 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] : zp ZP_WORD:19 , -Potential registers zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] : zp ZP_BYTE:22 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] : zp ZP_WORD:23 , -Potential registers zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] : zp ZP_BYTE:25 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:26 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] : zp ZP_BYTE:27 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:28 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:29 [ mul8u::b#1 ] : zp ZP_BYTE:29 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:30 [ mul8u::b#0 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:31 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp ZP_BYTE:31 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp ZP_WORD:32 , -Potential registers zp ZP_WORD:34 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] : zp ZP_WORD:34 , -Potential registers zp ZP_BYTE:36 [ irqBottom::i#2 irqBottom::i#1 ] : zp ZP_BYTE:36 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] : zp ZP_BYTE:37 , -Potential registers zp ZP_BYTE:38 [ irqTop::i#2 irqTop::i#1 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:39 [ irqTop::i1#2 irqTop::i1#1 ] : zp ZP_BYTE:39 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:40 [ main::$18 ] : zp ZP_BYTE:40 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] : zp ZP_BYTE:41 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] : zp ZP_BYTE:42 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:43 [ getCharToProcess::return_dist#0 ] : zp ZP_WORD:43 , -Potential registers zp ZP_BYTE:45 [ main::center_x#0 ] : zp ZP_BYTE:45 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:46 [ main::center_y#0 ] : zp ZP_BYTE:46 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:47 [ main::center_dist#0 ] : zp ZP_WORD:47 , -Potential registers zp ZP_BYTE:49 [ startProcessing::center_x#0 ] : zp ZP_BYTE:49 , reg byte x , -Potential registers zp ZP_BYTE:50 [ startProcessing::center_y#0 ] : zp ZP_BYTE:50 , reg byte x , -Potential registers zp ZP_BYTE:51 [ startProcessing::$21 ] : zp ZP_BYTE:51 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:52 [ startProcessing::$0 ] : zp ZP_WORD:52 , -Potential registers zp ZP_WORD:54 [ startProcessing::$1 ] : zp ZP_WORD:54 , -Potential registers zp ZP_WORD:56 [ startProcessing::$3 ] : zp ZP_WORD:56 , -Potential registers zp ZP_WORD:58 [ startProcessing::$4 ] : zp ZP_WORD:58 , -Potential registers zp ZP_WORD:60 [ startProcessing::spriteX#0 ] : zp ZP_WORD:60 , -Potential registers zp ZP_BYTE:62 [ startProcessing::$6 ] : zp ZP_BYTE:62 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:63 [ startProcessing::spriteY#0 ] : zp ZP_BYTE:63 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] : zp ZP_BYTE:64 , reg byte x , reg byte y , -Potential registers zp ZP_WORD:65 [ startProcessing::$11 ] : zp ZP_WORD:65 , -Potential registers zp ZP_WORD:67 [ startProcessing::$30 ] : zp ZP_WORD:67 , -Potential registers zp ZP_WORD:69 [ startProcessing::$31 ] : zp ZP_WORD:69 , -Potential registers zp ZP_WORD:71 [ startProcessing::$12 ] : zp ZP_WORD:71 , -Potential registers zp ZP_WORD:73 [ startProcessing::$13 ] : zp ZP_WORD:73 , -Potential registers zp ZP_WORD:75 [ startProcessing::screenPtr#0 ] : zp ZP_WORD:75 , -Potential registers zp ZP_BYTE:77 [ startProcessing::$22 ] : zp ZP_BYTE:77 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:78 [ getCharToProcess::$13 ] : zp ZP_BYTE:78 , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:79 [ getCharToProcess::$14 ] : zp ZP_BYTE:79 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:80 [ getCharToProcess::$9 ] : zp ZP_WORD:80 , -Potential registers zp ZP_WORD:82 [ getCharToProcess::$15 ] : zp ZP_WORD:82 , -Potential registers zp ZP_WORD:84 [ getCharToProcess::$16 ] : zp ZP_WORD:84 , -Potential registers zp ZP_WORD:86 [ getCharToProcess::$10 ] : zp ZP_WORD:86 , -Potential registers zp ZP_WORD:88 [ getCharToProcess::$11 ] : zp ZP_WORD:88 , -Potential registers zp ZP_WORD:90 [ mul8u::return#2 ] : zp ZP_WORD:90 , -Potential registers zp ZP_WORD:92 [ initSquareTables::$6 ] : zp ZP_WORD:92 , -Potential registers zp ZP_BYTE:94 [ initSquareTables::$16 ] : zp ZP_BYTE:94 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:95 [ mul8u::return#3 ] : zp ZP_WORD:95 , -Potential registers zp ZP_WORD:97 [ initSquareTables::$14 ] : zp ZP_WORD:97 , -Potential registers zp ZP_BYTE:99 [ initSquareTables::$17 ] : zp ZP_BYTE:99 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:100 [ mul8u::$1 ] : zp ZP_BYTE:100 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:101 [ processChars::$18 ] : zp ZP_BYTE:101 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_WORD:102 [ processChars::processing#0 ] : zp ZP_WORD:102 , -Potential registers zp ZP_BYTE:104 [ processChars::bitmask#0 ] : zp ZP_BYTE:104 , -Potential registers zp ZP_BYTE:105 [ processChars::$9 ] : zp ZP_BYTE:105 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:106 [ processChars::$10 ] : zp ZP_BYTE:106 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:107 [ processChars::$13 ] : zp ZP_BYTE:107 , reg byte x , -Potential registers zp ZP_BYTE:108 [ processChars::$12 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , -Potential registers zp ZP_BYTE:109 [ processChars::$16 ] : zp ZP_BYTE:109 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:3 [ main::src#2 main::src#1 ] : zp ZP_WORD:3 , +Potential registers zp ZP_WORD:5 [ main::dst#2 main::dst#1 ] : zp ZP_WORD:5 , +Potential registers zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] : zp ZP_BYTE:7 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] : zp ZP_BYTE:8 , reg byte x , +Potential registers zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] : zp ZP_WORD:9 , +Potential registers zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] : zp ZP_WORD:11 , +Potential registers zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] : zp ZP_BYTE:13 , reg byte x , +Potential registers zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] : zp ZP_WORD:14 , +Potential registers zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] : zp ZP_BYTE:16 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] : zp ZP_BYTE:17 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] : zp ZP_WORD:18 , +Potential registers zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] : zp ZP_BYTE:20 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] : zp ZP_BYTE:21 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] : zp ZP_WORD:22 , +Potential registers zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] : zp ZP_WORD:24 , +Potential registers zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] : zp ZP_BYTE:26 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] : zp ZP_BYTE:27 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:28 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] : zp ZP_BYTE:28 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] : zp ZP_BYTE:29 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:30 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] : zp ZP_BYTE:30 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:31 [ mul8u::b#1 ] : zp ZP_BYTE:31 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:32 [ mul8u::b#0 ] : zp ZP_BYTE:32 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:33 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] : zp ZP_BYTE:33 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] : zp ZP_WORD:34 , +Potential registers zp ZP_WORD:36 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] : zp ZP_WORD:36 , +Potential registers zp ZP_BYTE:38 [ irqBottom::i#2 irqBottom::i#1 ] : zp ZP_BYTE:38 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] : zp ZP_BYTE:39 , +Potential registers zp ZP_BYTE:40 [ irqTop::i#2 irqTop::i#1 ] : zp ZP_BYTE:40 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:41 [ irqTop::i1#2 irqTop::i1#1 ] : zp ZP_BYTE:41 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:42 [ main::$15 ] : zp ZP_BYTE:42 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] : zp ZP_BYTE:43 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] : zp ZP_BYTE:44 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:45 [ getCharToProcess::return_dist#0 ] : zp ZP_WORD:45 , +Potential registers zp ZP_BYTE:47 [ main::center_x#0 ] : zp ZP_BYTE:47 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:48 [ main::center_y#0 ] : zp ZP_BYTE:48 , reg byte x , reg byte y , +Potential registers zp ZP_WORD:49 [ main::center_dist#0 ] : zp ZP_WORD:49 , +Potential registers zp ZP_BYTE:51 [ startProcessing::center_x#0 ] : zp ZP_BYTE:51 , reg byte x , +Potential registers zp ZP_BYTE:52 [ startProcessing::center_y#0 ] : zp ZP_BYTE:52 , reg byte x , +Potential registers zp ZP_BYTE:53 [ startProcessing::$24 ] : zp ZP_BYTE:53 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:54 [ startProcessing::$0 ] : zp ZP_WORD:54 , +Potential registers zp ZP_WORD:56 [ startProcessing::$33 ] : zp ZP_WORD:56 , +Potential registers zp ZP_WORD:58 [ startProcessing::$34 ] : zp ZP_WORD:58 , +Potential registers zp ZP_WORD:60 [ startProcessing::$1 ] : zp ZP_WORD:60 , +Potential registers zp ZP_WORD:62 [ startProcessing::$2 ] : zp ZP_WORD:62 , +Potential registers zp ZP_WORD:64 [ startProcessing::screenPtr#0 ] : zp ZP_WORD:64 , +Potential registers zp ZP_WORD:66 [ startProcessing::$4 ] : zp ZP_WORD:66 , +Potential registers zp ZP_WORD:68 [ startProcessing::$5 ] : zp ZP_WORD:68 , +Potential registers zp ZP_BYTE:70 [ startProcessing::ch#0 ] : zp ZP_BYTE:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:71 [ startProcessing::$7 ] : zp ZP_WORD:71 , +Potential registers zp ZP_WORD:73 [ startProcessing::$8 ] : zp ZP_WORD:73 , +Potential registers zp ZP_WORD:75 [ startProcessing::$10 ] : zp ZP_WORD:75 , +Potential registers zp ZP_WORD:77 [ startProcessing::$11 ] : zp ZP_WORD:77 , +Potential registers zp ZP_WORD:79 [ startProcessing::spriteX#0 ] : zp ZP_WORD:79 , +Potential registers zp ZP_BYTE:81 [ startProcessing::$13 ] : zp ZP_BYTE:81 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:82 [ startProcessing::spriteY#0 ] : zp ZP_BYTE:82 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] : zp ZP_BYTE:83 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:84 [ startProcessing::$25 ] : zp ZP_BYTE:84 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:85 [ getCharToProcess::$13 ] : zp ZP_BYTE:85 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:86 [ getCharToProcess::$14 ] : zp ZP_BYTE:86 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:87 [ getCharToProcess::$9 ] : zp ZP_WORD:87 , +Potential registers zp ZP_WORD:89 [ getCharToProcess::$15 ] : zp ZP_WORD:89 , +Potential registers zp ZP_WORD:91 [ getCharToProcess::$16 ] : zp ZP_WORD:91 , +Potential registers zp ZP_WORD:93 [ getCharToProcess::$10 ] : zp ZP_WORD:93 , +Potential registers zp ZP_WORD:95 [ getCharToProcess::$11 ] : zp ZP_WORD:95 , +Potential registers zp ZP_WORD:97 [ mul8u::return#2 ] : zp ZP_WORD:97 , +Potential registers zp ZP_WORD:99 [ initSquareTables::$6 ] : zp ZP_WORD:99 , +Potential registers zp ZP_BYTE:101 [ initSquareTables::$16 ] : zp ZP_BYTE:101 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:102 [ mul8u::return#3 ] : zp ZP_WORD:102 , +Potential registers zp ZP_WORD:104 [ initSquareTables::$14 ] : zp ZP_WORD:104 , +Potential registers zp ZP_BYTE:106 [ initSquareTables::$17 ] : zp ZP_BYTE:106 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:107 [ mul8u::$1 ] : zp ZP_BYTE:107 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:108 [ processChars::$21 ] : zp ZP_BYTE:108 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:109 [ processChars::processing#0 ] : zp ZP_WORD:109 , +Potential registers zp ZP_BYTE:111 [ processChars::bitmask#0 ] : zp ZP_BYTE:111 , +Potential registers zp ZP_BYTE:112 [ processChars::$9 ] : zp ZP_BYTE:112 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:113 [ processChars::$10 ] : zp ZP_BYTE:113 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:114 [ processChars::$13 ] : zp ZP_BYTE:114 , reg byte x , +Potential registers zp ZP_BYTE:115 [ processChars::$12 ] : zp ZP_BYTE:115 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:116 [ processChars::$19 ] : zp ZP_BYTE:116 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [getCharToProcess] 4,996.99: zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,090.17: zp ZP_WORD:19 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,820.67: zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 2,002: zp ZP_BYTE:79 [ getCharToProcess::$14 ] 1,833.24: zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,456: zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 1,001: zp ZP_BYTE:78 [ getCharToProcess::$13 ] 238.75: zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 130.7: zp ZP_WORD:15 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] 7.33: zp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] 7.33: zp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] 7.33: zp ZP_WORD:43 [ getCharToProcess::return_dist#0 ] 4: zp ZP_WORD:82 [ getCharToProcess::$15 ] 4: zp ZP_WORD:84 [ getCharToProcess::$16 ] 4: zp ZP_WORD:86 [ getCharToProcess::$10 ] 4: zp ZP_WORD:88 [ getCharToProcess::$11 ] 3: zp ZP_WORD:80 [ getCharToProcess::$9 ] -Uplift Scope [startProcessing] 3,090.57: zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp ZP_BYTE:51 [ startProcessing::$21 ] 235.67: zp ZP_BYTE:10 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 223.83: zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 218.83: zp ZP_BYTE:14 [ startProcessing::i1#2 startProcessing::i1#1 ] 4: zp ZP_WORD:52 [ startProcessing::$0 ] 4: zp ZP_WORD:54 [ startProcessing::$1 ] 4: zp ZP_WORD:56 [ startProcessing::$3 ] 4: zp ZP_WORD:58 [ startProcessing::$4 ] 4: zp ZP_BYTE:62 [ startProcessing::$6 ] 4: zp ZP_WORD:67 [ startProcessing::$30 ] 4: zp ZP_WORD:69 [ startProcessing::$31 ] 4: zp ZP_WORD:71 [ startProcessing::$12 ] 4: zp ZP_WORD:73 [ startProcessing::$13 ] 3: zp ZP_WORD:65 [ startProcessing::$11 ] 2.33: zp ZP_BYTE:77 [ startProcessing::$22 ] 0.57: zp ZP_WORD:75 [ startProcessing::screenPtr#0 ] 0.5: zp ZP_BYTE:50 [ startProcessing::center_y#0 ] 0.41: zp ZP_BYTE:49 [ startProcessing::center_x#0 ] 0.4: zp ZP_BYTE:63 [ startProcessing::spriteY#0 ] 0.36: zp ZP_WORD:60 [ startProcessing::spriteX#0 ] 0.36: zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Uplift Scope [mul8u] 349.43: zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 269.57: zp ZP_WORD:34 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] 214.67: zp ZP_BYTE:31 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 202: zp ZP_BYTE:100 [ mul8u::$1 ] 22: zp ZP_BYTE:29 [ mul8u::b#1 ] 22: zp ZP_BYTE:30 [ mul8u::b#0 ] 22: zp ZP_WORD:90 [ mul8u::return#2 ] 22: zp ZP_WORD:95 [ mul8u::return#3 ] -Uplift Scope [initSquareTables] 66: zp ZP_BYTE:26 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] 66: zp ZP_BYTE:28 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] 22: zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] 22: zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] 22: zp ZP_BYTE:94 [ initSquareTables::$16 ] 22: zp ZP_BYTE:99 [ initSquareTables::$17 ] 11: zp ZP_WORD:92 [ initSquareTables::$6 ] 11: zp ZP_WORD:97 [ initSquareTables::$14 ] -Uplift Scope [main] 33: zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] 33: zp ZP_BYTE:5 [ main::i1#2 main::i1#1 ] 27.5: zp ZP_WORD:6 [ main::src#2 main::src#1 ] 22: zp ZP_WORD:8 [ main::dst#2 main::dst#1 ] 22: zp ZP_WORD:47 [ main::center_dist#0 ] 20.62: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 12.83: zp ZP_BYTE:40 [ main::$18 ] 5.5: zp ZP_BYTE:45 [ main::center_x#0 ] 5.5: zp ZP_BYTE:46 [ main::center_y#0 ] -Uplift Scope [processChars] 22: zp ZP_BYTE:101 [ processChars::$18 ] 22: zp ZP_BYTE:105 [ processChars::$9 ] 22: zp ZP_BYTE:106 [ processChars::$10 ] 22: zp ZP_BYTE:108 [ processChars::$12 ] 22: zp ZP_BYTE:109 [ processChars::$16 ] 18.33: zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] 11: zp ZP_BYTE:107 [ processChars::$13 ] 2.89: zp ZP_BYTE:104 [ processChars::bitmask#0 ] 0.58: zp ZP_WORD:102 [ processChars::processing#0 ] -Uplift Scope [irqTop] 38.5: zp ZP_BYTE:38 [ irqTop::i#2 irqTop::i#1 ] 38.5: zp ZP_BYTE:39 [ irqTop::i1#2 irqTop::i1#1 ] -Uplift Scope [irqBottom] 38.5: zp ZP_BYTE:36 [ irqBottom::i#2 irqBottom::i#1 ] +Uplift Scope [getCharToProcess] 4,996.99: zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] 3,090.17: zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] 2,820.67: zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] 2,002: zp ZP_BYTE:86 [ getCharToProcess::$14 ] 1,833.24: zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] 1,456: zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] 1,001: zp ZP_BYTE:85 [ getCharToProcess::$13 ] 238.75: zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] 130.7: zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] 7.33: zp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] 7.33: zp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] 7.33: zp ZP_WORD:45 [ getCharToProcess::return_dist#0 ] 4: zp ZP_WORD:89 [ getCharToProcess::$15 ] 4: zp ZP_WORD:91 [ getCharToProcess::$16 ] 4: zp ZP_WORD:93 [ getCharToProcess::$10 ] 4: zp ZP_WORD:95 [ getCharToProcess::$11 ] 3: zp ZP_WORD:87 [ getCharToProcess::$9 ] +Uplift Scope [startProcessing] 3,076.7: zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] 2,002: zp ZP_BYTE:53 [ startProcessing::$24 ] 235.67: zp ZP_BYTE:7 [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] 203.57: zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] 202: zp ZP_BYTE:13 [ startProcessing::i1#2 startProcessing::i1#1 ] 170.33: zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] 4: zp ZP_WORD:56 [ startProcessing::$33 ] 4: zp ZP_WORD:58 [ startProcessing::$34 ] 4: zp ZP_WORD:60 [ startProcessing::$1 ] 4: zp ZP_WORD:66 [ startProcessing::$4 ] 4: zp ZP_WORD:68 [ startProcessing::$5 ] 4: zp ZP_WORD:71 [ startProcessing::$7 ] 4: zp ZP_WORD:73 [ startProcessing::$8 ] 4: zp ZP_WORD:75 [ startProcessing::$10 ] 4: zp ZP_WORD:77 [ startProcessing::$11 ] 4: zp ZP_BYTE:81 [ startProcessing::$13 ] 3: zp ZP_WORD:54 [ startProcessing::$0 ] 2.33: zp ZP_BYTE:84 [ startProcessing::$25 ] 2: zp ZP_BYTE:70 [ startProcessing::ch#0 ] 1.2: zp ZP_WORD:62 [ startProcessing::$2 ] 1: zp ZP_BYTE:82 [ startProcessing::spriteY#0 ] 0.8: zp ZP_WORD:79 [ startProcessing::spriteX#0 ] 0.8: zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] 0.42: zp ZP_BYTE:51 [ startProcessing::center_x#0 ] 0.34: zp ZP_BYTE:52 [ startProcessing::center_y#0 ] 0.13: zp ZP_WORD:64 [ startProcessing::screenPtr#0 ] +Uplift Scope [mul8u] 349.43: zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] 269.57: zp ZP_WORD:36 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] 214.67: zp ZP_BYTE:33 [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] 202: zp ZP_BYTE:107 [ mul8u::$1 ] 22: zp ZP_BYTE:31 [ mul8u::b#1 ] 22: zp ZP_BYTE:32 [ mul8u::b#0 ] 22: zp ZP_WORD:97 [ mul8u::return#2 ] 22: zp ZP_WORD:102 [ mul8u::return#3 ] +Uplift Scope [initSquareTables] 66: zp ZP_BYTE:28 [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] 66: zp ZP_BYTE:30 [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] 22: zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] 22: zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] 22: zp ZP_BYTE:101 [ initSquareTables::$16 ] 22: zp ZP_BYTE:106 [ initSquareTables::$17 ] 11: zp ZP_WORD:99 [ initSquareTables::$6 ] 11: zp ZP_WORD:104 [ initSquareTables::$14 ] +Uplift Scope [processChars] 22: zp ZP_BYTE:108 [ processChars::$21 ] 22: zp ZP_BYTE:112 [ processChars::$9 ] 22: zp ZP_BYTE:113 [ processChars::$10 ] 22: zp ZP_BYTE:115 [ processChars::$12 ] 22: zp ZP_BYTE:116 [ processChars::$19 ] 18.19: zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] 11: zp ZP_BYTE:114 [ processChars::$13 ] 2.89: zp ZP_BYTE:111 [ processChars::bitmask#0 ] 0.55: zp ZP_WORD:109 [ processChars::processing#0 ] +Uplift Scope [main] 27.5: zp ZP_WORD:3 [ main::src#2 main::src#1 ] 22: zp ZP_WORD:5 [ main::dst#2 main::dst#1 ] 22: zp ZP_WORD:49 [ main::center_dist#0 ] 20.62: zp ZP_BYTE:2 [ main::i#2 main::i#1 ] 12.83: zp ZP_BYTE:42 [ main::$15 ] 5.5: zp ZP_BYTE:47 [ main::center_x#0 ] 5.5: zp ZP_BYTE:48 [ main::center_y#0 ] +Uplift Scope [irqTop] 38.5: zp ZP_BYTE:40 [ irqTop::i#2 irqTop::i#1 ] 38.5: zp ZP_BYTE:41 [ irqTop::i1#2 irqTop::i1#1 ] +Uplift Scope [initSprites] 33: zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] 33: zp ZP_BYTE:26 [ initSprites::i#2 initSprites::i#1 ] +Uplift Scope [irqBottom] 38.5: zp ZP_BYTE:38 [ irqBottom::i#2 irqBottom::i#1 ] Uplift Scope [ProcessingChar] Uplift Scope [ProcessingSprite] Uplift Scope [setupRasterIrq] Uplift Scope [] -Uplifting [getCharToProcess] best 254767 combination zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] zp ZP_WORD:19 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] reg byte a [ getCharToProcess::$14 ] zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] zp ZP_BYTE:78 [ getCharToProcess::$13 ] zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] zp ZP_WORD:15 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] zp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] zp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] zp ZP_WORD:43 [ getCharToProcess::return_dist#0 ] zp ZP_WORD:82 [ getCharToProcess::$15 ] zp ZP_WORD:84 [ getCharToProcess::$16 ] zp ZP_WORD:86 [ getCharToProcess::$10 ] zp ZP_WORD:88 [ getCharToProcess::$11 ] zp ZP_WORD:80 [ getCharToProcess::$9 ] +Uplifting [getCharToProcess] best 257152 combination zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] zp ZP_WORD:18 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] reg byte a [ getCharToProcess::$14 ] zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] zp ZP_BYTE:85 [ getCharToProcess::$13 ] zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] zp ZP_WORD:14 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] zp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] zp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] zp ZP_WORD:45 [ getCharToProcess::return_dist#0 ] zp ZP_WORD:89 [ getCharToProcess::$15 ] zp ZP_WORD:91 [ getCharToProcess::$16 ] zp ZP_WORD:93 [ getCharToProcess::$10 ] zp ZP_WORD:95 [ getCharToProcess::$11 ] zp ZP_WORD:87 [ getCharToProcess::$9 ] Limited combination testing to 100 combinations of 8748 possible. -Uplifting [startProcessing] best 248963 combination zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] reg byte a [ startProcessing::$21 ] reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] zp ZP_WORD:52 [ startProcessing::$0 ] zp ZP_WORD:54 [ startProcessing::$1 ] zp ZP_WORD:56 [ startProcessing::$3 ] zp ZP_WORD:58 [ startProcessing::$4 ] reg byte a [ startProcessing::$6 ] zp ZP_WORD:67 [ startProcessing::$30 ] zp ZP_WORD:69 [ startProcessing::$31 ] zp ZP_WORD:71 [ startProcessing::$12 ] zp ZP_WORD:73 [ startProcessing::$13 ] zp ZP_WORD:65 [ startProcessing::$11 ] zp ZP_BYTE:77 [ startProcessing::$22 ] zp ZP_WORD:75 [ startProcessing::screenPtr#0 ] zp ZP_BYTE:50 [ startProcessing::center_y#0 ] zp ZP_BYTE:49 [ startProcessing::center_x#0 ] zp ZP_BYTE:63 [ startProcessing::spriteY#0 ] zp ZP_WORD:60 [ startProcessing::spriteX#0 ] zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Limited combination testing to 100 combinations of 20736 possible. -Uplifting [mul8u] best 247937 combination zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:34 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] reg byte a [ mul8u::$1 ] reg byte a [ mul8u::b#1 ] reg byte a [ mul8u::b#0 ] zp ZP_WORD:90 [ mul8u::return#2 ] zp ZP_WORD:95 [ mul8u::return#3 ] +Uplifting [startProcessing] best 251348 combination zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] reg byte a [ startProcessing::$24 ] reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] zp ZP_WORD:56 [ startProcessing::$33 ] zp ZP_WORD:58 [ startProcessing::$34 ] zp ZP_WORD:60 [ startProcessing::$1 ] zp ZP_WORD:66 [ startProcessing::$4 ] zp ZP_WORD:68 [ startProcessing::$5 ] zp ZP_WORD:71 [ startProcessing::$7 ] zp ZP_WORD:73 [ startProcessing::$8 ] zp ZP_WORD:75 [ startProcessing::$10 ] zp ZP_WORD:77 [ startProcessing::$11 ] reg byte a [ startProcessing::$13 ] zp ZP_WORD:54 [ startProcessing::$0 ] zp ZP_BYTE:84 [ startProcessing::$25 ] zp ZP_BYTE:70 [ startProcessing::ch#0 ] zp ZP_WORD:62 [ startProcessing::$2 ] zp ZP_BYTE:82 [ startProcessing::spriteY#0 ] zp ZP_WORD:79 [ startProcessing::spriteX#0 ] zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] zp ZP_BYTE:51 [ startProcessing::center_x#0 ] zp ZP_BYTE:52 [ startProcessing::center_y#0 ] zp ZP_WORD:64 [ startProcessing::screenPtr#0 ] +Limited combination testing to 100 combinations of 82944 possible. +Uplifting [mul8u] best 250322 combination zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:36 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] reg byte a [ mul8u::$1 ] reg byte a [ mul8u::b#1 ] reg byte a [ mul8u::b#0 ] zp ZP_WORD:97 [ mul8u::return#2 ] zp ZP_WORD:102 [ mul8u::return#3 ] Limited combination testing to 100 combinations of 192 possible. -Uplifting [initSquareTables] best 247777 combination reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] zp ZP_BYTE:94 [ initSquareTables::$16 ] zp ZP_BYTE:99 [ initSquareTables::$17 ] zp ZP_WORD:92 [ initSquareTables::$6 ] zp ZP_WORD:97 [ initSquareTables::$14 ] +Uplifting [initSquareTables] best 250162 combination reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] zp ZP_BYTE:101 [ initSquareTables::$16 ] zp ZP_BYTE:106 [ initSquareTables::$17 ] zp ZP_WORD:99 [ initSquareTables::$6 ] zp ZP_WORD:104 [ initSquareTables::$14 ] Limited combination testing to 100 combinations of 2304 possible. -Uplifting [main] best 247337 combination zp ZP_WORD:3 [ main::sp#2 main::sp#1 ] reg byte x [ main::i1#2 main::i1#1 ] zp ZP_WORD:6 [ main::src#2 main::src#1 ] zp ZP_WORD:8 [ main::dst#2 main::dst#1 ] zp ZP_WORD:47 [ main::center_dist#0 ] reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::$18 ] reg byte x [ main::center_x#0 ] zp ZP_BYTE:46 [ main::center_y#0 ] -Limited combination testing to 100 combinations of 243 possible. -Uplifting [processChars] best 247097 combination reg byte a [ processChars::$18 ] reg byte a [ processChars::$9 ] reg byte a [ processChars::$10 ] reg byte a [ processChars::$12 ] zp ZP_BYTE:109 [ processChars::$16 ] zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] zp ZP_BYTE:107 [ processChars::$13 ] zp ZP_BYTE:104 [ processChars::bitmask#0 ] zp ZP_WORD:102 [ processChars::processing#0 ] +Uplifting [processChars] best 249922 combination reg byte a [ processChars::$21 ] reg byte a [ processChars::$9 ] reg byte a [ processChars::$10 ] reg byte a [ processChars::$12 ] zp ZP_BYTE:116 [ processChars::$19 ] zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] zp ZP_BYTE:114 [ processChars::$13 ] zp ZP_BYTE:111 [ processChars::bitmask#0 ] zp ZP_WORD:109 [ processChars::processing#0 ] Limited combination testing to 100 combinations of 2048 possible. -Uplifting [irqTop] best 246917 combination reg byte x [ irqTop::i#2 irqTop::i#1 ] reg byte x [ irqTop::i1#2 irqTop::i1#1 ] -Uplifting [irqBottom] best 246827 combination reg byte x [ irqBottom::i#2 irqBottom::i#1 ] -Uplifting [ProcessingChar] best 246827 combination -Uplifting [ProcessingSprite] best 246827 combination -Uplifting [setupRasterIrq] best 246827 combination -Uplifting [] best 246827 combination -Attempting to uplift remaining variables inzp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Uplifting [startProcessing] best 246827 combination zp ZP_BYTE:11 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Uplifting [getCharToProcess] best 246827 combination zp ZP_BYTE:22 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Attempting to uplift remaining variables inzp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Uplifting [getCharToProcess] best 246827 combination zp ZP_BYTE:21 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Attempting to uplift remaining variables inzp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Uplifting [getCharToProcess] best 246827 combination zp ZP_BYTE:18 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:78 [ getCharToProcess::$13 ] -Uplifting [getCharToProcess] best 242827 combination reg byte x [ getCharToProcess::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Uplifting [getCharToProcess] best 242827 combination zp ZP_BYTE:17 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] -Uplifting [initSquareTables] best 242827 combination zp ZP_BYTE:25 [ initSquareTables::x#2 initSquareTables::x#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] -Uplifting [initSquareTables] best 242827 combination zp ZP_BYTE:27 [ initSquareTables::y#2 initSquareTables::y#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:94 [ initSquareTables::$16 ] -Uplifting [initSquareTables] best 242787 combination reg byte a [ initSquareTables::$16 ] -Attempting to uplift remaining variables inzp ZP_BYTE:99 [ initSquareTables::$17 ] -Uplifting [initSquareTables] best 242747 combination reg byte a [ initSquareTables::$17 ] -Attempting to uplift remaining variables inzp ZP_BYTE:109 [ processChars::$16 ] -Uplifting [processChars] best 242687 combination reg byte a [ processChars::$16 ] -Attempting to uplift remaining variables inzp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Uplifting [processChars] best 242687 combination zp ZP_BYTE:37 [ processChars::i#10 processChars::i#1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:107 [ processChars::$13 ] -Uplifting [processChars] best 242617 combination reg byte x [ processChars::$13 ] -Attempting to uplift remaining variables inzp ZP_BYTE:41 [ getCharToProcess::return_x#0 ] -Uplifting [getCharToProcess] best 242557 combination reg byte x [ getCharToProcess::return_x#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:42 [ getCharToProcess::return_y#0 ] -Uplifting [getCharToProcess] best 242497 combination reg byte y [ getCharToProcess::return_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:46 [ main::center_y#0 ] -Uplifting [main] best 242437 combination reg byte y [ main::center_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:104 [ processChars::bitmask#0 ] -Uplifting [processChars] best 242437 combination zp ZP_BYTE:104 [ processChars::bitmask#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:77 [ startProcessing::$22 ] -Uplifting [startProcessing] best 242418 combination reg byte x [ startProcessing::$22 ] -Attempting to uplift remaining variables inzp ZP_BYTE:50 [ startProcessing::center_y#0 ] -Uplifting [startProcessing] best 242418 combination zp ZP_BYTE:50 [ startProcessing::center_y#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:49 [ startProcessing::center_x#0 ] -Uplifting [startProcessing] best 242418 combination zp ZP_BYTE:49 [ startProcessing::center_x#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:63 [ startProcessing::spriteY#0 ] -Uplifting [startProcessing] best 242416 combination reg byte y [ startProcessing::spriteY#0 ] -Attempting to uplift remaining variables inzp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Uplifting [startProcessing] best 242416 combination zp ZP_BYTE:64 [ startProcessing::spritePtr#0 ] -Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] ] with [ zp ZP_WORD:54 [ startProcessing::$1 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] ] with [ zp ZP_WORD:43 [ getCharToProcess::return_dist#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp ZP_WORD:90 [ mul8u::return#2 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] with [ zp ZP_WORD:95 [ mul8u::return#3 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ startProcessing::$3 ] ] with [ zp ZP_WORD:58 [ startProcessing::$4 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ startProcessing::$11 ] ] with [ zp ZP_WORD:69 [ startProcessing::$31 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:71 [ startProcessing::$12 ] ] with [ zp ZP_WORD:73 [ startProcessing::$13 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:80 [ getCharToProcess::$9 ] ] with [ zp ZP_WORD:84 [ getCharToProcess::$16 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:86 [ getCharToProcess::$10 ] ] with [ zp ZP_WORD:88 [ getCharToProcess::$11 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:12 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 ] ] with [ zp ZP_WORD:52 [ startProcessing::$0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:23 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 ] ] with [ zp ZP_WORD:47 [ main::center_dist#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 ] ] with [ zp ZP_WORD:92 [ initSquareTables::$6 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:32 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 ] ] with [ zp ZP_WORD:97 [ initSquareTables::$14 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:56 [ startProcessing::$3 startProcessing::$4 ] ] with [ zp ZP_WORD:60 [ startProcessing::spriteX#0 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ startProcessing::$11 startProcessing::$31 ] ] with [ zp ZP_WORD:71 [ startProcessing::$12 startProcessing::$13 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:80 [ getCharToProcess::$9 getCharToProcess::$16 ] ] with [ zp ZP_WORD:86 [ getCharToProcess::$10 getCharToProcess::$11 ] ] - score: 1 -Coalescing zero page register with common assignment [ zp ZP_WORD:65 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 ] ] with [ zp ZP_WORD:75 [ startProcessing::screenPtr#0 ] ] - score: 1 -Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::sp#2 main::sp#1 ] -Allocated (was zp ZP_WORD:6) zp ZP_WORD:4 [ main::src#2 main::src#1 ] -Allocated (was zp ZP_WORD:8) zp ZP_WORD:6 [ main::dst#2 main::dst#1 ] -Allocated (was zp ZP_BYTE:11) zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -Allocated (was zp ZP_WORD:12) zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 startProcessing::$0 ] -Allocated (was zp ZP_WORD:15) zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] -Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ] -Allocated (was zp ZP_BYTE:18) zp ZP_BYTE:14 [ getCharToProcess::x#2 getCharToProcess::x#1 ] -Allocated (was zp ZP_WORD:19) zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] -Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] -Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] -Allocated (was zp ZP_WORD:23) zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ] -Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:21 [ initSquareTables::x#2 initSquareTables::x#1 ] -Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:22 [ initSquareTables::y#2 initSquareTables::y#1 ] -Allocated (was zp ZP_WORD:32) zp ZP_WORD:23 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] -Allocated (was zp ZP_WORD:34) zp ZP_WORD:25 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] -Allocated (was zp ZP_BYTE:37) zp ZP_BYTE:27 [ processChars::i#10 processChars::i#1 ] -Allocated (was zp ZP_BYTE:49) zp ZP_BYTE:28 [ startProcessing::center_x#0 ] -Allocated (was zp ZP_BYTE:50) zp ZP_BYTE:29 [ startProcessing::center_y#0 ] -Allocated (was zp ZP_WORD:56) zp ZP_WORD:30 [ startProcessing::$3 startProcessing::$4 startProcessing::spriteX#0 ] -Allocated (was zp ZP_BYTE:64) zp ZP_BYTE:32 [ startProcessing::spritePtr#0 ] -Allocated (was zp ZP_WORD:65) zp ZP_WORD:33 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 startProcessing::screenPtr#0 ] -Allocated (was zp ZP_WORD:67) zp ZP_WORD:35 [ startProcessing::$30 ] -Allocated (was zp ZP_WORD:80) zp ZP_WORD:37 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] -Allocated (was zp ZP_WORD:82) zp ZP_WORD:39 [ getCharToProcess::$15 ] -Allocated (was zp ZP_WORD:102) zp ZP_WORD:41 [ processChars::processing#0 ] -Allocated (was zp ZP_BYTE:104) zp ZP_BYTE:43 [ processChars::bitmask#0 ] +Uplifting [main] best 249542 combination zp ZP_WORD:3 [ main::src#2 main::src#1 ] zp ZP_WORD:5 [ main::dst#2 main::dst#1 ] zp ZP_WORD:49 [ main::center_dist#0 ] reg byte y [ main::i#2 main::i#1 ] reg byte x [ main::$15 ] reg byte y [ main::center_x#0 ] reg byte x [ main::center_y#0 ] +Uplifting [irqTop] best 249362 combination reg byte x [ irqTop::i#2 irqTop::i#1 ] reg byte x [ irqTop::i1#2 irqTop::i1#1 ] +Uplifting [initSprites] best 249242 combination zp ZP_WORD:24 [ initSprites::sp#2 initSprites::sp#1 ] reg byte x [ initSprites::i#2 initSprites::i#1 ] +Uplifting [irqBottom] best 249152 combination reg byte x [ irqBottom::i#2 irqBottom::i#1 ] +Uplifting [ProcessingChar] best 249152 combination +Uplifting [ProcessingSprite] best 249152 combination +Uplifting [setupRasterIrq] best 249152 combination +Uplifting [] best 249152 combination +Attempting to uplift remaining variables inzp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Uplifting [startProcessing] best 249152 combination zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Uplifting [getCharToProcess] best 249152 combination zp ZP_BYTE:21 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Uplifting [getCharToProcess] best 249152 combination zp ZP_BYTE:20 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Uplifting [getCharToProcess] best 249152 combination zp ZP_BYTE:17 [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:85 [ getCharToProcess::$13 ] +Uplifting [getCharToProcess] best 245152 combination reg byte x [ getCharToProcess::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Uplifting [getCharToProcess] best 245152 combination zp ZP_BYTE:16 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] +Uplifting [initSquareTables] best 245152 combination zp ZP_BYTE:27 [ initSquareTables::x#2 initSquareTables::x#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] +Uplifting [initSquareTables] best 245152 combination zp ZP_BYTE:29 [ initSquareTables::y#2 initSquareTables::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:101 [ initSquareTables::$16 ] +Uplifting [initSquareTables] best 245112 combination reg byte a [ initSquareTables::$16 ] +Attempting to uplift remaining variables inzp ZP_BYTE:106 [ initSquareTables::$17 ] +Uplifting [initSquareTables] best 245072 combination reg byte a [ initSquareTables::$17 ] +Attempting to uplift remaining variables inzp ZP_BYTE:116 [ processChars::$19 ] +Uplifting [processChars] best 245012 combination reg byte a [ processChars::$19 ] +Attempting to uplift remaining variables inzp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Uplifting [processChars] best 245012 combination zp ZP_BYTE:39 [ processChars::i#10 processChars::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:114 [ processChars::$13 ] +Uplifting [processChars] best 244942 combination reg byte x [ processChars::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:43 [ getCharToProcess::return_x#0 ] +Uplifting [getCharToProcess] best 244882 combination reg byte y [ getCharToProcess::return_x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:44 [ getCharToProcess::return_y#0 ] +Uplifting [getCharToProcess] best 244822 combination reg byte x [ getCharToProcess::return_y#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:111 [ processChars::bitmask#0 ] +Uplifting [processChars] best 244822 combination zp ZP_BYTE:111 [ processChars::bitmask#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:84 [ startProcessing::$25 ] +Uplifting [startProcessing] best 244803 combination reg byte x [ startProcessing::$25 ] +Attempting to uplift remaining variables inzp ZP_BYTE:70 [ startProcessing::ch#0 ] +Uplifting [startProcessing] best 244797 combination reg byte a [ startProcessing::ch#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:82 [ startProcessing::spriteY#0 ] +Uplifting [startProcessing] best 244795 combination reg byte y [ startProcessing::spriteY#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] +Uplifting [startProcessing] best 244795 combination zp ZP_BYTE:83 [ startProcessing::spritePtr#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:51 [ startProcessing::center_x#0 ] +Uplifting [startProcessing] best 244795 combination zp ZP_BYTE:51 [ startProcessing::center_x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:52 [ startProcessing::center_y#0 ] +Uplifting [startProcessing] best 244795 combination zp ZP_BYTE:52 [ startProcessing::center_y#0 ] +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 ] ] with [ zp ZP_WORD:73 [ startProcessing::$8 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 ] ] with [ zp ZP_WORD:68 [ startProcessing::$5 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 ] ] with [ zp ZP_WORD:45 [ getCharToProcess::return_dist#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] ] with [ zp ZP_WORD:97 [ mul8u::return#2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 ] ] with [ zp ZP_WORD:102 [ mul8u::return#3 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ startProcessing::$0 ] ] with [ zp ZP_WORD:58 [ startProcessing::$34 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:60 [ startProcessing::$1 ] ] with [ zp ZP_WORD:62 [ startProcessing::$2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:75 [ startProcessing::$10 ] ] with [ zp ZP_WORD:77 [ startProcessing::$11 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:87 [ getCharToProcess::$9 ] ] with [ zp ZP_WORD:91 [ getCharToProcess::$16 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:93 [ getCharToProcess::$10 ] ] with [ zp ZP_WORD:95 [ getCharToProcess::$11 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:9 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$8 ] ] with [ zp ZP_WORD:71 [ startProcessing::$7 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:11 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$5 ] ] with [ zp ZP_WORD:66 [ startProcessing::$4 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:22 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 ] ] with [ zp ZP_WORD:49 [ main::center_dist#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 ] ] with [ zp ZP_WORD:99 [ initSquareTables::$6 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:34 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 ] ] with [ zp ZP_WORD:104 [ initSquareTables::$14 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:54 [ startProcessing::$0 startProcessing::$34 ] ] with [ zp ZP_WORD:60 [ startProcessing::$1 startProcessing::$2 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:75 [ startProcessing::$10 startProcessing::$11 ] ] with [ zp ZP_WORD:79 [ startProcessing::spriteX#0 ] ] - score: 1 +Coalescing zero page register with common assignment [ zp ZP_WORD:87 [ getCharToProcess::$9 getCharToProcess::$16 ] ] with [ zp ZP_WORD:93 [ getCharToProcess::$10 getCharToProcess::$11 ] ] - score: 1 +Allocated (was zp ZP_WORD:3) zp ZP_WORD:2 [ main::src#2 main::src#1 ] +Allocated (was zp ZP_WORD:5) zp ZP_WORD:4 [ main::dst#2 main::dst#1 ] +Allocated (was zp ZP_BYTE:8) zp ZP_BYTE:6 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] +Allocated (was zp ZP_WORD:9) zp ZP_WORD:7 [ startProcessing::chargenData#2 startProcessing::chargenData#0 startProcessing::chargenData#1 startProcessing::$8 startProcessing::$7 ] +Allocated (was zp ZP_WORD:11) zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$5 startProcessing::$4 ] +Allocated (was zp ZP_WORD:14) zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] +Allocated (was zp ZP_BYTE:16) zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ] +Allocated (was zp ZP_BYTE:17) zp ZP_BYTE:14 [ getCharToProcess::x#2 getCharToProcess::x#1 ] +Allocated (was zp ZP_WORD:18) zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist#8 getCharToProcess::closest_dist#10 getCharToProcess::closest_dist#12 ] +Allocated (was zp ZP_BYTE:20) zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] +Allocated (was zp ZP_BYTE:21) zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] +Allocated (was zp ZP_WORD:22) zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ] +Allocated (was zp ZP_WORD:24) zp ZP_WORD:21 [ initSprites::sp#2 initSprites::sp#1 ] +Allocated (was zp ZP_BYTE:27) zp ZP_BYTE:23 [ initSquareTables::x#2 initSquareTables::x#1 ] +Allocated (was zp ZP_BYTE:29) zp ZP_BYTE:24 [ initSquareTables::y#2 initSquareTables::y#1 ] +Allocated (was zp ZP_WORD:34) zp ZP_WORD:25 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] +Allocated (was zp ZP_WORD:36) zp ZP_WORD:27 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] +Allocated (was zp ZP_BYTE:39) zp ZP_BYTE:29 [ processChars::i#10 processChars::i#1 ] +Allocated (was zp ZP_BYTE:51) zp ZP_BYTE:30 [ startProcessing::center_x#0 ] +Allocated (was zp ZP_BYTE:52) zp ZP_BYTE:31 [ startProcessing::center_y#0 ] +Allocated (was zp ZP_WORD:54) zp ZP_WORD:32 [ startProcessing::$0 startProcessing::$34 startProcessing::$1 startProcessing::$2 ] +Allocated (was zp ZP_WORD:56) zp ZP_WORD:34 [ startProcessing::$33 ] +Allocated (was zp ZP_WORD:64) zp ZP_WORD:36 [ startProcessing::screenPtr#0 ] +Allocated (was zp ZP_WORD:75) zp ZP_WORD:38 [ startProcessing::$10 startProcessing::$11 startProcessing::spriteX#0 ] +Allocated (was zp ZP_BYTE:83) zp ZP_BYTE:40 [ startProcessing::spritePtr#0 ] +Allocated (was zp ZP_WORD:87) zp ZP_WORD:41 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] +Allocated (was zp ZP_WORD:89) zp ZP_WORD:43 [ getCharToProcess::$15 ] +Allocated (was zp ZP_WORD:109) zp ZP_WORD:45 [ processChars::processing#0 ] +Allocated (was zp ZP_BYTE:111) zp ZP_BYTE:47 [ processChars::bitmask#0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 File Comments @@ -5422,6 +5709,13 @@ ASSEMBLER BEFORE OPTIMIZATION .label PROCPORT = 1 // RAM in $A000, $E000 I/O in $D000 .const PROCPORT_RAM_IO = $35 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + // Positions of the border (in sprite positions) + .const BORDER_XPOS_LEFT = $18 + .const BORDER_YPOS_TOP = $32 // The offset of the sprite pointers from the screen start address .const SPRITE_PTRS = $3f8 .label SPRITES_XPOS = $d000 @@ -5483,306 +5777,295 @@ bend_from_b1: bend: //SEG10 main main: { - .label sp = 2 - .label src = 4 - .label dst = 6 + .label src = 2 + .label dst = 4 .label center_dist = $13 - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] + //SEG11 [5] call initSquareTables + //SEG12 [137] phi from main to initSquareTables [phi:main->initSquareTables] + initSquareTables_from_main: + jsr initSquareTables + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] b1_from_main: - //SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 + //SEG14 [6] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 ldy #0 jmp b1 // Init processing array - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1] b1_from_b1: - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy jmp b1 - //SEG15 main::@1 + //SEG17 main::@1 b1: - //SEG16 [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3 + //SEG18 [7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3 tya asl asl asl tax - //SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG19 [8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING,x lda #0 sta PROCESSING+1,x - //SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG20 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x - //SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG21 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG22 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG23 [12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_FREE sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 + //SEG24 [13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 lda #<0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x lda #>0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x - //SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy + //SEG25 [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy iny - //SEG24 [14] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + //SEG26 [15] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #NUM_PROCESSING-1+1 bne b1_from_b1 - //SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG27 [16] phi from main::@1 to main::@2 [phi:main::@1->main::@2] b2_from_b1: - //SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1 - lda #SPRITE_DATA - sta sp+1 jmp b2 - // Clear sprites - //SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2] - b2_from_b2: - //SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy - jmp b2 - //SEG29 main::@2 + //SEG28 main::@2 b2: - //SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - ldy #0 - sta (sp),y - //SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1 - inc sp - bne !+ - inc sp+1 - !: - //SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 - lda sp+1 - cmp #>SPRITE_DATA+NUM_PROCESSING*$40 - bcc b2_from_b2 - bne !+ - lda sp - cmp #main::@3] - b3_from_b2: - //SEG34 [19] phi (byte) main::i1#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 - ldx #0 - jmp b3 - // Initialize sprites - //SEG35 [19] phi from main::@3 to main::@3 [phi:main::@3->main::@3] - b3_from_b3: - //SEG36 [19] phi (byte) main::i1#2 = (byte) main::i1#1 [phi:main::@3->main::@3#0] -- register_copy - jmp b3 - //SEG37 main::@3 - b3: - //SEG38 [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 -- pbuc1_derefidx_vbuxx=vbuc2 - lda #WHITE - sta SPRITES_COLS,x - //SEG39 [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuxx=_inc_vbuxx - inx - //SEG40 [22] if((byte) main::i1#1!=(byte) 8) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #8 - bne b3_from_b3 - jmp b4 - //SEG41 main::@4 - b4: - //SEG42 [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_MC - //SEG43 [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_EXPAND_X - //SEG44 [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_EXPAND_Y - //SEG45 [26] call setupRasterIrq + //SEG29 [17] call initSprites + //SEG30 [124] phi from main::@2 to initSprites [phi:main::@2->initSprites] + initSprites_from_b2: + jsr initSprites + //SEG31 [18] phi from main::@2 to main::@7 [phi:main::@2->main::@7] + b7_from_b2: + jmp b7 + //SEG32 main::@7 + b7: + //SEG33 [19] call setupRasterIrq jsr setupRasterIrq - //SEG46 [27] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - b5_from_b4: - //SEG47 [27] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@4->main::@5#0] -- pbuz1=pbuc1 + //SEG34 [20] phi from main::@7 to main::@3 [phi:main::@7->main::@3] + b3_from_b7: + //SEG35 [20] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@7->main::@3#0] -- pbuz1=pbuc1 lda #SCREEN_COPY sta dst+1 - //SEG48 [27] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@4->main::@5#1] -- pbuz1=pbuc1 + //SEG36 [20] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@7->main::@3#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 - jmp b5 - // Fill screen with some chars - //for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(main::@5] - b5_from_b5: - //SEG50 [27] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@5->main::@5#0] -- register_copy - //SEG51 [27] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@5->main::@5#1] -- register_copy - jmp b5 - //SEG52 main::@5 - b5: - //SEG53 [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG37 [20] phi from main::@3 to main::@3 [phi:main::@3->main::@3] + b3_from_b3: + //SEG38 [20] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@3->main::@3#0] -- register_copy + //SEG39 [20] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@3->main::@3#1] -- register_copy + jmp b3 + //SEG40 main::@3 + b3: + //SEG41 [21] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y ldy #0 sta (dst),y - //SEG54 [29] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG42 [22] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG55 [30] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG43 [23] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG56 [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 -- pbuz1_neq_pbuc1_then_la1 + //SEG44 [24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 - bne b5_from_b5 + bne b3_from_b3 lda src cmp #main::@6] - b6_from_b5: - jmp b6 - //SEG58 main::@6 - b6: - //SEG59 [33] call initSquareTables - //SEG60 [114] phi from main::@6 to initSquareTables [phi:main::@6->initSquareTables] - initSquareTables_from_b6: - jsr initSquareTables - //SEG61 [34] phi from main::@6 main::@8 to main::@7 [phi:main::@6/main::@8->main::@7] - b7_from_b6: - b7_from_b8: - jmp b7 + bne b3_from_b3 + //SEG45 [25] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + b4_from_b3: + b4_from_b5: + jmp b4 // Main loop - //SEG62 main::@7 - b7: - //SEG63 [35] call getCharToProcess - //SEG64 [86] phi from main::@7 to getCharToProcess [phi:main::@7->getCharToProcess] - getCharToProcess_from_b7: + //SEG46 main::@4 + b4: + //SEG47 [26] call getCharToProcess + //SEG48 [86] phi from main::@4 to getCharToProcess [phi:main::@4->getCharToProcess] + getCharToProcess_from_b4: jsr getCharToProcess - //SEG65 [36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuxx=vbuz1 - ldx getCharToProcess.return_x - //SEG66 [37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuyy=vbuz1 - ldy getCharToProcess.return_y - //SEG67 [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 - jmp b10 - //SEG68 main::@10 - b10: - //SEG69 [39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 - //SEG70 [40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 - //SEG71 [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 - //SEG72 [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 -- vwuz1_neq_vwuc1_then_la1 + //SEG49 [27] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 + ldy getCharToProcess.return_x + //SEG50 [28] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuxx=vbuz1 + ldx getCharToProcess.return_y + //SEG51 [29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 + jmp b8 + //SEG52 main::@8 + b8: + //SEG53 [30] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 + //SEG54 [31] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 + //SEG55 [32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 + //SEG56 [33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5 -- vwuz1_neq_vwuc1_then_la1 lda center_dist+1 cmp #>NOT_FOUND - bne b8 + bne b5 lda center_dist cmp #startProcessing] - startProcessing_from_b8: + jmp b6 + //SEG59 main::@5 + b5: + //SEG60 [35] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy + sty startProcessing.center_x + //SEG61 [36] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuxx + stx startProcessing.center_y + //SEG62 [37] call startProcessing + //SEG63 [38] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] + startProcessing_from_b5: jsr startProcessing - jmp b7_from_b8 + jmp b4_from_b5 } -//SEG80 startProcessing +//SEG64 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($1c) center_x, byte zeropage($1d) center_y) +// startProcessing(byte zeropage($1e) center_x, byte zeropage($1f) center_y) startProcessing: { - .label _0 = 9 - .label _1 = 9 - .label _3 = $1e - .label _4 = $1e - .label _11 = $21 - .label _12 = $21 - .label _13 = $21 - .label center_x = $1c - .label center_y = $1d - .label i = 8 + .label _0 = $20 + .label _1 = $20 + .label _2 = $20 + .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 i = 6 + .label screenPtr = $24 .label spriteData = 9 - .label spriteX = $1e - .label spritePtr = $20 - .label screenPtr = $21 - .label freeIdx = 8 - .label _30 = $23 - .label _31 = $21 - //SEG81 [48] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + .label chargenData = 7 + .label spriteX = $26 + .label spritePtr = $28 + .label freeIdx = 6 + .label _33 = $22 + .label _34 = $20 + //SEG65 [39] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] b1_from_startProcessing: - //SEG82 [48] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 + //SEG66 [39] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 ldx #$ff jmp b1 - //SEG83 startProcessing::@1 + //SEG67 startProcessing::@1 b1: - //SEG84 [49] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG68 [40] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] b2_from_b1: - //SEG85 [49] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG69 [40] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i jmp b2 - //SEG86 [49] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG70 [40] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] b2_from_b3: - //SEG87 [49] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG71 [40] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy jmp b2 - //SEG88 startProcessing::@2 + //SEG72 startProcessing::@2 b2: - //SEG89 [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG73 [41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda i asl asl asl - //SEG90 [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 + //SEG74 [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 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 tay lda #STATUS_FREE cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y bne b3 - //SEG91 [52] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG75 [43] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] b4_from_b2: b4_from_b9: - //SEG92 [52] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG76 [43] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy jmp b4 - //SEG93 startProcessing::@4 + //SEG77 startProcessing::@4 b4: - //SEG94 [53] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG78 [44] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx beq b8 jmp b5 - //SEG95 startProcessing::@5 + //SEG79 startProcessing::@5 b5: - //SEG96 [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 - lda freeIdx + //SEG80 [45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + lda center_y sta _0 lda #0 sta _0+1 - //SEG97 [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz1_rol_6 + //SEG81 [46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + lda _0 + asl + sta _33 + lda _0+1 + rol + sta _33+1 + asl _33 + rol _33+1 + //SEG82 [47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + lda _34 + clc + adc _33 + sta _34 + lda _34+1 + adc _33+1 + sta _34+1 + //SEG83 [48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _1 rol _1+1 asl _1 rol _1+1 asl _1 rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - //SEG98 [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1 + //SEG84 [49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda _2 + adc #SCREEN + sta _2+1 + //SEG85 [50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz2_plus_vbuz3 + lda center_x + clc + adc _2 + sta screenPtr + lda #0 + adc _2+1 + sta screenPtr+1 + //SEG86 [51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + lda freeIdx + sta _4 + lda #0 + sta _4+1 + //SEG87 [52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6 -- vwuz1=vwuz1_rol_6 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + //SEG88 [53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5 -- pbuz1=pbuc1_plus_vwuz1 clc lda spriteData adc #SPRITE_DATA sta spriteData+1 - //SEG99 [57] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG89 [54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0) -- vbuaa=pbuz1_derefidx_vbuz2 + ldy center_x + lda (_2),y + //SEG90 [55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa + sta _7 + lda #0 + sta _7+1 + //SEG91 [56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG92 [57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda chargenData + adc #CHARGEN + sta chargenData+1 + //SEG93 asm { sei } + sei + //SEG94 [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG95 [60] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] b6_from_b5: - //SEG100 [57] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 + //SEG96 [60] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 ldx #0 - //SEG101 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG97 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG98 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy jmp b6 - //SEG102 [57] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG99 [60] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] b6_from_b6: - //SEG103 [57] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG104 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG100 [60] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG101 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG102 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy jmp b6 - //SEG105 startProcessing::@6 + //SEG103 startProcessing::@6 b6: - //SEG106 [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1 - lda #$ff + //SEG104 [61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 + ldy #0 + lda (chargenData),y ldy #0 sta (spriteData),y - //SEG107 [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG105 [62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -5815,155 +6128,120 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG108 [60] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx + //SEG106 [63] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + inc chargenData + bne !+ + inc chargenData+1 + !: + //SEG107 [64] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG109 [61] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 + //SEG108 [65] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b6_from_b6 jmp b7 - //SEG110 startProcessing::@7 + //SEG109 startProcessing::@7 b7: - //SEG111 [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG110 [66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG111 asm { cli } + cli + //SEG112 [68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x - sta _3 + sta _10 lda #0 - sta _3+1 - //SEG112 [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz1_rol_3 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - //SEG113 [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz1 - lda #$18 + sta _10+1 + //SEG113 [69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + //SEG114 [70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 -- vwuz1=vbuc1_plus_vwuz1 + lda #BORDER_XPOS_LEFT clc adc spriteX sta spriteX bcc !+ inc spriteX+1 !: - //SEG114 [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG115 [71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda center_y asl asl asl - //SEG115 [66] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuyy=vbuc1_plus_vbuaa + //SEG116 [72] (byte) startProcessing::spriteY#0 ← (const byte) BORDER_YPOS_TOP#0 + (byte~) startProcessing::$13 -- vbuyy=vbuc1_plus_vbuaa clc - adc #$32 + adc #BORDER_YPOS_TOP tay - //SEG116 [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG117 [73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 lax freeIdx axs #-[SPRITE_DATA/$40] stx spritePtr - //SEG117 [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 - lda center_y - sta _11 - lda #0 - sta _11+1 - //SEG118 [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2 - lda _11 - asl - sta _30 - lda _11+1 - rol - sta _30+1 - asl _30 - rol _30+1 - //SEG119 [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz1 - lda _31 - clc - adc _30 - sta _31 - lda _31+1 - adc _30+1 - sta _31+1 - //SEG120 [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz1_rol_3 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - //SEG121 [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz1 - clc - lda _13 - adc #SCREEN - sta _13+1 - //SEG122 [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz1_plus_vbuz2 - lda center_x - clc - adc screenPtr - sta screenPtr - bcc !+ - inc screenPtr+1 - !: - //SEG123 [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3 + //SEG118 [74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3 lda freeIdx asl asl asl tax - //SEG124 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG119 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteX sta PROCESSING,x lda spriteX+1 sta PROCESSING+1,x - //SEG125 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy + //SEG120 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy tya sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x - //SEG126 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG121 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda freeIdx sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG127 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG122 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spritePtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG128 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG123 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_NEW sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG129 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 + //SEG124 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 lda screenPtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x lda screenPtr+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x jmp breturn - //SEG130 startProcessing::@return + //SEG125 startProcessing::@return breturn: - //SEG131 [81] return + //SEG126 [81] return rts - //SEG132 startProcessing::@8 + //SEG127 startProcessing::@8 b8: - //SEG133 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 + //SEG128 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 ldx freeIdx - //SEG134 [48] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG129 [39] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] b1_from_b8: - //SEG135 [48] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG130 [39] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG136 startProcessing::@3 + //SEG131 startProcessing::@3 b3: - //SEG137 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG132 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG138 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG133 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b2_from_b3 jmp b9 - //SEG139 startProcessing::@9 + //SEG134 startProcessing::@9 b9: - //SEG140 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx + //SEG135 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx stx freeIdx jmp b4_from_b9 } -//SEG141 getCharToProcess +//SEG136 getCharToProcess // 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 = $25 - .label _10 = $25 - .label _11 = $25 + .label _9 = $29 + .label _10 = $29 + .label _11 = $29 .label return_dist = $13 .label x = $e .label dist = $13 @@ -5974,59 +6252,59 @@ getCharToProcess: { .label closest_dist = $f .label closest_x = $11 .label closest_y = $12 - .label _15 = $27 - .label _16 = $25 - //SEG142 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + .label _15 = $2b + .label _16 = $29 + //SEG137 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] b1_from_getCharToProcess: - //SEG143 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + //SEG138 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG144 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG139 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 lda #0 sta closest_x - //SEG145 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 + //SEG140 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 lda #NOT_FOUND sta closest_dist+1 - //SEG146 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG141 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #0 sta y - //SEG147 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 + //SEG142 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 lda #SCREEN_COPY sta screen_line+1 jmp b1 - //SEG148 getCharToProcess::@1 + //SEG143 getCharToProcess::@1 b1: - //SEG149 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG144 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] b2_from_b1: - //SEG150 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG151 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG152 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG153 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 + //SEG145 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG146 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG147 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG148 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 lda #0 sta x jmp b2 - //SEG154 getCharToProcess::@2 + //SEG149 getCharToProcess::@2 b2: - //SEG155 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 + //SEG150 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 ldy x lda (screen_line),y cmp #' ' beq b11 jmp b4 - //SEG156 getCharToProcess::@4 + //SEG151 getCharToProcess::@4 b4: - //SEG157 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG152 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 lda x asl tax - //SEG158 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG153 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG159 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa + //SEG154 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa tay lda SQUARES_X,x clc @@ -6035,7 +6313,7 @@ getCharToProcess: { lda SQUARES_X+1,x adc SQUARES_Y+1,y sta dist+1 - //SEG160 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 + //SEG155 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 lda closest_dist+1 cmp dist+1 bne !+ @@ -6045,34 +6323,34 @@ getCharToProcess: { !: bcc b12 jmp b5 - //SEG161 getCharToProcess::@5 + //SEG156 getCharToProcess::@5 b5: - //SEG162 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 + //SEG157 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 lda x sta return_x - //SEG163 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG158 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y - //SEG164 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG159 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] b3_from_b11: b3_from_b12: b3_from_b5: - //SEG165 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG166 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG167 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG160 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG161 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG162 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy jmp b3 - //SEG168 getCharToProcess::@3 + //SEG163 getCharToProcess::@3 b3: - //SEG169 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 + //SEG164 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG170 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 + //SEG165 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b10 jmp b6 - //SEG171 getCharToProcess::@6 + //SEG166 getCharToProcess::@6 b6: - //SEG172 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG167 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc screen_line @@ -6080,16 +6358,16 @@ getCharToProcess: { bcc !+ inc screen_line+1 !: - //SEG173 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG168 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG174 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG169 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 jmp b7 - //SEG175 getCharToProcess::@7 + //SEG170 getCharToProcess::@7 b7: - //SEG176 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 + //SEG171 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 lda return_dist cmp #SCREEN_COPY sta _11+1 - //SEG183 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG178 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x sta (_11),y jmp breturn - //SEG184 getCharToProcess::@return + //SEG179 getCharToProcess::@return breturn: - //SEG185 [109] return + //SEG180 [109] return rts - //SEG186 getCharToProcess::@9 + //SEG181 getCharToProcess::@9 b9: - //SEG187 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG182 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist sta closest_dist lda return_dist+1 sta closest_dist+1 - //SEG188 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG183 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] b1_from_b9: - //SEG189 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG190 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG191 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG192 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG193 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG184 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG185 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG186 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG187 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG188 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy jmp b1 - //SEG194 getCharToProcess::@10 + //SEG189 getCharToProcess::@10 b10: - //SEG195 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG190 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist sta closest_dist lda return_dist+1 sta closest_dist+1 - //SEG196 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG191 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] b2_from_b10: - //SEG197 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG198 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG199 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG200 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG192 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG193 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG194 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG195 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG201 getCharToProcess::@12 + //SEG196 getCharToProcess::@12 b12: - //SEG202 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG197 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist lda closest_dist+1 sta return_dist+1 jmp b3_from_b12 - //SEG203 getCharToProcess::@11 + //SEG198 getCharToProcess::@11 b11: - //SEG204 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG199 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist lda closest_dist+1 sta return_dist+1 jmp b3_from_b11 } -//SEG205 initSquareTables +//SEG200 setupRasterIrq +// Setup Raster IRQ +setupRasterIrq: { + .label irqRoutine = irqTop + //SEG201 asm { sei } + sei + //SEG202 [115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG203 [116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG204 [117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + jmp b1 + //SEG205 setupRasterIrq::@1 + b1: + //SEG206 [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #$7f + and VIC_CONTROL + sta VIC_CONTROL + jmp b2 + //SEG207 setupRasterIrq::@2 + b2: + //SEG208 [119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + lda #RASTER_IRQ_TOP + sta RASTER + //SEG209 [120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG210 [121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irqRoutine + sta HARDWARE_IRQ+1 + //SEG211 asm { cli } + cli + jmp breturn + //SEG212 setupRasterIrq::@return + breturn: + //SEG213 [123] return + rts +} +//SEG214 initSprites +// Initialize sprites +initSprites: { + .label sp = $15 + //SEG215 [125] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + b1_from_initSprites: + //SEG216 [125] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + lda #SPRITE_DATA + sta sp+1 + jmp b1 + // Clear sprite data + //SEG217 [125] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + b1_from_b1: + //SEG218 [125] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + jmp b1 + //SEG219 initSprites::@1 + b1: + //SEG220 [126] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (sp),y + //SEG221 [127] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + inc sp + bne !+ + inc sp+1 + !: + //SEG222 [128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + lda sp+1 + cmp #>SPRITE_DATA+NUM_PROCESSING*$40 + bcc b1_from_b1 + bne !+ + lda sp + cmp #initSprites::@2] + b2_from_b1: + //SEG224 [129] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 + ldx #0 + jmp b2 + // Initialize sprite registers + //SEG225 [129] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + b2_from_b2: + //SEG226 [129] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + jmp b2 + //SEG227 initSprites::@2 + b2: + //SEG228 [130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #LIGHT_BLUE + sta SPRITES_COLS,x + //SEG229 [131] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG230 [132] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b2_from_b2 + jmp b3 + //SEG231 initSprites::@3 + b3: + //SEG232 [133] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_MC + //SEG233 [134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_EXPAND_X + //SEG234 [135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_EXPAND_Y + jmp breturn + //SEG235 initSprites::@return + breturn: + //SEG236 [136] return + rts +} +//SEG237 initSquareTables // initialize SQUARES table initSquareTables: { - .label _6 = $17 - .label _14 = $17 - .label x = $15 - .label y = $16 - //SEG206 [115] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] + .label _6 = $19 + .label _14 = $19 + .label x = $17 + .label y = $18 + //SEG238 [138] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] b1_from_initSquareTables: - //SEG207 [115] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 + //SEG239 [138] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 lda #0 sta x jmp b1 - //SEG208 [115] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] + //SEG240 [138] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] b1_from_b9: - //SEG209 [115] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy + //SEG241 [138] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy jmp b1 - //SEG210 initSquareTables::@1 + //SEG242 initSquareTables::@1 b1: - //SEG211 [116] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 + //SEG243 [139] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$14 bcc b2 jmp b3 - //SEG212 initSquareTables::@3 + //SEG244 initSquareTables::@3 b3: - //SEG213 [117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1 + //SEG245 [140] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1 lda x sec sbc #$14 - //SEG214 [118] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] + //SEG246 [141] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] b4_from_b2: b4_from_b3: - //SEG215 [118] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy + //SEG247 [141] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy jmp b4 - //SEG216 initSquareTables::@4 + //SEG248 initSquareTables::@4 b4: - //SEG217 [119] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa + //SEG249 [142] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa tax - //SEG218 [120] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 - //SEG219 [121] call mul8u - //SEG220 [144] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] + //SEG250 [143] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 + //SEG251 [144] call mul8u + //SEG252 [167] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] mul8u_from_b4: - //SEG221 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy - //SEG222 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa + //SEG253 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy + //SEG254 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG223 [122] (word) mul8u::return#2 ← (word) mul8u::res#2 + //SEG255 [145] (word) mul8u::return#2 ← (word) mul8u::res#2 jmp b9 - //SEG224 initSquareTables::@9 + //SEG256 initSquareTables::@9 b9: - //SEG225 [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 - //SEG226 [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG257 [146] (word~) initSquareTables::$6 ← (word) mul8u::return#2 + //SEG258 [147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG227 [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1 + //SEG259 [148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda _6 sta SQUARES_X,y lda _6+1 sta SQUARES_X+1,y - //SEG228 [126] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 + //SEG260 [149] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG229 [127] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [150] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b1_from_b9 - //SEG230 [128] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] + //SEG262 [151] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] b5_from_b9: - //SEG231 [128] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 + //SEG263 [151] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 lda #0 sta y jmp b5 - //SEG232 [128] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] + //SEG264 [151] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] b5_from_b10: - //SEG233 [128] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy + //SEG265 [151] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy jmp b5 - //SEG234 initSquareTables::@5 + //SEG266 initSquareTables::@5 b5: - //SEG235 [129] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 + //SEG267 [152] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 lda y cmp #$c bcc b6 jmp b7 - //SEG236 initSquareTables::@7 + //SEG268 initSquareTables::@7 b7: - //SEG237 [130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1 + //SEG269 [153] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1 lda y sec sbc #$c - //SEG238 [131] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] + //SEG270 [154] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] b8_from_b6: b8_from_b7: - //SEG239 [131] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy + //SEG271 [154] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy jmp b8 - //SEG240 initSquareTables::@8 + //SEG272 initSquareTables::@8 b8: - //SEG241 [132] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa + //SEG273 [155] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa tax - //SEG242 [133] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 - //SEG243 [134] call mul8u - //SEG244 [144] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] + //SEG274 [156] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 + //SEG275 [157] call mul8u + //SEG276 [167] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] mul8u_from_b8: - //SEG245 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy - //SEG246 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa + //SEG277 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy + //SEG278 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG247 [135] (word) mul8u::return#3 ← (word) mul8u::res#2 + //SEG279 [158] (word) mul8u::return#3 ← (word) mul8u::res#2 jmp b10 - //SEG248 initSquareTables::@10 + //SEG280 initSquareTables::@10 b10: - //SEG249 [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 - //SEG250 [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG281 [159] (word~) initSquareTables::$14 ← (word) mul8u::return#3 + //SEG282 [160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG251 [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1 + //SEG283 [161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda _14 sta SQUARES_Y,y lda _14+1 sta SQUARES_Y+1,y - //SEG252 [139] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 + //SEG284 [162] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 inc y - //SEG253 [140] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 + //SEG285 [163] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b5_from_b10 jmp breturn - //SEG254 initSquareTables::@return + //SEG286 initSquareTables::@return breturn: - //SEG255 [141] return + //SEG287 [164] return rts - //SEG256 initSquareTables::@6 + //SEG288 initSquareTables::@6 b6: - //SEG257 [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1 + //SEG289 [165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1 lda #$c sec sbc y jmp b8_from_b6 - //SEG258 initSquareTables::@2 + //SEG290 initSquareTables::@2 b2: - //SEG259 [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1 + //SEG291 [166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1 lda #$14 sec sbc x jmp b4_from_b2 } -//SEG260 mul8u +//SEG292 mul8u // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word // mul8u(byte register(X) a, byte register(A) b) mul8u: { - .label mb = $19 - .label res = $17 - .label return = $17 - //SEG261 [145] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] + .label mb = $1b + .label res = $19 + .label return = $19 + //SEG293 [168] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] b1_from_mul8u: - //SEG262 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy - //SEG263 [145] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 + //SEG294 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy + //SEG295 [168] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 lda #0 sta res lda #0 sta res+1 - //SEG264 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy + //SEG296 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy jmp b1 - //SEG265 mul8u::@1 + //SEG297 mul8u::@1 b1: - //SEG266 [146] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 + //SEG298 [169] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 cpx #0 bne b2 jmp breturn - //SEG267 mul8u::@return + //SEG299 mul8u::@return breturn: - //SEG268 [147] return + //SEG300 [170] return rts - //SEG269 mul8u::@2 + //SEG301 mul8u::@2 b2: - //SEG270 [148] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + //SEG302 [171] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 txa and #1 - //SEG271 [149] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 + //SEG303 [172] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3_from_b2 jmp b4 - //SEG272 mul8u::@4 + //SEG304 mul8u::@4 b4: - //SEG273 [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 + //SEG305 [173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 lda res clc adc mb @@ -6390,137 +6791,89 @@ mul8u: { lda res+1 adc mb+1 sta res+1 - //SEG274 [151] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] + //SEG306 [174] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] b3_from_b2: b3_from_b4: - //SEG275 [151] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy + //SEG307 [174] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy jmp b3 - //SEG276 mul8u::@3 + //SEG308 mul8u::@3 b3: - //SEG277 [152] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG309 [175] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG278 [153] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG310 [176] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl mb rol mb+1 - //SEG279 [145] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] + //SEG311 [168] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] b1_from_b3: - //SEG280 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy - //SEG281 [145] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy - //SEG282 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy + //SEG312 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy + //SEG313 [168] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy + //SEG314 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy jmp b1 } -//SEG283 setupRasterIrq -// Setup Raster IRQ -setupRasterIrq: { - .label irqRoutine = irqTop - //SEG284 asm { sei } - sei - //SEG285 [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 - // Disable kernal & basic - lda #PROCPORT_DDR_MEMORY_MASK - sta PROCPORT_DDR - //SEG286 [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 - lda #PROCPORT_RAM_IO - sta PROCPORT - //SEG287 [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 - // Disable CIA 1 Timer IRQ - lda #CIA_INTERRUPT_CLEAR - sta CIA1_INTERRUPT - jmp b1 - //SEG288 setupRasterIrq::@1 - b1: - //SEG289 [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 - lda #$7f - and VIC_CONTROL - sta VIC_CONTROL - jmp b2 - //SEG290 setupRasterIrq::@2 - b2: - //SEG291 [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 - lda #RASTER_IRQ_TOP - sta RASTER - //SEG292 [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 - // Enable Raster Interrupt - lda #IRQ_RASTER - sta IRQ_ENABLE - //SEG293 [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 - // Set the IRQ routine - lda #irqRoutine - sta HARDWARE_IRQ+1 - //SEG294 asm { cli } - cli - jmp breturn - //SEG295 setupRasterIrq::@return - breturn: - //SEG296 [163] return - rts -} -//SEG297 irqBottom +//SEG315 irqBottom // Raster Interrupt at the middle of the screen irqBottom: { - //SEG298 entry interrupt(HARDWARE_ALL) + //SEG316 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG299 [165] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG317 [178] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] b1_from_irqBottom: - //SEG300 [165] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1 + //SEG318 [178] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1 ldx #0 jmp b1 - //SEG301 [165] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] + //SEG319 [178] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] b1_from_b1: - //SEG302 [165] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy + //SEG320 [178] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy jmp b1 - //SEG303 irqBottom::@1 + //SEG321 irqBottom::@1 b1: - //SEG304 [166] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx + //SEG322 [179] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx inx - //SEG305 [167] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG323 [180] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b1_from_b1 jmp b2 - //SEG306 irqBottom::@2 + //SEG324 irqBottom::@2 b2: - //SEG307 [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG325 [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG308 [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG326 [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG309 [170] call processChars - //SEG310 [177] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] + //SEG327 [183] call processChars + //SEG328 [190] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] processChars_from_b2: jsr processChars jmp b3 - //SEG311 irqBottom::@3 + //SEG329 irqBottom::@3 b3: - //SEG312 [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG330 [184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG313 [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG331 [185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG314 [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG332 [186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the top of the screen lda #RASTER_IRQ_TOP sta RASTER - //SEG315 [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG333 [187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG316 [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG334 [188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG317 irqBottom::@return + //SEG335 irqBottom::@return breturn: - //SEG318 [176] return - exit interrupt(HARDWARE_ALL) + //SEG336 [189] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -6529,37 +6882,37 @@ irqBottom: { ldy #00 rti } -//SEG319 processChars +//SEG337 processChars // Process any chars in the PROCESSING array processChars: { - .label processing = $29 - .label bitmask = $2b - .label i = $1b - //SEG320 [178] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + .label processing = $2d + .label bitmask = $2f + .label i = $1d + //SEG338 [191] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] b1_from_processChars: - //SEG321 [178] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + //SEG339 [191] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta i jmp b1 - //SEG322 [178] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG340 [191] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] b1_from_b2: - //SEG323 [178] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG341 [191] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy jmp b1 - //SEG324 processChars::@1 + //SEG342 processChars::@1 b1: - //SEG325 [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG343 [192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda i asl asl asl - //SEG326 [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuaa + //SEG344 [193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 -- pssz1=pssc1_plus_vbuaa clc adc #PROCESSING adc #0 sta processing+1 - //SEG327 [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG345 [194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID lda (processing),y tax @@ -6572,23 +6925,23 @@ processChars: { bne !- !e: sta bitmask - //SEG328 [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG346 [195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE beq b2 - jmp b8 - //SEG329 processChars::@8 - b8: - //SEG330 [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + jmp b9 + //SEG347 processChars::@9 + b9: + //SEG348 [196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_NEW bne b3 - jmp b9 - //SEG331 processChars::@9 - b9: - //SEG332 [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + jmp b10 + //SEG349 processChars::@10 + b10: + //SEG350 [197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 // Clear the char on the screen ldx #' ' ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR @@ -6600,12 +6953,12 @@ processChars: { txa !: sta $ffff - //SEG333 [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG351 [198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 // Enable the sprite lda SPRITES_ENABLE ora bitmask sta SPRITES_ENABLE - //SEG334 [186] *((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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG352 [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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR lda (processing),y @@ -6615,47 +6968,78 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG335 [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG353 [200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y jmp b3 - //SEG336 processChars::@3 + //SEG354 processChars::@3 b3: - //SEG337 [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1 + //SEG355 [201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1 ldy #1 lda (processing),y - //SEG338 [189] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 + //SEG356 [202] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 // Set sprite position cmp #0 bne b4 - jmp b6 - //SEG339 processChars::@6 - b6: - //SEG340 [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + jmp b7 + //SEG357 processChars::@7 + b7: + //SEG358 [203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG341 [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB jmp b5 - //SEG342 processChars::@5 + //SEG360 processChars::@5 b5: - //SEG343 [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG361 [205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 lda i asl tax - //SEG344 [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1 + //SEG362 [206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1 ldy #0 lda (processing),y - //SEG345 [194] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG363 [207] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa sta SPRITES_XPOS,x - //SEG346 [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2 + //SEG364 [208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta SPRITES_YPOS,x - //SEG347 [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 + //SEG365 [209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6 -- _deref_pwuz1_eq_vwuc1_then_la1 + // Move sprite + ldy #0 + lda (processing),y + cmp #BORDER_XPOS_LEFT-8 + beq b6 + !: + jmp b11 + //SEG366 processChars::@11 + b11: + //SEG367 [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 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + cmp #BORDER_YPOS_TOP-8 + beq b6 + jmp b8 + //SEG368 processChars::@8 + b8: + //SEG369 [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) -- pbuz1_derefidx_vbuc1=_dec_pbuz1_derefidx_vbuc1 + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + sty $ff + sec + sbc #1 + ldy $ff + sta (processing),y + //SEG370 [212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 ldy #0 lda (processing),y sec @@ -6665,124 +7049,117 @@ processChars: { lda (processing),y sbc #0 sta (processing),y - //SEG348 [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1 - ldy #0 - lda (processing),y - bne b2 - iny - lda (processing),y - bne b2 - jmp b7 - //SEG349 processChars::@7 - b7: - //SEG350 [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 - // Set status - lda #STATUS_FREE - ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - sta (processing),y - //SEG351 [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 - lda #$ff - eor bitmask - //SEG352 [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa - // Disable the sprite - and SPRITES_ENABLE - sta SPRITES_ENABLE jmp b2 - //SEG353 processChars::@2 + //SEG371 processChars::@2 b2: - //SEG354 [201] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG372 [213] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG355 [202] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG373 [214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i bne b1_from_b2 jmp breturn - //SEG356 processChars::@return + //SEG374 processChars::@return breturn: - //SEG357 [203] return + //SEG375 [215] return rts - //SEG358 processChars::@4 + //SEG376 processChars::@6 + b6: + //SEG377 [216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 + // Set status to FREE + lda #STATUS_FREE + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + sta (processing),y + //SEG378 [217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + lda #$ff + eor bitmask + //SEG379 [218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // Disable the sprite + and SPRITES_ENABLE + sta SPRITES_ENABLE + jmp b2 + //SEG380 processChars::@4 b4: - //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG381 [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora bitmask sta SPRITES_XMSB jmp b5 } -//SEG360 irqTop +//SEG382 irqTop // Raster Interrupt at the top of the screen irqTop: { - //SEG361 entry interrupt(HARDWARE_ALL) + //SEG383 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG362 [206] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] + //SEG384 [221] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] b1_from_irqTop: - //SEG363 [206] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1 + //SEG385 [221] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1 ldx #0 jmp b1 - //SEG364 [206] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] + //SEG386 [221] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] b1_from_b1: - //SEG365 [206] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy + //SEG387 [221] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy jmp b1 - //SEG366 irqTop::@1 + //SEG388 irqTop::@1 b1: - //SEG367 [207] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx + //SEG389 [222] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx inx - //SEG368 [208] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG390 [223] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b1_from_b1 jmp b2 - //SEG369 irqTop::@2 + //SEG391 irqTop::@2 b2: - //SEG370 [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG392 [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG371 [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG393 [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BGCOL - //SEG372 [211] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] + //SEG394 [226] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] b3_from_b2: - //SEG373 [211] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1 + //SEG395 [226] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1 ldx #0 jmp b3 - //SEG374 [211] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] + //SEG396 [226] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] b3_from_b3: - //SEG375 [211] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy + //SEG397 [226] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy jmp b3 - //SEG376 irqTop::@3 + //SEG398 irqTop::@3 b3: - //SEG377 [212] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx + //SEG399 [227] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG378 [213] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG400 [228] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b3_from_b3 jmp b4 - //SEG379 irqTop::@4 + //SEG401 irqTop::@4 b4: - //SEG380 [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG402 [229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG381 [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG403 [230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG382 [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG404 [231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the middle of the screen lda #RASTER_IRQ_MIDDLE sta RASTER - //SEG383 [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG405 [232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG384 [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG406 [233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS jmp breturn - //SEG385 irqTop::@return + //SEG407 irqTop::@return breturn: - //SEG386 [219] return - exit interrupt(HARDWARE_ALL) + //SEG408 [234] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -6805,13 +7182,11 @@ Removing instruction jmp b1 Removing instruction jmp bend Removing instruction jmp b1 Removing instruction jmp b2 +Removing instruction jmp b7 Removing instruction jmp b3 Removing instruction jmp b4 -Removing instruction jmp b5 +Removing instruction jmp b8 Removing instruction jmp b6 -Removing instruction jmp b7 -Removing instruction jmp b10 -Removing instruction jmp b9 Removing instruction jmp b1 Removing instruction jmp b2 Removing instruction jmp b4 @@ -6830,6 +7205,13 @@ Removing instruction jmp b7 Removing instruction jmp b8 Removing instruction jmp breturn Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp breturn +Removing instruction jmp b1 Removing instruction jmp b3 Removing instruction jmp b4 Removing instruction jmp b9 @@ -6844,18 +7226,16 @@ Removing instruction jmp b4 Removing instruction jmp b3 Removing instruction jmp b1 Removing instruction jmp b2 -Removing instruction jmp breturn -Removing instruction jmp b1 -Removing instruction jmp b2 Removing instruction jmp b3 Removing instruction jmp breturn Removing instruction jmp b1 -Removing instruction jmp b8 Removing instruction jmp b9 +Removing instruction jmp b10 Removing instruction jmp b3 -Removing instruction jmp b6 -Removing instruction jmp b5 Removing instruction jmp b7 +Removing instruction jmp b5 +Removing instruction jmp b11 +Removing instruction jmp b8 Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp b1 @@ -6869,26 +7249,29 @@ Removing instruction lda #0 Removing instruction lda #0 Removing instruction lda #0 Removing instruction lda #>0 +Removing instruction ldy #0 +Removing instruction ldy #0 +Removing instruction lda #0 Replacing instruction ldy #0 with TAY Removing instruction lda #0 Removing instruction lda #0 -Removing instruction ldy #0 -Removing instruction lda #0 Removing instruction lda #0 Removing instruction lda #WHITE +Removing instruction ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y +Removing instruction ldy $ff Removing instruction lda #WHITE Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label b1_from_b1 with b1 -Replacing label b2_from_b2 with b2 -Replacing label b2_from_b2 with b2 Replacing label b3_from_b3 with b3 -Replacing label b5_from_b5 with b5 -Replacing label b5_from_b5 with b5 +Replacing label b3_from_b3 with b3 Replacing label b6_from_b6 with b6 Replacing label b2_from_b3 with b2 Replacing label b4_from_b9 with b4 Replacing label b3_from_b12 with b3 Replacing label b3_from_b11 with b3 +Replacing label b1_from_b1 with b1 +Replacing label b1_from_b1 with b1 +Replacing label b2_from_b2 with b2 Replacing label b1_from_b9 with b1 Replacing label b5_from_b10 with b5 Replacing label b8_from_b6 with b8 @@ -6903,13 +7286,12 @@ Removing instruction b1: Removing instruction main_from_b1: Removing instruction bend_from_b1: Removing instruction b1_from_b1: -Removing instruction b2_from_b2: +Removing instruction b2_from_b1: +Removing instruction initSprites_from_b2: +Removing instruction b7_from_b2: Removing instruction b3_from_b3: -Removing instruction b5_from_b5: -Removing instruction b6_from_b5: -Removing instruction initSquareTables_from_b6: -Removing instruction b7_from_b6: -Removing instruction getCharToProcess_from_b7: +Removing instruction b4_from_b3: +Removing instruction getCharToProcess_from_b4: Removing instruction b2_from_b1: Removing instruction b2_from_b3: Removing instruction b4_from_b2: @@ -6919,6 +7301,8 @@ Removing instruction b2_from_b1: Removing instruction b3_from_b11: Removing instruction b3_from_b12: Removing instruction b3_from_b5: +Removing instruction b1_from_b1: +Removing instruction b2_from_b2: Removing instruction b1_from_b9: Removing instruction b4_from_b2: Removing instruction b4_from_b3: @@ -6935,15 +7319,14 @@ Removing instruction b3_from_b3: Removing instruction breturn: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction bend: +Removing instruction initSquareTables_from_main: Removing instruction b1_from_main: -Removing instruction b2_from_b1: -Removing instruction b3_from_b2: -Removing instruction b4: -Removing instruction b5_from_b4: -Removing instruction b6: +Removing instruction b2: Removing instruction b7: -Removing instruction b10: -Removing instruction startProcessing_from_b8: +Removing instruction b3_from_b7: +Removing instruction b4: +Removing instruction b8: +Removing instruction startProcessing_from_b5: Removing instruction b1_from_startProcessing: Removing instruction b5: Removing instruction b6_from_b5: @@ -6959,6 +7342,13 @@ Removing instruction b7: Removing instruction b8: Removing instruction b1_from_b9: Removing instruction b2_from_b10: +Removing instruction b1: +Removing instruction b2: +Removing instruction breturn: +Removing instruction b1_from_initSprites: +Removing instruction b2_from_b1: +Removing instruction b3: +Removing instruction breturn: Removing instruction b1_from_initSquareTables: Removing instruction b3: Removing instruction mul8u_from_b4: @@ -6972,18 +7362,16 @@ Removing instruction b1_from_mul8u: Removing instruction breturn: Removing instruction b4: Removing instruction b1_from_b3: -Removing instruction b1: -Removing instruction b2: -Removing instruction breturn: Removing instruction b1_from_irqBottom: Removing instruction b2: Removing instruction processChars_from_b2: Removing instruction b3: Removing instruction b1_from_processChars: -Removing instruction b8: Removing instruction b9: -Removing instruction b6: +Removing instruction b10: Removing instruction b7: +Removing instruction b11: +Removing instruction b8: Removing instruction breturn: Removing instruction b1_from_irqTop: Removing instruction b2: @@ -6993,15 +7381,15 @@ Succesful ASM optimization Pass5UnusedLabelElimination Updating BasicUpstart to call main directly Removing instruction jsr main Succesful ASM optimization Pass5SkipBegin -Relabelling long label b7_from_b8 to b4 +Relabelling long label b4_from_b5 to b2 Succesful ASM optimization Pass5RelabelLongLabels Removing instruction jmp b1 -Removing instruction jmp b2 Removing instruction jmp b3 -Removing instruction jmp b5 Removing instruction jmp b2 Removing instruction jmp b6 Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b1 Removing instruction jmp b5 Removing instruction jmp b1 Removing instruction jmp b1 @@ -7013,17 +7401,18 @@ Removing instruction lda #$28 Removing instruction lda x Removing instruction lda y Removing instruction ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS +Removing instruction ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y Succesful ASM optimization Pass5UnnecesaryLoadElimination Removing instruction bbegin: Succesful ASM optimization Pass5UnusedLabelElimination -Fixing long branch [341] bne b2 to beq -Fixing long branch [774] bne b1 to beq -Fixing long branch [203] bne b3 to beq -Fixing long branch [209] beq b8 to bne -Fixing long branch [389] beq b11 to bne -Fixing long branch [410] beq b12 to bne -Fixing long branch [414] bcc b12 to bcs -Fixing long branch [704] beq b2 to bne +Fixing long branch [344] bne b2 to beq +Fixing long branch [819] bne b1 to beq +Fixing long branch [178] bne b3 to beq +Fixing long branch [184] beq b8 to bne +Fixing long branch [392] beq b11 to bne +Fixing long branch [413] beq b12 to bne +Fixing long branch [417] bcc b12 to bcs +Fixing long branch [745] beq b2 to bne FINAL SYMBOL TABLE (label) @1 @@ -7035,6 +7424,12 @@ FINAL SYMBOL TABLE (const byte) BLUE#0 BLUE = (byte) 6 (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 +(byte) BORDER_XPOS_LEFT +(const byte) BORDER_XPOS_LEFT#0 BORDER_XPOS_LEFT = (byte) $18 +(byte) BORDER_YPOS_TOP +(const byte) BORDER_YPOS_TOP#0 BORDER_YPOS_TOP = (byte) $32 +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248 (byte*) CIA1_INTERRUPT (const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333 (byte) CIA_INTERRUPT_CLEAR @@ -7066,6 +7461,8 @@ FINAL SYMBOL TABLE (const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0 (byte) PROCPORT_DDR_MEMORY_MASK (const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) $31 (byte) PROCPORT_RAM_IO (const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35 (word) ProcessingChar::dist @@ -7122,13 +7519,13 @@ FINAL SYMBOL TABLE (byte) WHITE (const byte) WHITE#0 WHITE = (byte) 1 (struct ProcessingChar()) getCharToProcess() -(word~) getCharToProcess::$10 $10 zp ZP_WORD:37 4.0 -(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:37 4.0 +(word~) getCharToProcess::$10 $10 zp ZP_WORD:41 4.0 +(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:41 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:39 4.0 -(word) getCharToProcess::$16 $16 zp ZP_WORD:37 4.0 -(word~) getCharToProcess::$9 $9 zp ZP_WORD:37 3.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 (label) getCharToProcess::@1 (label) getCharToProcess::@10 (label) getCharToProcess::@11 @@ -7163,11 +7560,11 @@ FINAL SYMBOL TABLE (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 x 7.333333333333333 +(byte) getCharToProcess::return_x#0 reg byte y 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 y 7.333333333333333 +(byte) getCharToProcess::return_y#0 reg byte x 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 @@ -7179,15 +7576,26 @@ FINAL SYMBOL TABLE (byte) getCharToProcess::y (byte) getCharToProcess::y#1 y zp ZP_BYTE:13 101.0 (byte) getCharToProcess::y#7 y zp ZP_BYTE:13 137.75 +(void()) initSprites() +(label) initSprites::@1 +(label) initSprites::@2 +(label) initSprites::@3 +(label) initSprites::@return +(byte) initSprites::i +(byte) initSprites::i#1 reg byte x 16.5 +(byte) initSprites::i#2 reg byte x 16.5 +(byte*) initSprites::sp +(byte*) initSprites::sp#1 sp zp ZP_WORD:21 16.5 +(byte*) initSprites::sp#2 sp zp ZP_WORD:21 16.5 (void()) initSquareTables() (byte~) initSquareTables::$10 reg byte a 22.0 (byte~) initSquareTables::$12 reg byte a 22.0 -(word~) initSquareTables::$14 $14 zp ZP_WORD:23 11.0 +(word~) initSquareTables::$14 $14 zp ZP_WORD:25 11.0 (byte~) initSquareTables::$16 reg byte a 22.0 (byte~) initSquareTables::$17 reg byte a 22.0 (byte~) initSquareTables::$2 reg byte a 22.0 (byte~) initSquareTables::$4 reg byte a 22.0 -(word~) initSquareTables::$6 $6 zp ZP_WORD:23 11.0 +(word~) initSquareTables::$6 $6 zp ZP_WORD:25 11.0 (label) initSquareTables::@1 (label) initSquareTables::@10 (label) initSquareTables::@2 @@ -7200,13 +7608,13 @@ FINAL SYMBOL TABLE (label) initSquareTables::@9 (label) initSquareTables::@return (byte) initSquareTables::x -(byte) initSquareTables::x#1 x zp ZP_BYTE:21 16.5 -(byte) initSquareTables::x#2 x zp ZP_BYTE:21 5.5 +(byte) initSquareTables::x#1 x zp ZP_BYTE:23 16.5 +(byte) initSquareTables::x#2 x zp ZP_BYTE:23 5.5 (byte) initSquareTables::x_dist (byte) initSquareTables::x_dist#0 reg byte a 22.0 (byte) initSquareTables::y -(byte) initSquareTables::y#1 y zp ZP_BYTE:22 16.5 -(byte) initSquareTables::y#2 y zp ZP_BYTE:22 5.5 +(byte) initSquareTables::y#1 y zp ZP_BYTE:24 16.5 +(byte) initSquareTables::y#2 y zp ZP_BYTE:24 5.5 (byte) initSquareTables::y_dist (byte) initSquareTables::y_dist#0 reg byte a 22.0 interrupt(HARDWARE_ALL)(void()) irqBottom() @@ -7230,10 +7638,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) irqTop::i1#1 reg byte x 16.5 (byte) irqTop::i1#2 reg byte x 22.0 (void()) main() -(struct ProcessingChar~) main::$11 -(byte~) main::$18 reg byte x 12.833333333333334 +(byte~) main::$15 reg byte x 12.833333333333334 +(struct ProcessingChar~) main::$8 (label) main::@1 -(label) main::@10 (label) main::@2 (label) main::@3 (label) main::@4 @@ -7241,29 +7648,22 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (label) main::@6 (label) main::@7 (label) main::@8 -(label) main::@9 (struct ProcessingChar) main::center (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 x 5.5 +(byte) main::center_x#0 reg byte y 5.5 (byte) main::center_y -(byte) main::center_y#0 reg byte y 5.5 +(byte) main::center_y#0 reg byte x 5.5 (byte*) main::dst -(byte*) main::dst#1 dst zp ZP_WORD:6 11.0 -(byte*) main::dst#2 dst zp ZP_WORD:6 11.0 +(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::i1 -(byte) main::i1#1 reg byte x 16.5 -(byte) main::i1#2 reg byte x 16.5 -(byte*) main::sp -(byte*) main::sp#1 sp zp ZP_WORD:2 16.5 -(byte*) main::sp#2 sp zp ZP_WORD:2 16.5 (byte*) main::src -(byte*) main::src#1 src zp ZP_WORD:4 11.0 -(byte*) main::src#2 src zp ZP_WORD:4 16.5 +(byte*) main::src#1 src zp ZP_WORD:2 11.0 +(byte*) main::src#2 src zp ZP_WORD:2 16.5 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (byte~) mul8u::$1 reg byte a 202.0 (label) mul8u::@1 @@ -7281,24 +7681,26 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) mul8u::b#0 reg byte a 22.0 (byte) mul8u::b#1 reg byte a 22.0 (word) mul8u::mb -(word) mul8u::mb#0 mb zp ZP_WORD:25 24.0 -(word) mul8u::mb#1 mb zp ZP_WORD:25 202.0 -(word) mul8u::mb#2 mb zp ZP_WORD:25 43.57142857142858 +(word) mul8u::mb#0 mb zp ZP_WORD:27 24.0 +(word) mul8u::mb#1 mb zp ZP_WORD:27 202.0 +(word) mul8u::mb#2 mb zp ZP_WORD:27 43.57142857142858 (word) mul8u::res -(word) mul8u::res#1 res zp ZP_WORD:23 202.0 -(word) mul8u::res#2 res zp ZP_WORD:23 46.42857142857143 -(word) mul8u::res#6 res zp ZP_WORD:23 101.0 +(word) mul8u::res#1 res zp ZP_WORD:25 202.0 +(word) mul8u::res#2 res zp ZP_WORD:25 46.42857142857143 +(word) mul8u::res#6 res zp ZP_WORD:25 101.0 (word) mul8u::return -(word) mul8u::return#2 return zp ZP_WORD:23 22.0 -(word) mul8u::return#3 return zp ZP_WORD:23 22.0 +(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::$12 reg byte a 22.0 (byte~) processChars::$13 reg byte x 11.0 -(byte~) processChars::$16 reg byte a 22.0 -(byte~) processChars::$18 reg byte a 22.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 (label) processChars::@1 +(label) processChars::@10 +(label) processChars::@11 (label) processChars::@2 (label) processChars::@3 (label) processChars::@4 @@ -7309,12 +7711,12 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (label) processChars::@9 (label) processChars::@return (byte) processChars::bitmask -(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:43 2.8947368421052633 +(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:47 2.8947368421052633 (byte) processChars::i -(byte) processChars::i#1 i zp ZP_BYTE:27 16.5 -(byte) processChars::i#10 i zp ZP_BYTE:27 1.8333333333333333 +(byte) processChars::i#1 i zp ZP_BYTE:29 16.5 +(byte) processChars::i#10 i zp ZP_BYTE:29 1.6923076923076923 (struct ProcessingSprite*) processChars::processing -(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:41 0.5789473684210527 +(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:45 0.55 (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (label) setupRasterIrq::@1 (label) setupRasterIrq::@2 @@ -7323,18 +7725,20 @@ 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:9 4.0 -(word~) startProcessing::$1 $1 zp ZP_WORD:9 4.0 -(word~) startProcessing::$11 $11 zp ZP_WORD:33 3.0 -(word~) startProcessing::$12 $12 zp ZP_WORD:33 4.0 -(byte*~) startProcessing::$13 $13 zp ZP_WORD:33 4.0 -(byte~) startProcessing::$21 reg byte a 2002.0 -(byte~) startProcessing::$22 reg byte x 2.333333333333333 -(word~) startProcessing::$3 $3 zp ZP_WORD:30 4.0 -(word) startProcessing::$30 $30 zp ZP_WORD:35 4.0 -(word) startProcessing::$31 $31 zp ZP_WORD:33 4.0 -(word~) startProcessing::$4 $4 zp ZP_WORD:30 4.0 -(byte~) startProcessing::$6 reg byte a 4.0 +(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::$4 $4 zp ZP_WORD:9 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 (label) startProcessing::@1 (label) startProcessing::@2 (label) startProcessing::@3 @@ -7348,42 +7752,47 @@ 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:28 0.40625 +(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:30 0.41666666666666674 (byte) startProcessing::center_y -(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:29 0.5 +(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:31 0.34210526315789475 +(byte) startProcessing::ch +(byte) startProcessing::ch#0 reg byte a 2.0 +(byte*) startProcessing::chargenData +(byte*) startProcessing::chargenData#0 chargenData zp ZP_WORD:7 1.3333333333333333 +(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:8 52.39999999999999 +(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:6 38.52941176470589 (byte) startProcessing::freeIdx#6 reg byte x 33.666666666666664 (byte~) startProcessing::freeIdx#7 reg byte x 202.0 -(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:8 202.0 +(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:6 202.0 (byte) startProcessing::i -(byte) startProcessing::i#1 i zp ZP_BYTE:8 1501.5 -(byte) startProcessing::i#2 i zp ZP_BYTE:8 1334.6666666666667 +(byte) startProcessing::i#1 i zp ZP_BYTE:6 1501.5 +(byte) startProcessing::i#2 i zp ZP_BYTE:6 1334.6666666666667 (byte) startProcessing::i1 (byte) startProcessing::i1#1 reg byte x 151.5 -(byte) startProcessing::i1#2 reg byte x 67.33333333333333 +(byte) startProcessing::i1#2 reg byte x 50.5 (byte*) startProcessing::screenPtr -(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:33 0.5714285714285714 +(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:36 0.13333333333333333 (byte*) startProcessing::spriteData -(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:9 4.0 -(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:9 67.33333333333333 +(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:32 0.36363636363636365 +(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:40 0.8 (word) startProcessing::spriteX -(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:30 0.36363636363636365 +(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:38 0.8 (byte) startProcessing::spriteY -(byte) startProcessing::spriteY#0 reg byte y 0.4 +(byte) startProcessing::spriteY#0 reg byte y 1.0 reg byte y [ main::i#2 main::i#1 ] -zp ZP_WORD:2 [ main::sp#2 main::sp#1 ] -reg byte x [ main::i1#2 main::i1#1 ] -zp ZP_WORD:4 [ main::src#2 main::src#1 ] -zp ZP_WORD:6 [ main::dst#2 main::dst#1 ] +zp ZP_WORD:2 [ main::src#2 main::src#1 ] +zp ZP_WORD:4 [ main::dst#2 main::dst#1 ] reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] -zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 startProcessing::$0 ] +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 ] +zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$5 startProcessing::$4 ] reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ] @@ -7392,53 +7801,57 @@ zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist# zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ] -zp ZP_BYTE:21 [ initSquareTables::x#2 initSquareTables::x#1 ] +zp ZP_WORD:21 [ initSprites::sp#2 initSprites::sp#1 ] +reg byte x [ initSprites::i#2 initSprites::i#1 ] +zp ZP_BYTE:23 [ initSquareTables::x#2 initSquareTables::x#1 ] reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] -zp ZP_BYTE:22 [ initSquareTables::y#2 initSquareTables::y#1 ] +zp ZP_BYTE:24 [ initSquareTables::y#2 initSquareTables::y#1 ] reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] reg byte a [ mul8u::b#1 ] reg byte a [ mul8u::b#0 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] -zp ZP_WORD:23 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] -zp ZP_WORD:25 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] +zp ZP_WORD:25 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] +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:27 [ processChars::i#10 processChars::i#1 ] +zp ZP_BYTE:29 [ processChars::i#10 processChars::i#1 ] reg byte x [ irqTop::i#2 irqTop::i#1 ] reg byte x [ irqTop::i1#2 irqTop::i1#1 ] -reg byte x [ main::$18 ] -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:28 [ startProcessing::center_x#0 ] -zp ZP_BYTE:29 [ startProcessing::center_y#0 ] -reg byte a [ startProcessing::$21 ] -zp ZP_WORD:30 [ startProcessing::$3 startProcessing::$4 startProcessing::spriteX#0 ] -reg byte a [ startProcessing::$6 ] +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 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:32 [ startProcessing::spritePtr#0 ] -zp ZP_WORD:33 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 startProcessing::screenPtr#0 ] -zp ZP_WORD:35 [ startProcessing::$30 ] -reg byte x [ startProcessing::$22 ] +zp ZP_BYTE:40 [ startProcessing::spritePtr#0 ] +reg byte x [ startProcessing::$25 ] reg byte x [ getCharToProcess::$13 ] reg byte a [ getCharToProcess::$14 ] -zp ZP_WORD:37 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] -zp ZP_WORD:39 [ getCharToProcess::$15 ] +zp ZP_WORD:41 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] +zp ZP_WORD:43 [ getCharToProcess::$15 ] reg byte a [ initSquareTables::$16 ] reg byte a [ initSquareTables::$17 ] reg byte a [ mul8u::$1 ] -reg byte a [ processChars::$18 ] -zp ZP_WORD:41 [ processChars::processing#0 ] -zp ZP_BYTE:43 [ processChars::bitmask#0 ] +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::$12 ] -reg byte a [ processChars::$16 ] +reg byte a [ processChars::$19 ] FINAL ASSEMBLER -Score: 226320 +Score: 228388 //SEG0 File Comments // Black Hole at the center of the BASIC screen sucking in letters @@ -7460,6 +7873,13 @@ Score: 226320 .label PROCPORT = 1 // RAM in $A000, $E000 I/O in $D000 .const PROCPORT_RAM_IO = $35 + // RAM in $A000, $E000 CHAR ROM in $D000 + .const PROCPORT_RAM_CHARROM = $31 + // The address of the CHARGEN character set + .label CHARGEN = $d000 + // Positions of the border (in sprite positions) + .const BORDER_XPOS_LEFT = $18 + .const BORDER_YPOS_TOP = $32 // The offset of the sprite pointers from the screen start address .const SPRITE_PTRS = $3f8 .label SPRITES_XPOS = $d000 @@ -7512,261 +7932,258 @@ Score: 226320 //SEG9 @end //SEG10 main main: { - .label sp = 2 - .label src = 4 - .label dst = 6 + .label src = 2 + .label dst = 4 .label center_dist = $13 - //SEG11 [5] phi from main to main::@1 [phi:main->main::@1] - //SEG12 [5] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 + //SEG11 [5] call initSquareTables + //SEG12 [137] phi from main to initSquareTables [phi:main->initSquareTables] + jsr initSquareTables + //SEG13 [6] phi from main to main::@1 [phi:main->main::@1] + //SEG14 [6] phi (byte) main::i#2 = (byte) 0 [phi:main->main::@1#0] -- vbuyy=vbuc1 ldy #0 // Init processing array - //SEG13 [5] phi from main::@1 to main::@1 [phi:main::@1->main::@1] - //SEG14 [5] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy - //SEG15 main::@1 + //SEG15 [6] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG16 [6] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG17 main::@1 b1: - //SEG16 [6] (byte~) main::$18 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3 + //SEG18 [7] (byte~) main::$15 ← (byte) main::i#2 << (byte) 3 -- vbuxx=vbuyy_rol_3 tya asl asl asl tax - //SEG17 [7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$18) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 + //SEG19 [8] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$15) ← (byte) 0 -- pwuc1_derefidx_vbuxx=vbuc2 lda #0 sta PROCESSING,x sta PROCESSING+1,x - //SEG18 [8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG20 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x - //SEG19 [9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG21 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG20 [10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$18) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG22 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$15) ← (byte) 0 -- pbuc1_derefidx_vbuxx=vbuc2 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG21 [11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$18) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG23 [12] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$15) ← (const byte) STATUS_FREE#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_FREE sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG22 [12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$18) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 + //SEG24 [13] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$15) ← (byte*) 0 -- pptc1_derefidx_vbuxx=pbuc2 lda #<0 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x - //SEG23 [13] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy + //SEG25 [14] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuyy=_inc_vbuyy iny - //SEG24 [14] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 + //SEG26 [15] if((byte) main::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto main::@1 -- vbuyy_neq_vbuc1_then_la1 cpy #NUM_PROCESSING-1+1 bne b1 - //SEG25 [15] phi from main::@1 to main::@2 [phi:main::@1->main::@2] - //SEG26 [15] phi (byte*) main::sp#2 = (const byte*) SPRITE_DATA#0 [phi:main::@1->main::@2#0] -- pbuz1=pbuc1 - lda #SPRITE_DATA - sta sp+1 - // Clear sprites - //SEG27 [15] phi from main::@2 to main::@2 [phi:main::@2->main::@2] - //SEG28 [15] phi (byte*) main::sp#2 = (byte*) main::sp#1 [phi:main::@2->main::@2#0] -- register_copy - //SEG29 main::@2 - b2: - //SEG30 [16] *((byte*) main::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 - lda #0 - tay - sta (sp),y - //SEG31 [17] (byte*) main::sp#1 ← ++ (byte*) main::sp#2 -- pbuz1=_inc_pbuz1 - inc sp - bne !+ - inc sp+1 - !: - //SEG32 [18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2 -- pbuz1_lt_pbuc1_then_la1 - lda sp+1 - cmp #>SPRITE_DATA+NUM_PROCESSING*$40 - bcc b2 - bne !+ - lda sp - cmp #main::@3] - //SEG34 [19] phi (byte) main::i1#2 = (byte) 0 [phi:main::@2->main::@3#0] -- vbuxx=vbuc1 - ldx #0 - // Initialize sprites - //SEG35 [19] phi from main::@3 to main::@3 [phi:main::@3->main::@3] - //SEG36 [19] phi (byte) main::i1#2 = (byte) main::i1#1 [phi:main::@3->main::@3#0] -- register_copy - //SEG37 main::@3 - b3: - //SEG38 [20] *((const byte*) SPRITES_COLS#0 + (byte) main::i1#2) ← (const byte) WHITE#0 -- pbuc1_derefidx_vbuxx=vbuc2 - lda #WHITE - sta SPRITES_COLS,x - //SEG39 [21] (byte) main::i1#1 ← ++ (byte) main::i1#2 -- vbuxx=_inc_vbuxx - inx - //SEG40 [22] if((byte) main::i1#1!=(byte) 8) goto main::@3 -- vbuxx_neq_vbuc1_then_la1 - cpx #8 - bne b3 - //SEG41 main::@4 - //SEG42 [23] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta SPRITES_MC - //SEG43 [24] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - sta SPRITES_EXPAND_X - //SEG44 [25] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 - sta SPRITES_EXPAND_Y - //SEG45 [26] call setupRasterIrq + //SEG27 [16] phi from main::@1 to main::@2 [phi:main::@1->main::@2] + //SEG28 main::@2 + //SEG29 [17] call initSprites + //SEG30 [124] phi from main::@2 to initSprites [phi:main::@2->initSprites] + jsr initSprites + //SEG31 [18] phi from main::@2 to main::@7 [phi:main::@2->main::@7] + //SEG32 main::@7 + //SEG33 [19] call setupRasterIrq jsr setupRasterIrq - //SEG46 [27] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - //SEG47 [27] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@4->main::@5#0] -- pbuz1=pbuc1 + //SEG34 [20] phi from main::@7 to main::@3 [phi:main::@7->main::@3] + //SEG35 [20] phi (byte*) main::dst#2 = (const byte[$3e8]) SCREEN_COPY#0 [phi:main::@7->main::@3#0] -- pbuz1=pbuc1 lda #SCREEN_COPY sta dst+1 - //SEG48 [27] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@4->main::@5#1] -- pbuz1=pbuc1 + //SEG36 [20] phi (byte*) main::src#2 = (const byte*) SCREEN#0 [phi:main::@7->main::@3#1] -- pbuz1=pbuc1 lda #SCREEN sta src+1 - // Fill screen with some chars - //for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(main::@5] - //SEG50 [27] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@5->main::@5#0] -- register_copy - //SEG51 [27] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@5->main::@5#1] -- register_copy - //SEG52 main::@5 - b5: - //SEG53 [28] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 + //SEG37 [20] phi from main::@3 to main::@3 [phi:main::@3->main::@3] + //SEG38 [20] phi (byte*) main::dst#2 = (byte*) main::dst#1 [phi:main::@3->main::@3#0] -- register_copy + //SEG39 [20] phi (byte*) main::src#2 = (byte*) main::src#1 [phi:main::@3->main::@3#1] -- register_copy + //SEG40 main::@3 + b3: + //SEG41 [21] *((byte*) main::dst#2) ← *((byte*) main::src#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 lda (src),y sta (dst),y - //SEG54 [29] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 + //SEG42 [22] (byte*) main::src#1 ← ++ (byte*) main::src#2 -- pbuz1=_inc_pbuz1 inc src bne !+ inc src+1 !: - //SEG55 [30] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 + //SEG43 [23] (byte*) main::dst#1 ← ++ (byte*) main::dst#2 -- pbuz1=_inc_pbuz1 inc dst bne !+ inc dst+1 !: - //SEG56 [31] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@5 -- pbuz1_neq_pbuc1_then_la1 + //SEG44 [24] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto main::@3 -- pbuz1_neq_pbuc1_then_la1 lda src+1 cmp #>SCREEN+$3e8 - bne b5 + bne b3 lda src cmp #main::@6] - //SEG58 main::@6 - //SEG59 [33] call initSquareTables - //SEG60 [114] phi from main::@6 to initSquareTables [phi:main::@6->initSquareTables] - jsr initSquareTables - //SEG61 [34] phi from main::@6 main::@8 to main::@7 [phi:main::@6/main::@8->main::@7] - b4: + bne b3 + //SEG45 [25] phi from main::@3 main::@5 to main::@4 [phi:main::@3/main::@5->main::@4] + b2: // Main loop - //SEG62 main::@7 - //SEG63 [35] call getCharToProcess - //SEG64 [86] phi from main::@7 to getCharToProcess [phi:main::@7->getCharToProcess] + //SEG46 main::@4 + //SEG47 [26] call getCharToProcess + //SEG48 [86] phi from main::@4 to getCharToProcess [phi:main::@4->getCharToProcess] jsr getCharToProcess - //SEG65 [36] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuxx=vbuz1 - ldx getCharToProcess.return_x - //SEG66 [37] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuyy=vbuz1 - ldy getCharToProcess.return_y - //SEG67 [38] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 - //SEG68 main::@10 - //SEG69 [39] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 - //SEG70 [40] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 - //SEG71 [41] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 - //SEG72 [42] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@8 -- vwuz1_neq_vwuc1_then_la1 + //SEG49 [27] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1 -- vbuyy=vbuz1 + ldy getCharToProcess.return_x + //SEG50 [28] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1 -- vbuxx=vbuz1 + ldx getCharToProcess.return_y + //SEG51 [29] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1 + //SEG52 main::@8 + //SEG53 [30] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0 + //SEG54 [31] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0 + //SEG55 [32] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0 + //SEG56 [33] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@5 -- vwuz1_neq_vwuc1_then_la1 lda center_dist+1 cmp #>NOT_FOUND - bne b8 + bne b5 lda center_dist cmp #startProcessing] + jmp b6 + //SEG59 main::@5 + b5: + //SEG60 [35] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0 -- vbuz1=vbuyy + sty startProcessing.center_x + //SEG61 [36] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0 -- vbuz1=vbuxx + stx startProcessing.center_y + //SEG62 [37] call startProcessing + //SEG63 [38] phi from main::@5 to startProcessing [phi:main::@5->startProcessing] jsr startProcessing - jmp b4 + jmp b2 } -//SEG80 startProcessing +//SEG64 startProcessing // Start processing a char - by inserting it into the PROCESSING array -// startProcessing(byte zeropage($1c) center_x, byte zeropage($1d) center_y) +// startProcessing(byte zeropage($1e) center_x, byte zeropage($1f) center_y) startProcessing: { - .label _0 = 9 - .label _1 = 9 - .label _3 = $1e - .label _4 = $1e - .label _11 = $21 - .label _12 = $21 - .label _13 = $21 - .label center_x = $1c - .label center_y = $1d - .label i = 8 + .label _0 = $20 + .label _1 = $20 + .label _2 = $20 + .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 i = 6 + .label screenPtr = $24 .label spriteData = 9 - .label spriteX = $1e - .label spritePtr = $20 - .label screenPtr = $21 - .label freeIdx = 8 - .label _30 = $23 - .label _31 = $21 - //SEG81 [48] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] - //SEG82 [48] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 + .label chargenData = 7 + .label spriteX = $26 + .label spritePtr = $28 + .label freeIdx = 6 + .label _33 = $22 + .label _34 = $20 + //SEG65 [39] phi from startProcessing to startProcessing::@1 [phi:startProcessing->startProcessing::@1] + //SEG66 [39] phi (byte) startProcessing::freeIdx#6 = (byte) $ff [phi:startProcessing->startProcessing::@1#0] -- vbuxx=vbuc1 ldx #$ff - //SEG83 startProcessing::@1 + //SEG67 startProcessing::@1 b1: - //SEG84 [49] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] - //SEG85 [49] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 + //SEG68 [40] phi from startProcessing::@1 to startProcessing::@2 [phi:startProcessing::@1->startProcessing::@2] + //SEG69 [40] phi (byte) startProcessing::i#2 = (byte) 0 [phi:startProcessing::@1->startProcessing::@2#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG86 [49] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] - //SEG87 [49] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy - //SEG88 startProcessing::@2 + //SEG70 [40] phi from startProcessing::@3 to startProcessing::@2 [phi:startProcessing::@3->startProcessing::@2] + //SEG71 [40] phi (byte) startProcessing::i#2 = (byte) startProcessing::i#1 [phi:startProcessing::@3->startProcessing::@2#0] -- register_copy + //SEG72 startProcessing::@2 b2: - //SEG89 [50] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG73 [41] (byte~) startProcessing::$24 ← (byte) startProcessing::i#2 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda i asl asl asl - //SEG90 [51] if(*((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$21)!=(const byte) STATUS_FREE#0) goto startProcessing::@3 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 + //SEG74 [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 -- pbuc1_derefidx_vbuaa_neq_vbuc2_then_la1 tay lda #STATUS_FREE cmp PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,y beq !b3+ jmp b3 !b3: - //SEG91 [52] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] - //SEG92 [52] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy - //SEG93 startProcessing::@4 + //SEG75 [43] phi from startProcessing::@2 startProcessing::@9 to startProcessing::@4 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4] + //SEG76 [43] phi (byte) startProcessing::freeIdx#2 = (byte) startProcessing::i#2 [phi:startProcessing::@2/startProcessing::@9->startProcessing::@4#0] -- register_copy + //SEG77 startProcessing::@4 b4: - //SEG94 [53] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 + //SEG78 [44] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8 -- vbuz1_eq_vbuc1_then_la1 lda #$ff cmp freeIdx bne !b8+ jmp b8 !b8: - //SEG95 startProcessing::@5 - //SEG96 [54] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 - lda freeIdx + //SEG79 startProcessing::@5 + //SEG80 [45] (word~) startProcessing::$0 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 + lda center_y sta _0 lda #0 sta _0+1 - //SEG97 [55] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6 -- vwuz1=vwuz1_rol_6 + //SEG81 [46] (word) startProcessing::$33 ← (word~) startProcessing::$0 << (byte) 2 -- vwuz1=vwuz2_rol_2 + lda _0 + asl + sta _33 + lda _0+1 + rol + sta _33+1 + asl _33 + rol _33+1 + //SEG82 [47] (word) startProcessing::$34 ← (word) startProcessing::$33 + (word~) startProcessing::$0 -- vwuz1=vwuz2_plus_vwuz1 + lda _34 + clc + adc _33 + sta _34 + lda _34+1 + adc _33+1 + sta _34+1 + //SEG83 [48] (word~) startProcessing::$1 ← (word) startProcessing::$34 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _1 rol _1+1 asl _1 rol _1+1 asl _1 rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - asl _1 - rol _1+1 - //SEG98 [56] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1 + //SEG84 [49] (byte*~) startProcessing::$2 ← (const byte*) SCREEN#0 + (word~) startProcessing::$1 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda _2 + adc #SCREEN + sta _2+1 + //SEG85 [50] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz2_plus_vbuz3 + lda center_x + clc + adc _2 + sta screenPtr + lda #0 + adc _2+1 + sta screenPtr+1 + //SEG86 [51] (word~) startProcessing::$4 ← (word)(byte) startProcessing::freeIdx#2 -- vwuz1=_word_vbuz2 + lda freeIdx + sta _4 + lda #0 + sta _4+1 + //SEG87 [52] (word~) startProcessing::$5 ← (word~) startProcessing::$4 << (byte) 6 -- vwuz1=vwuz1_rol_6 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + asl _5 + rol _5+1 + //SEG88 [53] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$5 -- pbuz1=pbuc1_plus_vwuz1 clc lda spriteData adc #SPRITE_DATA sta spriteData+1 - //SEG99 [57] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] - //SEG100 [57] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 + //SEG89 [54] (byte) startProcessing::ch#0 ← *((byte*~) startProcessing::$2 + (byte) startProcessing::center_x#0) -- vbuaa=pbuz1_derefidx_vbuz2 + ldy center_x + lda (_2),y + //SEG90 [55] (word~) startProcessing::$7 ← (word)(byte) startProcessing::ch#0 -- vwuz1=_word_vbuaa + sta _7 + lda #0 + sta _7+1 + //SEG91 [56] (word~) startProcessing::$8 ← (word~) startProcessing::$7 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + asl _8 + rol _8+1 + //SEG92 [57] (byte*) startProcessing::chargenData#0 ← (const byte*) CHARGEN#0 + (word~) startProcessing::$8 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda chargenData + adc #CHARGEN + sta chargenData+1 + //SEG93 asm { sei } + sei + //SEG94 [59] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG95 [60] phi from startProcessing::@5 to startProcessing::@6 [phi:startProcessing::@5->startProcessing::@6] + //SEG96 [60] phi (byte) startProcessing::i1#2 = (byte) 0 [phi:startProcessing::@5->startProcessing::@6#0] -- vbuxx=vbuc1 ldx #0 - //SEG101 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy - //SEG102 [57] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] - //SEG103 [57] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy - //SEG104 [57] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy - //SEG105 startProcessing::@6 + //SEG97 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#0 [phi:startProcessing::@5->startProcessing::@6#1] -- register_copy + //SEG98 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#0 [phi:startProcessing::@5->startProcessing::@6#2] -- register_copy + //SEG99 [60] phi from startProcessing::@6 to startProcessing::@6 [phi:startProcessing::@6->startProcessing::@6] + //SEG100 [60] phi (byte) startProcessing::i1#2 = (byte) startProcessing::i1#1 [phi:startProcessing::@6->startProcessing::@6#0] -- register_copy + //SEG101 [60] phi (byte*) startProcessing::spriteData#2 = (byte*) startProcessing::spriteData#1 [phi:startProcessing::@6->startProcessing::@6#1] -- register_copy + //SEG102 [60] phi (byte*) startProcessing::chargenData#2 = (byte*) startProcessing::chargenData#1 [phi:startProcessing::@6->startProcessing::@6#2] -- register_copy + //SEG103 startProcessing::@6 b6: - //SEG106 [58] *((byte*) startProcessing::spriteData#2) ← (byte) $ff -- _deref_pbuz1=vbuc1 - lda #$ff + //SEG104 [61] *((byte*) startProcessing::spriteData#2) ← *((byte*) startProcessing::chargenData#2) -- _deref_pbuz1=_deref_pbuz2 ldy #0 + lda (chargenData),y sta (spriteData),y - //SEG107 [59] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 + //SEG105 [62] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3 -- pbuz1=pbuz1_plus_vbuc1 lda #3 clc adc spriteData @@ -7795,150 +8241,115 @@ startProcessing: { bcc !+ inc spriteData+1 !: - //SEG108 [60] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx + //SEG106 [63] (byte*) startProcessing::chargenData#1 ← ++ (byte*) startProcessing::chargenData#2 -- pbuz1=_inc_pbuz1 + inc chargenData + bne !+ + inc chargenData+1 + !: + //SEG107 [64] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG109 [61] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 + //SEG108 [65] if((byte) startProcessing::i1#1!=(byte) 8) goto startProcessing::@6 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b6 - //SEG110 startProcessing::@7 - //SEG111 [62] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 + //SEG109 startProcessing::@7 + //SEG110 [66] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG111 asm { cli } + cli + //SEG112 [68] (word~) startProcessing::$10 ← (word)(byte) startProcessing::center_x#0 -- vwuz1=_word_vbuz2 lda center_x - sta _3 + sta _10 lda #0 - sta _3+1 - //SEG112 [63] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3 -- vwuz1=vwuz1_rol_3 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - asl _4 - rol _4+1 - //SEG113 [64] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4 -- vwuz1=vbuc1_plus_vwuz1 - lda #$18 + sta _10+1 + //SEG113 [69] (word~) startProcessing::$11 ← (word~) startProcessing::$10 << (byte) 3 -- vwuz1=vwuz1_rol_3 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + asl _11 + rol _11+1 + //SEG114 [70] (word) startProcessing::spriteX#0 ← (const byte) BORDER_XPOS_LEFT#0 + (word~) startProcessing::$11 -- vwuz1=vbuc1_plus_vwuz1 + lda #BORDER_XPOS_LEFT clc adc spriteX sta spriteX bcc !+ inc spriteX+1 !: - //SEG114 [65] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG115 [71] (byte~) startProcessing::$13 ← (byte) startProcessing::center_y#0 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda center_y asl asl asl - //SEG115 [66] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6 -- vbuyy=vbuc1_plus_vbuaa + //SEG116 [72] (byte) startProcessing::spriteY#0 ← (const byte) BORDER_YPOS_TOP#0 + (byte~) startProcessing::$13 -- vbuyy=vbuc1_plus_vbuaa clc - adc #$32 + adc #BORDER_YPOS_TOP tay - //SEG116 [67] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 + //SEG117 [73] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2 -- vbuz1=vbuc1_plus_vbuz2 lax freeIdx axs #-[SPRITE_DATA/$40] stx spritePtr - //SEG117 [68] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0 -- vwuz1=_word_vbuz2 - lda center_y - sta _11 - lda #0 - sta _11+1 - //SEG118 [69] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2 -- vwuz1=vwuz2_rol_2 - lda _11 - asl - sta _30 - lda _11+1 - rol - sta _30+1 - asl _30 - rol _30+1 - //SEG119 [70] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11 -- vwuz1=vwuz2_plus_vwuz1 - lda _31 - clc - adc _30 - sta _31 - lda _31+1 - adc _30+1 - sta _31+1 - //SEG120 [71] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3 -- vwuz1=vwuz1_rol_3 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - asl _12 - rol _12+1 - //SEG121 [72] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12 -- pbuz1=pbuc1_plus_vwuz1 - clc - lda _13 - adc #SCREEN - sta _13+1 - //SEG122 [73] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0 -- pbuz1=pbuz1_plus_vbuz2 - lda center_x - clc - adc screenPtr - sta screenPtr - bcc !+ - inc screenPtr+1 - !: - //SEG123 [74] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3 + //SEG118 [74] (byte~) startProcessing::$25 ← (byte) startProcessing::freeIdx#2 << (byte) 3 -- vbuxx=vbuz1_rol_3 lda freeIdx asl asl asl tax - //SEG124 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 + //SEG119 [75] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$25) ← (word) startProcessing::spriteX#0 -- pwuc1_derefidx_vbuxx=vwuz1 lda spriteX sta PROCESSING,x lda spriteX+1 sta PROCESSING+1,x - //SEG125 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy + //SEG120 [76] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$25) ← (byte) startProcessing::spriteY#0 -- pbuc1_derefidx_vbuxx=vbuyy tya sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y,x - //SEG126 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG121 [77] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$25) ← (byte) startProcessing::freeIdx#2 -- pbuc1_derefidx_vbuxx=vbuz1 lda freeIdx sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID,x - //SEG127 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 + //SEG122 [78] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$25) ← (byte) startProcessing::spritePtr#0 -- pbuc1_derefidx_vbuxx=vbuz1 lda spritePtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR,x - //SEG128 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2 + //SEG123 [79] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$25) ← (const byte) STATUS_NEW#0 -- pbuc1_derefidx_vbuxx=vbuc2 lda #STATUS_NEW sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS,x - //SEG129 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 + //SEG124 [80] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$25) ← (byte*) startProcessing::screenPtr#0 -- pptc1_derefidx_vbuxx=pbuz1 lda screenPtr sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x lda screenPtr+1 sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x - //SEG130 startProcessing::@return - //SEG131 [81] return + //SEG125 startProcessing::@return + //SEG126 [81] return rts - //SEG132 startProcessing::@8 + //SEG127 startProcessing::@8 b8: - //SEG133 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 + //SEG128 [82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2 -- vbuxx=vbuz1 ldx freeIdx - //SEG134 [48] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] - //SEG135 [48] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy + //SEG129 [39] phi from startProcessing::@8 to startProcessing::@1 [phi:startProcessing::@8->startProcessing::@1] + //SEG130 [39] phi (byte) startProcessing::freeIdx#6 = (byte~) startProcessing::freeIdx#7 [phi:startProcessing::@8->startProcessing::@1#0] -- register_copy jmp b1 - //SEG136 startProcessing::@3 + //SEG131 startProcessing::@3 b3: - //SEG137 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 + //SEG132 [83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2 -- vbuz1=_inc_vbuz1 inc i - //SEG138 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 + //SEG133 [84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i beq !b2+ jmp b2 !b2: - //SEG139 startProcessing::@9 - //SEG140 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx + //SEG134 startProcessing::@9 + //SEG135 [85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6 -- vbuz1=vbuxx stx freeIdx jmp b4 } -//SEG141 getCharToProcess +//SEG136 getCharToProcess // 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 = $25 - .label _10 = $25 - .label _11 = $25 + .label _9 = $29 + .label _10 = $29 + .label _11 = $29 .label return_dist = $13 .label x = $e .label dist = $13 @@ -7949,54 +8360,54 @@ getCharToProcess: { .label closest_dist = $f .label closest_x = $11 .label closest_y = $12 - .label _15 = $27 - .label _16 = $25 - //SEG142 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] - //SEG143 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 + .label _15 = $2b + .label _16 = $29 + //SEG137 [87] phi from getCharToProcess to getCharToProcess::@1 [phi:getCharToProcess->getCharToProcess::@1] + //SEG138 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#0] -- vbuz1=vbuc1 lda #0 sta closest_y - //SEG144 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 + //SEG139 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#1] -- vbuz1=vbuc1 sta closest_x - //SEG145 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 + //SEG140 [87] phi (word) getCharToProcess::closest_dist#8 = (const word) NOT_FOUND#0 [phi:getCharToProcess->getCharToProcess::@1#2] -- vwuz1=vwuc1 lda #NOT_FOUND sta closest_dist+1 - //SEG146 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 + //SEG141 [87] phi (byte) getCharToProcess::y#7 = (byte) 0 [phi:getCharToProcess->getCharToProcess::@1#3] -- vbuz1=vbuc1 lda #0 sta y - //SEG147 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 + //SEG142 [87] phi (byte*) getCharToProcess::screen_line#4 = (const byte[$3e8]) SCREEN_COPY#0 [phi:getCharToProcess->getCharToProcess::@1#4] -- pbuz1=pbuc1 lda #SCREEN_COPY sta screen_line+1 - //SEG148 getCharToProcess::@1 + //SEG143 getCharToProcess::@1 b1: - //SEG149 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] - //SEG150 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy - //SEG151 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy - //SEG152 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy - //SEG153 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 + //SEG144 [88] phi from getCharToProcess::@1 to getCharToProcess::@2 [phi:getCharToProcess::@1->getCharToProcess::@2] + //SEG145 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::closest_y#9 [phi:getCharToProcess::@1->getCharToProcess::@2#0] -- register_copy + //SEG146 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::closest_x#9 [phi:getCharToProcess::@1->getCharToProcess::@2#1] -- register_copy + //SEG147 [88] phi (word) getCharToProcess::closest_dist#2 = (word) getCharToProcess::closest_dist#8 [phi:getCharToProcess::@1->getCharToProcess::@2#2] -- register_copy + //SEG148 [88] phi (byte) getCharToProcess::x#2 = (byte) 0 [phi:getCharToProcess::@1->getCharToProcess::@2#3] -- vbuz1=vbuc1 lda #0 sta x - //SEG154 getCharToProcess::@2 + //SEG149 getCharToProcess::@2 b2: - //SEG155 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 + //SEG150 [89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11 -- pbuz1_derefidx_vbuz2_eq_vbuc1_then_la1 ldy x lda (screen_line),y cmp #' ' bne !b11+ jmp b11 !b11: - //SEG156 getCharToProcess::@4 - //SEG157 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG151 getCharToProcess::@4 + //SEG152 [90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1 -- vbuxx=vbuz1_rol_1 tya asl tax - //SEG158 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG153 [91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG159 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa + //SEG154 [92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14) -- vwuz1=pwuc1_derefidx_vbuxx_plus_pwuc2_derefidx_vbuaa tay lda SQUARES_X,x clc @@ -8005,7 +8416,7 @@ getCharToProcess: { lda SQUARES_X+1,x adc SQUARES_Y+1,y sta dist+1 - //SEG160 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 + //SEG155 [93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12 -- vwuz1_ge_vwuz2_then_la1 lda closest_dist+1 cmp dist+1 bne !+ @@ -8018,41 +8429,41 @@ getCharToProcess: { bcs !b12+ jmp b12 !b12: - //SEG161 getCharToProcess::@5 - //SEG162 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 + //SEG156 getCharToProcess::@5 + //SEG157 [94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2 -- vbuz1=vbuz2 lda x sta return_x - //SEG163 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 + //SEG158 [95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7 -- vbuz1=vbuz2 lda y sta return_y - //SEG164 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] - //SEG165 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy - //SEG166 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy - //SEG167 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy - //SEG168 getCharToProcess::@3 + //SEG159 [96] phi from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5 to getCharToProcess::@3 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3] + //SEG160 [96] phi (byte) getCharToProcess::return_y#1 = (byte) getCharToProcess::closest_y#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#0] -- register_copy + //SEG161 [96] phi (byte) getCharToProcess::return_x#1 = (byte) getCharToProcess::closest_x#7 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#1] -- register_copy + //SEG162 [96] phi (word) getCharToProcess::return_dist#1 = (word~) getCharToProcess::return_dist#5 [phi:getCharToProcess::@11/getCharToProcess::@12/getCharToProcess::@5->getCharToProcess::@3#2] -- register_copy + //SEG163 getCharToProcess::@3 b3: - //SEG169 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 + //SEG164 [97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG170 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 + //SEG165 [98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b10 - //SEG171 getCharToProcess::@6 - //SEG172 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 + //SEG166 getCharToProcess::@6 + //SEG167 [99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28 -- pbuz1=pbuz1_plus_vbuc1 clc adc screen_line sta screen_line bcc !+ inc screen_line+1 !: - //SEG173 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 + //SEG168 [100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7 -- vbuz1=_inc_vbuz1 inc y - //SEG174 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 + //SEG169 [101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b9 - //SEG175 getCharToProcess::@7 - //SEG176 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 + //SEG170 getCharToProcess::@7 + //SEG171 [102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return -- vwuz1_eq_vwuc1_then_la1 lda return_dist cmp #NOT_FOUND beq breturn !: - //SEG177 getCharToProcess::@8 - //SEG178 [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 + //SEG172 getCharToProcess::@8 + //SEG173 [103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1 -- vwuz1=_word_vbuz2 lda return_y sta _9 lda #0 sta _9+1 - //SEG179 [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 -- vwuz1=vwuz2_rol_2 + //SEG174 [104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2 -- vwuz1=vwuz2_rol_2 lda _9 asl sta _15 @@ -8075,7 +8486,7 @@ getCharToProcess: { sta _15+1 asl _15 rol _15+1 - //SEG180 [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 -- vwuz1=vwuz2_plus_vwuz1 + //SEG175 [105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9 -- vwuz1=vwuz2_plus_vwuz1 lda _16 clc adc _15 @@ -8083,14 +8494,14 @@ getCharToProcess: { lda _16+1 adc _15+1 sta _16+1 - //SEG181 [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 -- vwuz1=vwuz1_rol_3 + //SEG176 [106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3 -- vwuz1=vwuz1_rol_3 asl _10 rol _10+1 asl _10 rol _10+1 asl _10 rol _10+1 - //SEG182 [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 -- pbuz1=pbuc1_plus_vwuz1 + //SEG177 [107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10 -- pbuz1=pbuc1_plus_vwuz1 clc lda _11 adc #SCREEN_COPY sta _11+1 - //SEG183 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG178 [108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' ' -- pbuz1_derefidx_vbuz2=vbuc1 // clear the found char on the screen copy lda #' ' ldy return_x sta (_11),y - //SEG184 getCharToProcess::@return + //SEG179 getCharToProcess::@return breturn: - //SEG185 [109] return + //SEG180 [109] return rts - //SEG186 getCharToProcess::@9 + //SEG181 getCharToProcess::@9 b9: - //SEG187 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG182 [110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist sta closest_dist lda return_dist+1 sta closest_dist+1 - //SEG188 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] - //SEG189 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy - //SEG190 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy - //SEG191 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy - //SEG192 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy - //SEG193 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy + //SEG183 [87] phi from getCharToProcess::@9 to getCharToProcess::@1 [phi:getCharToProcess::@9->getCharToProcess::@1] + //SEG184 [87] phi (byte) getCharToProcess::closest_y#9 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#0] -- register_copy + //SEG185 [87] phi (byte) getCharToProcess::closest_x#9 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@9->getCharToProcess::@1#1] -- register_copy + //SEG186 [87] phi (word) getCharToProcess::closest_dist#8 = (word~) getCharToProcess::closest_dist#10 [phi:getCharToProcess::@9->getCharToProcess::@1#2] -- register_copy + //SEG187 [87] phi (byte) getCharToProcess::y#7 = (byte) getCharToProcess::y#1 [phi:getCharToProcess::@9->getCharToProcess::@1#3] -- register_copy + //SEG188 [87] phi (byte*) getCharToProcess::screen_line#4 = (byte*) getCharToProcess::screen_line#1 [phi:getCharToProcess::@9->getCharToProcess::@1#4] -- register_copy jmp b1 - //SEG194 getCharToProcess::@10 + //SEG189 getCharToProcess::@10 b10: - //SEG195 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 + //SEG190 [111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1 -- vwuz1=vwuz2 lda return_dist sta closest_dist lda return_dist+1 sta closest_dist+1 - //SEG196 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] - //SEG197 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy - //SEG198 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy - //SEG199 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy - //SEG200 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy + //SEG191 [88] phi from getCharToProcess::@10 to getCharToProcess::@2 [phi:getCharToProcess::@10->getCharToProcess::@2] + //SEG192 [88] phi (byte) getCharToProcess::closest_y#7 = (byte) getCharToProcess::return_y#1 [phi:getCharToProcess::@10->getCharToProcess::@2#0] -- register_copy + //SEG193 [88] phi (byte) getCharToProcess::closest_x#7 = (byte) getCharToProcess::return_x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#1] -- register_copy + //SEG194 [88] phi (word) getCharToProcess::closest_dist#2 = (word~) getCharToProcess::closest_dist#12 [phi:getCharToProcess::@10->getCharToProcess::@2#2] -- register_copy + //SEG195 [88] phi (byte) getCharToProcess::x#2 = (byte) getCharToProcess::x#1 [phi:getCharToProcess::@10->getCharToProcess::@2#3] -- register_copy jmp b2 - //SEG201 getCharToProcess::@12 + //SEG196 getCharToProcess::@12 b12: - //SEG202 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG197 [112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist lda closest_dist+1 sta return_dist+1 jmp b3 - //SEG203 getCharToProcess::@11 + //SEG198 getCharToProcess::@11 b11: - //SEG204 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 + //SEG199 [113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2 -- vwuz1=vwuz2 lda closest_dist sta return_dist lda closest_dist+1 sta return_dist+1 jmp b3 } -//SEG205 initSquareTables +//SEG200 setupRasterIrq +// Setup Raster IRQ +setupRasterIrq: { + .label irqRoutine = irqTop + //SEG201 asm { sei } + sei + //SEG202 [115] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 + // Disable kernal & basic + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG203 [116] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG204 [117] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 + // Disable CIA 1 Timer IRQ + lda #CIA_INTERRUPT_CLEAR + sta CIA1_INTERRUPT + //SEG205 setupRasterIrq::@1 + //SEG206 [118] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 + lda #$7f + and VIC_CONTROL + sta VIC_CONTROL + //SEG207 setupRasterIrq::@2 + //SEG208 [119] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + lda #RASTER_IRQ_TOP + sta RASTER + //SEG209 [120] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + // Enable Raster Interrupt + lda #IRQ_RASTER + sta IRQ_ENABLE + //SEG210 [121] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 + // Set the IRQ routine + lda #irqRoutine + sta HARDWARE_IRQ+1 + //SEG211 asm { cli } + cli + //SEG212 setupRasterIrq::@return + //SEG213 [123] return + rts +} +//SEG214 initSprites +// Initialize sprites +initSprites: { + .label sp = $15 + //SEG215 [125] phi from initSprites to initSprites::@1 [phi:initSprites->initSprites::@1] + //SEG216 [125] phi (byte*) initSprites::sp#2 = (const byte*) SPRITE_DATA#0 [phi:initSprites->initSprites::@1#0] -- pbuz1=pbuc1 + lda #SPRITE_DATA + sta sp+1 + // Clear sprite data + //SEG217 [125] phi from initSprites::@1 to initSprites::@1 [phi:initSprites::@1->initSprites::@1] + //SEG218 [125] phi (byte*) initSprites::sp#2 = (byte*) initSprites::sp#1 [phi:initSprites::@1->initSprites::@1#0] -- register_copy + //SEG219 initSprites::@1 + b1: + //SEG220 [126] *((byte*) initSprites::sp#2) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + tay + sta (sp),y + //SEG221 [127] (byte*) initSprites::sp#1 ← ++ (byte*) initSprites::sp#2 -- pbuz1=_inc_pbuz1 + inc sp + bne !+ + inc sp+1 + !: + //SEG222 [128] if((byte*) initSprites::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto initSprites::@1 -- pbuz1_lt_pbuc1_then_la1 + lda sp+1 + cmp #>SPRITE_DATA+NUM_PROCESSING*$40 + bcc b1 + bne !+ + lda sp + cmp #initSprites::@2] + //SEG224 [129] phi (byte) initSprites::i#2 = (byte) 0 [phi:initSprites::@1->initSprites::@2#0] -- vbuxx=vbuc1 + ldx #0 + // Initialize sprite registers + //SEG225 [129] phi from initSprites::@2 to initSprites::@2 [phi:initSprites::@2->initSprites::@2] + //SEG226 [129] phi (byte) initSprites::i#2 = (byte) initSprites::i#1 [phi:initSprites::@2->initSprites::@2#0] -- register_copy + //SEG227 initSprites::@2 + b2: + //SEG228 [130] *((const byte*) SPRITES_COLS#0 + (byte) initSprites::i#2) ← (const byte) LIGHT_BLUE#0 -- pbuc1_derefidx_vbuxx=vbuc2 + lda #LIGHT_BLUE + sta SPRITES_COLS,x + //SEG229 [131] (byte) initSprites::i#1 ← ++ (byte) initSprites::i#2 -- vbuxx=_inc_vbuxx + inx + //SEG230 [132] if((byte) initSprites::i#1!=(byte) 8) goto initSprites::@2 -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b2 + //SEG231 initSprites::@3 + //SEG232 [133] *((const byte*) SPRITES_MC#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + lda #0 + sta SPRITES_MC + //SEG233 [134] *((const byte*) SPRITES_EXPAND_X#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta SPRITES_EXPAND_X + //SEG234 [135] *((const byte*) SPRITES_EXPAND_Y#0) ← (byte) 0 -- _deref_pbuc1=vbuc2 + sta SPRITES_EXPAND_Y + //SEG235 initSprites::@return + //SEG236 [136] return + rts +} +//SEG237 initSquareTables // initialize SQUARES table initSquareTables: { - .label _6 = $17 - .label _14 = $17 - .label x = $15 - .label y = $16 - //SEG206 [115] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] - //SEG207 [115] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 + .label _6 = $19 + .label _14 = $19 + .label x = $17 + .label y = $18 + //SEG238 [138] phi from initSquareTables to initSquareTables::@1 [phi:initSquareTables->initSquareTables::@1] + //SEG239 [138] phi (byte) initSquareTables::x#2 = (byte) 0 [phi:initSquareTables->initSquareTables::@1#0] -- vbuz1=vbuc1 lda #0 sta x - //SEG208 [115] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] - //SEG209 [115] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy - //SEG210 initSquareTables::@1 + //SEG240 [138] phi from initSquareTables::@9 to initSquareTables::@1 [phi:initSquareTables::@9->initSquareTables::@1] + //SEG241 [138] phi (byte) initSquareTables::x#2 = (byte) initSquareTables::x#1 [phi:initSquareTables::@9->initSquareTables::@1#0] -- register_copy + //SEG242 initSquareTables::@1 b1: - //SEG211 [116] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 + //SEG243 [139] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2 -- vbuz1_lt_vbuc1_then_la1 lda x cmp #$14 bcc b2 - //SEG212 initSquareTables::@3 - //SEG213 [117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1 + //SEG244 initSquareTables::@3 + //SEG245 [140] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14 -- vbuaa=vbuz1_minus_vbuc1 sec sbc #$14 - //SEG214 [118] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] - //SEG215 [118] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy - //SEG216 initSquareTables::@4 + //SEG246 [141] phi from initSquareTables::@2 initSquareTables::@3 to initSquareTables::@4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4] + //SEG247 [141] phi (byte) initSquareTables::x_dist#0 = (byte~) initSquareTables::$4 [phi:initSquareTables::@2/initSquareTables::@3->initSquareTables::@4#0] -- register_copy + //SEG248 initSquareTables::@4 b4: - //SEG217 [119] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa + //SEG249 [142] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0 -- vbuxx=vbuaa tax - //SEG218 [120] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 - //SEG219 [121] call mul8u - //SEG220 [144] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] - //SEG221 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy - //SEG222 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa + //SEG250 [143] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0 + //SEG251 [144] call mul8u + //SEG252 [167] phi from initSquareTables::@4 to mul8u [phi:initSquareTables::@4->mul8u] + //SEG253 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#1 [phi:initSquareTables::@4->mul8u#0] -- register_copy + //SEG254 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#0 [phi:initSquareTables::@4->mul8u#1] -- vwuz1=vbuaa sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG223 [122] (word) mul8u::return#2 ← (word) mul8u::res#2 - //SEG224 initSquareTables::@9 - //SEG225 [123] (word~) initSquareTables::$6 ← (word) mul8u::return#2 - //SEG226 [124] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG255 [145] (word) mul8u::return#2 ← (word) mul8u::res#2 + //SEG256 initSquareTables::@9 + //SEG257 [146] (word~) initSquareTables::$6 ← (word) mul8u::return#2 + //SEG258 [147] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda x asl - //SEG227 [125] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1 + //SEG259 [148] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda _6 sta SQUARES_X,y lda _6+1 sta SQUARES_X+1,y - //SEG228 [126] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 + //SEG260 [149] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2 -- vbuz1=_inc_vbuz1 inc x - //SEG229 [127] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG261 [150] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$28 cmp x bne b1 - //SEG230 [128] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] - //SEG231 [128] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 + //SEG262 [151] phi from initSquareTables::@9 to initSquareTables::@5 [phi:initSquareTables::@9->initSquareTables::@5] + //SEG263 [151] phi (byte) initSquareTables::y#2 = (byte) 0 [phi:initSquareTables::@9->initSquareTables::@5#0] -- vbuz1=vbuc1 lda #0 sta y - //SEG232 [128] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] - //SEG233 [128] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy - //SEG234 initSquareTables::@5 + //SEG264 [151] phi from initSquareTables::@10 to initSquareTables::@5 [phi:initSquareTables::@10->initSquareTables::@5] + //SEG265 [151] phi (byte) initSquareTables::y#2 = (byte) initSquareTables::y#1 [phi:initSquareTables::@10->initSquareTables::@5#0] -- register_copy + //SEG266 initSquareTables::@5 b5: - //SEG235 [129] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 + //SEG267 [152] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6 -- vbuz1_lt_vbuc1_then_la1 lda y cmp #$c bcc b6 - //SEG236 initSquareTables::@7 - //SEG237 [130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1 + //SEG268 initSquareTables::@7 + //SEG269 [153] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c -- vbuaa=vbuz1_minus_vbuc1 sec sbc #$c - //SEG238 [131] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] - //SEG239 [131] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy - //SEG240 initSquareTables::@8 + //SEG270 [154] phi from initSquareTables::@6 initSquareTables::@7 to initSquareTables::@8 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8] + //SEG271 [154] phi (byte) initSquareTables::y_dist#0 = (byte~) initSquareTables::$12 [phi:initSquareTables::@6/initSquareTables::@7->initSquareTables::@8#0] -- register_copy + //SEG272 initSquareTables::@8 b8: - //SEG241 [132] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa + //SEG273 [155] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0 -- vbuxx=vbuaa tax - //SEG242 [133] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 - //SEG243 [134] call mul8u - //SEG244 [144] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] - //SEG245 [144] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy - //SEG246 [144] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa + //SEG274 [156] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0 + //SEG275 [157] call mul8u + //SEG276 [167] phi from initSquareTables::@8 to mul8u [phi:initSquareTables::@8->mul8u] + //SEG277 [167] phi (byte) mul8u::a#6 = (byte) mul8u::a#2 [phi:initSquareTables::@8->mul8u#0] -- register_copy + //SEG278 [167] phi (word) mul8u::mb#0 = (byte) mul8u::b#1 [phi:initSquareTables::@8->mul8u#1] -- vwuz1=vbuaa sta mul8u.mb lda #0 sta mul8u.mb+1 jsr mul8u - //SEG247 [135] (word) mul8u::return#3 ← (word) mul8u::res#2 - //SEG248 initSquareTables::@10 - //SEG249 [136] (word~) initSquareTables::$14 ← (word) mul8u::return#3 - //SEG250 [137] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 + //SEG279 [158] (word) mul8u::return#3 ← (word) mul8u::res#2 + //SEG280 initSquareTables::@10 + //SEG281 [159] (word~) initSquareTables::$14 ← (word) mul8u::return#3 + //SEG282 [160] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1 -- vbuaa=vbuz1_rol_1 lda y asl - //SEG251 [138] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1 + //SEG283 [161] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14 -- pwuc1_derefidx_vbuaa=vwuz1 tay lda _14 sta SQUARES_Y,y lda _14+1 sta SQUARES_Y+1,y - //SEG252 [139] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 + //SEG284 [162] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2 -- vbuz1=_inc_vbuz1 inc y - //SEG253 [140] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 + //SEG285 [163] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5 -- vbuz1_neq_vbuc1_then_la1 lda #$19 cmp y bne b5 - //SEG254 initSquareTables::@return - //SEG255 [141] return + //SEG286 initSquareTables::@return + //SEG287 [164] return rts - //SEG256 initSquareTables::@6 + //SEG288 initSquareTables::@6 b6: - //SEG257 [142] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1 + //SEG289 [165] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2 -- vbuaa=vbuc1_minus_vbuz1 lda #$c sec sbc y jmp b8 - //SEG258 initSquareTables::@2 + //SEG290 initSquareTables::@2 b2: - //SEG259 [143] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1 + //SEG291 [166] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2 -- vbuaa=vbuc1_minus_vbuz1 lda #$14 sec sbc x jmp b4 } -//SEG260 mul8u +//SEG292 mul8u // Perform binary multiplication of two unsigned 8-bit bytes into a 16-bit unsigned word // mul8u(byte register(X) a, byte register(A) b) mul8u: { - .label mb = $19 - .label res = $17 - .label return = $17 - //SEG261 [145] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] - //SEG262 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy - //SEG263 [145] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 + .label mb = $1b + .label res = $19 + .label return = $19 + //SEG293 [168] phi from mul8u to mul8u::@1 [phi:mul8u->mul8u::@1] + //SEG294 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#0 [phi:mul8u->mul8u::@1#0] -- register_copy + //SEG295 [168] phi (word) mul8u::res#2 = (byte) 0 [phi:mul8u->mul8u::@1#1] -- vwuz1=vbuc1 lda #0 sta res sta res+1 - //SEG264 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy - //SEG265 mul8u::@1 + //SEG296 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#6 [phi:mul8u->mul8u::@1#2] -- register_copy + //SEG297 mul8u::@1 b1: - //SEG266 [146] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 + //SEG298 [169] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2 -- vbuxx_neq_0_then_la1 cpx #0 bne b2 - //SEG267 mul8u::@return - //SEG268 [147] return + //SEG299 mul8u::@return + //SEG300 [170] return rts - //SEG269 mul8u::@2 + //SEG301 mul8u::@2 b2: - //SEG270 [148] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 + //SEG302 [171] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1 -- vbuaa=vbuxx_band_vbuc1 txa and #1 - //SEG271 [149] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 + //SEG303 [172] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3 -- vbuaa_eq_0_then_la1 cmp #0 beq b3 - //SEG272 mul8u::@4 - //SEG273 [150] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 + //SEG304 mul8u::@4 + //SEG305 [173] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#2 -- vwuz1=vwuz1_plus_vwuz2 lda res clc adc mb @@ -8313,115 +8827,73 @@ mul8u: { lda res+1 adc mb+1 sta res+1 - //SEG274 [151] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] - //SEG275 [151] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy - //SEG276 mul8u::@3 + //SEG306 [174] phi from mul8u::@2 mul8u::@4 to mul8u::@3 [phi:mul8u::@2/mul8u::@4->mul8u::@3] + //SEG307 [174] phi (word) mul8u::res#6 = (word) mul8u::res#2 [phi:mul8u::@2/mul8u::@4->mul8u::@3#0] -- register_copy + //SEG308 mul8u::@3 b3: - //SEG277 [152] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1 + //SEG309 [175] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1 -- vbuxx=vbuxx_ror_1 txa lsr tax - //SEG278 [153] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 + //SEG310 [176] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1 -- vwuz1=vwuz1_rol_1 asl mb rol mb+1 - //SEG279 [145] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] - //SEG280 [145] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy - //SEG281 [145] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy - //SEG282 [145] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy + //SEG311 [168] phi from mul8u::@3 to mul8u::@1 [phi:mul8u::@3->mul8u::@1] + //SEG312 [168] phi (word) mul8u::mb#2 = (word) mul8u::mb#1 [phi:mul8u::@3->mul8u::@1#0] -- register_copy + //SEG313 [168] phi (word) mul8u::res#2 = (word) mul8u::res#6 [phi:mul8u::@3->mul8u::@1#1] -- register_copy + //SEG314 [168] phi (byte) mul8u::a#3 = (byte) mul8u::a#0 [phi:mul8u::@3->mul8u::@1#2] -- register_copy jmp b1 } -//SEG283 setupRasterIrq -// Setup Raster IRQ -setupRasterIrq: { - .label irqRoutine = irqTop - //SEG284 asm { sei } - sei - //SEG285 [155] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 -- _deref_pbuc1=vbuc2 - // Disable kernal & basic - lda #PROCPORT_DDR_MEMORY_MASK - sta PROCPORT_DDR - //SEG286 [156] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 -- _deref_pbuc1=vbuc2 - lda #PROCPORT_RAM_IO - sta PROCPORT - //SEG287 [157] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0 -- _deref_pbuc1=vbuc2 - // Disable CIA 1 Timer IRQ - lda #CIA_INTERRUPT_CLEAR - sta CIA1_INTERRUPT - //SEG288 setupRasterIrq::@1 - //SEG289 [158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f -- _deref_pbuc1=_deref_pbuc1_band_vbuc2 - lda #$7f - and VIC_CONTROL - sta VIC_CONTROL - //SEG290 setupRasterIrq::@2 - //SEG291 [159] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 - lda #RASTER_IRQ_TOP - sta RASTER - //SEG292 [160] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 - // Enable Raster Interrupt - lda #IRQ_RASTER - sta IRQ_ENABLE - //SEG293 [161] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0 -- _deref_pptc1=pprc2 - // Set the IRQ routine - lda #irqRoutine - sta HARDWARE_IRQ+1 - //SEG294 asm { cli } - cli - //SEG295 setupRasterIrq::@return - //SEG296 [163] return - rts -} -//SEG297 irqBottom +//SEG315 irqBottom // Raster Interrupt at the middle of the screen irqBottom: { - //SEG298 entry interrupt(HARDWARE_ALL) + //SEG316 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG299 [165] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] - //SEG300 [165] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1 + //SEG317 [178] phi from irqBottom to irqBottom::@1 [phi:irqBottom->irqBottom::@1] + //SEG318 [178] phi (byte) irqBottom::i#2 = (byte) 0 [phi:irqBottom->irqBottom::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG301 [165] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] - //SEG302 [165] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy - //SEG303 irqBottom::@1 + //SEG319 [178] phi from irqBottom::@1 to irqBottom::@1 [phi:irqBottom::@1->irqBottom::@1] + //SEG320 [178] phi (byte) irqBottom::i#2 = (byte) irqBottom::i#1 [phi:irqBottom::@1->irqBottom::@1#0] -- register_copy + //SEG321 irqBottom::@1 b1: - //SEG304 [166] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx + //SEG322 [179] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2 -- vbuxx=_inc_vbuxx inx - //SEG305 [167] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG323 [180] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b1 - //SEG306 irqBottom::@2 - //SEG307 [168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG324 irqBottom::@2 + //SEG325 [181] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG308 [169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG326 [182] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 sta BGCOL - //SEG309 [170] call processChars - //SEG310 [177] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] + //SEG327 [183] call processChars + //SEG328 [190] phi from irqBottom::@2 to processChars [phi:irqBottom::@2->processChars] jsr processChars - //SEG311 irqBottom::@3 - //SEG312 [171] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG329 irqBottom::@3 + //SEG330 [184] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG313 [172] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG331 [185] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG314 [173] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 + //SEG332 [186] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the top of the screen lda #RASTER_IRQ_TOP sta RASTER - //SEG315 [174] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 + //SEG333 [187] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop() -- _deref_pptc1=pprc2 lda #irqTop sta HARDWARE_IRQ+1 - //SEG316 [175] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG334 [188] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS - //SEG317 irqBottom::@return - //SEG318 [176] return - exit interrupt(HARDWARE_ALL) + //SEG335 irqBottom::@return + //SEG336 [189] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: @@ -8430,33 +8902,33 @@ irqBottom: { ldy #00 rti } -//SEG319 processChars +//SEG337 processChars // Process any chars in the PROCESSING array processChars: { - .label processing = $29 - .label bitmask = $2b - .label i = $1b - //SEG320 [178] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] - //SEG321 [178] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 + .label processing = $2d + .label bitmask = $2f + .label i = $1d + //SEG338 [191] phi from processChars to processChars::@1 [phi:processChars->processChars::@1] + //SEG339 [191] phi (byte) processChars::i#10 = (byte) 0 [phi:processChars->processChars::@1#0] -- vbuz1=vbuc1 lda #0 sta i - //SEG322 [178] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] - //SEG323 [178] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy - //SEG324 processChars::@1 + //SEG340 [191] phi from processChars::@2 to processChars::@1 [phi:processChars::@2->processChars::@1] + //SEG341 [191] phi (byte) processChars::i#10 = (byte) processChars::i#1 [phi:processChars::@2->processChars::@1#0] -- register_copy + //SEG342 processChars::@1 b1: - //SEG325 [179] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 + //SEG343 [192] (byte~) processChars::$21 ← (byte) processChars::i#10 << (byte) 3 -- vbuaa=vbuz1_rol_3 lda i asl asl asl - //SEG326 [180] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18 -- pssz1=pssc1_plus_vbuaa + //SEG344 [193] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$21 -- pssz1=pssc1_plus_vbuaa clc adc #PROCESSING adc #0 sta processing+1 - //SEG327 [181] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 + //SEG345 [194] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID) -- vbuz1=vbuc1_rol_pbuz2_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_ID lda (processing),y tax @@ -8469,20 +8941,20 @@ processChars: { bne !- !e: sta bitmask - //SEG328 [182] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + //SEG346 [195] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS lda (processing),y cmp #STATUS_FREE bne !b2+ jmp b2 !b2: - //SEG329 processChars::@8 - //SEG330 [183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 + //SEG347 processChars::@9 + //SEG348 [196] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3 -- pbuz1_derefidx_vbuc1_neq_vbuc2_then_la1 lda (processing),y cmp #STATUS_NEW bne b3 - //SEG331 processChars::@9 - //SEG332 [184] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 + //SEG349 processChars::@10 + //SEG350 [197] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' ' -- _deref_pptz1_derefidx_vbuc1=vbuc2 // Clear the char on the screen ldx #' ' ldy #OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR @@ -8494,12 +8966,12 @@ processChars: { txa !: sta $ffff - //SEG333 [185] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG351 [198] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 // Enable the sprite lda SPRITES_ENABLE ora bitmask sta SPRITES_ENABLE - //SEG334 [186] *((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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 + //SEG352 [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) -- pbuc1_derefidx_pbuz1_derefidx_vbuc2=pbuz1_derefidx_vbuc3 // Set sprite pointer ldy #OFFSET_STRUCT_PROCESSINGSPRITE_PTR lda (processing),y @@ -8509,43 +8981,67 @@ processChars: { tay pla sta SCREEN+SPRITE_PTRS,y - //SEG335 [187] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 + //SEG353 [200] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0 -- pbuz1_derefidx_vbuc1=vbuc2 // Set status lda #STATUS_PROCESSING ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS sta (processing),y - //SEG336 processChars::@3 + //SEG354 processChars::@3 b3: - //SEG337 [188] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1 + //SEG355 [201] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_hi__deref_pwuz1 ldy #1 lda (processing),y - //SEG338 [189] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 + //SEG356 [202] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4 -- vbuc1_neq_vbuaa_then_la1 // Set sprite position cmp #0 bne b4 - //SEG339 processChars::@6 - //SEG340 [190] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + //SEG357 processChars::@7 + //SEG358 [203] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 lda #$ff eor bitmask - //SEG341 [191] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa and SPRITES_XMSB sta SPRITES_XMSB - //SEG342 processChars::@5 + //SEG360 processChars::@5 b5: - //SEG343 [192] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 + //SEG361 [205] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1 -- vbuxx=vbuz1_rol_1 lda i asl tax - //SEG344 [193] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1 + //SEG362 [206] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0) -- vbuaa=_byte__deref_pwuz1 ldy #0 lda (processing),y - //SEG345 [194] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa + //SEG363 [207] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12 -- pbuc1_derefidx_vbuxx=vbuaa sta SPRITES_XPOS,x - //SEG346 [195] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2 + //SEG364 [208] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) -- pbuc1_derefidx_vbuxx=pbuz1_derefidx_vbuc2 ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y lda (processing),y sta SPRITES_YPOS,x - //SEG347 [196] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 + //SEG365 [209] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)==(const byte) BORDER_XPOS_LEFT#0-(byte) 8) goto processChars::@6 -- _deref_pwuz1_eq_vwuc1_then_la1 + // Move sprite + ldy #0 + lda (processing),y + cmp #BORDER_XPOS_LEFT-8 + beq b6 + !: + //SEG366 processChars::@11 + //SEG367 [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 -- pbuz1_derefidx_vbuc1_eq_vbuc2_then_la1 + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y + lda (processing),y + cmp #BORDER_YPOS_TOP-8 + beq b6 + //SEG368 processChars::@8 + //SEG369 [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) -- pbuz1_derefidx_vbuc1=_dec_pbuz1_derefidx_vbuc1 + lda (processing),y + sty $ff + sec + sbc #1 + sta (processing),y + //SEG370 [212] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0) -- _deref_pwuz1=_dec__deref_pwuz1 ldy #0 lda (processing),y sec @@ -8555,106 +9051,101 @@ processChars: { lda (processing),y sbc #0 sta (processing),y - //SEG348 [197] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2 -- _deref_pwuz1_neq_0_then_la1 - ldy #0 - lda (processing),y - bne b2 - iny - lda (processing),y - bne b2 - //SEG349 processChars::@7 - //SEG350 [198] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 - // Set status - lda #STATUS_FREE - ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS - sta (processing),y - //SEG351 [199] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 - lda #$ff - eor bitmask - //SEG352 [200] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa - // Disable the sprite - and SPRITES_ENABLE - sta SPRITES_ENABLE - //SEG353 processChars::@2 + //SEG371 processChars::@2 b2: - //SEG354 [201] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 + //SEG372 [213] (byte) processChars::i#1 ← ++ (byte) processChars::i#10 -- vbuz1=_inc_vbuz1 inc i - //SEG355 [202] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 + //SEG373 [214] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1 -- vbuz1_neq_vbuc1_then_la1 lda #NUM_PROCESSING-1+1 cmp i beq !b1+ jmp b1 !b1: - //SEG356 processChars::@return - //SEG357 [203] return + //SEG374 processChars::@return + //SEG375 [215] return rts - //SEG358 processChars::@4 + //SEG376 processChars::@6 + b6: + //SEG377 [216] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0 -- pbuz1_derefidx_vbuc1=vbuc2 + // Set status to FREE + lda #STATUS_FREE + ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + sta (processing),y + //SEG378 [217] (byte~) processChars::$19 ← (byte) $ff ^ (byte) processChars::bitmask#0 -- vbuaa=vbuc1_bxor_vbuz1 + lda #$ff + eor bitmask + //SEG379 [218] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$19 -- _deref_pbuc1=_deref_pbuc1_band_vbuaa + // Disable the sprite + and SPRITES_ENABLE + sta SPRITES_ENABLE + jmp b2 + //SEG380 processChars::@4 b4: - //SEG359 [204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 + //SEG381 [219] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0 -- _deref_pbuc1=_deref_pbuc1_bor_vbuz1 lda SPRITES_XMSB ora bitmask sta SPRITES_XMSB jmp b5 } -//SEG360 irqTop +//SEG382 irqTop // Raster Interrupt at the top of the screen irqTop: { - //SEG361 entry interrupt(HARDWARE_ALL) + //SEG383 entry interrupt(HARDWARE_ALL) sta rega+1 stx regx+1 sty regy+1 - //SEG362 [206] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] - //SEG363 [206] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1 + //SEG384 [221] phi from irqTop to irqTop::@1 [phi:irqTop->irqTop::@1] + //SEG385 [221] phi (byte) irqTop::i#2 = (byte) 0 [phi:irqTop->irqTop::@1#0] -- vbuxx=vbuc1 ldx #0 - //SEG364 [206] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] - //SEG365 [206] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy - //SEG366 irqTop::@1 + //SEG386 [221] phi from irqTop::@1 to irqTop::@1 [phi:irqTop::@1->irqTop::@1] + //SEG387 [221] phi (byte) irqTop::i#2 = (byte) irqTop::i#1 [phi:irqTop::@1->irqTop::@1#0] -- register_copy + //SEG388 irqTop::@1 b1: - //SEG367 [207] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx + //SEG389 [222] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2 -- vbuxx=_inc_vbuxx inx - //SEG368 [208] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1 + //SEG390 [223] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne b1 - //SEG369 irqTop::@2 - //SEG370 [209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG391 irqTop::@2 + //SEG392 [224] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 lda #WHITE sta BORDERCOL - //SEG371 [210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 + //SEG393 [225] *((const byte*) BGCOL#0) ← (const byte) WHITE#0 -- _deref_pbuc1=vbuc2 sta BGCOL - //SEG372 [211] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] - //SEG373 [211] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1 + //SEG394 [226] phi from irqTop::@2 to irqTop::@3 [phi:irqTop::@2->irqTop::@3] + //SEG395 [226] phi (byte) irqTop::i1#2 = (byte) 0 [phi:irqTop::@2->irqTop::@3#0] -- vbuxx=vbuc1 ldx #0 - //SEG374 [211] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] - //SEG375 [211] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy - //SEG376 irqTop::@3 + //SEG396 [226] phi from irqTop::@3 to irqTop::@3 [phi:irqTop::@3->irqTop::@3] + //SEG397 [226] phi (byte) irqTop::i1#2 = (byte) irqTop::i1#1 [phi:irqTop::@3->irqTop::@3#0] -- register_copy + //SEG398 irqTop::@3 b3: - //SEG377 [212] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx + //SEG399 [227] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2 -- vbuxx=_inc_vbuxx inx - //SEG378 [213] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1 + //SEG400 [228] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #8 bne b3 - //SEG379 irqTop::@4 - //SEG380 [214] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG401 irqTop::@4 + //SEG402 [229] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0 -- _deref_pbuc1=vbuc2 lda #LIGHT_BLUE sta BORDERCOL - //SEG381 [215] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 + //SEG403 [230] *((const byte*) BGCOL#0) ← (const byte) BLUE#0 -- _deref_pbuc1=vbuc2 lda #BLUE sta BGCOL - //SEG382 [216] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 + //SEG404 [231] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0 -- _deref_pbuc1=vbuc2 // Trigger IRQ at the middle of the screen lda #RASTER_IRQ_MIDDLE sta RASTER - //SEG383 [217] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 + //SEG405 [232] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom() -- _deref_pptc1=pprc2 lda #irqBottom sta HARDWARE_IRQ+1 - //SEG384 [218] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 + //SEG406 [233] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0 -- _deref_pbuc1=vbuc2 // Acknowledge the IRQ lda #IRQ_RASTER sta IRQ_STATUS - //SEG385 irqTop::@return - //SEG386 [219] return - exit interrupt(HARDWARE_ALL) + //SEG407 irqTop::@return + //SEG408 [234] return - exit interrupt(HARDWARE_ALL) rega: lda #00 regx: diff --git a/src/test/ref/complex/blackhole/blackhole.sym b/src/test/ref/complex/blackhole/blackhole.sym index 10146c5ea..c2733d8fb 100644 --- a/src/test/ref/complex/blackhole/blackhole.sym +++ b/src/test/ref/complex/blackhole/blackhole.sym @@ -7,6 +7,12 @@ (const byte) BLUE#0 BLUE = (byte) 6 (byte*) BORDERCOL (const byte*) BORDERCOL#0 BORDERCOL = (byte*) 53280 +(byte) BORDER_XPOS_LEFT +(const byte) BORDER_XPOS_LEFT#0 BORDER_XPOS_LEFT = (byte) $18 +(byte) BORDER_YPOS_TOP +(const byte) BORDER_YPOS_TOP#0 BORDER_YPOS_TOP = (byte) $32 +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = (byte*) 53248 (byte*) CIA1_INTERRUPT (const byte*) CIA1_INTERRUPT#0 CIA1_INTERRUPT = (byte*) 56333 (byte) CIA_INTERRUPT_CLEAR @@ -38,6 +44,8 @@ (const byte*) PROCPORT_DDR#0 PROCPORT_DDR = (byte*) 0 (byte) PROCPORT_DDR_MEMORY_MASK (const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte) 7 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte) $31 (byte) PROCPORT_RAM_IO (const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte) $35 (word) ProcessingChar::dist @@ -94,13 +102,13 @@ (byte) WHITE (const byte) WHITE#0 WHITE = (byte) 1 (struct ProcessingChar()) getCharToProcess() -(word~) getCharToProcess::$10 $10 zp ZP_WORD:37 4.0 -(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:37 4.0 +(word~) getCharToProcess::$10 $10 zp ZP_WORD:41 4.0 +(byte*~) getCharToProcess::$11 $11 zp ZP_WORD:41 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:39 4.0 -(word) getCharToProcess::$16 $16 zp ZP_WORD:37 4.0 -(word~) getCharToProcess::$9 $9 zp ZP_WORD:37 3.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 (label) getCharToProcess::@1 (label) getCharToProcess::@10 (label) getCharToProcess::@11 @@ -135,11 +143,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 x 7.333333333333333 +(byte) getCharToProcess::return_x#0 reg byte y 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 y 7.333333333333333 +(byte) getCharToProcess::return_y#0 reg byte x 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 @@ -151,15 +159,26 @@ (byte) getCharToProcess::y (byte) getCharToProcess::y#1 y zp ZP_BYTE:13 101.0 (byte) getCharToProcess::y#7 y zp ZP_BYTE:13 137.75 +(void()) initSprites() +(label) initSprites::@1 +(label) initSprites::@2 +(label) initSprites::@3 +(label) initSprites::@return +(byte) initSprites::i +(byte) initSprites::i#1 reg byte x 16.5 +(byte) initSprites::i#2 reg byte x 16.5 +(byte*) initSprites::sp +(byte*) initSprites::sp#1 sp zp ZP_WORD:21 16.5 +(byte*) initSprites::sp#2 sp zp ZP_WORD:21 16.5 (void()) initSquareTables() (byte~) initSquareTables::$10 reg byte a 22.0 (byte~) initSquareTables::$12 reg byte a 22.0 -(word~) initSquareTables::$14 $14 zp ZP_WORD:23 11.0 +(word~) initSquareTables::$14 $14 zp ZP_WORD:25 11.0 (byte~) initSquareTables::$16 reg byte a 22.0 (byte~) initSquareTables::$17 reg byte a 22.0 (byte~) initSquareTables::$2 reg byte a 22.0 (byte~) initSquareTables::$4 reg byte a 22.0 -(word~) initSquareTables::$6 $6 zp ZP_WORD:23 11.0 +(word~) initSquareTables::$6 $6 zp ZP_WORD:25 11.0 (label) initSquareTables::@1 (label) initSquareTables::@10 (label) initSquareTables::@2 @@ -172,13 +191,13 @@ (label) initSquareTables::@9 (label) initSquareTables::@return (byte) initSquareTables::x -(byte) initSquareTables::x#1 x zp ZP_BYTE:21 16.5 -(byte) initSquareTables::x#2 x zp ZP_BYTE:21 5.5 +(byte) initSquareTables::x#1 x zp ZP_BYTE:23 16.5 +(byte) initSquareTables::x#2 x zp ZP_BYTE:23 5.5 (byte) initSquareTables::x_dist (byte) initSquareTables::x_dist#0 reg byte a 22.0 (byte) initSquareTables::y -(byte) initSquareTables::y#1 y zp ZP_BYTE:22 16.5 -(byte) initSquareTables::y#2 y zp ZP_BYTE:22 5.5 +(byte) initSquareTables::y#1 y zp ZP_BYTE:24 16.5 +(byte) initSquareTables::y#2 y zp ZP_BYTE:24 5.5 (byte) initSquareTables::y_dist (byte) initSquareTables::y_dist#0 reg byte a 22.0 interrupt(HARDWARE_ALL)(void()) irqBottom() @@ -202,10 +221,9 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) irqTop::i1#1 reg byte x 16.5 (byte) irqTop::i1#2 reg byte x 22.0 (void()) main() -(struct ProcessingChar~) main::$11 -(byte~) main::$18 reg byte x 12.833333333333334 +(byte~) main::$15 reg byte x 12.833333333333334 +(struct ProcessingChar~) main::$8 (label) main::@1 -(label) main::@10 (label) main::@2 (label) main::@3 (label) main::@4 @@ -213,29 +231,22 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (label) main::@6 (label) main::@7 (label) main::@8 -(label) main::@9 (struct ProcessingChar) main::center (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 x 5.5 +(byte) main::center_x#0 reg byte y 5.5 (byte) main::center_y -(byte) main::center_y#0 reg byte y 5.5 +(byte) main::center_y#0 reg byte x 5.5 (byte*) main::dst -(byte*) main::dst#1 dst zp ZP_WORD:6 11.0 -(byte*) main::dst#2 dst zp ZP_WORD:6 11.0 +(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::i1 -(byte) main::i1#1 reg byte x 16.5 -(byte) main::i1#2 reg byte x 16.5 -(byte*) main::sp -(byte*) main::sp#1 sp zp ZP_WORD:2 16.5 -(byte*) main::sp#2 sp zp ZP_WORD:2 16.5 (byte*) main::src -(byte*) main::src#1 src zp ZP_WORD:4 11.0 -(byte*) main::src#2 src zp ZP_WORD:4 16.5 +(byte*) main::src#1 src zp ZP_WORD:2 11.0 +(byte*) main::src#2 src zp ZP_WORD:2 16.5 (word()) mul8u((byte) mul8u::a , (byte) mul8u::b) (byte~) mul8u::$1 reg byte a 202.0 (label) mul8u::@1 @@ -253,24 +264,26 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (byte) mul8u::b#0 reg byte a 22.0 (byte) mul8u::b#1 reg byte a 22.0 (word) mul8u::mb -(word) mul8u::mb#0 mb zp ZP_WORD:25 24.0 -(word) mul8u::mb#1 mb zp ZP_WORD:25 202.0 -(word) mul8u::mb#2 mb zp ZP_WORD:25 43.57142857142858 +(word) mul8u::mb#0 mb zp ZP_WORD:27 24.0 +(word) mul8u::mb#1 mb zp ZP_WORD:27 202.0 +(word) mul8u::mb#2 mb zp ZP_WORD:27 43.57142857142858 (word) mul8u::res -(word) mul8u::res#1 res zp ZP_WORD:23 202.0 -(word) mul8u::res#2 res zp ZP_WORD:23 46.42857142857143 -(word) mul8u::res#6 res zp ZP_WORD:23 101.0 +(word) mul8u::res#1 res zp ZP_WORD:25 202.0 +(word) mul8u::res#2 res zp ZP_WORD:25 46.42857142857143 +(word) mul8u::res#6 res zp ZP_WORD:25 101.0 (word) mul8u::return -(word) mul8u::return#2 return zp ZP_WORD:23 22.0 -(word) mul8u::return#3 return zp ZP_WORD:23 22.0 +(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::$12 reg byte a 22.0 (byte~) processChars::$13 reg byte x 11.0 -(byte~) processChars::$16 reg byte a 22.0 -(byte~) processChars::$18 reg byte a 22.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 (label) processChars::@1 +(label) processChars::@10 +(label) processChars::@11 (label) processChars::@2 (label) processChars::@3 (label) processChars::@4 @@ -281,12 +294,12 @@ interrupt(HARDWARE_ALL)(void()) irqTop() (label) processChars::@9 (label) processChars::@return (byte) processChars::bitmask -(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:43 2.8947368421052633 +(byte) processChars::bitmask#0 bitmask zp ZP_BYTE:47 2.8947368421052633 (byte) processChars::i -(byte) processChars::i#1 i zp ZP_BYTE:27 16.5 -(byte) processChars::i#10 i zp ZP_BYTE:27 1.8333333333333333 +(byte) processChars::i#1 i zp ZP_BYTE:29 16.5 +(byte) processChars::i#10 i zp ZP_BYTE:29 1.6923076923076923 (struct ProcessingSprite*) processChars::processing -(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:41 0.5789473684210527 +(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:45 0.55 (void()) setupRasterIrq((word) setupRasterIrq::raster , (void()*) setupRasterIrq::irqRoutine) (label) setupRasterIrq::@1 (label) setupRasterIrq::@2 @@ -295,18 +308,20 @@ 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:9 4.0 -(word~) startProcessing::$1 $1 zp ZP_WORD:9 4.0 -(word~) startProcessing::$11 $11 zp ZP_WORD:33 3.0 -(word~) startProcessing::$12 $12 zp ZP_WORD:33 4.0 -(byte*~) startProcessing::$13 $13 zp ZP_WORD:33 4.0 -(byte~) startProcessing::$21 reg byte a 2002.0 -(byte~) startProcessing::$22 reg byte x 2.333333333333333 -(word~) startProcessing::$3 $3 zp ZP_WORD:30 4.0 -(word) startProcessing::$30 $30 zp ZP_WORD:35 4.0 -(word) startProcessing::$31 $31 zp ZP_WORD:33 4.0 -(word~) startProcessing::$4 $4 zp ZP_WORD:30 4.0 -(byte~) startProcessing::$6 reg byte a 4.0 +(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::$4 $4 zp ZP_WORD:9 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 (label) startProcessing::@1 (label) startProcessing::@2 (label) startProcessing::@3 @@ -320,42 +335,47 @@ 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:28 0.40625 +(byte) startProcessing::center_x#0 center_x zp ZP_BYTE:30 0.41666666666666674 (byte) startProcessing::center_y -(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:29 0.5 +(byte) startProcessing::center_y#0 center_y zp ZP_BYTE:31 0.34210526315789475 +(byte) startProcessing::ch +(byte) startProcessing::ch#0 reg byte a 2.0 +(byte*) startProcessing::chargenData +(byte*) startProcessing::chargenData#0 chargenData zp ZP_WORD:7 1.3333333333333333 +(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:8 52.39999999999999 +(byte) startProcessing::freeIdx#2 freeIdx zp ZP_BYTE:6 38.52941176470589 (byte) startProcessing::freeIdx#6 reg byte x 33.666666666666664 (byte~) startProcessing::freeIdx#7 reg byte x 202.0 -(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:8 202.0 +(byte~) startProcessing::freeIdx#8 freeIdx zp ZP_BYTE:6 202.0 (byte) startProcessing::i -(byte) startProcessing::i#1 i zp ZP_BYTE:8 1501.5 -(byte) startProcessing::i#2 i zp ZP_BYTE:8 1334.6666666666667 +(byte) startProcessing::i#1 i zp ZP_BYTE:6 1501.5 +(byte) startProcessing::i#2 i zp ZP_BYTE:6 1334.6666666666667 (byte) startProcessing::i1 (byte) startProcessing::i1#1 reg byte x 151.5 -(byte) startProcessing::i1#2 reg byte x 67.33333333333333 +(byte) startProcessing::i1#2 reg byte x 50.5 (byte*) startProcessing::screenPtr -(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:33 0.5714285714285714 +(byte*) startProcessing::screenPtr#0 screenPtr zp ZP_WORD:36 0.13333333333333333 (byte*) startProcessing::spriteData -(byte*) startProcessing::spriteData#0 spriteData zp ZP_WORD:9 4.0 -(byte*) startProcessing::spriteData#1 spriteData zp ZP_WORD:9 67.33333333333333 +(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:32 0.36363636363636365 +(byte) startProcessing::spritePtr#0 spritePtr zp ZP_BYTE:40 0.8 (word) startProcessing::spriteX -(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:30 0.36363636363636365 +(word) startProcessing::spriteX#0 spriteX zp ZP_WORD:38 0.8 (byte) startProcessing::spriteY -(byte) startProcessing::spriteY#0 reg byte y 0.4 +(byte) startProcessing::spriteY#0 reg byte y 1.0 reg byte y [ main::i#2 main::i#1 ] -zp ZP_WORD:2 [ main::sp#2 main::sp#1 ] -reg byte x [ main::i1#2 main::i1#1 ] -zp ZP_WORD:4 [ main::src#2 main::src#1 ] -zp ZP_WORD:6 [ main::dst#2 main::dst#1 ] +zp ZP_WORD:2 [ main::src#2 main::src#1 ] +zp ZP_WORD:4 [ main::dst#2 main::dst#1 ] reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ] -zp ZP_BYTE:8 [ startProcessing::freeIdx#2 startProcessing::freeIdx#8 startProcessing::i#2 startProcessing::i#1 ] -zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$1 startProcessing::$0 ] +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 ] +zp ZP_WORD:9 [ startProcessing::spriteData#2 startProcessing::spriteData#0 startProcessing::spriteData#1 startProcessing::$5 startProcessing::$4 ] reg byte x [ startProcessing::i1#2 startProcessing::i1#1 ] zp ZP_WORD:11 [ getCharToProcess::screen_line#4 getCharToProcess::screen_line#1 ] zp ZP_BYTE:13 [ getCharToProcess::y#7 getCharToProcess::y#1 ] @@ -364,46 +384,50 @@ zp ZP_WORD:15 [ getCharToProcess::closest_dist#2 getCharToProcess::closest_dist# zp ZP_BYTE:17 [ getCharToProcess::closest_x#7 getCharToProcess::closest_x#9 getCharToProcess::return_x#1 getCharToProcess::return_x#7 ] zp ZP_BYTE:18 [ getCharToProcess::closest_y#7 getCharToProcess::closest_y#9 getCharToProcess::return_y#1 getCharToProcess::return_y#7 ] zp ZP_WORD:19 [ getCharToProcess::return_dist#1 getCharToProcess::return_dist#5 getCharToProcess::return_dist#6 getCharToProcess::dist#0 getCharToProcess::return_dist#0 main::center_dist#0 ] -zp ZP_BYTE:21 [ initSquareTables::x#2 initSquareTables::x#1 ] +zp ZP_WORD:21 [ initSprites::sp#2 initSprites::sp#1 ] +reg byte x [ initSprites::i#2 initSprites::i#1 ] +zp ZP_BYTE:23 [ initSquareTables::x#2 initSquareTables::x#1 ] reg byte a [ initSquareTables::x_dist#0 initSquareTables::$4 initSquareTables::$2 ] -zp ZP_BYTE:22 [ initSquareTables::y#2 initSquareTables::y#1 ] +zp ZP_BYTE:24 [ initSquareTables::y#2 initSquareTables::y#1 ] reg byte a [ initSquareTables::y_dist#0 initSquareTables::$12 initSquareTables::$10 ] reg byte a [ mul8u::b#1 ] reg byte a [ mul8u::b#0 ] reg byte x [ mul8u::a#3 mul8u::a#6 mul8u::a#2 mul8u::a#1 mul8u::a#0 ] -zp ZP_WORD:23 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] -zp ZP_WORD:25 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ] +zp ZP_WORD:25 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ] +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:27 [ processChars::i#10 processChars::i#1 ] +zp ZP_BYTE:29 [ processChars::i#10 processChars::i#1 ] reg byte x [ irqTop::i#2 irqTop::i#1 ] reg byte x [ irqTop::i1#2 irqTop::i1#1 ] -reg byte x [ main::$18 ] -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:28 [ startProcessing::center_x#0 ] -zp ZP_BYTE:29 [ startProcessing::center_y#0 ] -reg byte a [ startProcessing::$21 ] -zp ZP_WORD:30 [ startProcessing::$3 startProcessing::$4 startProcessing::spriteX#0 ] -reg byte a [ startProcessing::$6 ] +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 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:32 [ startProcessing::spritePtr#0 ] -zp ZP_WORD:33 [ startProcessing::$11 startProcessing::$31 startProcessing::$12 startProcessing::$13 startProcessing::screenPtr#0 ] -zp ZP_WORD:35 [ startProcessing::$30 ] -reg byte x [ startProcessing::$22 ] +zp ZP_BYTE:40 [ startProcessing::spritePtr#0 ] +reg byte x [ startProcessing::$25 ] reg byte x [ getCharToProcess::$13 ] reg byte a [ getCharToProcess::$14 ] -zp ZP_WORD:37 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] -zp ZP_WORD:39 [ getCharToProcess::$15 ] +zp ZP_WORD:41 [ getCharToProcess::$9 getCharToProcess::$16 getCharToProcess::$10 getCharToProcess::$11 ] +zp ZP_WORD:43 [ getCharToProcess::$15 ] reg byte a [ initSquareTables::$16 ] reg byte a [ initSquareTables::$17 ] reg byte a [ mul8u::$1 ] -reg byte a [ processChars::$18 ] -zp ZP_WORD:41 [ processChars::processing#0 ] -zp ZP_BYTE:43 [ processChars::bitmask#0 ] +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::$12 ] -reg byte a [ processChars::$16 ] +reg byte a [ processChars::$19 ]