mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-10-21 17:24:39 +00:00
3592 lines
195 KiB
Plaintext
3592 lines
195 KiB
Plaintext
Inlined call (byte~) vicSelectGfxBank::$0 ← call toDd00 (byte*) vicSelectGfxBank::gfx
|
|
|
|
CONTROL FLOW GRAPH SSA
|
|
@begin: scope:[] from
|
|
to:@1
|
|
|
|
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
|
|
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 gfx_init_plane_charset8::@8/(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 )
|
|
*((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
|
|
asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
to:dtvSetCpuBankSegment1::@return
|
|
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
|
|
return
|
|
to:@return
|
|
|
|
(void()) main()
|
|
main: scope:[main] from @1
|
|
asm { sei }
|
|
*((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
|
|
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
|
|
call gfx_init
|
|
to:main::@7
|
|
main::@7: scope:[main] from main
|
|
*((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE
|
|
*((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF
|
|
*((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
*((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL
|
|
*((const nomodify byte*) DTV_PLANEA_START_LO) ← <(const nomodify byte*) SCREEN
|
|
*((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN
|
|
*((const nomodify byte*) DTV_PLANEA_START_HI) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEA_STEP) ← (number) 1
|
|
*((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEB_START_LO) ← <(const nomodify byte*) CHARSET8
|
|
*((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8
|
|
*((const nomodify byte*) DTV_PLANEB_START_HI) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0
|
|
*((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0
|
|
*((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (number) 3
|
|
*((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (number) 3^(byte)(word)(const nomodify byte*) SCREEN/(number) $4000
|
|
*((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4
|
|
(byte) main::j#0 ← (byte) 0
|
|
to:main::@1
|
|
main::@1: scope:[main] from main::@1 main::@7
|
|
(byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@7/(byte) main::j#0 )
|
|
*((const nomodify byte*) DTV_PALETTE + (byte) main::j#2) ← (byte) main::j#2
|
|
(byte) main::j#1 ← (byte) main::j#2 + rangenext(0,$f)
|
|
(bool~) main::$1 ← (byte) main::j#1 != rangelast(0,$f)
|
|
if((bool~) main::$1) goto main::@1
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1 main::@6
|
|
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 }
|
|
*((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
*((const nomodify byte*) BORDER_COLOR) ← (number) 0
|
|
(byte) main::rst#0 ← (byte) $42
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3 main::@4
|
|
(byte) main::rst#2 ← phi( main::@3/(byte) main::rst#0 main::@4/(byte) main::rst#2 )
|
|
(bool~) main::$2 ← *((const nomodify byte*) RASTER) != (byte) main::rst#2
|
|
if((bool~) main::$2) goto main::@4
|
|
to:main::@5
|
|
main::@5: scope:[main] from main::@4
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
to:main::@6
|
|
main::@6: scope:[main] from main::@5 main::@6
|
|
(byte) main::rst#1 ← *((const nomodify byte*) RASTER)
|
|
(number~) main::$3 ← (byte) main::rst#1 & (number) 7
|
|
(number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (number~) main::$3
|
|
*((const nomodify byte*) VIC_CONTROL) ← (number~) main::$4
|
|
(number~) main::$5 ← (byte) main::rst#1 * (number) $10
|
|
*((const nomodify byte*) BORDER_COLOR) ← (number~) main::$5
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
(bool~) main::$6 ← (byte) main::rst#1 != (number) $f2
|
|
if((bool~) main::$6) goto main::@6
|
|
to:main::@2
|
|
main::@return: scope:[main] from main::@2
|
|
return
|
|
to:@return
|
|
|
|
(void()) gfx_init()
|
|
gfx_init: scope:[gfx_init] from main
|
|
call gfx_init_screen0
|
|
to:gfx_init::@1
|
|
gfx_init::@1: scope:[gfx_init] from gfx_init
|
|
call gfx_init_plane_charset8
|
|
to:gfx_init::@2
|
|
gfx_init::@2: scope:[gfx_init] from gfx_init::@1
|
|
to:gfx_init::@return
|
|
gfx_init::@return: scope:[gfx_init] from gfx_init::@2
|
|
return
|
|
to:@return
|
|
|
|
(void()) gfx_init_screen0()
|
|
gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init
|
|
(byte*) gfx_init_screen0::ch#0 ← (const nomodify byte*) SCREEN
|
|
(byte) gfx_init_screen0::cy#0 ← (byte) 0
|
|
to:gfx_init_screen0::@1
|
|
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
|
|
(byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(byte*) gfx_init_screen0::ch#0 gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#4 )
|
|
(byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) gfx_init_screen0::cy#0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
|
|
(byte) gfx_init_screen0::cx#0 ← (byte) 0
|
|
to:gfx_init_screen0::@2
|
|
gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2
|
|
(byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
|
|
(byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cx#0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 )
|
|
(byte) gfx_init_screen0::cy#2 ← phi( gfx_init_screen0::@1/(byte) gfx_init_screen0::cy#4 gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 )
|
|
(number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
|
|
(number~) gfx_init_screen0::$1 ← (number~) gfx_init_screen0::$0 * (number) $10
|
|
(number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (number) $f
|
|
(number~) gfx_init_screen0::$3 ← (number~) gfx_init_screen0::$1 | (number~) gfx_init_screen0::$2
|
|
*((byte*) gfx_init_screen0::ch#2) ← (number~) gfx_init_screen0::$3
|
|
(byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2
|
|
(byte) gfx_init_screen0::cx#1 ← (byte) gfx_init_screen0::cx#2 + rangenext(0,$27)
|
|
(bool~) gfx_init_screen0::$4 ← (byte) gfx_init_screen0::cx#1 != rangelast(0,$27)
|
|
if((bool~) gfx_init_screen0::$4) goto gfx_init_screen0::@2
|
|
to:gfx_init_screen0::@3
|
|
gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2
|
|
(byte*) gfx_init_screen0::ch#4 ← phi( gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
|
|
(byte) gfx_init_screen0::cy#3 ← phi( gfx_init_screen0::@2/(byte) gfx_init_screen0::cy#2 )
|
|
(byte) gfx_init_screen0::cy#1 ← (byte) gfx_init_screen0::cy#3 + rangenext(0,$18)
|
|
(bool~) gfx_init_screen0::$5 ← (byte) gfx_init_screen0::cy#1 != rangelast(0,$18)
|
|
if((bool~) gfx_init_screen0::$5) goto gfx_init_screen0::@1
|
|
to:gfx_init_screen0::@return
|
|
gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3
|
|
return
|
|
to:@return
|
|
|
|
(void()) gfx_init_plane_charset8()
|
|
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#0 ← (byte)(const nomodify byte*) CHARSET8/(number) $4000
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0 ← (byte) gfx_init_plane_charset8::gfxbCpuBank#0
|
|
call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@9
|
|
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#2 ← phi( gfx_init_plane_charset8/(byte) gfx_init_plane_charset8::gfxbCpuBank#0 )
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (byte) gfx_init_plane_charset8::gfxbCpuBank#2
|
|
(byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(number) $4000+(word)(const nomodify byte*) CHARSET8&(number) $3fff
|
|
(byte*) gfx_init_plane_charset8::chargen#0 ← (const nomodify byte*) CHARGEN+(number) 1
|
|
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM
|
|
(byte) gfx_init_plane_charset8::col#0 ← (byte) 0
|
|
(byte) gfx_init_plane_charset8::ch#0 ← (byte) 0
|
|
to:gfx_init_plane_charset8::@1
|
|
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
|
|
(byte) gfx_init_plane_charset8::ch#8 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::ch#1 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::ch#0 )
|
|
(byte) gfx_init_plane_charset8::col#6 ← phi( gfx_init_plane_charset8::@7/(byte) gfx_init_plane_charset8::col#8 gfx_init_plane_charset8::@9/(byte) gfx_init_plane_charset8::col#0 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#6 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::gfxa#8 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::gfxa#0 )
|
|
(byte*) gfx_init_plane_charset8::chargen#3 ← phi( gfx_init_plane_charset8::@7/(byte*) gfx_init_plane_charset8::chargen#5 gfx_init_plane_charset8::@9/(byte*) gfx_init_plane_charset8::chargen#0 )
|
|
(byte) gfx_init_plane_charset8::cr#0 ← (byte) 0
|
|
to:gfx_init_plane_charset8::@2
|
|
gfx_init_plane_charset8::@2: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@1 gfx_init_plane_charset8::@6
|
|
(byte) gfx_init_plane_charset8::ch#7 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
|
|
(byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::cr#0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 )
|
|
(byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 )
|
|
(byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
|
|
(byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
|
|
(byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
|
|
(byte) gfx_init_plane_charset8::cp#0 ← (byte) 0
|
|
to:gfx_init_plane_charset8::@3
|
|
gfx_init_plane_charset8::@3: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@2 gfx_init_plane_charset8::@4
|
|
(byte) gfx_init_plane_charset8::ch#5 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
|
|
(byte*) gfx_init_plane_charset8::chargen#7 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 )
|
|
(byte) gfx_init_plane_charset8::cr#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 )
|
|
(byte) gfx_init_plane_charset8::cp#3 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::cp#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 )
|
|
(byte) gfx_init_plane_charset8::col#4 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#3 ← phi( gfx_init_plane_charset8::@2/(byte*) gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 )
|
|
(byte) gfx_init_plane_charset8::bits#2 ← phi( gfx_init_plane_charset8::@2/(byte) gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::bits#1 )
|
|
(byte) gfx_init_plane_charset8::c#0 ← (byte) 0
|
|
(number~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
|
|
(bool~) gfx_init_plane_charset8::$3 ← (number~) gfx_init_plane_charset8::$2 != (number) 0
|
|
(bool~) gfx_init_plane_charset8::$4 ← ! (bool~) gfx_init_plane_charset8::$3
|
|
if((bool~) gfx_init_plane_charset8::$4) goto gfx_init_plane_charset8::@4
|
|
to:gfx_init_plane_charset8::@5
|
|
gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5
|
|
(byte) gfx_init_plane_charset8::ch#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::ch#6 )
|
|
(byte*) gfx_init_plane_charset8::chargen#6 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::chargen#8 )
|
|
(byte) gfx_init_plane_charset8::cr#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cr#5 )
|
|
(byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::cp#4 )
|
|
(byte) gfx_init_plane_charset8::col#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::col#3 )
|
|
(byte) gfx_init_plane_charset8::bits#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::bits#4 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#2 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 gfx_init_plane_charset8::@5/(byte*) gfx_init_plane_charset8::gfxa#4 )
|
|
(byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::c#0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#1 )
|
|
*((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2
|
|
(byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2
|
|
(number~) gfx_init_plane_charset8::$5 ← (byte) gfx_init_plane_charset8::bits#3 * (number) 2
|
|
(byte) gfx_init_plane_charset8::bits#1 ← (number~) gfx_init_plane_charset8::$5
|
|
(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 + rangenext(0,7)
|
|
(bool~) gfx_init_plane_charset8::$6 ← (byte) gfx_init_plane_charset8::cp#1 != rangelast(0,7)
|
|
if((bool~) gfx_init_plane_charset8::$6) goto gfx_init_plane_charset8::@3
|
|
to:gfx_init_plane_charset8::@6
|
|
gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3
|
|
(byte) gfx_init_plane_charset8::ch#6 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::ch#5 )
|
|
(byte*) gfx_init_plane_charset8::chargen#8 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::chargen#7 )
|
|
(byte) gfx_init_plane_charset8::cr#5 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cr#4 )
|
|
(byte) gfx_init_plane_charset8::cp#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::cp#3 )
|
|
(byte) gfx_init_plane_charset8::bits#4 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::bits#2 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#4 ← phi( gfx_init_plane_charset8::@3/(byte*) gfx_init_plane_charset8::gfxa#3 )
|
|
(byte) gfx_init_plane_charset8::col#3 ← phi( gfx_init_plane_charset8::@3/(byte) gfx_init_plane_charset8::col#4 )
|
|
(byte) gfx_init_plane_charset8::c#1 ← (byte) gfx_init_plane_charset8::col#3
|
|
to:gfx_init_plane_charset8::@4
|
|
gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4
|
|
(byte) gfx_init_plane_charset8::col#7 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::col#1 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#7 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::gfxa#1 )
|
|
(byte) gfx_init_plane_charset8::ch#3 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::ch#4 )
|
|
(byte*) gfx_init_plane_charset8::chargen#4 ← phi( gfx_init_plane_charset8::@4/(byte*) gfx_init_plane_charset8::chargen#6 )
|
|
(byte) gfx_init_plane_charset8::cr#2 ← phi( gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cr#3 )
|
|
(byte) gfx_init_plane_charset8::cr#1 ← (byte) gfx_init_plane_charset8::cr#2 + rangenext(0,7)
|
|
(bool~) gfx_init_plane_charset8::$7 ← (byte) gfx_init_plane_charset8::cr#1 != rangelast(0,7)
|
|
if((bool~) gfx_init_plane_charset8::$7) goto gfx_init_plane_charset8::@2
|
|
to:gfx_init_plane_charset8::@7
|
|
gfx_init_plane_charset8::@7: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@6
|
|
(byte) gfx_init_plane_charset8::col#8 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#7 )
|
|
(byte*) gfx_init_plane_charset8::gfxa#8 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#7 )
|
|
(byte*) gfx_init_plane_charset8::chargen#5 ← phi( gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#4 )
|
|
(byte) gfx_init_plane_charset8::ch#2 ← phi( gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::ch#3 )
|
|
(byte) gfx_init_plane_charset8::ch#1 ← (byte) gfx_init_plane_charset8::ch#2 + rangenext(0,$ff)
|
|
(bool~) gfx_init_plane_charset8::$8 ← (byte) gfx_init_plane_charset8::ch#1 != rangelast(0,$ff)
|
|
if((bool~) gfx_init_plane_charset8::$8) 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
|
|
*((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1 ← (byte)(number) $4000/(number) $4000
|
|
call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@10
|
|
gfx_init_plane_charset8::@10: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8
|
|
to:gfx_init_plane_charset8::@return
|
|
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@10
|
|
return
|
|
to:@return
|
|
@1: scope:[] from @begin
|
|
call main
|
|
to:@2
|
|
@2: scope:[] from @1
|
|
to:@end
|
|
@end: scope:[] from @2
|
|
|
|
SYMBOL TABLE SSA
|
|
(label) @1
|
|
(label) @2
|
|
(label) @begin
|
|
(label) @end
|
|
(const nomodify byte*) BORDER_COLOR = (byte*)(number) $d020
|
|
(const nomodify byte*) CHARGEN = (byte*)(number) $d000
|
|
(const nomodify byte*) CHARSET8 = (byte*)(number) $8000
|
|
(const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*)(number) $dd00
|
|
(const nomodify byte) DTV_BADLINE_OFF = (byte) $20
|
|
(const nomodify byte) DTV_CHUNKY = (byte) $40
|
|
(const nomodify byte*) DTV_CONTROL = (byte*)(number) $d03c
|
|
(const nomodify byte*) DTV_FEATURE = (byte*)(number) $d03f
|
|
(const nomodify byte) DTV_FEATURE_ENABLE = (byte) 1
|
|
(const nomodify byte) DTV_HIGHCOLOR = (byte) 4
|
|
(const nomodify byte) DTV_LINEAR = (byte) 1
|
|
(const nomodify byte*) DTV_PALETTE = (byte*)(number) $d200
|
|
(const nomodify byte*) DTV_PLANEA_MODULO_HI = (byte*)(number) $d039
|
|
(const nomodify byte*) DTV_PLANEA_MODULO_LO = (byte*)(number) $d038
|
|
(const nomodify byte*) DTV_PLANEA_START_HI = (byte*)(number) $d045
|
|
(const nomodify byte*) DTV_PLANEA_START_LO = (byte*)(number) $d03a
|
|
(const nomodify byte*) DTV_PLANEA_START_MI = (byte*)(number) $d03b
|
|
(const nomodify byte*) DTV_PLANEA_STEP = (byte*)(number) $d046
|
|
(const nomodify byte*) DTV_PLANEB_MODULO_HI = (byte*)(number) $d048
|
|
(const nomodify byte*) DTV_PLANEB_MODULO_LO = (byte*)(number) $d047
|
|
(const nomodify byte*) DTV_PLANEB_START_HI = (byte*)(number) $d04b
|
|
(const nomodify byte*) DTV_PLANEB_START_LO = (byte*)(number) $d049
|
|
(const nomodify byte*) DTV_PLANEB_START_MI = (byte*)(number) $d04a
|
|
(const nomodify byte*) DTV_PLANEB_STEP = (byte*)(number) $d04c
|
|
(byte) MOS6526_CIA::INTERRUPT
|
|
(byte) MOS6526_CIA::PORT_A
|
|
(byte) MOS6526_CIA::PORT_A_DDR
|
|
(byte) MOS6526_CIA::PORT_B
|
|
(byte) MOS6526_CIA::PORT_B_DDR
|
|
(byte) MOS6526_CIA::SERIAL_DATA
|
|
(word) MOS6526_CIA::TIMER_A
|
|
(byte) MOS6526_CIA::TIMER_A_CONTROL
|
|
(word) MOS6526_CIA::TIMER_B
|
|
(byte) MOS6526_CIA::TIMER_B_CONTROL
|
|
(byte) MOS6526_CIA::TOD_10THS
|
|
(byte) MOS6526_CIA::TOD_HOURS
|
|
(byte) MOS6526_CIA::TOD_MIN
|
|
(byte) MOS6526_CIA::TOD_SEC
|
|
(byte) MOS6569_VICII::BG_COLOR
|
|
(byte) MOS6569_VICII::BG_COLOR1
|
|
(byte) MOS6569_VICII::BG_COLOR2
|
|
(byte) MOS6569_VICII::BG_COLOR3
|
|
(byte) MOS6569_VICII::BORDER_COLOR
|
|
(byte) MOS6569_VICII::CONTROL1
|
|
(byte) MOS6569_VICII::CONTROL2
|
|
(byte) MOS6569_VICII::IRQ_ENABLE
|
|
(byte) MOS6569_VICII::IRQ_STATUS
|
|
(byte) MOS6569_VICII::LIGHTPEN_X
|
|
(byte) MOS6569_VICII::LIGHTPEN_Y
|
|
(byte) MOS6569_VICII::MEMORY
|
|
(byte) MOS6569_VICII::RASTER
|
|
(byte) MOS6569_VICII::SPRITE0_COLOR
|
|
(byte) MOS6569_VICII::SPRITE0_X
|
|
(byte) MOS6569_VICII::SPRITE0_Y
|
|
(byte) MOS6569_VICII::SPRITE1_COLOR
|
|
(byte) MOS6569_VICII::SPRITE1_X
|
|
(byte) MOS6569_VICII::SPRITE1_Y
|
|
(byte) MOS6569_VICII::SPRITE2_COLOR
|
|
(byte) MOS6569_VICII::SPRITE2_X
|
|
(byte) MOS6569_VICII::SPRITE2_Y
|
|
(byte) MOS6569_VICII::SPRITE3_COLOR
|
|
(byte) MOS6569_VICII::SPRITE3_X
|
|
(byte) MOS6569_VICII::SPRITE3_Y
|
|
(byte) MOS6569_VICII::SPRITE4_COLOR
|
|
(byte) MOS6569_VICII::SPRITE4_X
|
|
(byte) MOS6569_VICII::SPRITE4_Y
|
|
(byte) MOS6569_VICII::SPRITE5_COLOR
|
|
(byte) MOS6569_VICII::SPRITE5_X
|
|
(byte) MOS6569_VICII::SPRITE5_Y
|
|
(byte) MOS6569_VICII::SPRITE6_COLOR
|
|
(byte) MOS6569_VICII::SPRITE6_X
|
|
(byte) MOS6569_VICII::SPRITE6_Y
|
|
(byte) MOS6569_VICII::SPRITE7_COLOR
|
|
(byte) MOS6569_VICII::SPRITE7_X
|
|
(byte) MOS6569_VICII::SPRITE7_Y
|
|
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_ENABLE
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_X
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
|
|
(byte) MOS6569_VICII::SPRITES_MC
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR1
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR2
|
|
(byte) MOS6569_VICII::SPRITES_PRIORITY
|
|
(byte) MOS6569_VICII::SPRITES_XMSB
|
|
(byte) MOS6581_SID::CH1_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH1_CONTROL
|
|
(word) MOS6581_SID::CH1_FREQ
|
|
(word) MOS6581_SID::CH1_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH2_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH2_CONTROL
|
|
(word) MOS6581_SID::CH2_FREQ
|
|
(word) MOS6581_SID::CH2_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH3_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH3_CONTROL
|
|
(byte) MOS6581_SID::CH3_ENV
|
|
(word) MOS6581_SID::CH3_FREQ
|
|
(byte) MOS6581_SID::CH3_OSC
|
|
(word) MOS6581_SID::CH3_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
|
|
(byte) MOS6581_SID::FILTER_SETUP
|
|
(byte) MOS6581_SID::POT_X
|
|
(byte) MOS6581_SID::POT_Y
|
|
(byte) MOS6581_SID::VOLUME_FILTER_MODE
|
|
(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A = (byte) 0
|
|
(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = (byte) 2
|
|
(const nomodify byte*) PROCPORT = (byte*)(number) 1
|
|
(const nomodify byte*) PROCPORT_DDR = (byte*)(number) 0
|
|
(const nomodify byte) PROCPORT_DDR_MEMORY_MASK = (byte) 7
|
|
(const nomodify byte) PROCPORT_RAM_CHARROM = (byte) 1
|
|
(const nomodify byte) PROCPORT_RAM_IO = (byte) 5
|
|
(const nomodify byte*) RASTER = (byte*)(number) $d012
|
|
(const nomodify byte*) SCREEN = (byte*)(number) $7c00
|
|
(const nomodify byte*) VIC_CONTROL = (byte*)(number) $d011
|
|
(const nomodify byte*) VIC_CONTROL2 = (byte*)(number) $d016
|
|
(const nomodify byte) VIC_CSEL = (byte) 8
|
|
(const nomodify byte) VIC_DEN = (byte) $10
|
|
(const nomodify byte) VIC_ECM = (byte) $40
|
|
(const nomodify byte) VIC_MCM = (byte) $10
|
|
(const nomodify byte*) VIC_MEMORY = (byte*)(number) $d018
|
|
(const nomodify byte) VIC_RSEL = (byte) 8
|
|
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
|
|
(label) dtvSetCpuBankSegment1::@return
|
|
(const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*)(number) $ff
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#0
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#1
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2
|
|
(void()) gfx_init()
|
|
(label) gfx_init::@1
|
|
(label) gfx_init::@2
|
|
(label) gfx_init::@return
|
|
(void()) gfx_init_plane_charset8()
|
|
(number~) gfx_init_plane_charset8::$2
|
|
(bool~) gfx_init_plane_charset8::$3
|
|
(bool~) gfx_init_plane_charset8::$4
|
|
(number~) gfx_init_plane_charset8::$5
|
|
(bool~) gfx_init_plane_charset8::$6
|
|
(bool~) gfx_init_plane_charset8::$7
|
|
(bool~) gfx_init_plane_charset8::$8
|
|
(label) gfx_init_plane_charset8::@1
|
|
(label) gfx_init_plane_charset8::@10
|
|
(label) gfx_init_plane_charset8::@2
|
|
(label) gfx_init_plane_charset8::@3
|
|
(label) gfx_init_plane_charset8::@4
|
|
(label) gfx_init_plane_charset8::@5
|
|
(label) gfx_init_plane_charset8::@6
|
|
(label) gfx_init_plane_charset8::@7
|
|
(label) gfx_init_plane_charset8::@8
|
|
(label) gfx_init_plane_charset8::@9
|
|
(label) gfx_init_plane_charset8::@return
|
|
(byte) gfx_init_plane_charset8::bits
|
|
(byte) gfx_init_plane_charset8::bits#0
|
|
(byte) gfx_init_plane_charset8::bits#1
|
|
(byte) gfx_init_plane_charset8::bits#2
|
|
(byte) gfx_init_plane_charset8::bits#3
|
|
(byte) gfx_init_plane_charset8::bits#4
|
|
(byte) gfx_init_plane_charset8::c
|
|
(byte) gfx_init_plane_charset8::c#0
|
|
(byte) gfx_init_plane_charset8::c#1
|
|
(byte) gfx_init_plane_charset8::c#2
|
|
(byte) gfx_init_plane_charset8::ch
|
|
(byte) gfx_init_plane_charset8::ch#0
|
|
(byte) gfx_init_plane_charset8::ch#1
|
|
(byte) gfx_init_plane_charset8::ch#2
|
|
(byte) gfx_init_plane_charset8::ch#3
|
|
(byte) gfx_init_plane_charset8::ch#4
|
|
(byte) gfx_init_plane_charset8::ch#5
|
|
(byte) gfx_init_plane_charset8::ch#6
|
|
(byte) gfx_init_plane_charset8::ch#7
|
|
(byte) gfx_init_plane_charset8::ch#8
|
|
(byte*) gfx_init_plane_charset8::chargen
|
|
(byte*) gfx_init_plane_charset8::chargen#0
|
|
(byte*) gfx_init_plane_charset8::chargen#1
|
|
(byte*) gfx_init_plane_charset8::chargen#2
|
|
(byte*) gfx_init_plane_charset8::chargen#3
|
|
(byte*) gfx_init_plane_charset8::chargen#4
|
|
(byte*) gfx_init_plane_charset8::chargen#5
|
|
(byte*) gfx_init_plane_charset8::chargen#6
|
|
(byte*) gfx_init_plane_charset8::chargen#7
|
|
(byte*) gfx_init_plane_charset8::chargen#8
|
|
(byte) gfx_init_plane_charset8::col
|
|
(byte) gfx_init_plane_charset8::col#0
|
|
(byte) gfx_init_plane_charset8::col#1
|
|
(byte) gfx_init_plane_charset8::col#2
|
|
(byte) gfx_init_plane_charset8::col#3
|
|
(byte) gfx_init_plane_charset8::col#4
|
|
(byte) gfx_init_plane_charset8::col#5
|
|
(byte) gfx_init_plane_charset8::col#6
|
|
(byte) gfx_init_plane_charset8::col#7
|
|
(byte) gfx_init_plane_charset8::col#8
|
|
(byte) gfx_init_plane_charset8::cp
|
|
(byte) gfx_init_plane_charset8::cp#0
|
|
(byte) gfx_init_plane_charset8::cp#1
|
|
(byte) gfx_init_plane_charset8::cp#2
|
|
(byte) gfx_init_plane_charset8::cp#3
|
|
(byte) gfx_init_plane_charset8::cp#4
|
|
(byte) gfx_init_plane_charset8::cr
|
|
(byte) gfx_init_plane_charset8::cr#0
|
|
(byte) gfx_init_plane_charset8::cr#1
|
|
(byte) gfx_init_plane_charset8::cr#2
|
|
(byte) gfx_init_plane_charset8::cr#3
|
|
(byte) gfx_init_plane_charset8::cr#4
|
|
(byte) gfx_init_plane_charset8::cr#5
|
|
(byte) gfx_init_plane_charset8::cr#6
|
|
(byte*) gfx_init_plane_charset8::gfxa
|
|
(byte*) gfx_init_plane_charset8::gfxa#0
|
|
(byte*) gfx_init_plane_charset8::gfxa#1
|
|
(byte*) gfx_init_plane_charset8::gfxa#2
|
|
(byte*) gfx_init_plane_charset8::gfxa#3
|
|
(byte*) gfx_init_plane_charset8::gfxa#4
|
|
(byte*) gfx_init_plane_charset8::gfxa#5
|
|
(byte*) gfx_init_plane_charset8::gfxa#6
|
|
(byte*) gfx_init_plane_charset8::gfxa#7
|
|
(byte*) gfx_init_plane_charset8::gfxa#8
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#0
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#1
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank#2
|
|
(void()) gfx_init_screen0()
|
|
(number~) gfx_init_screen0::$0
|
|
(number~) gfx_init_screen0::$1
|
|
(number~) gfx_init_screen0::$2
|
|
(number~) gfx_init_screen0::$3
|
|
(bool~) gfx_init_screen0::$4
|
|
(bool~) gfx_init_screen0::$5
|
|
(label) gfx_init_screen0::@1
|
|
(label) gfx_init_screen0::@2
|
|
(label) gfx_init_screen0::@3
|
|
(label) gfx_init_screen0::@return
|
|
(byte*) gfx_init_screen0::ch
|
|
(byte*) gfx_init_screen0::ch#0
|
|
(byte*) gfx_init_screen0::ch#1
|
|
(byte*) gfx_init_screen0::ch#2
|
|
(byte*) gfx_init_screen0::ch#3
|
|
(byte*) gfx_init_screen0::ch#4
|
|
(byte) gfx_init_screen0::cx
|
|
(byte) gfx_init_screen0::cx#0
|
|
(byte) gfx_init_screen0::cx#1
|
|
(byte) gfx_init_screen0::cx#2
|
|
(byte) gfx_init_screen0::cy
|
|
(byte) gfx_init_screen0::cy#0
|
|
(byte) gfx_init_screen0::cy#1
|
|
(byte) gfx_init_screen0::cy#2
|
|
(byte) gfx_init_screen0::cy#3
|
|
(byte) gfx_init_screen0::cy#4
|
|
(void()) main()
|
|
(bool~) main::$1
|
|
(bool~) main::$2
|
|
(number~) main::$3
|
|
(number~) main::$4
|
|
(number~) main::$5
|
|
(bool~) main::$6
|
|
(label) main::@1
|
|
(label) main::@2
|
|
(label) main::@3
|
|
(label) main::@4
|
|
(label) main::@5
|
|
(label) main::@6
|
|
(label) main::@7
|
|
(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
|
|
|
|
Adding number conversion cast (unumber) VIC_DEN|VIC_ECM|VIC_RSEL|3 in *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEA_START_HI) ← (number) 0
|
|
Adding number conversion cast (unumber) 1 in *((const nomodify byte*) DTV_PLANEA_STEP) ← (number) 1
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_START_HI) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_STEP) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (number) 0
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (number) 0
|
|
Adding number conversion cast (unumber) 3 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (number) 3
|
|
Adding number conversion cast (unumber) 3^(byte)(word)SCREEN/$4000 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (number) 3^(byte)(word)(const nomodify byte*) SCREEN/(number) $4000
|
|
Adding number conversion cast (unumber) 3 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← ((unumber)) (number) 3^(byte)(word)(const nomodify byte*) SCREEN/(number) $4000
|
|
Adding number conversion cast (unumber) $4000 in *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← ((unumber)) (unumber)(number) 3^(byte)(word)(const nomodify byte*) SCREEN/(number) $4000
|
|
Adding number conversion cast (unumber) (byte)(word)SCREEN&$3fff/$40|>(word)SCREEN&$3fff/4 in *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) >(word)SCREEN&$3fff/4 in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) $3fff in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) VIC_DEN|VIC_ECM|VIC_RSEL|3 in *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
Adding number conversion cast (unumber) 3 in *((const nomodify byte*) VIC_CONTROL) ← ((unumber)) (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(number) 3
|
|
Adding number conversion cast (unumber) 0 in *((const nomodify byte*) BORDER_COLOR) ← (number) 0
|
|
Adding number conversion cast (unumber) 7 in (number~) main::$3 ← (byte) main::rst#1 & (number) 7
|
|
Adding number conversion cast (unumber) main::$3 in (number~) main::$3 ← (byte) main::rst#1 & (unumber)(number) 7
|
|
Adding number conversion cast (unumber) main::$4 in (number~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (unumber~) main::$3
|
|
Adding number conversion cast (unumber) $10 in (number~) main::$5 ← (byte) main::rst#1 * (number) $10
|
|
Adding number conversion cast (unumber) main::$5 in (number~) main::$5 ← (byte) main::rst#1 * (unumber)(number) $10
|
|
Adding number conversion cast (unumber) $f2 in (bool~) main::$6 ← (byte) main::rst#1 != (number) $f2
|
|
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (number) $f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$0 in (number~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (unumber)(number) $f
|
|
Adding number conversion cast (unumber) $10 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (number) $10
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$1 in (number~) gfx_init_screen0::$1 ← (unumber~) gfx_init_screen0::$0 * (unumber)(number) $10
|
|
Adding number conversion cast (unumber) $f in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (number) $f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$2 in (number~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (unumber)(number) $f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$3 in (number~) gfx_init_screen0::$3 ← (unumber~) gfx_init_screen0::$1 | (unumber~) gfx_init_screen0::$2
|
|
Adding number conversion cast (unumber) $4000 in (byte) gfx_init_plane_charset8::gfxbCpuBank#0 ← (byte)(const nomodify byte*) CHARSET8/(number) $4000
|
|
Adding number conversion cast (unumber) $3fff in (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(number) $4000+(word)(const nomodify byte*) CHARSET8&(number) $3fff
|
|
Adding number conversion cast (unumber) 1 in (byte*) gfx_init_plane_charset8::chargen#0 ← (const nomodify byte*) CHARGEN+(number) 1
|
|
Adding number conversion cast (unumber) $80 in (number~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (number) $80
|
|
Adding number conversion cast (unumber) gfx_init_plane_charset8::$2 in (number~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (unumber)(number) $80
|
|
Adding number conversion cast (unumber) 0 in (bool~) gfx_init_plane_charset8::$3 ← (unumber~) gfx_init_plane_charset8::$2 != (number) 0
|
|
Adding number conversion cast (unumber) 2 in (number~) gfx_init_plane_charset8::$5 ← (byte) gfx_init_plane_charset8::bits#3 * (number) 2
|
|
Adding number conversion cast (unumber) gfx_init_plane_charset8::$5 in (number~) gfx_init_plane_charset8::$5 ← (byte) gfx_init_plane_charset8::bits#3 * (unumber)(number) 2
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Adding number conversion cast (unumber) $40 in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) 4 in *((const nomodify byte*) VIC_MEMORY) ← ((unumber)) (byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(number) 4
|
|
Adding number conversion cast (unumber) $4000 in (byte*) gfx_init_plane_charset8::gfxa#0 ← (byte*)(number) $4000+(word)(const nomodify byte*) CHARSET8&(unumber)(number) $3fff
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEA_START_HI) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEA_STEP) ← (unumber)(number) 1
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEB_START_HI) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEB_STEP) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (unumber)(number) 0
|
|
Inlining cast *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (unumber)(number) 0
|
|
Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (unumber)(number) 3
|
|
Inlining cast *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (unumber)(unumber)(number) 3^(byte)(word)(const nomodify byte*) SCREEN/(unumber)(number) $4000
|
|
Inlining cast *((const nomodify byte*) VIC_MEMORY) ← (unumber)(byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) 4
|
|
Inlining cast *((const nomodify byte*) VIC_CONTROL) ← (unumber)(const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3
|
|
Inlining cast *((const nomodify byte*) BORDER_COLOR) ← (unumber)(number) 0
|
|
Successful SSA optimization Pass2InlineCast
|
|
Simplifying constant pointer cast (byte*) 53266
|
|
Simplifying constant pointer cast (byte*) 53280
|
|
Simplifying constant pointer cast (byte*) 53265
|
|
Simplifying constant pointer cast (byte*) 53270
|
|
Simplifying constant pointer cast (byte*) 53272
|
|
Simplifying constant pointer cast (byte*) 0
|
|
Simplifying constant pointer cast (byte*) 1
|
|
Simplifying constant pointer cast (byte*) 53248
|
|
Simplifying constant pointer cast (struct MOS6526_CIA*) 56576
|
|
Simplifying constant pointer cast (byte*) 53311
|
|
Simplifying constant pointer cast (byte*) 53308
|
|
Simplifying constant pointer cast (byte*) 53760
|
|
Simplifying constant pointer cast (byte*) 53306
|
|
Simplifying constant pointer cast (byte*) 53307
|
|
Simplifying constant pointer cast (byte*) 53317
|
|
Simplifying constant pointer cast (byte*) 53318
|
|
Simplifying constant pointer cast (byte*) 53304
|
|
Simplifying constant pointer cast (byte*) 53305
|
|
Simplifying constant pointer cast (byte*) 53321
|
|
Simplifying constant pointer cast (byte*) 53322
|
|
Simplifying constant pointer cast (byte*) 53323
|
|
Simplifying constant pointer cast (byte*) 53324
|
|
Simplifying constant pointer cast (byte*) 53319
|
|
Simplifying constant pointer cast (byte*) 53320
|
|
Simplifying constant pointer cast (byte*) 255
|
|
Simplifying constant pointer cast (byte*) 31744
|
|
Simplifying constant pointer cast (byte*) 32768
|
|
Simplifying constant integer cast (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast (unumber)(number) 3^(byte)(word)(const nomodify byte*) SCREEN/(unumber)(number) $4000
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast $4000
|
|
Simplifying constant integer cast (byte)(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) $40|(unumber)>(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) 4
|
|
Simplifying constant integer cast $3fff
|
|
Simplifying constant integer cast $40
|
|
Simplifying constant integer cast >(word)(const nomodify byte*) SCREEN&(unumber)(number) $3fff/(unumber)(number) 4
|
|
Simplifying constant integer cast $3fff
|
|
Simplifying constant integer cast 4
|
|
Simplifying constant integer cast (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(unumber)(number) 3
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 7
|
|
Simplifying constant integer cast $10
|
|
Simplifying constant integer cast $f2
|
|
Simplifying constant integer cast $f
|
|
Simplifying constant integer cast $10
|
|
Simplifying constant integer cast $f
|
|
Simplifying constant integer cast $4000
|
|
Simplifying constant integer cast $4000
|
|
Simplifying constant integer cast $3fff
|
|
Simplifying constant integer cast 1
|
|
Simplifying constant integer cast $80
|
|
Simplifying constant integer cast 0
|
|
Simplifying constant integer cast 2
|
|
Successful SSA optimization PassNCastSimplification
|
|
Finalized unsigned number type (byte) 3
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 3
|
|
Finalized unsigned number type (byte) 3
|
|
Finalized unsigned number type (word) $4000
|
|
Finalized unsigned number type (word) $3fff
|
|
Finalized unsigned number type (byte) $40
|
|
Finalized unsigned number type (word) $3fff
|
|
Finalized unsigned number type (byte) 4
|
|
Finalized unsigned number type (byte) 3
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 7
|
|
Finalized unsigned number type (byte) $10
|
|
Finalized unsigned number type (byte) $f2
|
|
Finalized unsigned number type (byte) $f
|
|
Finalized unsigned number type (byte) $10
|
|
Finalized unsigned number type (byte) $f
|
|
Finalized unsigned number type (word) $4000
|
|
Finalized unsigned number type (word) $4000
|
|
Finalized unsigned number type (word) $3fff
|
|
Finalized unsigned number type (byte) 1
|
|
Finalized unsigned number type (byte) $80
|
|
Finalized unsigned number type (byte) 0
|
|
Finalized unsigned number type (byte) 2
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Inferred type updated to byte in (unumber~) main::$3 ← (byte) main::rst#1 & (byte) 7
|
|
Inferred type updated to byte in (unumber~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3
|
|
Inferred type updated to byte in (unumber~) main::$5 ← (byte) main::rst#1 * (byte) $10
|
|
Inferred type updated to byte in (unumber~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#2 & (byte) $f
|
|
Inferred type updated to byte in (unumber~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 * (byte) $10
|
|
Inferred type updated to byte in (unumber~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f
|
|
Inferred type updated to byte in (unumber~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2
|
|
Inferred type updated to byte in (unumber~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80
|
|
Inferred type updated to byte in (unumber~) gfx_init_plane_charset8::$5 ← (byte) gfx_init_plane_charset8::bits#3 * (byte) 2
|
|
Inversing boolean not [94] (bool~) gfx_init_plane_charset8::$4 ← (byte~) gfx_init_plane_charset8::$2 == (byte) 0 from [93] (bool~) gfx_init_plane_charset8::$3 ← (byte~) gfx_init_plane_charset8::$2 != (byte) 0
|
|
Successful SSA optimization Pass2UnaryNotSimplification
|
|
Alias gfx_init_screen0::cy#2 = gfx_init_screen0::cy#3
|
|
Alias gfx_init_screen0::ch#1 = gfx_init_screen0::ch#4
|
|
Alias gfx_init_plane_charset8::gfxbCpuBank#0 = gfx_init_plane_charset8::gfxbCpuBank#2
|
|
Alias gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::$5
|
|
Alias gfx_init_plane_charset8::col#3 = gfx_init_plane_charset8::col#4 gfx_init_plane_charset8::c#1
|
|
Alias gfx_init_plane_charset8::gfxa#3 = gfx_init_plane_charset8::gfxa#4
|
|
Alias gfx_init_plane_charset8::bits#2 = gfx_init_plane_charset8::bits#4
|
|
Alias gfx_init_plane_charset8::cp#3 = gfx_init_plane_charset8::cp#4
|
|
Alias gfx_init_plane_charset8::cr#4 = gfx_init_plane_charset8::cr#5
|
|
Alias gfx_init_plane_charset8::chargen#7 = gfx_init_plane_charset8::chargen#8
|
|
Alias gfx_init_plane_charset8::ch#5 = gfx_init_plane_charset8::ch#6
|
|
Alias gfx_init_plane_charset8::cr#2 = gfx_init_plane_charset8::cr#3
|
|
Alias gfx_init_plane_charset8::chargen#4 = gfx_init_plane_charset8::chargen#6 gfx_init_plane_charset8::chargen#5
|
|
Alias gfx_init_plane_charset8::ch#2 = gfx_init_plane_charset8::ch#3 gfx_init_plane_charset8::ch#4
|
|
Alias gfx_init_plane_charset8::gfxa#1 = gfx_init_plane_charset8::gfxa#7 gfx_init_plane_charset8::gfxa#8
|
|
Alias gfx_init_plane_charset8::col#1 = gfx_init_plane_charset8::col#7 gfx_init_plane_charset8::col#8
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Alias gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::gfxa#3
|
|
Alias gfx_init_plane_charset8::bits#2 = gfx_init_plane_charset8::bits#3
|
|
Alias gfx_init_plane_charset8::col#2 = gfx_init_plane_charset8::col#3
|
|
Alias gfx_init_plane_charset8::cp#2 = gfx_init_plane_charset8::cp#3
|
|
Alias gfx_init_plane_charset8::cr#2 = gfx_init_plane_charset8::cr#4
|
|
Alias gfx_init_plane_charset8::chargen#4 = gfx_init_plane_charset8::chargen#7
|
|
Alias gfx_init_plane_charset8::ch#2 = gfx_init_plane_charset8::ch#5
|
|
Successful SSA optimization Pass2AliasElimination
|
|
Identical Phi Values (byte) main::rst#2 (byte) main::rst#0
|
|
Identical Phi Values (byte) gfx_init_screen0::cy#2 (byte) gfx_init_screen0::cy#4
|
|
Identical Phi Values (byte) gfx_init_plane_charset8::cr#2 (byte) gfx_init_plane_charset8::cr#6
|
|
Identical Phi Values (byte*) gfx_init_plane_charset8::chargen#4 (byte*) gfx_init_plane_charset8::chargen#1
|
|
Identical Phi Values (byte) gfx_init_plane_charset8::ch#2 (byte) gfx_init_plane_charset8::ch#7
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Identical Phi Values (byte) gfx_init_plane_charset8::ch#7 (byte) gfx_init_plane_charset8::ch#8
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Simple Condition (bool~) main::$1 [32] if((byte) main::j#1!=rangelast(0,$f)) goto main::@1
|
|
Simple Condition (bool~) main::$2 [40] if(*((const nomodify byte*) RASTER)!=(byte) main::rst#0) goto main::@4
|
|
Simple Condition (bool~) main::$6 [50] if((byte) main::rst#1!=(byte) $f2) goto main::@6
|
|
Simple Condition (bool~) gfx_init_screen0::$4 [68] if((byte) gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2
|
|
Simple Condition (bool~) gfx_init_screen0::$5 [71] if((byte) gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1
|
|
Simple Condition (bool~) gfx_init_plane_charset8::$4 [92] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4
|
|
Simple Condition (bool~) gfx_init_plane_charset8::$6 [100] if((byte) gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3
|
|
Simple Condition (bool~) gfx_init_plane_charset8::$7 [103] if((byte) gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2
|
|
Simple Condition (bool~) gfx_init_plane_charset8::$8 [106] if((byte) gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1
|
|
Successful SSA optimization Pass2ConditionalJumpSimplification
|
|
Constant (const byte) main::j#0 = 0
|
|
Constant (const byte) main::rst#0 = $42
|
|
Constant (const byte*) gfx_init_screen0::ch#0 = SCREEN
|
|
Constant (const byte) gfx_init_screen0::cy#0 = 0
|
|
Constant (const byte) gfx_init_screen0::cx#0 = 0
|
|
Constant (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 = (byte)CHARSET8/$4000
|
|
Constant (const byte*) gfx_init_plane_charset8::gfxa#0 = (byte*)$4000+(word)CHARSET8&$3fff
|
|
Constant (const byte*) gfx_init_plane_charset8::chargen#0 = CHARGEN+1
|
|
Constant (const byte) gfx_init_plane_charset8::col#0 = 0
|
|
Constant (const byte) gfx_init_plane_charset8::ch#0 = 0
|
|
Constant (const byte) gfx_init_plane_charset8::cr#0 = 0
|
|
Constant (const byte) gfx_init_plane_charset8::cp#0 = 0
|
|
Constant (const byte) gfx_init_plane_charset8::c#0 = 0
|
|
Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte)$4000/$4000
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Constant (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0 = gfx_init_plane_charset8::gfxbCpuBank#0
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
if() condition always true - replacing block destination [33] if(true) goto main::@3
|
|
Successful SSA optimization Pass2ConstantIfs
|
|
Resolved ranged next value [30] main::j#1 ← ++ main::j#2 to ++
|
|
Resolved ranged comparison value [32] if(main::j#1!=rangelast(0,$f)) goto main::@1 to (number) $10
|
|
Resolved ranged next value [66] gfx_init_screen0::cx#1 ← ++ gfx_init_screen0::cx#2 to ++
|
|
Resolved ranged comparison value [68] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2 to (number) $28
|
|
Resolved ranged next value [69] gfx_init_screen0::cy#1 ← ++ gfx_init_screen0::cy#4 to ++
|
|
Resolved ranged comparison value [71] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1 to (number) $19
|
|
Resolved ranged next value [98] gfx_init_plane_charset8::cp#1 ← ++ gfx_init_plane_charset8::cp#2 to ++
|
|
Resolved ranged comparison value [100] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3 to (number) 8
|
|
Resolved ranged next value [101] gfx_init_plane_charset8::cr#1 ← ++ gfx_init_plane_charset8::cr#6 to ++
|
|
Resolved ranged comparison value [103] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2 to (number) 8
|
|
Resolved ranged next value [104] gfx_init_plane_charset8::ch#1 ← ++ gfx_init_plane_charset8::ch#8 to ++
|
|
Resolved ranged comparison value [106] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1 to (number) 0
|
|
Simplifying constant evaluating to zero (word)(const nomodify byte*) CHARSET8&(word) $3fff in
|
|
Simplifying constant evaluating to zero <(const nomodify byte*) SCREEN in [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← <(const nomodify byte*) SCREEN
|
|
Simplifying constant evaluating to zero <(const nomodify byte*) CHARSET8 in [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← <(const nomodify byte*) CHARSET8
|
|
Successful SSA optimization PassNSimplifyConstantZero
|
|
Simplifying expression containing zero $4000 in
|
|
Simplifying expression containing zero (byte*)CIA2 in [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000
|
|
Successful SSA optimization PassNSimplifyExpressionWithZero
|
|
Eliminating unused variable (byte) gfx_init_plane_charset8::gfxbCpuBank#1 and assignment [62] (byte) gfx_init_plane_charset8::gfxbCpuBank#1 ← ++ (const byte) gfx_init_plane_charset8::gfxbCpuBank#0
|
|
Eliminating unused constant (const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A
|
|
Successful SSA optimization PassNEliminateUnusedVars
|
|
Removing unused block main::@return
|
|
Successful SSA optimization Pass2EliminateUnusedBlocks
|
|
Adding number conversion cast (unumber) $10 in if((byte) main::j#1!=(number) $10) goto main::@1
|
|
Adding number conversion cast (unumber) $28 in if((byte) gfx_init_screen0::cx#1!=(number) $28) goto gfx_init_screen0::@2
|
|
Adding number conversion cast (unumber) $19 in if((byte) gfx_init_screen0::cy#1!=(number) $19) goto gfx_init_screen0::@1
|
|
Adding number conversion cast (unumber) 8 in if((byte) gfx_init_plane_charset8::cp#1!=(number) 8) goto gfx_init_plane_charset8::@3
|
|
Adding number conversion cast (unumber) 8 in if((byte) gfx_init_plane_charset8::cr#1!=(number) 8) goto gfx_init_plane_charset8::@2
|
|
Adding number conversion cast (unumber) 0 in if((byte) gfx_init_plane_charset8::ch#1!=(number) 0) goto gfx_init_plane_charset8::@1
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Simplifying constant integer cast $10
|
|
Simplifying constant integer cast $28
|
|
Simplifying constant integer cast $19
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast 8
|
|
Simplifying constant integer cast 0
|
|
Successful SSA optimization PassNCastSimplification
|
|
Finalized unsigned number type (byte) $10
|
|
Finalized unsigned number type (byte) $28
|
|
Finalized unsigned number type (byte) $19
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) 8
|
|
Finalized unsigned number type (byte) 0
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Rewriting multiplication to use shift [40] (byte~) main::$5 ← (byte) main::rst#1 * (byte) $10
|
|
Rewriting multiplication to use shift [50] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 * (byte) $10
|
|
Rewriting multiplication to use shift [72] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 * (byte) 2
|
|
Successful SSA optimization Pass2MultiplyToShiftRewriting
|
|
Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#1
|
|
Inlining constant with var siblings (const byte) dtvSetCpuBankSegment1::cpuBankIdx#0
|
|
Inlining constant with var siblings (const byte) main::j#0
|
|
Inlining constant with var siblings (const byte) main::rst#0
|
|
Inlining constant with var siblings (const byte*) gfx_init_screen0::ch#0
|
|
Inlining constant with var siblings (const byte) gfx_init_screen0::cy#0
|
|
Inlining constant with var siblings (const byte) gfx_init_screen0::cx#0
|
|
Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::gfxa#0
|
|
Inlining constant with var siblings (const byte*) gfx_init_plane_charset8::chargen#0
|
|
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::col#0
|
|
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::ch#0
|
|
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cr#0
|
|
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::cp#0
|
|
Inlining constant with var siblings (const byte) gfx_init_plane_charset8::c#0
|
|
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#1 = (byte)(number) $4000/(number) $4000
|
|
Constant inlined gfx_init_screen0::cx#0 = (byte) 0
|
|
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#0 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0
|
|
Constant inlined gfx_init_plane_charset8::gfxa#0 = (byte*)(word) $4000
|
|
Constant inlined main::rst#0 = (byte) $42
|
|
Constant inlined gfx_init_plane_charset8::cp#0 = (byte) 0
|
|
Constant inlined gfx_init_screen0::cy#0 = (byte) 0
|
|
Constant inlined gfx_init_plane_charset8::cr#0 = (byte) 0
|
|
Constant inlined gfx_init_plane_charset8::c#0 = (byte) 0
|
|
Constant inlined gfx_init_screen0::ch#0 = (const nomodify byte*) SCREEN
|
|
Constant inlined gfx_init_plane_charset8::chargen#0 = (const nomodify byte*) CHARGEN+(byte) 1
|
|
Constant inlined gfx_init_plane_charset8::col#0 = (byte) 0
|
|
Constant inlined gfx_init_plane_charset8::ch#0 = (byte) 0
|
|
Constant inlined main::j#0 = (byte) 0
|
|
Successful SSA optimization Pass2ConstantInlining
|
|
Added new block during phi lifting main::@8(between main::@1 and main::@1)
|
|
Added new block during phi lifting gfx_init_screen0::@4(between gfx_init_screen0::@3 and gfx_init_screen0::@1)
|
|
Added new block during phi lifting gfx_init_screen0::@5(between gfx_init_screen0::@2 and gfx_init_screen0::@2)
|
|
Added new block during phi lifting gfx_init_plane_charset8::@11(between gfx_init_plane_charset8::@7 and gfx_init_plane_charset8::@1)
|
|
Added new block during phi lifting gfx_init_plane_charset8::@12(between gfx_init_plane_charset8::@6 and gfx_init_plane_charset8::@2)
|
|
Added new block during phi lifting gfx_init_plane_charset8::@13(between gfx_init_plane_charset8::@4 and gfx_init_plane_charset8::@3)
|
|
Adding NOP phi() at start of @begin
|
|
Adding NOP phi() at start of @1
|
|
Adding NOP phi() at start of @2
|
|
Adding NOP phi() at start of @end
|
|
Adding NOP phi() at start of main::@2
|
|
Adding NOP phi() at start of gfx_init
|
|
Adding NOP phi() at start of gfx_init::@1
|
|
Adding NOP phi() at start of gfx_init::@2
|
|
Adding NOP phi() at start of gfx_init_plane_charset8
|
|
Adding NOP phi() at start of gfx_init_plane_charset8::@10
|
|
Adding NOP phi() at start of gfx_init_screen0
|
|
CALL GRAPH
|
|
Calls in [] to main:2
|
|
Calls in [main] to gfx_init:8
|
|
Calls in [gfx_init] to gfx_init_screen0:48 gfx_init_plane_charset8:50
|
|
Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:54 dtvSetCpuBankSegment1:82
|
|
|
|
Created 19 initial phi equivalence classes
|
|
Coalesced [46] main::j#3 ← main::j#1
|
|
Coalesced [57] gfx_init_plane_charset8::chargen#10 ← gfx_init_plane_charset8::chargen#3
|
|
Coalesced [58] gfx_init_plane_charset8::gfxa#10 ← gfx_init_plane_charset8::gfxa#6
|
|
Coalesced [59] gfx_init_plane_charset8::col#10 ← gfx_init_plane_charset8::col#6
|
|
Coalesced [63] gfx_init_plane_charset8::bits#5 ← gfx_init_plane_charset8::bits#0
|
|
Coalesced [64] gfx_init_plane_charset8::gfxa#12 ← gfx_init_plane_charset8::gfxa#5
|
|
Coalesced [65] gfx_init_plane_charset8::col#12 ← gfx_init_plane_charset8::col#5
|
|
Not coalescing [69] gfx_init_plane_charset8::c#3 ← gfx_init_plane_charset8::col#2
|
|
Coalesced [85] gfx_init_plane_charset8::chargen#9 ← gfx_init_plane_charset8::chargen#1
|
|
Coalesced [86] gfx_init_plane_charset8::gfxa#9 ← gfx_init_plane_charset8::gfxa#1
|
|
Coalesced [87] gfx_init_plane_charset8::col#9 ← gfx_init_plane_charset8::col#1
|
|
Coalesced [88] gfx_init_plane_charset8::ch#9 ← gfx_init_plane_charset8::ch#1
|
|
Coalesced (already) [89] gfx_init_plane_charset8::chargen#11 ← gfx_init_plane_charset8::chargen#1
|
|
Coalesced (already) [90] gfx_init_plane_charset8::gfxa#11 ← gfx_init_plane_charset8::gfxa#1
|
|
Coalesced (already) [91] gfx_init_plane_charset8::col#11 ← gfx_init_plane_charset8::col#1
|
|
Coalesced [92] gfx_init_plane_charset8::cr#7 ← gfx_init_plane_charset8::cr#1
|
|
Coalesced [93] gfx_init_plane_charset8::bits#6 ← gfx_init_plane_charset8::bits#1
|
|
Coalesced (already) [94] gfx_init_plane_charset8::gfxa#13 ← gfx_init_plane_charset8::gfxa#1
|
|
Coalesced (already) [95] gfx_init_plane_charset8::col#13 ← gfx_init_plane_charset8::col#1
|
|
Coalesced [96] gfx_init_plane_charset8::cp#5 ← gfx_init_plane_charset8::cp#1
|
|
Coalesced [103] gfx_init_screen0::ch#6 ← gfx_init_screen0::ch#3
|
|
Coalesced [116] gfx_init_screen0::cy#5 ← gfx_init_screen0::cy#1
|
|
Coalesced [117] gfx_init_screen0::ch#5 ← gfx_init_screen0::ch#1
|
|
Coalesced [118] gfx_init_screen0::cx#3 ← gfx_init_screen0::cx#1
|
|
Coalesced (already) [119] gfx_init_screen0::ch#7 ← gfx_init_screen0::ch#1
|
|
Coalesced down to 13 phi equivalence classes
|
|
Culled Empty Block (label) @2
|
|
Culled Empty Block (label) main::@2
|
|
Culled Empty Block (label) main::@8
|
|
Culled Empty Block (label) gfx_init::@2
|
|
Culled Empty Block (label) gfx_init_plane_charset8::@10
|
|
Culled Empty Block (label) gfx_init_plane_charset8::@11
|
|
Culled Empty Block (label) gfx_init_plane_charset8::@12
|
|
Culled Empty Block (label) gfx_init_plane_charset8::@13
|
|
Culled Empty Block (label) gfx_init_screen0::@4
|
|
Culled Empty Block (label) gfx_init_screen0::@5
|
|
Renumbering block main::@3 to main::@2
|
|
Renumbering block main::@4 to main::@3
|
|
Renumbering block main::@5 to main::@4
|
|
Renumbering block main::@6 to main::@5
|
|
Renumbering block main::@7 to main::@6
|
|
Adding NOP phi() at start of @begin
|
|
Adding NOP phi() at start of @1
|
|
Adding NOP phi() at start of @end
|
|
Adding NOP phi() at start of gfx_init
|
|
Adding NOP phi() at start of gfx_init::@1
|
|
Adding NOP phi() at start of gfx_init_plane_charset8
|
|
Adding NOP phi() at start of gfx_init_screen0
|
|
|
|
FINAL CONTROL FLOW GRAPH
|
|
@begin: scope:[] from
|
|
[0] phi()
|
|
to:@1
|
|
@1: scope:[] from @begin
|
|
[1] phi()
|
|
[2] call main
|
|
to:@end
|
|
@end: scope:[] from @1
|
|
[3] phi()
|
|
|
|
(void()) main()
|
|
main: scope:[main] from @1
|
|
asm { sei }
|
|
[5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK
|
|
[6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
|
|
[7] call gfx_init
|
|
to:main::@6
|
|
main::@6: scope:[main] from main
|
|
[8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE
|
|
[9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF
|
|
[10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3
|
|
[11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL
|
|
[12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0
|
|
[13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN
|
|
[14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0
|
|
[15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1
|
|
[16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0
|
|
[17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0
|
|
[18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0
|
|
[19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8
|
|
[20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0
|
|
[21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0
|
|
[22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0
|
|
[23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0
|
|
[24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3
|
|
[25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000
|
|
[26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4
|
|
to:main::@1
|
|
main::@1: scope:[main] from main::@1 main::@6
|
|
[27] (byte) main::j#2 ← phi( main::@1/(byte) main::j#1 main::@6/(byte) 0 )
|
|
[28] *((const nomodify byte*) DTV_PALETTE + (byte) main::j#2) ← (byte) main::j#2
|
|
[29] (byte) main::j#1 ← ++ (byte) main::j#2
|
|
[30] if((byte) main::j#1!=(byte) $10) goto main::@1
|
|
to:main::@2
|
|
main::@2: scope:[main] from main::@1 main::@5
|
|
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 }
|
|
[32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3
|
|
[33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@2 main::@3
|
|
[34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
to:main::@5
|
|
main::@5: scope:[main] from main::@4 main::@5
|
|
[36] (byte) main::rst#1 ← *((const nomodify byte*) RASTER)
|
|
[37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7
|
|
[38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3
|
|
[39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4
|
|
[40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4
|
|
[41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
[43] if((byte) main::rst#1!=(byte) $f2) goto main::@5
|
|
to:main::@2
|
|
|
|
(void()) gfx_init()
|
|
gfx_init: scope:[gfx_init] from main
|
|
[44] phi()
|
|
[45] call gfx_init_screen0
|
|
to:gfx_init::@1
|
|
gfx_init::@1: scope:[gfx_init] from gfx_init
|
|
[46] phi()
|
|
[47] call gfx_init_plane_charset8
|
|
to:gfx_init::@return
|
|
gfx_init::@return: scope:[gfx_init] from gfx_init::@1
|
|
[48] return
|
|
to:@return
|
|
|
|
(void()) gfx_init_plane_charset8()
|
|
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1
|
|
[49] phi()
|
|
[50] call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@9
|
|
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8
|
|
[51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM
|
|
to:gfx_init_plane_charset8::@1
|
|
gfx_init_plane_charset8::@1: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@7 gfx_init_plane_charset8::@9
|
|
[52] (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) 0 )
|
|
[52] (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) 0 )
|
|
[52] (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) $4000 )
|
|
[52] (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 nomodify byte*) CHARGEN+(byte) 1 )
|
|
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
|
|
[53] (byte) gfx_init_plane_charset8::cr#6 ← phi( gfx_init_plane_charset8::@1/(byte) 0 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::cr#1 )
|
|
[53] (byte) gfx_init_plane_charset8::col#5 ← phi( gfx_init_plane_charset8::@1/(byte) gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::@6/(byte) gfx_init_plane_charset8::col#1 )
|
|
[53] (byte*) gfx_init_plane_charset8::gfxa#5 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::gfxa#1 )
|
|
[53] (byte*) gfx_init_plane_charset8::chargen#2 ← phi( gfx_init_plane_charset8::@1/(byte*) gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::@6/(byte*) gfx_init_plane_charset8::chargen#1 )
|
|
[54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2)
|
|
[55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2
|
|
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
|
|
[56] (byte) gfx_init_plane_charset8::cp#2 ← phi( gfx_init_plane_charset8::@2/(byte) 0 gfx_init_plane_charset8::@4/(byte) gfx_init_plane_charset8::cp#1 )
|
|
[56] (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 )
|
|
[56] (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 )
|
|
[56] (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 )
|
|
[57] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80
|
|
[58] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4
|
|
to:gfx_init_plane_charset8::@5
|
|
gfx_init_plane_charset8::@5: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3
|
|
[59] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2
|
|
to:gfx_init_plane_charset8::@4
|
|
gfx_init_plane_charset8::@4: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@3 gfx_init_plane_charset8::@5
|
|
[60] (byte) gfx_init_plane_charset8::c#2 ← phi( gfx_init_plane_charset8::@3/(byte) 0 gfx_init_plane_charset8::@5/(byte) gfx_init_plane_charset8::c#3 )
|
|
[61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2
|
|
[62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2
|
|
[63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1
|
|
[64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2
|
|
[65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2
|
|
[66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3
|
|
to:gfx_init_plane_charset8::@6
|
|
gfx_init_plane_charset8::@6: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@4
|
|
[67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6
|
|
[68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) 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
|
|
[69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8
|
|
[70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) 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
|
|
[71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO
|
|
[72] call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@return
|
|
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8
|
|
[73] return
|
|
to:@return
|
|
|
|
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
|
|
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
|
|
[74] (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 ← phi( gfx_init_plane_charset8/(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfx_init_plane_charset8::@8/(byte)(number) $4000/(number) $4000 )
|
|
[75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2
|
|
asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
to:dtvSetCpuBankSegment1::@return
|
|
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
|
|
[77] return
|
|
to:@return
|
|
|
|
(void()) gfx_init_screen0()
|
|
gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init
|
|
[78] phi()
|
|
to:gfx_init_screen0::@1
|
|
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
|
|
[79] (byte*) gfx_init_screen0::ch#3 ← phi( gfx_init_screen0/(const nomodify byte*) SCREEN gfx_init_screen0::@3/(byte*) gfx_init_screen0::ch#1 )
|
|
[79] (byte) gfx_init_screen0::cy#4 ← phi( gfx_init_screen0/(byte) 0 gfx_init_screen0::@3/(byte) gfx_init_screen0::cy#1 )
|
|
to:gfx_init_screen0::@2
|
|
gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2
|
|
[80] (byte*) gfx_init_screen0::ch#2 ← phi( gfx_init_screen0::@1/(byte*) gfx_init_screen0::ch#3 gfx_init_screen0::@2/(byte*) gfx_init_screen0::ch#1 )
|
|
[80] (byte) gfx_init_screen0::cx#2 ← phi( gfx_init_screen0::@1/(byte) 0 gfx_init_screen0::@2/(byte) gfx_init_screen0::cx#1 )
|
|
[81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f
|
|
[82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4
|
|
[83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f
|
|
[84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2
|
|
[85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3
|
|
[86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2
|
|
[87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2
|
|
[88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2
|
|
to:gfx_init_screen0::@3
|
|
gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2
|
|
[89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4
|
|
[90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1
|
|
to:gfx_init_screen0::@return
|
|
gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3
|
|
[91] return
|
|
to:@return
|
|
|
|
|
|
VARIABLE REGISTER WEIGHTS
|
|
(byte) MOS6526_CIA::INTERRUPT
|
|
(byte) MOS6526_CIA::PORT_A
|
|
(byte) MOS6526_CIA::PORT_A_DDR
|
|
(byte) MOS6526_CIA::PORT_B
|
|
(byte) MOS6526_CIA::PORT_B_DDR
|
|
(byte) MOS6526_CIA::SERIAL_DATA
|
|
(word) MOS6526_CIA::TIMER_A
|
|
(byte) MOS6526_CIA::TIMER_A_CONTROL
|
|
(word) MOS6526_CIA::TIMER_B
|
|
(byte) MOS6526_CIA::TIMER_B_CONTROL
|
|
(byte) MOS6526_CIA::TOD_10THS
|
|
(byte) MOS6526_CIA::TOD_HOURS
|
|
(byte) MOS6526_CIA::TOD_MIN
|
|
(byte) MOS6526_CIA::TOD_SEC
|
|
(byte) MOS6569_VICII::BG_COLOR
|
|
(byte) MOS6569_VICII::BG_COLOR1
|
|
(byte) MOS6569_VICII::BG_COLOR2
|
|
(byte) MOS6569_VICII::BG_COLOR3
|
|
(byte) MOS6569_VICII::BORDER_COLOR
|
|
(byte) MOS6569_VICII::CONTROL1
|
|
(byte) MOS6569_VICII::CONTROL2
|
|
(byte) MOS6569_VICII::IRQ_ENABLE
|
|
(byte) MOS6569_VICII::IRQ_STATUS
|
|
(byte) MOS6569_VICII::LIGHTPEN_X
|
|
(byte) MOS6569_VICII::LIGHTPEN_Y
|
|
(byte) MOS6569_VICII::MEMORY
|
|
(byte) MOS6569_VICII::RASTER
|
|
(byte) MOS6569_VICII::SPRITE0_COLOR
|
|
(byte) MOS6569_VICII::SPRITE0_X
|
|
(byte) MOS6569_VICII::SPRITE0_Y
|
|
(byte) MOS6569_VICII::SPRITE1_COLOR
|
|
(byte) MOS6569_VICII::SPRITE1_X
|
|
(byte) MOS6569_VICII::SPRITE1_Y
|
|
(byte) MOS6569_VICII::SPRITE2_COLOR
|
|
(byte) MOS6569_VICII::SPRITE2_X
|
|
(byte) MOS6569_VICII::SPRITE2_Y
|
|
(byte) MOS6569_VICII::SPRITE3_COLOR
|
|
(byte) MOS6569_VICII::SPRITE3_X
|
|
(byte) MOS6569_VICII::SPRITE3_Y
|
|
(byte) MOS6569_VICII::SPRITE4_COLOR
|
|
(byte) MOS6569_VICII::SPRITE4_X
|
|
(byte) MOS6569_VICII::SPRITE4_Y
|
|
(byte) MOS6569_VICII::SPRITE5_COLOR
|
|
(byte) MOS6569_VICII::SPRITE5_X
|
|
(byte) MOS6569_VICII::SPRITE5_Y
|
|
(byte) MOS6569_VICII::SPRITE6_COLOR
|
|
(byte) MOS6569_VICII::SPRITE6_X
|
|
(byte) MOS6569_VICII::SPRITE6_Y
|
|
(byte) MOS6569_VICII::SPRITE7_COLOR
|
|
(byte) MOS6569_VICII::SPRITE7_X
|
|
(byte) MOS6569_VICII::SPRITE7_Y
|
|
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_ENABLE
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_X
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
|
|
(byte) MOS6569_VICII::SPRITES_MC
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR1
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR2
|
|
(byte) MOS6569_VICII::SPRITES_PRIORITY
|
|
(byte) MOS6569_VICII::SPRITES_XMSB
|
|
(byte) MOS6581_SID::CH1_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH1_CONTROL
|
|
(word) MOS6581_SID::CH1_FREQ
|
|
(word) MOS6581_SID::CH1_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH2_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH2_CONTROL
|
|
(word) MOS6581_SID::CH2_FREQ
|
|
(word) MOS6581_SID::CH2_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH3_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH3_CONTROL
|
|
(byte) MOS6581_SID::CH3_ENV
|
|
(word) MOS6581_SID::CH3_FREQ
|
|
(byte) MOS6581_SID::CH3_OSC
|
|
(word) MOS6581_SID::CH3_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
|
|
(byte) MOS6581_SID::FILTER_SETUP
|
|
(byte) MOS6581_SID::POT_X
|
|
(byte) MOS6581_SID::POT_Y
|
|
(byte) MOS6581_SID::VOLUME_FILTER_MODE
|
|
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 10001.0
|
|
(void()) gfx_init()
|
|
(void()) gfx_init_plane_charset8()
|
|
(byte~) gfx_init_plane_charset8::$2 2000002.0
|
|
(byte) gfx_init_plane_charset8::bits
|
|
(byte) gfx_init_plane_charset8::bits#0 100001.0
|
|
(byte) gfx_init_plane_charset8::bits#1 500000.5
|
|
(byte) gfx_init_plane_charset8::bits#2 442857.7142857142
|
|
(byte) gfx_init_plane_charset8::c
|
|
(byte) gfx_init_plane_charset8::c#2 2000002.0
|
|
(byte) gfx_init_plane_charset8::c#3 2000002.0
|
|
(byte) gfx_init_plane_charset8::ch
|
|
(byte) gfx_init_plane_charset8::ch#1 15001.5
|
|
(byte) gfx_init_plane_charset8::ch#8 1176.5882352941176
|
|
(byte*) gfx_init_plane_charset8::chargen
|
|
(byte*) gfx_init_plane_charset8::chargen#1 13125.1875
|
|
(byte*) gfx_init_plane_charset8::chargen#2 155002.0
|
|
(byte*) gfx_init_plane_charset8::chargen#3 20002.0
|
|
(byte) gfx_init_plane_charset8::col
|
|
(byte) gfx_init_plane_charset8::col#1 301429.14285714284
|
|
(byte) gfx_init_plane_charset8::col#2 387500.5
|
|
(byte) gfx_init_plane_charset8::col#5 70001.0
|
|
(byte) gfx_init_plane_charset8::col#6 20002.0
|
|
(byte) gfx_init_plane_charset8::cp
|
|
(byte) gfx_init_plane_charset8::cp#1 1500001.5
|
|
(byte) gfx_init_plane_charset8::cp#2 222222.44444444444
|
|
(byte) gfx_init_plane_charset8::cr
|
|
(byte) gfx_init_plane_charset8::cr#1 150001.5
|
|
(byte) gfx_init_plane_charset8::cr#6 14285.857142857143
|
|
(byte*) gfx_init_plane_charset8::gfxa
|
|
(byte*) gfx_init_plane_charset8::gfxa#1 234444.88888888888
|
|
(byte*) gfx_init_plane_charset8::gfxa#2 516667.3333333334
|
|
(byte*) gfx_init_plane_charset8::gfxa#5 70001.0
|
|
(byte*) gfx_init_plane_charset8::gfxa#6 20002.0
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank
|
|
(void()) gfx_init_screen0()
|
|
(byte~) gfx_init_screen0::$0 200002.0
|
|
(byte~) gfx_init_screen0::$1 100001.0
|
|
(byte~) gfx_init_screen0::$2 200002.0
|
|
(byte~) gfx_init_screen0::$3 200002.0
|
|
(byte*) gfx_init_screen0::ch
|
|
(byte*) gfx_init_screen0::ch#1 42000.600000000006
|
|
(byte*) gfx_init_screen0::ch#2 51667.33333333333
|
|
(byte*) gfx_init_screen0::ch#3 20002.0
|
|
(byte) gfx_init_screen0::cx
|
|
(byte) gfx_init_screen0::cx#1 150001.5
|
|
(byte) gfx_init_screen0::cx#2 42857.57142857143
|
|
(byte) gfx_init_screen0::cy
|
|
(byte) gfx_init_screen0::cy#1 15001.5
|
|
(byte) gfx_init_screen0::cy#4 12000.300000000001
|
|
(void()) main()
|
|
(byte~) main::$3 2002.0
|
|
(byte~) main::$4 2002.0
|
|
(byte~) main::$5 2002.0
|
|
(byte) main::j
|
|
(byte) main::j#1 151.5
|
|
(byte) main::j#2 202.0
|
|
(byte) main::rst
|
|
(byte) main::rst#1 572.0
|
|
|
|
Initial phi equivalence classes
|
|
[ main::j#2 main::j#1 ]
|
|
[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
|
|
[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
|
|
[ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
Added variable main::rst#1 to live range equivalence class [ main::rst#1 ]
|
|
Added variable main::$3 to live range equivalence class [ main::$3 ]
|
|
Added variable main::$4 to live range equivalence class [ main::$4 ]
|
|
Added variable main::$5 to live range equivalence class [ main::$5 ]
|
|
Added variable gfx_init_plane_charset8::$2 to live range equivalence class [ gfx_init_plane_charset8::$2 ]
|
|
Added variable gfx_init_screen0::$0 to live range equivalence class [ gfx_init_screen0::$0 ]
|
|
Added variable gfx_init_screen0::$1 to live range equivalence class [ gfx_init_screen0::$1 ]
|
|
Added variable gfx_init_screen0::$2 to live range equivalence class [ gfx_init_screen0::$2 ]
|
|
Added variable gfx_init_screen0::$3 to live range equivalence class [ gfx_init_screen0::$3 ]
|
|
Complete equivalence classes
|
|
[ main::j#2 main::j#1 ]
|
|
[ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
[ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
[ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
[ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
[ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
|
|
[ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
[ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
[ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
|
|
[ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
[ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
[ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
[ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
[ main::rst#1 ]
|
|
[ main::$3 ]
|
|
[ main::$4 ]
|
|
[ main::$5 ]
|
|
[ gfx_init_plane_charset8::$2 ]
|
|
[ gfx_init_screen0::$0 ]
|
|
[ gfx_init_screen0::$1 ]
|
|
[ gfx_init_screen0::$2 ]
|
|
[ gfx_init_screen0::$3 ]
|
|
Allocated zp[1]:2 [ main::j#2 main::j#1 ]
|
|
Allocated zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Allocated zp[2]:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
Allocated zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Allocated zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Allocated zp[2]:8 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
|
|
Allocated zp[1]:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
Allocated zp[1]:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
Allocated zp[1]:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
|
|
Allocated zp[1]:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Allocated zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Allocated zp[1]:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Allocated zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
Allocated zp[1]:18 [ main::rst#1 ]
|
|
Allocated zp[1]:19 [ main::$3 ]
|
|
Allocated zp[1]:20 [ main::$4 ]
|
|
Allocated zp[1]:21 [ main::$5 ]
|
|
Allocated zp[1]:22 [ gfx_init_plane_charset8::$2 ]
|
|
Allocated zp[1]:23 [ gfx_init_screen0::$0 ]
|
|
Allocated zp[1]:24 [ gfx_init_screen0::$1 ]
|
|
Allocated zp[1]:25 [ gfx_init_screen0::$2 ]
|
|
Allocated zp[1]:26 [ gfx_init_screen0::$3 ]
|
|
|
|
INITIAL ASM
|
|
Target platform is c64basic / MOS6502X
|
|
// File Comments
|
|
// C64DTV 8bpp charmode stretcher
|
|
// Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(main)
|
|
.pc = $80d "Program"
|
|
// Global Constants & labels
|
|
.const VIC_ECM = $40
|
|
.const VIC_DEN = $10
|
|
.const VIC_RSEL = 8
|
|
.const VIC_MCM = $10
|
|
.const VIC_CSEL = 8
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// RAM in 0xA000, 0xE000 I/O in 0xD000
|
|
.const PROCPORT_RAM_IO = 5
|
|
// RAM in 0xA000, 0xE000 CHAR ROM in 0xD000
|
|
.const PROCPORT_RAM_CHARROM = 1
|
|
.const DTV_FEATURE_ENABLE = 1
|
|
.const DTV_LINEAR = 1
|
|
.const DTV_HIGHCOLOR = 4
|
|
.const DTV_BADLINE_OFF = $20
|
|
.const DTV_CHUNKY = $40
|
|
.const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2
|
|
.label RASTER = $d012
|
|
.label BORDER_COLOR = $d020
|
|
.label VIC_CONTROL = $d011
|
|
.label VIC_CONTROL2 = $d016
|
|
.label VIC_MEMORY = $d018
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// The address of the CHARGEN character set
|
|
.label CHARGEN = $d000
|
|
// The CIA#2: Serial bus, RS-232, VIC memory bank
|
|
.label CIA2 = $dd00
|
|
// Feature enables or disables the extra C64 DTV features
|
|
.label DTV_FEATURE = $d03f
|
|
// Controls the graphics modes of the C64 DTV
|
|
.label DTV_CONTROL = $d03c
|
|
// Defines colors for the 16 first colors ($00-$0f)
|
|
.label DTV_PALETTE = $d200
|
|
// Linear Graphics Plane A Counter Control
|
|
.label DTV_PLANEA_START_LO = $d03a
|
|
.label DTV_PLANEA_START_MI = $d03b
|
|
.label DTV_PLANEA_START_HI = $d045
|
|
.label DTV_PLANEA_STEP = $d046
|
|
.label DTV_PLANEA_MODULO_LO = $d038
|
|
.label DTV_PLANEA_MODULO_HI = $d039
|
|
// Linear Graphics Plane B Counter Control
|
|
.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
|
|
// Plane with the screen
|
|
.label SCREEN = $7c00
|
|
// Plane with all pixels
|
|
.label CHARSET8 = $8000
|
|
// @begin
|
|
__bbegin:
|
|
// [1] phi from @begin to @1 [phi:@begin->@1]
|
|
__b1_from___bbegin:
|
|
jmp __b1
|
|
// @1
|
|
__b1:
|
|
// [2] call main
|
|
jsr main
|
|
// [3] phi from @1 to @end [phi:@1->@end]
|
|
__bend_from___b1:
|
|
jmp __bend
|
|
// @end
|
|
__bend:
|
|
// main
|
|
main: {
|
|
.label __3 = $13
|
|
.label __4 = $14
|
|
.label __5 = $15
|
|
.label j = 2
|
|
.label rst = $12
|
|
// asm { sei }
|
|
sei
|
|
// [5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2
|
|
// Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
// [6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// [7] call gfx_init
|
|
// [44] phi from main to gfx_init [phi:main->gfx_init]
|
|
gfx_init_from_main:
|
|
jsr gfx_init
|
|
jmp __b6
|
|
// main::@6
|
|
__b6:
|
|
// [8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
|
|
// Enable DTV extended modes
|
|
lda #DTV_FEATURE_ENABLE
|
|
sta DTV_FEATURE
|
|
// [9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF -- _deref_pbuc1=vbuc2
|
|
// 8BPP Pixel Cell Mode
|
|
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
sta DTV_CONTROL
|
|
// [10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// [11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL -- _deref_pbuc1=vbuc2
|
|
lda #VIC_MCM|VIC_CSEL
|
|
sta VIC_CONTROL2
|
|
// [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane A: SCREEN
|
|
lda #0
|
|
sta DTV_PLANEA_START_LO
|
|
// [13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN -- _deref_pbuc1=vbuc2
|
|
lda #>SCREEN
|
|
sta DTV_PLANEA_START_MI
|
|
// [14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_START_HI
|
|
// [15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2
|
|
lda #1
|
|
sta DTV_PLANEA_STEP
|
|
// [16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_LO
|
|
// [17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_HI
|
|
// [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane B: CHARSET8
|
|
lda #0
|
|
sta DTV_PLANEB_START_LO
|
|
// [19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8 -- _deref_pbuc1=vbuc2
|
|
lda #>CHARSET8
|
|
sta DTV_PLANEB_START_MI
|
|
// [20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_START_HI
|
|
// [21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_STEP
|
|
// [22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_LO
|
|
// [23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_HI
|
|
// [24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2
|
|
// VIC Graphics Bank
|
|
lda #3
|
|
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR
|
|
// [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank bits to output - all others to input
|
|
lda #3^SCREEN/$4000
|
|
sta CIA2
|
|
// [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank
|
|
// VIC memory
|
|
lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
|
|
sta VIC_MEMORY
|
|
// [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
|
__b1_from___b6:
|
|
// [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z j
|
|
jmp __b1
|
|
// DTV Palette - Grey Tones
|
|
// [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
__b1_from___b1:
|
|
// [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
jmp __b1
|
|
// main::@1
|
|
__b1:
|
|
// [28] *((const nomodify byte*) DTV_PALETTE + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuz1=vbuz1
|
|
ldy.z j
|
|
tya
|
|
sta DTV_PALETTE,y
|
|
// [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuz1=_inc_vbuz1
|
|
inc.z j
|
|
// [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$10
|
|
cmp.z j
|
|
bne __b1_from___b1
|
|
jmp __b2
|
|
// main::@2
|
|
__b2:
|
|
// 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 }
|
|
// Stabilize Raster
|
|
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
|
|
// [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta BORDER_COLOR
|
|
jmp __b3
|
|
// main::@3
|
|
__b3:
|
|
// [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
|
lda #$42
|
|
cmp RASTER
|
|
bne __b3
|
|
jmp __b4
|
|
// main::@4
|
|
__b4:
|
|
// 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 __b5
|
|
// main::@5
|
|
__b5:
|
|
// [36] (byte) main::rst#1 ← *((const nomodify byte*) RASTER) -- vbuz1=_deref_pbuc1
|
|
lda RASTER
|
|
sta.z rst
|
|
// [37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 -- vbuz1=vbuz2_band_vbuc1
|
|
lda #7
|
|
and.z rst
|
|
sta.z __3
|
|
// [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 -- vbuz1=vbuc1_bor_vbuz2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL
|
|
ora.z __3
|
|
sta.z __4
|
|
// [39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 -- _deref_pbuc1=vbuz1
|
|
lda.z __4
|
|
sta VIC_CONTROL
|
|
// [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 -- vbuz1=vbuz2_rol_4
|
|
lda.z rst
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __5
|
|
// [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuz1
|
|
lda.z __5
|
|
sta BORDER_COLOR
|
|
// 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
|
|
// [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$f2
|
|
cmp.z rst
|
|
bne __b5
|
|
jmp __b2
|
|
}
|
|
// gfx_init
|
|
// Initialize the different graphics in the memory
|
|
gfx_init: {
|
|
// [45] call gfx_init_screen0
|
|
// [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
|
|
gfx_init_screen0_from_gfx_init:
|
|
jsr gfx_init_screen0
|
|
// [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
|
|
__b1_from_gfx_init:
|
|
jmp __b1
|
|
// gfx_init::@1
|
|
__b1:
|
|
// [47] call gfx_init_plane_charset8
|
|
// [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
|
|
gfx_init_plane_charset8_from___b1:
|
|
jsr gfx_init_plane_charset8
|
|
jmp __breturn
|
|
// gfx_init::@return
|
|
__breturn:
|
|
// [48] return
|
|
rts
|
|
}
|
|
// gfx_init_plane_charset8
|
|
// Initialize Plane with 8bpp charset
|
|
gfx_init_plane_charset8: {
|
|
// 8bpp cells for Plane B (charset) - ROM charset with 256 colors
|
|
.const gfxbCpuBank = $ff&CHARSET8/$4000
|
|
.label __2 = $16
|
|
.label bits = 7
|
|
.label chargen = 4
|
|
.label gfxa = 8
|
|
.label col = $a
|
|
.label cp = $b
|
|
.label cr = 6
|
|
.label ch = 3
|
|
.label c = $c
|
|
// [50] call dtvSetCpuBankSegment1
|
|
// [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1
|
|
lda #gfxbCpuBank
|
|
sta.z dtvSetCpuBankSegment1.cpuBankIdx
|
|
jsr dtvSetCpuBankSegment1
|
|
jmp __b9
|
|
// gfx_init_plane_charset8::@9
|
|
__b9:
|
|
// [51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_CHARROM
|
|
sta PROCPORT
|
|
// [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
|
|
__b1_from___b9:
|
|
// [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z ch
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z col
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1
|
|
lda #<$4000
|
|
sta.z gfxa
|
|
lda #>$4000
|
|
sta.z gfxa+1
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const nomodify byte*) CHARGEN+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1
|
|
lda #<CHARGEN+1
|
|
sta.z chargen
|
|
lda #>CHARGEN+1
|
|
sta.z chargen+1
|
|
jmp __b1
|
|
// [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
|
|
__b1_from___b7:
|
|
// [52] 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
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy
|
|
jmp __b1
|
|
// gfx_init_plane_charset8::@1
|
|
__b1:
|
|
// [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
|
|
__b2_from___b1:
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cr
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
jmp __b2
|
|
// [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
|
|
__b2_from___b6:
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
jmp __b2
|
|
// gfx_init_plane_charset8::@2
|
|
__b2:
|
|
// [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (chargen),y
|
|
sta.z bits
|
|
// [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1
|
|
inc.z chargen
|
|
bne !+
|
|
inc.z chargen+1
|
|
!:
|
|
// [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
|
|
__b3_from___b2:
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cp
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
jmp __b3
|
|
// [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
|
|
__b3_from___b4:
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
jmp __b3
|
|
// gfx_init_plane_charset8::@3
|
|
__b3:
|
|
// [57] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuz1=vbuz2_band_vbuc1
|
|
lda #$80
|
|
and.z bits
|
|
sta.z __2
|
|
// [58] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuz1_eq_0_then_la1
|
|
lda.z __2
|
|
cmp #0
|
|
beq __b4_from___b3
|
|
jmp __b5
|
|
// gfx_init_plane_charset8::@5
|
|
__b5:
|
|
// [59] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuz1=vbuz2
|
|
lda.z col
|
|
sta.z c
|
|
// [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
|
|
__b4_from___b5:
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy
|
|
jmp __b4
|
|
// [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
|
|
__b4_from___b3:
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z c
|
|
jmp __b4
|
|
// gfx_init_plane_charset8::@4
|
|
__b4:
|
|
// [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuz2
|
|
lda.z c
|
|
ldy #0
|
|
sta (gfxa),y
|
|
// [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1
|
|
inc.z gfxa
|
|
bne !+
|
|
inc.z gfxa+1
|
|
!:
|
|
// [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1
|
|
asl.z bits
|
|
// [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1
|
|
inc.z col
|
|
// [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuz1=_inc_vbuz1
|
|
inc.z cp
|
|
// [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp.z cp
|
|
bne __b3_from___b4
|
|
jmp __b6
|
|
// gfx_init_plane_charset8::@6
|
|
__b6:
|
|
// [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1
|
|
inc.z cr
|
|
// [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp.z cr
|
|
bne __b2_from___b6
|
|
jmp __b7
|
|
// gfx_init_plane_charset8::@7
|
|
__b7:
|
|
// [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1
|
|
inc.z ch
|
|
// [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1
|
|
lda.z ch
|
|
cmp #0
|
|
bne __b1_from___b7
|
|
jmp __b8
|
|
// gfx_init_plane_charset8::@8
|
|
__b8:
|
|
// [71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// [72] call dtvSetCpuBankSegment1
|
|
// Reset CPU BANK segment to $4000
|
|
// [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from___b8:
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuz1=vbuc1
|
|
lda #$4000/$4000
|
|
sta.z dtvSetCpuBankSegment1.cpuBankIdx
|
|
jsr dtvSetCpuBankSegment1
|
|
jmp __breturn
|
|
// gfx_init_plane_charset8::@return
|
|
__breturn:
|
|
// [73] return
|
|
rts
|
|
}
|
|
// dtvSetCpuBankSegment1
|
|
// 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
|
|
// dtvSetCpuBankSegment1(byte zp($d) cpuBankIdx)
|
|
dtvSetCpuBankSegment1: {
|
|
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
|
|
.label cpuBank = $ff
|
|
.label cpuBankIdx = $d
|
|
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuz1
|
|
lda.z cpuBankIdx
|
|
sta cpuBank
|
|
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
.byte $32, $dd
|
|
lda.z $ff
|
|
.byte $32, $00
|
|
jmp __breturn
|
|
// dtvSetCpuBankSegment1::@return
|
|
__breturn:
|
|
// [77] return
|
|
rts
|
|
}
|
|
// gfx_init_screen0
|
|
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
|
|
gfx_init_screen0: {
|
|
.label __0 = $17
|
|
.label __1 = $18
|
|
.label __2 = $19
|
|
.label __3 = $1a
|
|
.label ch = $10
|
|
.label cx = $f
|
|
.label cy = $e
|
|
// [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
|
|
__b1_from_gfx_init_screen0:
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (const nomodify byte*) SCREEN [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta.z ch
|
|
lda #>SCREEN
|
|
sta.z ch+1
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cy
|
|
jmp __b1
|
|
// [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
|
|
__b1_from___b3:
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy
|
|
jmp __b1
|
|
// gfx_init_screen0::@1
|
|
__b1:
|
|
// [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
|
|
__b2_from___b1:
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cx
|
|
jmp __b2
|
|
// [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
|
|
__b2_from___b2:
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy
|
|
jmp __b2
|
|
// gfx_init_screen0::@2
|
|
__b2:
|
|
// [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuz1=vbuz2_band_vbuc1
|
|
lda #$f
|
|
and.z cy
|
|
sta.z __0
|
|
// [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuz2_rol_4
|
|
lda.z __0
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __1
|
|
// [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1
|
|
lda #$f
|
|
and.z cx
|
|
sta.z __2
|
|
// [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuz1=vbuz2_bor_vbuz3
|
|
lda.z __1
|
|
ora.z __2
|
|
sta.z __3
|
|
// [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuz2
|
|
lda.z __3
|
|
ldy #0
|
|
sta (ch),y
|
|
// [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1
|
|
inc.z ch
|
|
bne !+
|
|
inc.z ch+1
|
|
!:
|
|
// [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuz1=_inc_vbuz1
|
|
inc.z cx
|
|
// [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$28
|
|
cmp.z cx
|
|
bne __b2_from___b2
|
|
jmp __b3
|
|
// gfx_init_screen0::@3
|
|
__b3:
|
|
// [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1
|
|
inc.z cy
|
|
// [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp.z cy
|
|
bne __b1_from___b3
|
|
jmp __breturn
|
|
// gfx_init_screen0::@return
|
|
__breturn:
|
|
// [91] return
|
|
rts
|
|
}
|
|
// File Data
|
|
|
|
REGISTER UPLIFT POTENTIAL REGISTERS
|
|
Statement [5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 [ ] ( 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 [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp[1]:18 [ main::rst#1 ]
|
|
Statement [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 [ main::rst#1 main::$5 ] ( main:2 [ main::rst#1 main::$5 ] { } ) always clobbers reg byte a
|
|
Statement [51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] { } ) always clobbers reg byte a
|
|
Statement [54] (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:47 [ 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[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp[1]:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]: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[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Statement [61] *((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:47 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::chargen#1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::cp#2 ] { } ) always clobbers reg byte y
|
|
Removing always clobbered register reg byte y as potential for zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
Statement [71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] { } ) always clobbers reg byte a
|
|
Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a
|
|
Statement [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] { } ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp[1]:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Statement [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] { } ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp[1]:24 [ gfx_init_screen0::$1 ]
|
|
Statement [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] { } ) always clobbers reg byte y
|
|
Removing always clobbered register reg byte y as potential for zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Statement [5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 [ ] ( 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 [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 [ ] ( main:2 [ ] { } ) always clobbers reg byte a
|
|
Statement [37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 [ main::rst#1 main::$3 ] ( main:2 [ main::rst#1 main::$3 ] { } ) always clobbers reg byte a
|
|
Statement [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 [ main::rst#1 main::$4 ] ( main:2 [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a
|
|
Statement [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 [ main::rst#1 main::$5 ] ( main:2 [ main::rst#1 main::$5 ] { } ) always clobbers reg byte a
|
|
Statement [51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] { } ) always clobbers reg byte a
|
|
Statement [54] (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:47 [ 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 [61] *((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:47 [ 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 [71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO [ ] ( main:2::gfx_init:7::gfx_init_plane_charset8:47 [ ] { } ) always clobbers reg byte a
|
|
Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a
|
|
Statement [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] { } ) always clobbers reg byte a
|
|
Statement [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] { } ) always clobbers reg byte a
|
|
Statement [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] { } ) always clobbers reg byte a
|
|
Statement [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( main:2::gfx_init:7::gfx_init_screen0:45 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] { } ) always clobbers reg byte y
|
|
Potential registers zp[1]:2 [ main::j#2 main::j#1 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] : zp[1]:3 , reg byte x ,
|
|
Potential registers zp[2]:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] : zp[2]:4 ,
|
|
Potential registers zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] : zp[1]:6 , reg byte x ,
|
|
Potential registers zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] : zp[1]:7 , reg byte a , reg byte x ,
|
|
Potential registers zp[2]: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[2]:8 ,
|
|
Potential registers zp[1]: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[1]:10 , reg byte x ,
|
|
Potential registers zp[1]:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] : zp[1]:11 , reg byte a , reg byte x ,
|
|
Potential registers zp[1]:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] : zp[1]:12 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] : zp[1]:13 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] : zp[1]:14 , reg byte x ,
|
|
Potential registers zp[1]:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] : zp[1]:15 , reg byte x ,
|
|
Potential registers zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] : zp[2]:16 ,
|
|
Potential registers zp[1]:18 [ main::rst#1 ] : zp[1]:18 , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:19 [ main::$3 ] : zp[1]:19 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:20 [ main::$4 ] : zp[1]:20 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:21 [ main::$5 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:22 [ gfx_init_plane_charset8::$2 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:23 [ gfx_init_screen0::$0 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:24 [ gfx_init_screen0::$1 ] : zp[1]:24 , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:25 [ gfx_init_screen0::$2 ] : zp[1]:25 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:26 [ gfx_init_screen0::$3 ] : zp[1]:26 , reg byte a , reg byte x , reg byte y ,
|
|
|
|
REGISTER UPLIFT SCOPES
|
|
Uplift Scope [gfx_init_plane_charset8] 4,000,004: zp[1]:12 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 2,000,002: zp[1]:22 [ gfx_init_plane_charset8::$2 ] 1,722,223.94: zp[1]:11 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 1,042,859.21: zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 841,115.22: zp[2]: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 ] 778,932.64: zp[1]: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 ] 188,129.19: zp[2]:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 164,287.36: zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 16,178.09: zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Uplift Scope [gfx_init_screen0] 200,002: zp[1]:23 [ gfx_init_screen0::$0 ] 200,002: zp[1]:25 [ gfx_init_screen0::$2 ] 200,002: zp[1]:26 [ gfx_init_screen0::$3 ] 192,859.07: zp[1]:15 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 113,669.93: zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 100,001: zp[1]:24 [ gfx_init_screen0::$1 ] 27,001.8: zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Uplift Scope [dtvSetCpuBankSegment1] 10,001: zp[1]:13 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Uplift Scope [main] 2,002: zp[1]:19 [ main::$3 ] 2,002: zp[1]:20 [ main::$4 ] 2,002: zp[1]:21 [ main::$5 ] 572: zp[1]:18 [ main::rst#1 ] 353.5: zp[1]:2 [ main::j#2 main::j#1 ]
|
|
Uplift Scope [MOS6526_CIA]
|
|
Uplift Scope [MOS6569_VICII]
|
|
Uplift Scope [MOS6581_SID]
|
|
Uplift Scope [gfx_init]
|
|
Uplift Scope []
|
|
|
|
Uplifting [gfx_init_plane_charset8] best 98394 combination reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] reg byte a [ gfx_init_plane_charset8::$2 ] reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp[2]: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[1]: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[2]:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Limited combination testing to 100 combinations of 1152 possible.
|
|
Uplifting [gfx_init_screen0] best 95594 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[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] zp[1]:24 [ gfx_init_screen0::$1 ] zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Limited combination testing to 100 combinations of 768 possible.
|
|
Uplifting [dtvSetCpuBankSegment1] best 95585 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Uplifting [main] best 92985 combination reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte a [ main::$5 ] reg byte x [ main::rst#1 ] zp[1]:2 [ main::j#2 main::j#1 ]
|
|
Limited combination testing to 100 combinations of 768 possible.
|
|
Uplifting [MOS6526_CIA] best 92985 combination
|
|
Uplifting [MOS6569_VICII] best 92985 combination
|
|
Uplifting [MOS6581_SID] best 92985 combination
|
|
Uplifting [gfx_init] best 92985 combination
|
|
Uplifting [] best 92985 combination
|
|
Attempting to uplift remaining variables inzp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92985 combination zp[1]:7 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92985 combination zp[1]:10 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92985 combination zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:24 [ gfx_init_screen0::$1 ]
|
|
Uplifting [gfx_init_screen0] best 92985 combination zp[1]:24 [ gfx_init_screen0::$1 ]
|
|
Attempting to uplift remaining variables inzp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Uplifting [gfx_init_screen0] best 92985 combination zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92985 combination zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:2 [ main::j#2 main::j#1 ]
|
|
Uplifting [main] best 92865 combination reg byte x [ main::j#2 main::j#1 ]
|
|
Coalescing zero page register [ zp[1]:14 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] ] with [ zp[1]:3 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] ]
|
|
Coalescing zero page register [ zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] ] with [ zp[2]:4 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] ]
|
|
Coalescing zero page register [ zp[1]:24 [ gfx_init_screen0::$1 ] ] with [ zp[1]:6 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] ]
|
|
Allocated (was zp[1]:7) zp[1]:2 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Allocated (was zp[2]:8) zp[2]:3 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ]
|
|
Allocated (was zp[1]:10) zp[1]:5 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
Allocated (was zp[1]:14) zp[1]:6 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Allocated (was zp[2]:16) zp[2]:7 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
Allocated (was zp[1]:24) zp[1]:9 [ gfx_init_screen0::$1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
|
|
ASSEMBLER BEFORE OPTIMIZATION
|
|
// File Comments
|
|
// C64DTV 8bpp charmode stretcher
|
|
// Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(main)
|
|
.pc = $80d "Program"
|
|
// Global Constants & labels
|
|
.const VIC_ECM = $40
|
|
.const VIC_DEN = $10
|
|
.const VIC_RSEL = 8
|
|
.const VIC_MCM = $10
|
|
.const VIC_CSEL = 8
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// RAM in 0xA000, 0xE000 I/O in 0xD000
|
|
.const PROCPORT_RAM_IO = 5
|
|
// RAM in 0xA000, 0xE000 CHAR ROM in 0xD000
|
|
.const PROCPORT_RAM_CHARROM = 1
|
|
.const DTV_FEATURE_ENABLE = 1
|
|
.const DTV_LINEAR = 1
|
|
.const DTV_HIGHCOLOR = 4
|
|
.const DTV_BADLINE_OFF = $20
|
|
.const DTV_CHUNKY = $40
|
|
.const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2
|
|
.label RASTER = $d012
|
|
.label BORDER_COLOR = $d020
|
|
.label VIC_CONTROL = $d011
|
|
.label VIC_CONTROL2 = $d016
|
|
.label VIC_MEMORY = $d018
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// The address of the CHARGEN character set
|
|
.label CHARGEN = $d000
|
|
// The CIA#2: Serial bus, RS-232, VIC memory bank
|
|
.label CIA2 = $dd00
|
|
// Feature enables or disables the extra C64 DTV features
|
|
.label DTV_FEATURE = $d03f
|
|
// Controls the graphics modes of the C64 DTV
|
|
.label DTV_CONTROL = $d03c
|
|
// Defines colors for the 16 first colors ($00-$0f)
|
|
.label DTV_PALETTE = $d200
|
|
// Linear Graphics Plane A Counter Control
|
|
.label DTV_PLANEA_START_LO = $d03a
|
|
.label DTV_PLANEA_START_MI = $d03b
|
|
.label DTV_PLANEA_START_HI = $d045
|
|
.label DTV_PLANEA_STEP = $d046
|
|
.label DTV_PLANEA_MODULO_LO = $d038
|
|
.label DTV_PLANEA_MODULO_HI = $d039
|
|
// Linear Graphics Plane B Counter Control
|
|
.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
|
|
// Plane with the screen
|
|
.label SCREEN = $7c00
|
|
// Plane with all pixels
|
|
.label CHARSET8 = $8000
|
|
// @begin
|
|
__bbegin:
|
|
// [1] phi from @begin to @1 [phi:@begin->@1]
|
|
__b1_from___bbegin:
|
|
jmp __b1
|
|
// @1
|
|
__b1:
|
|
// [2] call main
|
|
jsr main
|
|
// [3] phi from @1 to @end [phi:@1->@end]
|
|
__bend_from___b1:
|
|
jmp __bend
|
|
// @end
|
|
__bend:
|
|
// main
|
|
main: {
|
|
// asm { sei }
|
|
sei
|
|
// [5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2
|
|
// Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
// [6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// [7] call gfx_init
|
|
// [44] phi from main to gfx_init [phi:main->gfx_init]
|
|
gfx_init_from_main:
|
|
jsr gfx_init
|
|
jmp __b6
|
|
// main::@6
|
|
__b6:
|
|
// [8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
|
|
// Enable DTV extended modes
|
|
lda #DTV_FEATURE_ENABLE
|
|
sta DTV_FEATURE
|
|
// [9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF -- _deref_pbuc1=vbuc2
|
|
// 8BPP Pixel Cell Mode
|
|
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
sta DTV_CONTROL
|
|
// [10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// [11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL -- _deref_pbuc1=vbuc2
|
|
lda #VIC_MCM|VIC_CSEL
|
|
sta VIC_CONTROL2
|
|
// [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane A: SCREEN
|
|
lda #0
|
|
sta DTV_PLANEA_START_LO
|
|
// [13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN -- _deref_pbuc1=vbuc2
|
|
lda #>SCREEN
|
|
sta DTV_PLANEA_START_MI
|
|
// [14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_START_HI
|
|
// [15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2
|
|
lda #1
|
|
sta DTV_PLANEA_STEP
|
|
// [16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_LO
|
|
// [17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_HI
|
|
// [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane B: CHARSET8
|
|
lda #0
|
|
sta DTV_PLANEB_START_LO
|
|
// [19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8 -- _deref_pbuc1=vbuc2
|
|
lda #>CHARSET8
|
|
sta DTV_PLANEB_START_MI
|
|
// [20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_START_HI
|
|
// [21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_STEP
|
|
// [22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_LO
|
|
// [23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_HI
|
|
// [24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2
|
|
// VIC Graphics Bank
|
|
lda #3
|
|
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR
|
|
// [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank bits to output - all others to input
|
|
lda #3^SCREEN/$4000
|
|
sta CIA2
|
|
// [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank
|
|
// VIC memory
|
|
lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
|
|
sta VIC_MEMORY
|
|
// [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
|
__b1_from___b6:
|
|
// [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp __b1
|
|
// DTV Palette - Grey Tones
|
|
// [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
__b1_from___b1:
|
|
// [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
jmp __b1
|
|
// main::@1
|
|
__b1:
|
|
// [28] *((const nomodify byte*) DTV_PALETTE + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
|
txa
|
|
sta DTV_PALETTE,x
|
|
// [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$10
|
|
bne __b1_from___b1
|
|
jmp __b2
|
|
// main::@2
|
|
__b2:
|
|
// 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 }
|
|
// Stabilize Raster
|
|
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
|
|
// [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta BORDER_COLOR
|
|
jmp __b3
|
|
// main::@3
|
|
__b3:
|
|
// [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
|
lda #$42
|
|
cmp RASTER
|
|
bne __b3
|
|
jmp __b4
|
|
// main::@4
|
|
__b4:
|
|
// 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 __b5
|
|
// main::@5
|
|
__b5:
|
|
// [36] (byte) main::rst#1 ← *((const nomodify byte*) RASTER) -- vbuxx=_deref_pbuc1
|
|
ldx RASTER
|
|
// [37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #7
|
|
// [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 -- vbuaa=vbuc1_bor_vbuaa
|
|
ora #VIC_DEN|VIC_ECM|VIC_RSEL
|
|
// [39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa
|
|
sta VIC_CONTROL
|
|
// [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 -- vbuaa=vbuxx_rol_4
|
|
txa
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
// [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa
|
|
sta BORDER_COLOR
|
|
// 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
|
|
// [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$f2
|
|
bne __b5
|
|
jmp __b2
|
|
}
|
|
// gfx_init
|
|
// Initialize the different graphics in the memory
|
|
gfx_init: {
|
|
// [45] call gfx_init_screen0
|
|
// [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
|
|
gfx_init_screen0_from_gfx_init:
|
|
jsr gfx_init_screen0
|
|
// [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
|
|
__b1_from_gfx_init:
|
|
jmp __b1
|
|
// gfx_init::@1
|
|
__b1:
|
|
// [47] call gfx_init_plane_charset8
|
|
// [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
|
|
gfx_init_plane_charset8_from___b1:
|
|
jsr gfx_init_plane_charset8
|
|
jmp __breturn
|
|
// gfx_init::@return
|
|
__breturn:
|
|
// [48] return
|
|
rts
|
|
}
|
|
// gfx_init_plane_charset8
|
|
// Initialize Plane with 8bpp charset
|
|
gfx_init_plane_charset8: {
|
|
// 8bpp cells for Plane B (charset) - ROM charset with 256 colors
|
|
.const gfxbCpuBank = $ff&CHARSET8/$4000
|
|
.label bits = 2
|
|
.label chargen = 7
|
|
.label gfxa = 3
|
|
.label col = 5
|
|
.label cr = 9
|
|
.label ch = 6
|
|
// [50] call dtvSetCpuBankSegment1
|
|
// [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #gfxbCpuBank
|
|
jsr dtvSetCpuBankSegment1
|
|
jmp __b9
|
|
// gfx_init_plane_charset8::@9
|
|
__b9:
|
|
// [51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_CHARROM
|
|
sta PROCPORT
|
|
// [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
|
|
__b1_from___b9:
|
|
// [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z ch
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z col
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1
|
|
lda #<$4000
|
|
sta.z gfxa
|
|
lda #>$4000
|
|
sta.z gfxa+1
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const nomodify byte*) CHARGEN+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1
|
|
lda #<CHARGEN+1
|
|
sta.z chargen
|
|
lda #>CHARGEN+1
|
|
sta.z chargen+1
|
|
jmp __b1
|
|
// [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
|
|
__b1_from___b7:
|
|
// [52] 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
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy
|
|
jmp __b1
|
|
// gfx_init_plane_charset8::@1
|
|
__b1:
|
|
// [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
|
|
__b2_from___b1:
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cr
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
jmp __b2
|
|
// [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
|
|
__b2_from___b6:
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
jmp __b2
|
|
// gfx_init_plane_charset8::@2
|
|
__b2:
|
|
// [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (chargen),y
|
|
sta.z bits
|
|
// [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1
|
|
inc.z chargen
|
|
bne !+
|
|
inc.z chargen+1
|
|
!:
|
|
// [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
|
|
__b3_from___b2:
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
jmp __b3
|
|
// [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
|
|
__b3_from___b4:
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
jmp __b3
|
|
// gfx_init_plane_charset8::@3
|
|
__b3:
|
|
// [57] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$80
|
|
and.z bits
|
|
// [58] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1
|
|
cmp #0
|
|
beq __b4_from___b3
|
|
jmp __b5
|
|
// gfx_init_plane_charset8::@5
|
|
__b5:
|
|
// [59] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1
|
|
lda.z col
|
|
// [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
|
|
__b4_from___b5:
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy
|
|
jmp __b4
|
|
// [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
|
|
__b4_from___b3:
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1
|
|
lda #0
|
|
jmp __b4
|
|
// gfx_init_plane_charset8::@4
|
|
__b4:
|
|
// [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (gfxa),y
|
|
// [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1
|
|
inc.z gfxa
|
|
bne !+
|
|
inc.z gfxa+1
|
|
!:
|
|
// [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1
|
|
asl.z bits
|
|
// [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1
|
|
inc.z col
|
|
// [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne __b3_from___b4
|
|
jmp __b6
|
|
// gfx_init_plane_charset8::@6
|
|
__b6:
|
|
// [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1
|
|
inc.z cr
|
|
// [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp.z cr
|
|
bne __b2_from___b6
|
|
jmp __b7
|
|
// gfx_init_plane_charset8::@7
|
|
__b7:
|
|
// [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1
|
|
inc.z ch
|
|
// [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1
|
|
lda.z ch
|
|
cmp #0
|
|
bne __b1_from___b7
|
|
jmp __b8
|
|
// gfx_init_plane_charset8::@8
|
|
__b8:
|
|
// [71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// [72] call dtvSetCpuBankSegment1
|
|
// Reset CPU BANK segment to $4000
|
|
// [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from___b8:
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #$4000/$4000
|
|
jsr dtvSetCpuBankSegment1
|
|
jmp __breturn
|
|
// gfx_init_plane_charset8::@return
|
|
__breturn:
|
|
// [73] return
|
|
rts
|
|
}
|
|
// dtvSetCpuBankSegment1
|
|
// 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
|
|
// dtvSetCpuBankSegment1(byte register(A) cpuBankIdx)
|
|
dtvSetCpuBankSegment1: {
|
|
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
|
|
.label cpuBank = $ff
|
|
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
|
|
sta cpuBank
|
|
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
.byte $32, $dd
|
|
lda.z $ff
|
|
.byte $32, $00
|
|
jmp __breturn
|
|
// dtvSetCpuBankSegment1::@return
|
|
__breturn:
|
|
// [77] return
|
|
rts
|
|
}
|
|
// gfx_init_screen0
|
|
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
|
|
gfx_init_screen0: {
|
|
.label __1 = 9
|
|
.label ch = 7
|
|
.label cy = 6
|
|
// [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
|
|
__b1_from_gfx_init_screen0:
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (const nomodify byte*) SCREEN [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta.z ch
|
|
lda #>SCREEN
|
|
sta.z ch+1
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cy
|
|
jmp __b1
|
|
// [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
|
|
__b1_from___b3:
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy
|
|
jmp __b1
|
|
// gfx_init_screen0::@1
|
|
__b1:
|
|
// [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
|
|
__b2_from___b1:
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp __b2
|
|
// [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
|
|
__b2_from___b2:
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy
|
|
jmp __b2
|
|
// gfx_init_screen0::@2
|
|
__b2:
|
|
// [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$f
|
|
and.z cy
|
|
// [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __1
|
|
// [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #$f
|
|
// [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa
|
|
ora.z __1
|
|
// [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (ch),y
|
|
// [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1
|
|
inc.z ch
|
|
bne !+
|
|
inc.z ch+1
|
|
!:
|
|
// [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$28
|
|
bne __b2_from___b2
|
|
jmp __b3
|
|
// gfx_init_screen0::@3
|
|
__b3:
|
|
// [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1
|
|
inc.z cy
|
|
// [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp.z cy
|
|
bne __b1_from___b3
|
|
jmp __breturn
|
|
// gfx_init_screen0::@return
|
|
__breturn:
|
|
// [91] return
|
|
rts
|
|
}
|
|
// File Data
|
|
|
|
ASSEMBLER OPTIMIZATIONS
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __bend
|
|
Removing instruction jmp __b6
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
Removing instruction jmp __b4
|
|
Removing instruction jmp __b5
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __breturn
|
|
Removing instruction jmp __b9
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
Removing instruction jmp __b5
|
|
Removing instruction jmp __b4
|
|
Removing instruction jmp __b6
|
|
Removing instruction jmp __b7
|
|
Removing instruction jmp __b8
|
|
Removing instruction jmp __breturn
|
|
Removing instruction jmp __breturn
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
Removing instruction jmp __breturn
|
|
Succesful ASM optimization Pass5NextJumpElimination
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Removing instruction lda #0
|
|
Succesful ASM optimization Pass5UnnecesaryLoadElimination
|
|
Replacing label __b1_from___b1 with __b1
|
|
Replacing label __b3_from___b4 with __b3
|
|
Replacing label __b2_from___b6 with __b2
|
|
Replacing label __b1_from___b7 with __b1
|
|
Replacing label __b2_from___b2 with __b2
|
|
Replacing label __b1_from___b3 with __b1
|
|
Removing instruction __b1_from___bbegin:
|
|
Removing instruction __b1:
|
|
Removing instruction __bend_from___b1:
|
|
Removing instruction __b1_from___b1:
|
|
Removing instruction __b1_from_gfx_init:
|
|
Removing instruction gfx_init_plane_charset8_from___b1:
|
|
Removing instruction __b1_from___b7:
|
|
Removing instruction __b2_from___b1:
|
|
Removing instruction __b2_from___b6:
|
|
Removing instruction __b3_from___b4:
|
|
Removing instruction __b1_from___b3:
|
|
Removing instruction __b2_from___b1:
|
|
Removing instruction __b2_from___b2:
|
|
Succesful ASM optimization Pass5RedundantLabelElimination
|
|
Removing instruction __bbegin:
|
|
Removing instruction __bend:
|
|
Removing instruction gfx_init_from_main:
|
|
Removing instruction __b6:
|
|
Removing instruction __b1_from___b6:
|
|
Removing instruction __b4:
|
|
Removing instruction gfx_init_screen0_from_gfx_init:
|
|
Removing instruction __b1:
|
|
Removing instruction __breturn:
|
|
Removing instruction dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
|
|
Removing instruction __b9:
|
|
Removing instruction __b1_from___b9:
|
|
Removing instruction __b3_from___b2:
|
|
Removing instruction __b5:
|
|
Removing instruction __b4_from___b5:
|
|
Removing instruction __b6:
|
|
Removing instruction __b7:
|
|
Removing instruction __b8:
|
|
Removing instruction dtvSetCpuBankSegment1_from___b8:
|
|
Removing instruction __breturn:
|
|
Removing instruction __breturn:
|
|
Removing instruction __b1_from_gfx_init_screen0:
|
|
Removing instruction __b3:
|
|
Removing instruction __breturn:
|
|
Succesful ASM optimization Pass5UnusedLabelElimination
|
|
Removing instruction jsr main
|
|
Succesful ASM optimization Pass5SkipBegin
|
|
Relabelling long label __b4_from___b3 to __b5
|
|
Succesful ASM optimization Pass5RelabelLongLabels
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
Removing instruction jmp __b1
|
|
Removing instruction jmp __b2
|
|
Succesful ASM optimization Pass5NextJumpElimination
|
|
|
|
FINAL SYMBOL TABLE
|
|
(label) @1
|
|
(label) @begin
|
|
(label) @end
|
|
(const nomodify byte*) BORDER_COLOR = (byte*) 53280
|
|
(const nomodify byte*) CHARGEN = (byte*) 53248
|
|
(const nomodify byte*) CHARSET8 = (byte*) 32768
|
|
(const nomodify struct MOS6526_CIA*) CIA2 = (struct MOS6526_CIA*) 56576
|
|
(const nomodify byte) DTV_BADLINE_OFF = (byte) $20
|
|
(const nomodify byte) DTV_CHUNKY = (byte) $40
|
|
(const nomodify byte*) DTV_CONTROL = (byte*) 53308
|
|
(const nomodify byte*) DTV_FEATURE = (byte*) 53311
|
|
(const nomodify byte) DTV_FEATURE_ENABLE = (byte) 1
|
|
(const nomodify byte) DTV_HIGHCOLOR = (byte) 4
|
|
(const nomodify byte) DTV_LINEAR = (byte) 1
|
|
(const nomodify byte*) DTV_PALETTE = (byte*) 53760
|
|
(const nomodify byte*) DTV_PLANEA_MODULO_HI = (byte*) 53305
|
|
(const nomodify byte*) DTV_PLANEA_MODULO_LO = (byte*) 53304
|
|
(const nomodify byte*) DTV_PLANEA_START_HI = (byte*) 53317
|
|
(const nomodify byte*) DTV_PLANEA_START_LO = (byte*) 53306
|
|
(const nomodify byte*) DTV_PLANEA_START_MI = (byte*) 53307
|
|
(const nomodify byte*) DTV_PLANEA_STEP = (byte*) 53318
|
|
(const nomodify byte*) DTV_PLANEB_MODULO_HI = (byte*) 53320
|
|
(const nomodify byte*) DTV_PLANEB_MODULO_LO = (byte*) 53319
|
|
(const nomodify byte*) DTV_PLANEB_START_HI = (byte*) 53323
|
|
(const nomodify byte*) DTV_PLANEB_START_LO = (byte*) 53321
|
|
(const nomodify byte*) DTV_PLANEB_START_MI = (byte*) 53322
|
|
(const nomodify byte*) DTV_PLANEB_STEP = (byte*) 53324
|
|
(byte) MOS6526_CIA::INTERRUPT
|
|
(byte) MOS6526_CIA::PORT_A
|
|
(byte) MOS6526_CIA::PORT_A_DDR
|
|
(byte) MOS6526_CIA::PORT_B
|
|
(byte) MOS6526_CIA::PORT_B_DDR
|
|
(byte) MOS6526_CIA::SERIAL_DATA
|
|
(word) MOS6526_CIA::TIMER_A
|
|
(byte) MOS6526_CIA::TIMER_A_CONTROL
|
|
(word) MOS6526_CIA::TIMER_B
|
|
(byte) MOS6526_CIA::TIMER_B_CONTROL
|
|
(byte) MOS6526_CIA::TOD_10THS
|
|
(byte) MOS6526_CIA::TOD_HOURS
|
|
(byte) MOS6526_CIA::TOD_MIN
|
|
(byte) MOS6526_CIA::TOD_SEC
|
|
(byte) MOS6569_VICII::BG_COLOR
|
|
(byte) MOS6569_VICII::BG_COLOR1
|
|
(byte) MOS6569_VICII::BG_COLOR2
|
|
(byte) MOS6569_VICII::BG_COLOR3
|
|
(byte) MOS6569_VICII::BORDER_COLOR
|
|
(byte) MOS6569_VICII::CONTROL1
|
|
(byte) MOS6569_VICII::CONTROL2
|
|
(byte) MOS6569_VICII::IRQ_ENABLE
|
|
(byte) MOS6569_VICII::IRQ_STATUS
|
|
(byte) MOS6569_VICII::LIGHTPEN_X
|
|
(byte) MOS6569_VICII::LIGHTPEN_Y
|
|
(byte) MOS6569_VICII::MEMORY
|
|
(byte) MOS6569_VICII::RASTER
|
|
(byte) MOS6569_VICII::SPRITE0_COLOR
|
|
(byte) MOS6569_VICII::SPRITE0_X
|
|
(byte) MOS6569_VICII::SPRITE0_Y
|
|
(byte) MOS6569_VICII::SPRITE1_COLOR
|
|
(byte) MOS6569_VICII::SPRITE1_X
|
|
(byte) MOS6569_VICII::SPRITE1_Y
|
|
(byte) MOS6569_VICII::SPRITE2_COLOR
|
|
(byte) MOS6569_VICII::SPRITE2_X
|
|
(byte) MOS6569_VICII::SPRITE2_Y
|
|
(byte) MOS6569_VICII::SPRITE3_COLOR
|
|
(byte) MOS6569_VICII::SPRITE3_X
|
|
(byte) MOS6569_VICII::SPRITE3_Y
|
|
(byte) MOS6569_VICII::SPRITE4_COLOR
|
|
(byte) MOS6569_VICII::SPRITE4_X
|
|
(byte) MOS6569_VICII::SPRITE4_Y
|
|
(byte) MOS6569_VICII::SPRITE5_COLOR
|
|
(byte) MOS6569_VICII::SPRITE5_X
|
|
(byte) MOS6569_VICII::SPRITE5_Y
|
|
(byte) MOS6569_VICII::SPRITE6_COLOR
|
|
(byte) MOS6569_VICII::SPRITE6_X
|
|
(byte) MOS6569_VICII::SPRITE6_Y
|
|
(byte) MOS6569_VICII::SPRITE7_COLOR
|
|
(byte) MOS6569_VICII::SPRITE7_X
|
|
(byte) MOS6569_VICII::SPRITE7_Y
|
|
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_COLLISION
|
|
(byte) MOS6569_VICII::SPRITES_ENABLE
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_X
|
|
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
|
|
(byte) MOS6569_VICII::SPRITES_MC
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR1
|
|
(byte) MOS6569_VICII::SPRITES_MCOLOR2
|
|
(byte) MOS6569_VICII::SPRITES_PRIORITY
|
|
(byte) MOS6569_VICII::SPRITES_XMSB
|
|
(byte) MOS6581_SID::CH1_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH1_CONTROL
|
|
(word) MOS6581_SID::CH1_FREQ
|
|
(word) MOS6581_SID::CH1_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH2_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH2_CONTROL
|
|
(word) MOS6581_SID::CH2_FREQ
|
|
(word) MOS6581_SID::CH2_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::CH3_ATTACK_DECAY
|
|
(byte) MOS6581_SID::CH3_CONTROL
|
|
(byte) MOS6581_SID::CH3_ENV
|
|
(word) MOS6581_SID::CH3_FREQ
|
|
(byte) MOS6581_SID::CH3_OSC
|
|
(word) MOS6581_SID::CH3_PULSE_WIDTH
|
|
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
|
|
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
|
|
(byte) MOS6581_SID::FILTER_SETUP
|
|
(byte) MOS6581_SID::POT_X
|
|
(byte) MOS6581_SID::POT_Y
|
|
(byte) MOS6581_SID::VOLUME_FILTER_MODE
|
|
(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = (byte) 2
|
|
(const nomodify byte*) PROCPORT = (byte*) 1
|
|
(const nomodify byte*) PROCPORT_DDR = (byte*) 0
|
|
(const nomodify byte) PROCPORT_DDR_MEMORY_MASK = (byte) 7
|
|
(const nomodify byte) PROCPORT_RAM_CHARROM = (byte) 1
|
|
(const nomodify byte) PROCPORT_RAM_IO = (byte) 5
|
|
(const nomodify byte*) RASTER = (byte*) 53266
|
|
(const nomodify byte*) SCREEN = (byte*) 31744
|
|
(const nomodify byte*) VIC_CONTROL = (byte*) 53265
|
|
(const nomodify byte*) VIC_CONTROL2 = (byte*) 53270
|
|
(const nomodify byte) VIC_CSEL = (byte) 8
|
|
(const nomodify byte) VIC_DEN = (byte) $10
|
|
(const nomodify byte) VIC_ECM = (byte) $40
|
|
(const nomodify byte) VIC_MCM = (byte) $10
|
|
(const nomodify byte*) VIC_MEMORY = (byte*) 53272
|
|
(const nomodify byte) VIC_RSEL = (byte) 8
|
|
(void()) dtvSetCpuBankSegment1((byte) dtvSetCpuBankSegment1::cpuBankIdx)
|
|
(label) dtvSetCpuBankSegment1::@return
|
|
(const byte*) dtvSetCpuBankSegment1::cpuBank = (byte*) 255
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx
|
|
(byte) dtvSetCpuBankSegment1::cpuBankIdx#2 reg byte a 10001.0
|
|
(void()) gfx_init()
|
|
(label) gfx_init::@1
|
|
(label) gfx_init::@return
|
|
(void()) gfx_init_plane_charset8()
|
|
(byte~) gfx_init_plane_charset8::$2 reg byte a 2000002.0
|
|
(label) gfx_init_plane_charset8::@1
|
|
(label) gfx_init_plane_charset8::@2
|
|
(label) gfx_init_plane_charset8::@3
|
|
(label) gfx_init_plane_charset8::@4
|
|
(label) gfx_init_plane_charset8::@5
|
|
(label) gfx_init_plane_charset8::@6
|
|
(label) gfx_init_plane_charset8::@7
|
|
(label) gfx_init_plane_charset8::@8
|
|
(label) gfx_init_plane_charset8::@9
|
|
(label) gfx_init_plane_charset8::@return
|
|
(byte) gfx_init_plane_charset8::bits
|
|
(byte) gfx_init_plane_charset8::bits#0 bits zp[1]:2 100001.0
|
|
(byte) gfx_init_plane_charset8::bits#1 bits zp[1]:2 500000.5
|
|
(byte) gfx_init_plane_charset8::bits#2 bits zp[1]:2 442857.7142857142
|
|
(byte) gfx_init_plane_charset8::c
|
|
(byte) gfx_init_plane_charset8::c#2 reg byte a 2000002.0
|
|
(byte) gfx_init_plane_charset8::c#3 reg byte a 2000002.0
|
|
(byte) gfx_init_plane_charset8::ch
|
|
(byte) gfx_init_plane_charset8::ch#1 ch zp[1]:6 15001.5
|
|
(byte) gfx_init_plane_charset8::ch#8 ch zp[1]:6 1176.5882352941176
|
|
(byte*) gfx_init_plane_charset8::chargen
|
|
(byte*) gfx_init_plane_charset8::chargen#1 chargen zp[2]:7 13125.1875
|
|
(byte*) gfx_init_plane_charset8::chargen#2 chargen zp[2]:7 155002.0
|
|
(byte*) gfx_init_plane_charset8::chargen#3 chargen zp[2]:7 20002.0
|
|
(byte) gfx_init_plane_charset8::col
|
|
(byte) gfx_init_plane_charset8::col#1 col zp[1]:5 301429.14285714284
|
|
(byte) gfx_init_plane_charset8::col#2 col zp[1]:5 387500.5
|
|
(byte) gfx_init_plane_charset8::col#5 col zp[1]:5 70001.0
|
|
(byte) gfx_init_plane_charset8::col#6 col zp[1]:5 20002.0
|
|
(byte) gfx_init_plane_charset8::cp
|
|
(byte) gfx_init_plane_charset8::cp#1 reg byte x 1500001.5
|
|
(byte) gfx_init_plane_charset8::cp#2 reg byte x 222222.44444444444
|
|
(byte) gfx_init_plane_charset8::cr
|
|
(byte) gfx_init_plane_charset8::cr#1 cr zp[1]:9 150001.5
|
|
(byte) gfx_init_plane_charset8::cr#6 cr zp[1]:9 14285.857142857143
|
|
(byte*) gfx_init_plane_charset8::gfxa
|
|
(byte*) gfx_init_plane_charset8::gfxa#1 gfxa zp[2]:3 234444.88888888888
|
|
(byte*) gfx_init_plane_charset8::gfxa#2 gfxa zp[2]:3 516667.3333333334
|
|
(byte*) gfx_init_plane_charset8::gfxa#5 gfxa zp[2]:3 70001.0
|
|
(byte*) gfx_init_plane_charset8::gfxa#6 gfxa zp[2]:3 20002.0
|
|
(byte) gfx_init_plane_charset8::gfxbCpuBank
|
|
(const byte) gfx_init_plane_charset8::gfxbCpuBank#0 gfxbCpuBank = (byte)(const nomodify byte*) CHARSET8/(word) $4000
|
|
(void()) gfx_init_screen0()
|
|
(byte~) gfx_init_screen0::$0 reg byte a 200002.0
|
|
(byte~) gfx_init_screen0::$1 zp[1]:9 100001.0
|
|
(byte~) gfx_init_screen0::$2 reg byte a 200002.0
|
|
(byte~) gfx_init_screen0::$3 reg byte a 200002.0
|
|
(label) gfx_init_screen0::@1
|
|
(label) gfx_init_screen0::@2
|
|
(label) gfx_init_screen0::@3
|
|
(label) gfx_init_screen0::@return
|
|
(byte*) gfx_init_screen0::ch
|
|
(byte*) gfx_init_screen0::ch#1 ch zp[2]:7 42000.600000000006
|
|
(byte*) gfx_init_screen0::ch#2 ch zp[2]:7 51667.33333333333
|
|
(byte*) gfx_init_screen0::ch#3 ch zp[2]:7 20002.0
|
|
(byte) gfx_init_screen0::cx
|
|
(byte) gfx_init_screen0::cx#1 reg byte x 150001.5
|
|
(byte) gfx_init_screen0::cx#2 reg byte x 42857.57142857143
|
|
(byte) gfx_init_screen0::cy
|
|
(byte) gfx_init_screen0::cy#1 cy zp[1]:6 15001.5
|
|
(byte) gfx_init_screen0::cy#4 cy zp[1]:6 12000.300000000001
|
|
(void()) main()
|
|
(byte~) main::$3 reg byte a 2002.0
|
|
(byte~) main::$4 reg byte a 2002.0
|
|
(byte~) main::$5 reg byte a 2002.0
|
|
(label) main::@1
|
|
(label) main::@2
|
|
(label) main::@3
|
|
(label) main::@4
|
|
(label) main::@5
|
|
(label) main::@6
|
|
(byte) main::j
|
|
(byte) main::j#1 reg byte x 151.5
|
|
(byte) main::j#2 reg byte x 202.0
|
|
(byte) main::rst
|
|
(byte) main::rst#1 reg byte x 572.0
|
|
|
|
reg byte x [ main::j#2 main::j#1 ]
|
|
zp[1]:2 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
zp[2]:3 [ 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[1]:5 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ]
|
|
reg byte x [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
reg byte a [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
|
|
reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
zp[1]:6 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
zp[2]:7 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
reg byte x [ main::rst#1 ]
|
|
reg byte a [ main::$3 ]
|
|
reg byte a [ main::$4 ]
|
|
reg byte a [ main::$5 ]
|
|
reg byte a [ gfx_init_plane_charset8::$2 ]
|
|
reg byte a [ gfx_init_screen0::$0 ]
|
|
zp[1]:9 [ gfx_init_screen0::$1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
reg byte a [ gfx_init_screen0::$2 ]
|
|
reg byte a [ gfx_init_screen0::$3 ]
|
|
|
|
|
|
FINAL ASSEMBLER
|
|
Score: 75375
|
|
|
|
// File Comments
|
|
// C64DTV 8bpp charmode stretcher
|
|
// Upstart
|
|
.pc = $801 "Basic"
|
|
:BasicUpstart(main)
|
|
.pc = $80d "Program"
|
|
// Global Constants & labels
|
|
.const VIC_ECM = $40
|
|
.const VIC_DEN = $10
|
|
.const VIC_RSEL = 8
|
|
.const VIC_MCM = $10
|
|
.const VIC_CSEL = 8
|
|
// Mask for PROCESSOR_PORT_DDR which allows only memory configuration to be written
|
|
.const PROCPORT_DDR_MEMORY_MASK = 7
|
|
// RAM in 0xA000, 0xE000 I/O in 0xD000
|
|
.const PROCPORT_RAM_IO = 5
|
|
// RAM in 0xA000, 0xE000 CHAR ROM in 0xD000
|
|
.const PROCPORT_RAM_CHARROM = 1
|
|
.const DTV_FEATURE_ENABLE = 1
|
|
.const DTV_LINEAR = 1
|
|
.const DTV_HIGHCOLOR = 4
|
|
.const DTV_BADLINE_OFF = $20
|
|
.const DTV_CHUNKY = $40
|
|
.const OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2
|
|
.label RASTER = $d012
|
|
.label BORDER_COLOR = $d020
|
|
.label VIC_CONTROL = $d011
|
|
.label VIC_CONTROL2 = $d016
|
|
.label VIC_MEMORY = $d018
|
|
// Processor port data direction register
|
|
.label PROCPORT_DDR = 0
|
|
// Processor Port Register controlling RAM/ROM configuration and the datasette
|
|
.label PROCPORT = 1
|
|
// The address of the CHARGEN character set
|
|
.label CHARGEN = $d000
|
|
// The CIA#2: Serial bus, RS-232, VIC memory bank
|
|
.label CIA2 = $dd00
|
|
// Feature enables or disables the extra C64 DTV features
|
|
.label DTV_FEATURE = $d03f
|
|
// Controls the graphics modes of the C64 DTV
|
|
.label DTV_CONTROL = $d03c
|
|
// Defines colors for the 16 first colors ($00-$0f)
|
|
.label DTV_PALETTE = $d200
|
|
// Linear Graphics Plane A Counter Control
|
|
.label DTV_PLANEA_START_LO = $d03a
|
|
.label DTV_PLANEA_START_MI = $d03b
|
|
.label DTV_PLANEA_START_HI = $d045
|
|
.label DTV_PLANEA_STEP = $d046
|
|
.label DTV_PLANEA_MODULO_LO = $d038
|
|
.label DTV_PLANEA_MODULO_HI = $d039
|
|
// Linear Graphics Plane B Counter Control
|
|
.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
|
|
// Plane with the screen
|
|
.label SCREEN = $7c00
|
|
// Plane with all pixels
|
|
.label CHARSET8 = $8000
|
|
// @begin
|
|
// [1] phi from @begin to @1 [phi:@begin->@1]
|
|
// @1
|
|
// [2] call main
|
|
// [3] phi from @1 to @end [phi:@1->@end]
|
|
// @end
|
|
// main
|
|
main: {
|
|
// asm
|
|
// asm { sei }
|
|
sei
|
|
// *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
|
// [5] *((const nomodify byte*) PROCPORT_DDR) ← (const nomodify byte) PROCPORT_DDR_MEMORY_MASK -- _deref_pbuc1=vbuc2
|
|
// Disable normal interrupt (prevent keyboard reading glitches and allows to hide basic/kernal)
|
|
// Disable kernal & basic
|
|
lda #PROCPORT_DDR_MEMORY_MASK
|
|
sta PROCPORT_DDR
|
|
// *PROCPORT = PROCPORT_RAM_IO
|
|
// [6] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// gfx_init()
|
|
// [7] call gfx_init
|
|
// [44] phi from main to gfx_init [phi:main->gfx_init]
|
|
jsr gfx_init
|
|
// main::@6
|
|
// *DTV_FEATURE = DTV_FEATURE_ENABLE
|
|
// [8] *((const nomodify byte*) DTV_FEATURE) ← (const nomodify byte) DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
|
|
// Enable DTV extended modes
|
|
lda #DTV_FEATURE_ENABLE
|
|
sta DTV_FEATURE
|
|
// *DTV_CONTROL = DTV_HIGHCOLOR | DTV_LINEAR | DTV_CHUNKY | DTV_BADLINE_OFF
|
|
// [9] *((const nomodify byte*) DTV_CONTROL) ← (const nomodify byte) DTV_HIGHCOLOR|(const nomodify byte) DTV_LINEAR|(const nomodify byte) DTV_CHUNKY|(const nomodify byte) DTV_BADLINE_OFF -- _deref_pbuc1=vbuc2
|
|
// 8BPP Pixel Cell Mode
|
|
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
sta DTV_CONTROL
|
|
// *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3
|
|
// [10] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// *VIC_CONTROL2 = VIC_MCM | VIC_CSEL
|
|
// [11] *((const nomodify byte*) VIC_CONTROL2) ← (const nomodify byte) VIC_MCM|(const nomodify byte) VIC_CSEL -- _deref_pbuc1=vbuc2
|
|
lda #VIC_MCM|VIC_CSEL
|
|
sta VIC_CONTROL2
|
|
// *DTV_PLANEA_START_LO = < SCREEN
|
|
// [12] *((const nomodify byte*) DTV_PLANEA_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane A: SCREEN
|
|
lda #0
|
|
sta DTV_PLANEA_START_LO
|
|
// *DTV_PLANEA_START_MI = > SCREEN
|
|
// [13] *((const nomodify byte*) DTV_PLANEA_START_MI) ← >(const nomodify byte*) SCREEN -- _deref_pbuc1=vbuc2
|
|
lda #>SCREEN
|
|
sta DTV_PLANEA_START_MI
|
|
// *DTV_PLANEA_START_HI = 0
|
|
// [14] *((const nomodify byte*) DTV_PLANEA_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_START_HI
|
|
// *DTV_PLANEA_STEP = 1
|
|
// [15] *((const nomodify byte*) DTV_PLANEA_STEP) ← (byte) 1 -- _deref_pbuc1=vbuc2
|
|
lda #1
|
|
sta DTV_PLANEA_STEP
|
|
// *DTV_PLANEA_MODULO_LO = 0
|
|
// [16] *((const nomodify byte*) DTV_PLANEA_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_LO
|
|
// *DTV_PLANEA_MODULO_HI = 0
|
|
// [17] *((const nomodify byte*) DTV_PLANEA_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEA_MODULO_HI
|
|
// *DTV_PLANEB_START_LO = < CHARSET8
|
|
// [18] *((const nomodify byte*) DTV_PLANEB_START_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
// Plane B: CHARSET8
|
|
sta DTV_PLANEB_START_LO
|
|
// *DTV_PLANEB_START_MI = > CHARSET8
|
|
// [19] *((const nomodify byte*) DTV_PLANEB_START_MI) ← >(const nomodify byte*) CHARSET8 -- _deref_pbuc1=vbuc2
|
|
lda #>CHARSET8
|
|
sta DTV_PLANEB_START_MI
|
|
// *DTV_PLANEB_START_HI = 0
|
|
// [20] *((const nomodify byte*) DTV_PLANEB_START_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_START_HI
|
|
// *DTV_PLANEB_STEP = 0
|
|
// [21] *((const nomodify byte*) DTV_PLANEB_STEP) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_STEP
|
|
// *DTV_PLANEB_MODULO_LO = 0
|
|
// [22] *((const nomodify byte*) DTV_PLANEB_MODULO_LO) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_MODULO_LO
|
|
// *DTV_PLANEB_MODULO_HI = 0
|
|
// [23] *((const nomodify byte*) DTV_PLANEB_MODULO_HI) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_MODULO_HI
|
|
// CIA2->PORT_A_DDR = %00000011
|
|
// [24] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2+(const byte) OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) ← (byte) 3 -- _deref_pbuc1=vbuc2
|
|
// VIC Graphics Bank
|
|
lda #3
|
|
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR
|
|
// CIA2->PORT_A = %00000011 ^ (byte)((word)SCREEN/$4000)
|
|
// [25] *((byte*)(const nomodify struct MOS6526_CIA*) CIA2) ← (byte) 3^(byte)(word)(const nomodify byte*) SCREEN/(word) $4000 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank bits to output - all others to input
|
|
lda #3^SCREEN/$4000
|
|
sta CIA2
|
|
// *VIC_MEMORY = (byte)((((word)SCREEN)&$3fff)/$40) | ((>(((word)SCREEN)&$3fff))/4)
|
|
// [26] *((const nomodify byte*) VIC_MEMORY) ← (byte)(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) $40|>(word)(const nomodify byte*) SCREEN&(word) $3fff/(byte) 4 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank
|
|
// VIC memory
|
|
lda #(SCREEN&$3fff)/$40|(>(SCREEN&$3fff))/4
|
|
sta VIC_MEMORY
|
|
// [27] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
|
// [27] phi (byte) main::j#2 = (byte) 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// DTV Palette - Grey Tones
|
|
// [27] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
// [27] phi (byte) main::j#2 = (byte) main::j#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
// main::@1
|
|
__b1:
|
|
// DTV_PALETTE[j] = j
|
|
// [28] *((const nomodify byte*) DTV_PALETTE + (byte) main::j#2) ← (byte) main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
|
txa
|
|
sta DTV_PALETTE,x
|
|
// for(byte j : 0..$f)
|
|
// [29] (byte) main::j#1 ← ++ (byte) main::j#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [30] if((byte) main::j#1!=(byte) $10) goto main::@1 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$10
|
|
bne __b1
|
|
// main::@2
|
|
__b2:
|
|
// asm
|
|
// 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 }
|
|
// Stabilize Raster
|
|
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
|
|
// *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | 3
|
|
// [32] *((const nomodify byte*) VIC_CONTROL) ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL|(byte) 3 -- _deref_pbuc1=vbuc2
|
|
lda #VIC_DEN|VIC_ECM|VIC_RSEL|3
|
|
sta VIC_CONTROL
|
|
// *BORDER_COLOR = 0
|
|
// [33] *((const nomodify byte*) BORDER_COLOR) ← (byte) 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta BORDER_COLOR
|
|
// main::@3
|
|
__b3:
|
|
// while(*RASTER!=rst)
|
|
// [34] if(*((const nomodify byte*) RASTER)!=(byte) $42) goto main::@3 -- _deref_pbuc1_neq_vbuc2_then_la1
|
|
lda #$42
|
|
cmp RASTER
|
|
bne __b3
|
|
// main::@4
|
|
// asm
|
|
// 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
|
|
// main::@5
|
|
__b5:
|
|
// rst = *RASTER
|
|
// [36] (byte) main::rst#1 ← *((const nomodify byte*) RASTER) -- vbuxx=_deref_pbuc1
|
|
ldx RASTER
|
|
// rst&7
|
|
// [37] (byte~) main::$3 ← (byte) main::rst#1 & (byte) 7 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #7
|
|
// VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7)
|
|
// [38] (byte~) main::$4 ← (const nomodify byte) VIC_DEN|(const nomodify byte) VIC_ECM|(const nomodify byte) VIC_RSEL | (byte~) main::$3 -- vbuaa=vbuc1_bor_vbuaa
|
|
ora #VIC_DEN|VIC_ECM|VIC_RSEL
|
|
// *VIC_CONTROL = VIC_DEN | VIC_ECM | VIC_RSEL | (rst&7)
|
|
// [39] *((const nomodify byte*) VIC_CONTROL) ← (byte~) main::$4 -- _deref_pbuc1=vbuaa
|
|
sta VIC_CONTROL
|
|
// rst*$10
|
|
// [40] (byte~) main::$5 ← (byte) main::rst#1 << (byte) 4 -- vbuaa=vbuxx_rol_4
|
|
txa
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
// *BORDER_COLOR = rst*$10
|
|
// [41] *((const nomodify byte*) BORDER_COLOR) ← (byte~) main::$5 -- _deref_pbuc1=vbuaa
|
|
sta BORDER_COLOR
|
|
// asm
|
|
// 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
|
|
// while (rst!=$f2)
|
|
// [43] if((byte) main::rst#1!=(byte) $f2) goto main::@5 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$f2
|
|
bne __b5
|
|
jmp __b2
|
|
}
|
|
// gfx_init
|
|
// Initialize the different graphics in the memory
|
|
gfx_init: {
|
|
// gfx_init_screen0()
|
|
// [45] call gfx_init_screen0
|
|
// [78] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
|
|
jsr gfx_init_screen0
|
|
// [46] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
|
|
// gfx_init::@1
|
|
// gfx_init_plane_charset8()
|
|
// [47] call gfx_init_plane_charset8
|
|
// [49] phi from gfx_init::@1 to gfx_init_plane_charset8 [phi:gfx_init::@1->gfx_init_plane_charset8]
|
|
jsr gfx_init_plane_charset8
|
|
// gfx_init::@return
|
|
// }
|
|
// [48] return
|
|
rts
|
|
}
|
|
// gfx_init_plane_charset8
|
|
// Initialize Plane with 8bpp charset
|
|
gfx_init_plane_charset8: {
|
|
// 8bpp cells for Plane B (charset) - ROM charset with 256 colors
|
|
.const gfxbCpuBank = $ff&CHARSET8/$4000
|
|
.label bits = 2
|
|
.label chargen = 7
|
|
.label gfxa = 3
|
|
.label col = 5
|
|
.label cr = 9
|
|
.label ch = 6
|
|
// dtvSetCpuBankSegment1(gfxbCpuBank++)
|
|
// [50] call dtvSetCpuBankSegment1
|
|
// [74] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (const byte) gfx_init_plane_charset8::gfxbCpuBank#0 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #gfxbCpuBank
|
|
jsr dtvSetCpuBankSegment1
|
|
// gfx_init_plane_charset8::@9
|
|
// *PROCPORT = PROCPORT_RAM_CHARROM
|
|
// [51] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_CHARROM
|
|
sta PROCPORT
|
|
// [52] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
|
|
// [52] phi (byte) gfx_init_plane_charset8::ch#8 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z ch
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1
|
|
sta.z col
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*)(word) $4000 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#2] -- pbuz1=pbuc1
|
|
lda #<$4000
|
|
sta.z gfxa
|
|
lda #>$4000
|
|
sta.z gfxa+1
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (const nomodify byte*) CHARGEN+(byte) 1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#3] -- pbuz1=pbuc1
|
|
lda #<CHARGEN+1
|
|
sta.z chargen
|
|
lda #>CHARGEN+1
|
|
sta.z chargen+1
|
|
// [52] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
|
|
// [52] 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
|
|
// [52] phi (byte) gfx_init_plane_charset8::col#6 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::gfxa#6 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy
|
|
// [52] phi (byte*) gfx_init_plane_charset8::chargen#3 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#3] -- register_copy
|
|
// gfx_init_plane_charset8::@1
|
|
__b1:
|
|
// [53] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cr
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
// [53] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
|
|
// [53] phi (byte) gfx_init_plane_charset8::cr#6 = (byte) gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy
|
|
// [53] phi (byte) gfx_init_plane_charset8::col#5 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::gfxa#5 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [53] phi (byte*) gfx_init_plane_charset8::chargen#2 = (byte*) gfx_init_plane_charset8::chargen#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
// gfx_init_plane_charset8::@2
|
|
__b2:
|
|
// bits = *chargen++
|
|
// [54] (byte) gfx_init_plane_charset8::bits#0 ← *((byte*) gfx_init_plane_charset8::chargen#2) -- vbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (chargen),y
|
|
sta.z bits
|
|
// [55] (byte*) gfx_init_plane_charset8::chargen#1 ← ++ (byte*) gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1
|
|
inc.z chargen
|
|
bne !+
|
|
inc.z chargen+1
|
|
!:
|
|
// [56] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::bits#2 = (byte) gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
// [56] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
|
|
// [56] phi (byte) gfx_init_plane_charset8::cp#2 = (byte) gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy
|
|
// [56] phi (byte) gfx_init_plane_charset8::col#2 = (byte) gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [56] phi (byte*) gfx_init_plane_charset8::gfxa#2 = (byte*) gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [56] 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
|
|
// gfx_init_plane_charset8::@3
|
|
__b3:
|
|
// bits & $80
|
|
// [57] (byte~) gfx_init_plane_charset8::$2 ← (byte) gfx_init_plane_charset8::bits#2 & (byte) $80 -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$80
|
|
and.z bits
|
|
// if((bits & $80) != 0)
|
|
// [58] if((byte~) gfx_init_plane_charset8::$2==(byte) 0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1
|
|
cmp #0
|
|
beq __b5
|
|
// gfx_init_plane_charset8::@5
|
|
// [59] (byte) gfx_init_plane_charset8::c#3 ← (byte) gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1
|
|
lda.z col
|
|
// [60] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy
|
|
jmp __b4
|
|
// [60] phi from gfx_init_plane_charset8::@3 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4]
|
|
__b5:
|
|
// [60] phi (byte) gfx_init_plane_charset8::c#2 = (byte) 0 [phi:gfx_init_plane_charset8::@3->gfx_init_plane_charset8::@4#0] -- vbuaa=vbuc1
|
|
lda #0
|
|
// gfx_init_plane_charset8::@4
|
|
__b4:
|
|
// *gfxa++ = c
|
|
// [61] *((byte*) gfx_init_plane_charset8::gfxa#2) ← (byte) gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (gfxa),y
|
|
// *gfxa++ = c;
|
|
// [62] (byte*) gfx_init_plane_charset8::gfxa#1 ← ++ (byte*) gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1
|
|
inc.z gfxa
|
|
bne !+
|
|
inc.z gfxa+1
|
|
!:
|
|
// bits = bits*2
|
|
// [63] (byte) gfx_init_plane_charset8::bits#1 ← (byte) gfx_init_plane_charset8::bits#2 << (byte) 1 -- vbuz1=vbuz1_rol_1
|
|
asl.z bits
|
|
// col++;
|
|
// [64] (byte) gfx_init_plane_charset8::col#1 ← ++ (byte) gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1
|
|
inc.z col
|
|
// for ( byte cp : 0..7)
|
|
// [65] (byte) gfx_init_plane_charset8::cp#1 ← ++ (byte) gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [66] if((byte) gfx_init_plane_charset8::cp#1!=(byte) 8) goto gfx_init_plane_charset8::@3 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #8
|
|
bne __b3
|
|
// gfx_init_plane_charset8::@6
|
|
// for ( byte cr : 0..7)
|
|
// [67] (byte) gfx_init_plane_charset8::cr#1 ← ++ (byte) gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1
|
|
inc.z cr
|
|
// [68] if((byte) gfx_init_plane_charset8::cr#1!=(byte) 8) goto gfx_init_plane_charset8::@2 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #8
|
|
cmp.z cr
|
|
bne __b2
|
|
// gfx_init_plane_charset8::@7
|
|
// for(byte ch : $00..$ff)
|
|
// [69] (byte) gfx_init_plane_charset8::ch#1 ← ++ (byte) gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1
|
|
inc.z ch
|
|
// [70] if((byte) gfx_init_plane_charset8::ch#1!=(byte) 0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1
|
|
lda.z ch
|
|
cmp #0
|
|
bne __b1
|
|
// gfx_init_plane_charset8::@8
|
|
// *PROCPORT = PROCPORT_RAM_IO
|
|
// [71] *((const nomodify byte*) PROCPORT) ← (const nomodify byte) PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta PROCPORT
|
|
// dtvSetCpuBankSegment1((byte)($4000/$4000))
|
|
// [72] call dtvSetCpuBankSegment1
|
|
// Reset CPU BANK segment to $4000
|
|
// [74] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
|
|
// [74] phi (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 = (byte)(number) $4000/(number) $4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #$4000/$4000
|
|
jsr dtvSetCpuBankSegment1
|
|
// gfx_init_plane_charset8::@return
|
|
// }
|
|
// [73] return
|
|
rts
|
|
}
|
|
// dtvSetCpuBankSegment1
|
|
// 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
|
|
// dtvSetCpuBankSegment1(byte register(A) cpuBankIdx)
|
|
dtvSetCpuBankSegment1: {
|
|
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
|
|
.label cpuBank = $ff
|
|
// *cpuBank = cpuBankIdx
|
|
// [75] *((const byte*) dtvSetCpuBankSegment1::cpuBank) ← (byte) dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
|
|
sta cpuBank
|
|
// asm
|
|
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
.byte $32, $dd
|
|
lda.z $ff
|
|
.byte $32, $00
|
|
// dtvSetCpuBankSegment1::@return
|
|
// }
|
|
// [77] return
|
|
rts
|
|
}
|
|
// gfx_init_screen0
|
|
// Initialize VIC screen 0 ( value is %yyyyxxxx where yyyy is ypos and xxxx is xpos)
|
|
gfx_init_screen0: {
|
|
.label __1 = 9
|
|
.label ch = 7
|
|
.label cy = 6
|
|
// [79] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (const nomodify byte*) SCREEN [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta.z ch
|
|
lda #>SCREEN
|
|
sta.z ch+1
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cy
|
|
// [79] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
|
|
// [79] phi (byte*) gfx_init_screen0::ch#3 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy
|
|
// [79] phi (byte) gfx_init_screen0::cy#4 = (byte) gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy
|
|
// gfx_init_screen0::@1
|
|
__b1:
|
|
// [80] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [80] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
|
|
// [80] phi (byte*) gfx_init_screen0::ch#2 = (byte*) gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy
|
|
// [80] phi (byte) gfx_init_screen0::cx#2 = (byte) gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy
|
|
// gfx_init_screen0::@2
|
|
__b2:
|
|
// cy&$f
|
|
// [81] (byte~) gfx_init_screen0::$0 ← (byte) gfx_init_screen0::cy#4 & (byte) $f -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$f
|
|
and.z cy
|
|
// (cy&$f)*$10
|
|
// [82] (byte~) gfx_init_screen0::$1 ← (byte~) gfx_init_screen0::$0 << (byte) 4 -- vbuz1=vbuaa_rol_4
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __1
|
|
// cx&$f
|
|
// [83] (byte~) gfx_init_screen0::$2 ← (byte) gfx_init_screen0::cx#2 & (byte) $f -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #$f
|
|
// (cy&$f)*$10|(cx&$f)
|
|
// [84] (byte~) gfx_init_screen0::$3 ← (byte~) gfx_init_screen0::$1 | (byte~) gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa
|
|
ora.z __1
|
|
// *ch++ = (cy&$f)*$10|(cx&$f)
|
|
// [85] *((byte*) gfx_init_screen0::ch#2) ← (byte~) gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (ch),y
|
|
// *ch++ = (cy&$f)*$10|(cx&$f);
|
|
// [86] (byte*) gfx_init_screen0::ch#1 ← ++ (byte*) gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1
|
|
inc.z ch
|
|
bne !+
|
|
inc.z ch+1
|
|
!:
|
|
// for(byte cx: 0..39)
|
|
// [87] (byte) gfx_init_screen0::cx#1 ← ++ (byte) gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [88] if((byte) gfx_init_screen0::cx#1!=(byte) $28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$28
|
|
bne __b2
|
|
// gfx_init_screen0::@3
|
|
// for(byte cy: 0..24 )
|
|
// [89] (byte) gfx_init_screen0::cy#1 ← ++ (byte) gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1
|
|
inc.z cy
|
|
// [90] if((byte) gfx_init_screen0::cy#1!=(byte) $19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp.z cy
|
|
bne __b1
|
|
// gfx_init_screen0::@return
|
|
// }
|
|
// [91] return
|
|
rts
|
|
}
|
|
// File Data
|
|
|