1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-27 19:50:10 +00:00

Renamed to clearscreen. Added DEBUG.

This commit is contained in:
jespergravgaard 2019-06-16 11:37:06 +02:00
parent bbbb25d9b1
commit ef38dca7af
6 changed files with 1771 additions and 1962 deletions

View File

@ -46,8 +46,8 @@ public class TestPrograms {
}
@Test
public void testBlackhole() throws IOException, URISyntaxException {
compileAndCompare("complex/blackhole/blackhole", log());
public void testClearscreen() throws IOException, URISyntaxException {
compileAndCompare("complex/clearscreen/clearscreen");
}
// TODO: Optimize unused IRQ's away (and other unused funtions that reference each other circularly)

View File

@ -2,6 +2,9 @@
import "c64"
import "multiply"
// Generate debug code (raster time usage etc.)
const bool DEBUG = false;
// Address of the screen
const byte* SCREEN = 0x0400;
// Sprite data for the animating sprites
@ -197,13 +200,15 @@ void processChars() {
processing->vx += VXSIN[xchar];
processing->x += processing->vx;
byte ychar = (byte)(ypos/8) - BORDER_YPOS_TOP/8;
processing->vy += VYSIN[ychar];
processing->vy += VYSIN[ychar];
processing->y += processing->vy;
}
numActive++;
}
}
*(SCREEN+999) = '0'+numActive;
if(DEBUG) {
*(SCREEN+999) = '0'+numActive;
}
}
// SQUARES_X[i] = (i-20)*(i-20)
@ -261,12 +266,14 @@ const byte RASTER_IRQ_TOP = 0x30;
// Raster Interrupt at the top of the screen
interrupt(hardware_all) void irqTop() {
for( byte i: 0..4) {}
//*BORDERCOL = WHITE;
//*BGCOL = WHITE;
for( byte i: 0..7) {}
//*BORDERCOL = LIGHT_BLUE;
//*BGCOL = BLUE;
if(DEBUG) {
for( byte i: 0..4) {}
*BORDERCOL = WHITE;
*BGCOL = WHITE;
for( byte i: 0..7) {}
*BORDERCOL = LIGHT_BLUE;
*BGCOL = BLUE;
}
// Trigger IRQ at the middle of the screen
*RASTER = RASTER_IRQ_MIDDLE;
@ -277,14 +284,18 @@ interrupt(hardware_all) void irqTop() {
const byte RASTER_IRQ_MIDDLE = 0xff;
// Raster Interrupt at the middle of the screen
// Raster Interrupt at the bottom of the screen
interrupt(hardware_all) void irqBottom() {
for( byte i: 0..4) {}
//*BORDERCOL = WHITE;
//*BGCOL = WHITE;
if(DEBUG) {
for( byte i: 0..4) {}
*BORDERCOL = WHITE;
*BGCOL = WHITE;
}
processChars();
//*BORDERCOL = LIGHT_BLUE;
//*BGCOL = BLUE;
if(DEBUG) {
*BORDERCOL = LIGHT_BLUE;
*BGCOL = BLUE;
}
// Trigger IRQ at the top of the screen
*RASTER = RASTER_IRQ_TOP;

View File

@ -755,16 +755,11 @@ mul8u: {
rol mb+1
jmp b1
}
// Raster Interrupt at the middle of the screen
// Raster Interrupt at the bottom of the screen
irqBottom: {
sta rega+1
stx regx+1
sty regy+1
ldx #0
b1:
inx
cpx #5
bne b1
jsr processChars
// Trigger IRQ at the top of the screen
lda #RASTER_IRQ_TOP
@ -786,8 +781,8 @@ irqBottom: {
}
// Process any chars in the PROCESSING array
processChars: {
.label _16 = $38
.label _26 = $36
.label _15 = $38
.label _25 = $36
.label processing = $33
.label bitmask = $35
.label i = $1e
@ -894,19 +889,19 @@ processChars: {
sta SPRITES_XPOS,x
ldy #OFFSET_STRUCT_PROCESSINGSPRITE_Y
lda (processing),y
sta _16
sta _15
iny
lda (processing),y
sta _16+1
lsr _16+1
ror _16
lsr _16+1
ror _16
lsr _16+1
ror _16
lsr _16+1
ror _16
lda _16
sta _15+1
lsr _15+1
ror _15
lsr _15+1
ror _15
lsr _15+1
ror _15
lsr _15+1
ror _15
lda _15
sta ypos
sta SPRITES_YPOS,x
// Move sprite
@ -964,17 +959,15 @@ processChars: {
dey
lda #<YPOS_BOTTOMMOST
cmp (processing),y
bcs !b6+
jmp b6
!b6:
bcc b6
!:
lsr _26+1
ror _26
lsr _26+1
ror _26
lsr _26+1
ror _26
lda _26
lsr _25+1
ror _25
lsr _25+1
ror _25
lsr _25+1
ror _25
lda _25
sec
sbc #BORDER_XPOS_LEFT/8
asl
@ -1038,9 +1031,6 @@ processChars: {
beq !b1+
jmp b1
!b1:
lax numActive
axs #-['0']
stx SCREEN+$3e7
rts
b6:
// Set status to FREE
@ -1064,18 +1054,6 @@ irqTop: {
sta rega+1
stx regx+1
sty regy+1
ldx #0
b1:
inx
cpx #5
bne b1
ldx #0
//*BORDERCOL = WHITE;
//*BGCOL = WHITE;
b2:
inx
cpx #8
bne b2
// Trigger IRQ at the middle of the screen
lda #RASTER_IRQ_MIDDLE
sta RASTER

View File

@ -351,127 +351,108 @@ mul8u::@3: scope:[mul8u] from mul8u::@2 mul8u::@4
irqBottom: scope:[irqBottom] from
[198] phi()
to:irqBottom::@1
irqBottom::@1: scope:[irqBottom] from irqBottom irqBottom::@1
[199] (byte) irqBottom::i#2 ← phi( irqBottom/(byte) 0 irqBottom::@1/(byte) irqBottom::i#1 )
[200] (byte) irqBottom::i#1 ← ++ (byte) irqBottom::i#2
[201] if((byte) irqBottom::i#1!=(byte) 5) goto irqBottom::@1
irqBottom::@1: scope:[irqBottom] from irqBottom
[199] phi()
[200] call processChars
to:irqBottom::@2
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
[202] phi()
[203] call processChars
to:irqBottom::@3
irqBottom::@3: scope:[irqBottom] from irqBottom::@2
[204] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[205] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[206] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
[201] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_TOP#0
[202] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqTop()
[203] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqBottom::@return
irqBottom::@return: scope:[irqBottom] from irqBottom::@3
[207] return
irqBottom::@return: scope:[irqBottom] from irqBottom::@2
[204] return
to:@return
processChars: scope:[processChars] from irqBottom::@2
[208] phi()
processChars: scope:[processChars] from irqBottom::@1
[205] phi()
to:processChars::@1
processChars::@1: scope:[processChars] from processChars processChars::@2
[209] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[209] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[210] (byte) processChars::$64 ← (byte) processChars::i#10 << (byte) 1
[211] (byte) processChars::$65 ← (byte) processChars::$64 + (byte) processChars::i#10
[212] (byte) processChars::$66 ← (byte) processChars::$65 << (byte) 2
[213] (byte~) processChars::$36 ← (byte) processChars::$66 + (byte) processChars::i#10
[214] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$36
[215] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[216] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2
[206] (byte) processChars::numActive#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::numActive#3 )
[206] (byte) processChars::i#10 ← phi( processChars/(byte) 0 processChars::@2/(byte) processChars::i#1 )
[207] (byte) processChars::$65 ← (byte) processChars::i#10 << (byte) 1
[208] (byte) processChars::$66 ← (byte) processChars::$65 + (byte) processChars::i#10
[209] (byte) processChars::$67 ← (byte) processChars::$66 << (byte) 2
[210] (byte~) processChars::$37 ← (byte) processChars::$67 + (byte) processChars::i#10
[211] (struct ProcessingSprite*) processChars::processing#0 ← (const struct ProcessingSprite[NUM_PROCESSING#0]) PROCESSING#0 + (byte~) processChars::$37
[212] (byte) processChars::bitmask#0 ← (byte) 1 << *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_ID)
[213] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)==(const byte) STATUS_FREE#0) goto processChars::@2
to:processChars::@10
processChars::@10: scope:[processChars] from processChars::@1
[217] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
[214] if(*((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)!=(const byte) STATUS_NEW#0) goto processChars::@3
to:processChars::@11
processChars::@11: scope:[processChars] from processChars::@10
[218] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[219] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[220] *((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)
[221] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
[215] *(*((byte**)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)) ← (byte) ' '
[216] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) | (byte) processChars::bitmask#0
[217] *((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)
[218] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_PROCESSING#0
to:processChars::@3
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
[222] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[223] (byte~) processChars::$12 ← > (word) processChars::xpos#0
[224] if((byte) 0!=(byte~) processChars::$12) goto processChars::@4
[219] (word) processChars::xpos#0 ← *((word*)(struct ProcessingSprite*) processChars::processing#0) >> (byte) 4
[220] (byte~) processChars::$11 ← > (word) processChars::xpos#0
[221] if((byte) 0!=(byte~) processChars::$11) goto processChars::@4
to:processChars::@8
processChars::@8: scope:[processChars] from processChars::@3
[225] (byte~) processChars::$13 ← (byte) $ff ^ (byte) processChars::bitmask#0
[226] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$13
[222] (byte~) processChars::$12 ← (byte) $ff ^ (byte) processChars::bitmask#0
[223] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) & (byte~) processChars::$12
to:processChars::@5
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
[227] (byte~) processChars::$18 ← (byte) processChars::i#10 << (byte) 1
[228] (byte~) processChars::$15 ← (byte)(word) processChars::xpos#0
[229] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$18) ← (byte~) processChars::$15
[230] (word~) processChars::$16 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[231] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$16
[232] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$18) ← (byte) processChars::ypos#0
[233] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
to:processChars::@15
processChars::@15: scope:[processChars] from processChars::@5
[234] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
[224] (byte~) processChars::$17 ← (byte) processChars::i#10 << (byte) 1
[225] (byte~) processChars::$14 ← (byte)(word) processChars::xpos#0
[226] *((const byte*) SPRITES_XPOS#0 + (byte~) processChars::$17) ← (byte~) processChars::$14
[227] (word~) processChars::$15 ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) >> (byte) 4
[228] (byte) processChars::ypos#0 ← (byte)(word~) processChars::$15
[229] *((const byte*) SPRITES_YPOS#0 + (byte~) processChars::$17) ← (byte) processChars::ypos#0
[230] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)<(const word) XPOS_LEFTMOST#0) goto processChars::@6
to:processChars::@14
processChars::@14: scope:[processChars] from processChars::@15
[235] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
processChars::@14: scope:[processChars] from processChars::@5
[231] if(*((word*)(struct ProcessingSprite*) processChars::processing#0)>(const word) XPOS_RIGHTMOST#0) goto processChars::@6
to:processChars::@13
processChars::@13: scope:[processChars] from processChars::@14
[236] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
[232] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)<(const word) YPOS_TOPMOST#0) goto processChars::@6
to:processChars::@12
processChars::@12: scope:[processChars] from processChars::@13
[233] if(*((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y)>(const word) YPOS_BOTTOMMOST#0) goto processChars::@6
to:processChars::@9
processChars::@9: scope:[processChars] from processChars::@13
[237] (word~) processChars::$26 ← (word) processChars::xpos#0 >> (byte) 3
[238] (byte~) processChars::$27 ← (byte)(word~) processChars::$26
[239] (byte) processChars::xchar#0 ← (byte~) processChars::$27 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[240] (byte~) processChars::$37 ← (byte) processChars::xchar#0 << (byte) 1
[241] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$37)
[242] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[243] (byte~) processChars::$31 ← (byte) processChars::ypos#0 >> (byte) 3
[244] (byte) processChars::ychar#0 ← (byte~) processChars::$31 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[245] (byte~) processChars::$38 ← (byte) processChars::ychar#0 << (byte) 1
[246] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$38)
[247] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
processChars::@9: scope:[processChars] from processChars::@12
[234] (word~) processChars::$25 ← (word) processChars::xpos#0 >> (byte) 3
[235] (byte~) processChars::$26 ← (byte)(word~) processChars::$25
[236] (byte) processChars::xchar#0 ← (byte~) processChars::$26 - (const byte) BORDER_XPOS_LEFT#0/(byte) 8
[237] (byte~) processChars::$38 ← (byte) processChars::xchar#0 << (byte) 1
[238] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX) + *((const word*) VXSIN#0 + (byte~) processChars::$38)
[239] *((word*)(struct ProcessingSprite*) processChars::processing#0) ← *((word*)(struct ProcessingSprite*) processChars::processing#0) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VX)
[240] (byte~) processChars::$30 ← (byte) processChars::ypos#0 >> (byte) 3
[241] (byte) processChars::ychar#0 ← (byte~) processChars::$30 - (const byte) BORDER_YPOS_TOP#0/(byte) 8
[242] (byte~) processChars::$39 ← (byte) processChars::ychar#0 << (byte) 1
[243] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY) + *((const word*) VYSIN#0 + (byte~) processChars::$39)
[244] *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) ← *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_Y) + *((word*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_VY)
to:processChars::@7
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
[248] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
[245] (byte) processChars::numActive#1 ← ++ (byte) processChars::numActive#10
to:processChars::@2
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
[249] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[250] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[251] if((byte) processChars::i#1!=(const byte) NUM_PROCESSING#0-(byte) 1+(byte) 1) goto processChars::@1
to:processChars::@12
processChars::@12: scope:[processChars] from processChars::@2
[252] (byte~) processChars::$1 ← (byte) '0' + (byte) processChars::numActive#3
[253] *((const byte*) SCREEN#0+(word) $3e7) ← (byte~) processChars::$1
[246] (byte) processChars::numActive#3 ← phi( processChars::@1/(byte) processChars::numActive#10 processChars::@7/(byte) processChars::numActive#1 )
[247] (byte) processChars::i#1 ← ++ (byte) processChars::i#10
[248] 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::@12
[254] return
processChars::@return: scope:[processChars] from processChars::@2
[249] return
to:@return
processChars::@6: scope:[processChars] from processChars::@13 processChars::@14 processChars::@15 processChars::@5
[255] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
[256] (byte~) processChars::$34 ← (byte) $ff ^ (byte) processChars::bitmask#0
[257] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$34
processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5
[250] *((byte*)(struct ProcessingSprite*) processChars::processing#0 + (const byte) OFFSET_STRUCT_PROCESSINGSPRITE_STATUS) ← (const byte) STATUS_FREE#0
[251] (byte~) processChars::$33 ← (byte) $ff ^ (byte) processChars::bitmask#0
[252] *((const byte*) SPRITES_ENABLE#0) ← *((const byte*) SPRITES_ENABLE#0) & (byte~) processChars::$33
to:processChars::@7
processChars::@4: scope:[processChars] from processChars::@3
[258] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
[253] *((const byte*) SPRITES_XMSB#0) ← *((const byte*) SPRITES_XMSB#0) | (byte) processChars::bitmask#0
to:processChars::@5
irqTop: scope:[irqTop] from
[259] phi()
[254] phi()
to:irqTop::@1
irqTop::@1: scope:[irqTop] from irqTop irqTop::@1
[260] (byte) irqTop::i#2 ← phi( irqTop/(byte) 0 irqTop::@1/(byte) irqTop::i#1 )
[261] (byte) irqTop::i#1 ← ++ (byte) irqTop::i#2
[262] if((byte) irqTop::i#1!=(byte) 5) goto irqTop::@1
to:irqTop::@2
irqTop::@2: scope:[irqTop] from irqTop::@1 irqTop::@2
[263] (byte) irqTop::i1#2 ← phi( irqTop::@1/(byte) 0 irqTop::@2/(byte) irqTop::i1#1 )
[264] (byte) irqTop::i1#1 ← ++ (byte) irqTop::i1#2
[265] if((byte) irqTop::i1#1!=(byte) 8) goto irqTop::@2
to:irqTop::@3
irqTop::@3: scope:[irqTop] from irqTop::@2
[266] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[267] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[268] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
irqTop::@1: scope:[irqTop] from irqTop
[255] *((const byte*) RASTER#0) ← (const byte) RASTER_IRQ_MIDDLE#0
[256] *((const void()**) HARDWARE_IRQ#0) ← &interrupt(HARDWARE_ALL)(void()) irqBottom()
[257] *((const byte*) IRQ_STATUS#0) ← (const byte) IRQ_RASTER#0
to:irqTop::@return
irqTop::@return: scope:[irqTop] from irqTop::@3
[269] return
irqTop::@return: scope:[irqTop] from irqTop::@1
[258] return
to:@return

View File

@ -2,6 +2,9 @@
(label) @2
(label) @begin
(label) @end
(byte*) BGCOL
(byte) BLUE
(byte*) BORDERCOL
(byte) BORDER_XPOS_LEFT
(const byte) BORDER_XPOS_LEFT#0 BORDER_XPOS_LEFT = (byte) $18
(word) BORDER_XPOS_RIGHT
@ -18,6 +21,7 @@
(const byte) CIA_INTERRUPT_CLEAR#0 CIA_INTERRUPT_CLEAR = (byte) $7f
(byte*) COLS
(const byte*) COLS#0 COLS = (byte*) 55296
(bool) DEBUG
(void()**) HARDWARE_IRQ
(const void()**) HARDWARE_IRQ#0 HARDWARE_IRQ = (void()**) 65534
(byte*) IRQ_ENABLE
@ -108,6 +112,7 @@
(const word*) VXSIN#0 VXSIN = (word*) 8704
(word*) VYSIN
(const word*) VYSIN#0 VYSIN = (word*) 8832
(byte) WHITE
(word) XPOS_LEFTMOST
(const word) XPOS_LEFTMOST#0 XPOS_LEFTMOST = (word)(const byte) BORDER_XPOS_LEFT#0-(byte) 8<<(byte) 4
(word) XPOS_RIGHTMOST
@ -218,22 +223,13 @@
interrupt(HARDWARE_ALL)(void()) irqBottom()
(label) irqBottom::@1
(label) irqBottom::@2
(label) irqBottom::@3
(label) irqBottom::@return
(byte) irqBottom::i
(byte) irqBottom::i#1 reg byte x 16.5
(byte) irqBottom::i#2 reg byte x 22.0
interrupt(HARDWARE_ALL)(void()) irqTop()
(label) irqTop::@1
(label) irqTop::@2
(label) irqTop::@3
(label) irqTop::@return
(byte) irqTop::i
(byte) irqTop::i#1 reg byte x 16.5
(byte) irqTop::i#2 reg byte x 22.0
(byte) irqTop::i1
(byte) irqTop::i1#1 reg byte x 16.5
(byte) irqTop::i1#2 reg byte x 22.0
(void()) main()
(byte~) main::$16 reg byte x 12.375
(byte) main::$25 reg byte a 22.0
@ -293,29 +289,27 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(word) mul8u::return#2 return zp ZP_WORD:26 22.0
(word) mul8u::return#3 return zp ZP_WORD:26 22.0
(void()) processChars()
(byte~) processChars::$1 reg byte x 4.0
(byte~) processChars::$11 reg byte a 22.0
(byte~) processChars::$12 reg byte a 22.0
(byte~) processChars::$13 reg byte a 22.0
(byte~) processChars::$15 reg byte a 22.0
(word~) processChars::$16 $16 zp ZP_WORD:56 11.0
(byte~) processChars::$18 reg byte x 6.6000000000000005
(word~) processChars::$26 $26 zp ZP_WORD:54 11.0
(byte~) processChars::$27 reg byte a 22.0
(byte~) processChars::$31 reg byte a 22.0
(byte~) processChars::$34 reg byte a 22.0
(byte~) processChars::$36 reg byte a 22.0
(byte~) processChars::$14 reg byte a 22.0
(word~) processChars::$15 $15 zp ZP_WORD:56 11.0
(byte~) processChars::$17 reg byte x 6.6000000000000005
(word~) processChars::$25 $25 zp ZP_WORD:54 11.0
(byte~) processChars::$26 reg byte a 22.0
(byte~) processChars::$30 reg byte a 22.0
(byte~) processChars::$33 reg byte a 22.0
(byte~) processChars::$37 reg byte a 22.0
(byte~) processChars::$38 reg byte a 22.0
(byte) processChars::$64 reg byte a 22.0
(byte~) processChars::$39 reg byte a 22.0
(byte) processChars::$65 reg byte a 22.0
(byte) processChars::$66 reg byte a 22.0
(byte) processChars::$67 reg byte a 22.0
(label) processChars::@1
(label) processChars::@10
(label) processChars::@11
(label) processChars::@12
(label) processChars::@13
(label) processChars::@14
(label) processChars::@15
(label) processChars::@2
(label) processChars::@3
(label) processChars::@4
@ -333,7 +327,7 @@ interrupt(HARDWARE_ALL)(void()) irqTop()
(byte) processChars::numActive
(byte) processChars::numActive#1 numActive zp ZP_BYTE:31 22.0
(byte) processChars::numActive#10 numActive zp ZP_BYTE:31 0.7674418604651163
(byte) processChars::numActive#3 numActive zp ZP_BYTE:31 11.666666666666666
(byte) processChars::numActive#3 numActive zp ZP_BYTE:31 11.0
(struct ProcessingSprite*) processChars::processing
(struct ProcessingSprite*) processChars::processing#0 processing zp ZP_WORD:51 0.3235294117647059
(byte) processChars::xchar
@ -450,11 +444,8 @@ 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:26 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 mul8u::return#2 mul8u::return#3 initSquareTables::$6 initSquareTables::$14 ]
zp ZP_WORD:28 [ mul8u::mb#2 mul8u::mb#0 mul8u::mb#1 ]
reg byte x [ irqBottom::i#2 irqBottom::i#1 ]
zp ZP_BYTE:30 [ processChars::i#10 processChars::i#1 ]
zp ZP_BYTE:31 [ processChars::numActive#10 processChars::numActive#3 processChars::numActive#1 ]
reg byte x [ irqTop::i#2 irqTop::i#1 ]
reg byte x [ irqTop::i1#2 irqTop::i1#1 ]
reg byte a [ main::$25 ]
reg byte a [ main::$26 ]
reg byte a [ main::$27 ]
@ -489,24 +480,23 @@ zp ZP_WORD:49 [ getCharToProcess::$15 ]
reg byte a [ initSquareTables::$16 ]
reg byte a [ initSquareTables::$17 ]
reg byte a [ mul8u::$1 ]
reg byte a [ processChars::$64 ]
reg byte a [ processChars::$65 ]
reg byte a [ processChars::$66 ]
reg byte a [ processChars::$36 ]
reg byte a [ processChars::$67 ]
reg byte a [ processChars::$37 ]
zp ZP_WORD:51 [ processChars::processing#0 ]
zp ZP_BYTE:53 [ processChars::bitmask#0 ]
zp ZP_WORD:54 [ processChars::xpos#0 processChars::$26 ]
zp ZP_WORD:54 [ processChars::xpos#0 processChars::$25 ]
reg byte a [ processChars::$11 ]
reg byte a [ processChars::$12 ]
reg byte a [ processChars::$13 ]
reg byte x [ processChars::$18 ]
reg byte a [ processChars::$15 ]
zp ZP_WORD:56 [ processChars::$16 ]
reg byte x [ processChars::$17 ]
reg byte a [ processChars::$14 ]
zp ZP_WORD:56 [ processChars::$15 ]
zp ZP_BYTE:58 [ processChars::ypos#0 ]
reg byte a [ processChars::$27 ]
reg byte a [ processChars::$26 ]
reg byte a [ processChars::xchar#0 ]
reg byte a [ processChars::$37 ]
reg byte a [ processChars::$31 ]
reg byte a [ processChars::ychar#0 ]
reg byte a [ processChars::$38 ]
reg byte x [ processChars::$1 ]
reg byte a [ processChars::$34 ]
reg byte a [ processChars::$30 ]
reg byte a [ processChars::ychar#0 ]
reg byte a [ processChars::$39 ]
reg byte a [ processChars::$33 ]