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 index c5f6583e6..a5f4eae97 100644 --- a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc @@ -1,9 +1,9 @@ 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 }; +const byte[] SRCA = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '}; +const byte SRCA_LEN = 9; +const byte[] SRCB = { $80 }; void main() { @@ -40,9 +40,20 @@ void main() { *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; + // Start blitter *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD; + // Instruct blitter to continue at DEST and restart SRC A/B + *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT; + + // Start a 8 more times when ready + for( byte r: 0..7 ) { + // wait til blitter is ready + do {} while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0); + // restart + *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 9a37c6bc3..b6eaac848 100644 --- a/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc +++ b/src/test/java/dk/camelot64/kickc/test/kc/c64dtv.kc @@ -147,7 +147,7 @@ const byte DTV_BLIT_WRITE_TRANSPARENT = %00000010; 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; +const byte DTV_BLIT_TRANSPARANCY_NONE = %00000000; // 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] 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 index 2babe3d5f..5b0c25f6d 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.asm @@ -208,9 +208,9 @@ gfx_init_plane_charset8: { sta gfxa lda #>$4000+(CHARSET8&$3fff) sta gfxa+1 - lda #CHARGEN + lda #>CHARGEN+1 sta chargen+1 b1: lda #0 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 index 0ca1e8156..3aa3688ab 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.cfg +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.cfg @@ -59,11 +59,11 @@ main::@7: scope:[main] from main::@5 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 ] ) + [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) + [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) + [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 [ 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 @@ -89,7 +89,7 @@ gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plan [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 ] ) + [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+(byte/signed byte/word/signed word/dword/signed dword) 1 ) [ 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 ] ) @@ -104,8 +104,8 @@ gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plan [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 ] ) + [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) + [60] if((byte~) gfx_init_plane_charset8::$7==(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 ] ) 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 index 00d8ccbb0..8c91a73eb 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.log @@ -27,7 +27,6 @@ void main() { *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; @@ -52,8 +51,7 @@ void main() { 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 + 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: @@ -71,7 +69,7 @@ void main() { 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 } + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } } while (rst!=$f2); } } @@ -99,7 +97,7 @@ void gfx_init_plane_charset8() { byte gfxbCpuBank = (byte)(CHARSET8/$4000); dtvSetCpuBankSegment1(gfxbCpuBank++); byte* gfxa = $4000 + (((word)CHARSET8)& $3fff); - byte* chargen = CHARGEN; + byte* chargen = CHARGEN+1; *PROCPORT = PROCPORT_RAM_CHARROM; byte col = 0; for(byte ch : $00..$ff) { @@ -202,6 +200,112 @@ void dtvSetCpuBankSegment1(byte cpuBankIdx) { } } +// 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 = %00000000; +// 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; + Importing c64.kc PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc // Commodore 64 Registers and Constants @@ -408,6 +512,70 @@ proc (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1::@return: return endproc // dtvSetCpuBankSegment1() + (byte*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) SCREEN ← (word/signed word/dword/signed dword) 31744 (byte*) CHARSET8 ← (word/dword/signed dword) 32768 proc (void()) main() @@ -434,52 +602,50 @@ proc (void()) main() *((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~) main::$10 ← < (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$10 + (byte~) main::$11 ← > (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$11 *((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 + (word~) main::$12 ← ((word)) (byte*) SCREEN + (word/signed dword/dword~) main::$13 ← (word~) main::$12 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$14 ← ((byte)) (word/signed dword/dword~) main::$13 + (byte/word/dword~) main::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$14 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$15 + (word~) main::$16 ← ((word)) (byte*) SCREEN + (word~) main::$17 ← (word~) main::$16 & (word/signed word/dword/signed dword) 16383 + (word~) main::$18 ← (word~) main::$17 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$19 ← ((byte)) (word~) main::$18 + (word~) main::$20 ← ((word)) (byte*) SCREEN + (word~) main::$21 ← (word~) main::$20 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$22 ← > (word~) main::$21 + (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$24 ← (byte~) main::$19 | (byte~) main::$23 + *((byte*) VIC_MEMORY) ← (byte~) main::$24 (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 + (boolean~) main::$25 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$25) 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~) main::$26 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$27 ← (byte~) main::$26 | (byte) VIC_RSEL + (byte/word/dword~) main::$28 ← (byte~) main::$27 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$28 *((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 + (boolean~) main::$29 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$29) goto main::@6 goto main::@7 main::@6: goto main::@5 @@ -487,16 +653,16 @@ 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 + (byte~) main::$30 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$31 ← (byte~) main::$30 | (byte) VIC_RSEL + (byte~) main::$32 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$33 ← (byte~) main::$31 | (byte~) main::$32 + *((byte*) VIC_CONTROL) ← (byte~) main::$33 + (byte~) main::$34 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$34 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 + (boolean~) main::$35 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$35) goto main::@8 goto main::@2 main::@4: main::@return: @@ -539,7 +705,8 @@ proc (void()) gfx_init_plane_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*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN + (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) gfx_init_plane_charset8::chargen ← (byte*~) gfx_init_plane_charset8::$6 *((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 @@ -551,30 +718,30 @@ gfx_init_plane_charset8::@2: (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::$7 ← (byte) gfx_init_plane_charset8::bits & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$9 ← ! (boolean~) gfx_init_plane_charset8::$8 + if((boolean~) gfx_init_plane_charset8::$9) 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::$10 ← (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::$10 (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 + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cp != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) 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 + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::cr != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$12) 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 + (boolean~) gfx_init_plane_charset8::$13 ← (byte) gfx_init_plane_charset8::ch != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$13) 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 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$15 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 + (void~) gfx_init_plane_charset8::$16 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_plane_charset8::$15 gfx_init_plane_charset8::@return: return endproc // gfx_init_plane_charset8() @@ -607,6 +774,70 @@ SYMBOLS (byte*) D018 (byte) DARK_GREY (byte) DTV_BADLINE_OFF +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR (byte) DTV_BORDER_OFF (byte) DTV_CHUNKY (byte) DTV_COLORRAM_OFF @@ -690,20 +921,21 @@ SYMBOLS (void()) gfx_init_plane_charset8() (byte*~) gfx_init_plane_charset8::$0 (byte~) gfx_init_plane_charset8::$1 -(boolean~) gfx_init_plane_charset8::$10 +(byte~) 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 +(boolean~) gfx_init_plane_charset8::$13 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 +(byte~) gfx_init_plane_charset8::$15 +(void~) gfx_init_plane_charset8::$16 (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 +(byte*~) gfx_init_plane_charset8::$6 +(byte~) gfx_init_plane_charset8::$7 (boolean~) gfx_init_plane_charset8::$8 -(byte~) gfx_init_plane_charset8::$9 +(boolean~) gfx_init_plane_charset8::$9 (label) gfx_init_plane_charset8::@1 (label) gfx_init_plane_charset8::@2 (label) gfx_init_plane_charset8::@3 @@ -734,35 +966,34 @@ SYMBOLS (void()) main() (void~) main::$0 (byte~) main::$1 -(dword~) main::$10 +(byte~) 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::$12 +(word/signed dword/dword~) main::$13 +(byte~) main::$14 +(byte/word/dword~) main::$15 +(word~) main::$16 (word~) main::$17 (word~) main::$18 -(word~) main::$19 +(byte~) main::$19 (byte~) main::$2 -(byte~) main::$20 +(word~) main::$20 (word~) main::$21 -(word~) main::$22 +(byte~) main::$22 (byte~) main::$23 (byte~) main::$24 -(byte~) main::$25 -(boolean~) main::$26 +(boolean~) main::$25 +(byte~) main::$26 (byte~) main::$27 -(byte~) main::$28 -(byte/word/dword~) main::$29 +(byte/word/dword~) main::$28 +(boolean~) main::$29 (byte~) main::$3 -(boolean~) main::$30 +(byte~) main::$30 (byte~) main::$31 (byte~) main::$32 (byte~) main::$33 (byte~) main::$34 -(byte~) main::$35 -(boolean~) main::$36 +(boolean~) main::$35 (byte~) main::$4 (byte~) main::$5 (byte/word/dword~) main::$6 @@ -779,7 +1010,6 @@ SYMBOLS (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 @@ -839,6 +1069,36 @@ Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_HI ← ((byte*)) 53 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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 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 @@ -950,6 +1210,70 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan return to:@return @1: scope:[] from @begin + (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 31744 (byte*) CHARSET8 ← ((byte*)) (word/dword/signed dword) 32768 to:@2 @@ -977,39 +1301,37 @@ main: scope:[main] from *((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~) main::$10 ← < (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$10 + (byte~) main::$11 ← > (byte*) CHARSET8 + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$11 *((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 + (word~) main::$12 ← ((word)) (byte*) SCREEN + (word/signed dword/dword~) main::$13 ← (word~) main::$12 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$14 ← ((byte)) (word/signed dword/dword~) main::$13 + (byte/word/dword~) main::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$14 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$15 + (word~) main::$16 ← ((word)) (byte*) SCREEN + (word~) main::$17 ← (word~) main::$16 & (word/signed word/dword/signed dword) 16383 + (word~) main::$18 ← (word~) main::$17 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$19 ← ((byte)) (word~) main::$18 + (word~) main::$20 ← ((word)) (byte*) SCREEN + (word~) main::$21 ← (word~) main::$20 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$22 ← > (word~) main::$21 + (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$24 ← (byte~) main::$19 | (byte~) main::$23 + *((byte*) VIC_MEMORY) ← (byte~) main::$24 (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 + (boolean~) main::$25 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$25) goto main::@1 to:main::@9 main::@9: scope:[main] from main::@1 to:main::@2 @@ -1018,10 +1340,10 @@ main::@2: scope:[main] from main::@15 main::@9 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~) main::$26 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$27 ← (byte~) main::$26 | (byte) VIC_RSEL + (byte/word/dword~) main::$28 ← (byte~) main::$27 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$28 *((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 @@ -1032,8 +1354,8 @@ main::@4: scope:[main] from main::@10 main::@16 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 + (boolean~) main::$29 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$29) goto main::@6 to:main::@12 main::@6: scope:[main] from main::@13 main::@5 to:main::@5 @@ -1048,16 +1370,16 @@ 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 + (byte~) main::$30 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$31 ← (byte~) main::$30 | (byte) VIC_RSEL + (byte~) main::$32 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$33 ← (byte~) main::$31 | (byte~) main::$32 + *((byte*) VIC_CONTROL) ← (byte~) main::$33 + (byte~) main::$34 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$34 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 + (boolean~) main::$35 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$35) goto main::@8 to:main::@15 main::@15: scope:[main] from main::@8 to:main::@2 @@ -1117,7 +1439,8 @@ gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from (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*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN + (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) gfx_init_plane_charset8::chargen ← (byte*~) gfx_init_plane_charset8::$6 *((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 @@ -1132,39 +1455,39 @@ gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plan 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 + (byte~) gfx_init_plane_charset8::$7 ← (byte) gfx_init_plane_charset8::bits & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$9 ← ! (boolean~) gfx_init_plane_charset8::$8 + if((boolean~) gfx_init_plane_charset8::$9) 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::$10 ← (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::$10 (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 + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cp != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) 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 + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::cr != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$12) 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 + (boolean~) gfx_init_plane_charset8::$13 ← (byte) gfx_init_plane_charset8::ch != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$13) 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 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$15 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 + (void~) gfx_init_plane_charset8::$16 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_plane_charset8::$15 to:gfx_init_plane_charset8::@return gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8 return @@ -1232,13 +1555,75 @@ Eliminating unused variable (byte*) DTV_COLOR_BANK_HI and assignment [92] (byte* 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 (byte*) DTV_BLITTER_SRCA_LO and assignment [100] (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MI and assignment [101] (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_HI and assignment [102] (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_LO and assignment [103] (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_HI and assignment [104] (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_LO and assignment [105] (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_HI and assignment [106] (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_STEP and assignment [107] (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LO and assignment [108] (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MI and assignment [109] (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_HI and assignment [110] (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_LO and assignment [111] (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_HI and assignment [112] (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_LO and assignment [113] (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_HI and assignment [114] (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_STEP and assignment [115] (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LO and assignment [116] (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MI and assignment [117] (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_HI and assignment [118] (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_LO and assignment [119] (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_HI and assignment [120] (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_LO and assignment [121] (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_HI and assignment [122] (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_STEP and assignment [123] (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_LO and assignment [124] (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_HI and assignment [125] (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL and assignment [126] (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 +Eliminating unused variable (byte) DTV_BLIT_FORCE_START and assignment [127] (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_FWD and assignment [128] (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_FWD and assignment [129] (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_FWD and assignment [130] (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_VIC_IRQ and assignment [131] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [132] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [133] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [134] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte*) DTV_BLITTER_TRANSPARANCY and assignment [135] (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [136] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [137] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [138] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_TRANSPARANCY_NONE and assignment [139] (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte*) DTV_BLITTER_ALU and assignment [140] (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [141] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [142] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [143] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [144] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [145] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [146] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [147] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [148] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [149] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [150] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [151] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [152] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [153] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [154] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_ADD and assignment [155] (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [156] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL2 and assignment [157] (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [158] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [159] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [160] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_CONT and assignment [161] (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_STATUS_BUSY and assignment [162] (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [163] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 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 +Eliminating unused variable - keeping the call (void~) gfx_init_plane_charset8::$16 Removing empty block main::@9 Removing empty block main::@10 Removing empty block main::@4 @@ -1341,55 +1726,55 @@ main::@17: scope:[main] from main *((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~) main::$10 ← < (byte*) CHARSET8#0 + *((byte*) DTV_PLANEB_START_LO#0) ← (byte~) main::$10 + (byte~) main::$11 ← > (byte*) CHARSET8#0 + *((byte*) DTV_PLANEB_START_MI#0) ← (byte~) main::$11 *((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 + (word~) main::$12 ← ((word)) (byte*) SCREEN#0 + (word/signed dword/dword~) main::$13 ← (word~) main::$12 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$14 ← ((byte)) (word/signed dword/dword~) main::$13 + (byte/word/dword~) main::$15 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$14 + *((byte*) CIA2_PORT_A#0) ← (byte/word/dword~) main::$15 + (word~) main::$16 ← ((word)) (byte*) SCREEN#0 + (word~) main::$17 ← (word~) main::$16 & (word/signed word/dword/signed dword) 16383 + (word~) main::$18 ← (word~) main::$17 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$19 ← ((byte)) (word~) main::$18 + (word~) main::$20 ← ((word)) (byte*) SCREEN#0 + (word~) main::$21 ← (word~) main::$20 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$22 ← > (word~) main::$21 + (byte~) main::$23 ← (byte~) main::$22 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$24 ← (byte~) main::$19 | (byte~) main::$23 + *((byte*) VIC_MEMORY#0) ← (byte~) main::$24 (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 + (boolean~) main::$25 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$25) 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~) main::$26 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$27 ← (byte~) main::$26 | (byte) VIC_RSEL#0 + (byte/word/dword~) main::$28 ← (byte~) main::$27 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL#0) ← (byte/word/dword~) main::$28 *((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 + (boolean~) main::$29 ← *((byte*) RASTER#0) != (byte) main::rst#2 + if((boolean~) main::$29) goto main::@6 to:main::@7 main::@6: scope:[main] from main::@5 (byte) main::rst#3 ← phi( main::@5/(byte) main::rst#2 ) @@ -1399,16 +1784,16 @@ main::@7: scope:[main] from main::@5 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 + (byte~) main::$30 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$31 ← (byte~) main::$30 | (byte) VIC_RSEL#0 + (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$33 ← (byte~) main::$31 | (byte~) main::$32 + *((byte*) VIC_CONTROL#0) ← (byte~) main::$33 + (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL#0) ← (byte~) main::$34 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 + (boolean~) main::$35 ← (byte) main::rst#1 != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$35) goto main::@8 to:main::@2 main::@return: scope:[main] from main::@2 return @@ -1471,7 +1856,8 @@ gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plan (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*~) gfx_init_plane_charset8::$6 ← (byte*) CHARGEN#0 + (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) gfx_init_plane_charset8::chargen#0 ← (byte*~) gfx_init_plane_charset8::$6 *((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 @@ -1502,10 +1888,10 @@ gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plan (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 + (byte~) gfx_init_plane_charset8::$7 ← (byte) gfx_init_plane_charset8::bits#2 & (byte/word/signed word/dword/signed dword) 128 + (boolean~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (byte/signed byte/word/signed word/dword/signed dword) 0 + (boolean~) gfx_init_plane_charset8::$9 ← ! (boolean~) gfx_init_plane_charset8::$8 + if((boolean~) gfx_init_plane_charset8::$9) 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 ) @@ -1518,12 +1904,12 @@ gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plan (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::$10 ← (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::$10 (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 + (boolean~) gfx_init_plane_charset8::$11 ← (byte) gfx_init_plane_charset8::cp#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$11) 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 ) @@ -1542,8 +1928,8 @@ gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plan (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 + (boolean~) gfx_init_plane_charset8::$12 ← (byte) gfx_init_plane_charset8::cr#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) gfx_init_plane_charset8::$12) 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 ) @@ -1551,14 +1937,14 @@ gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plan (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 + (boolean~) gfx_init_plane_charset8::$13 ← (byte) gfx_init_plane_charset8::ch#1 != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) gfx_init_plane_charset8::$13) 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 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_plane_charset8::$15 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte~) gfx_init_plane_charset8::$15 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 @@ -1674,18 +2060,19 @@ SYMBOL TABLE SSA (void()) gfx_init_plane_charset8() (byte*~) gfx_init_plane_charset8::$0 (byte~) gfx_init_plane_charset8::$1 -(boolean~) gfx_init_plane_charset8::$10 +(byte~) 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 +(boolean~) gfx_init_plane_charset8::$13 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_plane_charset8::$14 +(byte~) gfx_init_plane_charset8::$15 (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 +(byte*~) gfx_init_plane_charset8::$6 +(byte~) gfx_init_plane_charset8::$7 (boolean~) gfx_init_plane_charset8::$8 -(byte~) gfx_init_plane_charset8::$9 +(boolean~) gfx_init_plane_charset8::$9 (label) gfx_init_plane_charset8::@1 (label) gfx_init_plane_charset8::@10 (label) gfx_init_plane_charset8::@2 @@ -1794,34 +2181,34 @@ SYMBOL TABLE SSA (byte) gfx_init_screen0::cy#4 (void()) main() (byte~) main::$1 +(byte~) 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::$12 +(word/signed dword/dword~) main::$13 +(byte~) main::$14 +(byte/word/dword~) main::$15 +(word~) main::$16 (word~) main::$17 (word~) main::$18 -(word~) main::$19 +(byte~) main::$19 (byte~) main::$2 -(byte~) main::$20 +(word~) main::$20 (word~) main::$21 -(word~) main::$22 +(byte~) main::$22 (byte~) main::$23 (byte~) main::$24 -(byte~) main::$25 -(boolean~) main::$26 +(boolean~) main::$25 +(byte~) main::$26 (byte~) main::$27 -(byte~) main::$28 -(byte/word/dword~) main::$29 +(byte/word/dword~) main::$28 +(boolean~) main::$29 (byte~) main::$3 -(boolean~) main::$30 +(byte~) main::$30 (byte~) main::$31 (byte~) main::$32 (byte~) main::$33 (byte~) main::$34 -(byte~) main::$35 -(boolean~) main::$36 +(boolean~) main::$35 (byte~) main::$4 (byte~) main::$5 (byte/word/dword~) main::$6 @@ -1852,17 +2239,17 @@ 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 +Inversing boolean not (boolean~) gfx_init_plane_charset8::$9 ← (byte~) gfx_init_plane_charset8::$7 == (byte/signed byte/word/signed word/dword/signed dword) 0 from (boolean~) gfx_init_plane_charset8::$8 ← (byte~) gfx_init_plane_charset8::$7 != (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::chargen#0 = (byte*~) gfx_init_plane_charset8::$6 +Alias (byte) gfx_init_plane_charset8::bits#1 = (byte~) gfx_init_plane_charset8::$10 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 @@ -1875,12 +2262,11 @@ Alias (byte*) gfx_init_plane_charset8::chargen#4 = (byte*) gfx_init_plane_charse 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 +Alias (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte~) gfx_init_plane_charset8::$15 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 @@ -1892,7 +2278,6 @@ 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 @@ -1905,15 +2290,15 @@ Redundant Phi (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset 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~) main::$25 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 +Simple Condition (boolean~) main::$29 if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 +Simple Condition (boolean~) main::$35 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 +Simple Condition (boolean~) gfx_init_plane_charset8::$9 if((byte~) gfx_init_plane_charset8::$7==(byte/signed byte/word/signed word/dword/signed dword) 0) goto gfx_init_plane_charset8::@4 +Simple Condition (boolean~) gfx_init_plane_charset8::$11 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::$12 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::$13 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 @@ -1965,52 +2350,52 @@ 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 +Constant (const byte/signed byte/word/signed word/dword/signed dword) gfx_init_plane_charset8::$14 = 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) main::$10 = CHARSET8#0 +Constant (const word) main::$12 = ((word))SCREEN#0 +Constant (const word) main::$16 = ((word))SCREEN#0 +Constant (const word) main::$20 = ((word))SCREEN#0 +Constant (const byte) main::$26 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte) main::$30 = 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 +Constant (const byte*) gfx_init_plane_charset8::chargen#0 = CHARGEN#0+1 +Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = ((byte))gfx_init_plane_charset8::$14 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 word/signed dword/dword) main::$13 = main::$12/16384 +Constant (const word) main::$17 = main::$16&16383 +Constant (const word) main::$21 = main::$20&16383 +Constant (const byte) main::$27 = main::$26|VIC_RSEL#0 +Constant (const byte) main::$31 = main::$30|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) main::$14 = ((byte))main::$13 +Constant (const word) main::$18 = main::$17>>6 +Constant (const byte) main::$22 = >main::$21 +Constant (const byte/word/dword) main::$28 = main::$27|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/word/dword) main::$15 = 3^main::$14 +Constant (const byte) main::$19 = ((byte))main::$18 +Constant (const byte) main::$23 = main::$22>>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 +Constant (const byte) main::$24 = main::$19|main::$23 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 @@ -2065,38 +2450,38 @@ Constant inlined gfx_init_plane_charset8::gfxa#0 = ((byte*))(word/signed word/dw 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 main::$12 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$13 = ((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$14 = ((byte))((word))(const byte*) SCREEN#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$15 = (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 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 main::$30 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$31 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$10 = <(const byte*) CHARSET8#0 +Constant inlined main::$11 = >(const byte*) CHARSET8#0 +Constant inlined gfx_init_plane_charset8::chargen#0 = (const byte*) CHARGEN#0+(byte/signed byte/word/signed word/dword/signed dword) 1 +Constant inlined main::$16 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$17 = ((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$18 = ((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::$19 = ((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 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_plane_charset8::$14 = (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 main::$23 = >((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::$24 = ((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::$26 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$20 = ((word))(const byte*) SCREEN#0 +Constant inlined main::$21 = ((word))(const byte*) SCREEN#0&(word/signed word/dword/signed dword) 16383 +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::$27 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#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::$28 = (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 @@ -2273,11 +2658,11 @@ main::@7: scope:[main] from main::@5 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 ] ) + [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) + [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) + [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 [ 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 @@ -2303,7 +2688,7 @@ gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plan [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 ] ) + [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+(byte/signed byte/word/signed word/dword/signed dword) 1 ) [ 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 ] ) @@ -2318,8 +2703,8 @@ gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plan [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 ] ) + [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) + [60] if((byte~) gfx_init_plane_charset8::$7==(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 ] ) @@ -2521,7 +2906,7 @@ VARIABLE REGISTER WEIGHTS (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::$7 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 @@ -2569,9 +2954,9 @@ VARIABLE REGISTER WEIGHTS (byte) gfx_init_screen0::cy#1 16.5 (byte) gfx_init_screen0::cy#4 12.299999999999999 (void()) main() +(byte~) main::$32 202.0 (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 @@ -2593,10 +2978,10 @@ Initial phi equivalence classes [ 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::$32 to zero page equivalence class [ main::$32 ] 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_plane_charset8::$7 to zero page equivalence class [ gfx_init_plane_charset8::$7 ] 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 ] @@ -2616,10 +3001,10 @@ Complete equivalence classes [ 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::$32 ] [ main::$33 ] [ main::$34 ] -[ main::$35 ] -[ gfx_init_plane_charset8::$6 ] +[ gfx_init_plane_charset8::$7 ] [ gfx_init_screen0::$0 ] [ gfx_init_screen0::$1 ] [ gfx_init_screen0::$2 ] @@ -2638,10 +3023,10 @@ 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:19 [ main::$32 ] +Allocated zp ZP_BYTE:20 [ main::$33 ] +Allocated zp ZP_BYTE:21 [ main::$34 ] +Allocated zp ZP_BYTE:22 [ gfx_init_plane_charset8::$7 ] 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 ] @@ -2709,9 +3094,9 @@ bend_from_b5: bend: //SEG8 main main: { - .label _33 = $13 - .label _34 = $14 - .label _35 = $15 + .label _32 = $13 + .label _33 = $14 + .label _34 = $15 .label j = 2 .label rst = $12 //SEG9 asm { sei } @@ -2898,26 +3283,26 @@ main: { //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 + //SEG56 [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- 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 + sta _32 + //SEG57 [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- 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 + ora _32 + sta _33 + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _33 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 + //SEG59 [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- 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 _34 + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _34 sta BORDERCOL //SEG61 asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } nop @@ -2965,7 +3350,7 @@ gfx_init: { //SEG72 gfx_init_plane_charset8 gfx_init_plane_charset8: { .const gfxbCpuBank = $ff&CHARSET8/$4000 - .label _6 = $16 + .label _7 = $16 .label bits = 7 .label chargen = 4 .label gfxa = 8 @@ -3000,10 +3385,10 @@ gfx_init_plane_charset8: { 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 #gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + lda #>CHARGEN+1 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] @@ -3060,12 +3445,12 @@ gfx_init_plane_charset8: { 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 + //SEG113 [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) -- 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 + sta _7 + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$7==(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 _7 beq b4_from_b3 jmp b5 //SEG115 gfx_init_plane_charset8::@5 @@ -3274,10 +3659,10 @@ Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop 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 [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) 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 [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Statement [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) 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 ] @@ -3286,7 +3671,7 @@ Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ g 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 +Statement [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) 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 @@ -3327,12 +3712,12 @@ Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop 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 [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a +Statement [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Statement [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) 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 [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) 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 @@ -3353,28 +3738,28 @@ Potential registers zp ZP_BYTE:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy# 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:19 [ main::$32 ] : zp ZP_BYTE:19 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:20 [ main::$33 ] : zp ZP_BYTE:20 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:21 [ main::$34 ] : zp ZP_BYTE:21 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:22 [ gfx_init_plane_charset8::$7 ] : 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_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::$7 ] 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 [main] 202: zp ZP_BYTE:19 [ main::$32 ] 202: zp ZP_BYTE:20 [ main::$33 ] 202: zp ZP_BYTE:21 [ main::$34 ] 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 ] +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::$7 ] 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 ] +Uplifting [main] best 93040 combination reg byte a [ main::$32 ] reg byte a [ main::$33 ] reg byte a [ main::$34 ] 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 @@ -3645,20 +4030,20 @@ main: { 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 + //SEG56 [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- 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 + //SEG57 [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- 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 + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 [ 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 + //SEG59 [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- 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 + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 [ 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 @@ -3736,10 +4121,10 @@ gfx_init_plane_charset8: { 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 #gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + lda #>CHARGEN+1 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] @@ -3795,10 +4180,10 @@ gfx_init_plane_charset8: { 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 + //SEG113 [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) -- 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 + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$7==(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 @@ -4154,7 +4539,7 @@ FINAL SYMBOL TABLE (label) gfx_init::@1 (label) gfx_init::@return (void()) gfx_init_plane_charset8() -(byte~) gfx_init_plane_charset8::$6 reg byte a 2002.0 +(byte~) gfx_init_plane_charset8::$7 reg byte a 2002.0 (label) gfx_init_plane_charset8::@1 (label) gfx_init_plane_charset8::@2 (label) gfx_init_plane_charset8::@3 @@ -4217,9 +4602,9 @@ FINAL SYMBOL TABLE (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::$32 reg byte a 202.0 (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 @@ -4246,10 +4631,10 @@ 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::$32 ] 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_plane_charset8::$7 ] reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] @@ -4471,20 +4856,20 @@ main: { 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 + //SEG56 [39] (byte~) main::$32 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- 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 + //SEG57 [40] (byte~) main::$33 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$32 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- 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 + //SEG58 [41] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$33 [ 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 + //SEG59 [42] (byte~) main::$34 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$34 ] ( main:2 [ main::rst#1 main::$34 ] ) -- 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 + //SEG60 [43] *((const byte*) BORDERCOL#0) ← (byte~) main::$34 [ 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 @@ -4550,10 +4935,10 @@ gfx_init_plane_charset8: { 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 #gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1 + lda #CHARGEN + lda #>CHARGEN+1 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 @@ -4598,10 +4983,10 @@ gfx_init_plane_charset8: { //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 + //SEG113 [59] (byte~) gfx_init_plane_charset8::$7 ← (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::$7 ] ( 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::$7 ] ) -- 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 + //SEG114 [60] if((byte~) gfx_init_plane_charset8::$7==(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 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 index 4774ca961..2130ec1c9 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppcharstretch.sym @@ -91,7 +91,7 @@ (label) gfx_init::@1 (label) gfx_init::@return (void()) gfx_init_plane_charset8() -(byte~) gfx_init_plane_charset8::$6 reg byte a 2002.0 +(byte~) gfx_init_plane_charset8::$7 reg byte a 2002.0 (label) gfx_init_plane_charset8::@1 (label) gfx_init_plane_charset8::@2 (label) gfx_init_plane_charset8::@3 @@ -154,9 +154,9 @@ (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::$32 reg byte a 202.0 (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 @@ -183,10 +183,10 @@ 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::$32 ] 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_plane_charset8::$7 ] reg byte a [ gfx_init_screen0::$0 ] reg byte a [ gfx_init_screen0::$2 ] reg byte a [ gfx_init_screen0::$3 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.asm b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.asm new file mode 100644 index 000000000..6ea46f37d --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.asm @@ -0,0 +1,242 @@ +.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 + .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_COLORRAM_OFF = $10 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .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 CHUNKY = $8000 + jsr main +main: { + sei + lda #PROCPORT_DDR_MEMORY_MASK + sta PROCPORT_DDR + lda #PROCPORT_RAM_IO + sta PROCPORT + jsr gfx_init_chunky + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_COLORRAM_OFF|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 #CHUNKY + sta DTV_PLANEB_START_MI + lda #0 + sta DTV_PLANEB_START_HI + lda #8 + sta DTV_PLANEB_STEP + lda #0 + sta DTV_PLANEB_MODULO_LO + sta DTV_PLANEB_MODULO_HI + lda #3 + sta CIA2_PORT_A_DDR + lda #3^CHUNKY/$4000 + sta CIA2_PORT_A + lda #(CHUNKY&$3fff)>>6|(0)>>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_chunky: { + .label _6 = 7 + .label gfxb = 5 + .label x = 3 + .label y = 2 + lda #$ff&CHUNKY/$4000 + jsr dtvSetCpuBankSegment1 + ldx #($ff&CHUNKY/$4000)+1 + lda #0 + sta y + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + b1: + lda #<0 + sta x + sta x+1 + b2: + lda gfxb+1 + cmp #>$8000 + bne b3 + lda gfxb + cmp #<$8000 + bne b3 + txa + jsr dtvSetCpuBankSegment1 + inx + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + b3: + lda y + clc + adc x + sta _6 + lda #0 + adc x+1 + sta _6+1 + lda _6 + ldy #0 + sta (gfxb),y + inc gfxb + bne !+ + inc gfxb+1 + !: + inc x + bne !+ + inc x+1 + !: + lda x+1 + cmp #>$140 + bne b2 + lda x + cmp #<$140 + bne b2 + inc y + lda y + cmp #$33 + bne b1 + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + rts +} +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + sta cpuBank + .byte $32, $dd + lda $ff + .byte $32, $00 + rts +} diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.cfg b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.cfg new file mode 100644 index 000000000..e28e02a5e --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.cfg @@ -0,0 +1,114 @@ +@begin: scope:[] from + [0] phi() [ ] ( ) + to:@3 +@3: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @3 + [3] phi() [ ] ( ) +main: scope:[main] from @3 + 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_chunky 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_COLORRAM_OFF#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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) + [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#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 + [21] (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 ] ) + [22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [23] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + [24] 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 + [25] if(true) goto main::@3 [ ] ( main:2 [ ] ) + to:main::@return +main::@return: scope:[main] from main::@2 + [26] 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 } + [28] *((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 [ ] ) + [29] *((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 + [30] 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 + [32] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) + [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) + [35] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$32 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [37] *((const byte*) BORDERCOL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + [39] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) + to:main::@2 +gfx_init_chunky: scope:[gfx_init_chunky] from main + [40] phi() [ ] ( main:2::gfx_init_chunky:7 [ ] ) + [41] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:gfx_init_chunky::@1 +gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky gfx_init_chunky::@5 + [42] (byte) gfx_init_chunky::gfxbCpuBank#7 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky/++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + [42] (byte) gfx_init_chunky::y#6 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::y#1 gfx_init_chunky/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + [42] (byte*) gfx_init_chunky::gfxb#5 ← phi( gfx_init_chunky::@5/(byte*) gfx_init_chunky::gfxb#1 gfx_init_chunky/((byte*))(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + to:gfx_init_chunky::@2 +gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3 + [43] (byte) gfx_init_chunky::gfxbCpuBank#4 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [43] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [43] (byte*) gfx_init_chunky::gfxb#3 ← phi( gfx_init_chunky::@1/(byte*) gfx_init_chunky::gfxb#5 gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + to:gfx_init_chunky::@4 +gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2 + [45] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ) + [46] call dtvSetCpuBankSegment1 param-assignment [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + to:gfx_init_chunky::@8 +gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4 + [47] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ) + to:gfx_init_chunky::@3 +gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@8 + [48] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@8/(byte) gfx_init_chunky::gfxbCpuBank#2 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [48] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@8/((byte*))(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) + [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) + [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [52] (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ) + [53] (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) + [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) + to:gfx_init_chunky::@5 +gfx_init_chunky::@5: scope:[gfx_init_chunky] from gfx_init_chunky::@3 + [55] (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) + [56] if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@1 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) + to:gfx_init_chunky::@6 +gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 + [57] phi() [ ] ( main:2::gfx_init_chunky:7 [ ] ) + [58] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:gfx_init_chunky::@return +gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6 + [59] return [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:@return +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 + [60] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 ) [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#3 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] ) + [61] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + [63] return [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + to:@return diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.log new file mode 100644 index 000000000..ccc100f02 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.log @@ -0,0 +1,3943 @@ +PARSING src/test/java/dk/camelot64/kickc/test/kc/c64dtv-8bppchunkystretch.kc +// 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)); +} + +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 + } +} + +// 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 = %00000000; +// 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; + +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_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank +Adding pre/post-modifier (byte) gfx_init_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank +Adding pre/post-modifier (byte*) gfx_init_chunky::gfxb ← ++ (byte*) gfx_init_chunky::gfxb + +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*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) CHUNKY ← (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_chunky + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$1 ← (byte) DTV_HIGHCOLOR | (byte) DTV_LINEAR + (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_COLORRAM_OFF + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_CHUNKY + (byte~) main::$4 ← (byte~) main::$3 | (byte) DTV_BADLINE_OFF + *((byte*) DTV_CONTROL) ← (byte~) main::$4 + (byte~) main::$5 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$6 ← (byte~) main::$5 | (byte) VIC_RSEL + (byte/word/dword~) main::$7 ← (byte~) main::$6 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$7 + (byte~) main::$8 ← (byte) VIC_MCM | (byte) VIC_CSEL + *((byte*) VIC_CONTROL2) ← (byte~) main::$8 + (byte~) main::$9 ← < (byte*) CHUNKY + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$9 + (byte~) main::$10 ← > (byte*) CHUNKY + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$10 + *((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) 8 + *((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::$11 ← ((word)) (byte*) CHUNKY + (word/signed dword/dword~) main::$12 ← (word~) main::$11 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$13 ← ((byte)) (word/signed dword/dword~) main::$12 + (byte/word/dword~) main::$14 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$13 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$14 + (word~) main::$15 ← ((word)) (byte*) CHUNKY + (word~) main::$16 ← (word~) main::$15 & (word/signed word/dword/signed dword) 16383 + (word~) main::$17 ← (word~) main::$16 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$18 ← ((byte)) (word~) main::$17 + (word~) main::$19 ← ((word)) (byte*) CHUNKY + (word~) main::$20 ← (word~) main::$19 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$21 ← > (word~) main::$20 + (byte~) main::$22 ← (byte~) main::$21 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$23 ← (byte~) main::$18 | (byte~) main::$22 + *((byte*) VIC_MEMORY) ← (byte~) main::$23 + (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::$24 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$24) 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::$25 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$26 ← (byte~) main::$25 | (byte) VIC_RSEL + (byte/word/dword~) main::$27 ← (byte~) main::$26 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$27 + *((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::$28 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$28) 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::$29 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$30 ← (byte~) main::$29 | (byte) VIC_RSEL + (byte~) main::$31 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 + *((byte*) VIC_CONTROL) ← (byte~) main::$32 + (byte~) main::$33 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$33 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$34 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$34) goto main::@8 + goto main::@2 +main::@4: +main::@return: + return +endproc // main() +proc (void()) gfx_init_chunky() + (byte*~) gfx_init_chunky::$0 ← (byte*) CHUNKY / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$1 ← ((byte)) (byte*~) gfx_init_chunky::$0 + (byte) gfx_init_chunky::gfxbCpuBank ← (byte~) gfx_init_chunky::$1 + (void~) gfx_init_chunky::$2 ← call dtvSetCpuBankSegment1 (byte) gfx_init_chunky::gfxbCpuBank + (byte) gfx_init_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank + (byte*) gfx_init_chunky::gfxb ← (word/signed word/dword/signed dword) 16384 + (byte) gfx_init_chunky::y ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_chunky::@1: + (word) gfx_init_chunky::x ← (byte/signed byte/word/signed word/dword/signed dword) 0 +gfx_init_chunky::@2: + (boolean~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb == (word/dword/signed dword) 32768 + (boolean~) gfx_init_chunky::$4 ← ! (boolean~) gfx_init_chunky::$3 + if((boolean~) gfx_init_chunky::$4) goto gfx_init_chunky::@3 + (void~) gfx_init_chunky::$5 ← call dtvSetCpuBankSegment1 (byte) gfx_init_chunky::gfxbCpuBank + (byte) gfx_init_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank + (byte*) gfx_init_chunky::gfxb ← (word/signed word/dword/signed dword) 16384 +gfx_init_chunky::@3: + (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x + (byte) gfx_init_chunky::y + (byte~) gfx_init_chunky::$7 ← ((byte)) (word~) gfx_init_chunky::$6 + (byte) gfx_init_chunky::c ← (byte~) gfx_init_chunky::$7 + *((byte*) gfx_init_chunky::gfxb) ← (byte) gfx_init_chunky::c + (byte*) gfx_init_chunky::gfxb ← ++ (byte*) gfx_init_chunky::gfxb + (word) gfx_init_chunky::x ← ++ (word) gfx_init_chunky::x + (boolean~) gfx_init_chunky::$8 ← (word) gfx_init_chunky::x != (word/signed word/dword/signed dword) 320 + if((boolean~) gfx_init_chunky::$8) goto gfx_init_chunky::@2 + (byte) gfx_init_chunky::y ← ++ (byte) gfx_init_chunky::y + (boolean~) gfx_init_chunky::$9 ← (byte) gfx_init_chunky::y != (byte/signed byte/word/signed word/dword/signed dword) 51 + if((boolean~) gfx_init_chunky::$9) goto gfx_init_chunky::@1 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$11 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 + (void~) gfx_init_chunky::$12 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_chunky::$11 +gfx_init_chunky::@return: + return +endproc // gfx_init_chunky() + call main + +SYMBOLS +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(byte*) CHUNKY +(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_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR +(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*) 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_chunky() +(byte*~) gfx_init_chunky::$0 +(byte~) gfx_init_chunky::$1 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 +(byte~) gfx_init_chunky::$11 +(void~) gfx_init_chunky::$12 +(void~) gfx_init_chunky::$2 +(boolean~) gfx_init_chunky::$3 +(boolean~) gfx_init_chunky::$4 +(void~) gfx_init_chunky::$5 +(word~) gfx_init_chunky::$6 +(byte~) gfx_init_chunky::$7 +(boolean~) gfx_init_chunky::$8 +(boolean~) gfx_init_chunky::$9 +(label) gfx_init_chunky::@1 +(label) gfx_init_chunky::@2 +(label) gfx_init_chunky::@3 +(label) gfx_init_chunky::@return +(byte) gfx_init_chunky::c +(byte*) gfx_init_chunky::gfxb +(byte) gfx_init_chunky::gfxbCpuBank +(word) gfx_init_chunky::x +(byte) gfx_init_chunky::y +(void()) main() +(void~) main::$0 +(byte~) main::$1 +(byte~) main::$10 +(word~) main::$11 +(word/signed dword/dword~) main::$12 +(byte~) main::$13 +(byte/word/dword~) main::$14 +(word~) main::$15 +(word~) main::$16 +(word~) main::$17 +(byte~) main::$18 +(word~) main::$19 +(byte~) main::$2 +(word~) main::$20 +(byte~) main::$21 +(byte~) main::$22 +(byte~) main::$23 +(boolean~) main::$24 +(byte~) main::$25 +(byte~) main::$26 +(byte/word/dword~) main::$27 +(boolean~) main::$28 +(byte~) main::$29 +(byte~) main::$3 +(byte~) main::$30 +(byte~) main::$31 +(byte~) main::$32 +(byte~) main::$33 +(boolean~) main::$34 +(byte~) main::$4 +(byte~) main::$5 +(byte~) main::$6 +(byte/word/dword~) 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 +(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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 +Promoting word/dword/signed dword to byte* in CHUNKY ← ((byte*)) 32768 +Promoting word/signed word/dword/signed dword to byte* in gfx_init_chunky::gfxb ← ((byte*)) 16384 +Promoting word/signed word/dword/signed dword to byte* in gfx_init_chunky::gfxb ← ((byte*)) 16384 +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*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) CHUNKY ← ((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_chunky + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$1 ← (byte) DTV_HIGHCOLOR | (byte) DTV_LINEAR + (byte~) main::$2 ← (byte~) main::$1 | (byte) DTV_COLORRAM_OFF + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_CHUNKY + (byte~) main::$4 ← (byte~) main::$3 | (byte) DTV_BADLINE_OFF + *((byte*) DTV_CONTROL) ← (byte~) main::$4 + (byte~) main::$5 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$6 ← (byte~) main::$5 | (byte) VIC_RSEL + (byte/word/dword~) main::$7 ← (byte~) main::$6 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$7 + (byte~) main::$8 ← (byte) VIC_MCM | (byte) VIC_CSEL + *((byte*) VIC_CONTROL2) ← (byte~) main::$8 + (byte~) main::$9 ← < (byte*) CHUNKY + *((byte*) DTV_PLANEB_START_LO) ← (byte~) main::$9 + (byte~) main::$10 ← > (byte*) CHUNKY + *((byte*) DTV_PLANEB_START_MI) ← (byte~) main::$10 + *((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) 8 + *((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::$11 ← ((word)) (byte*) CHUNKY + (word/signed dword/dword~) main::$12 ← (word~) main::$11 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$13 ← ((byte)) (word/signed dword/dword~) main::$12 + (byte/word/dword~) main::$14 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$13 + *((byte*) CIA2_PORT_A) ← (byte/word/dword~) main::$14 + (word~) main::$15 ← ((word)) (byte*) CHUNKY + (word~) main::$16 ← (word~) main::$15 & (word/signed word/dword/signed dword) 16383 + (word~) main::$17 ← (word~) main::$16 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$18 ← ((byte)) (word~) main::$17 + (word~) main::$19 ← ((word)) (byte*) CHUNKY + (word~) main::$20 ← (word~) main::$19 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$21 ← > (word~) main::$20 + (byte~) main::$22 ← (byte~) main::$21 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$23 ← (byte~) main::$18 | (byte~) main::$22 + *((byte*) VIC_MEMORY) ← (byte~) main::$23 + (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::$24 ← (byte) main::j != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$24) 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::$25 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$26 ← (byte~) main::$25 | (byte) VIC_RSEL + (byte/word/dword~) main::$27 ← (byte~) main::$26 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL) ← (byte/word/dword~) main::$27 + *((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::$28 ← *((byte*) RASTER) != (byte) main::rst + if((boolean~) main::$28) 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::$29 ← (byte) VIC_DEN | (byte) VIC_ECM + (byte~) main::$30 ← (byte~) main::$29 | (byte) VIC_RSEL + (byte~) main::$31 ← (byte) main::rst & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 + *((byte*) VIC_CONTROL) ← (byte~) main::$32 + (byte~) main::$33 ← (byte) main::rst << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL) ← (byte~) main::$33 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$34 ← (byte) main::rst != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$34) 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_chunky: scope:[gfx_init_chunky] from + (byte*~) gfx_init_chunky::$0 ← (byte*) CHUNKY / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$1 ← ((byte)) (byte*~) gfx_init_chunky::$0 + (byte) gfx_init_chunky::gfxbCpuBank ← (byte~) gfx_init_chunky::$1 + (void~) gfx_init_chunky::$2 ← call dtvSetCpuBankSegment1 (byte) gfx_init_chunky::gfxbCpuBank + (byte) gfx_init_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank + (byte*) gfx_init_chunky::gfxb ← ((byte*)) (word/signed word/dword/signed dword) 16384 + (byte) gfx_init_chunky::y ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_chunky::@1 +gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky gfx_init_chunky::@5 + (word) gfx_init_chunky::x ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_chunky::@2 +gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3 + (boolean~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb == (word/dword/signed dword) 32768 + (boolean~) gfx_init_chunky::$4 ← ! (boolean~) gfx_init_chunky::$3 + if((boolean~) gfx_init_chunky::$4) goto gfx_init_chunky::@3 + to:gfx_init_chunky::@4 +gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@4 + (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x + (byte) gfx_init_chunky::y + (byte~) gfx_init_chunky::$7 ← ((byte)) (word~) gfx_init_chunky::$6 + (byte) gfx_init_chunky::c ← (byte~) gfx_init_chunky::$7 + *((byte*) gfx_init_chunky::gfxb) ← (byte) gfx_init_chunky::c + (byte*) gfx_init_chunky::gfxb ← ++ (byte*) gfx_init_chunky::gfxb + (word) gfx_init_chunky::x ← ++ (word) gfx_init_chunky::x + (boolean~) gfx_init_chunky::$8 ← (word) gfx_init_chunky::x != (word/signed word/dword/signed dword) 320 + if((boolean~) gfx_init_chunky::$8) goto gfx_init_chunky::@2 + to:gfx_init_chunky::@5 +gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2 + (void~) gfx_init_chunky::$5 ← call dtvSetCpuBankSegment1 (byte) gfx_init_chunky::gfxbCpuBank + (byte) gfx_init_chunky::gfxbCpuBank ← ++ (byte) gfx_init_chunky::gfxbCpuBank + (byte*) gfx_init_chunky::gfxb ← ((byte*)) (word/signed word/dword/signed dword) 16384 + to:gfx_init_chunky::@3 +gfx_init_chunky::@5: scope:[gfx_init_chunky] from gfx_init_chunky::@3 + (byte) gfx_init_chunky::y ← ++ (byte) gfx_init_chunky::y + (boolean~) gfx_init_chunky::$9 ← (byte) gfx_init_chunky::y != (byte/signed byte/word/signed word/dword/signed dword) 51 + if((boolean~) gfx_init_chunky::$9) goto gfx_init_chunky::@1 + to:gfx_init_chunky::@6 +gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$11 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 + (void~) gfx_init_chunky::$12 ← call dtvSetCpuBankSegment1 (byte~) gfx_init_chunky::$11 + to:gfx_init_chunky::@return +gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6 + return + to:@return +@3: scope:[] from @2 + call main + to:@end +@end: scope:[] from @3 + +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_RAM_CHARROM and assignment [5] (byte) PROCPORT_RAM_CHARROM ← (byte/signed byte/word/signed word/dword/signed dword) 49 +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*) CHARGEN and assignment [8] (byte*) CHARGEN ← ((byte*)) (word/dword/signed dword) 53248 +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[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_PLANEA_START_LO and assignment [78] (byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306 +Eliminating unused variable (byte*) DTV_PLANEA_START_MI and assignment [79] (byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307 +Eliminating unused variable (byte*) DTV_PLANEA_START_HI and assignment [80] (byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317 +Eliminating unused variable (byte*) DTV_PLANEA_STEP and assignment [81] (byte*) DTV_PLANEA_STEP ← ((byte*)) (word/dword/signed dword) 53318 +Eliminating unused variable (byte*) DTV_PLANEA_MODULO_LO and assignment [82] (byte*) DTV_PLANEA_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53304 +Eliminating unused variable (byte*) DTV_PLANEA_MODULO_HI and assignment [83] (byte*) DTV_PLANEA_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53305 +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 (byte*) DTV_BLITTER_SRCA_LO and assignment [100] (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MI and assignment [101] (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_HI and assignment [102] (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_LO and assignment [103] (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_HI and assignment [104] (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_LO and assignment [105] (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_HI and assignment [106] (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_STEP and assignment [107] (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LO and assignment [108] (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MI and assignment [109] (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_HI and assignment [110] (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_LO and assignment [111] (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_HI and assignment [112] (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_LO and assignment [113] (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_HI and assignment [114] (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_STEP and assignment [115] (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LO and assignment [116] (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MI and assignment [117] (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_HI and assignment [118] (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_LO and assignment [119] (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_HI and assignment [120] (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_LO and assignment [121] (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_HI and assignment [122] (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_STEP and assignment [123] (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_LO and assignment [124] (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_HI and assignment [125] (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL and assignment [126] (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 +Eliminating unused variable (byte) DTV_BLIT_FORCE_START and assignment [127] (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_FWD and assignment [128] (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_FWD and assignment [129] (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_FWD and assignment [130] (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_VIC_IRQ and assignment [131] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [132] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [133] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [134] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte*) DTV_BLITTER_TRANSPARANCY and assignment [135] (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [136] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [137] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [138] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_TRANSPARANCY_NONE and assignment [139] (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte*) DTV_BLITTER_ALU and assignment [140] (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [141] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [142] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [143] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [144] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [145] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [146] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [147] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [148] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [149] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [150] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [151] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [152] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [153] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [154] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_ADD and assignment [155] (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [156] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL2 and assignment [157] (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [158] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [159] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [160] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_CONT and assignment [161] (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_STATUS_BUSY and assignment [162] (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [163] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable - keeping the call (void~) main::$0 +Eliminating unused variable - keeping the call (void~) gfx_init_chunky::$2 +Eliminating unused variable - keeping the call (void~) gfx_init_chunky::$5 +Eliminating unused variable - keeping the call (void~) gfx_init_chunky::$12 +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 +PROCEDURE MODIFY VARIABLE ANALYSIS + +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*) 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_COLORRAM_OFF#0 ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (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_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_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ) + (byte*) dtvSetCpuBankSegment1::cpuBank#0 ← ((byte*)) (byte/word/signed word/dword/signed dword) 255 + *((byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 + 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*) CHUNKY#0 ← ((byte*)) (word/dword/signed dword) 32768 + to:@3 +main: scope:[main] from @3 + asm { sei } + *((byte*) PROCPORT_DDR#0) ← (byte) PROCPORT_DDR_MEMORY_MASK#0 + *((byte*) PROCPORT#0) ← (byte) PROCPORT_RAM_IO#0 + call gfx_init_chunky 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_COLORRAM_OFF#0 + (byte~) main::$3 ← (byte~) main::$2 | (byte) DTV_CHUNKY#0 + (byte~) main::$4 ← (byte~) main::$3 | (byte) DTV_BADLINE_OFF#0 + *((byte*) DTV_CONTROL#0) ← (byte~) main::$4 + (byte~) main::$5 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$6 ← (byte~) main::$5 | (byte) VIC_RSEL#0 + (byte/word/dword~) main::$7 ← (byte~) main::$6 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL#0) ← (byte/word/dword~) main::$7 + (byte~) main::$8 ← (byte) VIC_MCM#0 | (byte) VIC_CSEL#0 + *((byte*) VIC_CONTROL2#0) ← (byte~) main::$8 + (byte~) main::$9 ← < (byte*) CHUNKY#0 + *((byte*) DTV_PLANEB_START_LO#0) ← (byte~) main::$9 + (byte~) main::$10 ← > (byte*) CHUNKY#0 + *((byte*) DTV_PLANEB_START_MI#0) ← (byte~) main::$10 + *((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) 8 + *((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::$11 ← ((word)) (byte*) CHUNKY#0 + (word/signed dword/dword~) main::$12 ← (word~) main::$11 / (word/signed word/dword/signed dword) 16384 + (byte~) main::$13 ← ((byte)) (word/signed dword/dword~) main::$12 + (byte/word/dword~) main::$14 ← (byte/signed byte/word/signed word/dword/signed dword) 3 ^ (byte~) main::$13 + *((byte*) CIA2_PORT_A#0) ← (byte/word/dword~) main::$14 + (word~) main::$15 ← ((word)) (byte*) CHUNKY#0 + (word~) main::$16 ← (word~) main::$15 & (word/signed word/dword/signed dword) 16383 + (word~) main::$17 ← (word~) main::$16 >> (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte~) main::$18 ← ((byte)) (word~) main::$17 + (word~) main::$19 ← ((word)) (byte*) CHUNKY#0 + (word~) main::$20 ← (word~) main::$19 & (word/signed word/dword/signed dword) 16383 + (byte~) main::$21 ← > (word~) main::$20 + (byte~) main::$22 ← (byte~) main::$21 >> (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte~) main::$23 ← (byte~) main::$18 | (byte~) main::$22 + *((byte*) VIC_MEMORY#0) ← (byte~) main::$23 + (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::$24 ← (byte) main::j#1 != (byte/signed byte/word/signed word/dword/signed dword) 16 + if((boolean~) main::$24) 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::$25 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$26 ← (byte~) main::$25 | (byte) VIC_RSEL#0 + (byte/word/dword~) main::$27 ← (byte~) main::$26 | (byte/signed byte/word/signed word/dword/signed dword) 3 + *((byte*) VIC_CONTROL#0) ← (byte/word/dword~) main::$27 + *((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::$28 ← *((byte*) RASTER#0) != (byte) main::rst#2 + if((boolean~) main::$28) 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::$29 ← (byte) VIC_DEN#0 | (byte) VIC_ECM#0 + (byte~) main::$30 ← (byte~) main::$29 | (byte) VIC_RSEL#0 + (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte~) main::$32 ← (byte~) main::$30 | (byte~) main::$31 + *((byte*) VIC_CONTROL#0) ← (byte~) main::$32 + (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 + *((byte*) BORDERCOL#0) ← (byte~) main::$33 + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + (boolean~) main::$34 ← (byte) main::rst#1 != (byte/word/signed word/dword/signed dword) 242 + if((boolean~) main::$34) goto main::@8 + to:main::@2 +main::@return: scope:[main] from main::@2 + return + to:@return +gfx_init_chunky: scope:[gfx_init_chunky] from main + (byte*~) gfx_init_chunky::$0 ← (byte*) CHUNKY#0 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$1 ← ((byte)) (byte*~) gfx_init_chunky::$0 + (byte) gfx_init_chunky::gfxbCpuBank#0 ← (byte~) gfx_init_chunky::$1 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#0 ← (byte) gfx_init_chunky::gfxbCpuBank#0 + call dtvSetCpuBankSegment1 param-assignment + to:gfx_init_chunky::@7 +gfx_init_chunky::@7: scope:[gfx_init_chunky] from gfx_init_chunky + (byte) gfx_init_chunky::gfxbCpuBank#3 ← phi( gfx_init_chunky/(byte) gfx_init_chunky::gfxbCpuBank#0 ) + (byte) gfx_init_chunky::gfxbCpuBank#1 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#3 + (byte*) gfx_init_chunky::gfxb#0 ← ((byte*)) (word/signed word/dword/signed dword) 16384 + (byte) gfx_init_chunky::y#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_chunky::@1 +gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky::@5 gfx_init_chunky::@7 + (byte) gfx_init_chunky::gfxbCpuBank#7 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::gfxbCpuBank#9 gfx_init_chunky::@7/(byte) gfx_init_chunky::gfxbCpuBank#1 ) + (byte) gfx_init_chunky::y#6 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::y#1 gfx_init_chunky::@7/(byte) gfx_init_chunky::y#0 ) + (byte*) gfx_init_chunky::gfxb#5 ← phi( gfx_init_chunky::@5/(byte*) gfx_init_chunky::gfxb#6 gfx_init_chunky::@7/(byte*) gfx_init_chunky::gfxb#0 ) + (word) gfx_init_chunky::x#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:gfx_init_chunky::@2 +gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3 + (byte) gfx_init_chunky::gfxbCpuBank#6 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 ) + (byte) gfx_init_chunky::y#4 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::y#6 gfx_init_chunky::@3/(byte) gfx_init_chunky::y#2 ) + (word) gfx_init_chunky::x#3 ← phi( gfx_init_chunky::@1/(word) gfx_init_chunky::x#0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 ) + (byte*) gfx_init_chunky::gfxb#3 ← phi( gfx_init_chunky::@1/(byte*) gfx_init_chunky::gfxb#5 gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 ) + (boolean~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb#3 == (word/dword/signed dword) 32768 + (boolean~) gfx_init_chunky::$4 ← ! (boolean~) gfx_init_chunky::$3 + if((boolean~) gfx_init_chunky::$4) goto gfx_init_chunky::@3 + to:gfx_init_chunky::@4 +gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@8 + (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#6 gfx_init_chunky::@8/(byte) gfx_init_chunky::gfxbCpuBank#2 ) + (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@8/(byte*) gfx_init_chunky::gfxb#2 ) + (byte) gfx_init_chunky::y#2 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::y#4 gfx_init_chunky::@8/(byte) gfx_init_chunky::y#5 ) + (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@2/(word) gfx_init_chunky::x#3 gfx_init_chunky::@8/(word) gfx_init_chunky::x#4 ) + (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#2 + (byte~) gfx_init_chunky::$7 ← ((byte)) (word~) gfx_init_chunky::$6 + (byte) gfx_init_chunky::c#0 ← (byte~) gfx_init_chunky::$7 + *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 + (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 + (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 + (boolean~) gfx_init_chunky::$8 ← (word) gfx_init_chunky::x#1 != (word/signed word/dword/signed dword) 320 + if((boolean~) gfx_init_chunky::$8) goto gfx_init_chunky::@2 + to:gfx_init_chunky::@5 +gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2 + (byte) gfx_init_chunky::y#7 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::y#4 ) + (word) gfx_init_chunky::x#5 ← phi( gfx_init_chunky::@2/(word) gfx_init_chunky::x#3 ) + (byte) gfx_init_chunky::gfxbCpuBank#4 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#6 ) + (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 + call dtvSetCpuBankSegment1 param-assignment + to:gfx_init_chunky::@8 +gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4 + (byte) gfx_init_chunky::y#5 ← phi( gfx_init_chunky::@4/(byte) gfx_init_chunky::y#7 ) + (word) gfx_init_chunky::x#4 ← phi( gfx_init_chunky::@4/(word) gfx_init_chunky::x#5 ) + (byte) gfx_init_chunky::gfxbCpuBank#5 ← phi( gfx_init_chunky::@4/(byte) gfx_init_chunky::gfxbCpuBank#4 ) + (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#5 + (byte*) gfx_init_chunky::gfxb#2 ← ((byte*)) (word/signed word/dword/signed dword) 16384 + to:gfx_init_chunky::@3 +gfx_init_chunky::@5: scope:[gfx_init_chunky] from gfx_init_chunky::@3 + (byte) gfx_init_chunky::gfxbCpuBank#9 ← phi( gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 ) + (byte*) gfx_init_chunky::gfxb#6 ← phi( gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 ) + (byte) gfx_init_chunky::y#3 ← phi( gfx_init_chunky::@3/(byte) gfx_init_chunky::y#2 ) + (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#3 + (boolean~) gfx_init_chunky::$9 ← (byte) gfx_init_chunky::y#1 != (byte/signed byte/word/signed word/dword/signed dword) 51 + if((boolean~) gfx_init_chunky::$9) goto gfx_init_chunky::@1 + to:gfx_init_chunky::@6 +gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 + (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 ← (word/signed word/dword/signed dword) 16384 / (word/signed word/dword/signed dword) 16384 + (byte~) gfx_init_chunky::$11 ← ((byte)) (byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 + (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← (byte~) gfx_init_chunky::$11 + call dtvSetCpuBankSegment1 param-assignment + to:gfx_init_chunky::@9 +gfx_init_chunky::@9: scope:[gfx_init_chunky] from gfx_init_chunky::@6 + to:gfx_init_chunky::@return +gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@9 + return + to:@return +@3: scope:[] from @1 + call main param-assignment + to:@4 +@4: scope:[] from @3 + to:@end +@end: scope:[] from @4 + +SYMBOL TABLE SSA +(label) @1 +(label) @3 +(label) @4 +(label) @begin +(label) @end +(byte*) BORDERCOL +(byte*) BORDERCOL#0 +(byte*) CHUNKY +(byte*) CHUNKY#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_COLORRAM_OFF +(byte) DTV_COLORRAM_OFF#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_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_IO +(byte) PROCPORT_RAM_IO#0 +(byte*) RASTER +(byte*) RASTER#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 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 +(void()) gfx_init_chunky() +(byte*~) gfx_init_chunky::$0 +(byte~) gfx_init_chunky::$1 +(byte/signed byte/word/signed word/dword/signed dword~) gfx_init_chunky::$10 +(byte~) gfx_init_chunky::$11 +(boolean~) gfx_init_chunky::$3 +(boolean~) gfx_init_chunky::$4 +(word~) gfx_init_chunky::$6 +(byte~) gfx_init_chunky::$7 +(boolean~) gfx_init_chunky::$8 +(boolean~) gfx_init_chunky::$9 +(label) gfx_init_chunky::@1 +(label) gfx_init_chunky::@2 +(label) gfx_init_chunky::@3 +(label) gfx_init_chunky::@4 +(label) gfx_init_chunky::@5 +(label) gfx_init_chunky::@6 +(label) gfx_init_chunky::@7 +(label) gfx_init_chunky::@8 +(label) gfx_init_chunky::@9 +(label) gfx_init_chunky::@return +(byte) gfx_init_chunky::c +(byte) gfx_init_chunky::c#0 +(byte*) gfx_init_chunky::gfxb +(byte*) gfx_init_chunky::gfxb#0 +(byte*) gfx_init_chunky::gfxb#1 +(byte*) gfx_init_chunky::gfxb#2 +(byte*) gfx_init_chunky::gfxb#3 +(byte*) gfx_init_chunky::gfxb#4 +(byte*) gfx_init_chunky::gfxb#5 +(byte*) gfx_init_chunky::gfxb#6 +(byte) gfx_init_chunky::gfxbCpuBank +(byte) gfx_init_chunky::gfxbCpuBank#0 +(byte) gfx_init_chunky::gfxbCpuBank#1 +(byte) gfx_init_chunky::gfxbCpuBank#2 +(byte) gfx_init_chunky::gfxbCpuBank#3 +(byte) gfx_init_chunky::gfxbCpuBank#4 +(byte) gfx_init_chunky::gfxbCpuBank#5 +(byte) gfx_init_chunky::gfxbCpuBank#6 +(byte) gfx_init_chunky::gfxbCpuBank#7 +(byte) gfx_init_chunky::gfxbCpuBank#8 +(byte) gfx_init_chunky::gfxbCpuBank#9 +(word) gfx_init_chunky::x +(word) gfx_init_chunky::x#0 +(word) gfx_init_chunky::x#1 +(word) gfx_init_chunky::x#2 +(word) gfx_init_chunky::x#3 +(word) gfx_init_chunky::x#4 +(word) gfx_init_chunky::x#5 +(byte) gfx_init_chunky::y +(byte) gfx_init_chunky::y#0 +(byte) gfx_init_chunky::y#1 +(byte) gfx_init_chunky::y#2 +(byte) gfx_init_chunky::y#3 +(byte) gfx_init_chunky::y#4 +(byte) gfx_init_chunky::y#5 +(byte) gfx_init_chunky::y#6 +(byte) gfx_init_chunky::y#7 +(void()) main() +(byte~) main::$1 +(byte~) main::$10 +(word~) main::$11 +(word/signed dword/dword~) main::$12 +(byte~) main::$13 +(byte/word/dword~) main::$14 +(word~) main::$15 +(word~) main::$16 +(word~) main::$17 +(byte~) main::$18 +(word~) main::$19 +(byte~) main::$2 +(word~) main::$20 +(byte~) main::$21 +(byte~) main::$22 +(byte~) main::$23 +(boolean~) main::$24 +(byte~) main::$25 +(byte~) main::$26 +(byte/word/dword~) main::$27 +(boolean~) main::$28 +(byte~) main::$29 +(byte~) main::$3 +(byte~) main::$30 +(byte~) main::$31 +(byte~) main::$32 +(byte~) main::$33 +(boolean~) main::$34 +(byte~) main::$4 +(byte~) main::$5 +(byte~) main::$6 +(byte/word/dword~) 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_chunky::@9 +Culled Empty Block (label) @4 +Succesful SSA optimization Pass2CullEmptyBlocks +Inversing boolean not (boolean~) gfx_init_chunky::$4 ← (byte*) gfx_init_chunky::gfxb#3 != (word/dword/signed dword) 32768 from (boolean~) gfx_init_chunky::$3 ← (byte*) gfx_init_chunky::gfxb#3 == (word/dword/signed dword) 32768 +Succesful SSA optimization Pass2UnaryNotSimplification +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::gfxbCpuBank#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::gfxbCpuBank#4 +Alias (byte) main::rst#2 = (byte) main::rst#3 +Alias (byte) gfx_init_chunky::gfxbCpuBank#0 = (byte~) gfx_init_chunky::$1 (byte) gfx_init_chunky::gfxbCpuBank#3 +Alias (byte) gfx_init_chunky::c#0 = (byte~) gfx_init_chunky::$7 +Alias (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#6 (byte) gfx_init_chunky::gfxbCpuBank#5 +Alias (word) gfx_init_chunky::x#3 = (word) gfx_init_chunky::x#5 (word) gfx_init_chunky::x#4 +Alias (byte) gfx_init_chunky::y#4 = (byte) gfx_init_chunky::y#7 (byte) gfx_init_chunky::y#5 +Alias (byte) gfx_init_chunky::y#2 = (byte) gfx_init_chunky::y#3 +Alias (byte*) gfx_init_chunky::gfxb#1 = (byte*) gfx_init_chunky::gfxb#6 +Alias (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#9 +Alias (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte~) gfx_init_chunky::$11 +Succesful SSA optimization Pass2AliasElimination +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::gfxbCpuBank#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::gfxbCpuBank#4 +Alias (word) gfx_init_chunky::x#2 = (word) gfx_init_chunky::x#3 +Alias (byte) gfx_init_chunky::y#2 = (byte) gfx_init_chunky::y#4 +Succesful SSA optimization Pass2AliasElimination +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_chunky::gfxbCpuBank#0 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::gfxbCpuBank#4 +Self Phi Eliminated (byte) main::rst#2 +Self Phi Eliminated (byte) gfx_init_chunky::y#2 +Succesful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte) main::rst#2 (byte) main::rst#0 +Redundant Phi (byte) gfx_init_chunky::y#2 (byte) gfx_init_chunky::y#6 +Succesful SSA optimization Pass2RedundantPhiElimination +Simple Condition (boolean~) main::$24 if((byte) main::j#1!=(byte/signed byte/word/signed word/dword/signed dword) 16) goto main::@1 +Simple Condition (boolean~) main::$28 if(*((byte*) RASTER#0)!=(byte) main::rst#0) goto main::@6 +Simple Condition (boolean~) main::$34 if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 +Simple Condition (boolean~) gfx_init_chunky::$4 if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 +Simple Condition (boolean~) gfx_init_chunky::$8 if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 +Simple Condition (boolean~) gfx_init_chunky::$9 if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@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*) 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_COLORRAM_OFF#0 = 16 +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_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*) CHUNKY#0 = ((byte*))32768 +Constant (const byte) main::j#0 = 0 +Constant (const byte) main::rst#0 = 66 +Constant (const byte*) gfx_init_chunky::gfxb#0 = ((byte*))16384 +Constant (const byte) gfx_init_chunky::y#0 = 0 +Constant (const word) gfx_init_chunky::x#0 = 0 +Constant (const byte*) gfx_init_chunky::gfxb#2 = ((byte*))16384 +Constant (const byte/signed byte/word/signed word/dword/signed dword) gfx_init_chunky::$10 = 16384/16384 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$1 = DTV_HIGHCOLOR#0|DTV_LINEAR#0 +Constant (const byte) main::$5 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte) main::$8 = VIC_MCM#0|VIC_CSEL#0 +Constant (const byte) main::$9 = CHUNKY#0 +Constant (const word) main::$11 = ((word))CHUNKY#0 +Constant (const word) main::$15 = ((word))CHUNKY#0 +Constant (const word) main::$19 = ((word))CHUNKY#0 +Constant (const byte) main::$25 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte) main::$29 = VIC_DEN#0|VIC_ECM#0 +Constant (const byte*) gfx_init_chunky::$0 = CHUNKY#0/16384 +Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = ((byte))gfx_init_chunky::$10 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$2 = main::$1|DTV_COLORRAM_OFF#0 +Constant (const byte) main::$6 = main::$5|VIC_RSEL#0 +Constant (const word/signed dword/dword) main::$12 = main::$11/16384 +Constant (const word) main::$16 = main::$15&16383 +Constant (const word) main::$20 = main::$19&16383 +Constant (const byte) main::$26 = main::$25|VIC_RSEL#0 +Constant (const byte) main::$30 = main::$29|VIC_RSEL#0 +Constant (const byte) gfx_init_chunky::gfxbCpuBank#0 = ((byte))gfx_init_chunky::$0 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$3 = main::$2|DTV_CHUNKY#0 +Constant (const byte/word/dword) main::$7 = main::$6|3 +Constant (const byte) main::$13 = ((byte))main::$12 +Constant (const word) main::$17 = main::$16>>6 +Constant (const byte) main::$21 = >main::$20 +Constant (const byte/word/dword) main::$27 = main::$26|3 +Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 = gfx_init_chunky::gfxbCpuBank#0 +Constant (const byte) gfx_init_chunky::gfxbCpuBank#1 = ++gfx_init_chunky::gfxbCpuBank#0 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$4 = main::$3|DTV_BADLINE_OFF#0 +Constant (const byte/word/dword) main::$14 = 3^main::$13 +Constant (const byte) main::$18 = ((byte))main::$17 +Constant (const byte) main::$22 = main::$21>>2 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$23 = main::$18|main::$22 +Succesful SSA optimization Pass2ConstantIdentification +Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2 +Culled Empty Block (label) @1 +Culled Empty Block (label) main::@6 +Culled Empty Block (label) gfx_init_chunky::@7 +Succesful SSA optimization Pass2CullEmptyBlocks +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::gfxbCpuBank#4 +Multiple usages for variable. Not optimizing sub-constant (byte) main::j#2 +Not aliassing across scopes: dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::gfxbCpuBank#4 +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#2 +Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#2 +Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 +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_chunky::gfxb#0 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#0 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#0 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::y#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::y#0 +Inlining constant with var siblings (const word) gfx_init_chunky::x#0 +Inlining constant with var siblings (const word) gfx_init_chunky::x#0 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#2 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#2 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#2 +Inlining constant with var siblings (const byte*) gfx_init_chunky::gfxb#2 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#0 +Inlining constant with different constant siblings (const byte) gfx_init_chunky::gfxbCpuBank#0 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#1 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#1 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#1 +Inlining constant with var siblings (const byte) gfx_init_chunky::gfxbCpuBank#1 +Inlining constant with different constant siblings (const byte) gfx_init_chunky::gfxbCpuBank#1 +Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#0 = ((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::rst#0 = (byte/signed byte/word/signed word/dword/signed dword) 66 +Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#2 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$12 = ((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$13 = ((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$14 = (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined gfx_init_chunky::y#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$15 = ((word))(const byte*) CHUNKY#0 +Constant inlined gfx_init_chunky::x#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$30 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$10 = >(const byte*) CHUNKY#0 +Constant inlined main::$11 = ((word))(const byte*) CHUNKY#0 +Constant inlined main::$16 = ((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$17 = ((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6 +Constant inlined main::$18 = ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6 +Constant inlined main::$19 = ((word))(const byte*) CHUNKY#0 +Constant inlined main::j#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$23 = ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined gfx_init_chunky::gfxbCpuBank#1 = ++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$25 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$26 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined gfx_init_chunky::gfxb#2 = ((byte*))(word/signed word/dword/signed dword) 16384 +Constant inlined main::$20 = ((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383 +Constant inlined gfx_init_chunky::gfxb#0 = ((byte*))(word/signed word/dword/signed dword) 16384 +Constant inlined main::$21 = >((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383 +Constant inlined main::$22 = >((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 +Constant inlined gfx_init_chunky::gfxbCpuBank#0 = ((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +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|(const byte) VIC_RSEL#0|(byte/signed byte/word/signed word/dword/signed dword) 3 +Constant inlined gfx_init_chunky::$10 = (word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$2 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_COLORRAM_OFF#0 +Constant inlined main::$29 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$5 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0 +Constant inlined main::$6 = (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 +Constant inlined main::$3 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0 +Constant inlined main::$4 = (const byte) DTV_HIGHCOLOR#0|(const byte) DTV_LINEAR#0|(const byte) DTV_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 +Constant inlined gfx_init_chunky::$0 = (const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 +Constant inlined main::$9 = <(const byte*) CHUNKY#0 +Constant inlined main::$7 = (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::$8 = (const byte) VIC_MCM#0|(const byte) VIC_CSEL#0 +Succesful SSA optimization Pass2ConstantInlining +Block Sequence Planned @begin @3 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 gfx_init_chunky::@4 gfx_init_chunky::@8 gfx_init_chunky::@3 gfx_init_chunky::@5 gfx_init_chunky::@6 gfx_init_chunky::@return dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return +Added new block during phi lifting main::@18(between main::@1 and main::@1) +Added new block during phi lifting gfx_init_chunky::@10(between gfx_init_chunky::@5 and gfx_init_chunky::@1) +Added new block during phi lifting gfx_init_chunky::@11(between gfx_init_chunky::@3 and gfx_init_chunky::@2) +Added new block during phi lifting gfx_init_chunky::@12(between gfx_init_chunky::@2 and gfx_init_chunky::@3) +Block Sequence Planned @begin @3 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 main::@18 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 gfx_init_chunky::@4 gfx_init_chunky::@8 gfx_init_chunky::@3 gfx_init_chunky::@5 gfx_init_chunky::@6 gfx_init_chunky::@return gfx_init_chunky::@10 gfx_init_chunky::@11 gfx_init_chunky::@12 dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @3 +Adding NOP phi() at start of @end +Adding NOP phi() at start of gfx_init_chunky +Adding NOP phi() at start of gfx_init_chunky::@6 +CALL GRAPH +Calls in [] to main:2 +Calls in [main] to gfx_init_chunky:7 +Calls in [gfx_init_chunky] to dtvSetCpuBankSegment1:42 dtvSetCpuBankSegment1:50 dtvSetCpuBankSegment1:63 + +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 10 initial phi equivalence classes +Coalesced [40] main::j#3 ← main::j#1 +Coalesced [44] gfx_init_chunky::gfxb#8 ← gfx_init_chunky::gfxb#5 +Coalesced [45] gfx_init_chunky::gfxbCpuBank#11 ← gfx_init_chunky::gfxbCpuBank#7 +Coalesced [49] dtvSetCpuBankSegment1::cpuBankIdx#4 ← dtvSetCpuBankSegment1::cpuBankIdx#1 +Coalesced [52] gfx_init_chunky::gfxbCpuBank#14 ← gfx_init_chunky::gfxbCpuBank#2 +Coalesced [65] gfx_init_chunky::gfxb#7 ← gfx_init_chunky::gfxb#1 +Coalesced [66] gfx_init_chunky::y#8 ← gfx_init_chunky::y#1 +Coalesced [67] gfx_init_chunky::gfxbCpuBank#10 ← gfx_init_chunky::gfxbCpuBank#8 +Coalesced (already) [68] gfx_init_chunky::gfxb#9 ← gfx_init_chunky::gfxb#1 +Coalesced [69] gfx_init_chunky::x#6 ← gfx_init_chunky::x#1 +Coalesced (already) [70] gfx_init_chunky::gfxbCpuBank#12 ← gfx_init_chunky::gfxbCpuBank#8 +Coalesced [71] gfx_init_chunky::gfxb#10 ← gfx_init_chunky::gfxb#3 +Coalesced (already) [72] gfx_init_chunky::gfxbCpuBank#13 ← gfx_init_chunky::gfxbCpuBank#4 +Coalesced down to 6 phi equivalence classes +Culled Empty Block (label) main::@18 +Culled Empty Block (label) gfx_init_chunky::@10 +Culled Empty Block (label) gfx_init_chunky::@11 +Culled Empty Block (label) gfx_init_chunky::@12 +Block Sequence Planned @begin @3 @end main main::@17 main::@1 main::@2 main::@return main::@3 main::@5 main::@7 main::@8 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 gfx_init_chunky::@4 gfx_init_chunky::@8 gfx_init_chunky::@3 gfx_init_chunky::@5 gfx_init_chunky::@6 gfx_init_chunky::@return dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @3 +Adding NOP phi() at start of @end +Adding NOP phi() at start of gfx_init_chunky +Adding NOP phi() at start of gfx_init_chunky::@6 +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:@3 +@3: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @3 + [3] phi() [ ] ( ) +main: scope:[main] from @3 + 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_chunky 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_COLORRAM_OFF#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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_PLANEB_START_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_PLANEB_MODULO_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_PLANEB_MODULO_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) CIA2_PORT_A_DDR#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3 [ ] ( main:2 [ ] ) + [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) + [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#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 + [21] (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 ] ) + [22] *((const byte*) DTV_PALETTE#0 + (byte) main::j#2) ← (byte) main::j#2 [ main::j#2 ] ( main:2 [ main::j#2 ] ) + [23] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) + [24] 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 + [25] if(true) goto main::@3 [ ] ( main:2 [ ] ) + to:main::@return +main::@return: scope:[main] from main::@2 + [26] 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 } + [28] *((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 [ ] ) + [29] *((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 + [30] 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 + [32] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) + [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) + [35] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$32 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) + [37] *((const byte*) BORDERCOL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) + asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop } + [39] if((byte) main::rst#1!=(byte/word/signed word/dword/signed dword) 242) goto main::@8 [ ] ( main:2 [ ] ) + to:main::@2 +gfx_init_chunky: scope:[gfx_init_chunky] from main + [40] phi() [ ] ( main:2::gfx_init_chunky:7 [ ] ) + [41] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:gfx_init_chunky::@1 +gfx_init_chunky::@1: scope:[gfx_init_chunky] from gfx_init_chunky gfx_init_chunky::@5 + [42] (byte) gfx_init_chunky::gfxbCpuBank#7 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky/++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + [42] (byte) gfx_init_chunky::y#6 ← phi( gfx_init_chunky::@5/(byte) gfx_init_chunky::y#1 gfx_init_chunky/(byte/signed byte/word/signed word/dword/signed dword) 0 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + [42] (byte*) gfx_init_chunky::gfxb#5 ← phi( gfx_init_chunky::@5/(byte*) gfx_init_chunky::gfxb#1 gfx_init_chunky/((byte*))(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#5 gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#7 ] ) + to:gfx_init_chunky::@2 +gfx_init_chunky::@2: scope:[gfx_init_chunky] from gfx_init_chunky::@1 gfx_init_chunky::@3 + [43] (byte) gfx_init_chunky::gfxbCpuBank#4 ← phi( gfx_init_chunky::@1/(byte) gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::@3/(byte) gfx_init_chunky::gfxbCpuBank#8 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [43] (word) gfx_init_chunky::x#2 ← phi( gfx_init_chunky::@1/(byte/signed byte/word/signed word/dword/signed dword) 0 gfx_init_chunky::@3/(word) gfx_init_chunky::x#1 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [43] (byte*) gfx_init_chunky::gfxb#3 ← phi( gfx_init_chunky::@1/(byte*) gfx_init_chunky::gfxb#5 gfx_init_chunky::@3/(byte*) gfx_init_chunky::gfxb#1 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + to:gfx_init_chunky::@4 +gfx_init_chunky::@4: scope:[gfx_init_chunky] from gfx_init_chunky::@2 + [45] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ) + [46] call dtvSetCpuBankSegment1 param-assignment [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + to:gfx_init_chunky::@8 +gfx_init_chunky::@8: scope:[gfx_init_chunky] from gfx_init_chunky::@4 + [47] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ) + to:gfx_init_chunky::@3 +gfx_init_chunky::@3: scope:[gfx_init_chunky] from gfx_init_chunky::@2 gfx_init_chunky::@8 + [48] (byte) gfx_init_chunky::gfxbCpuBank#8 ← phi( gfx_init_chunky::@2/(byte) gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::@8/(byte) gfx_init_chunky::gfxbCpuBank#2 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [48] (byte*) gfx_init_chunky::gfxb#4 ← phi( gfx_init_chunky::@2/(byte*) gfx_init_chunky::gfxb#3 gfx_init_chunky::@8/((byte*))(word/signed word/dword/signed dword) 16384 ) [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) + [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) + [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) + [52] (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ) + [53] (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) + [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) + to:gfx_init_chunky::@5 +gfx_init_chunky::@5: scope:[gfx_init_chunky] from gfx_init_chunky::@3 + [55] (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) + [56] if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@1 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) + to:gfx_init_chunky::@6 +gfx_init_chunky::@6: scope:[gfx_init_chunky] from gfx_init_chunky::@5 + [57] phi() [ ] ( main:2::gfx_init_chunky:7 [ ] ) + [58] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:gfx_init_chunky::@return +gfx_init_chunky::@return: scope:[gfx_init_chunky] from gfx_init_chunky::@6 + [59] return [ ] ( main:2::gfx_init_chunky:7 [ ] ) + to:@return +dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_chunky gfx_init_chunky::@4 gfx_init_chunky::@6 + [60] (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 ← phi( gfx_init_chunky/((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 gfx_init_chunky::@4/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 gfx_init_chunky::@6/((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 ) [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#3 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ dtvSetCpuBankSegment1::cpuBankIdx#3 ] ) + [61] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + asm { .byte$32,$dd lda$ff .byte$32,$00 } + to:dtvSetCpuBankSegment1::@return +dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1 + [63] return [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + to:@return + +DOMINATORS +@begin dominated by @begin +@3 dominated by @begin @3 +@end dominated by @begin @end @3 +main dominated by @begin main @3 +main::@17 dominated by @begin main::@17 main @3 +main::@1 dominated by @begin main::@17 main @3 main::@1 +main::@2 dominated by @begin main::@17 main @3 main::@1 main::@2 +main::@return dominated by main::@return @begin main::@17 main @3 main::@1 main::@2 +main::@3 dominated by @begin main::@17 main @3 main::@1 main::@2 main::@3 +main::@5 dominated by @begin main::@17 main @3 main::@1 main::@2 main::@5 main::@3 +main::@7 dominated by main::@7 @begin main::@17 main @3 main::@1 main::@2 main::@5 main::@3 +main::@8 dominated by main::@7 @begin main::@8 main::@17 main @3 main::@1 main::@2 main::@5 main::@3 +gfx_init_chunky dominated by @begin main @3 gfx_init_chunky +gfx_init_chunky::@1 dominated by @begin main @3 gfx_init_chunky gfx_init_chunky::@1 +gfx_init_chunky::@2 dominated by @begin main @3 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@4 dominated by @begin main @3 gfx_init_chunky::@4 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@8 dominated by @begin main @3 gfx_init_chunky::@4 gfx_init_chunky gfx_init_chunky::@8 gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@3 dominated by @begin main gfx_init_chunky::@3 @3 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@5 dominated by @begin main gfx_init_chunky::@5 gfx_init_chunky::@3 @3 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@6 dominated by @begin main gfx_init_chunky::@5 gfx_init_chunky::@6 gfx_init_chunky::@3 @3 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +gfx_init_chunky::@return dominated by @begin main gfx_init_chunky::@return gfx_init_chunky::@5 gfx_init_chunky::@6 gfx_init_chunky::@3 @3 gfx_init_chunky gfx_init_chunky::@1 gfx_init_chunky::@2 +dtvSetCpuBankSegment1 dominated by @begin dtvSetCpuBankSegment1 main @3 gfx_init_chunky +dtvSetCpuBankSegment1::@return dominated by @begin dtvSetCpuBankSegment1 dtvSetCpuBankSegment1::@return main @3 gfx_init_chunky + +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_chunky::@2 tails: gfx_init_chunky::@3 blocks: null +Found back edge: Loop head: gfx_init_chunky::@1 tails: gfx_init_chunky::@5 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_chunky::@2 tails: gfx_init_chunky::@3 blocks: gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@4 +Populated: Loop head: gfx_init_chunky::@1 tails: gfx_init_chunky::@5 blocks: gfx_init_chunky::@5 gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@1 gfx_init_chunky::@4 +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_chunky::@2 tails: gfx_init_chunky::@3 blocks: gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@4 +Loop head: gfx_init_chunky::@1 tails: gfx_init_chunky::@5 blocks: gfx_init_chunky::@5 gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@1 gfx_init_chunky::@4 + +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 2 loops in scope [gfx_init_chunky] + Loop head: gfx_init_chunky::@2 tails: gfx_init_chunky::@3 blocks: gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@4 + Loop head: gfx_init_chunky::@1 tails: gfx_init_chunky::@5 blocks: gfx_init_chunky::@5 gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@1 gfx_init_chunky::@4 +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_chunky::@2 tails: gfx_init_chunky::@3 blocks: gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@4 depth: 2 +Loop head: gfx_init_chunky::@1 tails: gfx_init_chunky::@5 blocks: gfx_init_chunky::@5 gfx_init_chunky::@3 gfx_init_chunky::@2 gfx_init_chunky::@8 gfx_init_chunky::@1 gfx_init_chunky::@4 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(byte*) BORDERCOL +(byte*) CHUNKY +(byte*) CIA2_PORT_A +(byte*) CIA2_PORT_A_DDR +(byte) DTV_BADLINE_OFF +(byte) DTV_CHUNKY +(byte) DTV_COLORRAM_OFF +(byte*) DTV_CONTROL +(byte*) DTV_FEATURE +(byte) DTV_FEATURE_ENABLE +(byte) DTV_HIGHCOLOR +(byte) DTV_LINEAR +(byte*) DTV_PALETTE +(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_IO +(byte*) RASTER +(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#1 202.0 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 103.0 +(void()) gfx_init_chunky() +(word~) gfx_init_chunky::$6 202.0 +(byte) gfx_init_chunky::c +(byte) gfx_init_chunky::c#0 202.0 +(byte*) gfx_init_chunky::gfxb +(byte*) gfx_init_chunky::gfxb#1 42.599999999999994 +(byte*) gfx_init_chunky::gfxb#3 157.0 +(byte*) gfx_init_chunky::gfxb#4 75.75 +(byte*) gfx_init_chunky::gfxb#5 22.0 +(byte) gfx_init_chunky::gfxbCpuBank +(byte) gfx_init_chunky::gfxbCpuBank#2 202.0 +(byte) gfx_init_chunky::gfxbCpuBank#4 103.75 +(byte) gfx_init_chunky::gfxbCpuBank#7 22.0 +(byte) gfx_init_chunky::gfxbCpuBank#8 34.888888888888886 +(word) gfx_init_chunky::x +(word) gfx_init_chunky::x#1 151.5 +(word) gfx_init_chunky::x#2 30.299999999999997 +(byte) gfx_init_chunky::y +(byte) gfx_init_chunky::y#1 16.5 +(byte) gfx_init_chunky::y#6 9.461538461538462 +(void()) main() +(byte~) main::$31 202.0 +(byte~) main::$32 202.0 +(byte~) main::$33 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_chunky::y#6 gfx_init_chunky::y#1 ] +[ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +[ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +[ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +[ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +Added variable main::rst#1 to zero page equivalence class [ main::rst#1 ] +Added variable main::$31 to zero page equivalence class [ main::$31 ] +Added variable main::$32 to zero page equivalence class [ main::$32 ] +Added variable main::$33 to zero page equivalence class [ main::$33 ] +Added variable gfx_init_chunky::$6 to zero page equivalence class [ gfx_init_chunky::$6 ] +Added variable gfx_init_chunky::c#0 to zero page equivalence class [ gfx_init_chunky::c#0 ] +Complete equivalence classes +[ main::j#2 main::j#1 ] +[ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +[ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +[ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +[ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +[ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +[ main::rst#1 ] +[ main::$31 ] +[ main::$32 ] +[ main::$33 ] +[ gfx_init_chunky::$6 ] +[ gfx_init_chunky::c#0 ] +Allocated zp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Allocated zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Allocated zp ZP_WORD:4 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +Allocated zp ZP_BYTE:6 [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +Allocated zp ZP_WORD:7 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +Allocated zp ZP_BYTE:9 [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +Allocated zp ZP_BYTE:10 [ main::rst#1 ] +Allocated zp ZP_BYTE:11 [ main::$31 ] +Allocated zp ZP_BYTE:12 [ main::$32 ] +Allocated zp ZP_BYTE:13 [ main::$33 ] +Allocated zp ZP_WORD:14 [ gfx_init_chunky::$6 ] +Allocated zp ZP_BYTE:16 [ gfx_init_chunky::c#0 ] + +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 + .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_COLORRAM_OFF = $10 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .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 CHUNKY = $8000 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @3 [phi:@begin->@3] +b3_from_bbegin: + jmp b3 +//SEG4 @3 +b3: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @3 to @end [phi:@3->@end] +bend_from_b3: + jmp bend +//SEG7 @end +bend: +//SEG8 main +main: { + .label _31 = $b + .label _32 = $c + .label _33 = $d + .label j = 2 + .label rst = $a + //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_chunky param-assignment [ ] ( main:2 [ ] ) + //SEG13 [40] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky] + gfx_init_chunky_from_main: + jsr gfx_init_chunky + 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_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_COLORRAM_OFF|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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHUNKY + sta DTV_PLANEB_START_MI + //SEG21 [14] *((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 + //SEG22 [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #8 + sta DTV_PLANEB_STEP + //SEG23 [16] *((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 + //SEG24 [17] *((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 + //SEG25 [18] *((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 + //SEG26 [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^CHUNKY/$4000 + sta CIA2_PORT_A + //SEG27 [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(CHUNKY&$3fff)>>6|(0)>>2 + sta VIC_MEMORY + //SEG28 [21] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + b1_from_b17: + //SEG29 [21] 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 + //SEG30 [21] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG31 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG32 main::@1 + b1: + //SEG33 [22] *((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 + //SEG34 [23] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuz1=_inc_vbuz1 + inc j + //SEG35 [24] 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 + //SEG36 main::@2 + b2: + //SEG37 [25] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + jmp b3 + jmp breturn + //SEG38 main::@return + breturn: + //SEG39 [26] return [ ] ( main:2 [ ] ) + rts + //SEG40 main::@3 + b3: + //SEG41 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 + //SEG42 [28] *((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 + //SEG43 [29] *((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 + //SEG44 main::@5 + b5: + //SEG45 [30] 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 + //SEG46 main::@7 + b7: + //SEG47 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 + //SEG48 main::@8 + b8: + //SEG49 [32] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuz1=_deref_pbuc1 + lda RASTER + sta rst + //SEG50 [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) -- vbuz1=vbuz2_band_vbuc1 + lda #7 + and rst + sta _31 + //SEG51 [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- vbuz1=vbuc1_bor_vbuz2 + lda #VIC_DEN|VIC_ECM|VIC_RSEL + ora _31 + sta _32 + //SEG52 [35] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$32 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _32 + sta VIC_CONTROL + //SEG53 [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuz1=vbuz2_rol_4 + lda rst + asl + asl + asl + asl + sta _33 + //SEG54 [37] *((const byte*) BORDERCOL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuz1 + lda _33 + sta BORDERCOL + //SEG55 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 + //SEG56 [39] 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 +} +//SEG57 gfx_init_chunky +gfx_init_chunky: { + .label _6 = $e + .label c = $10 + .label gfxb = 7 + .label x = 4 + .label gfxbCpuBank = 6 + .label y = 3 + //SEG58 [41] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG59 [60] phi from gfx_init_chunky to dtvSetCpuBankSegment1 [phi:gfx_init_chunky->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_gfx_init_chunky: + //SEG60 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + lda #$ff&CHUNKY/$4000 + sta dtvSetCpuBankSegment1.cpuBankIdx + jsr dtvSetCpuBankSegment1 + //SEG61 [42] phi from gfx_init_chunky to gfx_init_chunky::@1 [phi:gfx_init_chunky->gfx_init_chunky::@1] + b1_from_gfx_init_chunky: + //SEG62 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = ++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#0] -- vbuz1=vbuc1 + lda #($ff&CHUNKY/$4000)+1 + sta gfxbCpuBank + //SEG63 [42] phi (byte) gfx_init_chunky::y#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky->gfx_init_chunky::@1#1] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG64 [42] phi (byte*) gfx_init_chunky::gfxb#5 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#2] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + jmp b1 + //SEG65 [42] phi from gfx_init_chunky::@5 to gfx_init_chunky::@1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1] + b1_from_b5: + //SEG66 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#0] -- register_copy + //SEG67 [42] phi (byte) gfx_init_chunky::y#6 = (byte) gfx_init_chunky::y#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#1] -- register_copy + //SEG68 [42] phi (byte*) gfx_init_chunky::gfxb#5 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#2] -- register_copy + jmp b1 + //SEG69 gfx_init_chunky::@1 + b1: + //SEG70 [43] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2] + b2_from_b1: + //SEG71 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy + //SEG72 [43] phi (word) gfx_init_chunky::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1 + lda #<0 + sta x + lda #>0 + sta x+1 + //SEG73 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy + jmp b2 + //SEG74 [43] phi from gfx_init_chunky::@3 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2] + b2_from_b3: + //SEG75 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#0] -- register_copy + //SEG76 [43] phi (word) gfx_init_chunky::x#2 = (word) gfx_init_chunky::x#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#1] -- register_copy + //SEG77 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#2] -- register_copy + jmp b2 + //SEG78 gfx_init_chunky::@2 + b2: + //SEG79 [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) -- pbuz1_neq_vwuc1_then_la1 + lda gfxb+1 + cmp #>$8000 + bne b3_from_b2 + lda gfxb + cmp #<$8000 + bne b3_from_b2 + jmp b4 + //SEG80 gfx_init_chunky::@4 + b4: + //SEG81 [45] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ) -- vbuz1=vbuz2 + lda gfxbCpuBank + sta dtvSetCpuBankSegment1.cpuBankIdx + //SEG82 [46] call dtvSetCpuBankSegment1 param-assignment [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + //SEG83 [60] phi from gfx_init_chunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b4: + //SEG84 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + jsr dtvSetCpuBankSegment1 + jmp b8 + //SEG85 gfx_init_chunky::@8 + b8: + //SEG86 [47] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ) -- vbuz1=_inc_vbuz1 + inc gfxbCpuBank + //SEG87 [48] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3] + b3_from_b8: + //SEG88 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy + //SEG89 [48] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + jmp b3 + //SEG90 [48] phi from gfx_init_chunky::@2 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3] + b3_from_b2: + //SEG91 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#4 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#0] -- register_copy + //SEG92 [48] phi (byte*) gfx_init_chunky::gfxb#4 = (byte*) gfx_init_chunky::gfxb#3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#1] -- register_copy + jmp b3 + //SEG93 gfx_init_chunky::@3 + b3: + //SEG94 [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) -- vwuz1=vwuz2_plus_vbuz3 + lda y + clc + adc x + sta _6 + lda #0 + adc x+1 + sta _6+1 + //SEG95 [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) -- vbuz1=_byte_vwuz2 + lda _6 + sta c + //SEG96 [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) -- _deref_pbuz1=vbuz2 + lda c + ldy #0 + sta (gfxb),y + //SEG97 [52] (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxb + bne !+ + inc gfxb+1 + !: + //SEG98 [53] (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1=_inc_vwuz1 + inc x + bne !+ + inc x+1 + !: + //SEG99 [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1_neq_vwuc1_then_la1 + lda x+1 + cmp #>$140 + bne b2_from_b3 + lda x + cmp #<$140 + bne b2_from_b3 + jmp b5 + //SEG100 gfx_init_chunky::@5 + b5: + //SEG101 [55] (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1=_inc_vbuz1 + inc y + //SEG102 [56] if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@1 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda y + cmp #$33 + bne b1_from_b5 + //SEG103 [57] phi from gfx_init_chunky::@5 to gfx_init_chunky::@6 [phi:gfx_init_chunky::@5->gfx_init_chunky::@6] + b6_from_b5: + jmp b6 + //SEG104 gfx_init_chunky::@6 + b6: + //SEG105 [58] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG106 [60] phi from gfx_init_chunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b6: + //SEG107 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1 + lda #$4000/$4000 + sta dtvSetCpuBankSegment1.cpuBankIdx + jsr dtvSetCpuBankSegment1 + jmp breturn + //SEG108 gfx_init_chunky::@return + breturn: + //SEG109 [59] return [ ] ( main:2::gfx_init_chunky:7 [ ] ) + rts +} +//SEG110 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + .label cpuBankIdx = 9 + //SEG111 [61] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) -- _deref_pbuc1=vbuz1 + lda cpuBankIdx + sta cpuBank + //SEG112 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + jmp breturn + //SEG113 dtvSetCpuBankSegment1::@return + breturn: + //SEG114 [63] return [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + 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_COLORRAM_OFF#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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((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 [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((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 [17] *((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 [18] *((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 [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#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 [28] *((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 [29] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] 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 [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:10 [ main::rst#1 ] +Statement [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a +Statement [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Statement [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:6 [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +Statement [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) always clobbers reg byte a +Statement [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) always clobbers reg byte a +Statement [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) always clobbers reg byte y +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Removing always clobbered register reg byte y as potential for zp ZP_BYTE:6 [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +Statement [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) always clobbers reg byte a +Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a +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_COLORRAM_OFF#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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_PLANEB_START_MI#0) ← >(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((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 [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((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 [17] *((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 [18] *((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 [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#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 [28] *((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 [29] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] 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 [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) always clobbers reg byte a +Statement [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) always clobbers reg byte a +Statement [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) always clobbers reg byte a +Statement [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) always clobbers reg byte a +Statement [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) always clobbers reg byte a +Statement [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) always clobbers reg byte a +Statement [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) always clobbers reg byte y +Statement [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) always clobbers reg byte a +Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a +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_chunky::y#6 gfx_init_chunky::y#1 ] : zp ZP_BYTE:3 , reg byte x , +Potential registers zp ZP_WORD:4 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] : zp ZP_WORD:4 , +Potential registers zp ZP_BYTE:6 [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] : zp ZP_BYTE:6 , reg byte x , +Potential registers zp ZP_WORD:7 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] : zp ZP_WORD:7 , +Potential registers zp ZP_BYTE:9 [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] : zp ZP_BYTE:9 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:10 [ main::rst#1 ] : zp ZP_BYTE:10 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:11 [ main::$31 ] : zp ZP_BYTE:11 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:12 [ main::$32 ] : zp ZP_BYTE:12 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:13 [ main::$33 ] : zp ZP_BYTE:13 , reg byte a , reg byte x , reg byte y , +Potential registers zp ZP_WORD:14 [ gfx_init_chunky::$6 ] : zp ZP_WORD:14 , +Potential registers zp ZP_BYTE:16 [ gfx_init_chunky::c#0 ] : zp ZP_BYTE:16 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [gfx_init_chunky] 362.64: zp ZP_BYTE:6 [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] 297.35: zp ZP_WORD:7 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] 202: zp ZP_WORD:14 [ gfx_init_chunky::$6 ] 202: zp ZP_BYTE:16 [ gfx_init_chunky::c#0 ] 181.8: zp ZP_WORD:4 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] 25.96: zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Uplift Scope [main] 202: zp ZP_BYTE:11 [ main::$31 ] 202: zp ZP_BYTE:12 [ main::$32 ] 202: zp ZP_BYTE:13 [ main::$33 ] 57.71: zp ZP_BYTE:10 [ main::rst#1 ] 38.5: zp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Uplift Scope [dtvSetCpuBankSegment1] 305: zp ZP_BYTE:9 [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +Uplift Scope [] + +Uplifting [gfx_init_chunky] best 25316 combination reg byte x [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] zp ZP_WORD:7 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] zp ZP_WORD:14 [ gfx_init_chunky::$6 ] reg byte a [ gfx_init_chunky::c#0 ] zp ZP_WORD:4 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Uplifting [main] best 22716 combination reg byte a [ main::$31 ] reg byte a [ main::$32 ] reg byte a [ main::$33 ] 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 22607 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +Uplifting [] best 22607 combination +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::j#2 main::j#1 ] +Uplifting [main] best 22487 combination reg byte x [ main::j#2 main::j#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Uplifting [gfx_init_chunky] best 22487 combination zp ZP_BYTE:3 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Allocated (was zp ZP_BYTE:3) zp ZP_BYTE:2 [ gfx_init_chunky::y#6 gfx_init_chunky::y#1 ] +Allocated (was zp ZP_WORD:4) zp ZP_WORD:3 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +Allocated (was zp ZP_WORD:7) zp ZP_WORD:5 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +Allocated (was zp ZP_WORD:14) zp ZP_WORD:7 [ gfx_init_chunky::$6 ] + +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 + .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_COLORRAM_OFF = $10 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .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 CHUNKY = $8000 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @3 [phi:@begin->@3] +b3_from_bbegin: + jmp b3 +//SEG4 @3 +b3: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @3 to @end [phi:@3->@end] +bend_from_b3: + 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_chunky param-assignment [ ] ( main:2 [ ] ) + //SEG13 [40] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky] + gfx_init_chunky_from_main: + jsr gfx_init_chunky + 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_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_COLORRAM_OFF|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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHUNKY + sta DTV_PLANEB_START_MI + //SEG21 [14] *((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 + //SEG22 [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #8 + sta DTV_PLANEB_STEP + //SEG23 [16] *((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 + //SEG24 [17] *((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 + //SEG25 [18] *((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 + //SEG26 [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^CHUNKY/$4000 + sta CIA2_PORT_A + //SEG27 [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(CHUNKY&$3fff)>>6|(0)>>2 + sta VIC_MEMORY + //SEG28 [21] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + b1_from_b17: + //SEG29 [21] 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 + //SEG30 [21] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + b1_from_b1: + //SEG31 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + jmp b1 + //SEG32 main::@1 + b1: + //SEG33 [22] *((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 + //SEG34 [23] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG35 [24] 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 + //SEG36 main::@2 + b2: + //SEG37 [25] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + jmp b3 + jmp breturn + //SEG38 main::@return + breturn: + //SEG39 [26] return [ ] ( main:2 [ ] ) + rts + //SEG40 main::@3 + b3: + //SEG41 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 + //SEG42 [28] *((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 + //SEG43 [29] *((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 + //SEG44 main::@5 + b5: + //SEG45 [30] 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 + //SEG46 main::@7 + b7: + //SEG47 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 + //SEG48 main::@8 + b8: + //SEG49 [32] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuxx=_deref_pbuc1 + ldx RASTER + //SEG50 [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + //SEG51 [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- vbuaa=vbuc1_bor_vbuaa + ora #VIC_DEN|VIC_ECM|VIC_RSEL + //SEG52 [35] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$32 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta VIC_CONTROL + //SEG53 [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuaa=vbuxx_rol_4 + txa + asl + asl + asl + asl + //SEG54 [37] *((const byte*) BORDERCOL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta BORDERCOL + //SEG55 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 + //SEG56 [39] 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 +} +//SEG57 gfx_init_chunky +gfx_init_chunky: { + .label _6 = 7 + .label gfxb = 5 + .label x = 3 + .label y = 2 + //SEG58 [41] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG59 [60] phi from gfx_init_chunky to dtvSetCpuBankSegment1 [phi:gfx_init_chunky->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_gfx_init_chunky: + //SEG60 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$ff&CHUNKY/$4000 + jsr dtvSetCpuBankSegment1 + //SEG61 [42] phi from gfx_init_chunky to gfx_init_chunky::@1 [phi:gfx_init_chunky->gfx_init_chunky::@1] + b1_from_gfx_init_chunky: + //SEG62 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = ++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#0] -- vbuxx=vbuc1 + ldx #($ff&CHUNKY/$4000)+1 + //SEG63 [42] phi (byte) gfx_init_chunky::y#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky->gfx_init_chunky::@1#1] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG64 [42] phi (byte*) gfx_init_chunky::gfxb#5 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#2] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + jmp b1 + //SEG65 [42] phi from gfx_init_chunky::@5 to gfx_init_chunky::@1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1] + b1_from_b5: + //SEG66 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#0] -- register_copy + //SEG67 [42] phi (byte) gfx_init_chunky::y#6 = (byte) gfx_init_chunky::y#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#1] -- register_copy + //SEG68 [42] phi (byte*) gfx_init_chunky::gfxb#5 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#2] -- register_copy + jmp b1 + //SEG69 gfx_init_chunky::@1 + b1: + //SEG70 [43] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2] + b2_from_b1: + //SEG71 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy + //SEG72 [43] phi (word) gfx_init_chunky::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1 + lda #<0 + sta x + lda #>0 + sta x+1 + //SEG73 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy + jmp b2 + //SEG74 [43] phi from gfx_init_chunky::@3 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2] + b2_from_b3: + //SEG75 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#0] -- register_copy + //SEG76 [43] phi (word) gfx_init_chunky::x#2 = (word) gfx_init_chunky::x#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#1] -- register_copy + //SEG77 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#2] -- register_copy + jmp b2 + //SEG78 gfx_init_chunky::@2 + b2: + //SEG79 [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) -- pbuz1_neq_vwuc1_then_la1 + lda gfxb+1 + cmp #>$8000 + bne b3_from_b2 + lda gfxb + cmp #<$8000 + bne b3_from_b2 + jmp b4 + //SEG80 gfx_init_chunky::@4 + b4: + //SEG81 [45] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ) -- vbuaa=vbuxx + txa + //SEG82 [46] call dtvSetCpuBankSegment1 param-assignment [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + //SEG83 [60] phi from gfx_init_chunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b4: + //SEG84 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + jsr dtvSetCpuBankSegment1 + jmp b8 + //SEG85 gfx_init_chunky::@8 + b8: + //SEG86 [47] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG87 [48] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3] + b3_from_b8: + //SEG88 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy + //SEG89 [48] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + jmp b3 + //SEG90 [48] phi from gfx_init_chunky::@2 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3] + b3_from_b2: + //SEG91 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#4 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#0] -- register_copy + //SEG92 [48] phi (byte*) gfx_init_chunky::gfxb#4 = (byte*) gfx_init_chunky::gfxb#3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#1] -- register_copy + jmp b3 + //SEG93 gfx_init_chunky::@3 + b3: + //SEG94 [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) -- vwuz1=vwuz2_plus_vbuz3 + lda y + clc + adc x + sta _6 + lda #0 + adc x+1 + sta _6+1 + //SEG95 [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) -- vbuaa=_byte_vwuz1 + lda _6 + //SEG96 [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (gfxb),y + //SEG97 [52] (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxb + bne !+ + inc gfxb+1 + !: + //SEG98 [53] (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1=_inc_vwuz1 + inc x + bne !+ + inc x+1 + !: + //SEG99 [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1_neq_vwuc1_then_la1 + lda x+1 + cmp #>$140 + bne b2_from_b3 + lda x + cmp #<$140 + bne b2_from_b3 + jmp b5 + //SEG100 gfx_init_chunky::@5 + b5: + //SEG101 [55] (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1=_inc_vbuz1 + inc y + //SEG102 [56] if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@1 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda y + cmp #$33 + bne b1_from_b5 + //SEG103 [57] phi from gfx_init_chunky::@5 to gfx_init_chunky::@6 [phi:gfx_init_chunky::@5->gfx_init_chunky::@6] + b6_from_b5: + jmp b6 + //SEG104 gfx_init_chunky::@6 + b6: + //SEG105 [58] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG106 [60] phi from gfx_init_chunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1] + dtvSetCpuBankSegment1_from_b6: + //SEG107 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + jmp breturn + //SEG108 gfx_init_chunky::@return + breturn: + //SEG109 [59] return [ ] ( main:2::gfx_init_chunky:7 [ ] ) + rts +} +//SEG110 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + //SEG111 [61] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) -- _deref_pbuc1=vbuaa + sta cpuBank + //SEG112 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + jmp breturn + //SEG113 dtvSetCpuBankSegment1::@return + breturn: + //SEG114 [63] return [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + rts +} + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b3 +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 b2 +Removing instruction jmp b4 +Removing instruction jmp b8 +Removing instruction jmp b3 +Removing instruction jmp b5 +Removing instruction jmp b6 +Removing instruction jmp breturn +Removing instruction jmp breturn +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction lda #0 +Removing instruction lda #>0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b1_from_b1 with b1 +Replacing label b3_from_b2 with b3 +Replacing label b3_from_b2 with b3 +Replacing label b2_from_b3 with b2 +Replacing label b2_from_b3 with b2 +Replacing label b1_from_b5 with b1 +Removing instruction bbegin: +Removing instruction b3_from_bbegin: +Removing instruction bend_from_b3: +Removing instruction b1_from_b1: +Removing instruction b1_from_b5: +Removing instruction b2_from_b1: +Removing instruction b2_from_b3: +Removing instruction b3_from_b2: +Removing instruction b6_from_b5: +Removing instruction dtvSetCpuBankSegment1_from_b6: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction b3: +Removing instruction bend: +Removing instruction gfx_init_chunky_from_main: +Removing instruction b17: +Removing instruction b1_from_b17: +Removing instruction breturn: +Removing instruction b7: +Removing instruction dtvSetCpuBankSegment1_from_gfx_init_chunky: +Removing instruction b1_from_gfx_init_chunky: +Removing instruction b4: +Removing instruction dtvSetCpuBankSegment1_from_b4: +Removing instruction b8: +Removing instruction b3_from_b8: +Removing instruction b5: +Removing instruction b6: +Removing instruction breturn: +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 +Removing instruction jmp b1 +Removing instruction jmp b3 +Removing instruction jmp b1 +Removing instruction jmp b2 +Removing instruction jmp b3 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b2: +Succesful ASM optimization Pass5RedundantLabelElimination + +FINAL SYMBOL TABLE +(label) @3 +(label) @begin +(label) @end +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CHUNKY +(const byte*) CHUNKY#0 CHUNKY = ((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_COLORRAM_OFF +(const byte) DTV_COLORRAM_OFF#0 DTV_COLORRAM_OFF = (byte/signed byte/word/signed word/dword/signed dword) 16 +(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_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_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*) 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#1 reg byte a 202.0 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 103.0 +(void()) gfx_init_chunky() +(word~) gfx_init_chunky::$6 $6 zp ZP_WORD:7 202.0 +(label) gfx_init_chunky::@1 +(label) gfx_init_chunky::@2 +(label) gfx_init_chunky::@3 +(label) gfx_init_chunky::@4 +(label) gfx_init_chunky::@5 +(label) gfx_init_chunky::@6 +(label) gfx_init_chunky::@8 +(label) gfx_init_chunky::@return +(byte) gfx_init_chunky::c +(byte) gfx_init_chunky::c#0 reg byte a 202.0 +(byte*) gfx_init_chunky::gfxb +(byte*) gfx_init_chunky::gfxb#1 gfxb zp ZP_WORD:5 42.599999999999994 +(byte*) gfx_init_chunky::gfxb#3 gfxb zp ZP_WORD:5 157.0 +(byte*) gfx_init_chunky::gfxb#4 gfxb zp ZP_WORD:5 75.75 +(byte*) gfx_init_chunky::gfxb#5 gfxb zp ZP_WORD:5 22.0 +(byte) gfx_init_chunky::gfxbCpuBank +(byte) gfx_init_chunky::gfxbCpuBank#2 reg byte x 202.0 +(byte) gfx_init_chunky::gfxbCpuBank#4 reg byte x 103.75 +(byte) gfx_init_chunky::gfxbCpuBank#7 reg byte x 22.0 +(byte) gfx_init_chunky::gfxbCpuBank#8 reg byte x 34.888888888888886 +(word) gfx_init_chunky::x +(word) gfx_init_chunky::x#1 x zp ZP_WORD:3 151.5 +(word) gfx_init_chunky::x#2 x zp ZP_WORD:3 30.299999999999997 +(byte) gfx_init_chunky::y +(byte) gfx_init_chunky::y#1 y zp ZP_BYTE:2 16.5 +(byte) gfx_init_chunky::y#6 y zp ZP_BYTE:2 9.461538461538462 +(void()) main() +(byte~) main::$31 reg byte a 202.0 +(byte~) main::$32 reg byte a 202.0 +(byte~) main::$33 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_chunky::y#6 gfx_init_chunky::y#1 ] +zp ZP_WORD:3 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +reg byte x [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +zp ZP_WORD:5 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +reg byte x [ main::rst#1 ] +reg byte a [ main::$31 ] +reg byte a [ main::$32 ] +reg byte a [ main::$33 ] +zp ZP_WORD:7 [ gfx_init_chunky::$6 ] +reg byte a [ gfx_init_chunky::c#0 ] + + +FINAL ASSEMBLER +Score: 19888 + +//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 + .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_COLORRAM_OFF = $10 + .const DTV_BADLINE_OFF = $20 + .const DTV_CHUNKY = $40 + .label DTV_PALETTE = $d200 + .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 CHUNKY = $8000 +//SEG2 @begin +//SEG3 [1] phi from @begin to @3 [phi:@begin->@3] +//SEG4 @3 +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @3 to @end [phi:@3->@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_chunky param-assignment [ ] ( main:2 [ ] ) + //SEG13 [40] phi from main to gfx_init_chunky [phi:main->gfx_init_chunky] + jsr gfx_init_chunky + //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_COLORRAM_OFF#0|(const byte) DTV_CHUNKY#0|(const byte) DTV_BADLINE_OFF#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_COLORRAM_OFF|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_PLANEB_START_LO#0) ← <(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte*) CHUNKY#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>CHUNKY + sta DTV_PLANEB_START_MI + //SEG21 [14] *((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 + //SEG22 [15] *((const byte*) DTV_PLANEB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 8 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #8 + sta DTV_PLANEB_STEP + //SEG23 [16] *((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 + //SEG24 [17] *((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 + //SEG25 [18] *((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 + //SEG26 [19] *((const byte*) CIA2_PORT_A#0) ← (byte/signed byte/word/signed word/dword/signed dword) 3^((byte))((word))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #3^CHUNKY/$4000 + sta CIA2_PORT_A + //SEG27 [20] *((const byte*) VIC_MEMORY#0) ← ((byte))((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 6|>((word))(const byte*) CHUNKY#0&(word/signed word/dword/signed dword) 16383>>(byte/signed byte/word/signed word/dword/signed dword) 2 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(CHUNKY&$3fff)>>6|(0)>>2 + sta VIC_MEMORY + //SEG28 [21] phi from main::@17 to main::@1 [phi:main::@17->main::@1] + //SEG29 [21] 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 + //SEG30 [21] phi from main::@1 to main::@1 [phi:main::@1->main::@1] + //SEG31 [21] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy + //SEG32 main::@1 + b1: + //SEG33 [22] *((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 + //SEG34 [23] (byte) main::j#1 ← ++ (byte) main::j#2 [ main::j#1 ] ( main:2 [ main::j#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG35 [24] 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 + //SEG36 main::@2 + //SEG37 [25] if(true) goto main::@3 [ ] ( main:2 [ ] ) -- true_then_la1 + //SEG38 main::@return + //SEG39 [26] return [ ] ( main:2 [ ] ) + //SEG40 main::@3 + b3: + //SEG41 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 + //SEG42 [28] *((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 + //SEG43 [29] *((const byte*) BORDERCOL#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta BORDERCOL + //SEG44 main::@5 + b5: + //SEG45 [30] 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 + //SEG46 main::@7 + //SEG47 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 + //SEG48 main::@8 + b8: + //SEG49 [32] (byte) main::rst#1 ← *((const byte*) RASTER#0) [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- vbuxx=_deref_pbuc1 + ldx RASTER + //SEG50 [33] (byte~) main::$31 ← (byte) main::rst#1 & (byte/signed byte/word/signed word/dword/signed dword) 7 [ main::rst#1 main::$31 ] ( main:2 [ main::rst#1 main::$31 ] ) -- vbuaa=vbuxx_band_vbuc1 + txa + and #7 + //SEG51 [34] (byte~) main::$32 ← (const byte) VIC_DEN#0|(const byte) VIC_ECM#0|(const byte) VIC_RSEL#0 | (byte~) main::$31 [ main::rst#1 main::$32 ] ( main:2 [ main::rst#1 main::$32 ] ) -- vbuaa=vbuc1_bor_vbuaa + ora #VIC_DEN|VIC_ECM|VIC_RSEL + //SEG52 [35] *((const byte*) VIC_CONTROL#0) ← (byte~) main::$32 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta VIC_CONTROL + //SEG53 [36] (byte~) main::$33 ← (byte) main::rst#1 << (byte/signed byte/word/signed word/dword/signed dword) 4 [ main::rst#1 main::$33 ] ( main:2 [ main::rst#1 main::$33 ] ) -- vbuaa=vbuxx_rol_4 + txa + asl + asl + asl + asl + //SEG54 [37] *((const byte*) BORDERCOL#0) ← (byte~) main::$33 [ main::rst#1 ] ( main:2 [ main::rst#1 ] ) -- _deref_pbuc1=vbuaa + sta BORDERCOL + //SEG55 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 + //SEG56 [39] 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 +} +//SEG57 gfx_init_chunky +gfx_init_chunky: { + .label _6 = 7 + .label gfxb = 5 + .label x = 3 + .label y = 2 + //SEG58 [41] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG59 [60] phi from gfx_init_chunky to dtvSetCpuBankSegment1 [phi:gfx_init_chunky->dtvSetCpuBankSegment1] + //SEG60 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$ff&CHUNKY/$4000 + jsr dtvSetCpuBankSegment1 + //SEG61 [42] phi from gfx_init_chunky to gfx_init_chunky::@1 [phi:gfx_init_chunky->gfx_init_chunky::@1] + //SEG62 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = ++((byte))(const byte*) CHUNKY#0/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#0] -- vbuxx=vbuc1 + ldx #($ff&CHUNKY/$4000)+1 + //SEG63 [42] phi (byte) gfx_init_chunky::y#6 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky->gfx_init_chunky::@1#1] -- vbuz1=vbuc1 + lda #0 + sta y + //SEG64 [42] phi (byte*) gfx_init_chunky::gfxb#5 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky->gfx_init_chunky::@1#2] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + //SEG65 [42] phi from gfx_init_chunky::@5 to gfx_init_chunky::@1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1] + //SEG66 [42] phi (byte) gfx_init_chunky::gfxbCpuBank#7 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#0] -- register_copy + //SEG67 [42] phi (byte) gfx_init_chunky::y#6 = (byte) gfx_init_chunky::y#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#1] -- register_copy + //SEG68 [42] phi (byte*) gfx_init_chunky::gfxb#5 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@5->gfx_init_chunky::@1#2] -- register_copy + //SEG69 gfx_init_chunky::@1 + b1: + //SEG70 [43] phi from gfx_init_chunky::@1 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2] + //SEG71 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#7 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#0] -- register_copy + //SEG72 [43] phi (word) gfx_init_chunky::x#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#1] -- vwuz1=vbuc1 + lda #<0 + sta x + sta x+1 + //SEG73 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#5 [phi:gfx_init_chunky::@1->gfx_init_chunky::@2#2] -- register_copy + //SEG74 [43] phi from gfx_init_chunky::@3 to gfx_init_chunky::@2 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2] + //SEG75 [43] phi (byte) gfx_init_chunky::gfxbCpuBank#4 = (byte) gfx_init_chunky::gfxbCpuBank#8 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#0] -- register_copy + //SEG76 [43] phi (word) gfx_init_chunky::x#2 = (word) gfx_init_chunky::x#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#1] -- register_copy + //SEG77 [43] phi (byte*) gfx_init_chunky::gfxb#3 = (byte*) gfx_init_chunky::gfxb#1 [phi:gfx_init_chunky::@3->gfx_init_chunky::@2#2] -- register_copy + //SEG78 gfx_init_chunky::@2 + b2: + //SEG79 [44] if((byte*) gfx_init_chunky::gfxb#3!=(word/dword/signed dword) 32768) goto gfx_init_chunky::@3 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#3 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) -- pbuz1_neq_vwuc1_then_la1 + lda gfxb+1 + cmp #>$8000 + bne b3 + lda gfxb + cmp #<$8000 + bne b3 + //SEG80 gfx_init_chunky::@4 + //SEG81 [45] (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 dtvSetCpuBankSegment1::cpuBankIdx#1 ] ) -- vbuaa=vbuxx + txa + //SEG82 [46] call dtvSetCpuBankSegment1 param-assignment [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] ) + //SEG83 [60] phi from gfx_init_chunky::@4 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1] + //SEG84 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = (byte) dtvSetCpuBankSegment1::cpuBankIdx#1 [phi:gfx_init_chunky::@4->dtvSetCpuBankSegment1#0] -- register_copy + jsr dtvSetCpuBankSegment1 + //SEG85 gfx_init_chunky::@8 + //SEG86 [47] (byte) gfx_init_chunky::gfxbCpuBank#2 ← ++ (byte) gfx_init_chunky::gfxbCpuBank#4 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#2 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG87 [48] phi from gfx_init_chunky::@8 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3] + //SEG88 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#2 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#0] -- register_copy + //SEG89 [48] phi (byte*) gfx_init_chunky::gfxb#4 = ((byte*))(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@8->gfx_init_chunky::@3#1] -- pbuz1=pbuc1 + lda #<$4000 + sta gfxb + lda #>$4000 + sta gfxb+1 + //SEG90 [48] phi from gfx_init_chunky::@2 to gfx_init_chunky::@3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3] + //SEG91 [48] phi (byte) gfx_init_chunky::gfxbCpuBank#8 = (byte) gfx_init_chunky::gfxbCpuBank#4 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#0] -- register_copy + //SEG92 [48] phi (byte*) gfx_init_chunky::gfxb#4 = (byte*) gfx_init_chunky::gfxb#3 [phi:gfx_init_chunky::@2->gfx_init_chunky::@3#1] -- register_copy + //SEG93 gfx_init_chunky::@3 + b3: + //SEG94 [49] (word~) gfx_init_chunky::$6 ← (word) gfx_init_chunky::x#2 + (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::$6 ] ) -- vwuz1=vwuz2_plus_vbuz3 + lda y + clc + adc x + sta _6 + lda #0 + adc x+1 + sta _6+1 + //SEG95 [50] (byte) gfx_init_chunky::c#0 ← ((byte)) (word~) gfx_init_chunky::$6 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 gfx_init_chunky::c#0 ] ) -- vbuaa=_byte_vwuz1 + lda _6 + //SEG96 [51] *((byte*) gfx_init_chunky::gfxb#4) ← (byte) gfx_init_chunky::c#0 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 gfx_init_chunky::gfxb#4 ] ) -- _deref_pbuz1=vbuaa + ldy #0 + sta (gfxb),y + //SEG97 [52] (byte*) gfx_init_chunky::gfxb#1 ← ++ (byte*) gfx_init_chunky::gfxb#4 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#2 ] ) -- pbuz1=_inc_pbuz1 + inc gfxb + bne !+ + inc gfxb+1 + !: + //SEG98 [53] (word) gfx_init_chunky::x#1 ← ++ (word) gfx_init_chunky::x#2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1=_inc_vwuz1 + inc x + bne !+ + inc x+1 + !: + //SEG99 [54] if((word) gfx_init_chunky::x#1!=(word/signed word/dword/signed dword) 320) goto gfx_init_chunky::@2 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::y#6 gfx_init_chunky::gfxb#1 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::x#1 ] ) -- vwuz1_neq_vwuc1_then_la1 + lda x+1 + cmp #>$140 + bne b2 + lda x + cmp #<$140 + bne b2 + //SEG100 gfx_init_chunky::@5 + //SEG101 [55] (byte) gfx_init_chunky::y#1 ← ++ (byte) gfx_init_chunky::y#6 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1=_inc_vbuz1 + inc y + //SEG102 [56] if((byte) gfx_init_chunky::y#1!=(byte/signed byte/word/signed word/dword/signed dword) 51) goto gfx_init_chunky::@1 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ( main:2::gfx_init_chunky:7 [ gfx_init_chunky::gfxb#1 gfx_init_chunky::y#1 gfx_init_chunky::gfxbCpuBank#8 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda y + cmp #$33 + bne b1 + //SEG103 [57] phi from gfx_init_chunky::@5 to gfx_init_chunky::@6 [phi:gfx_init_chunky::@5->gfx_init_chunky::@6] + //SEG104 gfx_init_chunky::@6 + //SEG105 [58] call dtvSetCpuBankSegment1 param-assignment [ ] ( main:2::gfx_init_chunky:7 [ ] ) + //SEG106 [60] phi from gfx_init_chunky::@6 to dtvSetCpuBankSegment1 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1] + //SEG107 [60] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 = ((byte))(word/signed word/dword/signed dword) 16384/(word/signed word/dword/signed dword) 16384 [phi:gfx_init_chunky::@6->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1 + lda #$4000/$4000 + jsr dtvSetCpuBankSegment1 + //SEG108 gfx_init_chunky::@return + //SEG109 [59] return [ ] ( main:2::gfx_init_chunky:7 [ ] ) + rts +} +//SEG110 dtvSetCpuBankSegment1 +dtvSetCpuBankSegment1: { + .label cpuBank = $ff + //SEG111 [61] *((const byte*) dtvSetCpuBankSegment1::cpuBank#0) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#3 [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) -- _deref_pbuc1=vbuaa + sta cpuBank + //SEG112 asm { .byte$32,$dd lda$ff .byte$32,$00 } + .byte $32, $dd + lda $ff + .byte $32, $00 + //SEG113 dtvSetCpuBankSegment1::@return + //SEG114 [63] return [ ] ( main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:41 [ ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:46 [ gfx_init_chunky::y#6 gfx_init_chunky::x#2 gfx_init_chunky::gfxbCpuBank#4 ] main:2::gfx_init_chunky:7::dtvSetCpuBankSegment1:58 [ ] ) + rts +} + diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.sym b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.sym new file mode 100644 index 000000000..1b70c3f95 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-8bppchunkystretch.sym @@ -0,0 +1,132 @@ +(label) @3 +(label) @begin +(label) @end +(byte*) BORDERCOL +(const byte*) BORDERCOL#0 BORDERCOL = ((byte*))(word/dword/signed dword) 53280 +(byte*) CHUNKY +(const byte*) CHUNKY#0 CHUNKY = ((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_COLORRAM_OFF +(const byte) DTV_COLORRAM_OFF#0 DTV_COLORRAM_OFF = (byte/signed byte/word/signed word/dword/signed dword) 16 +(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_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_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*) 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#1 reg byte a 202.0 +(byte) dtvSetCpuBankSegment1::cpuBankIdx#3 reg byte a 103.0 +(void()) gfx_init_chunky() +(word~) gfx_init_chunky::$6 $6 zp ZP_WORD:7 202.0 +(label) gfx_init_chunky::@1 +(label) gfx_init_chunky::@2 +(label) gfx_init_chunky::@3 +(label) gfx_init_chunky::@4 +(label) gfx_init_chunky::@5 +(label) gfx_init_chunky::@6 +(label) gfx_init_chunky::@8 +(label) gfx_init_chunky::@return +(byte) gfx_init_chunky::c +(byte) gfx_init_chunky::c#0 reg byte a 202.0 +(byte*) gfx_init_chunky::gfxb +(byte*) gfx_init_chunky::gfxb#1 gfxb zp ZP_WORD:5 42.599999999999994 +(byte*) gfx_init_chunky::gfxb#3 gfxb zp ZP_WORD:5 157.0 +(byte*) gfx_init_chunky::gfxb#4 gfxb zp ZP_WORD:5 75.75 +(byte*) gfx_init_chunky::gfxb#5 gfxb zp ZP_WORD:5 22.0 +(byte) gfx_init_chunky::gfxbCpuBank +(byte) gfx_init_chunky::gfxbCpuBank#2 reg byte x 202.0 +(byte) gfx_init_chunky::gfxbCpuBank#4 reg byte x 103.75 +(byte) gfx_init_chunky::gfxbCpuBank#7 reg byte x 22.0 +(byte) gfx_init_chunky::gfxbCpuBank#8 reg byte x 34.888888888888886 +(word) gfx_init_chunky::x +(word) gfx_init_chunky::x#1 x zp ZP_WORD:3 151.5 +(word) gfx_init_chunky::x#2 x zp ZP_WORD:3 30.299999999999997 +(byte) gfx_init_chunky::y +(byte) gfx_init_chunky::y#1 y zp ZP_BYTE:2 16.5 +(byte) gfx_init_chunky::y#6 y zp ZP_BYTE:2 9.461538461538462 +(void()) main() +(byte~) main::$31 reg byte a 202.0 +(byte~) main::$32 reg byte a 202.0 +(byte~) main::$33 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_chunky::y#6 gfx_init_chunky::y#1 ] +zp ZP_WORD:3 [ gfx_init_chunky::x#2 gfx_init_chunky::x#1 ] +reg byte x [ gfx_init_chunky::gfxbCpuBank#4 gfx_init_chunky::gfxbCpuBank#7 gfx_init_chunky::gfxbCpuBank#8 gfx_init_chunky::gfxbCpuBank#2 ] +zp ZP_WORD:5 [ gfx_init_chunky::gfxb#4 gfx_init_chunky::gfxb#3 gfx_init_chunky::gfxb#5 gfx_init_chunky::gfxb#1 ] +reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +reg byte x [ main::rst#1 ] +reg byte a [ main::$31 ] +reg byte a [ main::$32 ] +reg byte a [ main::$33 ] +zp ZP_WORD:7 [ gfx_init_chunky::$6 ] +reg byte a [ gfx_init_chunky::c#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.asm b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.asm new file mode 100644 index 000000000..eefc87326 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.asm @@ -0,0 +1,118 @@ +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_BLITTER_SRCA_LO = $d320 + .label DTV_BLITTER_SRCA_MI = $d321 + .label DTV_BLITTER_SRCA_HI = $d322 + .label DTV_BLITTER_SRCA_MOD_LO = $d323 + .label DTV_BLITTER_SRCA_MOD_HI = $d324 + .label DTV_BLITTER_SRCA_LIN_LO = $d325 + .label DTV_BLITTER_SRCA_LIN_HI = $d326 + .label DTV_BLITTER_SRCA_STEP = $d327 + .label DTV_BLITTER_SRCB_LO = $d328 + .label DTV_BLITTER_SRCB_MI = $d329 + .label DTV_BLITTER_SRCB_HI = $d32a + .label DTV_BLITTER_SRCB_MOD_LO = $d32b + .label DTV_BLITTER_SRCB_MOD_HI = $d32c + .label DTV_BLITTER_SRCB_LIN_LO = $d32d + .label DTV_BLITTER_SRCB_LIN_HI = $d32e + .label DTV_BLITTER_SRCB_STEP = $d32f + .label DTV_BLITTER_DEST_LO = $d330 + .label DTV_BLITTER_DEST_MI = $d331 + .label DTV_BLITTER_DEST_HI = $d332 + .label DTV_BLITTER_DEST_MOD_LO = $d333 + .label DTV_BLITTER_DEST_MOD_HI = $d334 + .label DTV_BLITTER_DEST_LIN_LO = $d335 + .label DTV_BLITTER_DEST_LIN_HI = $d336 + .label DTV_BLITTER_DEST_STEP = $d337 + .label DTV_BLITTER_LEN_LO = $d338 + .label DTV_BLITTER_LEN_HI = $d339 + .label DTV_BLITTER_CONTROL = $d33a + .const DTV_BLIT_FORCE_START = 1 + .const DTV_BLIT_SRCA_FWD = 2 + .const DTV_BLIT_SRCB_FWD = 4 + .const DTV_BLIT_DEST_FWD = 8 + .label DTV_BLITTER_TRANSPARANCY = $d33b + .const DTV_BLIT_TRANSPARANCY_NONE = 0 + .label DTV_BLITTER_ALU = $d33e + .const DTV_BLIT_ADD = $30 + .label DTV_BLITTER_CONTROL2 = $d33f + .const DTV_BLIT_DEST_CONT = 8 + .const DTV_BLIT_STATUS_BUSY = 1 + .label SCREEN = $400 + .const SRCA_LEN = 9 + jsr main +main: { + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + lda #SRCA + sta DTV_BLITTER_SRCA_MI + lda #0 + sta DTV_BLITTER_SRCA_HI + sta DTV_BLITTER_SRCA_MOD_LO + sta DTV_BLITTER_SRCA_MOD_HI + lda #<$100 + sta DTV_BLITTER_SRCA_LIN_LO + lda #>$100 + sta DTV_BLITTER_SRCA_LIN_HI + lda #$10 + sta DTV_BLITTER_SRCA_STEP + lda #SRCB + sta DTV_BLITTER_SRCB_MI + lda #0 + sta DTV_BLITTER_SRCB_HI + sta DTV_BLITTER_SRCB_MOD_LO + sta DTV_BLITTER_SRCB_MOD_HI + lda #<$100 + sta DTV_BLITTER_SRCB_LIN_LO + lda #>$100 + sta DTV_BLITTER_SRCB_LIN_HI + lda #0 + sta DTV_BLITTER_SRCB_STEP + lda #SCREEN + sta DTV_BLITTER_DEST_MI + lda #0 + sta DTV_BLITTER_DEST_HI + sta DTV_BLITTER_DEST_MOD_LO + sta DTV_BLITTER_DEST_MOD_HI + lda #<$100 + sta DTV_BLITTER_DEST_LIN_LO + lda #>$100 + sta DTV_BLITTER_DEST_LIN_HI + lda #$10 + sta DTV_BLITTER_DEST_STEP + lda #SRCA_LEN + sta DTV_BLITTER_LEN_LO + lda #0 + sta DTV_BLITTER_LEN_HI + lda #DTV_BLIT_ADD + sta DTV_BLITTER_ALU + lda #DTV_BLIT_TRANSPARANCY_NONE + sta DTV_BLITTER_TRANSPARANCY + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + lda #DTV_BLIT_DEST_CONT + sta DTV_BLITTER_CONTROL2 + ldx #0 + b2: + lda DTV_BLITTER_CONTROL2 + and #DTV_BLIT_STATUS_BUSY + cmp #0 + bne b2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + inx + cpx #8 + bne b2 + rts +} + SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' + SRCB: .byte $80 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.cfg b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.cfg new file mode 100644 index 000000000..a2cd81ad8 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.cfg @@ -0,0 +1,55 @@ +@begin: scope:[] from + [0] phi() [ ] ( ) + to:@2 +@2: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @2 + [3] phi() [ ] ( ) +main: scope:[main] from @2 + [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) + [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) + [6] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) + [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [21] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [22] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) + [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) + [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) + [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) + [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) + [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@3 + [35] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::r#1 ) [ main::r#2 ] ( main:2 [ main::r#2 ] ) + [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) + [37] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 [ main::r#2 ] ( main:2 [ main::r#2 ] ) + to:main::@3 +main::@3: scope:[main] from main::@2 + [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) + [39] (byte) main::r#1 ← ++ (byte) main::r#2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) + [40] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) + to:main::@return +main::@return: scope:[main] from main::@3 + [41] return [ ] ( main:2 [ ] ) + to:@return diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.log new file mode 100644 index 000000000..75da680d2 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.log @@ -0,0 +1,2578 @@ +PARSING src/test/java/dk/camelot64/kickc/test/kc/c64dtv-blittermin.kc +import "c64dtv.kc" + +const byte* SCREEN = $400; +const byte[] SRCA = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' '}; +const byte SRCA_LEN = 9; +const byte[] SRCB = { $80 }; + +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_TRANSPARANCY = DTV_BLIT_TRANSPARANCY_NONE; + + // Start blitter + *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD; + // Instruct blitter to continue at DEST and restart SRC A/B + *DTV_BLITTER_CONTROL2 = DTV_BLIT_DEST_CONT; + + // Start a 8 more times when ready + for( byte r: 0..7 ) { + // wait til blitter is ready + do {} while((*DTV_BLITTER_CONTROL2 & DTV_BLIT_STATUS_BUSY)!=0); + // restart + *DTV_BLITTER_CONTROL = DTV_BLIT_FORCE_START | DTV_BLIT_SRCA_FWD | DTV_BLIT_SRCB_FWD| DTV_BLIT_DEST_FWD; + } + + +} +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 + } +} + +// 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 = %00000000; +// 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; + +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; + + +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*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) SCREEN ← (word/signed word/dword/signed dword) 1024 + (byte[]) SRCA ← { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' } + (byte) SRCA_LEN ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte[]) SRCB ← { (byte/word/signed word/dword/signed dword) 128 } +proc (void()) main() + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$0 ← < (byte[]) SRCA + *((byte*) DTV_BLITTER_SRCA_LO) ← (byte~) main::$0 + (byte~) main::$1 ← > (byte[]) SRCA + *((byte*) DTV_BLITTER_SRCA_MI) ← (byte~) main::$1 + *((byte*) DTV_BLITTER_SRCA_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$2 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword~) main::$3 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$3 + *((byte*) DTV_BLITTER_SRCA_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte~) main::$4 ← < (byte[]) SRCB + *((byte*) DTV_BLITTER_SRCB_LO) ← (byte~) main::$4 + (byte~) main::$5 ← > (byte[]) SRCB + *((byte*) DTV_BLITTER_SRCB_MI) ← (byte~) main::$5 + *((byte*) DTV_BLITTER_SRCB_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$6 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$6 + (byte/signed byte/word/signed word/dword/signed dword~) main::$7 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$7 + *((byte*) DTV_BLITTER_SRCB_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) main::$8 ← < (byte*) SCREEN + *((byte*) DTV_BLITTER_DEST_LO) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN + *((byte*) DTV_BLITTER_DEST_MI) ← (byte~) main::$9 + *((byte*) DTV_BLITTER_DEST_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$10 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$10 + (byte/signed byte/word/signed word/dword/signed dword~) main::$11 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$11 + *((byte*) DTV_BLITTER_DEST_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + *((byte*) DTV_BLITTER_LEN_LO) ← (byte) SRCA_LEN + *((byte*) DTV_BLITTER_LEN_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_ALU) ← (byte) DTV_BLIT_ADD + *((byte*) DTV_BLITTER_TRANSPARANCY) ← (byte) DTV_BLIT_TRANSPARANCY_NONE + (byte~) main::$12 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD + (byte~) main::$13 ← (byte~) main::$12 | (byte) DTV_BLIT_SRCB_FWD + (byte~) main::$14 ← (byte~) main::$13 | (byte) DTV_BLIT_DEST_FWD + *((byte*) DTV_BLITTER_CONTROL) ← (byte~) main::$14 + *((byte*) DTV_BLITTER_CONTROL2) ← (byte) DTV_BLIT_DEST_CONT + (byte) main::r ← (byte/signed byte/word/signed word/dword/signed dword) 0 +main::@1: +main::@2: + (byte~) main::$15 ← *((byte*) DTV_BLITTER_CONTROL2) & (byte) DTV_BLIT_STATUS_BUSY + (boolean~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) main::$16) goto main::@2 + (byte~) main::$17 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD + (byte~) main::$18 ← (byte~) main::$17 | (byte) DTV_BLIT_SRCB_FWD + (byte~) main::$19 ← (byte~) main::$18 | (byte) DTV_BLIT_DEST_FWD + *((byte*) DTV_BLITTER_CONTROL) ← (byte~) main::$19 + (byte) main::r ← ++ (byte) main::r + (boolean~) main::$20 ← (byte) main::r != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) main::$20) goto main::@1 +main::@return: + return +endproc // main() + call main + +SYMBOLS +(byte*) BGCOL +(byte*) BGCOL1 +(byte*) BGCOL2 +(byte*) BGCOL3 +(byte*) BGCOL4 +(byte) BLACK +(byte) BLUE +(byte*) BORDERCOL +(byte) BROWN +(byte*) CHARGEN +(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_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR +(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[]) SRCA +(byte) SRCA_LEN +(byte[]) SRCB +(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()) main() +(byte~) main::$0 +(byte~) main::$1 +(byte/signed byte/word/signed word/dword/signed dword~) main::$10 +(byte/signed byte/word/signed word/dword/signed dword~) main::$11 +(byte~) main::$12 +(byte~) main::$13 +(byte~) main::$14 +(byte~) main::$15 +(boolean~) main::$16 +(byte~) main::$17 +(byte~) main::$18 +(byte~) main::$19 +(byte/signed byte/word/signed word/dword/signed dword~) main::$2 +(boolean~) main::$20 +(byte/signed byte/word/signed word/dword/signed dword~) main::$3 +(byte~) main::$4 +(byte~) main::$5 +(byte/signed byte/word/signed word/dword/signed dword~) main::$6 +(byte/signed byte/word/signed word/dword/signed dword~) main::$7 +(byte~) main::$8 +(byte~) main::$9 +(label) main::@1 +(label) main::@2 +(label) main::@return +(byte) main::r + +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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 +Promoting word/signed word/dword/signed dword to byte* in SCREEN ← ((byte*)) 1024 +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*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte*) SCREEN ← ((byte*)) (word/signed word/dword/signed dword) 1024 + (byte[]) SRCA ← { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' } + (byte) SRCA_LEN ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte[]) SRCB ← { (byte/word/signed word/dword/signed dword) 128 } + to:@2 +main: scope:[main] from + *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE + (byte~) main::$0 ← < (byte[]) SRCA + *((byte*) DTV_BLITTER_SRCA_LO) ← (byte~) main::$0 + (byte~) main::$1 ← > (byte[]) SRCA + *((byte*) DTV_BLITTER_SRCA_MI) ← (byte~) main::$1 + *((byte*) DTV_BLITTER_SRCA_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$2 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword~) main::$3 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$3 + *((byte*) DTV_BLITTER_SRCA_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte~) main::$4 ← < (byte[]) SRCB + *((byte*) DTV_BLITTER_SRCB_LO) ← (byte~) main::$4 + (byte~) main::$5 ← > (byte[]) SRCB + *((byte*) DTV_BLITTER_SRCB_MI) ← (byte~) main::$5 + *((byte*) DTV_BLITTER_SRCB_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$6 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$6 + (byte/signed byte/word/signed word/dword/signed dword~) main::$7 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$7 + *((byte*) DTV_BLITTER_SRCB_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) main::$8 ← < (byte*) SCREEN + *((byte*) DTV_BLITTER_DEST_LO) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN + *((byte*) DTV_BLITTER_DEST_MI) ← (byte~) main::$9 + *((byte*) DTV_BLITTER_DEST_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_LO) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$10 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_LO) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$10 + (byte/signed byte/word/signed word/dword/signed dword~) main::$11 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_HI) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$11 + *((byte*) DTV_BLITTER_DEST_STEP) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + *((byte*) DTV_BLITTER_LEN_LO) ← (byte) SRCA_LEN + *((byte*) DTV_BLITTER_LEN_HI) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_ALU) ← (byte) DTV_BLIT_ADD + *((byte*) DTV_BLITTER_TRANSPARANCY) ← (byte) DTV_BLIT_TRANSPARANCY_NONE + (byte~) main::$12 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD + (byte~) main::$13 ← (byte~) main::$12 | (byte) DTV_BLIT_SRCB_FWD + (byte~) main::$14 ← (byte~) main::$13 | (byte) DTV_BLIT_DEST_FWD + *((byte*) DTV_BLITTER_CONTROL) ← (byte~) main::$14 + *((byte*) DTV_BLITTER_CONTROL2) ← (byte) DTV_BLIT_DEST_CONT + (byte) main::r ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@1 +main::@1: scope:[main] from main main::@3 + to:main::@2 +main::@2: scope:[main] from main::@1 main::@2 + (byte~) main::$15 ← *((byte*) DTV_BLITTER_CONTROL2) & (byte) DTV_BLIT_STATUS_BUSY + (boolean~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) main::$16) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte~) main::$17 ← (byte) DTV_BLIT_FORCE_START | (byte) DTV_BLIT_SRCA_FWD + (byte~) main::$18 ← (byte~) main::$17 | (byte) DTV_BLIT_SRCB_FWD + (byte~) main::$19 ← (byte~) main::$18 | (byte) DTV_BLIT_DEST_FWD + *((byte*) DTV_BLITTER_CONTROL) ← (byte~) main::$19 + (byte) main::r ← ++ (byte) main::r + (boolean~) main::$20 ← (byte) main::r != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) main::$20) goto main::@1 + to:main::@4 +main::@4: scope:[main] from main::@3 + to:main::@return +main::@return: scope:[main] from main::@4 + return + to:@return +@2: scope:[] from @1 + call main + to:@end +@end: scope:[] from @2 + +Removing unused procedure dtvSetCpuBankSegment1 +Eliminating unused variable (byte*) PROCPORT_DDR and assignment [0] (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) PROCPORT_DDR_MEMORY_MASK and assignment [1] (byte) PROCPORT_DDR_MEMORY_MASK ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte*) PROCPORT and assignment [2] (byte*) PROCPORT ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 1 +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_RAM_IO and assignment [4] (byte) PROCPORT_RAM_IO ← (byte/signed byte/word/signed word/dword/signed dword) 53 +Eliminating unused variable (byte) PROCPORT_RAM_CHARROM and assignment [5] (byte) PROCPORT_RAM_CHARROM ← (byte/signed byte/word/signed word/dword/signed dword) 49 +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*) CHARGEN and assignment [8] (byte*) CHARGEN ← ((byte*)) (word/dword/signed dword) 53248 +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*) RASTER and assignment [12] (byte*) RASTER ← ((byte*)) (word/dword/signed dword) 53266 +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*) BORDERCOL and assignment [18] (byte*) BORDERCOL ← ((byte*)) (word/dword/signed dword) 53280 +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*) VIC_CONTROL and assignment [27] (byte*) VIC_CONTROL ← ((byte*)) (word/dword/signed dword) 53265 +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_ECM and assignment [30] (byte) VIC_ECM ← (byte/signed byte/word/signed word/dword/signed dword) 64 +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) VIC_DEN and assignment [32] (byte) VIC_DEN ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) VIC_RSEL and assignment [33] (byte) VIC_RSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte*) VIC_CONTROL2 and assignment [34] (byte*) VIC_CONTROL2 ← ((byte*)) (word/dword/signed dword) 53270 +Eliminating unused variable (byte*) D016 and assignment [35] (byte*) D016 ← ((byte*)) (word/dword/signed dword) 53270 +Eliminating unused variable (byte) VIC_MCM and assignment [36] (byte) VIC_MCM ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) VIC_CSEL and assignment [37] (byte) VIC_CSEL ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte*) D018 and assignment [38] (byte*) D018 ← ((byte*)) (word/dword/signed dword) 53272 +Eliminating unused variable (byte*) VIC_MEMORY and assignment [39] (byte*) VIC_MEMORY ← ((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_A and assignment [45] (byte*) CIA2_PORT_A ← ((byte*)) (word/dword/signed dword) 56576 +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_A_DDR and assignment [47] (byte*) CIA2_PORT_A_DDR ← ((byte*)) (word/dword/signed dword) 56578 +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_CONTROL and assignment [68] (byte*) DTV_CONTROL ← ((byte*)) (word/dword/signed dword) 53308 +Eliminating unused variable (byte) DTV_LINEAR and assignment [69] (byte) DTV_LINEAR ← (byte/signed byte/word/signed word/dword/signed dword) 1 +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_HIGHCOLOR and assignment [71] (byte) DTV_HIGHCOLOR ← (byte/signed byte/word/signed word/dword/signed dword) 4 +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) DTV_BADLINE_OFF and assignment [74] (byte) DTV_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_CHUNKY and assignment [75] (byte) DTV_CHUNKY ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte*) DTV_PALETTE and assignment [76] (byte*) DTV_PALETTE ← ((byte*)) (word/dword/signed dword) 53760 +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_PLANEA_START_LO and assignment [78] (byte*) DTV_PLANEA_START_LO ← ((byte*)) (word/dword/signed dword) 53306 +Eliminating unused variable (byte*) DTV_PLANEA_START_MI and assignment [79] (byte*) DTV_PLANEA_START_MI ← ((byte*)) (word/dword/signed dword) 53307 +Eliminating unused variable (byte*) DTV_PLANEA_START_HI and assignment [80] (byte*) DTV_PLANEA_START_HI ← ((byte*)) (word/dword/signed dword) 53317 +Eliminating unused variable (byte*) DTV_PLANEA_STEP and assignment [81] (byte*) DTV_PLANEA_STEP ← ((byte*)) (word/dword/signed dword) 53318 +Eliminating unused variable (byte*) DTV_PLANEA_MODULO_LO and assignment [82] (byte*) DTV_PLANEA_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53304 +Eliminating unused variable (byte*) DTV_PLANEA_MODULO_HI and assignment [83] (byte*) DTV_PLANEA_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53305 +Eliminating unused variable (byte*) DTV_PLANEB_START_LO and assignment [84] (byte*) DTV_PLANEB_START_LO ← ((byte*)) (word/dword/signed dword) 53321 +Eliminating unused variable (byte*) DTV_PLANEB_START_MI and assignment [85] (byte*) DTV_PLANEB_START_MI ← ((byte*)) (word/dword/signed dword) 53322 +Eliminating unused variable (byte*) DTV_PLANEB_START_HI and assignment [86] (byte*) DTV_PLANEB_START_HI ← ((byte*)) (word/dword/signed dword) 53323 +Eliminating unused variable (byte*) DTV_PLANEB_STEP and assignment [87] (byte*) DTV_PLANEB_STEP ← ((byte*)) (word/dword/signed dword) 53324 +Eliminating unused variable (byte*) DTV_PLANEB_MODULO_LO and assignment [88] (byte*) DTV_PLANEB_MODULO_LO ← ((byte*)) (word/dword/signed dword) 53319 +Eliminating unused variable (byte*) DTV_PLANEB_MODULO_HI and assignment [89] (byte*) DTV_PLANEB_MODULO_HI ← ((byte*)) (word/dword/signed dword) 53320 +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 (byte) DTV_BLIT_VIC_IRQ and assignment [127] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [128] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [129] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [130] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [132] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [133] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [134] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [137] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [138] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [139] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [140] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [141] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [142] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [143] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [144] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [145] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [146] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [147] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [148] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [149] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [150] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [152] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [154] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [155] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [156] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [159] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Removing empty block main::@4 +PROCEDURE MODIFY VARIABLE ANALYSIS + +Completing Phi functions... +Completing Phi functions... +Completing Phi functions... + +CONTROL FLOW GRAPH SSA WITH ASSIGNMENT CALL & RETURN +@begin: scope:[] from + (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 + to:@1 +@1: scope:[] from @begin + (byte*) DTV_BLITTER_SRCA_LO#0 ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI#0 ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI#0 ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO#0 ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI#0 ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO#0 ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI#0 ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP#0 ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO#0 ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI#0 ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI#0 ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO#0 ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI#0 ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO#0 ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI#0 ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP#0 ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO#0 ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI#0 ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI#0 ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO#0 ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI#0 ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO#0 ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI#0 ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP#0 ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO#0 ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI#0 ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL#0 ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD#0 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD#0 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte*) DTV_BLITTER_TRANSPARANCY#0 ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_TRANSPARANCY_NONE#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU#0 ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_ADD#0 ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte*) DTV_BLITTER_CONTROL2#0 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_DEST_CONT#0 ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY#0 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte*) SCREEN#0 ← ((byte*)) (word/signed word/dword/signed dword) 1024 + (byte[]) SRCA#0 ← { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' } + (byte) SRCA_LEN#0 ← (byte/signed byte/word/signed word/dword/signed dword) 9 + (byte[]) SRCB#0 ← { (byte/word/signed word/dword/signed dword) 128 } + to:@2 +main: scope:[main] from @2 + (byte*) DTV_BLITTER_ALU#1 ← phi( @2/(byte*) DTV_BLITTER_ALU#2 ) + *((byte*) DTV_FEATURE#0) ← (byte) DTV_FEATURE_ENABLE#0 + (byte~) main::$0 ← < (byte[]) SRCA#0 + *((byte*) DTV_BLITTER_SRCA_LO#0) ← (byte~) main::$0 + (byte~) main::$1 ← > (byte[]) SRCA#0 + *((byte*) DTV_BLITTER_SRCA_MI#0) ← (byte~) main::$1 + *((byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$2 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$2 + (byte/signed byte/word/signed word/dword/signed dword~) main::$3 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$3 + *((byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte~) main::$4 ← < (byte[]) SRCB#0 + *((byte*) DTV_BLITTER_SRCB_LO#0) ← (byte~) main::$4 + (byte~) main::$5 ← > (byte[]) SRCB#0 + *((byte*) DTV_BLITTER_SRCB_MI#0) ← (byte~) main::$5 + *((byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$6 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$6 + (byte/signed byte/word/signed word/dword/signed dword~) main::$7 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$7 + *((byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte~) main::$8 ← < (byte*) SCREEN#0 + *((byte*) DTV_BLITTER_DEST_LO#0) ← (byte~) main::$8 + (byte~) main::$9 ← > (byte*) SCREEN#0 + *((byte*) DTV_BLITTER_DEST_MI#0) ← (byte~) main::$9 + *((byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte/signed byte/word/signed word/dword/signed dword~) main::$10 ← < (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$10 + (byte/signed byte/word/signed word/dword/signed dword~) main::$11 ← > (word/signed word/dword/signed dword) 256 + *((byte*) DTV_BLITTER_DEST_LIN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword~) main::$11 + *((byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 + *((byte*) DTV_BLITTER_LEN_LO#0) ← (byte) SRCA_LEN#0 + *((byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 + *((byte*) DTV_BLITTER_ALU#1) ← (byte) DTV_BLIT_ADD#0 + *((byte*) DTV_BLITTER_TRANSPARANCY#0) ← (byte) DTV_BLIT_TRANSPARANCY_NONE#0 + (byte~) main::$12 ← (byte) DTV_BLIT_FORCE_START#0 | (byte) DTV_BLIT_SRCA_FWD#0 + (byte~) main::$13 ← (byte~) main::$12 | (byte) DTV_BLIT_SRCB_FWD#0 + (byte~) main::$14 ← (byte~) main::$13 | (byte) DTV_BLIT_DEST_FWD#0 + *((byte*) DTV_BLITTER_CONTROL#0) ← (byte~) main::$14 + *((byte*) DTV_BLITTER_CONTROL2#0) ← (byte) DTV_BLIT_DEST_CONT#0 + (byte) main::r#0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + to:main::@2 +main::@1: scope:[main] from main::@3 + (byte) main::r#4 ← phi( main::@3/(byte) main::r#1 ) + to:main::@2 +main::@2: scope:[main] from main main::@1 main::@2 + (byte) main::r#3 ← phi( main/(byte) main::r#0 main::@1/(byte) main::r#4 main::@2/(byte) main::r#3 ) + (byte~) main::$15 ← *((byte*) DTV_BLITTER_CONTROL2#0) & (byte) DTV_BLIT_STATUS_BUSY#0 + (boolean~) main::$16 ← (byte~) main::$15 != (byte/signed byte/word/signed word/dword/signed dword) 0 + if((boolean~) main::$16) goto main::@2 + to:main::@3 +main::@3: scope:[main] from main::@2 + (byte) main::r#2 ← phi( main::@2/(byte) main::r#3 ) + (byte~) main::$17 ← (byte) DTV_BLIT_FORCE_START#0 | (byte) DTV_BLIT_SRCA_FWD#0 + (byte~) main::$18 ← (byte~) main::$17 | (byte) DTV_BLIT_SRCB_FWD#0 + (byte~) main::$19 ← (byte~) main::$18 | (byte) DTV_BLIT_DEST_FWD#0 + *((byte*) DTV_BLITTER_CONTROL#0) ← (byte~) main::$19 + (byte) main::r#1 ← ++ (byte) main::r#2 + (boolean~) main::$20 ← (byte) main::r#1 != (byte/signed byte/word/signed word/dword/signed dword) 8 + if((boolean~) main::$20) goto main::@1 + to:main::@return +main::@return: scope:[main] from main::@3 + return + to:@return +@2: scope:[] from @1 + (byte*) DTV_BLITTER_ALU#2 ← phi( @1/(byte*) DTV_BLITTER_ALU#0 ) + call main param-assignment + to:@3 +@3: scope:[] from @2 + to:@end +@end: scope:[] from @3 + +SYMBOL TABLE SSA +(label) @1 +(label) @2 +(label) @3 +(label) @begin +(label) @end +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_ALU#0 +(byte*) DTV_BLITTER_ALU#1 +(byte*) DTV_BLITTER_ALU#2 +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL#0 +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_CONTROL2#0 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_HI#0 +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_HI#0 +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LIN_LO#0 +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_LO#0 +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MI#0 +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_HI#0 +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_MOD_LO#0 +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_DEST_STEP#0 +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_HI#0 +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_LEN_LO#0 +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_HI#0 +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI#0 +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LIN_LO#0 +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_LO#0 +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MI#0 +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_HI#0 +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_MOD_LO#0 +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCA_STEP#0 +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_HI#0 +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI#0 +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LIN_LO#0 +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_LO#0 +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MI#0 +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_HI#0 +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_MOD_LO#0 +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_SRCB_STEP#0 +(byte*) DTV_BLITTER_TRANSPARANCY +(byte*) DTV_BLITTER_TRANSPARANCY#0 +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_ADD#0 +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_CONT#0 +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DEST_FWD#0 +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_FORCE_START#0 +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCA_FWD#0 +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_SRCB_FWD#0 +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_BUSY#0 +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_TRANSPARANCY_NONE#0 +(byte*) DTV_FEATURE +(byte*) DTV_FEATURE#0 +(byte) DTV_FEATURE_ENABLE +(byte) DTV_FEATURE_ENABLE#0 +(byte*) SCREEN +(byte*) SCREEN#0 +(byte[]) SRCA +(byte[]) SRCA#0 +(byte) SRCA_LEN +(byte) SRCA_LEN#0 +(byte[]) SRCB +(byte[]) SRCB#0 +(void()) main() +(byte~) main::$0 +(byte~) main::$1 +(byte/signed byte/word/signed word/dword/signed dword~) main::$10 +(byte/signed byte/word/signed word/dword/signed dword~) main::$11 +(byte~) main::$12 +(byte~) main::$13 +(byte~) main::$14 +(byte~) main::$15 +(boolean~) main::$16 +(byte~) main::$17 +(byte~) main::$18 +(byte~) main::$19 +(byte/signed byte/word/signed word/dword/signed dword~) main::$2 +(boolean~) main::$20 +(byte/signed byte/word/signed word/dword/signed dword~) main::$3 +(byte~) main::$4 +(byte~) main::$5 +(byte/signed byte/word/signed word/dword/signed dword~) main::$6 +(byte/signed byte/word/signed word/dword/signed dword~) main::$7 +(byte~) main::$8 +(byte~) main::$9 +(label) main::@1 +(label) main::@2 +(label) main::@3 +(label) main::@return +(byte) main::r +(byte) main::r#0 +(byte) main::r#1 +(byte) main::r#2 +(byte) main::r#3 +(byte) main::r#4 + +OPTIMIZING CONTROL FLOW GRAPH +Culled Empty Block (label) @3 +Succesful SSA optimization Pass2CullEmptyBlocks +Not aliassing across scopes: DTV_BLITTER_ALU#1 DTV_BLITTER_ALU#2 +Alias (byte) main::r#1 = (byte) main::r#4 +Alias (byte) main::r#2 = (byte) main::r#3 +Alias (byte*) DTV_BLITTER_ALU#0 = (byte*) DTV_BLITTER_ALU#2 +Succesful SSA optimization Pass2AliasElimination +Not aliassing across scopes: DTV_BLITTER_ALU#1 DTV_BLITTER_ALU#0 +Self Phi Eliminated (byte) main::r#2 +Succesful SSA optimization Pass2SelfPhiElimination +Redundant Phi (byte*) DTV_BLITTER_ALU#1 (byte*) DTV_BLITTER_ALU#0 +Succesful SSA optimization Pass2RedundantPhiElimination +Simple Condition (boolean~) main::$16 if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 +Simple Condition (boolean~) main::$20 if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@1 +Succesful SSA optimization Pass2ConditionalJumpSimplification +Constant (const byte*) DTV_FEATURE#0 = ((byte*))53311 +Constant (const byte) DTV_FEATURE_ENABLE#0 = 1 +Constant (const byte*) DTV_BLITTER_SRCA_LO#0 = ((byte*))54048 +Constant (const byte*) DTV_BLITTER_SRCA_MI#0 = ((byte*))54049 +Constant (const byte*) DTV_BLITTER_SRCA_HI#0 = ((byte*))54050 +Constant (const byte*) DTV_BLITTER_SRCA_MOD_LO#0 = ((byte*))54051 +Constant (const byte*) DTV_BLITTER_SRCA_MOD_HI#0 = ((byte*))54052 +Constant (const byte*) DTV_BLITTER_SRCA_LIN_LO#0 = ((byte*))54053 +Constant (const byte*) DTV_BLITTER_SRCA_LIN_HI#0 = ((byte*))54054 +Constant (const byte*) DTV_BLITTER_SRCA_STEP#0 = ((byte*))54055 +Constant (const byte*) DTV_BLITTER_SRCB_LO#0 = ((byte*))54056 +Constant (const byte*) DTV_BLITTER_SRCB_MI#0 = ((byte*))54057 +Constant (const byte*) DTV_BLITTER_SRCB_HI#0 = ((byte*))54058 +Constant (const byte*) DTV_BLITTER_SRCB_MOD_LO#0 = ((byte*))54059 +Constant (const byte*) DTV_BLITTER_SRCB_MOD_HI#0 = ((byte*))54060 +Constant (const byte*) DTV_BLITTER_SRCB_LIN_LO#0 = ((byte*))54061 +Constant (const byte*) DTV_BLITTER_SRCB_LIN_HI#0 = ((byte*))54062 +Constant (const byte*) DTV_BLITTER_SRCB_STEP#0 = ((byte*))54063 +Constant (const byte*) DTV_BLITTER_DEST_LO#0 = ((byte*))54064 +Constant (const byte*) DTV_BLITTER_DEST_MI#0 = ((byte*))54065 +Constant (const byte*) DTV_BLITTER_DEST_HI#0 = ((byte*))54066 +Constant (const byte*) DTV_BLITTER_DEST_MOD_LO#0 = ((byte*))54067 +Constant (const byte*) DTV_BLITTER_DEST_MOD_HI#0 = ((byte*))54068 +Constant (const byte*) DTV_BLITTER_DEST_LIN_LO#0 = ((byte*))54069 +Constant (const byte*) DTV_BLITTER_DEST_LIN_HI#0 = ((byte*))54070 +Constant (const byte*) DTV_BLITTER_DEST_STEP#0 = ((byte*))54071 +Constant (const byte*) DTV_BLITTER_LEN_LO#0 = ((byte*))54072 +Constant (const byte*) DTV_BLITTER_LEN_HI#0 = ((byte*))54073 +Constant (const byte*) DTV_BLITTER_CONTROL#0 = ((byte*))54074 +Constant (const byte) DTV_BLIT_FORCE_START#0 = 1 +Constant (const byte) DTV_BLIT_SRCA_FWD#0 = 2 +Constant (const byte) DTV_BLIT_SRCB_FWD#0 = 4 +Constant (const byte) DTV_BLIT_DEST_FWD#0 = 8 +Constant (const byte*) DTV_BLITTER_TRANSPARANCY#0 = ((byte*))54075 +Constant (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 = 0 +Constant (const byte*) DTV_BLITTER_ALU#0 = ((byte*))54078 +Constant (const byte) DTV_BLIT_ADD#0 = 48 +Constant (const byte*) DTV_BLITTER_CONTROL2#0 = ((byte*))54079 +Constant (const byte) DTV_BLIT_DEST_CONT#0 = 8 +Constant (const byte) DTV_BLIT_STATUS_BUSY#0 = 1 +Constant (const byte*) SCREEN#0 = ((byte*))1024 +Constant (const byte[]) SRCA#0 = { 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' } +Constant (const byte) SRCA_LEN#0 = 9 +Constant (const byte[]) SRCB#0 = { 128 } +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$2 = <256 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$3 = >256 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$6 = <256 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$7 = >256 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$10 = <256 +Constant (const byte/signed byte/word/signed word/dword/signed dword) main::$11 = >256 +Constant (const byte) main::r#0 = 0 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$0 = SRCA#0 +Constant (const byte) main::$4 = SRCB#0 +Constant (const byte) main::$8 = SCREEN#0 +Constant (const byte) main::$12 = DTV_BLIT_FORCE_START#0|DTV_BLIT_SRCA_FWD#0 +Constant (const byte) main::$17 = DTV_BLIT_FORCE_START#0|DTV_BLIT_SRCA_FWD#0 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$13 = main::$12|DTV_BLIT_SRCB_FWD#0 +Constant (const byte) main::$18 = main::$17|DTV_BLIT_SRCB_FWD#0 +Succesful SSA optimization Pass2ConstantIdentification +Constant (const byte) main::$14 = main::$13|DTV_BLIT_DEST_FWD#0 +Constant (const byte) main::$19 = main::$18|DTV_BLIT_DEST_FWD#0 +Succesful SSA optimization Pass2ConstantIdentification +Culled Empty Block (label) @1 +Culled Empty Block (label) main::@1 +Succesful SSA optimization Pass2CullEmptyBlocks +OPTIMIZING CONTROL FLOW GRAPH +Inlining constant with var siblings (const byte) main::r#0 +Inlining constant with var siblings (const byte) main::r#0 +Constant inlined main::r#0 = (byte/signed byte/word/signed word/dword/signed dword) 0 +Constant inlined main::$12 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0 +Constant inlined main::$13 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0 +Constant inlined main::$14 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 +Constant inlined main::$10 = <(word/signed word/dword/signed dword) 256 +Constant inlined main::$11 = >(word/signed word/dword/signed dword) 256 +Constant inlined main::$1 = >(const byte[]) SRCA#0 +Constant inlined main::$2 = <(word/signed word/dword/signed dword) 256 +Constant inlined main::$17 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0 +Constant inlined main::$18 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0 +Constant inlined main::$0 = <(const byte[]) SRCA#0 +Constant inlined main::$19 = (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 +Constant inlined main::$5 = >(const byte[]) SRCB#0 +Constant inlined main::$6 = <(word/signed word/dword/signed dword) 256 +Constant inlined main::$3 = >(word/signed word/dword/signed dword) 256 +Constant inlined main::$4 = <(const byte[]) SRCB#0 +Constant inlined main::$9 = >(const byte*) SCREEN#0 +Constant inlined main::$7 = >(word/signed word/dword/signed dword) 256 +Constant inlined main::$8 = <(const byte*) SCREEN#0 +Succesful SSA optimization Pass2ConstantInlining +Block Sequence Planned @begin @2 @end main main::@2 main::@3 main::@return +Added new block during phi lifting main::@5(between main::@3 and main::@2) +Block Sequence Planned @begin @2 @end main main::@2 main::@3 main::@return main::@5 +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +CALL GRAPH +Calls in [] to main:2 + +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Propagating live ranges... +Created 1 initial phi equivalence classes +Coalesced [42] main::r#5 ← main::r#1 +Coalesced down to 1 phi equivalence classes +Culled Empty Block (label) main::@5 +Block Sequence Planned @begin @2 @end main main::@2 main::@3 main::@return +Adding NOP phi() at start of @begin +Adding NOP phi() at start of @2 +Adding NOP phi() at start of @end +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:@2 +@2: scope:[] from @begin + [1] phi() [ ] ( ) + [2] call main param-assignment [ ] ( ) + to:@end +@end: scope:[] from @2 + [3] phi() [ ] ( ) +main: scope:[main] from @2 + [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) + [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) + [6] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) + [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) + [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) + [14] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) + [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [21] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [22] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) + [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) + [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) + [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) + [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) + [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) + [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) + [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) + [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) + to:main::@2 +main::@2: scope:[main] from main main::@2 main::@3 + [35] (byte) main::r#2 ← phi( main/(byte/signed byte/word/signed word/dword/signed dword) 0 main::@3/(byte) main::r#1 ) [ main::r#2 ] ( main:2 [ main::r#2 ] ) + [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) + [37] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 [ main::r#2 ] ( main:2 [ main::r#2 ] ) + to:main::@3 +main::@3: scope:[main] from main::@2 + [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) + [39] (byte) main::r#1 ← ++ (byte) main::r#2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) + [40] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) + to:main::@return +main::@return: scope:[main] from main::@3 + [41] return [ ] ( main:2 [ ] ) + to:@return + +DOMINATORS +@begin dominated by @begin +@2 dominated by @2 @begin +@end dominated by @2 @begin @end +main dominated by @2 @begin main +main::@2 dominated by @2 @begin main::@2 main +main::@3 dominated by @2 @begin main::@2 main main::@3 +main::@return dominated by main::@return @2 @begin main::@2 main main::@3 + +NATURAL LOOPS +Found back edge: Loop head: main::@2 tails: main::@2 blocks: null +Found back edge: Loop head: main::@2 tails: main::@3 blocks: null +Populated: Loop head: main::@2 tails: main::@2 blocks: main::@2 +Populated: Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 +Loop head: main::@2 tails: main::@2 blocks: main::@2 +Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 + +NATURAL LOOPS WITH DEPTH +Found 0 loops in scope [] +Found 2 loops in scope [main] + Loop head: main::@2 tails: main::@2 blocks: main::@2 + Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 +Loop head: main::@2 tails: main::@2 blocks: main::@2 depth: 2 +Loop head: main::@2 tails: main::@3 blocks: main::@3 main::@2 depth: 1 + + +VARIABLE REGISTER WEIGHTS +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte*) DTV_FEATURE +(byte) DTV_FEATURE_ENABLE +(byte*) SCREEN +(byte[]) SRCA +(byte) SRCA_LEN +(byte[]) SRCB +(void()) main() +(byte~) main::$15 202.0 +(byte) main::r +(byte) main::r#1 16.5 +(byte) main::r#2 5.5 + +Initial phi equivalence classes +[ main::r#2 main::r#1 ] +Added variable main::$15 to zero page equivalence class [ main::$15 ] +Complete equivalence classes +[ main::r#2 main::r#1 ] +[ main::$15 ] +Allocated zp ZP_BYTE:2 [ main::r#2 main::r#1 ] +Allocated zp ZP_BYTE:3 [ main::$15 ] + +INITIAL ASM +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_BLITTER_SRCA_LO = $d320 + .label DTV_BLITTER_SRCA_MI = $d321 + .label DTV_BLITTER_SRCA_HI = $d322 + .label DTV_BLITTER_SRCA_MOD_LO = $d323 + .label DTV_BLITTER_SRCA_MOD_HI = $d324 + .label DTV_BLITTER_SRCA_LIN_LO = $d325 + .label DTV_BLITTER_SRCA_LIN_HI = $d326 + .label DTV_BLITTER_SRCA_STEP = $d327 + .label DTV_BLITTER_SRCB_LO = $d328 + .label DTV_BLITTER_SRCB_MI = $d329 + .label DTV_BLITTER_SRCB_HI = $d32a + .label DTV_BLITTER_SRCB_MOD_LO = $d32b + .label DTV_BLITTER_SRCB_MOD_HI = $d32c + .label DTV_BLITTER_SRCB_LIN_LO = $d32d + .label DTV_BLITTER_SRCB_LIN_HI = $d32e + .label DTV_BLITTER_SRCB_STEP = $d32f + .label DTV_BLITTER_DEST_LO = $d330 + .label DTV_BLITTER_DEST_MI = $d331 + .label DTV_BLITTER_DEST_HI = $d332 + .label DTV_BLITTER_DEST_MOD_LO = $d333 + .label DTV_BLITTER_DEST_MOD_HI = $d334 + .label DTV_BLITTER_DEST_LIN_LO = $d335 + .label DTV_BLITTER_DEST_LIN_HI = $d336 + .label DTV_BLITTER_DEST_STEP = $d337 + .label DTV_BLITTER_LEN_LO = $d338 + .label DTV_BLITTER_LEN_HI = $d339 + .label DTV_BLITTER_CONTROL = $d33a + .const DTV_BLIT_FORCE_START = 1 + .const DTV_BLIT_SRCA_FWD = 2 + .const DTV_BLIT_SRCB_FWD = 4 + .const DTV_BLIT_DEST_FWD = 8 + .label DTV_BLITTER_TRANSPARANCY = $d33b + .const DTV_BLIT_TRANSPARANCY_NONE = 0 + .label DTV_BLITTER_ALU = $d33e + .const DTV_BLIT_ADD = $30 + .label DTV_BLITTER_CONTROL2 = $d33f + .const DTV_BLIT_DEST_CONT = 8 + .const DTV_BLIT_STATUS_BUSY = 1 + .label SCREEN = $400 + .const SRCA_LEN = 9 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @2 [phi:@begin->@2] +b2_from_bbegin: + jmp b2 +//SEG4 @2 +b2: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG7 @end +bend: +//SEG8 main +main: { + .label _15 = 3 + .label r = 2 + //SEG9 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG10 [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCA + sta DTV_BLITTER_SRCA_MI + //SEG12 [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_HI + //SEG13 [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_MOD_LO + //SEG14 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_MOD_HI + //SEG15 [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCA_LIN_LO + //SEG16 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCA_LIN_HI + //SEG17 [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_SRCA_STEP + //SEG18 [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCB + sta DTV_BLITTER_SRCB_MI + //SEG20 [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_HI + //SEG21 [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_MOD_LO + //SEG22 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_MOD_HI + //SEG23 [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCB_LIN_LO + //SEG24 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCB_LIN_HI + //SEG25 [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_STEP + //SEG26 [21] *((const byte*) DTV_BLITTER_DEST_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_BLITTER_DEST_MI + //SEG28 [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_HI + //SEG29 [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_MOD_LO + //SEG30 [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_MOD_HI + //SEG31 [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_DEST_LIN_LO + //SEG32 [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_DEST_LIN_HI + //SEG33 [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_DEST_STEP + //SEG34 [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #SRCA_LEN + sta DTV_BLITTER_LEN_LO + //SEG35 [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_LEN_HI + //SEG36 [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_ADD + sta DTV_BLITTER_ALU + //SEG37 [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_TRANSPARANCY_NONE + sta DTV_BLITTER_TRANSPARANCY + //SEG38 [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG39 [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_DEST_CONT + sta DTV_BLITTER_CONTROL2 + //SEG40 [35] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG41 [35] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuz1=vbuc1 + lda #0 + sta r + jmp b2 + //SEG42 [35] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG43 [35] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + b2_from_b3: + //SEG44 [35] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy + jmp b2 + //SEG45 main::@2 + b2: + //SEG46 [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) -- vbuz1=_deref_pbuc1_band_vbuc2 + lda DTV_BLITTER_CONTROL2 + and #DTV_BLIT_STATUS_BUSY + sta _15 + //SEG47 [37] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- vbuz1_neq_0_then_la1 + lda _15 + bne b2_from_b2 + jmp b3 + //SEG48 main::@3 + b3: + //SEG49 [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG50 [39] (byte) main::r#1 ← ++ (byte) main::r#2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuz1=_inc_vbuz1 + inc r + //SEG51 [40] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda r + cmp #8 + bne b2_from_b3 + jmp breturn + //SEG52 main::@return + breturn: + //SEG53 [41] return [ ] ( main:2 [ ] ) + rts +} + SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' + SRCB: .byte $80 + +REGISTER UPLIFT POTENTIAL REGISTERS +Statement [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [22] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp ZP_BYTE:2 [ main::r#2 main::r#1 ] +Statement [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) always clobbers reg byte a +Statement [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [6] *((const byte*) DTV_BLITTER_SRCA_MI#0) ← >(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [14] *((const byte*) DTV_BLITTER_SRCB_MI#0) ← >(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [21] *((const byte*) DTV_BLITTER_DEST_LO#0) ← <(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [22] *((const byte*) DTV_BLITTER_DEST_MI#0) ← >(const byte*) SCREEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) always clobbers reg byte a +Statement [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) always clobbers reg byte a +Statement [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) always clobbers reg byte a +Potential registers zp ZP_BYTE:2 [ main::r#2 main::r#1 ] : zp ZP_BYTE:2 , reg byte x , reg byte y , +Potential registers zp ZP_BYTE:3 [ main::$15 ] : zp ZP_BYTE:3 , reg byte a , reg byte x , reg byte y , + +REGISTER UPLIFT SCOPES +Uplift Scope [main] 202: zp ZP_BYTE:3 [ main::$15 ] 22: zp ZP_BYTE:2 [ main::r#2 main::r#1 ] +Uplift Scope [] + +Uplifting [main] best 2809 combination reg byte a [ main::$15 ] reg byte x [ main::r#2 main::r#1 ] +Uplifting [] best 2809 combination + +ASSEMBLER BEFORE OPTIMIZATION +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_BLITTER_SRCA_LO = $d320 + .label DTV_BLITTER_SRCA_MI = $d321 + .label DTV_BLITTER_SRCA_HI = $d322 + .label DTV_BLITTER_SRCA_MOD_LO = $d323 + .label DTV_BLITTER_SRCA_MOD_HI = $d324 + .label DTV_BLITTER_SRCA_LIN_LO = $d325 + .label DTV_BLITTER_SRCA_LIN_HI = $d326 + .label DTV_BLITTER_SRCA_STEP = $d327 + .label DTV_BLITTER_SRCB_LO = $d328 + .label DTV_BLITTER_SRCB_MI = $d329 + .label DTV_BLITTER_SRCB_HI = $d32a + .label DTV_BLITTER_SRCB_MOD_LO = $d32b + .label DTV_BLITTER_SRCB_MOD_HI = $d32c + .label DTV_BLITTER_SRCB_LIN_LO = $d32d + .label DTV_BLITTER_SRCB_LIN_HI = $d32e + .label DTV_BLITTER_SRCB_STEP = $d32f + .label DTV_BLITTER_DEST_LO = $d330 + .label DTV_BLITTER_DEST_MI = $d331 + .label DTV_BLITTER_DEST_HI = $d332 + .label DTV_BLITTER_DEST_MOD_LO = $d333 + .label DTV_BLITTER_DEST_MOD_HI = $d334 + .label DTV_BLITTER_DEST_LIN_LO = $d335 + .label DTV_BLITTER_DEST_LIN_HI = $d336 + .label DTV_BLITTER_DEST_STEP = $d337 + .label DTV_BLITTER_LEN_LO = $d338 + .label DTV_BLITTER_LEN_HI = $d339 + .label DTV_BLITTER_CONTROL = $d33a + .const DTV_BLIT_FORCE_START = 1 + .const DTV_BLIT_SRCA_FWD = 2 + .const DTV_BLIT_SRCB_FWD = 4 + .const DTV_BLIT_DEST_FWD = 8 + .label DTV_BLITTER_TRANSPARANCY = $d33b + .const DTV_BLIT_TRANSPARANCY_NONE = 0 + .label DTV_BLITTER_ALU = $d33e + .const DTV_BLIT_ADD = $30 + .label DTV_BLITTER_CONTROL2 = $d33f + .const DTV_BLIT_DEST_CONT = 8 + .const DTV_BLIT_STATUS_BUSY = 1 + .label SCREEN = $400 + .const SRCA_LEN = 9 +//SEG2 @begin +bbegin: +//SEG3 [1] phi from @begin to @2 [phi:@begin->@2] +b2_from_bbegin: + jmp b2 +//SEG4 @2 +b2: +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @2 to @end [phi:@2->@end] +bend_from_b2: + jmp bend +//SEG7 @end +bend: +//SEG8 main +main: { + //SEG9 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG10 [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCA + sta DTV_BLITTER_SRCA_MI + //SEG12 [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_HI + //SEG13 [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_MOD_LO + //SEG14 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_MOD_HI + //SEG15 [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCA_LIN_LO + //SEG16 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCA_LIN_HI + //SEG17 [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_SRCA_STEP + //SEG18 [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCB + sta DTV_BLITTER_SRCB_MI + //SEG20 [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_HI + //SEG21 [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_MOD_LO + //SEG22 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_MOD_HI + //SEG23 [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCB_LIN_LO + //SEG24 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCB_LIN_HI + //SEG25 [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_STEP + //SEG26 [21] *((const byte*) DTV_BLITTER_DEST_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_BLITTER_DEST_MI + //SEG28 [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_HI + //SEG29 [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_MOD_LO + //SEG30 [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_MOD_HI + //SEG31 [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_DEST_LIN_LO + //SEG32 [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_DEST_LIN_HI + //SEG33 [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_DEST_STEP + //SEG34 [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #SRCA_LEN + sta DTV_BLITTER_LEN_LO + //SEG35 [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_LEN_HI + //SEG36 [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_ADD + sta DTV_BLITTER_ALU + //SEG37 [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_TRANSPARANCY_NONE + sta DTV_BLITTER_TRANSPARANCY + //SEG38 [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG39 [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_DEST_CONT + sta DTV_BLITTER_CONTROL2 + //SEG40 [35] phi from main to main::@2 [phi:main->main::@2] + b2_from_main: + //SEG41 [35] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + jmp b2 + //SEG42 [35] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + b2_from_b2: + jmp b2 + //SEG43 [35] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + b2_from_b3: + //SEG44 [35] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy + jmp b2 + //SEG45 main::@2 + b2: + //SEG46 [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) -- vbuaa=_deref_pbuc1_band_vbuc2 + lda DTV_BLITTER_CONTROL2 + and #DTV_BLIT_STATUS_BUSY + //SEG47 [37] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- vbuaa_neq_0_then_la1 + cmp #0 + bne b2_from_b2 + jmp b3 + //SEG48 main::@3 + b3: + //SEG49 [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG50 [39] (byte) main::r#1 ← ++ (byte) main::r#2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG51 [40] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b2_from_b3 + jmp breturn + //SEG52 main::@return + breturn: + //SEG53 [41] return [ ] ( main:2 [ ] ) + rts +} + SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' + SRCB: .byte $80 + +ASSEMBLER OPTIMIZATIONS +Removing instruction jmp b2 +Removing instruction jmp bend +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 +Removing instruction lda #0 +Succesful ASM optimization Pass5UnnecesaryLoadElimination +Replacing label b2_from_b3 with b2 +Removing instruction bbegin: +Removing instruction b2_from_bbegin: +Removing instruction bend_from_b2: +Removing instruction b2_from_b3: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction b2: +Removing instruction bend: +Removing instruction b2_from_main: +Removing instruction b3: +Removing instruction breturn: +Succesful ASM optimization Pass5UnusedLabelElimination +Skipping double jump to b2 in bne b2_from_b2 +Succesful ASM optimization Pass5DoubleJumpElimination +Relabelling long label b2_from_b2 to b1 +Succesful ASM optimization Pass5RelabelLongLabels +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination +Removing instruction b1: +Succesful ASM optimization Pass5RedundantLabelElimination +Removing instruction jmp b2 +Succesful ASM optimization Pass5NextJumpElimination + +FINAL SYMBOL TABLE +(label) @2 +(label) @begin +(label) @end +(byte*) DTV_BLITTER_ALU +(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = ((byte*))(word/dword/signed dword) 54078 +(byte*) DTV_BLITTER_CONTROL +(const byte*) DTV_BLITTER_CONTROL#0 DTV_BLITTER_CONTROL = ((byte*))(word/dword/signed dword) 54074 +(byte*) DTV_BLITTER_CONTROL2 +(const byte*) DTV_BLITTER_CONTROL2#0 DTV_BLITTER_CONTROL2 = ((byte*))(word/dword/signed dword) 54079 +(byte*) DTV_BLITTER_DEST_HI +(const byte*) DTV_BLITTER_DEST_HI#0 DTV_BLITTER_DEST_HI = ((byte*))(word/dword/signed dword) 54066 +(byte*) DTV_BLITTER_DEST_LIN_HI +(const byte*) DTV_BLITTER_DEST_LIN_HI#0 DTV_BLITTER_DEST_LIN_HI = ((byte*))(word/dword/signed dword) 54070 +(byte*) DTV_BLITTER_DEST_LIN_LO +(const byte*) DTV_BLITTER_DEST_LIN_LO#0 DTV_BLITTER_DEST_LIN_LO = ((byte*))(word/dword/signed dword) 54069 +(byte*) DTV_BLITTER_DEST_LO +(const byte*) DTV_BLITTER_DEST_LO#0 DTV_BLITTER_DEST_LO = ((byte*))(word/dword/signed dword) 54064 +(byte*) DTV_BLITTER_DEST_MI +(const byte*) DTV_BLITTER_DEST_MI#0 DTV_BLITTER_DEST_MI = ((byte*))(word/dword/signed dword) 54065 +(byte*) DTV_BLITTER_DEST_MOD_HI +(const byte*) DTV_BLITTER_DEST_MOD_HI#0 DTV_BLITTER_DEST_MOD_HI = ((byte*))(word/dword/signed dword) 54068 +(byte*) DTV_BLITTER_DEST_MOD_LO +(const byte*) DTV_BLITTER_DEST_MOD_LO#0 DTV_BLITTER_DEST_MOD_LO = ((byte*))(word/dword/signed dword) 54067 +(byte*) DTV_BLITTER_DEST_STEP +(const byte*) DTV_BLITTER_DEST_STEP#0 DTV_BLITTER_DEST_STEP = ((byte*))(word/dword/signed dword) 54071 +(byte*) DTV_BLITTER_LEN_HI +(const byte*) DTV_BLITTER_LEN_HI#0 DTV_BLITTER_LEN_HI = ((byte*))(word/dword/signed dword) 54073 +(byte*) DTV_BLITTER_LEN_LO +(const byte*) DTV_BLITTER_LEN_LO#0 DTV_BLITTER_LEN_LO = ((byte*))(word/dword/signed dword) 54072 +(byte*) DTV_BLITTER_SRCA_HI +(const byte*) DTV_BLITTER_SRCA_HI#0 DTV_BLITTER_SRCA_HI = ((byte*))(word/dword/signed dword) 54050 +(byte*) DTV_BLITTER_SRCA_LIN_HI +(const byte*) DTV_BLITTER_SRCA_LIN_HI#0 DTV_BLITTER_SRCA_LIN_HI = ((byte*))(word/dword/signed dword) 54054 +(byte*) DTV_BLITTER_SRCA_LIN_LO +(const byte*) DTV_BLITTER_SRCA_LIN_LO#0 DTV_BLITTER_SRCA_LIN_LO = ((byte*))(word/dword/signed dword) 54053 +(byte*) DTV_BLITTER_SRCA_LO +(const byte*) DTV_BLITTER_SRCA_LO#0 DTV_BLITTER_SRCA_LO = ((byte*))(word/dword/signed dword) 54048 +(byte*) DTV_BLITTER_SRCA_MI +(const byte*) DTV_BLITTER_SRCA_MI#0 DTV_BLITTER_SRCA_MI = ((byte*))(word/dword/signed dword) 54049 +(byte*) DTV_BLITTER_SRCA_MOD_HI +(const byte*) DTV_BLITTER_SRCA_MOD_HI#0 DTV_BLITTER_SRCA_MOD_HI = ((byte*))(word/dword/signed dword) 54052 +(byte*) DTV_BLITTER_SRCA_MOD_LO +(const byte*) DTV_BLITTER_SRCA_MOD_LO#0 DTV_BLITTER_SRCA_MOD_LO = ((byte*))(word/dword/signed dword) 54051 +(byte*) DTV_BLITTER_SRCA_STEP +(const byte*) DTV_BLITTER_SRCA_STEP#0 DTV_BLITTER_SRCA_STEP = ((byte*))(word/dword/signed dword) 54055 +(byte*) DTV_BLITTER_SRCB_HI +(const byte*) DTV_BLITTER_SRCB_HI#0 DTV_BLITTER_SRCB_HI = ((byte*))(word/dword/signed dword) 54058 +(byte*) DTV_BLITTER_SRCB_LIN_HI +(const byte*) DTV_BLITTER_SRCB_LIN_HI#0 DTV_BLITTER_SRCB_LIN_HI = ((byte*))(word/dword/signed dword) 54062 +(byte*) DTV_BLITTER_SRCB_LIN_LO +(const byte*) DTV_BLITTER_SRCB_LIN_LO#0 DTV_BLITTER_SRCB_LIN_LO = ((byte*))(word/dword/signed dword) 54061 +(byte*) DTV_BLITTER_SRCB_LO +(const byte*) DTV_BLITTER_SRCB_LO#0 DTV_BLITTER_SRCB_LO = ((byte*))(word/dword/signed dword) 54056 +(byte*) DTV_BLITTER_SRCB_MI +(const byte*) DTV_BLITTER_SRCB_MI#0 DTV_BLITTER_SRCB_MI = ((byte*))(word/dword/signed dword) 54057 +(byte*) DTV_BLITTER_SRCB_MOD_HI +(const byte*) DTV_BLITTER_SRCB_MOD_HI#0 DTV_BLITTER_SRCB_MOD_HI = ((byte*))(word/dword/signed dword) 54060 +(byte*) DTV_BLITTER_SRCB_MOD_LO +(const byte*) DTV_BLITTER_SRCB_MOD_LO#0 DTV_BLITTER_SRCB_MOD_LO = ((byte*))(word/dword/signed dword) 54059 +(byte*) DTV_BLITTER_SRCB_STEP +(const byte*) DTV_BLITTER_SRCB_STEP#0 DTV_BLITTER_SRCB_STEP = ((byte*))(word/dword/signed dword) 54063 +(byte*) DTV_BLITTER_TRANSPARANCY +(const byte*) DTV_BLITTER_TRANSPARANCY#0 DTV_BLITTER_TRANSPARANCY = ((byte*))(word/dword/signed dword) 54075 +(byte) DTV_BLIT_ADD +(const byte) DTV_BLIT_ADD#0 DTV_BLIT_ADD = (byte/signed byte/word/signed word/dword/signed dword) 48 +(byte) DTV_BLIT_DEST_CONT +(const byte) DTV_BLIT_DEST_CONT#0 DTV_BLIT_DEST_CONT = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) DTV_BLIT_DEST_FWD +(const byte) DTV_BLIT_DEST_FWD#0 DTV_BLIT_DEST_FWD = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) DTV_BLIT_FORCE_START +(const byte) DTV_BLIT_FORCE_START#0 DTV_BLIT_FORCE_START = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_BLIT_SRCA_FWD +(const byte) DTV_BLIT_SRCA_FWD#0 DTV_BLIT_SRCA_FWD = (byte/signed byte/word/signed word/dword/signed dword) 2 +(byte) DTV_BLIT_SRCB_FWD +(const byte) DTV_BLIT_SRCB_FWD#0 DTV_BLIT_SRCB_FWD = (byte/signed byte/word/signed word/dword/signed dword) 4 +(byte) DTV_BLIT_STATUS_BUSY +(const byte) DTV_BLIT_STATUS_BUSY#0 DTV_BLIT_STATUS_BUSY = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_BLIT_TRANSPARANCY_NONE +(const byte) DTV_BLIT_TRANSPARANCY_NONE#0 DTV_BLIT_TRANSPARANCY_NONE = (byte/signed byte/word/signed word/dword/signed dword) 0 +(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*) SCREEN +(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 +(byte[]) SRCA +(const byte[]) SRCA#0 SRCA = { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' } +(byte) SRCA_LEN +(const byte) SRCA_LEN#0 SRCA_LEN = (byte/signed byte/word/signed word/dword/signed dword) 9 +(byte[]) SRCB +(const byte[]) SRCB#0 SRCB = { (byte/word/signed word/dword/signed dword) 128 } +(void()) main() +(byte~) main::$15 reg byte a 202.0 +(label) main::@2 +(label) main::@3 +(label) main::@return +(byte) main::r +(byte) main::r#1 reg byte x 16.5 +(byte) main::r#2 reg byte x 5.5 + +reg byte x [ main::r#2 main::r#1 ] +reg byte a [ main::$15 ] + + +FINAL ASSEMBLER +Score: 1561 + +//SEG0 Basic Upstart +.pc = $801 "Basic" +:BasicUpstart(main) +.pc = $80d "Program" +//SEG1 Global Constants & labels + .label DTV_FEATURE = $d03f + .const DTV_FEATURE_ENABLE = 1 + .label DTV_BLITTER_SRCA_LO = $d320 + .label DTV_BLITTER_SRCA_MI = $d321 + .label DTV_BLITTER_SRCA_HI = $d322 + .label DTV_BLITTER_SRCA_MOD_LO = $d323 + .label DTV_BLITTER_SRCA_MOD_HI = $d324 + .label DTV_BLITTER_SRCA_LIN_LO = $d325 + .label DTV_BLITTER_SRCA_LIN_HI = $d326 + .label DTV_BLITTER_SRCA_STEP = $d327 + .label DTV_BLITTER_SRCB_LO = $d328 + .label DTV_BLITTER_SRCB_MI = $d329 + .label DTV_BLITTER_SRCB_HI = $d32a + .label DTV_BLITTER_SRCB_MOD_LO = $d32b + .label DTV_BLITTER_SRCB_MOD_HI = $d32c + .label DTV_BLITTER_SRCB_LIN_LO = $d32d + .label DTV_BLITTER_SRCB_LIN_HI = $d32e + .label DTV_BLITTER_SRCB_STEP = $d32f + .label DTV_BLITTER_DEST_LO = $d330 + .label DTV_BLITTER_DEST_MI = $d331 + .label DTV_BLITTER_DEST_HI = $d332 + .label DTV_BLITTER_DEST_MOD_LO = $d333 + .label DTV_BLITTER_DEST_MOD_HI = $d334 + .label DTV_BLITTER_DEST_LIN_LO = $d335 + .label DTV_BLITTER_DEST_LIN_HI = $d336 + .label DTV_BLITTER_DEST_STEP = $d337 + .label DTV_BLITTER_LEN_LO = $d338 + .label DTV_BLITTER_LEN_HI = $d339 + .label DTV_BLITTER_CONTROL = $d33a + .const DTV_BLIT_FORCE_START = 1 + .const DTV_BLIT_SRCA_FWD = 2 + .const DTV_BLIT_SRCB_FWD = 4 + .const DTV_BLIT_DEST_FWD = 8 + .label DTV_BLITTER_TRANSPARANCY = $d33b + .const DTV_BLIT_TRANSPARANCY_NONE = 0 + .label DTV_BLITTER_ALU = $d33e + .const DTV_BLIT_ADD = $30 + .label DTV_BLITTER_CONTROL2 = $d33f + .const DTV_BLIT_DEST_CONT = 8 + .const DTV_BLIT_STATUS_BUSY = 1 + .label SCREEN = $400 + .const SRCA_LEN = 9 +//SEG2 @begin +//SEG3 [1] phi from @begin to @2 [phi:@begin->@2] +//SEG4 @2 +//SEG5 [2] call main param-assignment [ ] ( ) + jsr main +//SEG6 [3] phi from @2 to @end [phi:@2->@end] +//SEG7 @end +//SEG8 main +main: { + //SEG9 [4] *((const byte*) DTV_FEATURE#0) ← (const byte) DTV_FEATURE_ENABLE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_FEATURE_ENABLE + sta DTV_FEATURE + //SEG10 [5] *((const byte*) DTV_BLITTER_SRCA_LO#0) ← <(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCA#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCA + sta DTV_BLITTER_SRCA_MI + //SEG12 [7] *((const byte*) DTV_BLITTER_SRCA_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCA_HI + //SEG13 [8] *((const byte*) DTV_BLITTER_SRCA_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_SRCA_MOD_LO + //SEG14 [9] *((const byte*) DTV_BLITTER_SRCA_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_SRCA_MOD_HI + //SEG15 [10] *((const byte*) DTV_BLITTER_SRCA_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCA_LIN_LO + //SEG16 [11] *((const byte*) DTV_BLITTER_SRCA_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCA_LIN_HI + //SEG17 [12] *((const byte*) DTV_BLITTER_SRCA_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_SRCA_STEP + //SEG18 [13] *((const byte*) DTV_BLITTER_SRCB_LO#0) ← <(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #(const byte[]) SRCB#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>SRCB + sta DTV_BLITTER_SRCB_MI + //SEG20 [15] *((const byte*) DTV_BLITTER_SRCB_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_HI + //SEG21 [16] *((const byte*) DTV_BLITTER_SRCB_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_SRCB_MOD_LO + //SEG22 [17] *((const byte*) DTV_BLITTER_SRCB_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_SRCB_MOD_HI + //SEG23 [18] *((const byte*) DTV_BLITTER_SRCB_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_SRCB_LIN_LO + //SEG24 [19] *((const byte*) DTV_BLITTER_SRCB_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_SRCB_LIN_HI + //SEG25 [20] *((const byte*) DTV_BLITTER_SRCB_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_SRCB_STEP + //SEG26 [21] *((const byte*) DTV_BLITTER_DEST_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_BLITTER_DEST_MI + //SEG28 [23] *((const byte*) DTV_BLITTER_DEST_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_DEST_HI + //SEG29 [24] *((const byte*) DTV_BLITTER_DEST_MOD_LO#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_DEST_MOD_LO + //SEG30 [25] *((const byte*) DTV_BLITTER_DEST_MOD_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + sta DTV_BLITTER_DEST_MOD_HI + //SEG31 [26] *((const byte*) DTV_BLITTER_DEST_LIN_LO#0) ← <(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #<$100 + sta DTV_BLITTER_DEST_LIN_LO + //SEG32 [27] *((const byte*) DTV_BLITTER_DEST_LIN_HI#0) ← >(word/signed word/dword/signed dword) 256 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #>$100 + sta DTV_BLITTER_DEST_LIN_HI + //SEG33 [28] *((const byte*) DTV_BLITTER_DEST_STEP#0) ← (byte/signed byte/word/signed word/dword/signed dword) 16 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #$10 + sta DTV_BLITTER_DEST_STEP + //SEG34 [29] *((const byte*) DTV_BLITTER_LEN_LO#0) ← (const byte) SRCA_LEN#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #SRCA_LEN + sta DTV_BLITTER_LEN_LO + //SEG35 [30] *((const byte*) DTV_BLITTER_LEN_HI#0) ← (byte/signed byte/word/signed word/dword/signed dword) 0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #0 + sta DTV_BLITTER_LEN_HI + //SEG36 [31] *((const byte*) DTV_BLITTER_ALU#0) ← (const byte) DTV_BLIT_ADD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_ADD + sta DTV_BLITTER_ALU + //SEG37 [32] *((const byte*) DTV_BLITTER_TRANSPARANCY#0) ← (const byte) DTV_BLIT_TRANSPARANCY_NONE#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_TRANSPARANCY_NONE + sta DTV_BLITTER_TRANSPARANCY + //SEG38 [33] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG39 [34] *((const byte*) DTV_BLITTER_CONTROL2#0) ← (const byte) DTV_BLIT_DEST_CONT#0 [ ] ( main:2 [ ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_DEST_CONT + sta DTV_BLITTER_CONTROL2 + //SEG40 [35] phi from main to main::@2 [phi:main->main::@2] + //SEG41 [35] phi (byte) main::r#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->main::@2#0] -- vbuxx=vbuc1 + ldx #0 + //SEG42 [35] phi from main::@2 to main::@2 [phi:main::@2->main::@2] + //SEG43 [35] phi from main::@3 to main::@2 [phi:main::@3->main::@2] + //SEG44 [35] phi (byte) main::r#2 = (byte) main::r#1 [phi:main::@3->main::@2#0] -- register_copy + //SEG45 main::@2 + b2: + //SEG46 [36] (byte~) main::$15 ← *((const byte*) DTV_BLITTER_CONTROL2#0) & (const byte) DTV_BLIT_STATUS_BUSY#0 [ main::r#2 main::$15 ] ( main:2 [ main::r#2 main::$15 ] ) -- vbuaa=_deref_pbuc1_band_vbuc2 + lda DTV_BLITTER_CONTROL2 + and #DTV_BLIT_STATUS_BUSY + //SEG47 [37] if((byte~) main::$15!=(byte/signed byte/word/signed word/dword/signed dword) 0) goto main::@2 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- vbuaa_neq_0_then_la1 + cmp #0 + bne b2 + //SEG48 main::@3 + //SEG49 [38] *((const byte*) DTV_BLITTER_CONTROL#0) ← (const byte) DTV_BLIT_FORCE_START#0|(const byte) DTV_BLIT_SRCA_FWD#0|(const byte) DTV_BLIT_SRCB_FWD#0|(const byte) DTV_BLIT_DEST_FWD#0 [ main::r#2 ] ( main:2 [ main::r#2 ] ) -- _deref_pbuc1=vbuc2 + lda #DTV_BLIT_FORCE_START|DTV_BLIT_SRCA_FWD|DTV_BLIT_SRCB_FWD|DTV_BLIT_DEST_FWD + sta DTV_BLITTER_CONTROL + //SEG50 [39] (byte) main::r#1 ← ++ (byte) main::r#2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG51 [40] if((byte) main::r#1!=(byte/signed byte/word/signed word/dword/signed dword) 8) goto main::@2 [ main::r#1 ] ( main:2 [ main::r#1 ] ) -- vbuxx_neq_vbuc1_then_la1 + cpx #8 + bne b2 + //SEG52 main::@return + //SEG53 [41] return [ ] ( main:2 [ ] ) + rts +} + SRCA: .byte 'c', 'a', 'm', 'e', 'l', 'o', 't', '!', ' ' + SRCB: .byte $80 + diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.sym b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.sym new file mode 100644 index 000000000..70e05130e --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-blittermin.sym @@ -0,0 +1,102 @@ +(label) @2 +(label) @begin +(label) @end +(byte*) DTV_BLITTER_ALU +(const byte*) DTV_BLITTER_ALU#0 DTV_BLITTER_ALU = ((byte*))(word/dword/signed dword) 54078 +(byte*) DTV_BLITTER_CONTROL +(const byte*) DTV_BLITTER_CONTROL#0 DTV_BLITTER_CONTROL = ((byte*))(word/dword/signed dword) 54074 +(byte*) DTV_BLITTER_CONTROL2 +(const byte*) DTV_BLITTER_CONTROL2#0 DTV_BLITTER_CONTROL2 = ((byte*))(word/dword/signed dword) 54079 +(byte*) DTV_BLITTER_DEST_HI +(const byte*) DTV_BLITTER_DEST_HI#0 DTV_BLITTER_DEST_HI = ((byte*))(word/dword/signed dword) 54066 +(byte*) DTV_BLITTER_DEST_LIN_HI +(const byte*) DTV_BLITTER_DEST_LIN_HI#0 DTV_BLITTER_DEST_LIN_HI = ((byte*))(word/dword/signed dword) 54070 +(byte*) DTV_BLITTER_DEST_LIN_LO +(const byte*) DTV_BLITTER_DEST_LIN_LO#0 DTV_BLITTER_DEST_LIN_LO = ((byte*))(word/dword/signed dword) 54069 +(byte*) DTV_BLITTER_DEST_LO +(const byte*) DTV_BLITTER_DEST_LO#0 DTV_BLITTER_DEST_LO = ((byte*))(word/dword/signed dword) 54064 +(byte*) DTV_BLITTER_DEST_MI +(const byte*) DTV_BLITTER_DEST_MI#0 DTV_BLITTER_DEST_MI = ((byte*))(word/dword/signed dword) 54065 +(byte*) DTV_BLITTER_DEST_MOD_HI +(const byte*) DTV_BLITTER_DEST_MOD_HI#0 DTV_BLITTER_DEST_MOD_HI = ((byte*))(word/dword/signed dword) 54068 +(byte*) DTV_BLITTER_DEST_MOD_LO +(const byte*) DTV_BLITTER_DEST_MOD_LO#0 DTV_BLITTER_DEST_MOD_LO = ((byte*))(word/dword/signed dword) 54067 +(byte*) DTV_BLITTER_DEST_STEP +(const byte*) DTV_BLITTER_DEST_STEP#0 DTV_BLITTER_DEST_STEP = ((byte*))(word/dword/signed dword) 54071 +(byte*) DTV_BLITTER_LEN_HI +(const byte*) DTV_BLITTER_LEN_HI#0 DTV_BLITTER_LEN_HI = ((byte*))(word/dword/signed dword) 54073 +(byte*) DTV_BLITTER_LEN_LO +(const byte*) DTV_BLITTER_LEN_LO#0 DTV_BLITTER_LEN_LO = ((byte*))(word/dword/signed dword) 54072 +(byte*) DTV_BLITTER_SRCA_HI +(const byte*) DTV_BLITTER_SRCA_HI#0 DTV_BLITTER_SRCA_HI = ((byte*))(word/dword/signed dword) 54050 +(byte*) DTV_BLITTER_SRCA_LIN_HI +(const byte*) DTV_BLITTER_SRCA_LIN_HI#0 DTV_BLITTER_SRCA_LIN_HI = ((byte*))(word/dword/signed dword) 54054 +(byte*) DTV_BLITTER_SRCA_LIN_LO +(const byte*) DTV_BLITTER_SRCA_LIN_LO#0 DTV_BLITTER_SRCA_LIN_LO = ((byte*))(word/dword/signed dword) 54053 +(byte*) DTV_BLITTER_SRCA_LO +(const byte*) DTV_BLITTER_SRCA_LO#0 DTV_BLITTER_SRCA_LO = ((byte*))(word/dword/signed dword) 54048 +(byte*) DTV_BLITTER_SRCA_MI +(const byte*) DTV_BLITTER_SRCA_MI#0 DTV_BLITTER_SRCA_MI = ((byte*))(word/dword/signed dword) 54049 +(byte*) DTV_BLITTER_SRCA_MOD_HI +(const byte*) DTV_BLITTER_SRCA_MOD_HI#0 DTV_BLITTER_SRCA_MOD_HI = ((byte*))(word/dword/signed dword) 54052 +(byte*) DTV_BLITTER_SRCA_MOD_LO +(const byte*) DTV_BLITTER_SRCA_MOD_LO#0 DTV_BLITTER_SRCA_MOD_LO = ((byte*))(word/dword/signed dword) 54051 +(byte*) DTV_BLITTER_SRCA_STEP +(const byte*) DTV_BLITTER_SRCA_STEP#0 DTV_BLITTER_SRCA_STEP = ((byte*))(word/dword/signed dword) 54055 +(byte*) DTV_BLITTER_SRCB_HI +(const byte*) DTV_BLITTER_SRCB_HI#0 DTV_BLITTER_SRCB_HI = ((byte*))(word/dword/signed dword) 54058 +(byte*) DTV_BLITTER_SRCB_LIN_HI +(const byte*) DTV_BLITTER_SRCB_LIN_HI#0 DTV_BLITTER_SRCB_LIN_HI = ((byte*))(word/dword/signed dword) 54062 +(byte*) DTV_BLITTER_SRCB_LIN_LO +(const byte*) DTV_BLITTER_SRCB_LIN_LO#0 DTV_BLITTER_SRCB_LIN_LO = ((byte*))(word/dword/signed dword) 54061 +(byte*) DTV_BLITTER_SRCB_LO +(const byte*) DTV_BLITTER_SRCB_LO#0 DTV_BLITTER_SRCB_LO = ((byte*))(word/dword/signed dword) 54056 +(byte*) DTV_BLITTER_SRCB_MI +(const byte*) DTV_BLITTER_SRCB_MI#0 DTV_BLITTER_SRCB_MI = ((byte*))(word/dword/signed dword) 54057 +(byte*) DTV_BLITTER_SRCB_MOD_HI +(const byte*) DTV_BLITTER_SRCB_MOD_HI#0 DTV_BLITTER_SRCB_MOD_HI = ((byte*))(word/dword/signed dword) 54060 +(byte*) DTV_BLITTER_SRCB_MOD_LO +(const byte*) DTV_BLITTER_SRCB_MOD_LO#0 DTV_BLITTER_SRCB_MOD_LO = ((byte*))(word/dword/signed dword) 54059 +(byte*) DTV_BLITTER_SRCB_STEP +(const byte*) DTV_BLITTER_SRCB_STEP#0 DTV_BLITTER_SRCB_STEP = ((byte*))(word/dword/signed dword) 54063 +(byte*) DTV_BLITTER_TRANSPARANCY +(const byte*) DTV_BLITTER_TRANSPARANCY#0 DTV_BLITTER_TRANSPARANCY = ((byte*))(word/dword/signed dword) 54075 +(byte) DTV_BLIT_ADD +(const byte) DTV_BLIT_ADD#0 DTV_BLIT_ADD = (byte/signed byte/word/signed word/dword/signed dword) 48 +(byte) DTV_BLIT_DEST_CONT +(const byte) DTV_BLIT_DEST_CONT#0 DTV_BLIT_DEST_CONT = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) DTV_BLIT_DEST_FWD +(const byte) DTV_BLIT_DEST_FWD#0 DTV_BLIT_DEST_FWD = (byte/signed byte/word/signed word/dword/signed dword) 8 +(byte) DTV_BLIT_FORCE_START +(const byte) DTV_BLIT_FORCE_START#0 DTV_BLIT_FORCE_START = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_BLIT_SRCA_FWD +(const byte) DTV_BLIT_SRCA_FWD#0 DTV_BLIT_SRCA_FWD = (byte/signed byte/word/signed word/dword/signed dword) 2 +(byte) DTV_BLIT_SRCB_FWD +(const byte) DTV_BLIT_SRCB_FWD#0 DTV_BLIT_SRCB_FWD = (byte/signed byte/word/signed word/dword/signed dword) 4 +(byte) DTV_BLIT_STATUS_BUSY +(const byte) DTV_BLIT_STATUS_BUSY#0 DTV_BLIT_STATUS_BUSY = (byte/signed byte/word/signed word/dword/signed dword) 1 +(byte) DTV_BLIT_TRANSPARANCY_NONE +(const byte) DTV_BLIT_TRANSPARANCY_NONE#0 DTV_BLIT_TRANSPARANCY_NONE = (byte/signed byte/word/signed word/dword/signed dword) 0 +(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*) SCREEN +(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 +(byte[]) SRCA +(const byte[]) SRCA#0 SRCA = { (byte) 'c', (byte) 'a', (byte) 'm', (byte) 'e', (byte) 'l', (byte) 'o', (byte) 't', (byte) '!', (byte) ' ' } +(byte) SRCA_LEN +(const byte) SRCA_LEN#0 SRCA_LEN = (byte/signed byte/word/signed word/dword/signed dword) 9 +(byte[]) SRCB +(const byte[]) SRCB#0 SRCB = { (byte/word/signed word/dword/signed dword) 128 } +(void()) main() +(byte~) main::$15 reg byte a 202.0 +(label) main::@2 +(label) main::@3 +(label) main::@return +(byte) main::r +(byte) main::r#1 reg byte x 16.5 +(byte) main::r#2 reg byte x 5.5 + +reg byte x [ main::r#2 main::r#1 ] +reg byte a [ main::$15 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-color.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-color.log index fce2ab7c7..bff995253 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-color.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-color.log @@ -109,6 +109,112 @@ void dtvSetCpuBankSegment1(byte cpuBankIdx) { } } +// 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 = %00000000; +// 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; + Importing c64.kc PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc // Commodore 64 Registers and Constants @@ -312,6 +418,70 @@ proc (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1::@return: return endproc // dtvSetCpuBankSegment1() + (byte*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 proc (void()) main() asm { sei } *((byte*) DTV_FEATURE) ← (byte) DTV_FEATURE_ENABLE @@ -378,6 +548,70 @@ SYMBOLS (byte*) D018 (byte) DARK_GREY (byte) DTV_BADLINE_OFF +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR (byte) DTV_BORDER_OFF (byte) DTV_CHUNKY (byte) DTV_COLORRAM_OFF @@ -529,6 +763,36 @@ Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_HI ← ((byte*)) 53 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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 INITIAL CONTROL FLOW GRAPH @begin: scope:[] from (byte*) PROCPORT_DDR ← ((byte*)) (byte/signed byte/word/signed word/dword/signed dword) 0 @@ -637,6 +901,70 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan return to:@return @1: scope:[] from @begin + (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 to:@2 main: scope:[main] from asm { sei } @@ -790,6 +1118,70 @@ Eliminating unused variable (byte*) DTV_COLOR_BANK_HI and assignment [92] (byte* 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 (byte*) DTV_BLITTER_SRCA_LO and assignment [96] (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MI and assignment [97] (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_HI and assignment [98] (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_LO and assignment [99] (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_HI and assignment [100] (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_LO and assignment [101] (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_HI and assignment [102] (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_STEP and assignment [103] (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LO and assignment [104] (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MI and assignment [105] (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_HI and assignment [106] (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_LO and assignment [107] (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_HI and assignment [108] (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_LO and assignment [109] (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_HI and assignment [110] (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_STEP and assignment [111] (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LO and assignment [112] (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MI and assignment [113] (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_HI and assignment [114] (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_LO and assignment [115] (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_HI and assignment [116] (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_LO and assignment [117] (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_HI and assignment [118] (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_STEP and assignment [119] (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_LO and assignment [120] (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_HI and assignment [121] (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL and assignment [122] (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 +Eliminating unused variable (byte) DTV_BLIT_FORCE_START and assignment [123] (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_FWD and assignment [124] (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_FWD and assignment [125] (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_FWD and assignment [126] (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_VIC_IRQ and assignment [127] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [128] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [129] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [130] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte*) DTV_BLITTER_TRANSPARANCY and assignment [131] (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [132] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [133] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [134] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_TRANSPARANCY_NONE and assignment [135] (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte*) DTV_BLITTER_ALU and assignment [136] (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [137] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [138] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [139] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [140] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [141] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [142] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [143] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [144] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [145] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [146] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [147] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [148] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [149] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [150] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_ADD and assignment [151] (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [152] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL2 and assignment [153] (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [154] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [155] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [156] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_CONT and assignment [157] (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_STATUS_BUSY and assignment [158] (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [159] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 Removing empty block @1 Removing empty block main::@9 Removing empty block main::@3 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxexplorer.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxexplorer.log index 8a645b529..7baacedac 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxexplorer.log @@ -875,6 +875,112 @@ void dtvSetCpuBankSegment1(byte cpuBankIdx) { } } +// 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 = %00000000; +// 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; + Importing c64.kc PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc // Commodore 64 Registers and Constants @@ -1634,6 +1740,70 @@ proc (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1::@return: return endproc // dtvSetCpuBankSegment1() + (byte*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) print_screen ← (word/signed word/dword/signed dword) 1024 (byte*) print_line_cursor ← (byte*) print_screen (byte*) print_char_cursor ← (byte*) print_line_cursor @@ -3668,6 +3838,70 @@ SYMBOLS (byte*) D018 (byte) DARK_GREY (byte) DTV_BADLINE_OFF +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR (byte) DTV_BORDER_OFF (byte) DTV_CHUNKY (byte) DTV_COLORRAM_OFF @@ -5056,6 +5290,36 @@ Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_HI ← ((byte*)) 53 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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 Promoting word/signed word/dword/signed dword to byte* in print_screen ← ((byte*)) 1024 Promoting byte/signed byte/word/signed word/dword/signed dword to byte* in bitmap_init::yoffs ← ((byte*)) 0 Promoting word to byte* in bitmap_plot::plotter ← ((byte*)) bitmap_plot::$0 @@ -5183,6 +5447,70 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan return to:@return @1: scope:[] from @begin + (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) print_screen ← ((byte*)) (word/signed word/dword/signed dword) 1024 (byte*) print_line_cursor ← (byte*) print_screen (byte*) print_char_cursor ← (byte*) print_line_cursor @@ -7982,16 +8310,80 @@ Eliminating unused variable (byte) DTV_FEATURE_DISABLE_TIL_RESET and assignment Eliminating unused variable (byte) DTV_BADLINE_OFF and assignment [74] (byte) DTV_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32 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_GRAPHICS_HICOL_BANK and assignment [95] (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LO and assignment [100] (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MI and assignment [101] (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_HI and assignment [102] (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_LO and assignment [103] (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_HI and assignment [104] (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_LO and assignment [105] (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_HI and assignment [106] (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_STEP and assignment [107] (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LO and assignment [108] (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MI and assignment [109] (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_HI and assignment [110] (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_LO and assignment [111] (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_HI and assignment [112] (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_LO and assignment [113] (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_HI and assignment [114] (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_STEP and assignment [115] (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LO and assignment [116] (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MI and assignment [117] (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_HI and assignment [118] (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_LO and assignment [119] (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_HI and assignment [120] (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_LO and assignment [121] (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_HI and assignment [122] (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_STEP and assignment [123] (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_LO and assignment [124] (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_HI and assignment [125] (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL and assignment [126] (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 +Eliminating unused variable (byte) DTV_BLIT_FORCE_START and assignment [127] (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_FWD and assignment [128] (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_FWD and assignment [129] (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_FWD and assignment [130] (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_VIC_IRQ and assignment [131] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [132] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [133] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [134] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte*) DTV_BLITTER_TRANSPARANCY and assignment [135] (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [136] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [137] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [138] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_TRANSPARANCY_NONE and assignment [139] (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte*) DTV_BLITTER_ALU and assignment [140] (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [141] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [142] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [143] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [144] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [145] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [146] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [147] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [148] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [149] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [150] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [151] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [152] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [153] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [154] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_ADD and assignment [155] (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [156] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL2 and assignment [157] (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [158] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [159] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [160] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_CONT and assignment [161] (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_STATUS_BUSY and assignment [162] (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [163] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 Eliminating unused variable - keeping the call (void~) print_str_lines::$4 -Eliminating unused variable (byte) KEY_DEL and assignment [142] (byte) KEY_DEL ← (byte/signed byte/word/signed word/dword/signed dword) 0 -Eliminating unused variable (byte) KEY_RETURN and assignment [143] (byte) KEY_RETURN ← (byte/signed byte/word/signed word/dword/signed dword) 1 -Eliminating unused variable (byte) KEY_F7 and assignment [145] (byte) KEY_F7 ← (byte/signed byte/word/signed word/dword/signed dword) 3 -Eliminating unused variable (byte) KEY_F1 and assignment [146] (byte) KEY_F1 ← (byte/signed byte/word/signed word/dword/signed dword) 4 -Eliminating unused variable (byte) KEY_F3 and assignment [147] (byte) KEY_F3 ← (byte/signed byte/word/signed word/dword/signed dword) 5 -Eliminating unused variable (byte) KEY_F5 and assignment [148] (byte) KEY_F5 ← (byte/signed byte/word/signed word/dword/signed dword) 6 -Eliminating unused variable (byte) KEY_HOME and assignment [193] (byte) KEY_HOME ← (byte/signed byte/word/signed word/dword/signed dword) 51 -Eliminating unused variable (byte) KEY_RUNSTOP and assignment [205] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63 -Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [206] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 } +Eliminating unused variable (byte) KEY_DEL and assignment [206] (byte) KEY_DEL ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) KEY_RETURN and assignment [207] (byte) KEY_RETURN ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) KEY_F7 and assignment [209] (byte) KEY_F7 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) KEY_F1 and assignment [210] (byte) KEY_F1 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) KEY_F3 and assignment [211] (byte) KEY_F3 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) KEY_F5 and assignment [212] (byte) KEY_F5 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) KEY_HOME and assignment [257] (byte) KEY_HOME ← (byte/signed byte/word/signed word/dword/signed dword) 51 +Eliminating unused variable (byte) KEY_RUNSTOP and assignment [269] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63 +Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [270] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 } Eliminating unused variable - keeping the call (void~) bitmap_line::$9 Eliminating unused variable - keeping the call (void~) bitmap_line::$8 Eliminating unused variable - keeping the call (void~) bitmap_line::$14 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log index c9041bcc3..0632107e3 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log @@ -957,6 +957,112 @@ void dtvSetCpuBankSegment1(byte cpuBankIdx) { } } +// 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 = %00000000; +// 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; + Importing c64.kc PARSING src/test/java/dk/camelot64/kickc/test/kc/c64.kc // Commodore 64 Registers and Constants @@ -1713,6 +1819,70 @@ proc (void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx) dtvSetCpuBankSegment1::@return: return endproc // dtvSetCpuBankSegment1() + (byte*) DTV_BLITTER_SRCA_LO ← (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) print_screen ← (word/signed word/dword/signed dword) 1024 (byte*) print_line_cursor ← (byte*) print_screen (byte*) print_char_cursor ← (byte*) print_line_cursor @@ -3591,6 +3761,70 @@ SYMBOLS (byte*) D018 (byte) DARK_GREY (byte) DTV_BADLINE_OFF +(byte*) DTV_BLITTER_ALU +(byte*) DTV_BLITTER_CONTROL +(byte*) DTV_BLITTER_CONTROL2 +(byte*) DTV_BLITTER_DEST_HI +(byte*) DTV_BLITTER_DEST_LIN_HI +(byte*) DTV_BLITTER_DEST_LIN_LO +(byte*) DTV_BLITTER_DEST_LO +(byte*) DTV_BLITTER_DEST_MI +(byte*) DTV_BLITTER_DEST_MOD_HI +(byte*) DTV_BLITTER_DEST_MOD_LO +(byte*) DTV_BLITTER_DEST_STEP +(byte*) DTV_BLITTER_LEN_HI +(byte*) DTV_BLITTER_LEN_LO +(byte*) DTV_BLITTER_SRCA_HI +(byte*) DTV_BLITTER_SRCA_LIN_HI +(byte*) DTV_BLITTER_SRCA_LIN_LO +(byte*) DTV_BLITTER_SRCA_LO +(byte*) DTV_BLITTER_SRCA_MI +(byte*) DTV_BLITTER_SRCA_MOD_HI +(byte*) DTV_BLITTER_SRCA_MOD_LO +(byte*) DTV_BLITTER_SRCA_STEP +(byte*) DTV_BLITTER_SRCB_HI +(byte*) DTV_BLITTER_SRCB_LIN_HI +(byte*) DTV_BLITTER_SRCB_LIN_LO +(byte*) DTV_BLITTER_SRCB_LO +(byte*) DTV_BLITTER_SRCB_MI +(byte*) DTV_BLITTER_SRCB_MOD_HI +(byte*) DTV_BLITTER_SRCB_MOD_LO +(byte*) DTV_BLITTER_SRCB_STEP +(byte*) DTV_BLITTER_TRANSPARANCY +(byte) DTV_BLIT_ADD +(byte) DTV_BLIT_AND +(byte) DTV_BLIT_CIA_IRQ +(byte) DTV_BLIT_CLEAR_IRQ +(byte) DTV_BLIT_DEST_CONT +(byte) DTV_BLIT_DEST_FWD +(byte) DTV_BLIT_DISABLE_B +(byte) DTV_BLIT_FORCE_START +(byte) DTV_BLIT_IRQ_EN +(byte) DTV_BLIT_NAND +(byte) DTV_BLIT_NOR +(byte) DTV_BLIT_OR +(byte) DTV_BLIT_SHIFT0 +(byte) DTV_BLIT_SHIFT1 +(byte) DTV_BLIT_SHIFT2 +(byte) DTV_BLIT_SHIFT3 +(byte) DTV_BLIT_SHIFT4 +(byte) DTV_BLIT_SHIFT5 +(byte) DTV_BLIT_SHIFT6 +(byte) DTV_BLIT_SHIFT7 +(byte) DTV_BLIT_SRCA_CONT +(byte) DTV_BLIT_SRCA_FWD +(byte) DTV_BLIT_SRCB_CONT +(byte) DTV_BLIT_SRCB_FWD +(byte) DTV_BLIT_STATUS_BUSY +(byte) DTV_BLIT_STATUS_IRQ +(byte) DTV_BLIT_SUB +(byte) DTV_BLIT_TRANSPARANCY_NONE +(byte) DTV_BLIT_VBLANK +(byte) DTV_BLIT_VIC_IRQ +(byte) DTV_BLIT_WRITE_NONTRANSPARENT +(byte) DTV_BLIT_WRITE_TRANSPARENT +(byte) DTV_BLIT_XNOR +(byte) DTV_BLIT_XOR (byte) DTV_BORDER_OFF (byte) DTV_CHUNKY (byte) DTV_COLORRAM_OFF @@ -4904,6 +5138,36 @@ Promoting word/dword/signed dword to byte* in DTV_COLOR_BANK_HI ← ((byte*)) 53 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/dword/signed dword to byte* in DTV_BLITTER_SRCA_LO ← ((byte*)) 54048 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MI ← ((byte*)) 54049 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_HI ← ((byte*)) 54050 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) 54051 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) 54052 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) 54053 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) 54054 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCA_STEP ← ((byte*)) 54055 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LO ← ((byte*)) 54056 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MI ← ((byte*)) 54057 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_HI ← ((byte*)) 54058 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) 54059 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) 54060 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) 54061 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) 54062 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_SRCB_STEP ← ((byte*)) 54063 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LO ← ((byte*)) 54064 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MI ← ((byte*)) 54065 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_HI ← ((byte*)) 54066 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_LO ← ((byte*)) 54067 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_MOD_HI ← ((byte*)) 54068 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_LO ← ((byte*)) 54069 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_LIN_HI ← ((byte*)) 54070 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_DEST_STEP ← ((byte*)) 54071 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_LO ← ((byte*)) 54072 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_LEN_HI ← ((byte*)) 54073 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL ← ((byte*)) 54074 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_TRANSPARANCY ← ((byte*)) 54075 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_ALU ← ((byte*)) 54078 +Promoting word/dword/signed dword to byte* in DTV_BLITTER_CONTROL2 ← ((byte*)) 54079 Promoting word/signed word/dword/signed dword to byte* in print_screen ← ((byte*)) 1024 Promoting byte/signed byte/word/signed word/dword/signed dword to byte* in bitmap_init::yoffs ← ((byte*)) 0 Promoting word to byte* in bitmap_plot::plotter ← ((byte*)) bitmap_plot::$0 @@ -5051,6 +5315,70 @@ dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBan return to:@return @1: scope:[] from @begin + (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 + (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 + (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 + (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 + (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 + (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 + (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 + (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 + (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 + (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 + (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 + (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 + (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 + (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 + (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 + (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 + (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 + (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 + (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 + (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 + (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 + (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 + (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 + (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 + (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 + (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 + (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 + (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 + (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 + (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 + (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 + (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 + (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 + (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 + (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 + (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 + (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 + (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 + (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 + (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 + (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 + (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 + (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 + (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 + (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 + (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 + (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 + (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 (byte*) print_screen ← ((byte*)) (word/signed word/dword/signed dword) 1024 (byte*) print_line_cursor ← (byte*) print_screen (byte*) print_char_cursor ← (byte*) print_line_cursor @@ -7511,30 +7839,94 @@ Eliminating unused variable (byte) DTV_FEATURE_DISABLE_TIL_RESET and assignment Eliminating unused variable (byte) DTV_BADLINE_OFF and assignment [74] (byte) DTV_BADLINE_OFF ← (byte/signed byte/word/signed word/dword/signed dword) 32 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_GRAPHICS_HICOL_BANK and assignment [95] (byte*) DTV_GRAPHICS_HICOL_BANK ← ((byte*)) (word/dword/signed dword) 53310 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LO and assignment [100] (byte*) DTV_BLITTER_SRCA_LO ← ((byte*)) (word/dword/signed dword) 54048 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MI and assignment [101] (byte*) DTV_BLITTER_SRCA_MI ← ((byte*)) (word/dword/signed dword) 54049 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_HI and assignment [102] (byte*) DTV_BLITTER_SRCA_HI ← ((byte*)) (word/dword/signed dword) 54050 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_LO and assignment [103] (byte*) DTV_BLITTER_SRCA_MOD_LO ← ((byte*)) (word/dword/signed dword) 54051 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_MOD_HI and assignment [104] (byte*) DTV_BLITTER_SRCA_MOD_HI ← ((byte*)) (word/dword/signed dword) 54052 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_LO and assignment [105] (byte*) DTV_BLITTER_SRCA_LIN_LO ← ((byte*)) (word/dword/signed dword) 54053 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_LIN_HI and assignment [106] (byte*) DTV_BLITTER_SRCA_LIN_HI ← ((byte*)) (word/dword/signed dword) 54054 +Eliminating unused variable (byte*) DTV_BLITTER_SRCA_STEP and assignment [107] (byte*) DTV_BLITTER_SRCA_STEP ← ((byte*)) (word/dword/signed dword) 54055 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LO and assignment [108] (byte*) DTV_BLITTER_SRCB_LO ← ((byte*)) (word/dword/signed dword) 54056 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MI and assignment [109] (byte*) DTV_BLITTER_SRCB_MI ← ((byte*)) (word/dword/signed dword) 54057 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_HI and assignment [110] (byte*) DTV_BLITTER_SRCB_HI ← ((byte*)) (word/dword/signed dword) 54058 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_LO and assignment [111] (byte*) DTV_BLITTER_SRCB_MOD_LO ← ((byte*)) (word/dword/signed dword) 54059 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_MOD_HI and assignment [112] (byte*) DTV_BLITTER_SRCB_MOD_HI ← ((byte*)) (word/dword/signed dword) 54060 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_LO and assignment [113] (byte*) DTV_BLITTER_SRCB_LIN_LO ← ((byte*)) (word/dword/signed dword) 54061 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_LIN_HI and assignment [114] (byte*) DTV_BLITTER_SRCB_LIN_HI ← ((byte*)) (word/dword/signed dword) 54062 +Eliminating unused variable (byte*) DTV_BLITTER_SRCB_STEP and assignment [115] (byte*) DTV_BLITTER_SRCB_STEP ← ((byte*)) (word/dword/signed dword) 54063 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LO and assignment [116] (byte*) DTV_BLITTER_DEST_LO ← ((byte*)) (word/dword/signed dword) 54064 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MI and assignment [117] (byte*) DTV_BLITTER_DEST_MI ← ((byte*)) (word/dword/signed dword) 54065 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_HI and assignment [118] (byte*) DTV_BLITTER_DEST_HI ← ((byte*)) (word/dword/signed dword) 54066 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_LO and assignment [119] (byte*) DTV_BLITTER_DEST_MOD_LO ← ((byte*)) (word/dword/signed dword) 54067 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_MOD_HI and assignment [120] (byte*) DTV_BLITTER_DEST_MOD_HI ← ((byte*)) (word/dword/signed dword) 54068 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_LO and assignment [121] (byte*) DTV_BLITTER_DEST_LIN_LO ← ((byte*)) (word/dword/signed dword) 54069 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_LIN_HI and assignment [122] (byte*) DTV_BLITTER_DEST_LIN_HI ← ((byte*)) (word/dword/signed dword) 54070 +Eliminating unused variable (byte*) DTV_BLITTER_DEST_STEP and assignment [123] (byte*) DTV_BLITTER_DEST_STEP ← ((byte*)) (word/dword/signed dword) 54071 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_LO and assignment [124] (byte*) DTV_BLITTER_LEN_LO ← ((byte*)) (word/dword/signed dword) 54072 +Eliminating unused variable (byte*) DTV_BLITTER_LEN_HI and assignment [125] (byte*) DTV_BLITTER_LEN_HI ← ((byte*)) (word/dword/signed dword) 54073 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL and assignment [126] (byte*) DTV_BLITTER_CONTROL ← ((byte*)) (word/dword/signed dword) 54074 +Eliminating unused variable (byte) DTV_BLIT_FORCE_START and assignment [127] (byte) DTV_BLIT_FORCE_START ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_FWD and assignment [128] (byte) DTV_BLIT_SRCA_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_FWD and assignment [129] (byte) DTV_BLIT_SRCB_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_FWD and assignment [130] (byte) DTV_BLIT_DEST_FWD ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_VIC_IRQ and assignment [131] (byte) DTV_BLIT_VIC_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_CIA_IRQ and assignment [132] (byte) DTV_BLIT_CIA_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_VBLANK and assignment [133] (byte) DTV_BLIT_VBLANK ← (byte/signed byte/word/signed word/dword/signed dword) 64 +Eliminating unused variable (byte) DTV_BLIT_IRQ_EN and assignment [134] (byte) DTV_BLIT_IRQ_EN ← (byte/word/signed word/dword/signed dword) 128 +Eliminating unused variable (byte*) DTV_BLITTER_TRANSPARANCY and assignment [135] (byte*) DTV_BLITTER_TRANSPARANCY ← ((byte*)) (word/dword/signed dword) 54075 +Eliminating unused variable (byte) DTV_BLIT_DISABLE_B and assignment [136] (byte) DTV_BLIT_DISABLE_B ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_WRITE_TRANSPARENT and assignment [137] (byte) DTV_BLIT_WRITE_TRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_WRITE_NONTRANSPARENT and assignment [138] (byte) DTV_BLIT_WRITE_NONTRANSPARENT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_TRANSPARANCY_NONE and assignment [139] (byte) DTV_BLIT_TRANSPARANCY_NONE ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte*) DTV_BLITTER_ALU and assignment [140] (byte*) DTV_BLITTER_ALU ← ((byte*)) (word/dword/signed dword) 54078 +Eliminating unused variable (byte) DTV_BLIT_SHIFT0 and assignment [141] (byte) DTV_BLIT_SHIFT0 ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_SHIFT1 and assignment [142] (byte) DTV_BLIT_SHIFT1 ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SHIFT2 and assignment [143] (byte) DTV_BLIT_SHIFT2 ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SHIFT3 and assignment [144] (byte) DTV_BLIT_SHIFT3 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) DTV_BLIT_SHIFT4 and assignment [145] (byte) DTV_BLIT_SHIFT4 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_SHIFT5 and assignment [146] (byte) DTV_BLIT_SHIFT5 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) DTV_BLIT_SHIFT6 and assignment [147] (byte) DTV_BLIT_SHIFT6 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) DTV_BLIT_SHIFT7 and assignment [148] (byte) DTV_BLIT_SHIFT7 ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) DTV_BLIT_AND and assignment [149] (byte) DTV_BLIT_AND ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) DTV_BLIT_NAND and assignment [150] (byte) DTV_BLIT_NAND ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_NOR and assignment [151] (byte) DTV_BLIT_NOR ← (byte/signed byte/word/signed word/dword/signed dword) 16 +Eliminating unused variable (byte) DTV_BLIT_OR and assignment [152] (byte) DTV_BLIT_OR ← (byte/signed byte/word/signed word/dword/signed dword) 24 +Eliminating unused variable (byte) DTV_BLIT_XOR and assignment [153] (byte) DTV_BLIT_XOR ← (byte/signed byte/word/signed word/dword/signed dword) 32 +Eliminating unused variable (byte) DTV_BLIT_XNOR and assignment [154] (byte) DTV_BLIT_XNOR ← (byte/signed byte/word/signed word/dword/signed dword) 40 +Eliminating unused variable (byte) DTV_BLIT_ADD and assignment [155] (byte) DTV_BLIT_ADD ← (byte/signed byte/word/signed word/dword/signed dword) 48 +Eliminating unused variable (byte) DTV_BLIT_SUB and assignment [156] (byte) DTV_BLIT_SUB ← (byte/signed byte/word/signed word/dword/signed dword) 56 +Eliminating unused variable (byte*) DTV_BLITTER_CONTROL2 and assignment [157] (byte*) DTV_BLITTER_CONTROL2 ← ((byte*)) (word/dword/signed dword) 54079 +Eliminating unused variable (byte) DTV_BLIT_CLEAR_IRQ and assignment [158] (byte) DTV_BLIT_CLEAR_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_SRCA_CONT and assignment [159] (byte) DTV_BLIT_SRCA_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) DTV_BLIT_SRCB_CONT and assignment [160] (byte) DTV_BLIT_SRCB_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) DTV_BLIT_DEST_CONT and assignment [161] (byte) DTV_BLIT_DEST_CONT ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) DTV_BLIT_STATUS_BUSY and assignment [162] (byte) DTV_BLIT_STATUS_BUSY ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) DTV_BLIT_STATUS_IRQ and assignment [163] (byte) DTV_BLIT_STATUS_IRQ ← (byte/signed byte/word/signed word/dword/signed dword) 2 Eliminating unused variable - keeping the call (void~) print_str_lines::$4 -Eliminating unused variable (byte[]) print_hextab and assignment [122] (byte[]) print_hextab ← (string) "0123456789abcdef" -Eliminating unused variable (byte) KEY_DEL and assignment [136] (byte) KEY_DEL ← (byte/signed byte/word/signed word/dword/signed dword) 0 -Eliminating unused variable (byte) KEY_RETURN and assignment [137] (byte) KEY_RETURN ← (byte/signed byte/word/signed word/dword/signed dword) 1 -Eliminating unused variable (byte) KEY_CRSR_RIGHT and assignment [138] (byte) KEY_CRSR_RIGHT ← (byte/signed byte/word/signed word/dword/signed dword) 2 -Eliminating unused variable (byte) KEY_F7 and assignment [139] (byte) KEY_F7 ← (byte/signed byte/word/signed word/dword/signed dword) 3 -Eliminating unused variable (byte) KEY_F1 and assignment [140] (byte) KEY_F1 ← (byte/signed byte/word/signed word/dword/signed dword) 4 -Eliminating unused variable (byte) KEY_F3 and assignment [141] (byte) KEY_F3 ← (byte/signed byte/word/signed word/dword/signed dword) 5 -Eliminating unused variable (byte) KEY_F5 and assignment [142] (byte) KEY_F5 ← (byte/signed byte/word/signed word/dword/signed dword) 6 -Eliminating unused variable (byte) KEY_CRSR_DOWN and assignment [143] (byte) KEY_CRSR_DOWN ← (byte/signed byte/word/signed word/dword/signed dword) 7 -Eliminating unused variable (byte) KEY_LSHIFT and assignment [151] (byte) KEY_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 15 -Eliminating unused variable (byte) KEY_HOME and assignment [187] (byte) KEY_HOME ← (byte/signed byte/word/signed word/dword/signed dword) 51 -Eliminating unused variable (byte) KEY_RSHIFT and assignment [188] (byte) KEY_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 52 -Eliminating unused variable (byte) KEY_CTRL and assignment [194] (byte) KEY_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 58 -Eliminating unused variable (byte) KEY_COMMODORE and assignment [197] (byte) KEY_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 61 -Eliminating unused variable (byte) KEY_RUNSTOP and assignment [199] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63 -Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [200] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 } -Eliminating unused variable (byte[8]) keyboard_events and assignment [218] (byte[8]) keyboard_events ← { fill( 8, 0) } -Eliminating unused variable (byte) keyboard_events_size and assignment [219] (byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0 -Eliminating unused variable (byte) keyboard_modifiers and assignment [220] (byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0 -Eliminating unused variable (byte) KEY_MODIFIER_CTRL and assignment [223] (byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4 -Eliminating unused variable (byte) KEY_MODIFIER_COMMODORE and assignment [224] (byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8 -Eliminating unused variable (byte) KEY_MODIFIER_SHIFT and assignment [226] (byte) KEY_MODIFIER_SHIFT ← (byte~) $0 -Eliminating unused variable (byte[8]) keyboard_scan_values and assignment [227] (byte[8]) keyboard_scan_values ← { fill( 8, 0) } +Eliminating unused variable (byte[]) print_hextab and assignment [186] (byte[]) print_hextab ← (string) "0123456789abcdef" +Eliminating unused variable (byte) KEY_DEL and assignment [200] (byte) KEY_DEL ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) KEY_RETURN and assignment [201] (byte) KEY_RETURN ← (byte/signed byte/word/signed word/dword/signed dword) 1 +Eliminating unused variable (byte) KEY_CRSR_RIGHT and assignment [202] (byte) KEY_CRSR_RIGHT ← (byte/signed byte/word/signed word/dword/signed dword) 2 +Eliminating unused variable (byte) KEY_F7 and assignment [203] (byte) KEY_F7 ← (byte/signed byte/word/signed word/dword/signed dword) 3 +Eliminating unused variable (byte) KEY_F1 and assignment [204] (byte) KEY_F1 ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) KEY_F3 and assignment [205] (byte) KEY_F3 ← (byte/signed byte/word/signed word/dword/signed dword) 5 +Eliminating unused variable (byte) KEY_F5 and assignment [206] (byte) KEY_F5 ← (byte/signed byte/word/signed word/dword/signed dword) 6 +Eliminating unused variable (byte) KEY_CRSR_DOWN and assignment [207] (byte) KEY_CRSR_DOWN ← (byte/signed byte/word/signed word/dword/signed dword) 7 +Eliminating unused variable (byte) KEY_LSHIFT and assignment [215] (byte) KEY_LSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 15 +Eliminating unused variable (byte) KEY_HOME and assignment [251] (byte) KEY_HOME ← (byte/signed byte/word/signed word/dword/signed dword) 51 +Eliminating unused variable (byte) KEY_RSHIFT and assignment [252] (byte) KEY_RSHIFT ← (byte/signed byte/word/signed word/dword/signed dword) 52 +Eliminating unused variable (byte) KEY_CTRL and assignment [258] (byte) KEY_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 58 +Eliminating unused variable (byte) KEY_COMMODORE and assignment [261] (byte) KEY_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 61 +Eliminating unused variable (byte) KEY_RUNSTOP and assignment [263] (byte) KEY_RUNSTOP ← (byte/signed byte/word/signed word/dword/signed dword) 63 +Eliminating unused variable (byte[]) keyboard_char_keycodes and assignment [264] (byte[]) keyboard_char_keycodes ← { (byte) KEY_AT, (byte) KEY_A, (byte) KEY_B, (byte) KEY_C, (byte) KEY_D, (byte) KEY_E, (byte) KEY_F, (byte) KEY_G, (byte) KEY_H, (byte) KEY_I, (byte) KEY_J, (byte) KEY_K, (byte) KEY_L, (byte) KEY_M, (byte) KEY_N, (byte) KEY_O, (byte) KEY_P, (byte) KEY_Q, (byte) KEY_R, (byte) KEY_S, (byte) KEY_T, (byte) KEY_U, (byte) KEY_V, (byte) KEY_W, (byte) KEY_X, (byte) KEY_Y, (byte) KEY_Z, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_POUND, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ARROW_UP, (byte) KEY_ARROW_LEFT, (byte) KEY_SPACE, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_ASTERISK, (byte) KEY_PLUS, (byte) KEY_COMMA, (byte) KEY_MINUS, (byte) KEY_DOT, (byte) KEY_SLASH, (byte) KEY_0, (byte) KEY_1, (byte) KEY_2, (byte) KEY_3, (byte) KEY_4, (byte) KEY_5, (byte) KEY_6, (byte) KEY_7, (byte) KEY_8, (byte) KEY_9, (byte) KEY_COLON, (byte) KEY_SEMICOLON, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte) KEY_EQUALS, (byte/signed byte/word/signed word/dword/signed dword) 63, (byte/signed byte/word/signed word/dword/signed dword) 63 } +Eliminating unused variable (byte[8]) keyboard_events and assignment [282] (byte[8]) keyboard_events ← { fill( 8, 0) } +Eliminating unused variable (byte) keyboard_events_size and assignment [283] (byte) keyboard_events_size ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) keyboard_modifiers and assignment [284] (byte) keyboard_modifiers ← (byte/signed byte/word/signed word/dword/signed dword) 0 +Eliminating unused variable (byte) KEY_MODIFIER_CTRL and assignment [287] (byte) KEY_MODIFIER_CTRL ← (byte/signed byte/word/signed word/dword/signed dword) 4 +Eliminating unused variable (byte) KEY_MODIFIER_COMMODORE and assignment [288] (byte) KEY_MODIFIER_COMMODORE ← (byte/signed byte/word/signed word/dword/signed dword) 8 +Eliminating unused variable (byte) KEY_MODIFIER_SHIFT and assignment [290] (byte) KEY_MODIFIER_SHIFT ← (byte~) $0 +Eliminating unused variable (byte[8]) keyboard_scan_values and assignment [291] (byte[8]) keyboard_scan_values ← { fill( 8, 0) } Eliminating unused variable - keeping the call (void~) bitmap_line::$9 Eliminating unused variable - keeping the call (void~) bitmap_line::$8 Eliminating unused variable - keeping the call (void~) bitmap_line::$14