1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-23 08:32:39 +00:00

Fixed fragment. blackhole work-in-progress is functional.

This commit is contained in:
jespergravgaard 2019-06-12 22:44:24 +02:00
parent d78fa15fe1
commit b4a0c74cf1
6 changed files with 2978 additions and 2702 deletions

View File

@ -3,3 +3,7 @@ lda ({z1}),y
sec
sbc #1
sta ({z1}),y
iny
lda ({z1}),y
sbc #0
sta ({z1}),y

View File

@ -12,7 +12,7 @@ const byte* SPRITE_DATA = 0x2000;
byte[1000] SCREEN_COPY;
// Max number of chars processed at once
const byte NUM_PROCESSING = 1;
const byte NUM_PROCESSING = 8;
// Struct holding char being processed
@ -56,7 +56,14 @@ 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; sp<SPRITE_DATA+sizeof(SPRITE_DATA); sp++) *sp = 0;
for( byte* sp = SPRITE_DATA; sp<SPRITE_DATA+NUM_PROCESSING*64; sp++) *sp = 0;
// Initialize sprites
for( byte i: 0..7) {
SPRITES_COLS[i] = WHITE;
}
*SPRITES_MC = 0;
*SPRITES_EXPAND_X = 0;
*SPRITES_EXPAND_Y = 0;
// Set-up raster interrupts
setupRasterIrq(RASTER_IRQ_TOP, &irqTop);
// Fill screen with some chars

View File

