diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_eq__deref_pbuc2_then_la1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_eq__deref_pbuc2_then_la1.asm new file mode 100644 index 000000000..28b033d27 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_eq__deref_pbuc2_then_la1.asm @@ -0,0 +1,3 @@ +lda #{c1} +cmp {c2} +beq {la1} \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_neq__deref_pbuc2_then_la1.asm b/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_neq__deref_pbuc2_then_la1.asm new file mode 100644 index 000000000..d0e929e88 --- /dev/null +++ b/src/main/java/dk/camelot64/kickc/fragment/asm/vbuc1_neq__deref_pbuc2_then_la1.asm @@ -0,0 +1,3 @@ +lda #{c1} +cmp {c2} +bne {la1} \ No newline at end of file diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 528da9e98..3f77ea76c 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -45,6 +45,21 @@ public class TestPrograms { AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false); } + @Test + public void testC64DtvBlitterMin() throws IOException, URISyntaxException { + compileAndCompare("c64dtv-blittermin"); + } + + @Test + public void testC64Dtv8bppChunkyStretch() throws IOException, URISyntaxException { + compileAndCompare("c64dtv-8bppchunkystretch"); + } + + @Test + public void testC64Dtv8bppCharStretch() throws IOException, URISyntaxException { + compileAndCompare("c64dtv-8bppcharstretch"); + } + @Test public void testC64DtvGfxExplorer() throws IOException, URISyntaxException { compileAndCompare("c64dtv-gfxexplorer"); diff --git a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppcharstretch.kc b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppcharstretch.kc new file mode 100644 index 000000000..b159b99f8 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppcharstretch.kc @@ -0,0 +1,119 @@ +// C64DTV 8bpp charmode stretcher +import "c64dtv.kc" + +// Plane with the screen +const byte* SCREEN = $7c00; +// Plane with all pixels +const byte* CHARSET8 = $8000; + +void main() { + asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) + // Disable kernal & basic + *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK; + *PROCPORT = PROCPORT_RAM_IO; + gfx_init(); + // Enable DTV extended modes + *DTV_FEATURE = DTV_FEATURE_ENABLE; + // 8BPP Pixel Cell Mode + *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_BADLINE_OFF; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *VIC_CONTROL2 = VIC_MCM | VIC_CSEL; + // Plane A: SCREEN + *DTV_PLANEA_START_LO = < SCREEN; + *DTV_PLANEA_START_MI = > SCREEN; + *DTV_PLANEA_START_HI = 0; + *DTV_PLANEA_STEP = 1; + *DTV_PLANEA_MODULO_LO = 0; + *DTV_PLANEA_MODULO_HI = 0; + // Plane B: CHARSET8 + *DTV_PLANEB_START_LO = < CHARSET8; + *DTV_PLANEB_START_MI = > CHARSET8; + *DTV_PLANEB_START_HI = 0; + *DTV_PLANEB_STEP = 0; + *DTV_PLANEB_MODULO_LO = 0; + *DTV_PLANEB_MODULO_HI = 0; + // VIC Graphics Bank + *CIA2_PORT_A_DDR = %00000011; // Set VIC Bank bits to output - all others to input + *CIA2_PORT_A = %00000011 ^ (byte)((word)SCREEN/$4000); // Set VIC Bank + // VIC memory + *VIC_MEMORY = (byte)((((word)SCREEN)&$3fff)>>6) | ((>(((word)SCREEN)&$3fff))>>2); + + // DTV Palette - Grey Tones + for(byte j : 0..$f) { + DTV_PALETTE[j] = j; + } + while(true) { + // Stabilize Raster + asm { + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #$08 + bne stabilize + } + + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *BORDERCOL = 0; + byte rst = $42; + while(*RASTER!=rst) {} + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + do { + rst = *RASTER; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7); + *BORDERCOL = rst<<4; + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + } while (rst!=$f2); + } +} + + +// Initialize the different graphics in the memory +void gfx_init() { + gfx_init_screen0(); + gfx_init_plane_charset8(); +} + +// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) +void gfx_init_screen0() { + byte* ch=SCREEN; + for(byte cy: 0..24 ) { + for(byte cx: 0..39) { + *ch++ = (cy&$f)<<4|(cx&$f); + } + } +} + +// Initialize Plane with 8bpp charset +void gfx_init_plane_charset8() { + // 8bpp cells for Plane B (charset) - ROM charset with 256 colors + byte gfxbCpuBank = (byte)(CHARSET8/$4000); + dtvSetCpuBankSegment1(gfxbCpuBank++); + byte* gfxa = $4000 + (((word)CHARSET8)& $3fff); + byte* chargen = CHARGEN+1; + *PROCPORT = PROCPORT_RAM_CHARROM; + byte col = 0; + for(byte ch : $00..$ff) { + for ( byte cr : 0..7) { + byte bits = *chargen++; + for ( byte cp : 0..7) { + byte c = 0; + if((bits & $80) != 0) { + c = col; + } + *gfxa++ = c; + bits = bits<<1; + col++; + } + } + } + *PROCPORT = PROCPORT_RAM_IO; + // Reset CPU BANK segment to $4000 + dtvSetCpuBankSegment1((byte)($4000/$4000)); +} diff --git a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppchunkystretch.kc b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppchunkystretch.kc new file mode 100644 index 000000000..5f70763d3 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppchunkystretch.kc @@ -0,0 +1,86 @@ +// C64DTV 8bpp charmode stretcher +import "c64dtv.kc" + +// Plane with all pixels +const byte* CHUNKY = $8000; + +void main() { + asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) + // Disable kernal & basic + *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK; + *PROCPORT = PROCPORT_RAM_IO; + gfx_init_chunky(); + // Enable DTV extended modes + *DTV_FEATURE = DTV_FEATURE_ENABLE; + // 8BPP Pixel Cell Mode + *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_COLORRAM_OFF | DTV_CHUNKY | DTV_BADLINE_OFF; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *VIC_CONTROL2 = VIC_MCM | VIC_CSEL; + // Plane B: CHUNKY + *DTV_PLANEB_START_LO = < CHUNKY; + *DTV_PLANEB_START_MI = > CHUNKY; + *DTV_PLANEB_START_HI = 0; + *DTV_PLANEB_STEP = 8; + *DTV_PLANEB_MODULO_LO = 0; + *DTV_PLANEB_MODULO_HI = 0; + // VIC Graphics Bank + *CIA2_PORT_A_DDR = %00000011; // Set VIC Bank bits to output - all others to input + *CIA2_PORT_A = %00000011 ^ (byte)((word)CHUNKY/$4000); // Set VIC Bank + // VIC memory + *VIC_MEMORY = (byte)((((word)CHUNKY)&$3fff)>>6) | ((>(((word)CHUNKY)&$3fff))>>2); + + // DTV Palette - Grey Tones + for(byte j : 0..$f) { + DTV_PALETTE[j] = j; + } + while(true) { + // Stabilize Raster + asm { + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #$08 + bne stabilize + } + + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *BORDERCOL = 0; + byte rst = $42; + while(*RASTER!=rst) {} + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + do { + rst = *RASTER; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7); + *BORDERCOL = rst<<4; + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + } while (rst!=$f2); + } +} + +// Initialize Plane with 8bpp chunky +void gfx_init_chunky() { + // 320x200 8bpp pixels for Plane + byte gfxbCpuBank = (byte)(CHUNKY/$4000); + dtvSetCpuBankSegment1(gfxbCpuBank++); + byte* gfxb = $4000; + for(byte y : 0..50) { + for (word x : 0..319) { + // If we have crossed to $8000 increase the CPU BANK segment and reset to $4000 + if(gfxb==$8000) { + dtvSetCpuBankSegment1(gfxbCpuBank++); + gfxb = $4000; + } + byte c = (byte)(x+y); + *gfxb++ = c; + } + } + // Reset CPU BANK segment to $4000 + dtvSetCpuBankSegment1((byte)($4000/$4000)); +} diff --git a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc new file mode 100644 index 000000000..c5f6583e6 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc @@ -0,0 +1,48 @@ +import "c64dtv.kc" + +const byte* SCREEN = $400; +const byte[] SRCA = { 'C', 'a', 'm', 'e', 'l', 'o', 't', '!'}; +const byte SRCA_LEN = 8; +const byte[] SRCB = { 1 }; + +void main() { + + *DTV_FEATURE = DTV_FEATURE_ENABLE; + + *DTV_BLITTER_SRCA_LO = SRCA; + *DTV_BLITTER_SRCA_HI = 0; + *DTV_BLITTER_SRCA_MOD_LO = 0; + *DTV_BLITTER_SRCA_MOD_HI = 0; + *DTV_BLITTER_SRCA_LIN_LO = <$100; + *DTV_BLITTER_SRCA_LIN_HI = >$100; + *DTV_BLITTER_SRCA_STEP = $10; // Step 1.0 + + *DTV_BLITTER_SRCB_LO = SRCB; + *DTV_BLITTER_SRCB_HI = 0; + *DTV_BLITTER_SRCB_MOD_LO = 0; + *DTV_BLITTER_SRCB_MOD_HI = 0; + *DTV_BLITTER_SRCB_LIN_LO = <$100; + *DTV_BLITTER_SRCB_LIN_HI = >$100; + *DTV_BLITTER_SRCB_STEP = $00; // Step 0.0 + + *DTV_BLITTER_DEST_LO = SCREEN; + *DTV_BLITTER_DEST_HI = 0; + *DTV_BLITTER_DEST_MOD_LO = 0; + *DTV_BLITTER_DEST_MOD_HI = 0; + *DTV_BLITTER_DEST_LIN_LO = <$100; + *DTV_BLITTER_DEST_LIN_HI = >$100; + *DTV_BLITTER_DEST_STEP = $10; // Step 1.0 + + *DTV_BLITTER_LEN_LO = SRCA_LEN; + *DTV_BLITTER_LEN_HI = 0; + + *DTV_BLITTER_ALU = DTV_BLIT_ADD; + *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT | DTV_BLIT_CLEAR_IRQ; + *DTV_BLITTER_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE; + + *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD; + +} \ No newline at end of file diff --git a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc index 5ea3d0b2f..9a37c6bc3 100644 --- a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc @@ -76,3 +76,109 @@ void dtvSetCpuBankSegment1(byte cpuBankIdx) { .byte $32, $00 } } + +// Blitter Source A Start +const byte* DTV_BLITTER_SRCA_LO = $d320; +const byte* DTV_BLITTER_SRCA_MI = $d321; +const byte* DTV_BLITTER_SRCA_HI = $d322; +// Blitter Source A Modulo +const byte* DTV_BLITTER_SRCA_MOD_LO = $d323; +const byte* DTV_BLITTER_SRCA_MOD_HI = $d324; +// Blitter Source A Line Length +const byte* DTV_BLITTER_SRCA_LIN_LO = $d325; +const byte* DTV_BLITTER_SRCA_LIN_HI = $d326; +// Blitter Source A Step ([7:4] integral part, [3:0] fractional part) +const byte* DTV_BLITTER_SRCA_STEP = $d327; +// Blitter Source B Start +const byte* DTV_BLITTER_SRCB_LO = $d328; +const byte* DTV_BLITTER_SRCB_MI = $d329; +const byte* DTV_BLITTER_SRCB_HI = $d32a; +// Blitter Source B Modulo +const byte* DTV_BLITTER_SRCB_MOD_LO = $d32b; +const byte* DTV_BLITTER_SRCB_MOD_HI = $d32c; +// Blitter Source B Line Length +const byte* DTV_BLITTER_SRCB_LIN_LO = $d32d; +const byte* DTV_BLITTER_SRCB_LIN_HI = $d32e; +// Blitter Source B Step ([7:4] integral part, [3:0] fractional part) +const byte* DTV_BLITTER_SRCB_STEP = $d32f; +// Blitter Destination Start +const byte* DTV_BLITTER_DEST_LO = $d330; +const byte* DTV_BLITTER_DEST_MI = $d331; +const byte* DTV_BLITTER_DEST_HI = $d332; +// Blitter Source B Modulo +const byte* DTV_BLITTER_DEST_MOD_LO = $d333; +const byte* DTV_BLITTER_DEST_MOD_HI = $d334; +// Blitter Source B Line Length +const byte* DTV_BLITTER_DEST_LIN_LO = $d335; +const byte* DTV_BLITTER_DEST_LIN_HI = $d336; +// Blitter Source B Step ([7:4] integral part, [3:0] fractional part) +const byte* DTV_BLITTER_DEST_STEP = $d337; +// Blitter Blit Length +const byte* DTV_BLITTER_LEN_LO = $d338; +const byte* DTV_BLITTER_LEN_HI = $d339; +// Blitter Control +const byte* DTV_BLITTER_CONTROL = $d33a; +// Bit[0] Force Start Strobe when set +const byte DTV_BLIT_FORCE_START = %00000001; +// Bit[1] Source A Direction Positive when set +const byte DTV_BLIT_SRCA_FWD = %00000010; +// Bit[2] Source B Direction Positive when set +const byte DTV_BLIT_SRCB_FWD = %00000100; +// Bit[3] Destination Direction Positive when set +const byte DTV_BLIT_DEST_FWD = %00001000; +// Bit[4] VIC IRQ Start when set +const byte DTV_BLIT_VIC_IRQ = %00010000; +// Bit[5] CIA IRQ Start when set($DCXX CIA) +const byte DTV_BLIT_CIA_IRQ = %00100000; +// Bit[6] V Blank Start when set +const byte DTV_BLIT_VBLANK = %01000000; +// Bit[7] Blitter IRQ Enable when set +const byte DTV_BLIT_IRQ_EN = %10000000; +// Blitter Transparency +const byte* DTV_BLITTER_TRANSPARANCY = $d33b; +// Bit[0] Disable Channel B. +// (data into b port of ALU is forced to %00000000. ALU functions as normal) +const byte DTV_BLIT_DISABLE_B = %00000001; +// Bit[1] Write Transparent Data when set +//(Data will be written if source a data *IS* %00000000. This can be used with channel b and ALU set to OR to write Data masked by source A.) Cycles will be saved if No writes. +const byte DTV_BLIT_WRITE_TRANSPARENT = %00000010; +// Bit[2] Write Non Transparent +// when set (Data will be written if SourceA fetched data is *NOT* %00000000. This may be used combined with channel b data and/or ALU) Cycles will be Saved if no write. Bit[2]==Bit[1]==0: write in any case +const byte DTV_BLIT_WRITE_NONTRANSPARENT = %00000100; +// No transparancy +// Bit[2]==Bit[1]==0: write in any case +const byte DTV_BLIT_TRANSPARANCY_NONE = %00000001; +// Controls the ALU operation +byte* DTV_BLITTER_ALU = $d33e; +// Bit[2:0] Source A right Shift: 000 SourceA Data, 001 LastA[0],SourceA[7:1], ..., 111 LastA[6:0],SourceA[7] +const byte DTV_BLIT_SHIFT0 = %00000000; +const byte DTV_BLIT_SHIFT1 = %00000001; +const byte DTV_BLIT_SHIFT2 = %00000010; +const byte DTV_BLIT_SHIFT3 = %00000011; +const byte DTV_BLIT_SHIFT4 = %00000100; +const byte DTV_BLIT_SHIFT5 = %00000101; +const byte DTV_BLIT_SHIFT6 = %00000110; +const byte DTV_BLIT_SHIFT7 = %00000111; +// Bit[5:3] Minterms/ALU +const byte DTV_BLIT_AND = %00000000; +const byte DTV_BLIT_NAND = %00001000; +const byte DTV_BLIT_NOR = %00010000; +const byte DTV_BLIT_OR = %00011000; +const byte DTV_BLIT_XOR = %00100000; +const byte DTV_BLIT_XNOR = %00101000; +const byte DTV_BLIT_ADD = %00110000; +const byte DTV_BLIT_SUB = %00111000; +// Blitter Control 2 +const byte* DTV_BLITTER_CONTROL2 = $d33f; +// Bit[0] Clear Blitter IRQ +const byte DTV_BLIT_CLEAR_IRQ = %00000001; +// Bit[1] Source A Continue +const byte DTV_BLIT_SRCA_CONT = %00000010; +// Bit[2] Source B Continue +const byte DTV_BLIT_SRCB_CONT = %00000100; +// Bit[3] Destination Continue +const byte DTV_BLIT_DEST_CONT = %00001000; +// Bit[0] Busy when set (When reading) +const byte DTV_BLIT_STATUS_BUSY = %00000001; +// Bit[1] IRQ when set (When reading) +const byte DTV_BLIT_STATUS_IRQ = %00000010; diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.asm b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.asm new file mode 100644 index 000000000..2babe3d5f --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.asm @@ -0,0 +1,306 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label PROCPORT_DDR = 0 + .const PROCPORT_DDR_MEMORY_MASK = 7 + .label PROCPORT = 1 + .const PROCPORT_RAM_IO = $35 + .const PROCPORT_RAM_CHARROM = $31 + .label CHARGEN = $d000 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label VIC_CONTROL = $d011 + .const VIC_ECM = $40 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label VIC_CONTROL2 = $d016 + .const VIC_MCM = $10 + .const VIC_CSEL = 8 + .label VIC_MEMORY = $d018 + .label CIA2_PORT_A = $dd00 + .label CIA2_PORT_A_DDR = $dd02 + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_CONTROL = $d03c + .const DTV_LINEAR = 1 + .const DTV_HIGHCOLOR = 4 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .label DTV_PLANEA_START_LO = $d03a + .label DTV_PLANEA_START_MI = $d03b + .label DTV_PLANEA_START_HI = $d045 + .label DTV_PLANEA_STEP = $d046 + .label DTV_PLANEA_MODULO_LO = $d038 + .label DTV_PLANEA_MODULO_HI = $d039 + .label DTV_PLANEB_START_LO = $d049 + .label DTV_PLANEB_START_MI = $d04a + .label DTV_PLANEB_START_HI = $d04b + .label DTV_PLANEB_STEP = $d04c + .label DTV_PLANEB_MODULO_LO = $d047 + .label DTV_PLANEB_MODULO_HI = $d048 + .label SCREEN = $7c00 + .label CHARSET8 = $8000 + jsr main +main: { + sei + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + lda #PROCPORT_RAM_IO + sta PROCPORT + jsr gfx_init + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF + sta DTV_CONTROL + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + lda #VIC_MCM|VIC_CSEL + sta VIC_CONTROL2 + lda #SCREEN + sta DTV_PLANEA_START_MI + lda #0 + sta DTV_PLANEA_START_HI + lda #1 + sta DTV_PLANEA_STEP + lda #0 + sta DTV_PLANEA_MODULO_LO + sta DTV_PLANEA_MODULO_HI + lda #CHARSET8 + sta DTV_PLANEB_START_MI + lda #0 + sta DTV_PLANEB_START_HI + sta DTV_PLANEB_STEP + sta DTV_PLANEB_MODULO_LO + sta DTV_PLANEB_MODULO_HI + lda #3 + sta CIA2_PORT_A_DDR + lda #3^SCREEN/$4000 + sta CIA2_PORT_A + lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2 + sta VIC_MEMORY + ldx #0 + b1: + txa + sta DTV_PALETTE,x + inx + cpx #$10 + bne b1 + b3: + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #8 + bne stabilize + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + lda #0 + sta BORDERCOL + b5: + lda RASTER + cmp #$42 + bne b5 + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + b8: + ldx RASTER + txa + and #7 + ora #VIC_DEN|VIC_ECM|VIC_RSEL + sta VIC_CONTROL + txa + asl + asl + asl + asl + sta BORDERCOL + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + cpx #$f2 + bne b8 + jmp b3 +} +gfx_init: { + jsr gfx_init_screen0 + jsr gfx_init_plane_charset8 + rts +} +gfx_init_plane_charset8: { + .const gfxbCpuBank = $ff&CHARSET8/$4000 + .label bits = 6 + .label chargen = 3 + .label gfxa = 7 + .label col = 9 + .label cr = 5 + .label ch = 2 + lda #gfxbCpuBank + jsr dtvSetCpuBankSegment1 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + lda #0 + sta ch + sta col + lda #<$4000+(CHARSET8&$3fff) + sta gfxa + lda #>$4000+(CHARSET8&$3fff) + sta gfxa+1 + lda #CHARGEN + sta chargen+1 + b1: + lda #0 + sta cr + b2: + ldy #0 + lda (chargen),y + sta bits + inc chargen + bne !+ + inc chargen+1 + !: + ldx #0 + b3: + lda #$80 + and bits + cmp #0 + beq b5 + lda col + jmp b4 + b5: + lda #0 + b4: + ldy #0 + sta (gfxa),y + inc gfxa + bne !+ + inc gfxa+1 + !: + asl bits + inc col + inx + cpx #8 + bne b3 + inc cr + lda cr + cmp #8 + bne b2 + inc ch + lda ch + bne b1 + lda #PROCPORT_RAM_IO + sta PROCPORT + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + rts +} +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + sta cpuBank + .byte $32, $dd + lda $ff + .byte $32, $00 + rts +} +gfx_init_screen0: { + .label _1 = 5 + .label ch = 3 + .label cy = 2 + lda #SCREEN + sta ch+1 + lda #0 + sta cy + b1: + ldx #0 + b2: + lda #$f + and cy + asl + asl + asl + asl + sta _1 + txa + and #$f + ora _1 + ldy #0 + sta (ch),y + inc ch + bne !+ + inc ch+1 + !: + inx + cpx #$28 + bne b2 + inc cy + lda cy + cmp #$19 + bne b1 + rts +} diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.cfg b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.cfg new file mode 100644 index 000000000..0ca1e8156 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.cfg @@ -0,0 +1,170 @@ +@begin: scope:[] from + [0] phi() [ ] ( ) + to:@5 +@5: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @5 + [3] phi() [ ] ( ) +main: scope:[main] from @5 + asm { sei } + [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) + [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) + [7] call gfx_init param-assignment [ ] ( main:2 [ ] ) + to:main::@17 +main::@17: scope:[main] from main + [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) + [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) + [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) + [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) + [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) + [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) + [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) + to:main::@1 +main::@1: scope:[main] from main::@1 main::@17 + [27] (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [29] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@8 + [31] if(true) goto main::@3 [ ] ( main:2 [ ] ) + to:main::@return +main::@return: scope:[main] from main::@2 + [32] return [ ] ( main:2 [ ] ) + to:@return +main::@3: scope:[main] from main::@2 + asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + to:main::@5 +main::@5: scope:[main] from main::@3 main::@5 + [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) + to:main::@7 +main::@7: scope:[main] from main::@5 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + to:main::@8 +main::@8: scope:[main] from main::@7 main::@8 + [38] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) + [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) + [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$35 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + [45] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) + to:main::@2 +gfx_init: scope:[gfx_init] from main + [46] phi() [ ] ( main:2::gfx_init:7 [ ] ) + [47] call gfx_init_screen0 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + to:gfx_init::@1 +gfx_init::@1: scope:[gfx_init] from gfx_init + [48] phi() [ ] ( main:2::gfx_init:7 [ ] ) + [49] call gfx_init_plane_charset8 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + to:gfx_init::@return +gfx_init::@return: scope:[gfx_init] from gfx_init::@1 + [50] return [ ] ( main:2::gfx_init:7 [ ] ) + to:@return +gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 + [51] phi() [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + [52] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@9 +gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 + [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@1 +gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9 + [54] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN#0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + to:gfx_init_plane_charset8::@2 +gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 + [55] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) + [57] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) + to:gfx_init_plane_charset8::@3 +gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 + [58] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) + [60] if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + to:gfx_init_plane_charset8::@5 +gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 + [61] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ) + to:gfx_init_plane_charset8::@4 +gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 + [62] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@5/(byte~) gfx_init_plane_charset8::c#3 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#2 ] ) + [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [64] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [65] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) + [66] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) + [67] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) + [68] if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) + to:gfx_init_plane_charset8::@6 +gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 + [69] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) + [70] if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) + to:gfx_init_plane_charset8::@7 +gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 + [71] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) + [72] if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) + to:gfx_init_plane_charset8::@8 +gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 + [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + [74] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@return +gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 + [75] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:@return +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 + [76] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 ) [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] ) + [77] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + [79] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + to:@return +gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init + [80] phi() [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + to:gfx_init_screen0::@1 +gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 + [81] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) SCREEN#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ) + [81] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ) + to:gfx_init_screen0::@2 +gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 + [82] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [82] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) + [84] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) + [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) + [86] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ) + [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [88] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ) + [89] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) + [90] if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) + to:gfx_init_screen0::@3 +gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 + [91] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) + [92] if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) + to:gfx_init_screen0::@return +gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 + [93] return [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + to:@return diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.log new file mode 100644 index 000000000..00d8ccbb0 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.log @@ -0,0 +1,4741 @@ +PARSING src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppcharstretch.kc +// C64DTV 8bpp charmode stretcher +import "c64dtv.kc" + +// Plane with the screen +const byte* SCREEN = $7c00; +// Plane with all pixels +const byte* CHARSET8 = $8000; + +void main() { + asm { sei } // Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal) + // Disable kernal & basic + *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK; + *PROCPORT = PROCPORT_RAM_IO; + gfx_init(); + // Enable DTV extended modes + *DTV_FEATURE = DTV_FEATURE_ENABLE; + // 8BPP Pixel Cell Mode + *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_BADLINE_OFF; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *VIC_CONTROL2 = VIC_MCM | VIC_CSEL; + // Plane A: SCREEN + *DTV_PLANEA_START_LO = < SCREEN; + *DTV_PLANEA_START_MI = > SCREEN; + *DTV_PLANEA_START_HI = 0; + *DTV_PLANEA_STEP = 1; + *DTV_PLANEA_MODULO_LO = 0; + *DTV_PLANEA_MODULO_HI = 0; + // Plane B: CHARSET8 + dword plane_b = (dword)CHARSET8; + *DTV_PLANEB_START_LO = < CHARSET8; + *DTV_PLANEB_START_MI = > CHARSET8; + *DTV_PLANEB_START_HI = 0; + *DTV_PLANEB_STEP = 0; + *DTV_PLANEB_MODULO_LO = 0; + *DTV_PLANEB_MODULO_HI = 0; + // VIC Graphics Bank + *CIA2_PORT_A_DDR = %00000011; // Set VIC Bank bits to output - all others to input + *CIA2_PORT_A = %00000011 ^ (byte)((word)SCREEN/$4000); // Set VIC Bank + // VIC memory + *VIC_MEMORY = (byte)((((word)SCREEN)&$3fff)>>6) | ((>(((word)SCREEN)&$3fff))>>2); + + // DTV Palette - Grey Tones + for(byte j : 0..$f) { + DTV_PALETTE[j] = j; + } + while(true) { + // Stabilize Raster + asm { + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop nop nop nop nop nop nop nop nop nop nop nop nop + nop nop nop nop nop nop nop nop nop nop nop nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #$08 + bne stabilize + } + + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3; + *BORDERCOL = 0; + byte rst = $42; + while(*RASTER!=rst) {} + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + do { + rst = *RASTER; + *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7); + *BORDERCOL = rst<<4; + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + } while (rst!=$f2); + } +} + + +// Initialize the different graphics in the memory +void gfx_init() { + gfx_init_screen0(); + gfx_init_plane_charset8(); +} + +// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos) +void gfx_init_screen0() { + byte* ch=SCREEN; + for(byte cy: 0..24 ) { + for(byte cx: 0..39) { + *ch++ = (cy&$f)<<4|(cx&$f); + } + } +} + +// Initialize Plane with 8bpp charset +void gfx_init_plane_charset8() { + // 8bpp cells for Plane B (charset) - ROM charset with 256 colors + byte gfxbCpuBank = (byte)(CHARSET8/$4000); + dtvSetCpuBankSegment1(gfxbCpuBank++); + byte* gfxa = $4000 + (((word)CHARSET8)& $3fff); + byte* chargen = CHARGEN; + *PROCPORT = PROCPORT_RAM_CHARROM; + byte col = 0; + for(byte ch : $00..$ff) { + for ( byte cr : 0..7) { + byte bits = *chargen++; + for ( byte cp : 0..7) { + byte c = 0; + if((bits & $80) != 0) { + c = col; + } + *gfxa++ = c; + bits = bits<<1; + col++; + } + } + } + *PROCPORT = PROCPORT_RAM_IO; + // Reset CPU BANK segment to $4000 + dtvSetCpuBankSegment1((byte)($4000/$4000)); +} + +Importing c64dtv.kc +PARSING src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc +// C64 DTV version 2 Registers and Constants +// +// Sources +// (J) https://www.c64-wiki.com/wiki/C64DTV_Programming_Guide +// (H) http://dtvhacking.cbm8bit.com/dtv_wiki/images/d/d9/Dtv_registers_full.txt + +import "c64.kc" + +// Feature enables or disables the extra C64 DTV features +const byte* DTV_FEATURE = $d03f; +const byte DTV_FEATURE_ENABLE = 1; +const byte DTV_FEATURE_DISABLE_TIL_RESET = 2; + +// Controls the graphics modes of the C64 DTV +const byte* DTV_CONTROL = $d03c; +const byte DTV_LINEAR = $01; +const byte DTV_BORDER_OFF = $02; +const byte DTV_HIGHCOLOR = $04; +const byte DTV_OVERSCAN = $08; +const byte DTV_COLORRAM_OFF = $10; +const byte DTV_BADLINE_OFF = $20; +const byte DTV_CHUNKY = $40; + +// Defines colors for the 16 first colors ($00-$0f) +const byte* DTV_PALETTE = $d200; + +// Default vallues for the palette +byte[16] DTV_PALETTE_DEFAULT = { $00, $0f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, $05, $07, $df, $9a, $0a }; + +// Linear Graphics Plane A Counter Control +const byte* DTV_PLANEA_START_LO = $d03a; +const byte* DTV_PLANEA_START_MI = $d03b; +const byte* DTV_PLANEA_START_HI = $d045; +const byte* DTV_PLANEA_STEP = $d046; +const byte* DTV_PLANEA_MODULO_LO = $d038; +const byte* DTV_PLANEA_MODULO_HI = $d039; + +// Linear Graphics Plane B Counter Control +const byte* DTV_PLANEB_START_LO = $d049; +const byte* DTV_PLANEB_START_MI = $d04a; +const byte* DTV_PLANEB_START_HI = $d04b; +const byte* DTV_PLANEB_STEP = $d04c; +const byte* DTV_PLANEB_MODULO_LO = $d047; +const byte* DTV_PLANEB_MODULO_HI = $d048; + +// Select memory bank where sprite data is fetched from (bits 5:0) - source only (J) +// Memory address of Sprite RAM is SpriteBank*$10000 +const byte* DTV_SPRITE_BANK = $d04d; + +// Select memory bank where color data is fetched from (bits 11:0) +// Memory address of Color RAM is ColorBank*$400 +const byte* DTV_COLOR_BANK_LO = $d036; +const byte* DTV_COLOR_BANK_HI = $d037; + +const dword DTV_COLOR_BANK_DEFAULT = $1d800; + +// Selects memory bank for normal VIC color mode and lower data for high color modes. (bits 5:0) +// Memory address of VIC Graphics is GraphicsBank*$10000 +const byte* DTV_GRAPHICS_VIC_BANK = $d03d; +// Selects memory bank for upper data for high color modes. (bits 5:0) - source only (H) +const byte* DTV_GRAPHICS_HICOL_BANK = $d03e; + +// Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff) +// This sets which actual memory is addressed when the CPU reads/writes to $4000-$7fff +// The actual memory addressed will be $4000*cpuSegmentIdx +void dtvSetCpuBankSegment1(byte cpuBankIdx) { + // Move CPU BANK 1 SEGMENT ($4000-$7fff) + byte* cpuBank = $ff; + *cpuBank = cpuBankIdx; + asm { + // SAC $dd - A register points to 13 BANK 1 segment + .byte $32, $dd + // LDA $ff - Set CPU BANK 1 SEGMENT ($4000-$7fff) to ($ff)*$4000 + lda $ff + // SAC $00 - A register points to 0 ACCUMULATOR + .byte $32, $00 + } +} + +Importing c64.kc +PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc +// Commodore 64 Registers and Constants + +// Processor port data direction register +const byte* PROCPORT_DDR = $00; +// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written +const byte PROCPORT_DDR_MEMORY_MASK = %00000111; + +// Processor Port Register controlling RAM/ROM configuration and the datasette +const byte* PROCPORT = $01; +// RAM in all three areas $A000, $D000, $E000 +const byte PROCPORT_RAM_ALL = %00110000; +// RAM in $A000, $E000 I/O in $D000 +const byte PROCPORT_RAM_IO = %00110101; +// RAM in $A000, $E000 CHAR ROM in $D000 +const byte PROCPORT_RAM_CHARROM = %00110001; +// RAM in $A000, I/O in $D000, KERNEL in $E000 +const byte PROCPORT_KERNEL_IO = %00110110; +// BASIC in $A000, I/O in $D000, KERNEL in $E000 +const byte PROCPORT_BASIC_KERNEL_IO = %00110111; + +const byte* CHARGEN = $d000; + +const byte* SPRITES_XPOS = $d000; +const byte* SPRITES_YPOS = $d001; +const byte* SPRITES_XMSB = $d010; +const byte* RASTER = $d012; +const byte* SPRITES_ENABLE = $d015; +const byte* SPRITES_EXPAND_Y = $d017; +const byte* SPRITES_PRIORITY = $d01b; +const byte* SPRITES_MC = $d01c; +const byte* SPRITES_EXPAND_X = $d01d; +const byte* BORDERCOL = $d020; +const byte* BGCOL = $d021; +const byte* BGCOL1 = $d021; +const byte* BGCOL2 = $d022; +const byte* BGCOL3 = $d023; +const byte* BGCOL4 = $d024; +const byte* SPRITES_MC1 = $d025; +const byte* SPRITES_MC2 = $d026; +const byte* SPRITES_COLS = $d027; + +const byte* VIC_CONTROL = $d011; +const byte* D011 = $d011; +const byte VIC_RST8 = %10000000; +const byte VIC_ECM = %01000000; +const byte VIC_BMM = %00100000; +const byte VIC_DEN = %00010000; +const byte VIC_RSEL = %00001000; + +const byte* VIC_CONTROL2 = $d016; +const byte* D016 = $d016; +const byte VIC_MCM = %00010000; +const byte VIC_CSEL = %00001000; + +const byte* D018 = $d018; +const byte* VIC_MEMORY = $d018; + +const byte* COLS = $d800; + +// CIA#1 Port A: keyboard matrix columns and joystick #2 +const byte* CIA1_PORT_A = $dc00; +// CIA#1 Port B: keyboard matrix rows and joystick #1. +const byte* CIA1_PORT_B = $dc01; +// CIA #1 Port A data direction register. +const byte* CIA1_PORT_A_DDR = $dc02; +// CIA #1 Port B data direction register. +const byte* CIA1_PORT_B_DDR = $dc03; + +// CIA#2 Port A: Serial bus, RS-232, VIC memory bank +const byte* CIA2_PORT_A = $dd00; +// CIA#2 Port B: RS-232 +const byte* CIA2_PORT_B = $dd01; +// CIA #2 Port A data direction register. +const byte* CIA2_PORT_A_DDR = $dd02; +// CIA #2 Port B data direction register. +const byte* CIA2_PORT_B_DDR = $dd03; + +const byte BLACK = $0; +const byte WHITE = $1; +const byte RED = $2; +const byte CYAN = $3; +const byte PURPLE = $4; +const byte GREEN = $5; +const byte BLUE = $6; +const byte YELLOW = $7; +const byte ORANGE = $8; +const byte BROWN = $9; +const byte PINK = $a; +const byte DARK_GREY= $b; +const byte GREY = $c; +const byte LIGHT_GREEN = $d; +const byte LIGHT_BLUE = $e; +const byte LIGHT_GREY = $f; + +Adding pre/post-modifier (byte*) gfx_init_screen0::ch ← ++ (byte*) gfx_init_screen0::ch +Adding pre/post-modifier (byte) gfx_init_plane_charset8::gfxbCpuBank ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank +Adding pre/post-modifier (byte*) gfx_init_plane_charset8::chargen ← ++ (byte*) gfx_init_plane_charset8::chargen +Adding pre/post-modifier (byte*) gfx_init_plane_charset8::gfxa ← ++ (byte*) gfx_init_plane_charset8::gfxa +Adding pre/post-modifier (byte) gfx_init_plane_charset8::col ← ++ (byte) gfx_init_plane_charset8::col + +STATEMENTS + (byte*) PROCPORT_DDR ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte*) PROCPORT ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) PROCPORT_RAM_ALL ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) PROCPORT_RAM_IO ← (byte/signed byte/word/signed word/dword/signed dword) 53 + (byte) PROCPORT_RAM_CHARROM ← (byte/signed byte/word/signed word/dword/signed dword) 49 + (byte) PROCPORT_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 54 + (byte) PROCPORT_BASIC_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 55 + (byte*) CHARGEN ← (word/dword/signed dword) 53248 + (byte*) SPRITES_XPOS ← (word/dword/signed dword) 53248 + (byte*) SPRITES_YPOS ← (word/dword/signed dword) 53249 + (byte*) SPRITES_XMSB ← (word/dword/signed dword) 53264 + (byte*) RASTER ← (word/dword/signed dword) 53266 + (byte*) SPRITES_ENABLE ← (word/dword/signed dword) 53269 + (byte*) SPRITES_EXPAND_Y ← (word/dword/signed dword) 53271 + (byte*) SPRITES_PRIORITY ← (word/dword/signed dword) 53275 + (byte*) SPRITES_MC ← (word/dword/signed dword) 53276 + (byte*) SPRITES_EXPAND_X ← (word/dword/signed dword) 53277 + (byte*) BORDERCOL ← (word/dword/signed dword) 53280 + (byte*) BGCOL ← (word/dword/signed dword) 53281 + (byte*) BGCOL1 ← (word/dword/signed dword) 53281 + (byte*) BGCOL2 ← (word/dword/signed dword) 53282 + (byte*) BGCOL3 ← (word/dword/signed dword) 53283 + (byte*) BGCOL4 ← (word/dword/signed dword) 53284 + (byte*) SPRITES_MC1 ← (word/dword/signed dword) 53285 + (byte*) SPRITES_MC2 ← (word/dword/signed dword) 53286 + (byte*) SPRITES_COLS ← (word/dword/signed dword) 53287 + (byte*) VIC_CONTROL ← (word/dword/signed dword) 53265 + (byte*) D011 ← (word/dword/signed dword) 53265 + (byte) VIC_RST8 ← (byte/word/signed word/dword/signed dword) 128 + (byte) VIC_ECM ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) VIC_BMM ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) VIC_DEN ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_RSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_CONTROL2 ← (word/dword/signed dword) 53270 + (byte*) D016 ← (word/dword/signed dword) 53270 + (byte) VIC_MCM ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_CSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) D018 ← (word/dword/signed dword) 53272 + (byte*) VIC_MEMORY ← (word/dword/signed dword) 53272 + (byte*) COLS ← (word/dword/signed dword) 55296 + (byte*) CIA1_PORT_A ← (word/dword/signed dword) 56320 + (byte*) CIA1_PORT_B ← (word/dword/signed dword) 56321 + (byte*) CIA1_PORT_A_DDR ← (word/dword/signed dword) 56322 + (byte*) CIA1_PORT_B_DDR ← (word/dword/signed dword) 56323 + (byte*) CIA2_PORT_A ← (word/dword/signed dword) 56576 + (byte*) CIA2_PORT_B ← (word/dword/signed dword) 56577 + (byte*) CIA2_PORT_A_DDR ← (word/dword/signed dword) 56578 + (byte*) CIA2_PORT_B_DDR ← (word/dword/signed dword) 56579 + (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10 + (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11 + (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12 + (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13 + (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14 + (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte*) DTV_FEATURE ← (word/dword/signed dword) 53311 + (byte) DTV_FEATURE_ENABLE ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_FEATURE_DISABLE_TIL_RESET ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) DTV_CONTROL ← (word/dword/signed dword) 53308 + (byte) DTV_LINEAR ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BORDER_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_HIGHCOLOR ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_OVERSCAN ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_CHUNKY ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte*) DTV_PALETTE ← (word/dword/signed dword) 53760 + (byte[16]) DTV_PALETTE_DEFAULT ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 54, (byte/word/signed word/dword/signed dword) 190, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 219, (byte/word/signed word/dword/signed dword) 134, (byte/word/signed word/dword/signed dword) 255, (byte/signed byte/word/signed word/dword/signed dword) 41, (byte/signed byte/word/signed word/dword/signed dword) 38, (byte/signed byte/word/signed word/dword/signed dword) 59, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 154, (byte/signed byte/word/signed word/dword/signed dword) 10 } + (byte*) DTV_PLANEA_START_LO ← (word/dword/signed dword) 53306 + (byte*) DTV_PLANEA_START_MI ← (word/dword/signed dword) 53307 + (byte*) DTV_PLANEA_START_HI ← (word/dword/signed dword) 53317 + (byte*) DTV_PLANEA_STEP ← (word/dword/signed dword) 53318 + (byte*) DTV_PLANEA_MODULO_LO ← (word/dword/signed dword) 53304 + (byte*) DTV_PLANEA_MODULO_HI ← (word/dword/signed dword) 53305 + (byte*) DTV_PLANEB_START_LO ← (word/dword/signed dword) 53321 + (byte*) DTV_PLANEB_START_MI ← (word/dword/signed dword) 53322 + (byte*) DTV_PLANEB_START_HI ← (word/dword/signed dword) 53323 + (byte*) DTV_PLANEB_STEP ← (word/dword/signed dword) 53324 + (byte*) DTV_PLANEB_MODULO_LO ← (word/dword/signed dword) 53319 + (byte*) DTV_PLANEB_MODULO_HI ← (word/dword/signed dword) 53320 + (byte*) DTV_SPRITE_BANK ← (word/dword/signed dword) 53325 + (byte*) DTV_COLOR_BANK_LO ← (word/dword/signed dword) 53302 + (byte*) DTV_COLOR_BANK_HI ← (word/dword/signed dword) 53303 + (dword) DTV_COLOR_BANK_DEFAULT ← (dword/signed dword) 120832 + (byte*) DTV_GRAPHICS_VIC_BANK ← (word/dword/signed dword) 53309 + (byte*) DTV_GRAPHICS_HICOL_BANK ← (word/dword/signed dword) 53310 +proc (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) + (byte*) dtvSetCpuBankSegment1::cpuBank ← (byte/word/signed word/dword/signed dword) 255 + *((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx + asm { .byte$32,$dd lda$ff .byte$32,$00 } +dtvSetCpuBankSegment1::@return: + return +endproc // dtvSetCpuBankSegment1() + (byte*) SCREEN ← (word/signed word/dword/signed dword) 31744 + (byte*) CHARSET8 ← (word/dword/signed dword) 32768 +proc (void()) main() + asm { sei } + *((byte*) PROCPORT_DDR) ← (byte) PROCPORT_DDR_MEMORY_MASK + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_IO + (void~) main::$0 ← call gfx_init + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$1 ← (byte) DTV_HIGHCOLOR | (byte) DTV_LINEAR + (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_CHUNKY + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_BADLINE_OFF + *((byte*) DTV_CONTROL) ← (byte~) main::$3 + (byte~) main::$4 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$5 ← (byte~) main::$4 | (byte) VIC_RSEL + (byte/word/dword~) main::$6 ← (byte~) main::$5 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$6 + (byte~) main::$7 ← (byte) VIC_MCM | (byte) VIC_CSEL + *((byte*) VIC_CONTROL2) ← (byte~) main::$7 + (byte~) main::$8 ← < (byte*) SCREEN + *((byte*) DTV_PLANEA_START_LO) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN + *((byte*) DTV_PLANEA_START_MI) ← (byte~) main::$9 + *((byte*) DTV_PLANEA_START_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 1 + *((byte*) DTV_PLANEA_MODULO_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_MODULO_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (dword~) main::$10 ← ((dword)) (byte*) CHARSET8 + (dword) main::plane_b ← (dword~) main::$10 + (byte~) main::$11 ← < (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$11 + (byte~) main::$12 ← > (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$12 + *((byte*) DTV_PLANEB_START_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) CIA2_PORT_A_DDR) ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (word~) main::$13 ← ((word)) (byte*) SCREEN + (word/signed dword/dword~) main::$14 ← (word~) main::$13 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$15 ← ((byte)) (word/signed dword/dword~) main::$14 + (byte/word/dword~) main::$16 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$15 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$16 + (word~) main::$17 ← ((word)) (byte*) SCREEN + (word~) main::$18 ← (word~) main::$17 & (word/signed word/dword/signed dword) 16383 + (word~) main::$19 ← (word~) main::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$20 ← ((byte)) (word~) main::$19 + (word~) main::$21 ← ((word)) (byte*) SCREEN + (word~) main::$22 ← (word~) main::$21 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$23 ← > (word~) main::$22 + (byte~) main::$24 ← (byte~) main::$23 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$25 ← (byte~) main::$20 | (byte~) main::$24 + *((byte*) VIC_MEMORY) ← (byte~) main::$25 + (byte) main::j ← (byte/signed byte/word/signed word/dword/signed dword) 0 +main::@1: + *((byte*) DTV_PALETTE + (byte) main::j) ← (byte) main::j + (byte) main::j ← ++ (byte) main::j + (boolean~) main::$26 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$26) goto main::@1 +main::@2: + if(true) goto main::@3 + goto main::@4 +main::@3: + asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + (byte~) main::$27 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$28 ← (byte~) main::$27 | (byte) VIC_RSEL + (byte/word/dword~) main::$29 ← (byte~) main::$28 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$29 + *((byte*) BORDERCOL) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::rst ← (byte/signed byte/word/signed word/dword/signed dword) 66 +main::@5: + (boolean~) main::$30 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$30) goto main::@6 + goto main::@7 +main::@6: + goto main::@5 +main::@7: + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } +main::@8: + (byte) main::rst ← *((byte*) RASTER) + (byte~) main::$31 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$32 ← (byte~) main::$31 | (byte) VIC_RSEL + (byte~) main::$33 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$34 ← (byte~) main::$32 | (byte~) main::$33 + *((byte*) VIC_CONTROL) ← (byte~) main::$34 + (byte~) main::$35 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$35 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$36 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$36) goto main::@8 + goto main::@2 +main::@4: +main::@return: + return +endproc // main() +proc (void()) gfx_init() + (void~) gfx_init::$0 ← call gfx_init_screen0 + (void~) gfx_init::$1 ← call gfx_init_plane_charset8 +gfx_init::@return: + return +endproc // gfx_init() +proc (void()) gfx_init_screen0() + (byte*) gfx_init_screen0::ch ← (byte*) SCREEN + (byte) gfx_init_screen0::cy ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_screen0::@1: + (byte) gfx_init_screen0::cx ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_screen0::@2: + (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 + *((byte*) gfx_init_screen0::ch) ← (byte~) gfx_init_screen0::$3 + (byte*) gfx_init_screen0::ch ← ++ (byte*) gfx_init_screen0::ch + (byte) gfx_init_screen0::cx ← ++ (byte) gfx_init_screen0::cx + (boolean~) gfx_init_screen0::$4 ← (byte) gfx_init_screen0::cx != (byte/signed byte/word/signed word/dword/signed dword) 40 + if((boolean~) gfx_init_screen0::$4) goto gfx_init_screen0::@2 + (byte) gfx_init_screen0::cy ← ++ (byte) gfx_init_screen0::cy + (boolean~) gfx_init_screen0::$5 ← (byte) gfx_init_screen0::cy != (byte/signed byte/word/signed word/dword/signed dword) 25 + if((boolean~) gfx_init_screen0::$5) goto gfx_init_screen0::@1 +gfx_init_screen0::@return: + return +endproc // gfx_init_screen0() +proc (void()) gfx_init_plane_charset8() + (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (byte*~) gfx_init_plane_charset8::$0 + (byte) gfx_init_plane_charset8::gfxbCpuBank ← (byte~) gfx_init_plane_charset8::$1 + (void~) gfx_init_plane_charset8::$2 ← call dtvSetCpuBankSegment1 (byte) gfx_init_plane_charset8::gfxbCpuBank + (byte) gfx_init_plane_charset8::gfxbCpuBank ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank + (word~) gfx_init_plane_charset8::$3 ← ((word)) (byte*) CHARSET8 + (word~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (word/signed word/dword/signed dword) 16383 + (word/signed dword/dword~) gfx_init_plane_charset8::$5 ← (word/signed word/dword/signed dword) 16384 + (word~) gfx_init_plane_charset8::$4 + (byte*) gfx_init_plane_charset8::gfxa ← (word/signed dword/dword~) gfx_init_plane_charset8::$5 + (byte*) gfx_init_plane_charset8::chargen ← (byte*) CHARGEN + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_CHARROM + (byte) gfx_init_plane_charset8::col ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) gfx_init_plane_charset8::ch ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_plane_charset8::@1: + (byte) gfx_init_plane_charset8::cr ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_plane_charset8::@2: + (byte) gfx_init_plane_charset8::bits ← *((byte*) gfx_init_plane_charset8::chargen) + (byte*) gfx_init_plane_charset8::chargen ← ++ (byte*) gfx_init_plane_charset8::chargen + (byte) gfx_init_plane_charset8::cp ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_plane_charset8::@3: + (byte) gfx_init_plane_charset8::c ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$6 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$8 ← ! (boolean~) gfx_init_plane_charset8::$7 + if((boolean~) gfx_init_plane_charset8::$8) goto gfx_init_plane_charset8::@4 + (byte) gfx_init_plane_charset8::c ← (byte) gfx_init_plane_charset8::col +gfx_init_plane_charset8::@4: + *((byte*) gfx_init_plane_charset8::gfxa) ← (byte) gfx_init_plane_charset8::c + (byte*) gfx_init_plane_charset8::gfxa ← ++ (byte*) gfx_init_plane_charset8::gfxa + (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits << (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) gfx_init_plane_charset8::bits ← (byte~) gfx_init_plane_charset8::$9 + (byte) gfx_init_plane_charset8::col ← ++ (byte) gfx_init_plane_charset8::col + (byte) gfx_init_plane_charset8::cp ← ++ (byte) gfx_init_plane_charset8::cp + (boolean~) gfx_init_plane_charset8::$10 ← (byte) gfx_init_plane_charset8::cp != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$10) goto gfx_init_plane_charset8::@3 + (byte) gfx_init_plane_charset8::cr ← ++ (byte) gfx_init_plane_charset8::cr + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cr != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) goto gfx_init_plane_charset8::@2 + (byte) gfx_init_plane_charset8::ch ← ++ (byte) gfx_init_plane_charset8::ch + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::ch != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$12) goto gfx_init_plane_charset8::@1 + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_IO + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$14 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 + (void~) gfx_init_plane_charset8::$15 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_plane_charset8::$14 +gfx_init_plane_charset8::@return: + return +endproc // gfx_init_plane_charset8() + call main + +SYMBOLS +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CHARSET8 +(byte*) CIA1_PORT_A +(byte*) CIA1_PORT_A_DDR +(byte*) CIA1_PORT_B +(byte*) CIA1_PORT_B_DDR +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_B +(byte*) CIA2_PORT_B_DDR +(byte*) COLS +(byte) CYAN +(byte*) D011 +(byte*) D016 +(byte*) D018 +(byte) DARK_GREY +(byte) DTV_BADLINE_OFF +(byte) DTV_BORDER_OFF +(byte) DTV_CHUNKY +(byte) DTV_COLORRAM_OFF +(dword) DTV_COLOR_BANK_DEFAULT +(byte*) DTV_COLOR_BANK_HI +(byte*) DTV_COLOR_BANK_LO +(byte*) DTV_CONTROL +(byte*) DTV_FEATURE +(byte) DTV_FEATURE_DISABLE_TIL_RESET +(byte) DTV_FEATURE_ENABLE +(byte*) DTV_GRAPHICS_HICOL_BANK +(byte*) DTV_GRAPHICS_VIC_BANK +(byte) DTV_HIGHCOLOR +(byte) DTV_LINEAR +(byte) DTV_OVERSCAN +(byte*) DTV_PALETTE +(byte[16]) DTV_PALETTE_DEFAULT +(byte*) DTV_PLANEA_MODULO_HI +(byte*) DTV_PLANEA_MODULO_LO +(byte*) DTV_PLANEA_START_HI +(byte*) DTV_PLANEA_START_LO +(byte*) DTV_PLANEA_START_MI +(byte*) DTV_PLANEA_STEP +(byte*) DTV_PLANEB_MODULO_HI +(byte*) DTV_PLANEB_MODULO_LO +(byte*) DTV_PLANEB_START_HI +(byte*) DTV_PLANEB_START_LO +(byte*) DTV_PLANEB_START_MI +(byte*) DTV_PLANEB_STEP +(byte*) DTV_SPRITE_BANK +(byte) GREEN +(byte) GREY +(byte) LIGHT_BLUE +(byte) LIGHT_GREEN +(byte) LIGHT_GREY +(byte) ORANGE +(byte) PINK +(byte*) PROCPORT +(byte) PROCPORT_BASIC_KERNEL_IO +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_KERNEL_IO +(byte) PROCPORT_RAM_ALL +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte) PURPLE +(byte*) RASTER +(byte) RED +(byte*) SCREEN +(byte*) SPRITES_COLS +(byte*) SPRITES_ENABLE +(byte*) SPRITES_EXPAND_X +(byte*) SPRITES_EXPAND_Y +(byte*) SPRITES_MC +(byte*) SPRITES_MC1 +(byte*) SPRITES_MC2 +(byte*) SPRITES_PRIORITY +(byte*) SPRITES_XMSB +(byte*) SPRITES_XPOS +(byte*) SPRITES_YPOS +(byte) VIC_BMM +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(byte) VIC_RST8 +(byte) WHITE +(byte) YELLOW +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) +(label) dtvSetCpuBankSegment1::@return +(byte*) dtvSetCpuBankSegment1::cpuBank +(byte) dtvSetCpuBankSegment1::cpuBankIdx +(void()) gfx_init() +(void~) gfx_init::$0 +(void~) gfx_init::$1 +(label) gfx_init::@return +(void()) gfx_init_plane_charset8() +(byte*~) gfx_init_plane_charset8::$0 +(byte~) gfx_init_plane_charset8::$1 +(boolean~) gfx_init_plane_charset8::$10 +(boolean~) gfx_init_plane_charset8::$11 +(boolean~) gfx_init_plane_charset8::$12 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 +(byte~) gfx_init_plane_charset8::$14 +(void~) gfx_init_plane_charset8::$15 +(void~) gfx_init_plane_charset8::$2 +(word~) gfx_init_plane_charset8::$3 +(word~) gfx_init_plane_charset8::$4 +(word/signed dword/dword~) gfx_init_plane_charset8::$5 +(byte~) gfx_init_plane_charset8::$6 +(boolean~) gfx_init_plane_charset8::$7 +(boolean~) gfx_init_plane_charset8::$8 +(byte~) gfx_init_plane_charset8::$9 +(label) gfx_init_plane_charset8::@1 +(label) gfx_init_plane_charset8::@2 +(label) gfx_init_plane_charset8::@3 +(label) gfx_init_plane_charset8::@4 +(label) gfx_init_plane_charset8::@return +(byte) gfx_init_plane_charset8::bits +(byte) gfx_init_plane_charset8::c +(byte) gfx_init_plane_charset8::ch +(byte*) gfx_init_plane_charset8::chargen +(byte) gfx_init_plane_charset8::col +(byte) gfx_init_plane_charset8::cp +(byte) gfx_init_plane_charset8::cr +(byte*) gfx_init_plane_charset8::gfxa +(byte) gfx_init_plane_charset8::gfxbCpuBank +(void()) gfx_init_screen0() +(byte~) gfx_init_screen0::$0 +(byte~) gfx_init_screen0::$1 +(byte~) gfx_init_screen0::$2 +(byte~) gfx_init_screen0::$3 +(boolean~) gfx_init_screen0::$4 +(boolean~) gfx_init_screen0::$5 +(label) gfx_init_screen0::@1 +(label) gfx_init_screen0::@2 +(label) gfx_init_screen0::@return +(byte*) gfx_init_screen0::ch +(byte) gfx_init_screen0::cx +(byte) gfx_init_screen0::cy +(void()) main() +(void~) main::$0 +(byte~) main::$1 +(dword~) main::$10 +(byte~) main::$11 +(byte~) main::$12 +(word~) main::$13 +(word/signed dword/dword~) main::$14 +(byte~) main::$15 +(byte/word/dword~) main::$16 +(word~) main::$17 +(word~) main::$18 +(word~) main::$19 +(byte~) main::$2 +(byte~) main::$20 +(word~) main::$21 +(word~) main::$22 +(byte~) main::$23 +(byte~) main::$24 +(byte~) main::$25 +(boolean~) main::$26 +(byte~) main::$27 +(byte~) main::$28 +(byte/word/dword~) main::$29 +(byte~) main::$3 +(boolean~) main::$30 +(byte~) main::$31 +(byte~) main::$32 +(byte~) main::$33 +(byte~) main::$34 +(byte~) main::$35 +(boolean~) main::$36 +(byte~) main::$4 +(byte~) main::$5 +(byte/word/dword~) main::$6 +(byte~) main::$7 +(byte~) main::$8 +(byte~) main::$9 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@4 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@return +(byte) main::j +(dword) main::plane_b +(byte) main::rst + +Promoting byte/signed byte/word/signed word/dword/signed dword to byte* in PROCPORT_DDR ← ((byte*)) 0 +Promoting byte/signed byte/word/signed word/dword/signed dword to byte* in PROCPORT ← ((byte*)) 1 +Promoting word/dword/signed dword to byte* in CHARGEN ← ((byte*)) 53248 +Promoting word/dword/signed dword to byte* in SPRITES_XPOS ← ((byte*)) 53248 +Promoting word/dword/signed dword to byte* in SPRITES_YPOS ← ((byte*)) 53249 +Promoting word/dword/signed dword to byte* in SPRITES_XMSB ← ((byte*)) 53264 +Promoting word/dword/signed dword to byte* in RASTER ← ((byte*)) 53266 +Promoting word/dword/signed dword to byte* in SPRITES_ENABLE ← ((byte*)) 53269 +Promoting word/dword/signed dword to byte* in SPRITES_EXPAND_Y ← ((byte*)) 53271 +Promoting word/dword/signed dword to byte* in SPRITES_PRIORITY ← ((byte*)) 53275 +Promoting word/dword/signed dword to byte* in SPRITES_MC ← ((byte*)) 53276 +Promoting word/dword/signed dword to byte* in SPRITES_EXPAND_X ← ((byte*)) 53277 +Promoting word/dword/signed dword to byte* in BORDERCOL ← ((byte*)) 53280 +Promoting word/dword/signed dword to byte* in BGCOL ← ((byte*)) 53281 +Promoting word/dword/signed dword to byte* in BGCOL1 ← ((byte*)) 53281 +Promoting word/dword/signed dword to byte* in BGCOL2 ← ((byte*)) 53282 +Promoting word/dword/signed dword to byte* in BGCOL3 ← ((byte*)) 53283 +Promoting word/dword/signed dword to byte* in BGCOL4 ← ((byte*)) 53284 +Promoting word/dword/signed dword to byte* in SPRITES_MC1 ← ((byte*)) 53285 +Promoting word/dword/signed dword to byte* in SPRITES_MC2 ← ((byte*)) 53286 +Promoting word/dword/signed dword to byte* in SPRITES_COLS ← ((byte*)) 53287 +Promoting word/dword/signed dword to byte* in VIC_CONTROL ← ((byte*)) 53265 +Promoting word/dword/signed dword to byte* in D011 ← ((byte*)) 53265 +Promoting word/dword/signed dword to byte* in VIC_CONTROL2 ← ((byte*)) 53270 +Promoting word/dword/signed dword to byte* in D016 ← ((byte*)) 53270 +Promoting word/dword/signed dword to byte* in D018 ← ((byte*)) 53272 +Promoting word/dword/signed dword to byte* in VIC_MEMORY ← ((byte*)) 53272 +Promoting word/dword/signed dword to byte* in COLS ← ((byte*)) 55296 +Promoting word/dword/signed dword to byte* in CIA1_PORT_A ← ((byte*)) 56320 +Promoting word/dword/signed dword to byte* in CIA1_PORT_B ← ((byte*)) 56321 +Promoting word/dword/signed dword to byte* in CIA1_PORT_A_DDR ← ((byte*)) 56322 +Promoting word/dword/signed dword to byte* in CIA1_PORT_B_DDR ← ((byte*)) 56323 +Promoting word/dword/signed dword to byte* in CIA2_PORT_A ← ((byte*)) 56576 +Promoting word/dword/signed dword to byte* in CIA2_PORT_B ← ((byte*)) 56577 +Promoting word/dword/signed dword to byte* in CIA2_PORT_A_DDR ← ((byte*)) 56578 +Promoting word/dword/signed dword to byte* in CIA2_PORT_B_DDR ← ((byte*)) 56579 +Promoting word/dword/signed dword to byte* in DTV_FEATURE ← ((byte*)) 53311 +Promoting word/dword/signed dword to byte* in DTV_CONTROL ← ((byte*)) 53308 +Promoting word/dword/signed dword to byte* in DTV_PALETTE ← ((byte*)) 53760 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_START_LO ← ((byte*)) 53306 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_START_MI ← ((byte*)) 53307 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_START_HI ← ((byte*)) 53317 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_STEP ← ((byte*)) 53318 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_MODULO_LO ← ((byte*)) 53304 +Promoting word/dword/signed dword to byte* in DTV_PLANEA_MODULO_HI ← ((byte*)) 53305 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_START_LO ← ((byte*)) 53321 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_START_MI ← ((byte*)) 53322 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_START_HI ← ((byte*)) 53323 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_STEP ← ((byte*)) 53324 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_MODULO_LO ← ((byte*)) 53319 +Promoting word/dword/signed dword to byte* in DTV_PLANEB_MODULO_HI ← ((byte*)) 53320 +Promoting word/dword/signed dword to byte* in DTV_SPRITE_BANK ← ((byte*)) 53325 +Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_LO ← ((byte*)) 53302 +Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_HI ← ((byte*)) 53303 +Promoting word/dword/signed dword to byte* in DTV_GRAPHICS_VIC_BANK ← ((byte*)) 53309 +Promoting word/dword/signed dword to byte* in DTV_GRAPHICS_HICOL_BANK ← ((byte*)) 53310 +Promoting byte/word/signed word/dword/signed dword to byte* in dtvSetCpuBankSegment1::cpuBank ← ((byte*)) 255 +Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 31744 +Promoting word/dword/signed dword to byte* in CHARSET8 ← ((byte*)) 32768 +Promoting word/signed dword/dword to byte* in gfx_init_plane_charset8::gfxa ← ((byte*)) gfx_init_plane_charset8::$5 +INITIAL CONTROL FLOW GRAPH +@begin: scope:[] from + (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) PROCPORT_RAM_ALL ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) PROCPORT_RAM_IO ← (byte/signed byte/word/signed word/dword/signed dword) 53 + (byte) PROCPORT_RAM_CHARROM ← (byte/signed byte/word/signed word/dword/signed dword) 49 + (byte) PROCPORT_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 54 + (byte) PROCPORT_BASIC_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 55 + (byte*) CHARGEN ← ((byte*)) (word/dword/signed dword) 53248 + (byte*) SPRITES_XPOS ← ((byte*)) (word/dword/signed dword) 53248 + (byte*) SPRITES_YPOS ← ((byte*)) (word/dword/signed dword) 53249 + (byte*) SPRITES_XMSB ← ((byte*)) (word/dword/signed dword) 53264 + (byte*) RASTER ← ((byte*)) (word/dword/signed dword) 53266 + (byte*) SPRITES_ENABLE ← ((byte*)) (word/dword/signed dword) 53269 + (byte*) SPRITES_EXPAND_Y ← ((byte*)) (word/dword/signed dword) 53271 + (byte*) SPRITES_PRIORITY ← ((byte*)) (word/dword/signed dword) 53275 + (byte*) SPRITES_MC ← ((byte*)) (word/dword/signed dword) 53276 + (byte*) SPRITES_EXPAND_X ← ((byte*)) (word/dword/signed dword) 53277 + (byte*) BORDERCOL ← ((byte*)) (word/dword/signed dword) 53280 + (byte*) BGCOL ← ((byte*)) (word/dword/signed dword) 53281 + (byte*) BGCOL1 ← ((byte*)) (word/dword/signed dword) 53281 + (byte*) BGCOL2 ← ((byte*)) (word/dword/signed dword) 53282 + (byte*) BGCOL3 ← ((byte*)) (word/dword/signed dword) 53283 + (byte*) BGCOL4 ← ((byte*)) (word/dword/signed dword) 53284 + (byte*) SPRITES_MC1 ← ((byte*)) (word/dword/signed dword) 53285 + (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286 + (byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287 + (byte*) VIC_CONTROL ← ((byte*)) (word/dword/signed dword) 53265 + (byte*) D011 ← ((byte*)) (word/dword/signed dword) 53265 + (byte) VIC_RST8 ← (byte/word/signed word/dword/signed dword) 128 + (byte) VIC_ECM ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) VIC_BMM ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) VIC_DEN ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_RSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_CONTROL2 ← ((byte*)) (word/dword/signed dword) 53270 + (byte*) D016 ← ((byte*)) (word/dword/signed dword) 53270 + (byte) VIC_MCM ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_CSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) D018 ← ((byte*)) (word/dword/signed dword) 53272 + (byte*) VIC_MEMORY ← ((byte*)) (word/dword/signed dword) 53272 + (byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296 + (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320 + (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321 + (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322 + (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323 + (byte*) CIA2_PORT_A ← ((byte*)) (word/dword/signed dword) 56576 + (byte*) CIA2_PORT_B ← ((byte*)) (word/dword/signed dword) 56577 + (byte*) CIA2_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56578 + (byte*) CIA2_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56579 + (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10 + (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11 + (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12 + (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13 + (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14 + (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte*) DTV_FEATURE ← ((byte*)) (word/dword/signed dword) 53311 + (byte) DTV_FEATURE_ENABLE ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_FEATURE_DISABLE_TIL_RESET ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) DTV_CONTROL ← ((byte*)) (word/dword/signed dword) 53308 + (byte) DTV_LINEAR ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BORDER_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_HIGHCOLOR ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_OVERSCAN ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_CHUNKY ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte*) DTV_PALETTE ← ((byte*)) (word/dword/signed dword) 53760 + (byte[16]) DTV_PALETTE_DEFAULT ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 54, (byte/word/signed word/dword/signed dword) 190, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 219, (byte/word/signed word/dword/signed dword) 134, (byte/word/signed word/dword/signed dword) 255, (byte/signed byte/word/signed word/dword/signed dword) 41, (byte/signed byte/word/signed word/dword/signed dword) 38, (byte/signed byte/word/signed word/dword/signed dword) 59, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 154, (byte/signed byte/word/signed word/dword/signed dword) 10 } + (byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306 + (byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307 + (byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317 + (byte*) DTV_PLANEA_STEP ← ((byte*)) (word/dword/signed dword) 53318 + (byte*) DTV_PLANEA_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53304 + (byte*) DTV_PLANEA_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53305 + (byte*) DTV_PLANEB_START_LO ← ((byte*)) (word/dword/signed dword) 53321 + (byte*) DTV_PLANEB_START_MI ← ((byte*)) (word/dword/signed dword) 53322 + (byte*) DTV_PLANEB_START_HI ← ((byte*)) (word/dword/signed dword) 53323 + (byte*) DTV_PLANEB_STEP ← ((byte*)) (word/dword/signed dword) 53324 + (byte*) DTV_PLANEB_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53319 + (byte*) DTV_PLANEB_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53320 + (byte*) DTV_SPRITE_BANK ← ((byte*)) (word/dword/signed dword) 53325 + (byte*) DTV_COLOR_BANK_LO ← ((byte*)) (word/dword/signed dword) 53302 + (byte*) DTV_COLOR_BANK_HI ← ((byte*)) (word/dword/signed dword) 53303 + (dword) DTV_COLOR_BANK_DEFAULT ← (dword/signed dword) 120832 + (byte*) DTV_GRAPHICS_VIC_BANK ← ((byte*)) (word/dword/signed dword) 53309 + (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310 + to:@1 +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from + (byte*) dtvSetCpuBankSegment1::cpuBank ← ((byte*)) (byte/word/signed word/dword/signed dword) 255 + *((byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + return + to:@return +@1: scope:[] from @begin + (byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 31744 + (byte*) CHARSET8 ← ((byte*)) (word/dword/signed dword) 32768 + to:@2 +main: scope:[main] from + asm { sei } + *((byte*) PROCPORT_DDR) ← (byte) PROCPORT_DDR_MEMORY_MASK + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_IO + (void~) main::$0 ← call gfx_init + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$1 ← (byte) DTV_HIGHCOLOR | (byte) DTV_LINEAR + (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_CHUNKY + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_BADLINE_OFF + *((byte*) DTV_CONTROL) ← (byte~) main::$3 + (byte~) main::$4 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$5 ← (byte~) main::$4 | (byte) VIC_RSEL + (byte/word/dword~) main::$6 ← (byte~) main::$5 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$6 + (byte~) main::$7 ← (byte) VIC_MCM | (byte) VIC_CSEL + *((byte*) VIC_CONTROL2) ← (byte~) main::$7 + (byte~) main::$8 ← < (byte*) SCREEN + *((byte*) DTV_PLANEA_START_LO) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN + *((byte*) DTV_PLANEA_START_MI) ← (byte~) main::$9 + *((byte*) DTV_PLANEA_START_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 1 + *((byte*) DTV_PLANEA_MODULO_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_MODULO_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (dword~) main::$10 ← ((dword)) (byte*) CHARSET8 + (dword) main::plane_b ← (dword~) main::$10 + (byte~) main::$11 ← < (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$11 + (byte~) main::$12 ← > (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$12 + *((byte*) DTV_PLANEB_START_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) CIA2_PORT_A_DDR) ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (word~) main::$13 ← ((word)) (byte*) SCREEN + (word/signed dword/dword~) main::$14 ← (word~) main::$13 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$15 ← ((byte)) (word/signed dword/dword~) main::$14 + (byte/word/dword~) main::$16 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$15 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$16 + (word~) main::$17 ← ((word)) (byte*) SCREEN + (word~) main::$18 ← (word~) main::$17 & (word/signed word/dword/signed dword) 16383 + (word~) main::$19 ← (word~) main::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$20 ← ((byte)) (word~) main::$19 + (word~) main::$21 ← ((word)) (byte*) SCREEN + (word~) main::$22 ← (word~) main::$21 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$23 ← > (word~) main::$22 + (byte~) main::$24 ← (byte~) main::$23 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$25 ← (byte~) main::$20 | (byte~) main::$24 + *((byte*) VIC_MEMORY) ← (byte~) main::$25 + (byte) main::j ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@1 + *((byte*) DTV_PALETTE + (byte) main::j) ← (byte) main::j + (byte) main::j ← ++ (byte) main::j + (boolean~) main::$26 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$26) goto main::@1 + to:main::@9 +main::@9: scope:[main] from main::@1 + to:main::@2 +main::@2: scope:[main] from main::@15 main::@9 + if(true) goto main::@3 + to:main::@10 +main::@3: scope:[main] from main::@11 main::@2 + asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + (byte~) main::$27 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$28 ← (byte~) main::$27 | (byte) VIC_RSEL + (byte/word/dword~) main::$29 ← (byte~) main::$28 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$29 + *((byte*) BORDERCOL) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::rst ← (byte/signed byte/word/signed word/dword/signed dword) 66 + to:main::@5 +main::@10: scope:[main] from main::@2 + to:main::@4 +main::@4: scope:[main] from main::@10 main::@16 + to:main::@return +main::@11: scope:[main] from + to:main::@3 +main::@5: scope:[main] from main::@3 main::@6 + (boolean~) main::$30 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$30) goto main::@6 + to:main::@12 +main::@6: scope:[main] from main::@13 main::@5 + to:main::@5 +main::@12: scope:[main] from main::@5 + to:main::@7 +main::@7: scope:[main] from main::@12 main::@14 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + to:main::@8 +main::@13: scope:[main] from + to:main::@6 +main::@14: scope:[main] from + to:main::@7 +main::@8: scope:[main] from main::@7 main::@8 + (byte) main::rst ← *((byte*) RASTER) + (byte~) main::$31 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$32 ← (byte~) main::$31 | (byte) VIC_RSEL + (byte~) main::$33 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$34 ← (byte~) main::$32 | (byte~) main::$33 + *((byte*) VIC_CONTROL) ← (byte~) main::$34 + (byte~) main::$35 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$35 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$36 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$36) goto main::@8 + to:main::@15 +main::@15: scope:[main] from main::@8 + to:main::@2 +main::@16: scope:[main] from + to:main::@4 +main::@return: scope:[main] from main::@4 + return + to:@return +@2: scope:[] from @1 + to:@3 +gfx_init: scope:[gfx_init] from + (void~) gfx_init::$0 ← call gfx_init_screen0 + (void~) gfx_init::$1 ← call gfx_init_plane_charset8 + to:gfx_init::@return +gfx_init::@return: scope:[gfx_init] from gfx_init + return + to:@return +@3: scope:[] from @2 + to:@4 +gfx_init_screen0: scope:[gfx_init_screen0] from + (byte*) gfx_init_screen0::ch ← (byte*) SCREEN + (byte) gfx_init_screen0::cy ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_screen0::@1 +gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 + (byte) gfx_init_screen0::cx ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_screen0::@2 +gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 + (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 + *((byte*) gfx_init_screen0::ch) ← (byte~) gfx_init_screen0::$3 + (byte*) gfx_init_screen0::ch ← ++ (byte*) gfx_init_screen0::ch + (byte) gfx_init_screen0::cx ← ++ (byte) gfx_init_screen0::cx + (boolean~) gfx_init_screen0::$4 ← (byte) gfx_init_screen0::cx != (byte/signed byte/word/signed word/dword/signed dword) 40 + if((boolean~) gfx_init_screen0::$4) goto gfx_init_screen0::@2 + to:gfx_init_screen0::@3 +gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 + (byte) gfx_init_screen0::cy ← ++ (byte) gfx_init_screen0::cy + (boolean~) gfx_init_screen0::$5 ← (byte) gfx_init_screen0::cy != (byte/signed byte/word/signed word/dword/signed dword) 25 + if((boolean~) gfx_init_screen0::$5) goto gfx_init_screen0::@1 + to:gfx_init_screen0::@4 +gfx_init_screen0::@4: scope:[gfx_init_screen0] from gfx_init_screen0::@3 + to:gfx_init_screen0::@return +gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@4 + return + to:@return +@4: scope:[] from @3 + to:@5 +gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from + (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (byte*~) gfx_init_plane_charset8::$0 + (byte) gfx_init_plane_charset8::gfxbCpuBank ← (byte~) gfx_init_plane_charset8::$1 + (void~) gfx_init_plane_charset8::$2 ← call dtvSetCpuBankSegment1 (byte) gfx_init_plane_charset8::gfxbCpuBank + (byte) gfx_init_plane_charset8::gfxbCpuBank ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank + (word~) gfx_init_plane_charset8::$3 ← ((word)) (byte*) CHARSET8 + (word~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (word/signed word/dword/signed dword) 16383 + (word/signed dword/dword~) gfx_init_plane_charset8::$5 ← (word/signed word/dword/signed dword) 16384 + (word~) gfx_init_plane_charset8::$4 + (byte*) gfx_init_plane_charset8::gfxa ← ((byte*)) (word/signed dword/dword~) gfx_init_plane_charset8::$5 + (byte*) gfx_init_plane_charset8::chargen ← (byte*) CHARGEN + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_CHARROM + (byte) gfx_init_plane_charset8::col ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) gfx_init_plane_charset8::ch ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@1 +gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 gfx_init_plane_charset8::@7 + (byte) gfx_init_plane_charset8::cr ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@2 +gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 + (byte) gfx_init_plane_charset8::bits ← *((byte*) gfx_init_plane_charset8::chargen) + (byte*) gfx_init_plane_charset8::chargen ← ++ (byte*) gfx_init_plane_charset8::chargen + (byte) gfx_init_plane_charset8::cp ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@3 +gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 + (byte) gfx_init_plane_charset8::c ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$6 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$8 ← ! (boolean~) gfx_init_plane_charset8::$7 + if((boolean~) gfx_init_plane_charset8::$8) goto gfx_init_plane_charset8::@4 + to:gfx_init_plane_charset8::@5 +gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 + *((byte*) gfx_init_plane_charset8::gfxa) ← (byte) gfx_init_plane_charset8::c + (byte*) gfx_init_plane_charset8::gfxa ← ++ (byte*) gfx_init_plane_charset8::gfxa + (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits << (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) gfx_init_plane_charset8::bits ← (byte~) gfx_init_plane_charset8::$9 + (byte) gfx_init_plane_charset8::col ← ++ (byte) gfx_init_plane_charset8::col + (byte) gfx_init_plane_charset8::cp ← ++ (byte) gfx_init_plane_charset8::cp + (boolean~) gfx_init_plane_charset8::$10 ← (byte) gfx_init_plane_charset8::cp != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$10) goto gfx_init_plane_charset8::@3 + to:gfx_init_plane_charset8::@6 +gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 + (byte) gfx_init_plane_charset8::c ← (byte) gfx_init_plane_charset8::col + to:gfx_init_plane_charset8::@4 +gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 + (byte) gfx_init_plane_charset8::cr ← ++ (byte) gfx_init_plane_charset8::cr + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cr != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) goto gfx_init_plane_charset8::@2 + to:gfx_init_plane_charset8::@7 +gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 + (byte) gfx_init_plane_charset8::ch ← ++ (byte) gfx_init_plane_charset8::ch + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::ch != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$12) goto gfx_init_plane_charset8::@1 + to:gfx_init_plane_charset8::@8 +gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 + *((byte*) PROCPORT) ← (byte) PROCPORT_RAM_IO + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$14 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 + (void~) gfx_init_plane_charset8::$15 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_plane_charset8::$14 + to:gfx_init_plane_charset8::@return +gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 + return + to:@return +@5: scope:[] from @4 + call main + to:@end +@end: scope:[] from @5 + +Eliminating unused variable (byte) PROCPORT_RAM_ALL and assignment [3] (byte) PROCPORT_RAM_ALL ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) PROCPORT_KERNEL_IO and assignment [6] (byte) PROCPORT_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 54 +Eliminating unused variable (byte) PROCPORT_BASIC_KERNEL_IO and assignment [7] (byte) PROCPORT_BASIC_KERNEL_IO ← (byte/signed byte/word/signed word/dword/signed dword) 55 +Eliminating unused variable (byte*) SPRITES_XPOS and assignment [9] (byte*) SPRITES_XPOS ← ((byte*)) (word/dword/signed dword) 53248 +Eliminating unused variable (byte*) SPRITES_YPOS and assignment [10] (byte*) SPRITES_YPOS ← ((byte*)) (word/dword/signed dword) 53249 +Eliminating unused variable (byte*) SPRITES_XMSB and assignment [11] (byte*) SPRITES_XMSB ← ((byte*)) (word/dword/signed dword) 53264 +Eliminating unused variable (byte*) SPRITES_ENABLE and assignment [13] (byte*) SPRITES_ENABLE ← ((byte*)) (word/dword/signed dword) 53269 +Eliminating unused variable (byte*) SPRITES_EXPAND_Y and assignment [14] (byte*) SPRITES_EXPAND_Y ← ((byte*)) (word/dword/signed dword) 53271 +Eliminating unused variable (byte*) SPRITES_PRIORITY and assignment [15] (byte*) SPRITES_PRIORITY ← ((byte*)) (word/dword/signed dword) 53275 +Eliminating unused variable (byte*) SPRITES_MC and assignment [16] (byte*) SPRITES_MC ← ((byte*)) (word/dword/signed dword) 53276 +Eliminating unused variable (byte*) SPRITES_EXPAND_X and assignment [17] (byte*) SPRITES_EXPAND_X ← ((byte*)) (word/dword/signed dword) 53277 +Eliminating unused variable (byte*) BGCOL and assignment [19] (byte*) BGCOL ← ((byte*)) (word/dword/signed dword) 53281 +Eliminating unused variable (byte*) BGCOL1 and assignment [20] (byte*) BGCOL1 ← ((byte*)) (word/dword/signed dword) 53281 +Eliminating unused variable (byte*) BGCOL2 and assignment [21] (byte*) BGCOL2 ← ((byte*)) (word/dword/signed dword) 53282 +Eliminating unused variable (byte*) BGCOL3 and assignment [22] (byte*) BGCOL3 ← ((byte*)) (word/dword/signed dword) 53283 +Eliminating unused variable (byte*) BGCOL4 and assignment [23] (byte*) BGCOL4 ← ((byte*)) (word/dword/signed dword) 53284 +Eliminating unused variable (byte*) SPRITES_MC1 and assignment [24] (byte*) SPRITES_MC1 ← ((byte*)) (word/dword/signed dword) 53285 +Eliminating unused variable (byte*) SPRITES_MC2 and assignment [25] (byte*) SPRITES_MC2 ← ((byte*)) (word/dword/signed dword) 53286 +Eliminating unused variable (byte*) SPRITES_COLS and assignment [26] (byte*) SPRITES_COLS ← ((byte*)) (word/dword/signed dword) 53287 +Eliminating unused variable (byte*) D011 and assignment [28] (byte*) D011 ← ((byte*)) (word/dword/signed dword) 53265 +Eliminating unused variable (byte) VIC_RST8 and assignment [29] (byte) VIC_RST8 ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte) VIC_BMM and assignment [31] (byte) VIC_BMM ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte*) D016 and assignment [35] (byte*) D016 ← ((byte*)) (word/dword/signed dword) 53270 +Eliminating unused variable (byte*) D018 and assignment [38] (byte*) D018 ← ((byte*)) (word/dword/signed dword) 53272 +Eliminating unused variable (byte*) COLS and assignment [40] (byte*) COLS ← ((byte*)) (word/dword/signed dword) 55296 +Eliminating unused variable (byte*) CIA1_PORT_A and assignment [41] (byte*) CIA1_PORT_A ← ((byte*)) (word/dword/signed dword) 56320 +Eliminating unused variable (byte*) CIA1_PORT_B and assignment [42] (byte*) CIA1_PORT_B ← ((byte*)) (word/dword/signed dword) 56321 +Eliminating unused variable (byte*) CIA1_PORT_A_DDR and assignment [43] (byte*) CIA1_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56322 +Eliminating unused variable (byte*) CIA1_PORT_B_DDR and assignment [44] (byte*) CIA1_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56323 +Eliminating unused variable (byte*) CIA2_PORT_B and assignment [46] (byte*) CIA2_PORT_B ← ((byte*)) (word/dword/signed dword) 56577 +Eliminating unused variable (byte*) CIA2_PORT_B_DDR and assignment [48] (byte*) CIA2_PORT_B_DDR ← ((byte*)) (word/dword/signed dword) 56579 +Eliminating unused variable (byte) BLACK and assignment [49] (byte) BLACK ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) WHITE and assignment [50] (byte) WHITE ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) RED and assignment [51] (byte) RED ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) CYAN and assignment [52] (byte) CYAN ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) PURPLE and assignment [53] (byte) PURPLE ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) GREEN and assignment [54] (byte) GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) BLUE and assignment [55] (byte) BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) YELLOW and assignment [56] (byte) YELLOW ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) ORANGE and assignment [57] (byte) ORANGE ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) BROWN and assignment [58] (byte) BROWN ← (byte/signed byte/word/signed word/dword/signed dword) 9 +Eliminating unused variable (byte) PINK and assignment [59] (byte) PINK ← (byte/signed byte/word/signed word/dword/signed dword) 10 +Eliminating unused variable (byte) DARK_GREY and assignment [60] (byte) DARK_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 11 +Eliminating unused variable (byte) GREY and assignment [61] (byte) GREY ← (byte/signed byte/word/signed word/dword/signed dword) 12 +Eliminating unused variable (byte) LIGHT_GREEN and assignment [62] (byte) LIGHT_GREEN ← (byte/signed byte/word/signed word/dword/signed dword) 13 +Eliminating unused variable (byte) LIGHT_BLUE and assignment [63] (byte) LIGHT_BLUE ← (byte/signed byte/word/signed word/dword/signed dword) 14 +Eliminating unused variable (byte) LIGHT_GREY and assignment [64] (byte) LIGHT_GREY ← (byte/signed byte/word/signed word/dword/signed dword) 15 +Eliminating unused variable (byte) DTV_FEATURE_DISABLE_TIL_RESET and assignment [67] (byte) DTV_FEATURE_DISABLE_TIL_RESET ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BORDER_OFF and assignment [70] (byte) DTV_BORDER_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_OVERSCAN and assignment [72] (byte) DTV_OVERSCAN ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_COLORRAM_OFF and assignment [73] (byte) DTV_COLORRAM_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte[16]) DTV_PALETTE_DEFAULT and assignment [77] (byte[16]) DTV_PALETTE_DEFAULT ← { (byte/signed byte/word/signed word/dword/signed dword) 0, (byte/signed byte/word/signed word/dword/signed dword) 15, (byte/signed byte/word/signed word/dword/signed dword) 54, (byte/word/signed word/dword/signed dword) 190, (byte/signed byte/word/signed word/dword/signed dword) 88, (byte/word/signed word/dword/signed dword) 219, (byte/word/signed word/dword/signed dword) 134, (byte/word/signed word/dword/signed dword) 255, (byte/signed byte/word/signed word/dword/signed dword) 41, (byte/signed byte/word/signed word/dword/signed dword) 38, (byte/signed byte/word/signed word/dword/signed dword) 59, (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/word/signed word/dword/signed dword) 223, (byte/word/signed word/dword/signed dword) 154, (byte/signed byte/word/signed word/dword/signed dword) 10 } +Eliminating unused variable (byte*) DTV_SPRITE_BANK and assignment [90] (byte*) DTV_SPRITE_BANK ← ((byte*)) (word/dword/signed dword) 53325 +Eliminating unused variable (byte*) DTV_COLOR_BANK_LO and assignment [91] (byte*) DTV_COLOR_BANK_LO ← ((byte*)) (word/dword/signed dword) 53302 +Eliminating unused variable (byte*) DTV_COLOR_BANK_HI and assignment [92] (byte*) DTV_COLOR_BANK_HI ← ((byte*)) (word/dword/signed dword) 53303 +Eliminating unused variable (dword) DTV_COLOR_BANK_DEFAULT and assignment [93] (dword) DTV_COLOR_BANK_DEFAULT ← (dword/signed dword) 120832 +Eliminating unused variable (byte*) DTV_GRAPHICS_VIC_BANK and assignment [94] (byte*) DTV_GRAPHICS_VIC_BANK ← ((byte*)) (word/dword/signed dword) 53309 +Eliminating unused variable (byte*) DTV_GRAPHICS_HICOL_BANK and assignment [95] (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310 +Eliminating unused variable - keeping the call (void~) main::$0 +Eliminating unused variable (dword) main::plane_b and assignment [126] (dword) main::plane_b ← (dword~) main::$10 +Eliminating unused variable - keeping the call (void~) gfx_init::$0 +Eliminating unused variable - keeping the call (void~) gfx_init::$1 +Eliminating unused variable - keeping the call (void~) gfx_init_plane_charset8::$2 +Eliminating unused variable - keeping the call (void~) gfx_init_plane_charset8::$15 +Eliminating unused variable (dword~) main::$10 and assignment [67] (dword~) main::$10 ← ((dword)) (byte*) CHARSET8 +Removing empty block main::@9 +Removing empty block main::@10 +Removing empty block main::@4 +Removing empty block main::@11 +Removing empty block main::@12 +Removing empty block main::@13 +Removing empty block main::@14 +Removing empty block main::@15 +Removing empty block main::@16 +Removing empty block @2 +Removing empty block @3 +Removing empty block gfx_init_screen0::@4 +Removing empty block @4 +PROCEDURE MODIFY VARIABLE ANALYSIS + +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... + +CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN +@begin: scope:[] from + (byte*) PROCPORT_DDR#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) PROCPORT_DDR_MEMORY_MASK#0 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte*) PROCPORT#0 ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) PROCPORT_RAM_IO#0 ← (byte/signed byte/word/signed word/dword/signed dword) 53 + (byte) PROCPORT_RAM_CHARROM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 49 + (byte*) CHARGEN#0 ← ((byte*)) (word/dword/signed dword) 53248 + (byte*) RASTER#0 ← ((byte*)) (word/dword/signed dword) 53266 + (byte*) BORDERCOL#0 ← ((byte*)) (word/dword/signed dword) 53280 + (byte*) VIC_CONTROL#0 ← ((byte*)) (word/dword/signed dword) 53265 + (byte) VIC_ECM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) VIC_DEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_RSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) 53270 + (byte) VIC_MCM#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) VIC_CSEL#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) VIC_MEMORY#0 ← ((byte*)) (word/dword/signed dword) 53272 + (byte*) CIA2_PORT_A#0 ← ((byte*)) (word/dword/signed dword) 56576 + (byte*) CIA2_PORT_A_DDR#0 ← ((byte*)) (word/dword/signed dword) 56578 + (byte*) DTV_FEATURE#0 ← ((byte*)) (word/dword/signed dword) 53311 + (byte) DTV_FEATURE_ENABLE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) DTV_CONTROL#0 ← ((byte*)) (word/dword/signed dword) 53308 + (byte) DTV_LINEAR#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_HIGHCOLOR#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BADLINE_OFF#0 ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_CHUNKY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte*) DTV_PALETTE#0 ← ((byte*)) (word/dword/signed dword) 53760 + (byte*) DTV_PLANEA_START_LO#0 ← ((byte*)) (word/dword/signed dword) 53306 + (byte*) DTV_PLANEA_START_MI#0 ← ((byte*)) (word/dword/signed dword) 53307 + (byte*) DTV_PLANEA_START_HI#0 ← ((byte*)) (word/dword/signed dword) 53317 + (byte*) DTV_PLANEA_STEP#0 ← ((byte*)) (word/dword/signed dword) 53318 + (byte*) DTV_PLANEA_MODULO_LO#0 ← ((byte*)) (word/dword/signed dword) 53304 + (byte*) DTV_PLANEA_MODULO_HI#0 ← ((byte*)) (word/dword/signed dword) 53305 + (byte*) DTV_PLANEB_START_LO#0 ← ((byte*)) (word/dword/signed dword) 53321 + (byte*) DTV_PLANEB_START_MI#0 ← ((byte*)) (word/dword/signed dword) 53322 + (byte*) DTV_PLANEB_START_HI#0 ← ((byte*)) (word/dword/signed dword) 53323 + (byte*) DTV_PLANEB_STEP#0 ← ((byte*)) (word/dword/signed dword) 53324 + (byte*) DTV_PLANEB_MODULO_LO#0 ← ((byte*)) (word/dword/signed dword) 53319 + (byte*) DTV_PLANEB_MODULO_HI#0 ← ((byte*)) (word/dword/signed dword) 53320 + to:@1 +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ) + (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 255 + *((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + return + to:@return +@1: scope:[] from @begin + (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 31744 + (byte*) CHARSET8#0 ← ((byte*)) (word/dword/signed dword) 32768 + to:@5 +main: scope:[main] from @5 + asm { sei } + *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 + call gfx_init param-assignment + to:main::@17 +main::@17: scope:[main] from main + *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0 + (byte~) main::$1 ← (byte) DTV_HIGHCOLOR#0 | (byte) DTV_LINEAR#0 + (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_CHUNKY#0 + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_BADLINE_OFF#0 + *((byte*) DTV_CONTROL#0) ← (byte~) main::$3 + (byte~) main::$4 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$5 ← (byte~) main::$4 | (byte) VIC_RSEL#0 + (byte/word/dword~) main::$6 ← (byte~) main::$5 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL#0) ← (byte/word/dword~) main::$6 + (byte~) main::$7 ← (byte) VIC_MCM#0 | (byte) VIC_CSEL#0 + *((byte*) VIC_CONTROL2#0) ← (byte~) main::$7 + (byte~) main::$8 ← < (byte*) SCREEN#0 + *((byte*) DTV_PLANEA_START_LO#0) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN#0 + *((byte*) DTV_PLANEA_START_MI#0) ← (byte~) main::$9 + *((byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 + *((byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) main::$11 ← < (byte*) CHARSET8#0 + *((byte*) DTV_PLANEB_START_LO#0) ← (byte~) main::$11 + (byte~) main::$12 ← > (byte*) CHARSET8#0 + *((byte*) DTV_PLANEB_START_MI#0) ← (byte~) main::$12 + *((byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (word~) main::$13 ← ((word)) (byte*) SCREEN#0 + (word/signed dword/dword~) main::$14 ← (word~) main::$13 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$15 ← ((byte)) (word/signed dword/dword~) main::$14 + (byte/word/dword~) main::$16 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$15 + *((byte*) CIA2_PORT_A#0) ← (byte/word/dword~) main::$16 + (word~) main::$17 ← ((word)) (byte*) SCREEN#0 + (word~) main::$18 ← (word~) main::$17 & (word/signed word/dword/signed dword) 16383 + (word~) main::$19 ← (word~) main::$18 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$20 ← ((byte)) (word~) main::$19 + (word~) main::$21 ← ((word)) (byte*) SCREEN#0 + (word~) main::$22 ← (word~) main::$21 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$23 ← > (word~) main::$22 + (byte~) main::$24 ← (byte~) main::$23 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$25 ← (byte~) main::$20 | (byte~) main::$24 + *((byte*) VIC_MEMORY#0) ← (byte~) main::$25 + (byte) main::j#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main::@1 main::@17 + (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte) main::j#0 ) + *((byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 + (byte) main::j#1 ← ++ (byte) main::j#2 + (boolean~) main::$26 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$26) goto main::@1 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@8 + if(true) goto main::@3 + to:main::@return +main::@3: scope:[main] from main::@2 + asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + (byte~) main::$27 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$28 ← (byte~) main::$27 | (byte) VIC_RSEL#0 + (byte/word/dword~) main::$29 ← (byte~) main::$28 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL#0) ← (byte/word/dword~) main::$29 + *((byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) main::rst#0 ← (byte/signed byte/word/signed word/dword/signed dword) 66 + to:main::@5 +main::@5: scope:[main] from main::@3 main::@6 + (byte) main::rst#2 ← phi( main::@3/(byte) main::rst#0 main::@6/(byte) main::rst#3 ) + (boolean~) main::$30 ← *((byte*) RASTER#0) != (byte) main::rst#2 + if((boolean~) main::$30) goto main::@6 + to:main::@7 +main::@6: scope:[main] from main::@5 + (byte) main::rst#3 ← phi( main::@5/(byte) main::rst#2 ) + to:main::@5 +main::@7: scope:[main] from main::@5 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + to:main::@8 +main::@8: scope:[main] from main::@7 main::@8 + (byte) main::rst#1 ← *((byte*) RASTER#0) + (byte~) main::$31 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$32 ← (byte~) main::$31 | (byte) VIC_RSEL#0 + (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$34 ← (byte~) main::$32 | (byte~) main::$33 + *((byte*) VIC_CONTROL#0) ← (byte~) main::$34 + (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL#0) ← (byte~) main::$35 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$36 ← (byte) main::rst#1 != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$36) goto main::@8 + to:main::@2 +main::@return: scope:[main] from main::@2 + return + to:@return +gfx_init: scope:[gfx_init] from main + call gfx_init_screen0 param-assignment + to:gfx_init::@1 +gfx_init::@1: scope:[gfx_init] from gfx_init + call gfx_init_plane_charset8 param-assignment + to:gfx_init::@2 +gfx_init::@2: scope:[gfx_init] from gfx_init::@1 + to:gfx_init::@return +gfx_init::@return: scope:[gfx_init] from gfx_init::@2 + return + to:@return +gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init + (byte*) gfx_init_screen0::ch#0 ← (byte*) SCREEN#0 + (byte) gfx_init_screen0::cy#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_screen0::@1 +gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 + (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(byte*) gfx_init_screen0::ch#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#4 ) + (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) gfx_init_screen0::cy#0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) + (byte) gfx_init_screen0::cx#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_screen0::@2 +gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 + (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) + (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cx#0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) + (byte) gfx_init_screen0::cy#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cy#4 gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 ) + (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 + (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 + *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 + (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 + (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 + (boolean~) gfx_init_screen0::$4 ← (byte) gfx_init_screen0::cx#1 != (byte/signed byte/word/signed word/dword/signed dword) 40 + if((boolean~) gfx_init_screen0::$4) goto gfx_init_screen0::@2 + to:gfx_init_screen0::@3 +gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 + (byte*) gfx_init_screen0::ch#4 ← phi( gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) + (byte) gfx_init_screen0::cy#3 ← phi( gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 ) + (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#3 + (boolean~) gfx_init_screen0::$5 ← (byte) gfx_init_screen0::cy#1 != (byte/signed byte/word/signed word/dword/signed dword) 25 + if((boolean~) gfx_init_screen0::$5) goto gfx_init_screen0::@1 + to:gfx_init_screen0::@return +gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 + return + to:@return +gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 + (byte*~) gfx_init_plane_charset8::$0 ← (byte*) CHARSET8#0 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$1 ← ((byte)) (byte*~) gfx_init_plane_charset8::$0 + (byte) gfx_init_plane_charset8::gfxbCpuBank#0 ← (byte~) gfx_init_plane_charset8::$1 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#0 ← (byte) gfx_init_plane_charset8::gfxbCpuBank#0 + call dtvSetCpuBankSegment1 param-assignment + to:gfx_init_plane_charset8::@9 +gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 + (byte) gfx_init_plane_charset8::gfxbCpuBank#2 ← phi( gfx_init_plane_charset8/(byte) gfx_init_plane_charset8::gfxbCpuBank#0 ) + (byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank#2 + (word~) gfx_init_plane_charset8::$3 ← ((word)) (byte*) CHARSET8#0 + (word~) gfx_init_plane_charset8::$4 ← (word~) gfx_init_plane_charset8::$3 & (word/signed word/dword/signed dword) 16383 + (word/signed dword/dword~) gfx_init_plane_charset8::$5 ← (word/signed word/dword/signed dword) 16384 + (word~) gfx_init_plane_charset8::$4 + (byte*) gfx_init_plane_charset8::gfxa#0 ← ((byte*)) (word/signed dword/dword~) gfx_init_plane_charset8::$5 + (byte*) gfx_init_plane_charset8::chargen#0 ← (byte*) CHARGEN#0 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_CHARROM#0 + (byte) gfx_init_plane_charset8::col#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) gfx_init_plane_charset8::ch#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@1 +gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9 + (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::ch#0 ) + (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#8 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::col#0 ) + (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#8 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::gfxa#0 ) + (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#5 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::chargen#0 ) + (byte) gfx_init_plane_charset8::cr#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@2 +gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 + (byte) gfx_init_plane_charset8::ch#7 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 ) + (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::cr#0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) + (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 ) + (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 ) + (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 ) + (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) + (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 + (byte) gfx_init_plane_charset8::cp#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_plane_charset8::@3 +gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 + (byte) gfx_init_plane_charset8::ch#5 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 ) + (byte*) gfx_init_plane_charset8::chargen#7 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 ) + (byte) gfx_init_plane_charset8::cr#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 ) + (byte) gfx_init_plane_charset8::cp#3 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cp#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) + (byte) gfx_init_plane_charset8::col#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) + (byte*) gfx_init_plane_charset8::gfxa#3 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) + (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) + (byte) gfx_init_plane_charset8::c#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$6 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$8 ← ! (boolean~) gfx_init_plane_charset8::$7 + if((boolean~) gfx_init_plane_charset8::$8) goto gfx_init_plane_charset8::@4 + to:gfx_init_plane_charset8::@5 +gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 + (byte) gfx_init_plane_charset8::ch#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::ch#6 ) + (byte*) gfx_init_plane_charset8::chargen#6 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::chargen#8 ) + (byte) gfx_init_plane_charset8::cr#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cr#5 ) + (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cp#4 ) + (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::col#3 ) + (byte) gfx_init_plane_charset8::bits#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::bits#4 ) + (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::gfxa#4 ) + (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::c#0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#1 ) + *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 + (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 + (byte~) gfx_init_plane_charset8::$9 ← (byte) gfx_init_plane_charset8::bits#3 << (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) gfx_init_plane_charset8::bits#1 ← (byte~) gfx_init_plane_charset8::$9 + (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 + (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 + (boolean~) gfx_init_plane_charset8::$10 ← (byte) gfx_init_plane_charset8::cp#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$10) goto gfx_init_plane_charset8::@3 + to:gfx_init_plane_charset8::@6 +gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 + (byte) gfx_init_plane_charset8::ch#6 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 ) + (byte*) gfx_init_plane_charset8::chargen#8 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 ) + (byte) gfx_init_plane_charset8::cr#5 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 ) + (byte) gfx_init_plane_charset8::cp#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 ) + (byte) gfx_init_plane_charset8::bits#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 ) + (byte*) gfx_init_plane_charset8::gfxa#4 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 ) + (byte) gfx_init_plane_charset8::col#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 ) + (byte) gfx_init_plane_charset8::c#1 ← (byte) gfx_init_plane_charset8::col#3 + to:gfx_init_plane_charset8::@4 +gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 + (byte) gfx_init_plane_charset8::col#7 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) + (byte*) gfx_init_plane_charset8::gfxa#7 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) + (byte) gfx_init_plane_charset8::ch#3 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 ) + (byte*) gfx_init_plane_charset8::chargen#4 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 ) + (byte) gfx_init_plane_charset8::cr#2 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 ) + (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#2 + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cr#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) goto gfx_init_plane_charset8::@2 + to:gfx_init_plane_charset8::@7 +gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 + (byte) gfx_init_plane_charset8::col#8 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 ) + (byte*) gfx_init_plane_charset8::gfxa#8 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 ) + (byte*) gfx_init_plane_charset8::chargen#5 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 ) + (byte) gfx_init_plane_charset8::ch#2 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 ) + (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#2 + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::ch#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$12) goto gfx_init_plane_charset8::@1 + to:gfx_init_plane_charset8::@8 +gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$14 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte~) gfx_init_plane_charset8::$14 + call dtvSetCpuBankSegment1 param-assignment + to:gfx_init_plane_charset8::@10 +gfx_init_plane_charset8::@10: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 + to:gfx_init_plane_charset8::@return +gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@10 + return + to:@return +@5: scope:[] from @1 + call main param-assignment + to:@6 +@6: scope:[] from @5 + to:@end +@end: scope:[] from @6 + +SYMBOL TABLE SSA +(label) @1 +(label) @5 +(label) @6 +(label) @begin +(label) @end +(byte*) BORDERCOL +(byte*) BORDERCOL#0 +(byte*) CHARGEN +(byte*) CHARGEN#0 +(byte*) CHARSET8 +(byte*) CHARSET8#0 +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A#0 +(byte*) CIA2_PORT_A_DDR +(byte*) CIA2_PORT_A_DDR#0 +(byte) DTV_BADLINE_OFF +(byte) DTV_BADLINE_OFF#0 +(byte) DTV_CHUNKY +(byte) DTV_CHUNKY#0 +(byte*) DTV_CONTROL +(byte*) DTV_CONTROL#0 +(byte*) DTV_FEATURE +(byte*) DTV_FEATURE#0 +(byte) DTV_FEATURE_ENABLE +(byte) DTV_FEATURE_ENABLE#0 +(byte) DTV_HIGHCOLOR +(byte) DTV_HIGHCOLOR#0 +(byte) DTV_LINEAR +(byte) DTV_LINEAR#0 +(byte*) DTV_PALETTE +(byte*) DTV_PALETTE#0 +(byte*) DTV_PLANEA_MODULO_HI +(byte*) DTV_PLANEA_MODULO_HI#0 +(byte*) DTV_PLANEA_MODULO_LO +(byte*) DTV_PLANEA_MODULO_LO#0 +(byte*) DTV_PLANEA_START_HI +(byte*) DTV_PLANEA_START_HI#0 +(byte*) DTV_PLANEA_START_LO +(byte*) DTV_PLANEA_START_LO#0 +(byte*) DTV_PLANEA_START_MI +(byte*) DTV_PLANEA_START_MI#0 +(byte*) DTV_PLANEA_STEP +(byte*) DTV_PLANEA_STEP#0 +(byte*) DTV_PLANEB_MODULO_HI +(byte*) DTV_PLANEB_MODULO_HI#0 +(byte*) DTV_PLANEB_MODULO_LO +(byte*) DTV_PLANEB_MODULO_LO#0 +(byte*) DTV_PLANEB_START_HI +(byte*) DTV_PLANEB_START_HI#0 +(byte*) DTV_PLANEB_START_LO +(byte*) DTV_PLANEB_START_LO#0 +(byte*) DTV_PLANEB_START_MI +(byte*) DTV_PLANEB_START_MI#0 +(byte*) DTV_PLANEB_STEP +(byte*) DTV_PLANEB_STEP#0 +(byte*) PROCPORT +(byte*) PROCPORT#0 +(byte*) PROCPORT_DDR +(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 +(byte*) RASTER +(byte*) RASTER#0 +(byte*) SCREEN +(byte*) SCREEN#0 +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL#0 +(byte*) VIC_CONTROL2 +(byte*) VIC_CONTROL2#0 +(byte) VIC_CSEL +(byte) VIC_CSEL#0 +(byte) VIC_DEN +(byte) VIC_DEN#0 +(byte) VIC_ECM +(byte) VIC_ECM#0 +(byte) VIC_MCM +(byte) VIC_MCM#0 +(byte*) VIC_MEMORY +(byte*) VIC_MEMORY#0 +(byte) VIC_RSEL +(byte) VIC_RSEL#0 +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) +(label) dtvSetCpuBankSegment1::@return +(byte*) dtvSetCpuBankSegment1::cpuBank +(byte*) dtvSetCpuBankSegment1::cpuBank#0 +(byte) dtvSetCpuBankSegment1::cpuBankIdx +(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 +(void()) gfx_init() +(label) gfx_init::@1 +(label) gfx_init::@2 +(label) gfx_init::@return +(void()) gfx_init_plane_charset8() +(byte*~) gfx_init_plane_charset8::$0 +(byte~) gfx_init_plane_charset8::$1 +(boolean~) gfx_init_plane_charset8::$10 +(boolean~) gfx_init_plane_charset8::$11 +(boolean~) gfx_init_plane_charset8::$12 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$13 +(byte~) gfx_init_plane_charset8::$14 +(word~) gfx_init_plane_charset8::$3 +(word~) gfx_init_plane_charset8::$4 +(word/signed dword/dword~) gfx_init_plane_charset8::$5 +(byte~) gfx_init_plane_charset8::$6 +(boolean~) gfx_init_plane_charset8::$7 +(boolean~) gfx_init_plane_charset8::$8 +(byte~) gfx_init_plane_charset8::$9 +(label) gfx_init_plane_charset8::@1 +(label) gfx_init_plane_charset8::@10 +(label) gfx_init_plane_charset8::@2 +(label) gfx_init_plane_charset8::@3 +(label) gfx_init_plane_charset8::@4 +(label) gfx_init_plane_charset8::@5 +(label) gfx_init_plane_charset8::@6 +(label) gfx_init_plane_charset8::@7 +(label) gfx_init_plane_charset8::@8 +(label) gfx_init_plane_charset8::@9 +(label) gfx_init_plane_charset8::@return +(byte) gfx_init_plane_charset8::bits +(byte) gfx_init_plane_charset8::bits#0 +(byte) gfx_init_plane_charset8::bits#1 +(byte) gfx_init_plane_charset8::bits#2 +(byte) gfx_init_plane_charset8::bits#3 +(byte) gfx_init_plane_charset8::bits#4 +(byte) gfx_init_plane_charset8::c +(byte) gfx_init_plane_charset8::c#0 +(byte) gfx_init_plane_charset8::c#1 +(byte) gfx_init_plane_charset8::c#2 +(byte) gfx_init_plane_charset8::ch +(byte) gfx_init_plane_charset8::ch#0 +(byte) gfx_init_plane_charset8::ch#1 +(byte) gfx_init_plane_charset8::ch#2 +(byte) gfx_init_plane_charset8::ch#3 +(byte) gfx_init_plane_charset8::ch#4 +(byte) gfx_init_plane_charset8::ch#5 +(byte) gfx_init_plane_charset8::ch#6 +(byte) gfx_init_plane_charset8::ch#7 +(byte) gfx_init_plane_charset8::ch#8 +(byte*) gfx_init_plane_charset8::chargen +(byte*) gfx_init_plane_charset8::chargen#0 +(byte*) gfx_init_plane_charset8::chargen#1 +(byte*) gfx_init_plane_charset8::chargen#2 +(byte*) gfx_init_plane_charset8::chargen#3 +(byte*) gfx_init_plane_charset8::chargen#4 +(byte*) gfx_init_plane_charset8::chargen#5 +(byte*) gfx_init_plane_charset8::chargen#6 +(byte*) gfx_init_plane_charset8::chargen#7 +(byte*) gfx_init_plane_charset8::chargen#8 +(byte) gfx_init_plane_charset8::col +(byte) gfx_init_plane_charset8::col#0 +(byte) gfx_init_plane_charset8::col#1 +(byte) gfx_init_plane_charset8::col#2 +(byte) gfx_init_plane_charset8::col#3 +(byte) gfx_init_plane_charset8::col#4 +(byte) gfx_init_plane_charset8::col#5 +(byte) gfx_init_plane_charset8::col#6 +(byte) gfx_init_plane_charset8::col#7 +(byte) gfx_init_plane_charset8::col#8 +(byte) gfx_init_plane_charset8::cp +(byte) gfx_init_plane_charset8::cp#0 +(byte) gfx_init_plane_charset8::cp#1 +(byte) gfx_init_plane_charset8::cp#2 +(byte) gfx_init_plane_charset8::cp#3 +(byte) gfx_init_plane_charset8::cp#4 +(byte) gfx_init_plane_charset8::cr +(byte) gfx_init_plane_charset8::cr#0 +(byte) gfx_init_plane_charset8::cr#1 +(byte) gfx_init_plane_charset8::cr#2 +(byte) gfx_init_plane_charset8::cr#3 +(byte) gfx_init_plane_charset8::cr#4 +(byte) gfx_init_plane_charset8::cr#5 +(byte) gfx_init_plane_charset8::cr#6 +(byte*) gfx_init_plane_charset8::gfxa +(byte*) gfx_init_plane_charset8::gfxa#0 +(byte*) gfx_init_plane_charset8::gfxa#1 +(byte*) gfx_init_plane_charset8::gfxa#2 +(byte*) gfx_init_plane_charset8::gfxa#3 +(byte*) gfx_init_plane_charset8::gfxa#4 +(byte*) gfx_init_plane_charset8::gfxa#5 +(byte*) gfx_init_plane_charset8::gfxa#6 +(byte*) gfx_init_plane_charset8::gfxa#7 +(byte*) gfx_init_plane_charset8::gfxa#8 +(byte) gfx_init_plane_charset8::gfxbCpuBank +(byte) gfx_init_plane_charset8::gfxbCpuBank#0 +(byte) gfx_init_plane_charset8::gfxbCpuBank#1 +(byte) gfx_init_plane_charset8::gfxbCpuBank#2 +(void()) gfx_init_screen0() +(byte~) gfx_init_screen0::$0 +(byte~) gfx_init_screen0::$1 +(byte~) gfx_init_screen0::$2 +(byte~) gfx_init_screen0::$3 +(boolean~) gfx_init_screen0::$4 +(boolean~) gfx_init_screen0::$5 +(label) gfx_init_screen0::@1 +(label) gfx_init_screen0::@2 +(label) gfx_init_screen0::@3 +(label) gfx_init_screen0::@return +(byte*) gfx_init_screen0::ch +(byte*) gfx_init_screen0::ch#0 +(byte*) gfx_init_screen0::ch#1 +(byte*) gfx_init_screen0::ch#2 +(byte*) gfx_init_screen0::ch#3 +(byte*) gfx_init_screen0::ch#4 +(byte) gfx_init_screen0::cx +(byte) gfx_init_screen0::cx#0 +(byte) gfx_init_screen0::cx#1 +(byte) gfx_init_screen0::cx#2 +(byte) gfx_init_screen0::cy +(byte) gfx_init_screen0::cy#0 +(byte) gfx_init_screen0::cy#1 +(byte) gfx_init_screen0::cy#2 +(byte) gfx_init_screen0::cy#3 +(byte) gfx_init_screen0::cy#4 +(void()) main() +(byte~) main::$1 +(byte~) main::$11 +(byte~) main::$12 +(word~) main::$13 +(word/signed dword/dword~) main::$14 +(byte~) main::$15 +(byte/word/dword~) main::$16 +(word~) main::$17 +(word~) main::$18 +(word~) main::$19 +(byte~) main::$2 +(byte~) main::$20 +(word~) main::$21 +(word~) main::$22 +(byte~) main::$23 +(byte~) main::$24 +(byte~) main::$25 +(boolean~) main::$26 +(byte~) main::$27 +(byte~) main::$28 +(byte/word/dword~) main::$29 +(byte~) main::$3 +(boolean~) main::$30 +(byte~) main::$31 +(byte~) main::$32 +(byte~) main::$33 +(byte~) main::$34 +(byte~) main::$35 +(boolean~) main::$36 +(byte~) main::$4 +(byte~) main::$5 +(byte/word/dword~) main::$6 +(byte~) main::$7 +(byte~) main::$8 +(byte~) main::$9 +(label) main::@1 +(label) main::@17 +(label) main::@2 +(label) main::@3 +(label) main::@5 +(label) main::@6 +(label) main::@7 +(label) main::@8 +(label) main::@return +(byte) main::j +(byte) main::j#0 +(byte) main::j#1 +(byte) main::j#2 +(byte) main::rst +(byte) main::rst#0 +(byte) main::rst#1 +(byte) main::rst#2 +(byte) main::rst#3 + +OPTIMIZING CONTROL FLOW GRAPH +Culled Empty Block (label) gfx_init::@2 +Culled Empty Block (label) gfx_init_plane_charset8::@10 +Culled Empty Block (label) @6 +Succesful SSA optimization Pass2CullEmptyBlocks +Inversing boolean not (boolean~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$6 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) gfx_init_plane_charset8::$7 ← (byte~) gfx_init_plane_charset8::$6 != (byte/signed byte/word/signed word/dword/signed dword) 0 +Succesful SSA optimization Pass2UnaryNotSimplification +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#2 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: gfx_init_screen0::ch#0 SCREEN#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::gfxbCpuBank#0 +Not aliassing across scopes: gfx_init_plane_charset8::chargen#0 CHARGEN#0 +Alias (byte) main::rst#2 = (byte) main::rst#3 +Alias (byte) gfx_init_screen0::cy#2 = (byte) gfx_init_screen0::cy#3 +Alias (byte*) gfx_init_screen0::ch#1 = (byte*) gfx_init_screen0::ch#4 +Alias (byte) gfx_init_plane_charset8::gfxbCpuBank#0 = (byte~) gfx_init_plane_charset8::$1 (byte) gfx_init_plane_charset8::gfxbCpuBank#2 +Alias (byte) gfx_init_plane_charset8::bits#1 = (byte~) gfx_init_plane_charset8::$9 +Alias (byte) gfx_init_plane_charset8::col#3 = (byte) gfx_init_plane_charset8::col#4 (byte) gfx_init_plane_charset8::c#1 +Alias (byte*) gfx_init_plane_charset8::gfxa#3 = (byte*) gfx_init_plane_charset8::gfxa#4 +Alias (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#4 +Alias (byte) gfx_init_plane_charset8::cp#3 = (byte) gfx_init_plane_charset8::cp#4 +Alias (byte) gfx_init_plane_charset8::cr#4 = (byte) gfx_init_plane_charset8::cr#5 +Alias (byte*) gfx_init_plane_charset8::chargen#7 = (byte*) gfx_init_plane_charset8::chargen#8 +Alias (byte) gfx_init_plane_charset8::ch#5 = (byte) gfx_init_plane_charset8::ch#6 +Alias (byte) gfx_init_plane_charset8::cr#2 = (byte) gfx_init_plane_charset8::cr#3 +Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charset8::chargen#6 (byte*) gfx_init_plane_charset8::chargen#5 +Alias (byte) gfx_init_plane_charset8::ch#2 = (byte) gfx_init_plane_charset8::ch#3 (byte) gfx_init_plane_charset8::ch#4 +Alias (byte*) gfx_init_plane_charset8::gfxa#1 = (byte*) gfx_init_plane_charset8::gfxa#7 (byte*) gfx_init_plane_charset8::gfxa#8 +Alias (byte) gfx_init_plane_charset8::col#1 = (byte) gfx_init_plane_charset8::col#7 (byte) gfx_init_plane_charset8::col#8 +Alias (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte~) gfx_init_plane_charset8::$14 +Succesful SSA optimization Pass2AliasElimination +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#2 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: gfx_init_screen0::ch#0 SCREEN#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::gfxbCpuBank#0 +Not aliassing across scopes: gfx_init_plane_charset8::chargen#0 CHARGEN#0 +Alias (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#3 +Alias (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#3 +Alias (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#3 +Alias (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#3 +Alias (byte) gfx_init_plane_charset8::cr#2 = (byte) gfx_init_plane_charset8::cr#4 +Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charset8::chargen#7 +Alias (byte) gfx_init_plane_charset8::ch#2 = (byte) gfx_init_plane_charset8::ch#5 +Succesful SSA optimization Pass2AliasElimination +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#2 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: gfx_init_screen0::ch#0 SCREEN#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::gfxbCpuBank#0 +Not aliassing across scopes: gfx_init_plane_charset8::chargen#0 CHARGEN#0 +Self Phi Eliminated (byte) main::rst#2 +Self Phi Eliminated (byte) gfx_init_screen0::cy#2 +Self Phi Eliminated (byte) gfx_init_plane_charset8::cr#2 +Self Phi Eliminated (byte*) gfx_init_plane_charset8::chargen#4 +Self Phi Eliminated (byte) gfx_init_plane_charset8::ch#2 +Succesful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte) main::rst#2 (byte) main::rst#0 +Redundant Phi (byte) gfx_init_screen0::cy#2 (byte) gfx_init_screen0::cy#4 +Redundant Phi (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset8::cr#6 +Redundant Phi (byte*) gfx_init_plane_charset8::chargen#4 (byte*) gfx_init_plane_charset8::chargen#1 +Redundant Phi (byte) gfx_init_plane_charset8::ch#2 (byte) gfx_init_plane_charset8::ch#7 +Succesful SSA optimization Pass2RedundantPhiElimination +Simple Condition (boolean~) main::$26 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 +Simple Condition (boolean~) main::$30 if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 +Simple Condition (boolean~) main::$36 if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 +Simple Condition (boolean~) gfx_init_screen0::$4 if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 +Simple Condition (boolean~) gfx_init_screen0::$5 if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 +Simple Condition (boolean~) gfx_init_plane_charset8::$8 if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (boolean~) gfx_init_plane_charset8::$10 if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 +Simple Condition (boolean~) gfx_init_plane_charset8::$11 if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 +Simple Condition (boolean~) gfx_init_plane_charset8::$12 if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 +Succesful SSA optimization Pass2ConditionalJumpSimplification +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 = 53 +Constant (const byte) PROCPORT_RAM_CHARROM#0 = 49 +Constant (const byte*) CHARGEN#0 = ((byte*))53248 +Constant (const byte*) RASTER#0 = ((byte*))53266 +Constant (const byte*) BORDERCOL#0 = ((byte*))53280 +Constant (const byte*) VIC_CONTROL#0 = ((byte*))53265 +Constant (const byte) VIC_ECM#0 = 64 +Constant (const byte) VIC_DEN#0 = 16 +Constant (const byte) VIC_RSEL#0 = 8 +Constant (const byte*) VIC_CONTROL2#0 = ((byte*))53270 +Constant (const byte) VIC_MCM#0 = 16 +Constant (const byte) VIC_CSEL#0 = 8 +Constant (const byte*) VIC_MEMORY#0 = ((byte*))53272 +Constant (const byte*) CIA2_PORT_A#0 = ((byte*))56576 +Constant (const byte*) CIA2_PORT_A_DDR#0 = ((byte*))56578 +Constant (const byte*) DTV_FEATURE#0 = ((byte*))53311 +Constant (const byte) DTV_FEATURE_ENABLE#0 = 1 +Constant (const byte*) DTV_CONTROL#0 = ((byte*))53308 +Constant (const byte) DTV_LINEAR#0 = 1 +Constant (const byte) DTV_HIGHCOLOR#0 = 4 +Constant (const byte) DTV_BADLINE_OFF#0 = 32 +Constant (const byte) DTV_CHUNKY#0 = 64 +Constant (const byte*) DTV_PALETTE#0 = ((byte*))53760 +Constant (const byte*) DTV_PLANEA_START_LO#0 = ((byte*))53306 +Constant (const byte*) DTV_PLANEA_START_MI#0 = ((byte*))53307 +Constant (const byte*) DTV_PLANEA_START_HI#0 = ((byte*))53317 +Constant (const byte*) DTV_PLANEA_STEP#0 = ((byte*))53318 +Constant (const byte*) DTV_PLANEA_MODULO_LO#0 = ((byte*))53304 +Constant (const byte*) DTV_PLANEA_MODULO_HI#0 = ((byte*))53305 +Constant (const byte*) DTV_PLANEB_START_LO#0 = ((byte*))53321 +Constant (const byte*) DTV_PLANEB_START_MI#0 = ((byte*))53322 +Constant (const byte*) DTV_PLANEB_START_HI#0 = ((byte*))53323 +Constant (const byte*) DTV_PLANEB_STEP#0 = ((byte*))53324 +Constant (const byte*) DTV_PLANEB_MODULO_LO#0 = ((byte*))53319 +Constant (const byte*) DTV_PLANEB_MODULO_HI#0 = ((byte*))53320 +Constant (const byte*) dtvSetCpuBankSegment1::cpuBank#0 = ((byte*))255 +Constant (const byte*) SCREEN#0 = ((byte*))31744 +Constant (const byte*) CHARSET8#0 = ((byte*))32768 +Constant (const byte) main::j#0 = 0 +Constant (const byte) main::rst#0 = 66 +Constant (const byte) gfx_init_screen0::cy#0 = 0 +Constant (const byte) gfx_init_screen0::cx#0 = 0 +Constant (const byte) gfx_init_plane_charset8::col#0 = 0 +Constant (const byte) gfx_init_plane_charset8::ch#0 = 0 +Constant (const byte) gfx_init_plane_charset8::cr#0 = 0 +Constant (const byte) gfx_init_plane_charset8::cp#0 = 0 +Constant (const byte) gfx_init_plane_charset8::c#0 = 0 +Constant (const byte/signed byte/word/signed word/dword/signed dword) gfx_init_plane_charset8::$13 = 16384/16384 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$1 = DTV_HIGHCOLOR#0|DTV_LINEAR#0 +Constant (const byte) main::$4 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte) main::$7 = VIC_MCM#0|VIC_CSEL#0 +Constant (const byte) main::$8 = SCREEN#0 +Constant (const byte) main::$11 = CHARSET8#0 +Constant (const word) main::$13 = ((word))SCREEN#0 +Constant (const word) main::$17 = ((word))SCREEN#0 +Constant (const word) main::$21 = ((word))SCREEN#0 +Constant (const byte) main::$27 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte) main::$31 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte*) gfx_init_screen0::ch#0 = SCREEN#0 +Constant (const byte*) gfx_init_plane_charset8::$0 = CHARSET8#0/16384 +Constant (const word) gfx_init_plane_charset8::$3 = ((word))CHARSET8#0 +Constant (const byte*) gfx_init_plane_charset8::chargen#0 = CHARGEN#0 +Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = ((byte))gfx_init_plane_charset8::$13 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$2 = main::$1|DTV_CHUNKY#0 +Constant (const byte) main::$5 = main::$4|VIC_RSEL#0 +Constant (const word/signed dword/dword) main::$14 = main::$13/16384 +Constant (const word) main::$18 = main::$17&16383 +Constant (const word) main::$22 = main::$21&16383 +Constant (const byte) main::$28 = main::$27|VIC_RSEL#0 +Constant (const byte) main::$32 = main::$31|VIC_RSEL#0 +Constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 = ((byte))gfx_init_plane_charset8::$0 +Constant (const word) gfx_init_plane_charset8::$4 = gfx_init_plane_charset8::$3&16383 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$3 = main::$2|DTV_BADLINE_OFF#0 +Constant (const byte/word/dword) main::$6 = main::$5|3 +Constant (const byte) main::$15 = ((byte))main::$14 +Constant (const word) main::$19 = main::$18>>6 +Constant (const byte) main::$23 = >main::$22 +Constant (const byte/word/dword) main::$29 = main::$28|3 +Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 = gfx_init_plane_charset8::gfxbCpuBank#0 +Constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#1 = ++gfx_init_plane_charset8::gfxbCpuBank#0 +Constant (const word/signed dword/dword) gfx_init_plane_charset8::$5 = 16384+gfx_init_plane_charset8::$4 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte/word/dword) main::$16 = 3^main::$15 +Constant (const byte) main::$20 = ((byte))main::$19 +Constant (const byte) main::$24 = main::$23>>2 +Constant (const byte*) gfx_init_plane_charset8::gfxa#0 = ((byte*))gfx_init_plane_charset8::$5 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$25 = main::$20|main::$24 +Succesful SSA optimization Pass2ConstantIdentification +Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2 +Eliminating unused constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#1 +Succesful SSA optimization PassNEliminateUnusedVars +Culled Empty Block (label) @1 +Culled Empty Block (label) main::@6 +Not culling empty block because it shares successor with its predecessor. (label) gfx_init_plane_charset8::@5 +Succesful SSA optimization Pass2CullEmptyBlocks +Not culling empty block because it shares successor with its predecessor. (label) gfx_init_plane_charset8::@5 +Self Phi Eliminated (byte) gfx_init_plane_charset8::ch#7 +Succesful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte) gfx_init_plane_charset8::ch#7 (byte) gfx_init_plane_charset8::ch#8 +Succesful SSA optimization Pass2RedundantPhiElimination +Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2 +Not culling empty block because it shares successor with its predecessor. (label) gfx_init_plane_charset8::@5 +Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2 +OPTIMIZING CONTROL FLOW GRAPH +Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1 +Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 +Inlining constant with different constant siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 +Inlining constant with var siblings (const byte) main::j#0 +Inlining constant with var siblings (const byte) main::j#0 +Inlining constant with var siblings (const byte) main::rst#0 +Inlining constant with var siblings (const byte) gfx_init_screen0::cy#0 +Inlining constant with var siblings (const byte) gfx_init_screen0::cy#0 +Inlining constant with var siblings (const byte) gfx_init_screen0::cx#0 +Inlining constant with var siblings (const byte) gfx_init_screen0::cx#0 +Inlining constant with var siblings (const byte*) gfx_init_screen0::ch#0 +Inlining constant with var siblings (const byte*) gfx_init_screen0::ch#0 +Inlining constant with var siblings (const byte*) gfx_init_screen0::ch#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::ch#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::ch#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cr#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cr#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cp#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cp#0 +Inlining constant with var siblings (const byte) gfx_init_plane_charset8::c#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::chargen#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::chargen#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::chargen#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0 +Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0 +Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#1 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 +Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#0 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 +Constant inlined gfx_init_plane_charset8::gfxa#0 = ((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::rst#0 = (byte/signed byte/word/signed word/dword/signed dword) 66 +Constant inlined gfx_init_plane_charset8::cp#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined gfx_init_plane_charset8::cr#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$12 = >(const byte*) CHARSET8#0 +Constant inlined main::$13 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$14 = ((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$15 = ((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 +Constant inlined gfx_init_plane_charset8::c#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$31 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$32 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$11 = <(const byte*) CHARSET8#0 +Constant inlined gfx_init_plane_charset8::chargen#0 = (const byte*) CHARGEN#0 +Constant inlined main::$16 = (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$17 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$18 = ((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$19 = ((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6 +Constant inlined gfx_init_plane_charset8::ch#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::j#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined gfx_init_plane_charset8::$13 = (word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 +Constant inlined gfx_init_screen0::cx#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined gfx_init_screen0::cy#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$23 = >((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$24 = >((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined main::$25 = ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined main::$20 = ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6 +Constant inlined main::$21 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$22 = ((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383 +Constant inlined gfx_init_plane_charset8::$4 = ((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 +Constant inlined gfx_init_screen0::ch#0 = (const byte*) SCREEN#0 +Constant inlined gfx_init_plane_charset8::$5 = (word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$1 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0 +Constant inlined main::$27 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$2 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0 +Constant inlined main::$28 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$29 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 +Constant inlined main::$5 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$6 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 +Constant inlined main::$3 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 +Constant inlined gfx_init_plane_charset8::col#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$4 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$9 = >(const byte*) SCREEN#0 +Constant inlined gfx_init_plane_charset8::$0 = (const byte*) CHARSET8#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$7 = (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 +Constant inlined main::$8 = <(const byte*) SCREEN#0 +Constant inlined gfx_init_plane_charset8::$3 = ((word))(const byte*) CHARSET8#0 +Succesful SSA optimization Pass2ConstantInlining +Block Sequence Planned @begin @5 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 gfx_init gfx_init::@1 gfx_init::@return gfx_init_plane_charset8 gfx_init_plane_charset8::@9 gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@return dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return gfx_init_screen0 gfx_init_screen0::@1 gfx_init_screen0::@2 gfx_init_screen0::@3 gfx_init_screen0::@return +Added new block during phi lifting main::@18(between main::@1 and main::@1) +Added new block during phi lifting gfx_init_plane_charset8::@11(between gfx_init_plane_charset8::@7 and gfx_init_plane_charset8::@1) +Added new block during phi lifting gfx_init_plane_charset8::@12(between gfx_init_plane_charset8::@6 and gfx_init_plane_charset8::@2) +Added new block during phi lifting gfx_init_plane_charset8::@13(between gfx_init_plane_charset8::@4 and gfx_init_plane_charset8::@3) +Added new block during phi lifting gfx_init_screen0::@5(between gfx_init_screen0::@3 and gfx_init_screen0::@1) +Added new block during phi lifting gfx_init_screen0::@6(between gfx_init_screen0::@2 and gfx_init_screen0::@2) +Block Sequence Planned @begin @5 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 main::@18 gfx_init gfx_init::@1 gfx_init::@return gfx_init_plane_charset8 gfx_init_plane_charset8::@9 gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@return gfx_init_plane_charset8::@11 gfx_init_plane_charset8::@12 gfx_init_plane_charset8::@13 dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return gfx_init_screen0 gfx_init_screen0::@1 gfx_init_screen0::@2 gfx_init_screen0::@3 gfx_init_screen0::@return gfx_init_screen0::@5 gfx_init_screen0::@6 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @5 +Adding NOP phi() at start of @end +Adding NOP phi() at start of gfx_init +Adding NOP phi() at start of gfx_init::@1 +Adding NOP phi() at start of gfx_init_plane_charset8 +Adding NOP phi() at start of gfx_init_screen0 +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to gfx_init:7 +Calls in [gfx_init] to gfx_init_screen0:48 gfx_init_plane_charset8:50 +Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:53 dtvSetCpuBankSegment1:81 + +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Created 19 initial phi equivalence classes +Coalesced [46] main::j#3 ← main::j#1 +Coalesced [56] gfx_init_plane_charset8::chargen#10 ← gfx_init_plane_charset8::chargen#3 +Coalesced [57] gfx_init_plane_charset8::gfxa#10 ← gfx_init_plane_charset8::gfxa#6 +Coalesced [58] gfx_init_plane_charset8::col#10 ← gfx_init_plane_charset8::col#6 +Coalesced [62] gfx_init_plane_charset8::bits#5 ← gfx_init_plane_charset8::bits#0 +Coalesced [63] gfx_init_plane_charset8::gfxa#12 ← gfx_init_plane_charset8::gfxa#5 +Coalesced [64] gfx_init_plane_charset8::col#12 ← gfx_init_plane_charset8::col#5 +Not coalescing [68] gfx_init_plane_charset8::c#3 ← gfx_init_plane_charset8::col#2 +Coalesced [83] gfx_init_plane_charset8::chargen#9 ← gfx_init_plane_charset8::chargen#1 +Coalesced [84] gfx_init_plane_charset8::gfxa#9 ← gfx_init_plane_charset8::gfxa#1 +Coalesced [85] gfx_init_plane_charset8::col#9 ← gfx_init_plane_charset8::col#1 +Coalesced [86] gfx_init_plane_charset8::ch#9 ← gfx_init_plane_charset8::ch#1 +Coalesced (already) [87] gfx_init_plane_charset8::chargen#11 ← gfx_init_plane_charset8::chargen#1 +Coalesced (already) [88] gfx_init_plane_charset8::gfxa#11 ← gfx_init_plane_charset8::gfxa#1 +Coalesced (already) [89] gfx_init_plane_charset8::col#11 ← gfx_init_plane_charset8::col#1 +Coalesced [90] gfx_init_plane_charset8::cr#7 ← gfx_init_plane_charset8::cr#1 +Coalesced [91] gfx_init_plane_charset8::bits#6 ← gfx_init_plane_charset8::bits#1 +Coalesced (already) [92] gfx_init_plane_charset8::gfxa#13 ← gfx_init_plane_charset8::gfxa#1 +Coalesced (already) [93] gfx_init_plane_charset8::col#13 ← gfx_init_plane_charset8::col#1 +Coalesced [94] gfx_init_plane_charset8::cp#5 ← gfx_init_plane_charset8::cp#1 +Coalesced [101] gfx_init_screen0::ch#6 ← gfx_init_screen0::ch#3 +Coalesced [114] gfx_init_screen0::cy#5 ← gfx_init_screen0::cy#1 +Coalesced [115] gfx_init_screen0::ch#5 ← gfx_init_screen0::ch#1 +Coalesced [116] gfx_init_screen0::cx#3 ← gfx_init_screen0::cx#1 +Coalesced (already) [117] gfx_init_screen0::ch#7 ← gfx_init_screen0::ch#1 +Coalesced down to 13 phi equivalence classes +Culled Empty Block (label) main::@18 +Culled Empty Block (label) gfx_init_plane_charset8::@11 +Culled Empty Block (label) gfx_init_plane_charset8::@12 +Culled Empty Block (label) gfx_init_plane_charset8::@13 +Culled Empty Block (label) gfx_init_screen0::@5 +Culled Empty Block (label) gfx_init_screen0::@6 +Block Sequence Planned @begin @5 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 gfx_init gfx_init::@1 gfx_init::@return gfx_init_plane_charset8 gfx_init_plane_charset8::@9 gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@return dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return gfx_init_screen0 gfx_init_screen0::@1 gfx_init_screen0::@2 gfx_init_screen0::@3 gfx_init_screen0::@return +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @5 +Adding NOP phi() at start of @end +Adding NOP phi() at start of gfx_init +Adding NOP phi() at start of gfx_init::@1 +Adding NOP phi() at start of gfx_init_plane_charset8 +Adding NOP phi() at start of gfx_init_screen0 +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... + +FINAL CONTROL FLOW GRAPH +@begin: scope:[] from + [0] phi() [ ] ( ) + to:@5 +@5: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @5 + [3] phi() [ ] ( ) +main: scope:[main] from @5 + asm { sei } + [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) + [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) + [7] call gfx_init param-assignment [ ] ( main:2 [ ] ) + to:main::@17 +main::@17: scope:[main] from main + [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) + [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) + [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) + [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) + [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) + [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) + [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) + to:main::@1 +main::@1: scope:[main] from main::@1 main::@17 + [27] (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@17/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [29] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + to:main::@2 +main::@2: scope:[main] from main::@1 main::@8 + [31] if(true) goto main::@3 [ ] ( main:2 [ ] ) + to:main::@return +main::@return: scope:[main] from main::@2 + [32] return [ ] ( main:2 [ ] ) + to:@return +main::@3: scope:[main] from main::@2 + asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + to:main::@5 +main::@5: scope:[main] from main::@3 main::@5 + [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) + to:main::@7 +main::@7: scope:[main] from main::@5 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + to:main::@8 +main::@8: scope:[main] from main::@7 main::@8 + [38] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) + [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) + [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$35 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + [45] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) + to:main::@2 +gfx_init: scope:[gfx_init] from main + [46] phi() [ ] ( main:2::gfx_init:7 [ ] ) + [47] call gfx_init_screen0 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + to:gfx_init::@1 +gfx_init::@1: scope:[gfx_init] from gfx_init + [48] phi() [ ] ( main:2::gfx_init:7 [ ] ) + [49] call gfx_init_plane_charset8 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + to:gfx_init::@return +gfx_init::@return: scope:[gfx_init] from gfx_init::@1 + [50] return [ ] ( main:2::gfx_init:7 [ ] ) + to:@return +gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1 + [51] phi() [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + [52] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@9 +gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8 + [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@1 +gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9 + [54] (byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::@9/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::@9/((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + [54] (byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@9/(const byte*) CHARGEN#0 ) [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::ch#8 ] ) + to:gfx_init_plane_charset8::@2 +gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6 + [55] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [55] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 ] ) + [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) + [57] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) + to:gfx_init_plane_charset8::@3 +gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4 + [58] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [58] (byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) + [60] if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + to:gfx_init_plane_charset8::@5 +gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 + [61] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ) + to:gfx_init_plane_charset8::@4 +gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 + [62] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_plane_charset8::@5/(byte~) gfx_init_plane_charset8::c#3 ) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#2 ] ) + [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [64] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) + [65] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) + [66] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) + [67] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) + [68] if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) + to:gfx_init_plane_charset8::@6 +gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4 + [69] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) + [70] if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) + to:gfx_init_plane_charset8::@7 +gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6 + [71] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) + [72] if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) + to:gfx_init_plane_charset8::@8 +gfx_init_plane_charset8::@8: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 + [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + [74] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:gfx_init_plane_charset8::@return +gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 + [75] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + to:@return +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8 + [76] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 ) [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] ) + [77] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + [79] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + to:@return +gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init + [80] phi() [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + to:gfx_init_screen0::@1 +gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3 + [81] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const byte*) SCREEN#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ) + [81] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#3 ] ) + to:gfx_init_screen0::@2 +gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2 + [82] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [82] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 ) [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) + [84] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) + [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) + [86] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ) + [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) + [88] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ) + [89] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) + [90] if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) + to:gfx_init_screen0::@3 +gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2 + [91] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) + [92] if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) + to:gfx_init_screen0::@return +gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3 + [93] return [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + to:@return + +DOMINATORS +@begin dominated by @begin +@5 dominated by @begin @5 +@end dominated by @end @begin @5 +main dominated by main @begin @5 +main::@17 dominated by main @begin main::@17 @5 +main::@1 dominated by main main::@1 @begin main::@17 @5 +main::@2 dominated by main main::@1 main::@2 @begin main::@17 @5 +main::@return dominated by main::@return main main::@1 main::@2 @begin main::@17 @5 +main::@3 dominated by main main::@1 main::@2 main::@3 @begin main::@17 @5 +main::@5 dominated by main main::@1 main::@2 main::@5 main::@3 @begin main::@17 @5 +main::@7 dominated by main::@7 main main::@1 main::@2 main::@5 main::@3 @begin main::@17 @5 +main::@8 dominated by main::@7 main::@8 main main::@1 main::@2 main::@5 main::@3 @begin main::@17 @5 +gfx_init dominated by main gfx_init @begin @5 +gfx_init::@1 dominated by main gfx_init gfx_init::@1 @begin @5 +gfx_init::@return dominated by main gfx_init gfx_init::@1 @begin gfx_init::@return @5 +gfx_init_plane_charset8 dominated by main gfx_init gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@9 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@1 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@2 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@3 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@5 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@4 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@4 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@6 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@7 dominated by gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@8 dominated by gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init::@1 gfx_init_plane_charset8 @begin @5 +gfx_init_plane_charset8::@return dominated by gfx_init_plane_charset8::@8 gfx_init_plane_charset8::@9 main gfx_init gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@7 gfx_init::@1 gfx_init_plane_charset8 @begin @5 gfx_init_plane_charset8::@return +dtvSetCpuBankSegment1 dominated by dtvSetCpuBankSegment1 main gfx_init gfx_init::@1 gfx_init_plane_charset8 @begin @5 +dtvSetCpuBankSegment1::@return dominated by dtvSetCpuBankSegment1 main gfx_init gfx_init::@1 gfx_init_plane_charset8 @begin dtvSetCpuBankSegment1::@return @5 +gfx_init_screen0 dominated by main gfx_init_screen0 gfx_init @begin @5 +gfx_init_screen0::@1 dominated by main gfx_init_screen0::@1 gfx_init_screen0 gfx_init @begin @5 +gfx_init_screen0::@2 dominated by main gfx_init_screen0::@2 gfx_init_screen0::@1 gfx_init_screen0 gfx_init @begin @5 +gfx_init_screen0::@3 dominated by gfx_init_screen0::@3 main gfx_init_screen0::@2 gfx_init_screen0::@1 gfx_init_screen0 gfx_init @begin @5 +gfx_init_screen0::@return dominated by gfx_init_screen0::@3 main gfx_init_screen0::@2 gfx_init_screen0::@1 gfx_init_screen0 gfx_init @begin gfx_init_screen0::@return @5 + +NATURAL LOOPS +Found back edge: Loop head: main::@1 tails: main::@1 blocks: null +Found back edge: Loop head: main::@5 tails: main::@5 blocks: null +Found back edge: Loop head: main::@2 tails: main::@8 blocks: null +Found back edge: Loop head: main::@8 tails: main::@8 blocks: null +Found back edge: Loop head: gfx_init_plane_charset8::@3 tails: gfx_init_plane_charset8::@4 blocks: null +Found back edge: Loop head: gfx_init_plane_charset8::@2 tails: gfx_init_plane_charset8::@6 blocks: null +Found back edge: Loop head: gfx_init_plane_charset8::@1 tails: gfx_init_plane_charset8::@7 blocks: null +Found back edge: Loop head: gfx_init_screen0::@2 tails: gfx_init_screen0::@2 blocks: null +Found back edge: Loop head: gfx_init_screen0::@1 tails: gfx_init_screen0::@3 blocks: null +Populated: Loop head: main::@1 tails: main::@1 blocks: main::@1 +Populated: Loop head: main::@5 tails: main::@5 blocks: main::@5 +Populated: Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@7 main::@5 main::@3 main::@2 +Populated: Loop head: main::@8 tails: main::@8 blocks: main::@8 +Populated: Loop head: gfx_init_plane_charset8::@3 tails: gfx_init_plane_charset8::@4 blocks: gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 +Populated: Loop head: gfx_init_plane_charset8::@2 tails: gfx_init_plane_charset8::@6 blocks: gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 +Populated: Loop head: gfx_init_plane_charset8::@1 tails: gfx_init_plane_charset8::@7 blocks: gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@1 +Populated: Loop head: gfx_init_screen0::@2 tails: gfx_init_screen0::@2 blocks: gfx_init_screen0::@2 +Populated: Loop head: gfx_init_screen0::@1 tails: gfx_init_screen0::@3 blocks: gfx_init_screen0::@3 gfx_init_screen0::@2 gfx_init_screen0::@1 +Loop head: main::@1 tails: main::@1 blocks: main::@1 +Loop head: main::@5 tails: main::@5 blocks: main::@5 +Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@7 main::@5 main::@3 main::@2 +Loop head: main::@8 tails: main::@8 blocks: main::@8 +Loop head: gfx_init_plane_charset8::@3 tails: gfx_init_plane_charset8::@4 blocks: gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 +Loop head: gfx_init_plane_charset8::@2 tails: gfx_init_plane_charset8::@6 blocks: gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 +Loop head: gfx_init_plane_charset8::@1 tails: gfx_init_plane_charset8::@7 blocks: gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@1 +Loop head: gfx_init_screen0::@2 tails: gfx_init_screen0::@2 blocks: gfx_init_screen0::@2 +Loop head: gfx_init_screen0::@1 tails: gfx_init_screen0::@3 blocks: gfx_init_screen0::@3 gfx_init_screen0::@2 gfx_init_screen0::@1 + +NATURAL LOOPS WITH DEPTH +Found 0 loops in scope [] +Found 4 loops in scope [main] + Loop head: main::@1 tails: main::@1 blocks: main::@1 + Loop head: main::@5 tails: main::@5 blocks: main::@5 + Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@7 main::@5 main::@3 main::@2 + Loop head: main::@8 tails: main::@8 blocks: main::@8 +Found 0 loops in scope [gfx_init] +Found 2 loops in scope [gfx_init_screen0] + Loop head: gfx_init_screen0::@2 tails: gfx_init_screen0::@2 blocks: gfx_init_screen0::@2 + Loop head: gfx_init_screen0::@1 tails: gfx_init_screen0::@3 blocks: gfx_init_screen0::@3 gfx_init_screen0::@2 gfx_init_screen0::@1 +Found 3 loops in scope [gfx_init_plane_charset8] + Loop head: gfx_init_plane_charset8::@3 tails: gfx_init_plane_charset8::@4 blocks: gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 + Loop head: gfx_init_plane_charset8::@2 tails: gfx_init_plane_charset8::@6 blocks: gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 + Loop head: gfx_init_plane_charset8::@1 tails: gfx_init_plane_charset8::@7 blocks: gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@1 +Found 0 loops in scope [dtvSetCpuBankSegment1] +Loop head: main::@1 tails: main::@1 blocks: main::@1 depth: 1 +Loop head: main::@5 tails: main::@5 blocks: main::@5 depth: 2 +Loop head: main::@2 tails: main::@8 blocks: main::@8 main::@7 main::@5 main::@3 main::@2 depth: 1 +Loop head: main::@8 tails: main::@8 blocks: main::@8 depth: 2 +Loop head: gfx_init_plane_charset8::@3 tails: gfx_init_plane_charset8::@4 blocks: gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 depth: 3 +Loop head: gfx_init_plane_charset8::@2 tails: gfx_init_plane_charset8::@6 blocks: gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 depth: 2 +Loop head: gfx_init_plane_charset8::@1 tails: gfx_init_plane_charset8::@7 blocks: gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@6 gfx_init_plane_charset8::@4 gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5 gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@1 depth: 1 +Loop head: gfx_init_screen0::@2 tails: gfx_init_screen0::@2 blocks: gfx_init_screen0::@2 depth: 2 +Loop head: gfx_init_screen0::@1 tails: gfx_init_screen0::@3 blocks: gfx_init_screen0::@3 gfx_init_screen0::@2 gfx_init_screen0::@1 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(byte*) BORDERCOL +(byte*) CHARGEN +(byte*) CHARSET8 +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte) DTV_BADLINE_OFF +(byte) DTV_CHUNKY +(byte*) DTV_CONTROL +(byte*) DTV_FEATURE +(byte) DTV_FEATURE_ENABLE +(byte) DTV_HIGHCOLOR +(byte) DTV_LINEAR +(byte*) DTV_PALETTE +(byte*) DTV_PLANEA_MODULO_HI +(byte*) DTV_PLANEA_MODULO_LO +(byte*) DTV_PLANEA_START_HI +(byte*) DTV_PLANEA_START_LO +(byte*) DTV_PLANEA_START_MI +(byte*) DTV_PLANEA_STEP +(byte*) DTV_PLANEB_MODULO_HI +(byte*) DTV_PLANEB_MODULO_LO +(byte*) DTV_PLANEB_START_HI +(byte*) DTV_PLANEB_START_LO +(byte*) DTV_PLANEB_START_MI +(byte*) DTV_PLANEB_STEP +(byte*) PROCPORT +(byte*) PROCPORT_DDR +(byte) PROCPORT_DDR_MEMORY_MASK +(byte) PROCPORT_RAM_CHARROM +(byte) PROCPORT_RAM_IO +(byte*) RASTER +(byte*) SCREEN +(byte*) VIC_CONTROL +(byte*) VIC_CONTROL2 +(byte) VIC_CSEL +(byte) VIC_DEN +(byte) VIC_ECM +(byte) VIC_MCM +(byte*) VIC_MEMORY +(byte) VIC_RSEL +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) +(byte*) dtvSetCpuBankSegment1::cpuBank +(byte) dtvSetCpuBankSegment1::cpuBankIdx +(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 2.0 +(void()) gfx_init() +(void()) gfx_init_plane_charset8() +(byte~) gfx_init_plane_charset8::$6 2002.0 +(byte) gfx_init_plane_charset8::bits +(byte) gfx_init_plane_charset8::bits#0 101.0 +(byte) gfx_init_plane_charset8::bits#1 500.5 +(byte) gfx_init_plane_charset8::bits#2 443.42857142857144 +(byte) gfx_init_plane_charset8::c +(byte) gfx_init_plane_charset8::c#2 2002.0 +(byte~) gfx_init_plane_charset8::c#3 2002.0 +(byte) gfx_init_plane_charset8::ch +(byte) gfx_init_plane_charset8::ch#1 16.5 +(byte) gfx_init_plane_charset8::ch#8 1.2941176470588236 +(byte*) gfx_init_plane_charset8::chargen +(byte*) gfx_init_plane_charset8::chargen#1 13.3125 +(byte*) gfx_init_plane_charset8::chargen#2 157.0 +(byte*) gfx_init_plane_charset8::chargen#3 22.0 +(byte) gfx_init_plane_charset8::col +(byte) gfx_init_plane_charset8::col#1 302.0 +(byte) gfx_init_plane_charset8::col#2 388.0 +(byte) gfx_init_plane_charset8::col#5 71.0 +(byte) gfx_init_plane_charset8::col#6 22.0 +(byte) gfx_init_plane_charset8::cp +(byte) gfx_init_plane_charset8::cp#1 1501.5 +(byte) gfx_init_plane_charset8::cp#2 222.44444444444446 +(byte) gfx_init_plane_charset8::cr +(byte) gfx_init_plane_charset8::cr#1 151.5 +(byte) gfx_init_plane_charset8::cr#6 14.428571428571429 +(byte*) gfx_init_plane_charset8::gfxa +(byte*) gfx_init_plane_charset8::gfxa#1 234.8888888888889 +(byte*) gfx_init_plane_charset8::gfxa#2 517.3333333333334 +(byte*) gfx_init_plane_charset8::gfxa#5 71.0 +(byte*) gfx_init_plane_charset8::gfxa#6 22.0 +(byte) gfx_init_plane_charset8::gfxbCpuBank +(void()) gfx_init_screen0() +(byte~) gfx_init_screen0::$0 202.0 +(byte~) gfx_init_screen0::$1 101.0 +(byte~) gfx_init_screen0::$2 202.0 +(byte~) gfx_init_screen0::$3 202.0 +(byte*) gfx_init_screen0::ch +(byte*) gfx_init_screen0::ch#1 42.599999999999994 +(byte*) gfx_init_screen0::ch#2 52.33333333333333 +(byte*) gfx_init_screen0::ch#3 22.0 +(byte) gfx_init_screen0::cx +(byte) gfx_init_screen0::cx#1 151.5 +(byte) gfx_init_screen0::cx#2 43.285714285714285 +(byte) gfx_init_screen0::cy +(byte) gfx_init_screen0::cy#1 16.5 +(byte) gfx_init_screen0::cy#4 12.299999999999999 +(void()) main() +(byte~) main::$33 202.0 +(byte~) main::$34 202.0 +(byte~) main::$35 202.0 +(byte) main::j +(byte) main::j#1 16.5 +(byte) main::j#2 22.0 +(byte) main::rst +(byte) main::rst#1 57.714285714285715 + +Initial phi equivalence classes +[ main::j#2 main::j#1 ] +[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] +[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] +[ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +Added variable main::rst#1 to zero page equivalence class [ main::rst#1 ] +Added variable main::$33 to zero page equivalence class [ main::$33 ] +Added variable main::$34 to zero page equivalence class [ main::$34 ] +Added variable main::$35 to zero page equivalence class [ main::$35 ] +Added variable gfx_init_plane_charset8::$6 to zero page equivalence class [ gfx_init_plane_charset8::$6 ] +Added variable gfx_init_screen0::$0 to zero page equivalence class [ gfx_init_screen0::$0 ] +Added variable gfx_init_screen0::$1 to zero page equivalence class [ gfx_init_screen0::$1 ] +Added variable gfx_init_screen0::$2 to zero page equivalence class [ gfx_init_screen0::$2 ] +Added variable gfx_init_screen0::$3 to zero page equivalence class [ gfx_init_screen0::$3 ] +Complete equivalence classes +[ main::j#2 main::j#1 ] +[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] +[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] +[ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +[ main::rst#1 ] +[ main::$33 ] +[ main::$34 ] +[ main::$35 ] +[ gfx_init_plane_charset8::$6 ] +[ gfx_init_screen0::$0 ] +[ gfx_init_screen0::$1 ] +[ gfx_init_screen0::$2 ] +[ gfx_init_screen0::$3 ] +Allocated zp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Allocated zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Allocated zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] +Allocated zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Allocated zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Allocated zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +Allocated zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Allocated zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +Allocated zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] +Allocated zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +Allocated zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Allocated zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Allocated zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +Allocated zp ZP_BYTE:18 [ main::rst#1 ] +Allocated zp ZP_BYTE:19 [ main::$33 ] +Allocated zp ZP_BYTE:20 [ main::$34 ] +Allocated zp ZP_BYTE:21 [ main::$35 ] +Allocated zp ZP_BYTE:22 [ gfx_init_plane_charset8::$6 ] +Allocated zp ZP_BYTE:23 [ gfx_init_screen0::$0 ] +Allocated zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] +Allocated zp ZP_BYTE:25 [ gfx_init_screen0::$2 ] +Allocated zp ZP_BYTE:26 [ gfx_init_screen0::$3 ] + +INITIAL ASM +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label PROCPORT_DDR = 0 + .const PROCPORT_DDR_MEMORY_MASK = 7 + .label PROCPORT = 1 + .const PROCPORT_RAM_IO = $35 + .const PROCPORT_RAM_CHARROM = $31 + .label CHARGEN = $d000 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label VIC_CONTROL = $d011 + .const VIC_ECM = $40 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label VIC_CONTROL2 = $d016 + .const VIC_MCM = $10 + .const VIC_CSEL = 8 + .label VIC_MEMORY = $d018 + .label CIA2_PORT_A = $dd00 + .label CIA2_PORT_A_DDR = $dd02 + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_CONTROL = $d03c + .const DTV_LINEAR = 1 + .const DTV_HIGHCOLOR = 4 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .label DTV_PLANEA_START_LO = $d03a + .label DTV_PLANEA_START_MI = $d03b + .label DTV_PLANEA_START_HI = $d045 + .label DTV_PLANEA_STEP = $d046 + .label DTV_PLANEA_MODULO_LO = $d038 + .label DTV_PLANEA_MODULO_HI = $d039 + .label DTV_PLANEB_START_LO = $d049 + .label DTV_PLANEB_START_MI = $d04a + .label DTV_PLANEB_START_HI = $d04b + .label DTV_PLANEB_STEP = $d04c + .label DTV_PLANEB_MODULO_LO = $d047 + .label DTV_PLANEB_MODULO_HI = $d048 + .label SCREEN = $7c00 + .label CHARSET8 = $8000 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @5 [phi:@begin->@5] +b5_from_bbegin: + jmp b5 +//SEG4 @5 +b5: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @5 to @end [phi:@5->@end] +bend_from_b5: + jmp bend +//SEG7 @end +bend: +//SEG8 main +main: { + .label _33 = $13 + .label _34 = $14 + .label _35 = $15 + .label j = 2 + .label rst = $12 + //SEG9 asm { sei } + sei + //SEG10 [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG11 [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG12 [7] call gfx_init param-assignment [ ] ( main:2 [ ] ) + //SEG13 [46] phi from main to gfx_init [phi:main->gfx_init] + gfx_init_from_main: + jsr gfx_init + jmp b17 + //SEG14 main::@17 + b17: + //SEG15 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG16 [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF + sta DTV_CONTROL + //SEG17 [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG18 [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_MCM|VIC_CSEL + sta VIC_CONTROL2 + //SEG19 [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SCREEN + sta DTV_PLANEA_START_MI + //SEG21 [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_START_HI + //SEG22 [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #1 + sta DTV_PLANEA_STEP + //SEG23 [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_MODULO_LO + //SEG24 [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_MODULO_HI + //SEG25 [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHARSET8 + sta DTV_PLANEB_START_MI + //SEG27 [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_START_HI + //SEG28 [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_STEP + //SEG29 [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_MODULO_LO + //SEG30 [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_MODULO_HI + //SEG31 [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + //SEG32 [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^SCREEN/$4000 + sta CIA2_PORT_A + //SEG33 [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2 + sta VIC_MEMORY + //SEG34 [27] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + b1_from_b17: + //SEG35 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@1#0] -- vbuz1=vbuc1 + lda #0 + sta j + jmp b1 + //SEG36 [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG37 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG38 main::@1 + b1: + //SEG39 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) -- pbuc1_derefidx_vbuz1=vbuz1 + ldy j + tya + sta DTV_PALETTE,y + //SEG40 [29] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuz1=_inc_vbuz1 + inc j + //SEG41 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda j + cmp #$10 + bne b1_from_b1 + jmp b2 + //SEG42 main::@2 + b2: + //SEG43 [31] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + jmp b3 + jmp breturn + //SEG44 main::@return + breturn: + //SEG45 [32] return [ ] ( main:2 [ ] ) + rts + //SEG46 main::@3 + b3: + //SEG47 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #8 + bne stabilize + //SEG48 [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG49 [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta BORDERCOL + jmp b5 + //SEG50 main::@5 + b5: + //SEG51 [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$42 + bne b5 + jmp b7 + //SEG52 main::@7 + b7: + //SEG53 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + jmp b8 + //SEG54 main::@8 + b8: + //SEG55 [38] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuz1=_deref_pbuc1 + lda RASTER + sta rst + //SEG56 [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuz1=vbuz2_band_vbuc1 + lda #7 + and rst + sta _33 + //SEG57 [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- vbuz1=vbuc1_bor_vbuz2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL + ora _33 + sta _34 + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _34 + sta VIC_CONTROL + //SEG59 [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) -- vbuz1=vbuz2_rol_4 + lda rst + asl + asl + asl + asl + sta _35 + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$35 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _35 + sta BORDERCOL + //SEG61 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + //SEG62 [45] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) -- vbuz1_neq_vbuc1_then_la1 + lda rst + cmp #$f2 + bne b8 + jmp b2 +} +//SEG63 gfx_init +gfx_init: { + //SEG64 [47] call gfx_init_screen0 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG65 [80] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + gfx_init_screen0_from_gfx_init: + jsr gfx_init_screen0 + //SEG66 [48] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + b1_from_gfx_init: + jmp b1 + //SEG67 gfx_init::@1 + b1: + //SEG68 [49] call gfx_init_plane_charset8 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG69 [51] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8] + gfx_init_plane_charset8_from_b1: + jsr gfx_init_plane_charset8 + jmp breturn + //SEG70 gfx_init::@return + breturn: + //SEG71 [50] return [ ] ( main:2::gfx_init:7 [ ] ) + rts +} +//SEG72 gfx_init_plane_charset8 +gfx_init_plane_charset8: { + .const gfxbCpuBank = $ff&CHARSET8/$4000 + .label _6 = $16 + .label bits = 7 + .label chargen = 4 + .label gfxa = 8 + .label col = $a + .label cp = $b + .label cr = 6 + .label ch = 3 + .label c = $c + //SEG73 [52] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG74 [76] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_gfx_init_plane_charset8: + //SEG75 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + lda #gfxbCpuBank + sta dtvSetCpuBankSegment1.cpuBankIdx + jsr dtvSetCpuBankSegment1 + jmp b9 + //SEG76 gfx_init_plane_charset8::@9 + b9: + //SEG77 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG78 [54] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + b1_from_b9: + //SEG79 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + lda #0 + sta ch + //SEG80 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + lda #0 + sta col + //SEG81 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = ((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + lda #<$4000+(CHARSET8&$3fff) + sta gfxa + lda #>$4000+(CHARSET8&$3fff) + sta gfxa+1 + //SEG82 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + sta chargen+1 + jmp b1 + //SEG83 [54] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + b1_from_b7: + //SEG84 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + //SEG85 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + //SEG86 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + //SEG87 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + jmp b1 + //SEG88 gfx_init_plane_charset8::@1 + b1: + //SEG89 [55] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + b2_from_b1: + //SEG90 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + lda #0 + sta cr + //SEG91 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG92 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG93 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + jmp b2 + //SEG94 [55] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + b2_from_b6: + //SEG95 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + //SEG96 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG97 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG98 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + jmp b2 + //SEG99 gfx_init_plane_charset8::@2 + b2: + //SEG100 [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (chargen),y + sta bits + //SEG101 [57] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- pbuz1=_inc_pbuz1 + inc chargen + bne !+ + inc chargen+1 + !: + //SEG102 [58] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + b3_from_b2: + //SEG103 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuz1=vbuc1 + lda #0 + sta cp + //SEG104 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG105 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG106 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + jmp b3 + //SEG107 [58] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + b3_from_b4: + //SEG108 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + //SEG109 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG110 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG111 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + jmp b3 + //SEG112 gfx_init_plane_charset8::@3 + b3: + //SEG113 [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) -- vbuz1=vbuz2_band_vbuc1 + lda #$80 + and bits + sta _6 + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- vbuz1_eq_0_then_la1 + lda _6 + beq b4_from_b3 + jmp b5 + //SEG115 gfx_init_plane_charset8::@5 + b5: + //SEG116 [61] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ) -- vbuz1=vbuz2 + lda col + sta c + //SEG117 [62] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + b4_from_b5: + //SEG118 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + jmp b4 + //SEG119 [62] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + b4_from_b3: + //SEG120 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuz1=vbuc1 + lda #0 + sta c + jmp b4 + //SEG121 gfx_init_plane_charset8::@4 + b4: + //SEG122 [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- _deref_pbuz1=vbuz2 + lda c + ldy #0 + sta (gfxa),y + //SEG123 [64] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxa + bne !+ + inc gfxa+1 + !: + //SEG124 [65] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=vbuz1_rol_1 + asl bits + //SEG125 [66] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=_inc_vbuz1 + inc col + //SEG126 [67] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuz1=_inc_vbuz1 + inc cp + //SEG127 [68] if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cp + cmp #8 + bne b3_from_b4 + jmp b6 + //SEG128 gfx_init_plane_charset8::@6 + b6: + //SEG129 [69] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1=_inc_vbuz1 + inc cr + //SEG130 [70] if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cr + cmp #8 + bne b2_from_b6 + jmp b7 + //SEG131 gfx_init_plane_charset8::@7 + b7: + //SEG132 [71] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc ch + //SEG133 [72] if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1_neq_0_then_la1 + lda ch + bne b1_from_b7 + jmp b8 + //SEG134 gfx_init_plane_charset8::@8 + b8: + //SEG135 [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG136 [74] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG137 [76] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b8: + //SEG138 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + lda #$4000/$4000 + sta dtvSetCpuBankSegment1.cpuBankIdx + jsr dtvSetCpuBankSegment1 + jmp breturn + //SEG139 gfx_init_plane_charset8::@return + breturn: + //SEG140 [75] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + rts +} +//SEG141 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + .label cpuBankIdx = $d + //SEG142 [77] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) -- _deref_pbuc1=vbuz1 + lda cpuBankIdx + sta cpuBank + //SEG143 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + jmp breturn + //SEG144 dtvSetCpuBankSegment1::@return + breturn: + //SEG145 [79] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + rts +} +//SEG146 gfx_init_screen0 +gfx_init_screen0: { + .label _0 = $17 + .label _1 = $18 + .label _2 = $19 + .label _3 = $1a + .label ch = $10 + .label cx = $f + .label cy = $e + //SEG147 [81] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + b1_from_gfx_init_screen0: + //SEG148 [81] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta ch+1 + //SEG149 [81] phi (byte) gfx_init_screen0::cy#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + lda #0 + sta cy + jmp b1 + //SEG150 [81] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + b1_from_b3: + //SEG151 [81] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + //SEG152 [81] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + jmp b1 + //SEG153 gfx_init_screen0::@1 + b1: + //SEG154 [82] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + b2_from_b1: + //SEG155 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + //SEG156 [82] phi (byte) gfx_init_screen0::cx#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuz1=vbuc1 + lda #0 + sta cx + jmp b2 + //SEG157 [82] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + b2_from_b2: + //SEG158 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + //SEG159 [82] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + jmp b2 + //SEG160 gfx_init_screen0::@2 + b2: + //SEG161 [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and cy + sta _0 + //SEG162 [84] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) -- vbuz1=vbuz2_rol_4 + lda _0 + asl + asl + asl + asl + sta _1 + //SEG163 [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and cx + sta _2 + //SEG164 [86] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ) -- vbuz1=vbuz2_bor_vbuz3 + lda _1 + ora _2 + sta _3 + //SEG165 [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) -- _deref_pbuz1=vbuz2 + lda _3 + ldy #0 + sta (ch),y + //SEG166 [88] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ) -- pbuz1=_inc_pbuz1 + inc ch + bne !+ + inc ch+1 + !: + //SEG167 [89] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuz1=_inc_vbuz1 + inc cx + //SEG168 [90] if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cx + cmp #$28 + bne b2_from_b2 + jmp b3 + //SEG169 gfx_init_screen0::@3 + b3: + //SEG170 [91] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc cy + //SEG171 [92] if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cy + cmp #$19 + bne b1_from_b3 + jmp breturn + //SEG172 gfx_init_screen0::@return + breturn: + //SEG173 [93] return [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + rts +} + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x +Statement [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:18 [ main::rst#1 ] +Statement [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a +Statement [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) always clobbers reg byte a +Statement [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) always clobbers reg byte a +Statement [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Statement [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +Statement [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +Statement [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) always clobbers reg byte a +Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a +Statement [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Statement [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] +Statement [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +Statement [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_PLANEA_START_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [19] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x +Statement [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Statement [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) always clobbers reg byte a +Statement [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) always clobbers reg byte a +Statement [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) always clobbers reg byte a +Statement [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) always clobbers reg byte a reg byte y +Statement [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) always clobbers reg byte a +Statement [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) always clobbers reg byte y +Statement [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) always clobbers reg byte a +Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a +Statement [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) always clobbers reg byte a +Statement [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) always clobbers reg byte a +Statement [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) always clobbers reg byte y +Potential registers zp ZP_BYTE:2 [ main::j#2 main::j#1 ] : zp ZP_BYTE:2 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] : zp ZP_BYTE:3 , reg byte x , +Potential registers zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] : zp ZP_WORD:4 , +Potential registers zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] : zp ZP_BYTE:7 , reg byte x , +Potential registers zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] : zp ZP_WORD:8 , +Potential registers zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] : zp ZP_BYTE:10 , reg byte x , +Potential registers zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] : zp ZP_BYTE:11 , reg byte x , +Potential registers zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] : zp ZP_BYTE:14 , reg byte x , +Potential registers zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] : zp ZP_BYTE:15 , reg byte x , +Potential registers zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] : zp ZP_WORD:16 , +Potential registers zp ZP_BYTE:18 [ main::rst#1 ] : zp ZP_BYTE:18 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:19 [ main::$33 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ main::$34 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ main::$35 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:22 [ gfx_init_plane_charset8::$6 ] : zp ZP_BYTE:22 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:23 [ gfx_init_screen0::$0 ] : zp ZP_BYTE:23 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] : zp ZP_BYTE:24 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:25 [ gfx_init_screen0::$2 ] : zp ZP_BYTE:25 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:26 [ gfx_init_screen0::$3 ] : zp ZP_BYTE:26 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [gfx_init_plane_charset8] 4,004: zp ZP_BYTE:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 2,002: zp ZP_BYTE:22 [ gfx_init_plane_charset8::$6 ] 1,723.94: zp ZP_BYTE:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 1,044.93: zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 845.22: zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] 783: zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 192.31: zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 165.93: zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 17.79: zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplift Scope [gfx_init_screen0] 202: zp ZP_BYTE:23 [ gfx_init_screen0::$0 ] 202: zp ZP_BYTE:25 [ gfx_init_screen0::$2 ] 202: zp ZP_BYTE:26 [ gfx_init_screen0::$3 ] 194.79: zp ZP_BYTE:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 116.93: zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 101: zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] 28.8: zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplift Scope [main] 202: zp ZP_BYTE:19 [ main::$33 ] 202: zp ZP_BYTE:20 [ main::$34 ] 202: zp ZP_BYTE:21 [ main::$35 ] 57.71: zp ZP_BYTE:18 [ main::rst#1 ] 38.5: zp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Uplift Scope [dtvSetCpuBankSegment1] 2: zp ZP_BYTE:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +Uplift Scope [gfx_init] +Uplift Scope [] + +Uplifting [gfx_init_plane_charset8] best 98440 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$6 ] reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp ZP_WORD:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Limited combination testing to 100 combinations of 512 possible. +Uplifting [gfx_init_screen0] best 95640 combination reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Limited combination testing to 100 combinations of 768 possible. +Uplifting [main] best 93040 combination reg byte a [ main::$33 ] reg byte a [ main::$34 ] reg byte a [ main::$35 ] reg byte x [ main::rst#1 ] zp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Limited combination testing to 100 combinations of 768 possible. +Uplifting [dtvSetCpuBankSegment1] best 93031 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +Uplifting [gfx_init] best 93031 combination +Uplifting [] best 93031 combination +Attempting to uplift remaining variables inzp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Uplifting [gfx_init_plane_charset8] best 93031 combination zp ZP_BYTE:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Uplifting [gfx_init_plane_charset8] best 93031 combination zp ZP_BYTE:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Uplifting [gfx_init_plane_charset8] best 93031 combination zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:24 [ gfx_init_screen0::$1 ] +Uplifting [gfx_init_screen0] best 93031 combination zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Uplifting [main] best 92911 combination reg byte x [ main::j#2 main::j#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Uplifting [gfx_init_screen0] best 92911 combination zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Uplifting [gfx_init_plane_charset8] best 92911 combination zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] +Coalescing zero page register [ zp ZP_BYTE:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] ] with [ zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] ] +Coalescing zero page register [ zp ZP_WORD:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] ] with [ zp ZP_WORD:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] ] +Coalescing zero page register [ zp ZP_BYTE:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] ] with [ zp ZP_BYTE:24 [ gfx_init_screen0::$1 ] ] +Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +Allocated (was zp ZP_BYTE:6) zp ZP_BYTE:5 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 gfx_init_screen0::$1 ] +Allocated (was zp ZP_BYTE:7) zp ZP_BYTE:6 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +Allocated (was zp ZP_WORD:8) zp ZP_WORD:7 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +Allocated (was zp ZP_BYTE:10) zp ZP_BYTE:9 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label PROCPORT_DDR = 0 + .const PROCPORT_DDR_MEMORY_MASK = 7 + .label PROCPORT = 1 + .const PROCPORT_RAM_IO = $35 + .const PROCPORT_RAM_CHARROM = $31 + .label CHARGEN = $d000 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label VIC_CONTROL = $d011 + .const VIC_ECM = $40 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label VIC_CONTROL2 = $d016 + .const VIC_MCM = $10 + .const VIC_CSEL = 8 + .label VIC_MEMORY = $d018 + .label CIA2_PORT_A = $dd00 + .label CIA2_PORT_A_DDR = $dd02 + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_CONTROL = $d03c + .const DTV_LINEAR = 1 + .const DTV_HIGHCOLOR = 4 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .label DTV_PLANEA_START_LO = $d03a + .label DTV_PLANEA_START_MI = $d03b + .label DTV_PLANEA_START_HI = $d045 + .label DTV_PLANEA_STEP = $d046 + .label DTV_PLANEA_MODULO_LO = $d038 + .label DTV_PLANEA_MODULO_HI = $d039 + .label DTV_PLANEB_START_LO = $d049 + .label DTV_PLANEB_START_MI = $d04a + .label DTV_PLANEB_START_HI = $d04b + .label DTV_PLANEB_STEP = $d04c + .label DTV_PLANEB_MODULO_LO = $d047 + .label DTV_PLANEB_MODULO_HI = $d048 + .label SCREEN = $7c00 + .label CHARSET8 = $8000 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @5 [phi:@begin->@5] +b5_from_bbegin: + jmp b5 +//SEG4 @5 +b5: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @5 to @end [phi:@5->@end] +bend_from_b5: + jmp bend +//SEG7 @end +bend: +//SEG8 main +main: { + //SEG9 asm { sei } + sei + //SEG10 [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG11 [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG12 [7] call gfx_init param-assignment [ ] ( main:2 [ ] ) + //SEG13 [46] phi from main to gfx_init [phi:main->gfx_init] + gfx_init_from_main: + jsr gfx_init + jmp b17 + //SEG14 main::@17 + b17: + //SEG15 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG16 [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF + sta DTV_CONTROL + //SEG17 [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG18 [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_MCM|VIC_CSEL + sta VIC_CONTROL2 + //SEG19 [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SCREEN + sta DTV_PLANEA_START_MI + //SEG21 [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_START_HI + //SEG22 [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #1 + sta DTV_PLANEA_STEP + //SEG23 [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_MODULO_LO + //SEG24 [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_MODULO_HI + //SEG25 [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHARSET8 + sta DTV_PLANEB_START_MI + //SEG27 [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_START_HI + //SEG28 [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_STEP + //SEG29 [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_MODULO_LO + //SEG30 [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_MODULO_HI + //SEG31 [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + //SEG32 [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^SCREEN/$4000 + sta CIA2_PORT_A + //SEG33 [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2 + sta VIC_MEMORY + //SEG34 [27] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + b1_from_b17: + //SEG35 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + jmp b1 + //SEG36 [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG37 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG38 main::@1 + b1: + //SEG39 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) -- pbuc1_derefidx_vbuxx=vbuxx + txa + sta DTV_PALETTE,x + //SEG40 [29] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG41 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1_from_b1 + jmp b2 + //SEG42 main::@2 + b2: + //SEG43 [31] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + jmp b3 + jmp breturn + //SEG44 main::@return + breturn: + //SEG45 [32] return [ ] ( main:2 [ ] ) + rts + //SEG46 main::@3 + b3: + //SEG47 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #8 + bne stabilize + //SEG48 [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG49 [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta BORDERCOL + jmp b5 + //SEG50 main::@5 + b5: + //SEG51 [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$42 + bne b5 + jmp b7 + //SEG52 main::@7 + b7: + //SEG53 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + jmp b8 + //SEG54 main::@8 + b8: + //SEG55 [38] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuxx=_deref_pbuc1 + ldx RASTER + //SEG56 [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + //SEG57 [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- vbuaa=vbuc1_bor_vbuaa + ora #VIC_DEN|VIC_ECM|VIC_RSEL + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta VIC_CONTROL + //SEG59 [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) -- vbuaa=vbuxx_rol_4 + txa + asl + asl + asl + asl + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$35 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta BORDERCOL + //SEG61 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + //SEG62 [45] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$f2 + bne b8 + jmp b2 +} +//SEG63 gfx_init +gfx_init: { + //SEG64 [47] call gfx_init_screen0 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG65 [80] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + gfx_init_screen0_from_gfx_init: + jsr gfx_init_screen0 + //SEG66 [48] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + b1_from_gfx_init: + jmp b1 + //SEG67 gfx_init::@1 + b1: + //SEG68 [49] call gfx_init_plane_charset8 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG69 [51] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8] + gfx_init_plane_charset8_from_b1: + jsr gfx_init_plane_charset8 + jmp breturn + //SEG70 gfx_init::@return + breturn: + //SEG71 [50] return [ ] ( main:2::gfx_init:7 [ ] ) + rts +} +//SEG72 gfx_init_plane_charset8 +gfx_init_plane_charset8: { + .const gfxbCpuBank = $ff&CHARSET8/$4000 + .label bits = 6 + .label chargen = 3 + .label gfxa = 7 + .label col = 9 + .label cr = 5 + .label ch = 2 + //SEG73 [52] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG74 [76] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_gfx_init_plane_charset8: + //SEG75 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #gfxbCpuBank + jsr dtvSetCpuBankSegment1 + jmp b9 + //SEG76 gfx_init_plane_charset8::@9 + b9: + //SEG77 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG78 [54] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + b1_from_b9: + //SEG79 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + lda #0 + sta ch + //SEG80 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + lda #0 + sta col + //SEG81 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = ((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + lda #<$4000+(CHARSET8&$3fff) + sta gfxa + lda #>$4000+(CHARSET8&$3fff) + sta gfxa+1 + //SEG82 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + sta chargen+1 + jmp b1 + //SEG83 [54] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + b1_from_b7: + //SEG84 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + //SEG85 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + //SEG86 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + //SEG87 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + jmp b1 + //SEG88 gfx_init_plane_charset8::@1 + b1: + //SEG89 [55] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + b2_from_b1: + //SEG90 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + lda #0 + sta cr + //SEG91 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG92 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG93 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + jmp b2 + //SEG94 [55] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + b2_from_b6: + //SEG95 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + //SEG96 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG97 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG98 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + jmp b2 + //SEG99 gfx_init_plane_charset8::@2 + b2: + //SEG100 [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (chargen),y + sta bits + //SEG101 [57] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- pbuz1=_inc_pbuz1 + inc chargen + bne !+ + inc chargen+1 + !: + //SEG102 [58] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + b3_from_b2: + //SEG103 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 + ldx #0 + //SEG104 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG105 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG106 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + jmp b3 + //SEG107 [58] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + b3_from_b4: + //SEG108 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + //SEG109 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG110 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG111 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + jmp b3 + //SEG112 gfx_init_plane_charset8::@3 + b3: + //SEG113 [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) -- vbuaa=vbuz1_band_vbuc1 + lda #$80 + and bits + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- vbuaa_eq_0_then_la1 + cmp #0 + beq b4_from_b3 + jmp b5 + //SEG115 gfx_init_plane_charset8::@5 + b5: + //SEG116 [61] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ) -- vbuaa=vbuz1 + lda col + //SEG117 [62] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + b4_from_b5: + //SEG118 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + jmp b4 + //SEG119 [62] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + b4_from_b3: + //SEG120 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 + lda #0 + jmp b4 + //SEG121 gfx_init_plane_charset8::@4 + b4: + //SEG122 [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (gfxa),y + //SEG123 [64] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxa + bne !+ + inc gfxa+1 + !: + //SEG124 [65] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=vbuz1_rol_1 + asl bits + //SEG125 [66] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=_inc_vbuz1 + inc col + //SEG126 [67] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG127 [68] if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b3_from_b4 + jmp b6 + //SEG128 gfx_init_plane_charset8::@6 + b6: + //SEG129 [69] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1=_inc_vbuz1 + inc cr + //SEG130 [70] if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cr + cmp #8 + bne b2_from_b6 + jmp b7 + //SEG131 gfx_init_plane_charset8::@7 + b7: + //SEG132 [71] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc ch + //SEG133 [72] if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1_neq_0_then_la1 + lda ch + bne b1_from_b7 + jmp b8 + //SEG134 gfx_init_plane_charset8::@8 + b8: + //SEG135 [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG136 [74] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG137 [76] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b8: + //SEG138 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + jmp breturn + //SEG139 gfx_init_plane_charset8::@return + breturn: + //SEG140 [75] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + rts +} +//SEG141 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + //SEG142 [77] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) -- _deref_pbuc1=vbuaa + sta cpuBank + //SEG143 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + jmp breturn + //SEG144 dtvSetCpuBankSegment1::@return + breturn: + //SEG145 [79] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + rts +} +//SEG146 gfx_init_screen0 +gfx_init_screen0: { + .label _1 = 5 + .label ch = 3 + .label cy = 2 + //SEG147 [81] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + b1_from_gfx_init_screen0: + //SEG148 [81] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta ch+1 + //SEG149 [81] phi (byte) gfx_init_screen0::cy#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + lda #0 + sta cy + jmp b1 + //SEG150 [81] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + b1_from_b3: + //SEG151 [81] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + //SEG152 [81] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + jmp b1 + //SEG153 gfx_init_screen0::@1 + b1: + //SEG154 [82] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + b2_from_b1: + //SEG155 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + //SEG156 [82] phi (byte) gfx_init_screen0::cx#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 + ldx #0 + jmp b2 + //SEG157 [82] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + b2_from_b2: + //SEG158 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + //SEG159 [82] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + jmp b2 + //SEG160 gfx_init_screen0::@2 + b2: + //SEG161 [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) -- vbuaa=vbuz1_band_vbuc1 + lda #$f + and cy + //SEG162 [84] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) -- vbuz1=vbuaa_rol_4 + asl + asl + asl + asl + sta _1 + //SEG163 [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #$f + //SEG164 [86] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ) -- vbuaa=vbuz1_bor_vbuaa + ora _1 + //SEG165 [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (ch),y + //SEG166 [88] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ) -- pbuz1=_inc_pbuz1 + inc ch + bne !+ + inc ch+1 + !: + //SEG167 [89] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG168 [90] if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$28 + bne b2_from_b2 + jmp b3 + //SEG169 gfx_init_screen0::@3 + b3: + //SEG170 [91] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc cy + //SEG171 [92] if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cy + cmp #$19 + bne b1_from_b3 + jmp breturn + //SEG172 gfx_init_screen0::@return + breturn: + //SEG173 [93] return [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b5 +Removing instruction jmp bend +Removing instruction jmp b17 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp breturn +Removing instruction jmp b5 +Removing instruction jmp b7 +Removing instruction jmp b8 +Removing instruction jmp b1 +Removing instruction jmp breturn +Removing instruction jmp b9 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b5 +Removing instruction jmp b4 +Removing instruction jmp b6 +Removing instruction jmp b7 +Removing instruction jmp b8 +Removing instruction jmp breturn +Removing instruction jmp breturn +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1_from_b1 with b1 +Replacing label b3_from_b4 with b3 +Replacing label b2_from_b6 with b2 +Replacing label b1_from_b7 with b1 +Replacing label b2_from_b2 with b2 +Replacing label b1_from_b3 with b1 +Removing instruction bbegin: +Removing instruction b5_from_bbegin: +Removing instruction bend_from_b5: +Removing instruction b1_from_b1: +Removing instruction b1_from_gfx_init: +Removing instruction gfx_init_plane_charset8_from_b1: +Removing instruction b1_from_b7: +Removing instruction b2_from_b1: +Removing instruction b2_from_b6: +Removing instruction b3_from_b4: +Removing instruction b1_from_b3: +Removing instruction b2_from_b1: +Removing instruction b2_from_b2: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction b5: +Removing instruction bend: +Removing instruction gfx_init_from_main: +Removing instruction b17: +Removing instruction b1_from_b17: +Removing instruction breturn: +Removing instruction b7: +Removing instruction gfx_init_screen0_from_gfx_init: +Removing instruction b1: +Removing instruction breturn: +Removing instruction dtvSetCpuBankSegment1_from_gfx_init_plane_charset8: +Removing instruction b9: +Removing instruction b1_from_b9: +Removing instruction b3_from_b2: +Removing instruction b5: +Removing instruction b4_from_b5: +Removing instruction b6: +Removing instruction b7: +Removing instruction b8: +Removing instruction dtvSetCpuBankSegment1_from_b8: +Removing instruction breturn: +Removing instruction breturn: +Removing instruction b1_from_gfx_init_screen0: +Removing instruction b3: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Skipping double jump to b3 in jmp b2 +Succesful ASM optimization Pass5DoubleJumpElimination +Removing unreachable instruction rts +Succesful ASM optimization Pass5UnreachableCodeElimination +Relabelling long label b4_from_b3 to b5 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Removing instruction jmp b1 +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b2: +Succesful ASM optimization Pass5RedundantLabelElimination + +FINAL SYMBOL TABLE +(label) @5 +(label) @begin +(label) @end +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248 +(byte*) CHARSET8 +(const byte*) CHARSET8#0 CHARSET8 = ((byte*))(word/dword/signed dword) 32768 +(byte*) CIA2_PORT_A +(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = ((byte*))(word/dword/signed dword) 56576 +(byte*) CIA2_PORT_A_DDR +(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = ((byte*))(word/dword/signed dword) 56578 +(byte) DTV_BADLINE_OFF +(const byte) DTV_BADLINE_OFF#0 DTV_BADLINE_OFF = (byte/signed byte/word/signed word/dword/signed dword) 32 +(byte) DTV_CHUNKY +(const byte) DTV_CHUNKY#0 DTV_CHUNKY = (byte/signed byte/word/signed word/dword/signed dword) 64 +(byte*) DTV_CONTROL +(const byte*) DTV_CONTROL#0 DTV_CONTROL = ((byte*))(word/dword/signed dword) 53308 +(byte*) DTV_FEATURE +(const byte*) DTV_FEATURE#0 DTV_FEATURE = ((byte*))(word/dword/signed dword) 53311 +(byte) DTV_FEATURE_ENABLE +(const byte) DTV_FEATURE_ENABLE#0 DTV_FEATURE_ENABLE = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_HIGHCOLOR +(const byte) DTV_HIGHCOLOR#0 DTV_HIGHCOLOR = (byte/signed byte/word/signed word/dword/signed dword) 4 +(byte) DTV_LINEAR +(const byte) DTV_LINEAR#0 DTV_LINEAR = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte*) DTV_PALETTE +(const byte*) DTV_PALETTE#0 DTV_PALETTE = ((byte*))(word/dword/signed dword) 53760 +(byte*) DTV_PLANEA_MODULO_HI +(const byte*) DTV_PLANEA_MODULO_HI#0 DTV_PLANEA_MODULO_HI = ((byte*))(word/dword/signed dword) 53305 +(byte*) DTV_PLANEA_MODULO_LO +(const byte*) DTV_PLANEA_MODULO_LO#0 DTV_PLANEA_MODULO_LO = ((byte*))(word/dword/signed dword) 53304 +(byte*) DTV_PLANEA_START_HI +(const byte*) DTV_PLANEA_START_HI#0 DTV_PLANEA_START_HI = ((byte*))(word/dword/signed dword) 53317 +(byte*) DTV_PLANEA_START_LO +(const byte*) DTV_PLANEA_START_LO#0 DTV_PLANEA_START_LO = ((byte*))(word/dword/signed dword) 53306 +(byte*) DTV_PLANEA_START_MI +(const byte*) DTV_PLANEA_START_MI#0 DTV_PLANEA_START_MI = ((byte*))(word/dword/signed dword) 53307 +(byte*) DTV_PLANEA_STEP +(const byte*) DTV_PLANEA_STEP#0 DTV_PLANEA_STEP = ((byte*))(word/dword/signed dword) 53318 +(byte*) DTV_PLANEB_MODULO_HI +(const byte*) DTV_PLANEB_MODULO_HI#0 DTV_PLANEB_MODULO_HI = ((byte*))(word/dword/signed dword) 53320 +(byte*) DTV_PLANEB_MODULO_LO +(const byte*) DTV_PLANEB_MODULO_LO#0 DTV_PLANEB_MODULO_LO = ((byte*))(word/dword/signed dword) 53319 +(byte*) DTV_PLANEB_START_HI +(const byte*) DTV_PLANEB_START_HI#0 DTV_PLANEB_START_HI = ((byte*))(word/dword/signed dword) 53323 +(byte*) DTV_PLANEB_START_LO +(const byte*) DTV_PLANEB_START_LO#0 DTV_PLANEB_START_LO = ((byte*))(word/dword/signed dword) 53321 +(byte*) DTV_PLANEB_START_MI +(const byte*) DTV_PLANEB_START_MI#0 DTV_PLANEB_START_MI = ((byte*))(word/dword/signed dword) 53322 +(byte*) DTV_PLANEB_STEP +(const byte*) DTV_PLANEB_STEP#0 DTV_PLANEB_STEP = ((byte*))(word/dword/signed dword) 53324 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1 +(byte*) PROCPORT_DDR +(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 +(byte) PROCPORT_DDR_MEMORY_MASK +(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte/signed byte/word/signed word/dword/signed dword) 7 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte/signed byte/word/signed word/dword/signed dword) 49 +(byte) PROCPORT_RAM_IO +(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte/signed byte/word/signed word/dword/signed dword) 53 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 31744 +(byte*) VIC_CONTROL +(const byte*) VIC_CONTROL#0 VIC_CONTROL = ((byte*))(word/dword/signed dword) 53265 +(byte*) VIC_CONTROL2 +(const byte*) VIC_CONTROL2#0 VIC_CONTROL2 = ((byte*))(word/dword/signed dword) 53270 +(byte) VIC_CSEL +(const byte) VIC_CSEL#0 VIC_CSEL = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) VIC_DEN +(const byte) VIC_DEN#0 VIC_DEN = (byte/signed byte/word/signed word/dword/signed dword) 16 +(byte) VIC_ECM +(const byte) VIC_ECM#0 VIC_ECM = (byte/signed byte/word/signed word/dword/signed dword) 64 +(byte) VIC_MCM +(const byte) VIC_MCM#0 VIC_MCM = (byte/signed byte/word/signed word/dword/signed dword) 16 +(byte*) VIC_MEMORY +(const byte*) VIC_MEMORY#0 VIC_MEMORY = ((byte*))(word/dword/signed dword) 53272 +(byte) VIC_RSEL +(const byte) VIC_RSEL#0 VIC_RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8 +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) +(label) dtvSetCpuBankSegment1::@return +(byte*) dtvSetCpuBankSegment1::cpuBank +(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = ((byte*))(byte/word/signed word/dword/signed dword) 255 +(byte) dtvSetCpuBankSegment1::cpuBankIdx +(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 2.0 +(void()) gfx_init() +(label) gfx_init::@1 +(label) gfx_init::@return +(void()) gfx_init_plane_charset8() +(byte~) gfx_init_plane_charset8::$6 reg byte a 2002.0 +(label) gfx_init_plane_charset8::@1 +(label) gfx_init_plane_charset8::@2 +(label) gfx_init_plane_charset8::@3 +(label) gfx_init_plane_charset8::@4 +(label) gfx_init_plane_charset8::@5 +(label) gfx_init_plane_charset8::@6 +(label) gfx_init_plane_charset8::@7 +(label) gfx_init_plane_charset8::@8 +(label) gfx_init_plane_charset8::@9 +(label) gfx_init_plane_charset8::@return +(byte) gfx_init_plane_charset8::bits +(byte) gfx_init_plane_charset8::bits#0 bits zp ZP_BYTE:6 101.0 +(byte) gfx_init_plane_charset8::bits#1 bits zp ZP_BYTE:6 500.5 +(byte) gfx_init_plane_charset8::bits#2 bits zp ZP_BYTE:6 443.42857142857144 +(byte) gfx_init_plane_charset8::c +(byte) gfx_init_plane_charset8::c#2 reg byte a 2002.0 +(byte~) gfx_init_plane_charset8::c#3 reg byte a 2002.0 +(byte) gfx_init_plane_charset8::ch +(byte) gfx_init_plane_charset8::ch#1 ch zp ZP_BYTE:2 16.5 +(byte) gfx_init_plane_charset8::ch#8 ch zp ZP_BYTE:2 1.2941176470588236 +(byte*) gfx_init_plane_charset8::chargen +(byte*) gfx_init_plane_charset8::chargen#1 chargen zp ZP_WORD:3 13.3125 +(byte*) gfx_init_plane_charset8::chargen#2 chargen zp ZP_WORD:3 157.0 +(byte*) gfx_init_plane_charset8::chargen#3 chargen zp ZP_WORD:3 22.0 +(byte) gfx_init_plane_charset8::col +(byte) gfx_init_plane_charset8::col#1 col zp ZP_BYTE:9 302.0 +(byte) gfx_init_plane_charset8::col#2 col zp ZP_BYTE:9 388.0 +(byte) gfx_init_plane_charset8::col#5 col zp ZP_BYTE:9 71.0 +(byte) gfx_init_plane_charset8::col#6 col zp ZP_BYTE:9 22.0 +(byte) gfx_init_plane_charset8::cp +(byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5 +(byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446 +(byte) gfx_init_plane_charset8::cr +(byte) gfx_init_plane_charset8::cr#1 cr zp ZP_BYTE:5 151.5 +(byte) gfx_init_plane_charset8::cr#6 cr zp ZP_BYTE:5 14.428571428571429 +(byte*) gfx_init_plane_charset8::gfxa +(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp ZP_WORD:7 234.8888888888889 +(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp ZP_WORD:7 517.3333333333334 +(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp ZP_WORD:7 71.0 +(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp ZP_WORD:7 22.0 +(byte) gfx_init_plane_charset8::gfxbCpuBank +(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = ((byte))(const byte*) CHARSET8#0/(word/signed word/dword/signed dword) 16384 +(void()) gfx_init_screen0() +(byte~) gfx_init_screen0::$0 reg byte a 202.0 +(byte~) gfx_init_screen0::$1 $1 zp ZP_BYTE:5 101.0 +(byte~) gfx_init_screen0::$2 reg byte a 202.0 +(byte~) gfx_init_screen0::$3 reg byte a 202.0 +(label) gfx_init_screen0::@1 +(label) gfx_init_screen0::@2 +(label) gfx_init_screen0::@3 +(label) gfx_init_screen0::@return +(byte*) gfx_init_screen0::ch +(byte*) gfx_init_screen0::ch#1 ch zp ZP_WORD:3 42.599999999999994 +(byte*) gfx_init_screen0::ch#2 ch zp ZP_WORD:3 52.33333333333333 +(byte*) gfx_init_screen0::ch#3 ch zp ZP_WORD:3 22.0 +(byte) gfx_init_screen0::cx +(byte) gfx_init_screen0::cx#1 reg byte x 151.5 +(byte) gfx_init_screen0::cx#2 reg byte x 43.285714285714285 +(byte) gfx_init_screen0::cy +(byte) gfx_init_screen0::cy#1 cy zp ZP_BYTE:2 16.5 +(byte) gfx_init_screen0::cy#4 cy zp ZP_BYTE:2 12.299999999999999 +(void()) main() +(byte~) main::$33 reg byte a 202.0 +(byte~) main::$34 reg byte a 202.0 +(byte~) main::$35 reg byte a 202.0 +(label) main::@1 +(label) main::@17 +(label) main::@2 +(label) main::@3 +(label) main::@5 +(label) main::@7 +(label) main::@8 +(label) main::@return +(byte) main::j +(byte) main::j#1 reg byte x 16.5 +(byte) main::j#2 reg byte x 22.0 +(byte) main::rst +(byte) main::rst#1 reg byte x 57.714285714285715 + +reg byte x [ main::j#2 main::j#1 ] +zp ZP_BYTE:2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +zp ZP_WORD:3 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +zp ZP_BYTE:5 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 gfx_init_screen0::$1 ] +zp ZP_BYTE:6 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +zp ZP_WORD:7 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +zp ZP_BYTE:9 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] +reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +reg byte x [ main::rst#1 ] +reg byte a [ main::$33 ] +reg byte a [ main::$34 ] +reg byte a [ main::$35 ] +reg byte a [ gfx_init_plane_charset8::$6 ] +reg byte a [ gfx_init_screen0::$0 ] +reg byte a [ gfx_init_screen0::$2 ] +reg byte a [ gfx_init_screen0::$3 ] + + +FINAL ASSEMBLER +Score: 75363 + +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label PROCPORT_DDR = 0 + .const PROCPORT_DDR_MEMORY_MASK = 7 + .label PROCPORT = 1 + .const PROCPORT_RAM_IO = $35 + .const PROCPORT_RAM_CHARROM = $31 + .label CHARGEN = $d000 + .label RASTER = $d012 + .label BORDERCOL = $d020 + .label VIC_CONTROL = $d011 + .const VIC_ECM = $40 + .const VIC_DEN = $10 + .const VIC_RSEL = 8 + .label VIC_CONTROL2 = $d016 + .const VIC_MCM = $10 + .const VIC_CSEL = 8 + .label VIC_MEMORY = $d018 + .label CIA2_PORT_A = $dd00 + .label CIA2_PORT_A_DDR = $dd02 + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_CONTROL = $d03c + .const DTV_LINEAR = 1 + .const DTV_HIGHCOLOR = 4 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .label DTV_PLANEA_START_LO = $d03a + .label DTV_PLANEA_START_MI = $d03b + .label DTV_PLANEA_START_HI = $d045 + .label DTV_PLANEA_STEP = $d046 + .label DTV_PLANEA_MODULO_LO = $d038 + .label DTV_PLANEA_MODULO_HI = $d039 + .label DTV_PLANEB_START_LO = $d049 + .label DTV_PLANEB_START_MI = $d04a + .label DTV_PLANEB_START_HI = $d04b + .label DTV_PLANEB_STEP = $d04c + .label DTV_PLANEB_MODULO_LO = $d047 + .label DTV_PLANEB_MODULO_HI = $d048 + .label SCREEN = $7c00 + .label CHARSET8 = $8000 +//SEG2 @begin +//SEG3 [1] phi from @begin to @5 [phi:@begin->@5] +//SEG4 @5 +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @5 to @end [phi:@5->@end] +//SEG7 @end +//SEG8 main +main: { + //SEG9 asm { sei } + sei + //SEG10 [5] *((const byte*) PROCPORT_DDR#0) ← (const byte) PROCPORT_DDR_MEMORY_MASK#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + //SEG11 [6] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG12 [7] call gfx_init param-assignment [ ] ( main:2 [ ] ) + //SEG13 [46] phi from main to gfx_init [phi:main->gfx_init] + jsr gfx_init + //SEG14 main::@17 + //SEG15 [8] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG16 [9] *((const byte*) DTV_CONTROL#0) ← (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF + sta DTV_CONTROL + //SEG17 [10] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG18 [11] *((const byte*) VIC_CONTROL2#0) ← (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_MCM|VIC_CSEL + sta VIC_CONTROL2 + //SEG19 [12] *((const byte*) DTV_PLANEA_START_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SCREEN + sta DTV_PLANEA_START_MI + //SEG21 [14] *((const byte*) DTV_PLANEA_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_START_HI + //SEG22 [15] *((const byte*) DTV_PLANEA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 1 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #1 + sta DTV_PLANEA_STEP + //SEG23 [16] *((const byte*) DTV_PLANEA_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEA_MODULO_LO + //SEG24 [17] *((const byte*) DTV_PLANEA_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_PLANEA_MODULO_HI + //SEG25 [18] *((const byte*) DTV_PLANEB_START_LO#0) ← <(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHARSET8#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHARSET8 + sta DTV_PLANEB_START_MI + //SEG27 [20] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_PLANEB_START_HI + //SEG28 [21] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_PLANEB_STEP + //SEG29 [22] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_PLANEB_MODULO_LO + //SEG30 [23] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_PLANEB_MODULO_HI + //SEG31 [24] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3 + sta CIA2_PORT_A_DDR + //SEG32 [25] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^SCREEN/$4000 + sta CIA2_PORT_A + //SEG33 [26] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(SCREEN&$3fff)>>6|(>(SCREEN&$3fff))>>2 + sta VIC_MEMORY + //SEG34 [27] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + //SEG35 [27] phi (byte) main::j#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@17->main::@1#0] -- vbuxx=vbuc1 + ldx #0 + //SEG36 [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG37 [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG38 main::@1 + b1: + //SEG39 [28] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) -- pbuc1_derefidx_vbuxx=vbuxx + txa + sta DTV_PALETTE,x + //SEG40 [29] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG41 [30] if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$10 + bne b1 + //SEG42 main::@2 + //SEG43 [31] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + //SEG44 main::@return + //SEG45 [32] return [ ] ( main:2 [ ] ) + //SEG46 main::@3 + b3: + //SEG47 asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } + ldx #$ff + rff: + cpx RASTER + bne rff + stabilize: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + cpx RASTER + beq eat+0 + eat: + inx + cpx #8 + bne stabilize + //SEG48 [34] *((const byte*) VIC_CONTROL#0) ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL|3 + sta VIC_CONTROL + //SEG49 [35] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta BORDERCOL + //SEG50 main::@5 + b5: + //SEG51 [36] if(*((const byte*) RASTER#0)!=(byte/signed byte/word/signed word/dword/signed dword) 66) goto main::@5 [ ] ( main:2 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 + lda RASTER + cmp #$42 + bne b5 + //SEG52 main::@7 + //SEG53 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + //SEG54 main::@8 + b8: + //SEG55 [38] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuxx=_deref_pbuc1 + ldx RASTER + //SEG56 [39] (byte~) main::$33 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + //SEG57 [40] (byte~) main::$34 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$33 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- vbuaa=vbuc1_bor_vbuaa + ora #VIC_DEN|VIC_ECM|VIC_RSEL + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta VIC_CONTROL + //SEG59 [42] (byte~) main::$35 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$35 ] ( main:2 [ main::rst#1 main::$35 ] ) -- vbuaa=vbuxx_rol_4 + txa + asl + asl + asl + asl + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$35 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta BORDERCOL + //SEG61 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + //SEG62 [45] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$f2 + bne b8 + jmp b3 +} +//SEG63 gfx_init +gfx_init: { + //SEG64 [47] call gfx_init_screen0 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG65 [80] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0] + jsr gfx_init_screen0 + //SEG66 [48] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1] + //SEG67 gfx_init::@1 + //SEG68 [49] call gfx_init_plane_charset8 param-assignment [ ] ( main:2::gfx_init:7 [ ] ) + //SEG69 [51] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8] + jsr gfx_init_plane_charset8 + //SEG70 gfx_init::@return + //SEG71 [50] return [ ] ( main:2::gfx_init:7 [ ] ) + rts +} +//SEG72 gfx_init_plane_charset8 +gfx_init_plane_charset8: { + .const gfxbCpuBank = $ff&CHARSET8/$4000 + .label bits = 6 + .label chargen = 3 + .label gfxa = 7 + .label col = 9 + .label cr = 5 + .label ch = 2 + //SEG73 [52] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG74 [76] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1] + //SEG75 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #gfxbCpuBank + jsr dtvSetCpuBankSegment1 + //SEG76 gfx_init_plane_charset8::@9 + //SEG77 [53] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_CHARROM#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_CHARROM + sta PROCPORT + //SEG78 [54] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1] + //SEG79 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1 + lda #0 + sta ch + //SEG80 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1 + sta col + //SEG81 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = ((byte*))(word/signed word/dword/signed dword) 16384+((word))(const byte*) CHARSET8#0&(word/signed word/dword/signed dword) 16383 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1 + lda #<$4000+(CHARSET8&$3fff) + sta gfxa + lda #>$4000+(CHARSET8&$3fff) + sta gfxa+1 + //SEG82 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const byte*) CHARGEN#0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + sta chargen+1 + //SEG83 [54] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1] + //SEG84 [54] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy + //SEG85 [54] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy + //SEG86 [54] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy + //SEG87 [54] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy + //SEG88 gfx_init_plane_charset8::@1 + b1: + //SEG89 [55] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2] + //SEG90 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1 + lda #0 + sta cr + //SEG91 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG92 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG93 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy + //SEG94 [55] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2] + //SEG95 [55] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy + //SEG96 [55] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy + //SEG97 [55] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy + //SEG98 [55] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy + //SEG99 gfx_init_plane_charset8::@2 + b2: + //SEG100 [56] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (chargen),y + sta bits + //SEG101 [57] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#0 ] ) -- pbuz1=_inc_pbuz1 + inc chargen + bne !+ + inc chargen+1 + !: + //SEG102 [58] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3] + //SEG103 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1 + ldx #0 + //SEG104 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG105 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG106 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy + //SEG107 [58] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3] + //SEG108 [58] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy + //SEG109 [58] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy + //SEG110 [58] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy + //SEG111 [58] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy + //SEG112 gfx_init_plane_charset8::@3 + b3: + //SEG113 [59] (byte~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::$6 ] ) -- vbuaa=vbuz1_band_vbuc1 + lda #$80 + and bits + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$6==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- vbuaa_eq_0_then_la1 + cmp #0 + beq b5 + //SEG115 gfx_init_plane_charset8::@5 + //SEG116 [61] (byte~) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::c#3 ] ) -- vbuaa=vbuz1 + lda col + //SEG117 [62] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4] + //SEG118 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte~) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy + jmp b4 + //SEG119 [62] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4] + b5: + //SEG120 [62] phi (byte) gfx_init_plane_charset8::c#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1 + lda #0 + //SEG121 gfx_init_plane_charset8::@4 + b4: + //SEG122 [63] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (gfxa),y + //SEG123 [64] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxa + bne !+ + inc gfxa+1 + !: + //SEG124 [65] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte/signed byte/word/signed word/dword/signed dword) 1 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=vbuz1_rol_1 + asl bits + //SEG125 [66] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::bits#1 ] ) -- vbuz1=_inc_vbuz1 + inc col + //SEG126 [67] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG127 [68] if((byte) gfx_init_plane_charset8::cp#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#1 gfx_init_plane_charset8::cp#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b3 + //SEG128 gfx_init_plane_charset8::@6 + //SEG129 [69] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1=_inc_vbuz1 + inc cr + //SEG130 [70] if((byte) gfx_init_plane_charset8::cr#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto gfx_init_plane_charset8::@2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::cr#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cr + cmp #8 + bne b2 + //SEG131 gfx_init_plane_charset8::@7 + //SEG132 [71] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc ch + //SEG133 [72] if((byte) gfx_init_plane_charset8::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@1 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::gfxa#1 gfx_init_plane_charset8::col#1 gfx_init_plane_charset8::ch#1 ] ) -- vbuz1_neq_0_then_la1 + lda ch + bne b1 + //SEG134 gfx_init_plane_charset8::@8 + //SEG135 [73] *((const byte*) PROCPORT#0) ← (const byte) PROCPORT_RAM_IO#0 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) -- _deref_pbuc1=vbuc2 + lda #PROCPORT_RAM_IO + sta PROCPORT + //SEG136 [74] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + //SEG137 [76] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1] + //SEG138 [76] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + //SEG139 gfx_init_plane_charset8::@return + //SEG140 [75] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49 [ ] ) + rts +} +//SEG141 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + //SEG142 [77] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) -- _deref_pbuc1=vbuaa + sta cpuBank + //SEG143 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + //SEG144 dtvSetCpuBankSegment1::@return + //SEG145 [79] return [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:52 [ ] main:2::gfx_init:7::gfx_init_plane_charset8:49::dtvSetCpuBankSegment1:74 [ ] ) + rts +} +//SEG146 gfx_init_screen0 +gfx_init_screen0: { + .label _1 = 5 + .label ch = 3 + .label cy = 2 + //SEG147 [81] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1] + //SEG148 [81] phi (byte*) gfx_init_screen0::ch#3 = (const byte*) SCREEN#0 [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1 + lda #SCREEN + sta ch+1 + //SEG149 [81] phi (byte) gfx_init_screen0::cy#4 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1 + lda #0 + sta cy + //SEG150 [81] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1] + //SEG151 [81] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy + //SEG152 [81] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy + //SEG153 gfx_init_screen0::@1 + b1: + //SEG154 [82] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2] + //SEG155 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy + //SEG156 [82] phi (byte) gfx_init_screen0::cx#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1 + ldx #0 + //SEG157 [82] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2] + //SEG158 [82] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy + //SEG159 [82] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy + //SEG160 gfx_init_screen0::@2 + b2: + //SEG161 [83] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ) -- vbuaa=vbuz1_band_vbuc1 + lda #$f + and cy + //SEG162 [84] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ) -- vbuz1=vbuaa_rol_4 + asl + asl + asl + asl + sta _1 + //SEG163 [85] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte/signed byte/word/signed word/dword/signed dword) 15 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #$f + //SEG164 [86] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$3 ] ) -- vbuaa=vbuz1_bor_vbuaa + ora _1 + //SEG165 [87] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (ch),y + //SEG166 [88] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#2 ] ) -- pbuz1=_inc_pbuz1 + inc ch + bne !+ + inc ch+1 + !: + //SEG167 [89] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG168 [90] if((byte) gfx_init_screen0::cx#1!=(byte/signed byte/word/signed word/dword/signed dword) 40) goto gfx_init_screen0::@2 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#4 gfx_init_screen0::ch#1 gfx_init_screen0::cx#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #$28 + bne b2 + //SEG169 gfx_init_screen0::@3 + //SEG170 [91] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1=_inc_vbuz1 + inc cy + //SEG171 [92] if((byte) gfx_init_screen0::cy#1!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto gfx_init_screen0::@1 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ gfx_init_screen0::cy#1 gfx_init_screen0::ch#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda cy + cmp #$19 + bne b1 + //SEG172 gfx_init_screen0::@return + //SEG173 [93] return [ ] ( main:2::gfx_init:7::gfx_init_screen0:47 [ ] ) + rts +} + diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.sym b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.sym new file mode 100644 index 000000000..4774ca961 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.sym @@ -0,0 +1,192 @@ +(label) @5 +(label) @begin +(label) @end +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CHARGEN +(const byte*) CHARGEN#0 CHARGEN = ((byte*))(word/dword/signed dword) 53248 +(byte*) CHARSET8 +(const byte*) CHARSET8#0 CHARSET8 = ((byte*))(word/dword/signed dword) 32768 +(byte*) CIA2_PORT_A +(const byte*) CIA2_PORT_A#0 CIA2_PORT_A = ((byte*))(word/dword/signed dword) 56576 +(byte*) CIA2_PORT_A_DDR +(const byte*) CIA2_PORT_A_DDR#0 CIA2_PORT_A_DDR = ((byte*))(word/dword/signed dword) 56578 +(byte) DTV_BADLINE_OFF +(const byte) DTV_BADLINE_OFF#0 DTV_BADLINE_OFF = (byte/signed byte/word/signed word/dword/signed dword) 32 +(byte) DTV_CHUNKY +(const byte) DTV_CHUNKY#0 DTV_CHUNKY = (byte/signed byte/word/signed word/dword/signed dword) 64 +(byte*) DTV_CONTROL +(const byte*) DTV_CONTROL#0 DTV_CONTROL = ((byte*))(word/dword/signed dword) 53308 +(byte*) DTV_FEATURE +(const byte*) DTV_FEATURE#0 DTV_FEATURE = ((byte*))(word/dword/signed dword) 53311 +(byte) DTV_FEATURE_ENABLE +(const byte) DTV_FEATURE_ENABLE#0 DTV_FEATURE_ENABLE = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_HIGHCOLOR +(const byte) DTV_HIGHCOLOR#0 DTV_HIGHCOLOR = (byte/signed byte/word/signed word/dword/signed dword) 4 +(byte) DTV_LINEAR +(const byte) DTV_LINEAR#0 DTV_LINEAR = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte*) DTV_PALETTE +(const byte*) DTV_PALETTE#0 DTV_PALETTE = ((byte*))(word/dword/signed dword) 53760 +(byte*) DTV_PLANEA_MODULO_HI +(const byte*) DTV_PLANEA_MODULO_HI#0 DTV_PLANEA_MODULO_HI = ((byte*))(word/dword/signed dword) 53305 +(byte*) DTV_PLANEA_MODULO_LO +(const byte*) DTV_PLANEA_MODULO_LO#0 DTV_PLANEA_MODULO_LO = ((byte*))(word/dword/signed dword) 53304 +(byte*) DTV_PLANEA_START_HI +(const byte*) DTV_PLANEA_START_HI#0 DTV_PLANEA_START_HI = ((byte*))(word/dword/signed dword) 53317 +(byte*) DTV_PLANEA_START_LO +(const byte*) DTV_PLANEA_START_LO#0 DTV_PLANEA_START_LO = ((byte*))(word/dword/signed dword) 53306 +(byte*) DTV_PLANEA_START_MI +(const byte*) DTV_PLANEA_START_MI#0 DTV_PLANEA_START_MI = ((byte*))(word/dword/signed dword) 53307 +(byte*) DTV_PLANEA_STEP +(const byte*) DTV_PLANEA_STEP#0 DTV_PLANEA_STEP = ((byte*))(word/dword/signed dword) 53318 +(byte*) DTV_PLANEB_MODULO_HI +(const byte*) DTV_PLANEB_MODULO_HI#0 DTV_PLANEB_MODULO_HI = ((byte*))(word/dword/signed dword) 53320 +(byte*) DTV_PLANEB_MODULO_LO +(const byte*) DTV_PLANEB_MODULO_LO#0 DTV_PLANEB_MODULO_LO = ((byte*))(word/dword/signed dword) 53319 +(byte*) DTV_PLANEB_START_HI +(const byte*) DTV_PLANEB_START_HI#0 DTV_PLANEB_START_HI = ((byte*))(word/dword/signed dword) 53323 +(byte*) DTV_PLANEB_START_LO +(const byte*) DTV_PLANEB_START_LO#0 DTV_PLANEB_START_LO = ((byte*))(word/dword/signed dword) 53321 +(byte*) DTV_PLANEB_START_MI +(const byte*) DTV_PLANEB_START_MI#0 DTV_PLANEB_START_MI = ((byte*))(word/dword/signed dword) 53322 +(byte*) DTV_PLANEB_STEP +(const byte*) DTV_PLANEB_STEP#0 DTV_PLANEB_STEP = ((byte*))(word/dword/signed dword) 53324 +(byte*) PROCPORT +(const byte*) PROCPORT#0 PROCPORT = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 1 +(byte*) PROCPORT_DDR +(const byte*) PROCPORT_DDR#0 PROCPORT_DDR = ((byte*))(byte/signed byte/word/signed word/dword/signed dword) 0 +(byte) PROCPORT_DDR_MEMORY_MASK +(const byte) PROCPORT_DDR_MEMORY_MASK#0 PROCPORT_DDR_MEMORY_MASK = (byte/signed byte/word/signed word/dword/signed dword) 7 +(byte) PROCPORT_RAM_CHARROM +(const byte) PROCPORT_RAM_CHARROM#0 PROCPORT_RAM_CHARROM = (byte/signed byte/word/signed word/dword/signed dword) 49 +(byte) PROCPORT_RAM_IO +(const byte) PROCPORT_RAM_IO#0 PROCPORT_RAM_IO = (byte/signed byte/word/signed word/dword/signed dword) 53 +(byte*) RASTER +(const byte*) RASTER#0 RASTER = ((byte*))(word/dword/signed dword) 53266 +(byte*) SCREEN +(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 31744 +(byte*) VIC_CONTROL +(const byte*) VIC_CONTROL#0 VIC_CONTROL = ((byte*))(word/dword/signed dword) 53265 +(byte*) VIC_CONTROL2 +(const byte*) VIC_CONTROL2#0 VIC_CONTROL2 = ((byte*))(word/dword/signed dword) 53270 +(byte) VIC_CSEL +(const byte) VIC_CSEL#0 VIC_CSEL = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) VIC_DEN +(const byte) VIC_DEN#0 VIC_DEN = (byte/signed byte/word/signed word/dword/signed dword) 16 +(byte) VIC_ECM +(const byte) VIC_ECM#0 VIC_ECM = (byte/signed byte/word/signed word/dword/signed dword) 64 +(byte) VIC_MCM +(const byte) VIC_MCM#0 VIC_MCM = (byte/signed byte/word/signed word/dword/signed dword) 16 +(byte*) VIC_MEMORY +(const byte*) VIC_MEMORY#0 VIC_MEMORY = ((byte*))(word/dword/signed dword) 53272 +(byte) VIC_RSEL +(const byte) VIC_RSEL#0 VIC_RSEL = (byte/signed byte/word/signed word/dword/signed dword) 8 +(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) +(label) dtvSetCpuBankSegment1::@return +(byte*) dtvSetCpuBankSegment1::cpuBank +(const byte*) dtvSetCpuBankSegment1::cpuBank#0 cpuBank = ((byte*))(byte/word/signed word/dword/signed dword) 255 +(byte) dtvSetCpuBankSegment1::cpuBankIdx +(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 2.0 +(void()) gfx_init() +(label) gfx_init::@1 +(label) gfx_init::@return +(void()) gfx_init_plane_charset8() +(byte~) gfx_init_plane_charset8::$6 reg byte a 2002.0 +(label) gfx_init_plane_charset8::@1 +(label) gfx_init_plane_charset8::@2 +(label) gfx_init_plane_charset8::@3 +(label) gfx_init_plane_charset8::@4 +(label) gfx_init_plane_charset8::@5 +(label) gfx_init_plane_charset8::@6 +(label) gfx_init_plane_charset8::@7 +(label) gfx_init_plane_charset8::@8 +(label) gfx_init_plane_charset8::@9 +(label) gfx_init_plane_charset8::@return +(byte) gfx_init_plane_charset8::bits +(byte) gfx_init_plane_charset8::bits#0 bits zp ZP_BYTE:6 101.0 +(byte) gfx_init_plane_charset8::bits#1 bits zp ZP_BYTE:6 500.5 +(byte) gfx_init_plane_charset8::bits#2 bits zp ZP_BYTE:6 443.42857142857144 +(byte) gfx_init_plane_charset8::c +(byte) gfx_init_plane_charset8::c#2 reg byte a 2002.0 +(byte~) gfx_init_plane_charset8::c#3 reg byte a 2002.0 +(byte) gfx_init_plane_charset8::ch +(byte) gfx_init_plane_charset8::ch#1 ch zp ZP_BYTE:2 16.5 +(byte) gfx_init_plane_charset8::ch#8 ch zp ZP_BYTE:2 1.2941176470588236 +(byte*) gfx_init_plane_charset8::chargen +(byte*) gfx_init_plane_charset8::chargen#1 chargen zp ZP_WORD:3 13.3125 +(byte*) gfx_init_plane_charset8::chargen#2 chargen zp ZP_WORD:3 157.0 +(byte*) gfx_init_plane_charset8::chargen#3 chargen zp ZP_WORD:3 22.0 +(byte) gfx_init_plane_charset8::col +(byte) gfx_init_plane_charset8::col#1 col zp ZP_BYTE:9 302.0 +(byte) gfx_init_plane_charset8::col#2 col zp ZP_BYTE:9 388.0 +(byte) gfx_init_plane_charset8::col#5 col zp ZP_BYTE:9 71.0 +(byte) gfx_init_plane_charset8::col#6 col zp ZP_BYTE:9 22.0 +(byte) gfx_init_plane_charset8::cp +(byte) gfx_init_plane_charset8::cp#1 reg byte x 1501.5 +(byte) gfx_init_plane_charset8::cp#2 reg byte x 222.44444444444446 +(byte) gfx_init_plane_charset8::cr +(byte) gfx_init_plane_charset8::cr#1 cr zp ZP_BYTE:5 151.5 +(byte) gfx_init_plane_charset8::cr#6 cr zp ZP_BYTE:5 14.428571428571429 +(byte*) gfx_init_plane_charset8::gfxa +(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp ZP_WORD:7 234.8888888888889 +(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp ZP_WORD:7 517.3333333333334 +(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp ZP_WORD:7 71.0 +(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp ZP_WORD:7 22.0 +(byte) gfx_init_plane_charset8::gfxbCpuBank +(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = ((byte))(const byte*) CHARSET8#0/(word/signed word/dword/signed dword) 16384 +(void()) gfx_init_screen0() +(byte~) gfx_init_screen0::$0 reg byte a 202.0 +(byte~) gfx_init_screen0::$1 $1 zp ZP_BYTE:5 101.0 +(byte~) gfx_init_screen0::$2 reg byte a 202.0 +(byte~) gfx_init_screen0::$3 reg byte a 202.0 +(label) gfx_init_screen0::@1 +(label) gfx_init_screen0::@2 +(label) gfx_init_screen0::@3 +(label) gfx_init_screen0::@return +(byte*) gfx_init_screen0::ch +(byte*) gfx_init_screen0::ch#1 ch zp ZP_WORD:3 42.599999999999994 +(byte*) gfx_init_screen0::ch#2 ch zp ZP_WORD:3 52.33333333333333 +(byte*) gfx_init_screen0::ch#3 ch zp ZP_WORD:3 22.0 +(byte) gfx_init_screen0::cx +(byte) gfx_init_screen0::cx#1 reg byte x 151.5 +(byte) gfx_init_screen0::cx#2 reg byte x 43.285714285714285 +(byte) gfx_init_screen0::cy +(byte) gfx_init_screen0::cy#1 cy zp ZP_BYTE:2 16.5 +(byte) gfx_init_screen0::cy#4 cy zp ZP_BYTE:2 12.299999999999999 +(void()) main() +(byte~) main::$33 reg byte a 202.0 +(byte~) main::$34 reg byte a 202.0 +(byte~) main::$35 reg byte a 202.0 +(label) main::@1 +(label) main::@17 +(label) main::@2 +(label) main::@3 +(label) main::@5 +(label) main::@7 +(label) main::@8 +(label) main::@return +(byte) main::j +(byte) main::j#1 reg byte x 16.5 +(byte) main::j#2 reg byte x 22.0 +(byte) main::rst +(byte) main::rst#1 reg byte x 57.714285714285715 + +reg byte x [ main::j#2 main::j#1 ] +zp ZP_BYTE:2 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] +zp ZP_WORD:3 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] +zp ZP_BYTE:5 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 gfx_init_screen0::$1 ] +zp ZP_BYTE:6 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] +zp ZP_WORD:7 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] +zp ZP_BYTE:9 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] +reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] +reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] +reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] +reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] +reg byte x [ main::rst#1 ] +reg byte a [ main::$33 ] +reg byte a [ main::$34 ] +reg byte a [ main::$35 ] +reg byte a [ gfx_init_plane_charset8::$6 ] +reg byte a [ gfx_init_screen0::$0 ] +reg byte a [ gfx_init_screen0::$2 ] +reg byte a [ gfx_init_screen0::$3 ]