@ -2,7 +2,6 @@
.pc = $801 "Basic"
:BasicUpstart(main)
.pc = $80d "Program"
.const SIZEOF_POINTER = 2
.const OFFSET_STRUCT_PROCESSINGSPRITE_Y = 2
.const OFFSET_STRUCT_PROCESSINGSPRITE_ID = 3
.const OFFSET_STRUCT_PROCESSINGSPRITE_PTR = 4
@ -23,8 +22,12 @@
.label SPRITES_XMSB = $d010
.label RASTER = $d012
.label SPRITES_ENABLE = $d015
.label SPRITES_EXPAND_Y = $d017
.label SPRITES_MC = $d01c
.label SPRITES_EXPAND_X = $d01d
.label BORDERCOL = $d020
.label BGCOL = $d021
.label SPRITES_COLS = $d027
.label VIC_CONTROL = $d011
// VIC II IRQ Status Register
.label IRQ_STATUS = $d019
@ -46,7 +49,7 @@
// Sprite data for the animating sprites
.label SPRITE_DATA = $2000
// Max number of chars processed at once
.const NUM_PROCESSING = 1
.const NUM_PROCESSING = 8
// Distance value meaning not found
.const NOT_FOUND = $ffff
// Values for ProcessingSprite.status
@ -80,7 +83,7 @@ main: {
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR,x
sta PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR+1,x
iny
cpy #1
cpy #NUM_PROCESSING-1+1
bne b1
lda #<SPRITE_DATA
sta sp
@ -96,13 +99,25 @@ main: {
inc sp+1
!:
lda sp+1
cmp #>SPRITE_DATA+SIZEOF_POINTER
cmp #>SPRITE_DATA+NUM_PROCESSING*$40
bcc b2
bne !+
lda sp
cmp #<SPRITE_DATA+SIZEOF_POINTER
cmp #<SPRITE_DATA+NUM_PROCESSING*$40
bcc b2
!:
ldx #0
// Initialize sprites
b3:
lda #WHITE
sta SPRITES_COLS,x
inx
cpx #8
bne b3
lda #0
sta SPRITES_MC
sta SPRITES_EXPAND_X
sta SPRITES_EXPAND_Y
jsr setupRasterIrq
lda #<SCREEN_COPY
sta dst
@ -115,7 +130,7 @@ main: {
// Fill screen with some chars
//for( byte* sc: SCREEN..SCREEN+999) *sc = 'a'+(<sc&0x1f);
// Copy screen to screen copy
b4:
b5:
ldy #0
lda (src),y
sta (dst),y
@ -129,30 +144,30 @@ main: {
!:
lda src+1
cmp #>SCREEN+$3e8
bne b4
bne b5
lda src
cmp #<SCREEN+$3e8
bne b4
bne b5
jsr initSquareTables
b3:
b4:
// Main loop
jsr getCharToProcess
ldy getCharToProcess.return_x
ldx getCharToProcess.return_y
ldx getCharToProcess.return_x
ldy getCharToProcess.return_y
lda center_dist+1
cmp #>NOT_FOUND
bne b7
bne b8
lda center_dist
cmp #<NOT_FOUND
bne b7
b8:
bne b8
b9:
inc SCREEN+$3e7
jmp b8
b7:
sty startProcessing.center_x
stx startProcessing.center_y
jmp b9
b8:
stx startProcessing.center_x
sty startProcessing.center_y
jsr startProcessing
jmp b3
jmp b4
}
// Start processing a char - by inserting it into the PROCESSING array
// startProcessing(byte zeropage($1c) center_x, byte zeropage($1d) center_y)
@ -326,7 +341,7 @@ startProcessing: {
jmp b1
b3:
inc i
lda #1
lda #NUM_PROCESSING-1+1
cmp i
beq !b2+
jmp b2
@ -687,7 +702,9 @@ processChars: {
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_STATUS
lda (processing),y
cmp #STATUS_FREE
beq b2
bne !b2+
jmp b2
!b2:
lda (processing),y
cmp #STATUS_NEW
bne b3
@ -744,6 +761,11 @@ processChars: {
sec
sbc #1
sta (processing),y
iny
lda (processing),y
sbc #0
sta (processing),y
ldy #0
lda (processing),y
bne b2
iny
@ -760,7 +782,7 @@ processChars: {
sta SPRITES_ENABLE
b2:
inc i
lda #1
lda #NUM_PROCESSING-1+1
cmp i
beq !b1+
jmp b1

View File

@ -12,380 +12,388 @@ main: scope:[main] from @1
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::$17 ← (byte) main::i#2 << (byte) 3
[7] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) main::$17) ← (byte) 0
[8] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) main::$17) ← (byte) 0
[9] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) main::$17) ← (byte) 0
[10] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) main::$17) ← (byte) 0
[11] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) main::$17) ← (const byte) STATUS_FREE#0
[12] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) main::$17) ← (byte*) 0
[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!=(byte) 1) goto main::@1
[14] 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) SIZEOF_POINTER) goto main::@2
[18] if((byte*) main::sp#1<(const byte*) SPRITE_DATA#0+(const byte) NUM_PROCESSING#0*(byte) $40) goto main::@2
to:main::@3
main::@3: scope:[main] from main::@2
[19] phi()
[20] call setupRasterIrq
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
to:main::@4
main::@4: scope:[main] from main::@3 main::@4
[21] (byte*) main::dst#2 ← phi( main::@3/(const byte[$3e8]) SCREEN_COPY#0 main::@4/(byte*) main::dst#1 )
[21] (byte*) main::src#2 ← phi( main::@3/(const byte*) SCREEN#0 main::@4/(byte*) main::src#1 )
[22] *((byte*) main::dst#2) ← *((byte*) main::src#2)
[23] (byte*) main::src#1 ← ++ (byte*) main::src#2
[24] (byte*) main::dst#1 ← ++ (byte*) main::dst#2
[25] if((byte*) main::src#1!=(const byte*) SCREEN#0+(word) $3e8) goto 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
[26] phi()
[27] call initSquareTables
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
to:main::@6
main::@6: scope:[main] from main::@5 main::@7
[28] phi()
[29] call getCharToProcess
[30] (byte) getCharToProcess::return_x#0 ← (byte) getCharToProcess::return_x#1
[31] (byte) getCharToProcess::return_y#0 ← (byte) getCharToProcess::return_y#1
[32] (word) getCharToProcess::return_dist#0 ← (word) getCharToProcess::return_dist#1
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::@6
[33] (byte) main::center_x#0 ← (byte) getCharToProcess::return_x#0
[34] (byte) main::center_y#0 ← (byte) getCharToProcess::return_y#0
[35] (word) main::center_dist#0 ← (word) getCharToProcess::return_dist#0
[36] if((word) main::center_dist#0!=(const word) NOT_FOUND#0) goto main::@7
to:main::@8
main::@8: scope:[main] from main::@8 main::@9
[37] *((const byte*) SCREEN#0+(word) $3e7) ← ++ *((const byte*) SCREEN#0+(word) $3e7)
to:main::@8
main::@7: scope:[main] from main::@9
[38] (byte) startProcessing::center_x#0 ← (byte) main::center_x#0
[39] (byte) startProcessing::center_y#0 ← (byte) main::center_y#0
[40] call startProcessing
to:main::@6
startProcessing: scope:[startProcessing] from main::@7
[41] phi()
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()
to:startProcessing::@1
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
[42] (byte) startProcessing::freeIdx#6 ← phi( startProcessing/(byte) $ff startProcessing::@8/(byte~) startProcessing::freeIdx#7 )
[48] (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
[43] (byte) startProcessing::i#2 ← phi( startProcessing::@1/(byte) 0 startProcessing::@3/(byte) startProcessing::i#1 )
[44] (byte~) startProcessing::$21 ← (byte) startProcessing::i#2 << (byte) 3
[45] 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
[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
to:startProcessing::@4
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
[46] (byte) startProcessing::freeIdx#2 ← phi( startProcessing::@9/(byte~) startProcessing::freeIdx#8 startProcessing::@2/(byte) startProcessing::i#2 )
[47] if((byte) startProcessing::freeIdx#2==(byte) $ff) goto startProcessing::@8
[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
to:startProcessing::@5
startProcessing::@5: scope:[startProcessing] from startProcessing::@4
[48] (word~) startProcessing::$0 ← (word)(byte) startProcessing::freeIdx#2
[49] (word~) startProcessing::$1 ← (word~) startProcessing::$0 << (byte) 6
[50] (byte*) startProcessing::spriteData#0 ← (const byte*) SPRITE_DATA#0 + (word~) startProcessing::$1
[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
to:startProcessing::@6
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
[51] (byte) startProcessing::i1#2 ← phi( startProcessing::@5/(byte) 0 startProcessing::@6/(byte) startProcessing::i1#1 )
[51] (byte*) startProcessing::spriteData#2 ← phi( startProcessing::@5/(byte*) startProcessing::spriteData#0 startProcessing::@6/(byte*) startProcessing::spriteData#1 )
[52] *((byte*) startProcessing::spriteData#2) ← (byte) $ff
[53] (byte*) startProcessing::spriteData#1 ← (byte*) startProcessing::spriteData#2 + (byte) 3
[54] (byte) startProcessing::i1#1 ← ++ (byte) startProcessing::i1#2
[55] if((byte) startProcessing::i1#1!=(byte) 8) goto 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
to:startProcessing::@7
startProcessing::@7: scope:[startProcessing] from startProcessing::@6
[56] (word~) startProcessing::$3 ← (word)(byte) startProcessing::center_x#0
[57] (word~) startProcessing::$4 ← (word~) startProcessing::$3 << (byte) 3
[58] (word) startProcessing::spriteX#0 ← (byte) $18 + (word~) startProcessing::$4
[59] (byte~) startProcessing::$6 ← (byte) startProcessing::center_y#0 << (byte) 3
[60] (byte) startProcessing::spriteY#0 ← (byte) $32 + (byte~) startProcessing::$6
[61] (byte) startProcessing::spritePtr#0 ← (byte)(const byte*) SPRITE_DATA#0/(byte) $40 + (byte) startProcessing::freeIdx#2
[62] (word~) startProcessing::$11 ← (word)(byte) startProcessing::center_y#0
[63] (word) startProcessing::$30 ← (word~) startProcessing::$11 << (byte) 2
[64] (word) startProcessing::$31 ← (word) startProcessing::$30 + (word~) startProcessing::$11
[65] (word~) startProcessing::$12 ← (word) startProcessing::$31 << (byte) 3
[66] (byte*~) startProcessing::$13 ← (const byte*) SCREEN#0 + (word~) startProcessing::$12
[67] (byte*) startProcessing::screenPtr#0 ← (byte*~) startProcessing::$13 + (byte) startProcessing::center_x#0
[68] (byte~) startProcessing::$22 ← (byte) startProcessing::freeIdx#2 << (byte) 3
[69] *((word*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) startProcessing::$22) ← (word) startProcessing::spriteX#0
[70] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y + (byte~) startProcessing::$22) ← (byte) startProcessing::spriteY#0
[71] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID + (byte~) startProcessing::$22) ← (byte) startProcessing::freeIdx#2
[72] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR + (byte~) startProcessing::$22) ← (byte) startProcessing::spritePtr#0
[73] *((byte*)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS + (byte~) startProcessing::$22) ← (const byte) STATUS_NEW#0
[74] *((byte**)(const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0+(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR + (byte~) startProcessing::$22) ← (byte*) startProcessing::screenPtr#0
[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
to:startProcessing::@return
startProcessing::@return: scope:[startProcessing] from startProcessing::@7
[75] return
[81] return
to:@return
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
[76] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
[82] (byte~) startProcessing::freeIdx#7 ← (byte) startProcessing::freeIdx#2
to:startProcessing::@1
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
[77] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
[78] if((byte) startProcessing::i#1!=(byte) 1) goto startProcessing::@2
[83] (byte) startProcessing::i#1 ← ++ (byte) startProcessing::i#2
[84] if((byte) startProcessing::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto startProcessing::@2
to:startProcessing::@9
startProcessing::@9: scope:[startProcessing] from startProcessing::@3
[79] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
[85] (byte~) startProcessing::freeIdx#8 ← (byte) startProcessing::freeIdx#6
to:startProcessing::@4
getCharToProcess: scope:[getCharToProcess] from main::@6
[80] phi()
getCharToProcess: scope:[getCharToProcess] from main::@7
[86] phi()
to:getCharToProcess::@1
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
[81] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[81] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[81] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
[81] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[81] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
[87] (byte) getCharToProcess::closest_y#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_y#1 )
[87] (byte) getCharToProcess::closest_x#9 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::return_x#1 )
[87] (word) getCharToProcess::closest_dist#8 ← phi( getCharToProcess/(const word) NOT_FOUND#0 getCharToProcess::@9/(word~) getCharToProcess::closest_dist#10 )
[87] (byte) getCharToProcess::y#7 ← phi( getCharToProcess/(byte) 0 getCharToProcess::@9/(byte) getCharToProcess::y#1 )
[87] (byte*) getCharToProcess::screen_line#4 ← phi( getCharToProcess/(const byte[$3e8]) SCREEN_COPY#0 getCharToProcess::@9/(byte*) getCharToProcess::screen_line#1 )
to:getCharToProcess::@2
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
[82] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[82] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[82] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
[82] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[83] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
[88] (byte) getCharToProcess::closest_y#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_y#9 getCharToProcess::@10/(byte) getCharToProcess::return_y#1 )
[88] (byte) getCharToProcess::closest_x#7 ← phi( getCharToProcess::@1/(byte) getCharToProcess::closest_x#9 getCharToProcess::@10/(byte) getCharToProcess::return_x#1 )
[88] (word) getCharToProcess::closest_dist#2 ← phi( getCharToProcess::@1/(word) getCharToProcess::closest_dist#8 getCharToProcess::@10/(word~) getCharToProcess::closest_dist#12 )
[88] (byte) getCharToProcess::x#2 ← phi( getCharToProcess::@1/(byte) 0 getCharToProcess::@10/(byte) getCharToProcess::x#1 )
[89] if(*((byte*) getCharToProcess::screen_line#4 + (byte) getCharToProcess::x#2)==(byte) ' ') goto getCharToProcess::@11
to:getCharToProcess::@4
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
[84] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
[85] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
[86] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
[87] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
[90] (byte~) getCharToProcess::$13 ← (byte) getCharToProcess::x#2 << (byte) 1
[91] (byte~) getCharToProcess::$14 ← (byte) getCharToProcess::y#7 << (byte) 1
[92] (word) getCharToProcess::dist#0 ← *((const word[$28]) SQUARES_X#0 + (byte~) getCharToProcess::$13) + *((const word[$19]) SQUARES_Y#0 + (byte~) getCharToProcess::$14)
[93] if((word) getCharToProcess::dist#0>=(word) getCharToProcess::closest_dist#2) goto getCharToProcess::@12
to:getCharToProcess::@5
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
[88] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[89] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
[94] (byte~) getCharToProcess::return_x#7 ← (byte) getCharToProcess::x#2
[95] (byte~) getCharToProcess::return_y#7 ← (byte) getCharToProcess::y#7
to:getCharToProcess::@3
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
[90] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[90] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[90] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
[91] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[92] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
[96] (byte) getCharToProcess::return_y#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_y#7 getCharToProcess::@12/(byte) getCharToProcess::closest_y#7 getCharToProcess::@5/(byte~) getCharToProcess::return_y#7 )
[96] (byte) getCharToProcess::return_x#1 ← phi( getCharToProcess::@11/(byte) getCharToProcess::closest_x#7 getCharToProcess::@12/(byte) getCharToProcess::closest_x#7 getCharToProcess::@5/(byte~) getCharToProcess::return_x#7 )
[96] (word) getCharToProcess::return_dist#1 ← phi( getCharToProcess::@11/(word~) getCharToProcess::return_dist#5 getCharToProcess::@12/(word~) getCharToProcess::return_dist#6 getCharToProcess::@5/(word) getCharToProcess::dist#0 )
[97] (byte) getCharToProcess::x#1 ← ++ (byte) getCharToProcess::x#2
[98] if((byte) getCharToProcess::x#1!=(byte) $28) goto getCharToProcess::@10
to:getCharToProcess::@6
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
[93] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[94] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[95] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
[99] (byte*) getCharToProcess::screen_line#1 ← (byte*) getCharToProcess::screen_line#4 + (byte) $28
[100] (byte) getCharToProcess::y#1 ← ++ (byte) getCharToProcess::y#7
[101] if((byte) getCharToProcess::y#1!=(byte) $19) goto getCharToProcess::@9
to:getCharToProcess::@7
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
[96] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
[102] if((word) getCharToProcess::return_dist#1==(const word) NOT_FOUND#0) goto getCharToProcess::@return
to:getCharToProcess::@8
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
[97] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
[98] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
[99] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
[100] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
[101] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
[102] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
[103] (word~) getCharToProcess::$9 ← (word)(byte) getCharToProcess::return_y#1
[104] (word) getCharToProcess::$15 ← (word~) getCharToProcess::$9 << (byte) 2
[105] (word) getCharToProcess::$16 ← (word) getCharToProcess::$15 + (word~) getCharToProcess::$9
[106] (word~) getCharToProcess::$10 ← (word) getCharToProcess::$16 << (byte) 3
[107] (byte*~) getCharToProcess::$11 ← (const byte[$3e8]) SCREEN_COPY#0 + (word~) getCharToProcess::$10
[108] *((byte*~) getCharToProcess::$11 + (byte) getCharToProcess::return_x#1) ← (byte) ' '
to:getCharToProcess::@return
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
[103] return
[109] return
to:@return
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
[104] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
[110] (word~) getCharToProcess::closest_dist#10 ← (word) getCharToProcess::return_dist#1
to:getCharToProcess::@1
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
[105] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
[111] (word~) getCharToProcess::closest_dist#12 ← (word) getCharToProcess::return_dist#1
to:getCharToProcess::@2
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
[106] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
[112] (word~) getCharToProcess::return_dist#6 ← (word) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
[107] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
[113] (word~) getCharToProcess::return_dist#5 ← (word) getCharToProcess::closest_dist#2
to:getCharToProcess::@3
initSquareTables: scope:[initSquareTables] from main::@5
[108] phi()
initSquareTables: scope:[initSquareTables] from main::@6
[114] phi()
to:initSquareTables::@1
initSquareTables::@1: scope:[initSquareTables] from initSquareTables initSquareTables::@9
[109] (byte) initSquareTables::x#2 ← phi( initSquareTables/(byte) 0 initSquareTables::@9/(byte) initSquareTables::x#1 )
[110] if((byte) initSquareTables::x#2<(byte) $14) goto initSquareTables::@2
[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
[111] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
[117] (byte~) initSquareTables::$2 ← (byte) initSquareTables::x#2 - (byte) $14
to:initSquareTables::@4
initSquareTables::@4: scope:[initSquareTables] from initSquareTables::@2 initSquareTables::@3
[112] (byte) initSquareTables::x_dist#0 ← phi( initSquareTables::@2/(byte~) initSquareTables::$4 initSquareTables::@3/(byte~) initSquareTables::$2 )
[113] (byte) mul8u::a#1 ← (byte) initSquareTables::x_dist#0
[114] (byte) mul8u::b#0 ← (byte) initSquareTables::x_dist#0
[115] call mul8u
[116] (word) mul8u::return#2 ← (word) mul8u::res#2
[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
[117] (word~) initSquareTables::$6 ← (word) mul8u::return#2
[118] (byte~) initSquareTables::$16 ← (byte) initSquareTables::x#2 << (byte) 1
[119] *((const word[$28]) SQUARES_X#0 + (byte~) initSquareTables::$16) ← (word~) initSquareTables::$6
[120] (byte) initSquareTables::x#1 ← ++ (byte) initSquareTables::x#2
[121] if((byte) initSquareTables::x#1!=(byte) $28) goto initSquareTables::@1
[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
[122] (byte) initSquareTables::y#2 ← phi( initSquareTables::@10/(byte) initSquareTables::y#1 initSquareTables::@9/(byte) 0 )
[123] if((byte) initSquareTables::y#2<(byte) $c) goto initSquareTables::@6
[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
[124] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
[130] (byte~) initSquareTables::$10 ← (byte) initSquareTables::y#2 - (byte) $c
to:initSquareTables::@8
initSquareTables::@8: scope:[initSquareTables] from initSquareTables::@6 initSquareTables::@7
[125] (byte) initSquareTables::y_dist#0 ← phi( initSquareTables::@6/(byte~) initSquareTables::$12 initSquareTables::@7/(byte~) initSquareTables::$10 )
[126] (byte) mul8u::a#2 ← (byte) initSquareTables::y_dist#0
[127] (byte) mul8u::b#1 ← (byte) initSquareTables::y_dist#0
[128] call mul8u
[129] (word) mul8u::return#3 ← (word) mul8u::res#2
[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
[130] (word~) initSquareTables::$14 ← (word) mul8u::return#3
[131] (byte~) initSquareTables::$17 ← (byte) initSquareTables::y#2 << (byte) 1
[132] *((const word[$19]) SQUARES_Y#0 + (byte~) initSquareTables::$17) ← (word~) initSquareTables::$14
[133] (byte) initSquareTables::y#1 ← ++ (byte) initSquareTables::y#2
[134] if((byte) initSquareTables::y#1!=(byte) $19) goto initSquareTables::@5
[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
[135] return
to:@return
initSquareTables::@6: scope:[initSquareTables] from initSquareTables::@5
[136] (byte~) initSquareTables::$12 ← (byte) $c - (byte) initSquareTables::y#2
to:initSquareTables::@8
initSquareTables::@2: scope:[initSquareTables] from initSquareTables::@1
[137] (byte~) initSquareTables::$4 ← (byte) $14 - (byte) initSquareTables::x#2
to:initSquareTables::@4
mul8u: scope:[mul8u] from initSquareTables::@4 initSquareTables::@8
[138] (byte) mul8u::a#6 ← phi( initSquareTables::@8/(byte) mul8u::a#2 initSquareTables::@4/(byte) mul8u::a#1 )
[138] (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
[139] (word) mul8u::mb#2 ← phi( mul8u/(word) mul8u::mb#0 mul8u::@3/(word) mul8u::mb#1 )
[139] (word) mul8u::res#2 ← phi( mul8u/(byte) 0 mul8u::@3/(word) mul8u::res#6 )
[139] (byte) mul8u::a#3 ← phi( mul8u/(byte) mul8u::a#6 mul8u::@3/(byte) mul8u::a#0 )
[140] if((byte) mul8u::a#3!=(byte) 0) goto mul8u::@2
to:mul8u::@return
mul8u::@return: scope:[mul8u] from mul8u::@1
[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
[142] (byte~) mul8u::$1 ← (byte) mul8u::a#3 & (byte) 1
[143] if((byte~) mul8u::$1==(byte) 0) goto mul8u::@3
[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
[144] (word) mul8u::res#1 ← (word) mul8u::res#2 + (word) mul8u::mb#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
[145] (word) mul8u::res#6 ← phi( mul8u::@2/(word) mul8u::res#2 mul8u::@4/(word) mul8u::res#1 )
[146] (byte) mul8u::a#0 ← (byte) mul8u::a#3 >> (byte) 1
[147] (word) mul8u::mb#1 ← (word) mul8u::mb#2 << (byte) 1
[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::@3
setupRasterIrq: scope:[setupRasterIrq] from main::@4
asm { sei }
[149] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0
[150] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0
[151] *((const byte*) CIA1_INTERRUPT#0) ← (const byte) CIA_INTERRUPT_CLEAR#0
[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
to:setupRasterIrq::@1
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
[152] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
[158] *((const byte*) VIC_CONTROL#0) ← *((const byte*) VIC_CONTROL#0) & (byte) $7f
to:setupRasterIrq::@2
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
[153] *((const byte*) RASTER#0) ← <(const byte) RASTER_IRQ_TOP#0
[154] *((const byte*) IRQ_ENABLE#0) ← (const byte) IRQ_RASTER#0
[155] *((const void()**) HARDWARE_IRQ#0) ← (const void()*) setupRasterIrq::irqRoutine#0
[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
asm { cli }
to:setupRasterIrq::@return
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
[157] return
[163] return
to:@return
irqBottom: scope:[irqBottom] from
[158] phi()
[164] phi()
to:irqBottom::@1
irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1
[159] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 )
[160] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2
[161] if((byte) irqBottom::i#1!=(byte) 5) goto 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
to:irqBottom::@2
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
[162] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
[163] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
[164] call processChars
[168] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
[169] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
[170] call processChars
to:irqBottom::@3
irqBottom::@3: scope:[irqBottom] from irqBottom::@2
[165] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
[166] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
[167] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[168] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[169] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[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
to:irqBottom::@return
irqBottom::@return: scope:[irqBottom] from irqBottom::@3
[170] return
[176] return
to:@return
processChars: scope:[processChars] from irqBottom::@2
[171] phi()
[177] phi()
to:processChars::@1
processChars::@1: scope:[processChars] from processChars processChars::@2
[172] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[173] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 3
[174] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$18
[175] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[176] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto 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
[177] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
[183] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
to:processChars::@9
processChars::@9: scope:[processChars] from processChars::@8
[178] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[179] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[180] *((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)
[181] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
[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
to:processChars::@3
processChars::@3: scope:[processChars] from processChars::@8 processChars::@9
[182] (byte~) processChars::$9 ← > *((word*)(struct ProcessingSprite*) processChars::processing#0)
[183] if((byte) 0!=(byte~) processChars::$9) goto processChars::@4
[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
[184] (byte~) processChars::$10 ← (byte) $ff ^ (byte) processChars::bitmask#0
[185] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$10
[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
[186] (byte~) processChars::$13 ← (byte) processChars::i#10 << (byte) 1
[187] (byte~) processChars::$12 ← (byte)*((word*)(struct ProcessingSprite*) processChars::processing#0)
[188] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$13) ← (byte~) processChars::$12
[189] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$13) ← *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)
[190] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← -- *((word*)(struct ProcessingSprite*) processChars::processing#0)
[191] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)!=(byte) 0) goto processChars::@2
[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
to:processChars::@7
processChars::@7: scope:[processChars] from processChars::@5
[192] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
[193] (byte~) processChars::$16 ← (byte) $ff ^ (byte) processChars::bitmask#0
[194] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$16
[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
to:processChars::@2
processChars::@2: scope:[processChars] from processChars::@1 processChars::@5 processChars::@7
[195] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[196] if((byte) processChars::i#1!=(byte) 1) goto processChars::@1
[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
to:processChars::@return
processChars::@return: scope:[processChars] from processChars::@2
[197] return
[203] return
to:@return
processChars::@4: scope:[processChars] from processChars::@3
[198] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
[204] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
to:processChars::@5
irqTop: scope:[irqTop] from
[199] phi()
[205] phi()
to:irqTop::@1
irqTop::@1: scope:[irqTop] from irqTop irqTop::@1
[200] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 )
[201] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2
[202] if((byte) irqTop::i#1!=(byte) 5) goto 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
to:irqTop::@2
irqTop::@2: scope:[irqTop] from irqTop::@1
[203] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
[204] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
[209] *((const byte*) BORDERCOL#0) ← (const byte) WHITE#0
[210] *((const byte*) BGCOL#0) ← (const byte) WHITE#0
to:irqTop::@3
irqTop::@3: scope:[irqTop] from irqTop::@2 irqTop::@3
[205] (byte) irqTop::i1#2 ← phi( irqTop::@2/(byte) 0 irqTop::@3/(byte) irqTop::i1#1 )
[206] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2
[207] if((byte) irqTop::i1#1!=(byte) 8) goto 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
to:irqTop::@4
irqTop::@4: scope:[irqTop] from irqTop::@3
[208] *((const byte*) BORDERCOL#0) ← (const byte) LIGHT_BLUE#0
[209] *((const byte*) BGCOL#0) ← (const byte) BLUE#0
[210] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[211] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[212] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[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
to:irqTop::@return
irqTop::@return: scope:[irqTop] from irqTop::@4
[213] return
[219] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@
(word) NOT_FOUND
(const word) NOT_FOUND#0 NOT_FOUND = (word) $ffff
(byte) NUM_PROCESSING
(const byte) NUM_PROCESSING#0 NUM_PROCESSING = (byte) 1
(const byte) NUM_PROCESSING#0 NUM_PROCESSING = (byte) 8
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID OFFSET_STRUCT_PROCESSINGSPRITE_ID = (byte) 3
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_PTR OFFSET_STRUCT_PROCESSINGSPRITE_PTR = (byte) 4
(const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR = (byte) 6
@ -59,9 +59,16 @@
(const byte*) SCREEN#0 SCREEN = (byte*) 1024
(byte[$3e8]) SCREEN_COPY
(const byte[$3e8]) SCREEN_COPY#0 SCREEN_COPY = { fill( $3e8, 0) }
(const byte) SIZEOF_POINTER SIZEOF_POINTER = (byte) 2
(byte*) SPRITES_COLS
(const byte*) SPRITES_COLS#0 SPRITES_COLS = (byte*) 53287
(byte*) SPRITES_ENABLE
(const byte*) SPRITES_ENABLE#0 SPRITES_ENABLE = (byte*) 53269
(byte*) SPRITES_EXPAND_X
(const byte*) SPRITES_EXPAND_X#0 SPRITES_EXPAND_X = (byte*) 53277
(byte*) SPRITES_EXPAND_Y
(const byte*) SPRITES_EXPAND_Y#0 SPRITES_EXPAND_Y = (byte*) 53271
(byte*) SPRITES_MC
(const byte*) SPRITES_MC#0 SPRITES_MC = (byte*) 53276
(byte*) SPRITES_XMSB
(const byte*) SPRITES_XMSB#0 SPRITES_XMSB = (byte*) 53264
(byte*) SPRITES_XPOS
@ -128,11 +135,11 @@
(word~) getCharToProcess::return_dist#5 return_dist zp ZP_WORD:19 2002.0
(word~) getCharToProcess::return_dist#6 return_dist zp ZP_WORD:19 2002.0
(byte) getCharToProcess::return_x
(byte) getCharToProcess::return_x#0 reg byte y 7.333333333333333
(byte) getCharToProcess::return_x#0 reg byte x 7.333333333333333
(byte) getCharToProcess::return_x#1 return_x zp ZP_BYTE:17 242.23529411764704
(byte~) getCharToProcess::return_x#7 return_x zp ZP_BYTE:17 1001.0
(byte) getCharToProcess::return_y
(byte) getCharToProcess::return_y#0 reg byte x 7.333333333333333
(byte) getCharToProcess::return_y#0 reg byte y 7.333333333333333
(byte) getCharToProcess::return_y#1 return_y zp ZP_BYTE:18 228.66666666666669
(byte~) getCharToProcess::return_y#7 return_y zp ZP_BYTE:18 2002.0
(byte*) getCharToProcess::screen_line
@ -195,9 +202,10 @@ 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::$10
(byte~) main::$17 reg byte x 12.833333333333334
(struct ProcessingChar~) main::$11
(byte~) main::$18 reg byte x 12.833333333333334
(label) main::@1
(label) main::@10
(label) main::@2
(label) main::@3
(label) main::@4
@ -210,15 +218,18 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(word) main::center_dist
(word) main::center_dist#0 center_dist zp ZP_WORD:19 22.0
(byte) main::center_x
(byte) main::center_x#0 reg byte y 5.5
(byte) main::center_x#0 reg byte x 5.5
(byte) main::center_y
(byte) main::center_y#0 reg byte x 5.5
(byte) main::center_y#0 reg byte y 5.5
(byte*) main::dst
(byte*) main::dst#1 dst zp ZP_WORD:6 11.0
(byte*) main::dst#2 dst zp ZP_WORD:6 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
@ -339,6 +350,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
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 ]
reg byte x [ startProcessing::freeIdx#6 startProcessing::freeIdx#7 ]
@ -365,11 +377,11 @@ reg byte x [ irqBottom::i#2 irqBottom::i#1 ]
zp ZP_BYTE:27 [ 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::$17 ]
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 ]
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 ]