mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
2725 lines
145 KiB
Plaintext
2725 lines
145 KiB
Plaintext
Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx)
|
|
Inlined call call __init
|
|
|
|
CONTROL FLOW GRAPH SSA
|
|
|
|
void dtvSetCpuBankSegment1(char cpuBankIdx)
|
|
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
|
|
dtvSetCpuBankSegment1::cpuBankIdx#2 = phi( gfx_init_plane_charset8/dtvSetCpuBankSegment1::cpuBankIdx#0, gfx_init_plane_charset8::@8/dtvSetCpuBankSegment1::cpuBankIdx#1 )
|
|
*dtvSetCpuBankSegment1::cpuBank = 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 __start::@1
|
|
asm { sei }
|
|
*PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
|
*PROCPORT = PROCPORT_RAM_IO
|
|
call gfx_init
|
|
to:main::@7
|
|
main::@7: scope:[main] from main
|
|
*DTV_FEATURE = DTV_FEATURE_ENABLE
|
|
*DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
*VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
*VICII_CONTROL2 = VICII_MCM|VICII_CSEL
|
|
*DTV_PLANEA_START_LO = byte0 SCREEN
|
|
*DTV_PLANEA_START_MI = byte1 SCREEN
|
|
*DTV_PLANEA_START_HI = 0
|
|
*DTV_PLANEA_STEP = 1
|
|
*DTV_PLANEA_MODULO_LO = 0
|
|
*DTV_PLANEA_MODULO_HI = 0
|
|
*DTV_PLANEB_START_LO = byte0 CHARSET8
|
|
*DTV_PLANEB_START_MI = byte1 CHARSET8
|
|
*DTV_PLANEB_START_HI = 0
|
|
*DTV_PLANEB_STEP = 0
|
|
*DTV_PLANEB_MODULO_LO = 0
|
|
*DTV_PLANEB_MODULO_HI = 0
|
|
*((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3
|
|
*((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = 3^(char)(unsigned int)SCREEN/$4000
|
|
*VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4
|
|
main::j#0 = 0
|
|
to:main::@1
|
|
main::@1: scope:[main] from main::@1 main::@7
|
|
main::j#2 = phi( main::@1/main::j#1, main::@7/main::j#0 )
|
|
DTV_PALETTE[main::j#2] = main::j#2
|
|
main::j#1 = main::j#2 + rangenext(0,$f)
|
|
main::$1 = main::j#1 != rangelast(0,$f)
|
|
if(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 }
|
|
*VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
*BORDER_COLOR = 0
|
|
main::rst#0 = $42
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3 main::@4
|
|
main::rst#2 = phi( main::@3/main::rst#0, main::@4/main::rst#2 )
|
|
main::$2 = *RASTER != main::rst#2
|
|
if(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
|
|
main::rst#1 = *RASTER
|
|
main::$3 = main::rst#1 & 7
|
|
main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3
|
|
*VICII_CONTROL1 = main::$4
|
|
main::$5 = main::rst#1 * $10
|
|
*BORDER_COLOR = main::$5
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
main::$6 = main::rst#1 != $f2
|
|
if(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
|
|
gfx_init_screen0::ch#0 = SCREEN
|
|
gfx_init_screen0::cy#0 = 0
|
|
to:gfx_init_screen0::@1
|
|
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
|
|
gfx_init_screen0::ch#3 = phi( gfx_init_screen0/gfx_init_screen0::ch#0, gfx_init_screen0::@3/gfx_init_screen0::ch#4 )
|
|
gfx_init_screen0::cy#4 = phi( gfx_init_screen0/gfx_init_screen0::cy#0, gfx_init_screen0::@3/gfx_init_screen0::cy#1 )
|
|
gfx_init_screen0::cx#0 = 0
|
|
to:gfx_init_screen0::@2
|
|
gfx_init_screen0::@2: scope:[gfx_init_screen0] from gfx_init_screen0::@1 gfx_init_screen0::@2
|
|
gfx_init_screen0::ch#2 = phi( gfx_init_screen0::@1/gfx_init_screen0::ch#3, gfx_init_screen0::@2/gfx_init_screen0::ch#1 )
|
|
gfx_init_screen0::cx#2 = phi( gfx_init_screen0::@1/gfx_init_screen0::cx#0, gfx_init_screen0::@2/gfx_init_screen0::cx#1 )
|
|
gfx_init_screen0::cy#2 = phi( gfx_init_screen0::@1/gfx_init_screen0::cy#4, gfx_init_screen0::@2/gfx_init_screen0::cy#2 )
|
|
gfx_init_screen0::$0 = gfx_init_screen0::cy#2 & $f
|
|
gfx_init_screen0::$1 = gfx_init_screen0::$0 * $10
|
|
gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f
|
|
gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2
|
|
*gfx_init_screen0::ch#2 = gfx_init_screen0::$3
|
|
gfx_init_screen0::ch#1 = ++ gfx_init_screen0::ch#2
|
|
gfx_init_screen0::cx#1 = gfx_init_screen0::cx#2 + rangenext(0,$27)
|
|
gfx_init_screen0::$4 = gfx_init_screen0::cx#1 != rangelast(0,$27)
|
|
if(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
|
|
gfx_init_screen0::ch#4 = phi( gfx_init_screen0::@2/gfx_init_screen0::ch#1 )
|
|
gfx_init_screen0::cy#3 = phi( gfx_init_screen0::@2/gfx_init_screen0::cy#2 )
|
|
gfx_init_screen0::cy#1 = gfx_init_screen0::cy#3 + rangenext(0,$18)
|
|
gfx_init_screen0::$5 = gfx_init_screen0::cy#1 != rangelast(0,$18)
|
|
if(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
|
|
gfx_init_plane_charset8::gfxbCpuBank#0 = (char)CHARSET8/$4000
|
|
dtvSetCpuBankSegment1::cpuBankIdx#0 = 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
|
|
gfx_init_plane_charset8::gfxbCpuBank#2 = phi( gfx_init_plane_charset8/gfx_init_plane_charset8::gfxbCpuBank#0 )
|
|
gfx_init_plane_charset8::gfxbCpuBank#1 = ++ gfx_init_plane_charset8::gfxbCpuBank#2
|
|
gfx_init_plane_charset8::gfxa#0 = (char *)$4000+(unsigned int)CHARSET8&$3fff
|
|
gfx_init_plane_charset8::chargen#0 = CHARGEN+1
|
|
*PROCPORT = PROCPORT_RAM_CHARROM
|
|
gfx_init_plane_charset8::col#0 = 0
|
|
gfx_init_plane_charset8::ch#0 = 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
|
|
gfx_init_plane_charset8::ch#8 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::ch#1, gfx_init_plane_charset8::@9/gfx_init_plane_charset8::ch#0 )
|
|
gfx_init_plane_charset8::col#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::col#8, gfx_init_plane_charset8::@9/gfx_init_plane_charset8::col#0 )
|
|
gfx_init_plane_charset8::gfxa#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::gfxa#8, gfx_init_plane_charset8::@9/gfx_init_plane_charset8::gfxa#0 )
|
|
gfx_init_plane_charset8::chargen#3 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::chargen#5, gfx_init_plane_charset8::@9/gfx_init_plane_charset8::chargen#0 )
|
|
gfx_init_plane_charset8::cr#0 = 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
|
|
gfx_init_plane_charset8::ch#7 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::ch#8, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::ch#3 )
|
|
gfx_init_plane_charset8::cr#6 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::cr#0, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::cr#1 )
|
|
gfx_init_plane_charset8::col#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::col#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::col#7 )
|
|
gfx_init_plane_charset8::gfxa#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::gfxa#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::gfxa#7 )
|
|
gfx_init_plane_charset8::chargen#2 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::chargen#3, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::chargen#4 )
|
|
gfx_init_plane_charset8::bits#0 = *gfx_init_plane_charset8::chargen#2
|
|
gfx_init_plane_charset8::chargen#1 = ++ gfx_init_plane_charset8::chargen#2
|
|
gfx_init_plane_charset8::cp#0 = 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
|
|
gfx_init_plane_charset8::ch#5 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::ch#7, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::ch#4 )
|
|
gfx_init_plane_charset8::chargen#7 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::chargen#1, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::chargen#6 )
|
|
gfx_init_plane_charset8::cr#4 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::cr#6, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::cr#3 )
|
|
gfx_init_plane_charset8::cp#3 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::cp#0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::cp#1 )
|
|
gfx_init_plane_charset8::col#4 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::col#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::col#1 )
|
|
gfx_init_plane_charset8::gfxa#3 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::gfxa#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::gfxa#1 )
|
|
gfx_init_plane_charset8::bits#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::bits#0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::bits#1 )
|
|
gfx_init_plane_charset8::c#0 = 0
|
|
gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80
|
|
gfx_init_plane_charset8::$3 = gfx_init_plane_charset8::$2 != 0
|
|
gfx_init_plane_charset8::$4 = ! gfx_init_plane_charset8::$3
|
|
if(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
|
|
gfx_init_plane_charset8::ch#4 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::ch#5, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::ch#6 )
|
|
gfx_init_plane_charset8::chargen#6 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::chargen#7, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::chargen#8 )
|
|
gfx_init_plane_charset8::cr#3 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::cr#4, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::cr#5 )
|
|
gfx_init_plane_charset8::cp#2 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::cp#3, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::cp#4 )
|
|
gfx_init_plane_charset8::col#2 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::col#4, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::col#3 )
|
|
gfx_init_plane_charset8::bits#3 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::bits#2, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::bits#4 )
|
|
gfx_init_plane_charset8::gfxa#2 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::gfxa#3, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::gfxa#4 )
|
|
gfx_init_plane_charset8::c#2 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::c#0, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::c#1 )
|
|
*gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::c#2
|
|
gfx_init_plane_charset8::gfxa#1 = ++ gfx_init_plane_charset8::gfxa#2
|
|
gfx_init_plane_charset8::$5 = gfx_init_plane_charset8::bits#3 * 2
|
|
gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::$5
|
|
gfx_init_plane_charset8::col#1 = ++ gfx_init_plane_charset8::col#2
|
|
gfx_init_plane_charset8::cp#1 = gfx_init_plane_charset8::cp#2 + rangenext(0,7)
|
|
gfx_init_plane_charset8::$6 = gfx_init_plane_charset8::cp#1 != rangelast(0,7)
|
|
if(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
|
|
gfx_init_plane_charset8::ch#6 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::ch#5 )
|
|
gfx_init_plane_charset8::chargen#8 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::chargen#7 )
|
|
gfx_init_plane_charset8::cr#5 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::cr#4 )
|
|
gfx_init_plane_charset8::cp#4 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::cp#3 )
|
|
gfx_init_plane_charset8::bits#4 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::bits#2 )
|
|
gfx_init_plane_charset8::gfxa#4 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::gfxa#3 )
|
|
gfx_init_plane_charset8::col#3 = phi( gfx_init_plane_charset8::@3/gfx_init_plane_charset8::col#4 )
|
|
gfx_init_plane_charset8::c#1 = 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
|
|
gfx_init_plane_charset8::col#7 = phi( gfx_init_plane_charset8::@4/gfx_init_plane_charset8::col#1 )
|
|
gfx_init_plane_charset8::gfxa#7 = phi( gfx_init_plane_charset8::@4/gfx_init_plane_charset8::gfxa#1 )
|
|
gfx_init_plane_charset8::ch#3 = phi( gfx_init_plane_charset8::@4/gfx_init_plane_charset8::ch#4 )
|
|
gfx_init_plane_charset8::chargen#4 = phi( gfx_init_plane_charset8::@4/gfx_init_plane_charset8::chargen#6 )
|
|
gfx_init_plane_charset8::cr#2 = phi( gfx_init_plane_charset8::@4/gfx_init_plane_charset8::cr#3 )
|
|
gfx_init_plane_charset8::cr#1 = gfx_init_plane_charset8::cr#2 + rangenext(0,7)
|
|
gfx_init_plane_charset8::$7 = gfx_init_plane_charset8::cr#1 != rangelast(0,7)
|
|
if(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
|
|
gfx_init_plane_charset8::col#8 = phi( gfx_init_plane_charset8::@6/gfx_init_plane_charset8::col#7 )
|
|
gfx_init_plane_charset8::gfxa#8 = phi( gfx_init_plane_charset8::@6/gfx_init_plane_charset8::gfxa#7 )
|
|
gfx_init_plane_charset8::chargen#5 = phi( gfx_init_plane_charset8::@6/gfx_init_plane_charset8::chargen#4 )
|
|
gfx_init_plane_charset8::ch#2 = phi( gfx_init_plane_charset8::@6/gfx_init_plane_charset8::ch#3 )
|
|
gfx_init_plane_charset8::ch#1 = gfx_init_plane_charset8::ch#2 + rangenext(0,$ff)
|
|
gfx_init_plane_charset8::$8 = gfx_init_plane_charset8::ch#1 != rangelast(0,$ff)
|
|
if(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
|
|
*PROCPORT = PROCPORT_RAM_IO
|
|
dtvSetCpuBankSegment1::cpuBankIdx#1 = (char)$4000/$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
|
|
|
|
void __start()
|
|
__start: scope:[__start] from
|
|
to:__start::__init1
|
|
__start::__init1: scope:[__start] from __start
|
|
to:__start::@1
|
|
__start::@1: scope:[__start] from __start::__init1
|
|
call main
|
|
to:__start::@2
|
|
__start::@2: scope:[__start] from __start::@1
|
|
to:__start::@return
|
|
__start::@return: scope:[__start] from __start::@2
|
|
return
|
|
to:@return
|
|
|
|
SYMBOL TABLE SSA
|
|
__constant char * const BORDER_COLOR = (char *)$d020
|
|
__constant char * const CHARGEN = (char *)$d000
|
|
__constant char * const CHARSET8 = (char *)$8000
|
|
__constant struct MOS6526_CIA * const CIA2 = (struct MOS6526_CIA *)$dd00
|
|
__constant const char DTV_BADLINE_OFF = $20
|
|
__constant const char DTV_CHUNKY = $40
|
|
__constant char * const DTV_CONTROL = (char *)$d03c
|
|
__constant char * const DTV_FEATURE = (char *)$d03f
|
|
__constant const char DTV_FEATURE_ENABLE = 1
|
|
__constant const char DTV_HIGHCOLOR = 4
|
|
__constant const char DTV_LINEAR = 1
|
|
__constant char * const DTV_PALETTE = (char *)$d200
|
|
__constant char * const DTV_PLANEA_MODULO_HI = (char *)$d039
|
|
__constant char * const DTV_PLANEA_MODULO_LO = (char *)$d038
|
|
__constant char * const DTV_PLANEA_START_HI = (char *)$d045
|
|
__constant char * const DTV_PLANEA_START_LO = (char *)$d03a
|
|
__constant char * const DTV_PLANEA_START_MI = (char *)$d03b
|
|
__constant char * const DTV_PLANEA_STEP = (char *)$d046
|
|
__constant char * const DTV_PLANEB_MODULO_HI = (char *)$d048
|
|
__constant char * const DTV_PLANEB_MODULO_LO = (char *)$d047
|
|
__constant char * const DTV_PLANEB_START_HI = (char *)$d04b
|
|
__constant char * const DTV_PLANEB_START_LO = (char *)$d049
|
|
__constant char * const DTV_PLANEB_START_MI = (char *)$d04a
|
|
__constant char * const DTV_PLANEB_STEP = (char *)$d04c
|
|
__constant char OFFSET_STRUCT_MOS6526_CIA_PORT_A = 0
|
|
__constant char OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2
|
|
__constant char * const PROCPORT = (char *)1
|
|
__constant char * const PROCPORT_DDR = (char *)0
|
|
__constant const char PROCPORT_DDR_MEMORY_MASK = 7
|
|
__constant const char PROCPORT_RAM_CHARROM = 1
|
|
__constant const char PROCPORT_RAM_IO = 5
|
|
__constant char * const RASTER = (char *)$d012
|
|
__constant char * const SCREEN = (char *)$7c00
|
|
__constant char * const VICII_CONTROL1 = (char *)$d011
|
|
__constant char * const VICII_CONTROL2 = (char *)$d016
|
|
__constant const char VICII_CSEL = 8
|
|
__constant const char VICII_DEN = $10
|
|
__constant const char VICII_ECM = $40
|
|
__constant const char VICII_MCM = $10
|
|
__constant char * const VICII_MEMORY = (char *)$d018
|
|
__constant const char VICII_RSEL = 8
|
|
void __start()
|
|
void dtvSetCpuBankSegment1(char cpuBankIdx)
|
|
__constant char *dtvSetCpuBankSegment1::cpuBank = (char *)$ff
|
|
char dtvSetCpuBankSegment1::cpuBankIdx
|
|
char dtvSetCpuBankSegment1::cpuBankIdx#0
|
|
char dtvSetCpuBankSegment1::cpuBankIdx#1
|
|
char dtvSetCpuBankSegment1::cpuBankIdx#2
|
|
void gfx_init()
|
|
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
|
|
char gfx_init_plane_charset8::bits
|
|
char gfx_init_plane_charset8::bits#0
|
|
char gfx_init_plane_charset8::bits#1
|
|
char gfx_init_plane_charset8::bits#2
|
|
char gfx_init_plane_charset8::bits#3
|
|
char gfx_init_plane_charset8::bits#4
|
|
char gfx_init_plane_charset8::c
|
|
char gfx_init_plane_charset8::c#0
|
|
char gfx_init_plane_charset8::c#1
|
|
char gfx_init_plane_charset8::c#2
|
|
char gfx_init_plane_charset8::ch
|
|
char gfx_init_plane_charset8::ch#0
|
|
char gfx_init_plane_charset8::ch#1
|
|
char gfx_init_plane_charset8::ch#2
|
|
char gfx_init_plane_charset8::ch#3
|
|
char gfx_init_plane_charset8::ch#4
|
|
char gfx_init_plane_charset8::ch#5
|
|
char gfx_init_plane_charset8::ch#6
|
|
char gfx_init_plane_charset8::ch#7
|
|
char gfx_init_plane_charset8::ch#8
|
|
char *gfx_init_plane_charset8::chargen
|
|
char *gfx_init_plane_charset8::chargen#0
|
|
char *gfx_init_plane_charset8::chargen#1
|
|
char *gfx_init_plane_charset8::chargen#2
|
|
char *gfx_init_plane_charset8::chargen#3
|
|
char *gfx_init_plane_charset8::chargen#4
|
|
char *gfx_init_plane_charset8::chargen#5
|
|
char *gfx_init_plane_charset8::chargen#6
|
|
char *gfx_init_plane_charset8::chargen#7
|
|
char *gfx_init_plane_charset8::chargen#8
|
|
char gfx_init_plane_charset8::col
|
|
char gfx_init_plane_charset8::col#0
|
|
char gfx_init_plane_charset8::col#1
|
|
char gfx_init_plane_charset8::col#2
|
|
char gfx_init_plane_charset8::col#3
|
|
char gfx_init_plane_charset8::col#4
|
|
char gfx_init_plane_charset8::col#5
|
|
char gfx_init_plane_charset8::col#6
|
|
char gfx_init_plane_charset8::col#7
|
|
char gfx_init_plane_charset8::col#8
|
|
char gfx_init_plane_charset8::cp
|
|
char gfx_init_plane_charset8::cp#0
|
|
char gfx_init_plane_charset8::cp#1
|
|
char gfx_init_plane_charset8::cp#2
|
|
char gfx_init_plane_charset8::cp#3
|
|
char gfx_init_plane_charset8::cp#4
|
|
char gfx_init_plane_charset8::cr
|
|
char gfx_init_plane_charset8::cr#0
|
|
char gfx_init_plane_charset8::cr#1
|
|
char gfx_init_plane_charset8::cr#2
|
|
char gfx_init_plane_charset8::cr#3
|
|
char gfx_init_plane_charset8::cr#4
|
|
char gfx_init_plane_charset8::cr#5
|
|
char gfx_init_plane_charset8::cr#6
|
|
char *gfx_init_plane_charset8::gfxa
|
|
char *gfx_init_plane_charset8::gfxa#0
|
|
char *gfx_init_plane_charset8::gfxa#1
|
|
char *gfx_init_plane_charset8::gfxa#2
|
|
char *gfx_init_plane_charset8::gfxa#3
|
|
char *gfx_init_plane_charset8::gfxa#4
|
|
char *gfx_init_plane_charset8::gfxa#5
|
|
char *gfx_init_plane_charset8::gfxa#6
|
|
char *gfx_init_plane_charset8::gfxa#7
|
|
char *gfx_init_plane_charset8::gfxa#8
|
|
char gfx_init_plane_charset8::gfxbCpuBank
|
|
char gfx_init_plane_charset8::gfxbCpuBank#0
|
|
char gfx_init_plane_charset8::gfxbCpuBank#1
|
|
char 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
|
|
char *gfx_init_screen0::ch
|
|
char *gfx_init_screen0::ch#0
|
|
char *gfx_init_screen0::ch#1
|
|
char *gfx_init_screen0::ch#2
|
|
char *gfx_init_screen0::ch#3
|
|
char *gfx_init_screen0::ch#4
|
|
char gfx_init_screen0::cx
|
|
char gfx_init_screen0::cx#0
|
|
char gfx_init_screen0::cx#1
|
|
char gfx_init_screen0::cx#2
|
|
char gfx_init_screen0::cy
|
|
char gfx_init_screen0::cy#0
|
|
char gfx_init_screen0::cy#1
|
|
char gfx_init_screen0::cy#2
|
|
char gfx_init_screen0::cy#3
|
|
char 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
|
|
char main::j
|
|
char main::j#0
|
|
char main::j#1
|
|
char main::j#2
|
|
char main::rst
|
|
char main::rst#0
|
|
char main::rst#1
|
|
char main::rst#2
|
|
|
|
Adding number conversion cast (unumber) VICII_DEN|VICII_ECM|VICII_RSEL|3 in *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
Adding number conversion cast (unumber) 3 in *VICII_CONTROL1 = ((unumber)) VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEA_START_HI = 0
|
|
Adding number conversion cast (unumber) 1 in *DTV_PLANEA_STEP = 1
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEA_MODULO_LO = 0
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEA_MODULO_HI = 0
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEB_START_HI = 0
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEB_STEP = 0
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEB_MODULO_LO = 0
|
|
Adding number conversion cast (unumber) 0 in *DTV_PLANEB_MODULO_HI = 0
|
|
Adding number conversion cast (unumber) 3 in *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3
|
|
Adding number conversion cast (unumber) 3^(char)(unsigned int)SCREEN/$4000 in *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = 3^(char)(unsigned int)SCREEN/$4000
|
|
Adding number conversion cast (unumber) 3 in *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = ((unumber)) 3^(char)(unsigned int)SCREEN/$4000
|
|
Adding number conversion cast (unumber) $4000 in *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = ((unumber)) (unumber)3^(char)(unsigned int)SCREEN/$4000
|
|
Adding number conversion cast (unumber) (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4 in *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4
|
|
Adding number conversion cast (unumber) byte1 (unsigned int)SCREEN&$3fff/4 in *VICII_MEMORY = ((unumber)) (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4
|
|
Adding number conversion cast (unumber) $3fff in *VICII_MEMORY = ((unumber)) (char)(unsigned int)SCREEN&$3fff/$40|(unumber)byte1 (unsigned int)SCREEN&$3fff/4
|
|
Adding number conversion cast (unumber) 4 in *VICII_MEMORY = ((unumber)) (char)(unsigned int)SCREEN&(unumber)$3fff/$40|(unumber)byte1 (unsigned int)SCREEN&$3fff/4
|
|
Adding number conversion cast (unumber) $3fff in *VICII_MEMORY = ((unumber)) (char)(unsigned int)SCREEN&(unumber)$3fff/$40|(unumber)byte1 (unsigned int)SCREEN&$3fff/(unumber)4
|
|
Adding number conversion cast (unumber) VICII_DEN|VICII_ECM|VICII_RSEL|3 in *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
Adding number conversion cast (unumber) 3 in *VICII_CONTROL1 = ((unumber)) VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
Adding number conversion cast (unumber) 0 in *BORDER_COLOR = 0
|
|
Adding number conversion cast (unumber) 7 in main::$3 = main::rst#1 & 7
|
|
Adding number conversion cast (unumber) main::$3 in main::$3 = main::rst#1 & (unumber)7
|
|
Adding number conversion cast (unumber) main::$4 in main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3
|
|
Adding number conversion cast (unumber) $10 in main::$5 = main::rst#1 * $10
|
|
Adding number conversion cast (unumber) main::$5 in main::$5 = main::rst#1 * (unumber)$10
|
|
Adding number conversion cast (unumber) $f2 in main::$6 = main::rst#1 != $f2
|
|
Adding number conversion cast (unumber) $f in gfx_init_screen0::$0 = gfx_init_screen0::cy#2 & $f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$0 in gfx_init_screen0::$0 = gfx_init_screen0::cy#2 & (unumber)$f
|
|
Adding number conversion cast (unumber) $10 in gfx_init_screen0::$1 = gfx_init_screen0::$0 * $10
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$1 in gfx_init_screen0::$1 = gfx_init_screen0::$0 * (unumber)$10
|
|
Adding number conversion cast (unumber) $f in gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$2 in gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & (unumber)$f
|
|
Adding number conversion cast (unumber) gfx_init_screen0::$3 in gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2
|
|
Adding number conversion cast (unumber) $4000 in gfx_init_plane_charset8::gfxbCpuBank#0 = (char)CHARSET8/$4000
|
|
Adding number conversion cast (unumber) (unsigned int)CHARSET8&$3fff in gfx_init_plane_charset8::gfxa#0 = (char *)$4000+(unsigned int)CHARSET8&$3fff
|
|
Adding number conversion cast (unumber) $3fff in gfx_init_plane_charset8::gfxa#0 = (char *)$4000+(unumber)(unsigned int)CHARSET8&$3fff
|
|
Adding number conversion cast (unumber) 1 in gfx_init_plane_charset8::chargen#0 = CHARGEN+1
|
|
Adding number conversion cast (unumber) $80 in gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80
|
|
Adding number conversion cast (unumber) gfx_init_plane_charset8::$2 in gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & (unumber)$80
|
|
Adding number conversion cast (unumber) 0 in gfx_init_plane_charset8::$3 = gfx_init_plane_charset8::$2 != 0
|
|
Adding number conversion cast (unumber) 2 in gfx_init_plane_charset8::$5 = gfx_init_plane_charset8::bits#3 * 2
|
|
Adding number conversion cast (unumber) gfx_init_plane_charset8::$5 in gfx_init_plane_charset8::$5 = gfx_init_plane_charset8::bits#3 * (unumber)2
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Adding number conversion cast (unumber) $40 in *VICII_MEMORY = ((unumber)) (char)(unsigned int)SCREEN&(unumber)$3fff/$40|(unumber)byte1 (unsigned int)SCREEN&(unumber)$3fff/(unumber)4
|
|
Successful SSA optimization PassNAddNumberTypeConversions
|
|
Inlining cast *VICII_CONTROL1 = (unumber)VICII_DEN|VICII_ECM|VICII_RSEL|(unumber)3
|
|
Inlining cast *DTV_PLANEA_START_HI = (unumber)0
|
|
Inlining cast *DTV_PLANEA_STEP = (unumber)1
|
|
Inlining cast *DTV_PLANEA_MODULO_LO = (unumber)0
|
|
Inlining cast *DTV_PLANEA_MODULO_HI = (unumber)0
|
|
Inlining cast *DTV_PLANEB_START_HI = (unumber)0
|
|
Inlining cast *DTV_PLANEB_STEP = (unumber)0
|
|
Inlining cast *DTV_PLANEB_MODULO_LO = (unumber)0
|
|
Inlining cast *DTV_PLANEB_MODULO_HI = (unumber)0
|
|
Inlining cast *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = (unumber)3
|
|
Inlining cast *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = (unumber)(unumber)3^(char)(unsigned int)SCREEN/(unumber)$4000
|
|
Inlining cast *VICII_MEMORY = (unumber)(char)(unsigned int)SCREEN&(unumber)$3fff/(unumber)$40|(unumber)byte1 (unsigned int)SCREEN&(unumber)$3fff/(unumber)4
|
|
Inlining cast *VICII_CONTROL1 = (unumber)VICII_DEN|VICII_ECM|VICII_RSEL|(unumber)3
|
|
Inlining cast *BORDER_COLOR = (unumber)0
|
|
Successful SSA optimization Pass2InlineCast
|
|
Simplifying constant pointer cast (char *) 53266
|
|
Simplifying constant pointer cast (char *) 53280
|
|
Simplifying constant pointer cast (char *) 53265
|
|
Simplifying constant pointer cast (char *) 53270
|
|
Simplifying constant pointer cast (char *) 53272
|
|
Simplifying constant pointer cast (char *) 0
|
|
Simplifying constant pointer cast (char *) 1
|
|
Simplifying constant pointer cast (char *) 53248
|
|
Simplifying constant pointer cast (struct MOS6526_CIA *) 56576
|
|
Simplifying constant pointer cast (char *) 53311
|
|
Simplifying constant pointer cast (char *) 53308
|
|
Simplifying constant pointer cast (char *) 53760
|
|
Simplifying constant pointer cast (char *) 53306
|
|
Simplifying constant pointer cast (char *) 53307
|
|
Simplifying constant pointer cast (char *) 53317
|
|
Simplifying constant pointer cast (char *) 53318
|
|
Simplifying constant pointer cast (char *) 53304
|
|
Simplifying constant pointer cast (char *) 53305
|
|
Simplifying constant pointer cast (char *) 53321
|
|
Simplifying constant pointer cast (char *) 53322
|
|
Simplifying constant pointer cast (char *) 53323
|
|
Simplifying constant pointer cast (char *) 53324
|
|
Simplifying constant pointer cast (char *) 53319
|
|
Simplifying constant pointer cast (char *) 53320
|
|
Simplifying constant pointer cast (char *) 255
|
|
Simplifying constant pointer cast (char *) 31744
|
|
Simplifying constant pointer cast (char *) 32768
|
|
Simplifying constant integer cast VICII_DEN|VICII_ECM|VICII_RSEL|(unumber)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)3^(char)(unsigned int)SCREEN/(unumber)$4000
|
|
Simplifying constant integer cast 3
|
|
Simplifying constant integer cast $4000
|
|
Simplifying constant integer cast (char)(unsigned int)SCREEN&(unumber)$3fff/(unumber)$40|(unumber)byte1 (unsigned int)SCREEN&(unumber)$3fff/(unumber)4
|
|
Simplifying constant integer cast $3fff
|
|
Simplifying constant integer cast $40
|
|
Simplifying constant integer cast byte1 (unsigned int)SCREEN&(unumber)$3fff/(unumber)4
|
|
Simplifying constant integer cast $3fff
|
|
Simplifying constant integer cast 4
|
|
Simplifying constant integer cast VICII_DEN|VICII_ECM|VICII_RSEL|(unumber)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 pointer cast (char *) 16384
|
|
Simplifying constant integer cast (unsigned int)CHARSET8&(unumber)$3fff
|
|
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 (char) 3
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 1
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 3
|
|
Finalized unsigned number type (char) 3
|
|
Finalized unsigned number type (unsigned int) $4000
|
|
Finalized unsigned number type (unsigned int) $3fff
|
|
Finalized unsigned number type (char) $40
|
|
Finalized unsigned number type (unsigned int) $3fff
|
|
Finalized unsigned number type (char) 4
|
|
Finalized unsigned number type (char) 3
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 7
|
|
Finalized unsigned number type (char) $10
|
|
Finalized unsigned number type (char) $f2
|
|
Finalized unsigned number type (char) $f
|
|
Finalized unsigned number type (char) $10
|
|
Finalized unsigned number type (char) $f
|
|
Finalized unsigned number type (unsigned int) $4000
|
|
Finalized unsigned number type (unsigned int) $3fff
|
|
Finalized unsigned number type (char) 1
|
|
Finalized unsigned number type (char) $80
|
|
Finalized unsigned number type (char) 0
|
|
Finalized unsigned number type (char) 2
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Inferred type updated to char in main::$3 = main::rst#1 & 7
|
|
Inferred type updated to char in main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3
|
|
Inferred type updated to char in main::$5 = main::rst#1 * $10
|
|
Inferred type updated to char in gfx_init_screen0::$0 = gfx_init_screen0::cy#2 & $f
|
|
Inferred type updated to char in gfx_init_screen0::$1 = gfx_init_screen0::$0 * $10
|
|
Inferred type updated to char in gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f
|
|
Inferred type updated to char in gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2
|
|
Inferred type updated to char in gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80
|
|
Inferred type updated to char in gfx_init_plane_charset8::$5 = gfx_init_plane_charset8::bits#3 * 2
|
|
Inversing boolean not [94] gfx_init_plane_charset8::$4 = gfx_init_plane_charset8::$2 == 0 from [93] gfx_init_plane_charset8::$3 = gfx_init_plane_charset8::$2 != 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 main::rst#2 main::rst#0
|
|
Identical Phi Values gfx_init_screen0::cy#2 gfx_init_screen0::cy#4
|
|
Identical Phi Values gfx_init_plane_charset8::cr#2 gfx_init_plane_charset8::cr#6
|
|
Identical Phi Values gfx_init_plane_charset8::chargen#4 gfx_init_plane_charset8::chargen#1
|
|
Identical Phi Values gfx_init_plane_charset8::ch#2 gfx_init_plane_charset8::ch#7
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Identical Phi Values gfx_init_plane_charset8::ch#7 gfx_init_plane_charset8::ch#8
|
|
Successful SSA optimization Pass2IdenticalPhiElimination
|
|
Simple Condition main::$1 [32] if(main::j#1!=rangelast(0,$f)) goto main::@1
|
|
Simple Condition main::$2 [40] if(*RASTER!=main::rst#0) goto main::@4
|
|
Simple Condition main::$6 [50] if(main::rst#1!=$f2) goto main::@6
|
|
Simple Condition gfx_init_screen0::$4 [68] if(gfx_init_screen0::cx#1!=rangelast(0,$27)) goto gfx_init_screen0::@2
|
|
Simple Condition gfx_init_screen0::$5 [71] if(gfx_init_screen0::cy#1!=rangelast(0,$18)) goto gfx_init_screen0::@1
|
|
Simple Condition gfx_init_plane_charset8::$4 [92] if(gfx_init_plane_charset8::$2==0) goto gfx_init_plane_charset8::@4
|
|
Simple Condition gfx_init_plane_charset8::$6 [100] if(gfx_init_plane_charset8::cp#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@3
|
|
Simple Condition gfx_init_plane_charset8::$7 [103] if(gfx_init_plane_charset8::cr#1!=rangelast(0,7)) goto gfx_init_plane_charset8::@2
|
|
Simple Condition gfx_init_plane_charset8::$8 [106] if(gfx_init_plane_charset8::ch#1!=rangelast(0,$ff)) goto gfx_init_plane_charset8::@1
|
|
Successful SSA optimization Pass2ConditionalJumpSimplification
|
|
Constant main::j#0 = 0
|
|
Constant main::rst#0 = $42
|
|
Constant gfx_init_screen0::ch#0 = SCREEN
|
|
Constant gfx_init_screen0::cy#0 = 0
|
|
Constant gfx_init_screen0::cx#0 = 0
|
|
Constant gfx_init_plane_charset8::gfxbCpuBank#0 = (char)CHARSET8/$4000
|
|
Constant gfx_init_plane_charset8::gfxa#0 = (char *) 16384+(unsigned int)CHARSET8&$3fff
|
|
Constant gfx_init_plane_charset8::chargen#0 = CHARGEN+1
|
|
Constant gfx_init_plane_charset8::col#0 = 0
|
|
Constant gfx_init_plane_charset8::ch#0 = 0
|
|
Constant gfx_init_plane_charset8::cr#0 = 0
|
|
Constant gfx_init_plane_charset8::cp#0 = 0
|
|
Constant gfx_init_plane_charset8::c#0 = 0
|
|
Constant dtvSetCpuBankSegment1::cpuBankIdx#1 = (char)$4000/$4000
|
|
Successful SSA optimization Pass2ConstantIdentification
|
|
Constant 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 $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 $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 $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 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 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 0
|
|
Simplifying constant evaluating to zero (unsigned int)CHARSET8&$3fff in
|
|
Simplifying constant evaluating to zero byte0 SCREEN in [12] *DTV_PLANEA_START_LO = byte0 SCREEN
|
|
Simplifying constant evaluating to zero byte0 CHARSET8 in [18] *DTV_PLANEB_START_LO = byte0 CHARSET8
|
|
Successful SSA optimization PassNSimplifyConstantZero
|
|
Simplifying expression containing zero (char *) 16384 in
|
|
Simplifying expression containing zero (char *)CIA2 in [25] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A) = 3^(char)(unsigned int)SCREEN/$4000
|
|
Successful SSA optimization PassNSimplifyExpressionWithZero
|
|
Removing unused block main::@return
|
|
Successful SSA optimization Pass2EliminateUnusedBlocks
|
|
Eliminating unused variable gfx_init_plane_charset8::gfxbCpuBank#1 and assignment [61] gfx_init_plane_charset8::gfxbCpuBank#1 = ++ gfx_init_plane_charset8::gfxbCpuBank#0
|
|
Eliminating unused constant OFFSET_STRUCT_MOS6526_CIA_PORT_A
|
|
Successful SSA optimization PassNEliminateUnusedVars
|
|
Removing unused procedure __start
|
|
Removing unused procedure block __start
|
|
Removing unused procedure block __start::__init1
|
|
Removing unused procedure block __start::@1
|
|
Removing unused procedure block __start::@2
|
|
Removing unused procedure block __start::@return
|
|
Successful SSA optimization PassNEliminateEmptyStart
|
|
Adding number conversion cast (unumber) $10 in [30] if(main::j#1!=$10) goto main::@1
|
|
Adding number conversion cast (unumber) $28 in [56] if(gfx_init_screen0::cx#1!=$28) goto gfx_init_screen0::@2
|
|
Adding number conversion cast (unumber) $19 in [58] if(gfx_init_screen0::cy#1!=$19) goto gfx_init_screen0::@1
|
|
Adding number conversion cast (unumber) 8 in [75] if(gfx_init_plane_charset8::cp#1!=8) goto gfx_init_plane_charset8::@3
|
|
Adding number conversion cast (unumber) 8 in [77] if(gfx_init_plane_charset8::cr#1!=8) goto gfx_init_plane_charset8::@2
|
|
Adding number conversion cast (unumber) 0 in [79] if(gfx_init_plane_charset8::ch#1!=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 (char) $10
|
|
Finalized unsigned number type (char) $28
|
|
Finalized unsigned number type (char) $19
|
|
Finalized unsigned number type (char) 8
|
|
Finalized unsigned number type (char) 8
|
|
Finalized unsigned number type (char) 0
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
Rewriting multiplication to use shift [40] main::$5 = main::rst#1 * $10
|
|
Rewriting multiplication to use shift [50] gfx_init_screen0::$1 = gfx_init_screen0::$0 * $10
|
|
Rewriting multiplication to use shift [72] gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::bits#2 * 2
|
|
Successful SSA optimization Pass2MultiplyToShiftRewriting
|
|
Inlining constant with var siblings dtvSetCpuBankSegment1::cpuBankIdx#1
|
|
Inlining constant with var siblings dtvSetCpuBankSegment1::cpuBankIdx#0
|
|
Inlining constant with var siblings main::j#0
|
|
Inlining constant with var siblings main::rst#0
|
|
Inlining constant with var siblings gfx_init_screen0::ch#0
|
|
Inlining constant with var siblings gfx_init_screen0::cy#0
|
|
Inlining constant with var siblings gfx_init_screen0::cx#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::gfxa#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::chargen#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::col#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::ch#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::cr#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::cp#0
|
|
Inlining constant with var siblings gfx_init_plane_charset8::c#0
|
|
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#1 = (char)$4000/$4000
|
|
Constant inlined gfx_init_screen0::cx#0 = 0
|
|
Constant inlined dtvSetCpuBankSegment1::cpuBankIdx#0 = gfx_init_plane_charset8::gfxbCpuBank#0
|
|
Constant inlined gfx_init_plane_charset8::gfxa#0 = (char *) 16384
|
|
Constant inlined main::rst#0 = $42
|
|
Constant inlined gfx_init_plane_charset8::cp#0 = 0
|
|
Constant inlined gfx_init_screen0::cy#0 = 0
|
|
Constant inlined gfx_init_plane_charset8::cr#0 = 0
|
|
Constant inlined gfx_init_plane_charset8::c#0 = 0
|
|
Constant inlined gfx_init_screen0::ch#0 = SCREEN
|
|
Constant inlined gfx_init_plane_charset8::chargen#0 = CHARGEN+1
|
|
Constant inlined gfx_init_plane_charset8::col#0 = 0
|
|
Constant inlined gfx_init_plane_charset8::ch#0 = 0
|
|
Constant inlined main::j#0 = 0
|
|
Successful SSA optimization Pass2ConstantInlining
|
|
Finalized unsigned number type (unsigned int) $4000
|
|
Finalized unsigned number type (unsigned int) $4000
|
|
Successful SSA optimization PassNFinalizeNumberTypeConversions
|
|
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 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_screen0
|
|
Adding NOP phi() at start of gfx_init_plane_charset8
|
|
Adding NOP phi() at start of gfx_init_plane_charset8::@10
|
|
CALL GRAPH
|
|
Calls in [main] to gfx_init:3
|
|
Calls in [gfx_init] to gfx_init_screen0:43 gfx_init_plane_charset8:45
|
|
Calls in [gfx_init_plane_charset8] to dtvSetCpuBankSegment1:68 dtvSetCpuBankSegment1:96
|
|
|
|
Created 19 initial phi equivalence classes
|
|
Coalesced [41] main::j#3 = main::j#1
|
|
Coalesced [50] gfx_init_screen0::ch#6 = gfx_init_screen0::ch#3
|
|
Coalesced [63] gfx_init_screen0::cy#5 = gfx_init_screen0::cy#1
|
|
Coalesced [64] gfx_init_screen0::ch#5 = gfx_init_screen0::ch#1
|
|
Coalesced [65] gfx_init_screen0::cx#3 = gfx_init_screen0::cx#1
|
|
Coalesced (already) [66] gfx_init_screen0::ch#7 = gfx_init_screen0::ch#1
|
|
Coalesced [71] gfx_init_plane_charset8::chargen#10 = gfx_init_plane_charset8::chargen#3
|
|
Coalesced [72] gfx_init_plane_charset8::gfxa#10 = gfx_init_plane_charset8::gfxa#6
|
|
Coalesced [73] gfx_init_plane_charset8::col#10 = gfx_init_plane_charset8::col#6
|
|
Coalesced [77] gfx_init_plane_charset8::bits#5 = gfx_init_plane_charset8::bits#0
|
|
Coalesced [78] gfx_init_plane_charset8::gfxa#12 = gfx_init_plane_charset8::gfxa#5
|
|
Coalesced [79] gfx_init_plane_charset8::col#12 = gfx_init_plane_charset8::col#5
|
|
Not coalescing [83] gfx_init_plane_charset8::c#3 = gfx_init_plane_charset8::col#2
|
|
Coalesced [99] gfx_init_plane_charset8::chargen#9 = gfx_init_plane_charset8::chargen#1
|
|
Coalesced [100] gfx_init_plane_charset8::gfxa#9 = gfx_init_plane_charset8::gfxa#1
|
|
Coalesced [101] gfx_init_plane_charset8::col#9 = gfx_init_plane_charset8::col#1
|
|
Coalesced [102] gfx_init_plane_charset8::ch#9 = gfx_init_plane_charset8::ch#1
|
|
Coalesced (already) [103] gfx_init_plane_charset8::chargen#11 = gfx_init_plane_charset8::chargen#1
|
|
Coalesced (already) [104] gfx_init_plane_charset8::gfxa#11 = gfx_init_plane_charset8::gfxa#1
|
|
Coalesced (already) [105] gfx_init_plane_charset8::col#11 = gfx_init_plane_charset8::col#1
|
|
Coalesced [106] gfx_init_plane_charset8::cr#7 = gfx_init_plane_charset8::cr#1
|
|
Coalesced [107] gfx_init_plane_charset8::bits#6 = gfx_init_plane_charset8::bits#1
|
|
Coalesced (already) [108] gfx_init_plane_charset8::gfxa#13 = gfx_init_plane_charset8::gfxa#1
|
|
Coalesced (already) [109] gfx_init_plane_charset8::col#13 = gfx_init_plane_charset8::col#1
|
|
Coalesced [110] gfx_init_plane_charset8::cp#5 = gfx_init_plane_charset8::cp#1
|
|
Coalesced down to 13 phi equivalence classes
|
|
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_screen0::@4
|
|
Culled Empty Block label gfx_init_screen0::@5
|
|
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
|
|
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 gfx_init
|
|
Adding NOP phi() at start of gfx_init::@1
|
|
Adding NOP phi() at start of gfx_init_screen0
|
|
Adding NOP phi() at start of gfx_init_plane_charset8
|
|
|
|
FINAL CONTROL FLOW GRAPH
|
|
|
|
void main()
|
|
main: scope:[main] from
|
|
asm { sei }
|
|
[1] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
|
[2] *PROCPORT = PROCPORT_RAM_IO
|
|
[3] call gfx_init
|
|
to:main::@6
|
|
main::@6: scope:[main] from main
|
|
[4] *DTV_FEATURE = DTV_FEATURE_ENABLE
|
|
[5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
[6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
[7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL
|
|
[8] *DTV_PLANEA_START_LO = 0
|
|
[9] *DTV_PLANEA_START_MI = byte1 SCREEN
|
|
[10] *DTV_PLANEA_START_HI = 0
|
|
[11] *DTV_PLANEA_STEP = 1
|
|
[12] *DTV_PLANEA_MODULO_LO = 0
|
|
[13] *DTV_PLANEA_MODULO_HI = 0
|
|
[14] *DTV_PLANEB_START_LO = 0
|
|
[15] *DTV_PLANEB_START_MI = byte1 CHARSET8
|
|
[16] *DTV_PLANEB_START_HI = 0
|
|
[17] *DTV_PLANEB_STEP = 0
|
|
[18] *DTV_PLANEB_MODULO_LO = 0
|
|
[19] *DTV_PLANEB_MODULO_HI = 0
|
|
[20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3
|
|
[21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000
|
|
[22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4
|
|
to:main::@1
|
|
main::@1: scope:[main] from main::@1 main::@6
|
|
[23] main::j#2 = phi( main::@1/main::j#1, main::@6/0 )
|
|
[24] DTV_PALETTE[main::j#2] = main::j#2
|
|
[25] main::j#1 = ++ main::j#2
|
|
[26] if(main::j#1!=$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 }
|
|
[28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
[29] *BORDER_COLOR = 0
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@2 main::@3
|
|
[30] if(*RASTER!=$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
|
|
[32] main::rst#1 = *RASTER
|
|
[33] main::$3 = main::rst#1 & 7
|
|
[34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3
|
|
[35] *VICII_CONTROL1 = main::$4
|
|
[36] main::$5 = main::rst#1 << 4
|
|
[37] *BORDER_COLOR = main::$5
|
|
asm { nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop }
|
|
[39] if(main::rst#1!=$f2) goto main::@5
|
|
to:main::@2
|
|
|
|
void gfx_init()
|
|
gfx_init: scope:[gfx_init] from main
|
|
[40] phi()
|
|
[41] call gfx_init_screen0
|
|
to:gfx_init::@1
|
|
gfx_init::@1: scope:[gfx_init] from gfx_init
|
|
[42] phi()
|
|
[43] call gfx_init_plane_charset8
|
|
to:gfx_init::@return
|
|
gfx_init::@return: scope:[gfx_init] from gfx_init::@1
|
|
[44] return
|
|
to:@return
|
|
|
|
void gfx_init_screen0()
|
|
gfx_init_screen0: scope:[gfx_init_screen0] from gfx_init
|
|
[45] phi()
|
|
to:gfx_init_screen0::@1
|
|
gfx_init_screen0::@1: scope:[gfx_init_screen0] from gfx_init_screen0 gfx_init_screen0::@3
|
|
[46] gfx_init_screen0::ch#3 = phi( gfx_init_screen0/SCREEN, gfx_init_screen0::@3/gfx_init_screen0::ch#1 )
|
|
[46] gfx_init_screen0::cy#4 = phi( gfx_init_screen0/0, gfx_init_screen0::@3/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
|
|
[47] gfx_init_screen0::ch#2 = phi( gfx_init_screen0::@1/gfx_init_screen0::ch#3, gfx_init_screen0::@2/gfx_init_screen0::ch#1 )
|
|
[47] gfx_init_screen0::cx#2 = phi( gfx_init_screen0::@1/0, gfx_init_screen0::@2/gfx_init_screen0::cx#1 )
|
|
[48] gfx_init_screen0::$0 = gfx_init_screen0::cy#4 & $f
|
|
[49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4
|
|
[50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f
|
|
[51] gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2
|
|
[52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3
|
|
[53] gfx_init_screen0::ch#1 = ++ gfx_init_screen0::ch#2
|
|
[54] gfx_init_screen0::cx#1 = ++ gfx_init_screen0::cx#2
|
|
[55] if(gfx_init_screen0::cx#1!=$28) goto gfx_init_screen0::@2
|
|
to:gfx_init_screen0::@3
|
|
gfx_init_screen0::@3: scope:[gfx_init_screen0] from gfx_init_screen0::@2
|
|
[56] gfx_init_screen0::cy#1 = ++ gfx_init_screen0::cy#4
|
|
[57] if(gfx_init_screen0::cy#1!=$19) goto gfx_init_screen0::@1
|
|
to:gfx_init_screen0::@return
|
|
gfx_init_screen0::@return: scope:[gfx_init_screen0] from gfx_init_screen0::@3
|
|
[58] return
|
|
to:@return
|
|
|
|
void gfx_init_plane_charset8()
|
|
gfx_init_plane_charset8: scope:[gfx_init_plane_charset8] from gfx_init::@1
|
|
[59] phi()
|
|
[60] call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@9
|
|
gfx_init_plane_charset8::@9: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8
|
|
[61] *PROCPORT = 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
|
|
[62] gfx_init_plane_charset8::ch#8 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::ch#1, gfx_init_plane_charset8::@9/0 )
|
|
[62] gfx_init_plane_charset8::col#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::col#1, gfx_init_plane_charset8::@9/0 )
|
|
[62] gfx_init_plane_charset8::gfxa#6 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::gfxa#1, gfx_init_plane_charset8::@9/(char *) 16384 )
|
|
[62] gfx_init_plane_charset8::chargen#3 = phi( gfx_init_plane_charset8::@7/gfx_init_plane_charset8::chargen#1, gfx_init_plane_charset8::@9/CHARGEN+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
|
|
[63] gfx_init_plane_charset8::cr#6 = phi( gfx_init_plane_charset8::@1/0, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::cr#1 )
|
|
[63] gfx_init_plane_charset8::col#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::col#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::col#1 )
|
|
[63] gfx_init_plane_charset8::gfxa#5 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::gfxa#6, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::gfxa#1 )
|
|
[63] gfx_init_plane_charset8::chargen#2 = phi( gfx_init_plane_charset8::@1/gfx_init_plane_charset8::chargen#3, gfx_init_plane_charset8::@6/gfx_init_plane_charset8::chargen#1 )
|
|
[64] gfx_init_plane_charset8::bits#0 = *gfx_init_plane_charset8::chargen#2
|
|
[65] gfx_init_plane_charset8::chargen#1 = ++ 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
|
|
[66] gfx_init_plane_charset8::cp#2 = phi( gfx_init_plane_charset8::@2/0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::cp#1 )
|
|
[66] gfx_init_plane_charset8::col#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::col#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::col#1 )
|
|
[66] gfx_init_plane_charset8::gfxa#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::gfxa#5, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::gfxa#1 )
|
|
[66] gfx_init_plane_charset8::bits#2 = phi( gfx_init_plane_charset8::@2/gfx_init_plane_charset8::bits#0, gfx_init_plane_charset8::@4/gfx_init_plane_charset8::bits#1 )
|
|
[67] gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80
|
|
[68] if(gfx_init_plane_charset8::$2==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
|
|
[69] gfx_init_plane_charset8::c#3 = 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
|
|
[70] gfx_init_plane_charset8::c#2 = phi( gfx_init_plane_charset8::@3/0, gfx_init_plane_charset8::@5/gfx_init_plane_charset8::c#3 )
|
|
[71] *gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::c#2
|
|
[72] gfx_init_plane_charset8::gfxa#1 = ++ gfx_init_plane_charset8::gfxa#2
|
|
[73] gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::bits#2 << 1
|
|
[74] gfx_init_plane_charset8::col#1 = ++ gfx_init_plane_charset8::col#2
|
|
[75] gfx_init_plane_charset8::cp#1 = ++ gfx_init_plane_charset8::cp#2
|
|
[76] if(gfx_init_plane_charset8::cp#1!=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
|
|
[77] gfx_init_plane_charset8::cr#1 = ++ gfx_init_plane_charset8::cr#6
|
|
[78] if(gfx_init_plane_charset8::cr#1!=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
|
|
[79] gfx_init_plane_charset8::ch#1 = ++ gfx_init_plane_charset8::ch#8
|
|
[80] if(gfx_init_plane_charset8::ch#1!=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
|
|
[81] *PROCPORT = PROCPORT_RAM_IO
|
|
[82] call dtvSetCpuBankSegment1
|
|
to:gfx_init_plane_charset8::@return
|
|
gfx_init_plane_charset8::@return: scope:[gfx_init_plane_charset8] from gfx_init_plane_charset8::@8
|
|
[83] return
|
|
to:@return
|
|
|
|
void dtvSetCpuBankSegment1(char cpuBankIdx)
|
|
dtvSetCpuBankSegment1: scope:[dtvSetCpuBankSegment1] from gfx_init_plane_charset8 gfx_init_plane_charset8::@8
|
|
[84] dtvSetCpuBankSegment1::cpuBankIdx#2 = phi( gfx_init_plane_charset8/gfx_init_plane_charset8::gfxbCpuBank#0, gfx_init_plane_charset8::@8/(char)$4000/$4000 )
|
|
[85] *dtvSetCpuBankSegment1::cpuBank = dtvSetCpuBankSegment1::cpuBankIdx#2
|
|
asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
to:dtvSetCpuBankSegment1::@return
|
|
dtvSetCpuBankSegment1::@return: scope:[dtvSetCpuBankSegment1] from dtvSetCpuBankSegment1
|
|
[87] return
|
|
to:@return
|
|
|
|
|
|
VARIABLE REGISTER WEIGHTS
|
|
void dtvSetCpuBankSegment1(char cpuBankIdx)
|
|
char dtvSetCpuBankSegment1::cpuBankIdx
|
|
char dtvSetCpuBankSegment1::cpuBankIdx#2 // 1001.0
|
|
void gfx_init()
|
|
void gfx_init_plane_charset8()
|
|
char gfx_init_plane_charset8::$2 // 200002.0
|
|
char gfx_init_plane_charset8::bits
|
|
char gfx_init_plane_charset8::bits#0 // 10001.0
|
|
char gfx_init_plane_charset8::bits#1 // 50000.5
|
|
char gfx_init_plane_charset8::bits#2 // 44286.28571428572
|
|
char gfx_init_plane_charset8::c
|
|
char gfx_init_plane_charset8::c#2 // 200002.0
|
|
char gfx_init_plane_charset8::c#3 // 200002.0
|
|
char gfx_init_plane_charset8::ch
|
|
char gfx_init_plane_charset8::ch#1 // 1501.5
|
|
char gfx_init_plane_charset8::ch#8 // 117.76470588235294
|
|
char *gfx_init_plane_charset8::chargen
|
|
char *gfx_init_plane_charset8::chargen#1 // 1312.6875
|
|
char *gfx_init_plane_charset8::chargen#2 // 15502.0
|
|
char *gfx_init_plane_charset8::chargen#3 // 2002.0
|
|
char gfx_init_plane_charset8::col
|
|
char gfx_init_plane_charset8::col#1 // 30143.428571428572
|
|
char gfx_init_plane_charset8::col#2 // 38750.5
|
|
char gfx_init_plane_charset8::col#5 // 7001.0
|
|
char gfx_init_plane_charset8::col#6 // 2002.0
|
|
char gfx_init_plane_charset8::cp
|
|
char gfx_init_plane_charset8::cp#1 // 150001.5
|
|
char gfx_init_plane_charset8::cp#2 // 22222.444444444445
|
|
char gfx_init_plane_charset8::cr
|
|
char gfx_init_plane_charset8::cr#1 // 15001.5
|
|
char gfx_init_plane_charset8::cr#6 // 1428.7142857142858
|
|
char *gfx_init_plane_charset8::gfxa
|
|
char *gfx_init_plane_charset8::gfxa#1 // 23444.88888888889
|
|
char *gfx_init_plane_charset8::gfxa#2 // 51667.33333333333
|
|
char *gfx_init_plane_charset8::gfxa#5 // 7001.0
|
|
char *gfx_init_plane_charset8::gfxa#6 // 2002.0
|
|
char gfx_init_plane_charset8::gfxbCpuBank
|
|
void gfx_init_screen0()
|
|
char gfx_init_screen0::$0 // 20002.0
|
|
char gfx_init_screen0::$1 // 10001.0
|
|
char gfx_init_screen0::$2 // 20002.0
|
|
char gfx_init_screen0::$3 // 20002.0
|
|
char *gfx_init_screen0::ch
|
|
char *gfx_init_screen0::ch#1 // 4200.6
|
|
char *gfx_init_screen0::ch#2 // 5167.333333333333
|
|
char *gfx_init_screen0::ch#3 // 2002.0
|
|
char gfx_init_screen0::cx
|
|
char gfx_init_screen0::cx#1 // 15001.5
|
|
char gfx_init_screen0::cx#2 // 4286.142857142857
|
|
char gfx_init_screen0::cy
|
|
char gfx_init_screen0::cy#1 // 1501.5
|
|
char gfx_init_screen0::cy#4 // 1200.3
|
|
void main()
|
|
char main::$3 // 202.0
|
|
char main::$4 // 202.0
|
|
char main::$5 // 202.0
|
|
char main::j
|
|
char main::j#1 // 16.5
|
|
char main::j#2 // 22.0
|
|
char main::rst
|
|
char main::rst#1 // 57.714285714285715
|
|
|
|
Initial phi equivalence classes
|
|
[ main::j#2 main::j#1 ]
|
|
[ 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 ]
|
|
[ 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 ]
|
|
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_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 ]
|
|
Added variable gfx_init_plane_charset8::$2 to live range equivalence class [ gfx_init_plane_charset8::$2 ]
|
|
Complete equivalence classes
|
|
[ main::j#2 main::j#1 ]
|
|
[ 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 ]
|
|
[ 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 ]
|
|
[ main::rst#1 ]
|
|
[ main::$3 ]
|
|
[ main::$4 ]
|
|
[ main::$5 ]
|
|
[ gfx_init_screen0::$0 ]
|
|
[ gfx_init_screen0::$1 ]
|
|
[ gfx_init_screen0::$2 ]
|
|
[ gfx_init_screen0::$3 ]
|
|
[ gfx_init_plane_charset8::$2 ]
|
|
Allocated zp[1]:2 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ]
|
|
Allocated zp[1]:3 [ gfx_init_plane_charset8::$2 ]
|
|
Allocated zp[1]:4 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
Allocated zp[1]:5 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Allocated zp[2]:6 [ 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]:8 [ 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]:9 [ gfx_init_screen0::$0 ]
|
|
Allocated zp[1]:10 [ gfx_init_screen0::$2 ]
|
|
Allocated zp[1]:11 [ gfx_init_screen0::$3 ]
|
|
Allocated zp[1]:12 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Allocated zp[2]:13 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ]
|
|
Allocated zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Allocated zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
Allocated zp[1]:18 [ gfx_init_screen0::$1 ]
|
|
Allocated zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Allocated zp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Allocated zp[1]:21 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Allocated zp[1]:22 [ main::$3 ]
|
|
Allocated zp[1]:23 [ main::$4 ]
|
|
Allocated zp[1]:24 [ main::$5 ]
|
|
Allocated zp[1]:25 [ main::rst#1 ]
|
|
Allocated zp[1]:26 [ main::j#2 main::j#1 ]
|
|
REGISTER UPLIFT POTENTIAL REGISTERS
|
|
Statement [1] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [2] *PROCPORT = PROCPORT_RAM_IO [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [4] *DTV_FEATURE = DTV_FEATURE_ENABLE [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [8] *DTV_PLANEA_START_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [9] *DTV_PLANEA_START_MI = byte1 SCREEN [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [10] *DTV_PLANEA_START_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [11] *DTV_PLANEA_STEP = 1 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [12] *DTV_PLANEA_MODULO_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [13] *DTV_PLANEA_MODULO_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [14] *DTV_PLANEB_START_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [15] *DTV_PLANEB_START_MI = byte1 CHARSET8 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [16] *DTV_PLANEB_START_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [17] *DTV_PLANEB_STEP = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [18] *DTV_PLANEB_MODULO_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [19] *DTV_PLANEB_MODULO_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
|
Statement [28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [29] *BORDER_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [30] if(*RASTER!=$42) goto main::@3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3 [ main::rst#1 main::$4 ] ( [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a
|
|
Removing always clobbered register reg byte a as potential for zp[1]:25 [ main::rst#1 ]
|
|
Statement [36] main::$5 = main::rst#1 << 4 [ main::rst#1 main::$5 ] ( [ main::rst#1 main::$5 ] { } ) always clobbers reg byte a
|
|
Statement [49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( gfx_init:3::gfx_init_screen0:41 [ 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]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp[1]:12 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Statement [50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( gfx_init:3::gfx_init_screen0:41 [ 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]:18 [ gfx_init_screen0::$1 ]
|
|
Statement [52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( gfx_init:3::gfx_init_screen0:41 [ 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]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:12 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
Statement [61] *PROCPORT = PROCPORT_RAM_CHARROM [ ] ( gfx_init:3::gfx_init_plane_charset8:43 [ ] { } ) always clobbers reg byte a
|
|
Statement [64] gfx_init_plane_charset8::bits#0 = *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 ] ( gfx_init:3::gfx_init_plane_charset8:43 [ 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]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Removing always clobbered register reg byte a as potential for zp[1]:8 [ 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]:8 [ 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]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Removing always clobbered register reg byte y as potential for zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Statement [71] *gfx_init_plane_charset8::gfxa#2 = 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 ] ( gfx_init:3::gfx_init_plane_charset8:43 [ 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]:5 [ 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]:4 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ]
|
|
Statement [81] *PROCPORT = PROCPORT_RAM_IO [ ] ( gfx_init:3::gfx_init_plane_charset8:43 [ ] { } ) always clobbers reg byte a
|
|
Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a
|
|
Statement [1] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [2] *PROCPORT = PROCPORT_RAM_IO [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [4] *DTV_FEATURE = DTV_FEATURE_ENABLE [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [8] *DTV_PLANEA_START_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [9] *DTV_PLANEA_START_MI = byte1 SCREEN [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [10] *DTV_PLANEA_START_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [11] *DTV_PLANEA_STEP = 1 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [12] *DTV_PLANEA_MODULO_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [13] *DTV_PLANEA_MODULO_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [14] *DTV_PLANEB_START_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [15] *DTV_PLANEB_START_MI = byte1 CHARSET8 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [16] *DTV_PLANEB_START_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [17] *DTV_PLANEB_STEP = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [18] *DTV_PLANEB_MODULO_LO = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [19] *DTV_PLANEB_MODULO_HI = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement asm { ldx#$ff rff: cpxRASTER bnerff stabilize: nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop nop cpxRASTER beqeat+0 eat: inx cpx#$08 bnestabilize } always clobbers reg byte x
|
|
Statement [28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [29] *BORDER_COLOR = 0 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [30] if(*RASTER!=$42) goto main::@3 [ ] ( [ ] { } ) always clobbers reg byte a
|
|
Statement [33] main::$3 = main::rst#1 & 7 [ main::rst#1 main::$3 ] ( [ main::rst#1 main::$3 ] { } ) always clobbers reg byte a
|
|
Statement [34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3 [ main::rst#1 main::$4 ] ( [ main::rst#1 main::$4 ] { } ) always clobbers reg byte a
|
|
Statement [36] main::$5 = main::rst#1 << 4 [ main::rst#1 main::$5 ] ( [ main::rst#1 main::$5 ] { } ) always clobbers reg byte a
|
|
Statement [48] gfx_init_screen0::$0 = gfx_init_screen0::cy#4 & $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$0 ] ( gfx_init:3::gfx_init_screen0:41 [ 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 [49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 ] ( gfx_init:3::gfx_init_screen0:41 [ 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 [50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 gfx_init_screen0::$1 gfx_init_screen0::$2 ] ( gfx_init:3::gfx_init_screen0:41 [ 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 [52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] ( gfx_init:3::gfx_init_screen0:41 [ gfx_init_screen0::cy#4 gfx_init_screen0::cx#2 gfx_init_screen0::ch#2 ] { } ) always clobbers reg byte y
|
|
Statement [61] *PROCPORT = PROCPORT_RAM_CHARROM [ ] ( gfx_init:3::gfx_init_plane_charset8:43 [ ] { } ) always clobbers reg byte a
|
|
Statement [64] gfx_init_plane_charset8::bits#0 = *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 ] ( gfx_init:3::gfx_init_plane_charset8:43 [ 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 [71] *gfx_init_plane_charset8::gfxa#2 = 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 ] ( gfx_init:3::gfx_init_plane_charset8:43 [ 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 [81] *PROCPORT = PROCPORT_RAM_IO [ ] ( gfx_init:3::gfx_init_plane_charset8:43 [ ] { } ) always clobbers reg byte a
|
|
Statement asm { .byte$32,$dd lda$ff .byte$32,$00 } always clobbers reg byte a
|
|
Potential registers zp[1]:26 [ main::j#2 main::j#1 ] : zp[1]:26 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] : zp[1]:19 , reg byte x ,
|
|
Potential registers zp[1]:12 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] : zp[1]:12 , 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]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] : zp[1]:20 , reg byte x ,
|
|
Potential registers zp[2]:13 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] : zp[2]:13 ,
|
|
Potential registers zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] : zp[1]:15 , reg byte x ,
|
|
Potential registers zp[1]:5 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] : zp[1]:5 , reg byte a , reg byte x ,
|
|
Potential registers zp[2]:6 [ 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]:6 ,
|
|
Potential registers zp[1]:8 [ 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]:8 , reg byte x ,
|
|
Potential registers zp[1]:4 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] : zp[1]:4 , reg byte a , reg byte x ,
|
|
Potential registers zp[1]:2 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] : zp[1]:2 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:21 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ] : zp[1]:21 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:25 [ main::rst#1 ] : zp[1]:25 , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:22 [ main::$3 ] : zp[1]:22 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:23 [ main::$4 ] : zp[1]:23 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:24 [ main::$5 ] : zp[1]:24 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:9 [ gfx_init_screen0::$0 ] : zp[1]:9 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:18 [ gfx_init_screen0::$1 ] : zp[1]:18 , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:10 [ gfx_init_screen0::$2 ] : zp[1]:10 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:11 [ gfx_init_screen0::$3 ] : zp[1]:11 , reg byte a , reg byte x , reg byte y ,
|
|
Potential registers zp[1]:3 [ gfx_init_plane_charset8::$2 ] : zp[1]:3 , reg byte a , reg byte x , reg byte y ,
|
|
|
|
REGISTER UPLIFT SCOPES
|
|
Uplift Scope [gfx_init_plane_charset8] 400,004: zp[1]:2 [ gfx_init_plane_charset8::c#2 gfx_init_plane_charset8::c#3 ] 200,002: zp[1]:3 [ gfx_init_plane_charset8::$2 ] 172,223.94: zp[1]:4 [ gfx_init_plane_charset8::cp#2 gfx_init_plane_charset8::cp#1 ] 104,287.79: zp[1]:5 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] 84,115.22: zp[2]:6 [ gfx_init_plane_charset8::gfxa#2 gfx_init_plane_charset8::gfxa#5 gfx_init_plane_charset8::gfxa#6 gfx_init_plane_charset8::gfxa#1 ] 77,896.93: zp[1]:8 [ gfx_init_plane_charset8::col#2 gfx_init_plane_charset8::col#5 gfx_init_plane_charset8::col#6 gfx_init_plane_charset8::col#1 ] 18,816.69: zp[2]:13 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] 16,430.21: zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] 1,619.26: zp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Uplift Scope [gfx_init_screen0] 20,002: zp[1]:9 [ gfx_init_screen0::$0 ] 20,002: zp[1]:10 [ gfx_init_screen0::$2 ] 20,002: zp[1]:11 [ gfx_init_screen0::$3 ] 19,287.64: zp[1]:12 [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ] 11,369.93: zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] 10,001: zp[1]:18 [ gfx_init_screen0::$1 ] 2,701.8: zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Uplift Scope [dtvSetCpuBankSegment1] 1,001: zp[1]:21 [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Uplift Scope [main] 202: zp[1]:22 [ main::$3 ] 202: zp[1]:23 [ main::$4 ] 202: zp[1]:24 [ main::$5 ] 57.71: zp[1]:25 [ main::rst#1 ] 38.5: zp[1]:26 [ 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 98357 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]:5 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ] zp[2]:6 [ 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]:8 [ 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]:13 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] zp[1]:20 [ 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 95557 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]:18 [ gfx_init_screen0::$1 ] zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Limited combination testing to 100 combinations of 768 possible.
|
|
Uplifting [dtvSetCpuBankSegment1] best 95548 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#2 ]
|
|
Uplifting [main] best 92948 combination reg byte a [ main::$3 ] reg byte a [ main::$4 ] reg byte a [ main::$5 ] reg byte x [ main::rst#1 ] zp[1]:26 [ main::j#2 main::j#1 ]
|
|
Limited combination testing to 100 combinations of 768 possible.
|
|
Uplifting [MOS6526_CIA] best 92948 combination
|
|
Uplifting [MOS6569_VICII] best 92948 combination
|
|
Uplifting [MOS6581_SID] best 92948 combination
|
|
Uplifting [gfx_init] best 92948 combination
|
|
Uplifting [] best 92948 combination
|
|
Attempting to uplift remaining variables inzp[1]:5 [ gfx_init_plane_charset8::bits#2 gfx_init_plane_charset8::bits#0 gfx_init_plane_charset8::bits#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92948 combination zp[1]:5 [ 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]:8 [ 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 92948 combination zp[1]:8 [ 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]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92948 combination zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:18 [ gfx_init_screen0::$1 ]
|
|
Uplifting [gfx_init_screen0] best 92948 combination zp[1]:18 [ gfx_init_screen0::$1 ]
|
|
Attempting to uplift remaining variables inzp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Uplifting [gfx_init_screen0] best 92948 combination zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Uplifting [gfx_init_plane_charset8] best 92948 combination zp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ]
|
|
Attempting to uplift remaining variables inzp[1]:26 [ main::j#2 main::j#1 ]
|
|
Uplifting [main] best 92828 combination reg byte x [ main::j#2 main::j#1 ]
|
|
Coalescing zero page register [ zp[1]:20 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 ] ] with [ zp[1]:19 [ gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ] ]
|
|
Coalescing zero page register [ zp[2]:13 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 ] ] with [ zp[2]:16 [ gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ] ]
|
|
Coalescing zero page register [ zp[1]:18 [ gfx_init_screen0::$1 ] ] with [ zp[1]:15 [ gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ] ]
|
|
Allocated (was zp[1]:5) 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]:6) 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]:8) 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[2]:13) zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
Allocated (was zp[1]:18) zp[1]:8 [ gfx_init_screen0::$1 gfx_init_plane_charset8::cr#6 gfx_init_plane_charset8::cr#1 ]
|
|
Allocated (was zp[1]:20) zp[1]:9 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
|
|
ASSEMBLER BEFORE OPTIMIZATION
|
|
// File Comments
|
|
// C64DTV 8bpp charmode stretcher
|
|
/// @file
|
|
/// C64 DTV version 2 Registers and Constants
|
|
///
|
|
/// Sources
|
|
/// (J) https://www.c64-wiki.com/wiki/C64DTV_Programming_Guide
|
|
/// (H) http://dtvhacking.cbm8bit.com/dtv_wiki/images/d/d9/Dtv_registers_full.txt
|
|
// Upstart
|
|
// Commodore 64 PRG executable file
|
|
.file [name="c64dtv-8bppcharstretch.prg", type="prg", segments="Program"]
|
|
.segmentdef Program [segments="Basic, Code, Data"]
|
|
.segmentdef Basic [start=$0801]
|
|
.segmentdef Code [start=$80d]
|
|
.segmentdef Data [startAfter="Code"]
|
|
.segment Basic
|
|
:BasicUpstart(main)
|
|
// Global Constants & labels
|
|
/// $D011 Control Register #1 Bit#6: ECM Turn Extended Color Mode on/off
|
|
.const VICII_ECM = $40
|
|
/// $D011 Control Register #1 Bit#4: DEN Switch VIC-II output on/off
|
|
.const VICII_DEN = $10
|
|
/// $D011 Control Register #1 Bit#3: RSEL Switch betweem 25 or 24 visible rows
|
|
/// RSEL| Display window height | First line | Last line
|
|
/// ----+--------------------------+-------------+----------
|
|
/// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6)
|
|
/// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa)
|
|
.const VICII_RSEL = 8
|
|
/// $D016 Control register #2 Bit#4: MCM Turn Multicolor Mode on/off
|
|
.const VICII_MCM = $10
|
|
/// $D016 Control register #2 Bit#3: CSEL Switch betweem 40 or 38 visible columns
|
|
/// CSEL| Display window width | First X coo. | Last X coo.
|
|
/// ----+--------------------------+--------------+------------
|
|
/// 0 | 38 characters/304 pixels | 31 ($1f) | 334 ($14e)
|
|
/// 1 | 40 characters/320 pixels | 24 ($18) | 343 ($157)
|
|
.const VICII_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
|
|
/// $D012 RASTER Raster counter
|
|
.label RASTER = $d012
|
|
/// $D020 Border Color
|
|
.label BORDER_COLOR = $d020
|
|
/// $D011 Control Register #1
|
|
/// - Bit#0-#2: YSCROLL Screen Soft Scroll Vertical
|
|
/// - Bit#3: RSEL Switch betweem 25 or 24 visible rows
|
|
/// RSEL| Display window height | First line | Last line
|
|
/// ----+--------------------------+-------------+----------
|
|
/// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6)
|
|
/// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa)
|
|
/// - Bit#4: DEN Switch VIC-II output on/off
|
|
/// - Bit#5: BMM Turn Bitmap Mode on/off
|
|
/// - Bit#6: ECM Turn Extended Color Mode on/off
|
|
/// - Bit#7: RST8 9th Bit for $D012 Rasterline counter
|
|
/// Initial Value: %10011011
|
|
.label VICII_CONTROL1 = $d011
|
|
/// $D016 Control register 2
|
|
/// - Bit#0-#2: XSCROLL Screen Soft Scroll Horizontal
|
|
/// - Bit#3: CSEL Switch betweem 40 or 38 visible columns
|
|
/// CSEL| Display window width | First X coo. | Last X coo.
|
|
/// ----+--------------------------+--------------+------------
|
|
/// 0 | 38 characters/304 pixels | 31 ($1f) | 334 ($14e)
|
|
/// 1 | 40 characters/320 pixels | 24 ($18) | 343 ($157)
|
|
/// - Bit#4: MCM Turn Multicolor Mode on/off
|
|
/// - Bit#5-#7: not used
|
|
/// Initial Value: %00001000
|
|
.label VICII_CONTROL2 = $d016
|
|
/// $D018 VIC-II base addresses
|
|
/// - Bit#0: not used
|
|
/// - Bit#1-#3: CB Address Bits 11-13 of the Character Set (*2048)
|
|
/// - Bit#4-#7: VM Address Bits 10-13 of the Screen RAM (*1024)
|
|
/// Initial Value: %00010100
|
|
.label VICII_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
|
|
.segment Code
|
|
// main
|
|
main: {
|
|
// asm { sei }
|
|
sei
|
|
// [1] *PROCPORT_DDR = 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.z PROCPORT_DDR
|
|
// [2] *PROCPORT = PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta.z PROCPORT
|
|
// [3] call gfx_init
|
|
// [40] phi from main to gfx_init [phi:main->gfx_init]
|
|
gfx_init_from_main:
|
|
jsr gfx_init
|
|
jmp __b6
|
|
// main::@6
|
|
__b6:
|
|
// [4] *DTV_FEATURE = DTV_FEATURE_ENABLE -- _deref_pbuc1=vbuc2
|
|
// Enable DTV extended modes
|
|
lda #DTV_FEATURE_ENABLE
|
|
sta DTV_FEATURE
|
|
// [5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF -- _deref_pbuc1=vbuc2
|
|
// 8BPP Pixel Cell Mode
|
|
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
sta DTV_CONTROL
|
|
// [6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 -- _deref_pbuc1=vbuc2
|
|
lda #VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
sta VICII_CONTROL1
|
|
// [7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL -- _deref_pbuc1=vbuc2
|
|
lda #VICII_MCM|VICII_CSEL
|
|
sta VICII_CONTROL2
|
|
// [8] *DTV_PLANEA_START_LO = 0 -- _deref_pbuc1=vbuc2
|
|
// Plane A: SCREEN
|
|
lda #0
|
|
sta DTV_PLANEA_START_LO
|
|
// [9] *DTV_PLANEA_START_MI = byte1 SCREEN -- _deref_pbuc1=vbuc2
|
|
lda #>SCREEN
|
|
sta DTV_PLANEA_START_MI
|
|
// [10] *DTV_PLANEA_START_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_START_HI
|
|
// [11] *DTV_PLANEA_STEP = 1 -- _deref_pbuc1=vbuc2
|
|
lda #1
|
|
sta DTV_PLANEA_STEP
|
|
// [12] *DTV_PLANEA_MODULO_LO = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_LO
|
|
// [13] *DTV_PLANEA_MODULO_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_HI
|
|
// [14] *DTV_PLANEB_START_LO = 0 -- _deref_pbuc1=vbuc2
|
|
// Plane B: CHARSET8
|
|
lda #0
|
|
sta DTV_PLANEB_START_LO
|
|
// [15] *DTV_PLANEB_START_MI = byte1 CHARSET8 -- _deref_pbuc1=vbuc2
|
|
lda #>CHARSET8
|
|
sta DTV_PLANEB_START_MI
|
|
// [16] *DTV_PLANEB_START_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_START_HI
|
|
// [17] *DTV_PLANEB_STEP = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_STEP
|
|
// [18] *DTV_PLANEB_MODULO_LO = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_LO
|
|
// [19] *DTV_PLANEB_MODULO_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_MODULO_HI
|
|
// [20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3 -- _deref_pbuc1=vbuc2
|
|
// VIC Graphics Bank
|
|
lda #3
|
|
sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR
|
|
// [21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank bits to output - all others to input
|
|
lda #3^SCREEN/$4000
|
|
sta CIA2
|
|
// [22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank
|
|
// VIC memory
|
|
lda #(SCREEN&$3fff)/$40|(>SCREEN&$3fff)/4
|
|
sta VICII_MEMORY
|
|
// [23] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
|
__b1_from___b6:
|
|
// [23] phi main::j#2 = 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp __b1
|
|
// DTV Palette - Grey Tones
|
|
// [23] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
__b1_from___b1:
|
|
// [23] phi main::j#2 = main::j#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
jmp __b1
|
|
// main::@1
|
|
__b1:
|
|
// [24] DTV_PALETTE[main::j#2] = main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
|
txa
|
|
sta DTV_PALETTE,x
|
|
// [25] main::j#1 = ++ main::j#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [26] if(main::j#1!=$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
|
|
// [28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 -- _deref_pbuc1=vbuc2
|
|
lda #VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
sta VICII_CONTROL1
|
|
// [29] *BORDER_COLOR = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta BORDER_COLOR
|
|
jmp __b3
|
|
// main::@3
|
|
__b3:
|
|
// [30] if(*RASTER!=$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:
|
|
// [32] main::rst#1 = *RASTER -- vbuxx=_deref_pbuc1
|
|
ldx RASTER
|
|
// [33] main::$3 = main::rst#1 & 7 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #7
|
|
// [34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3 -- vbuaa=vbuc1_bor_vbuaa
|
|
ora #VICII_DEN|VICII_ECM|VICII_RSEL
|
|
// [35] *VICII_CONTROL1 = main::$4 -- _deref_pbuc1=vbuaa
|
|
sta VICII_CONTROL1
|
|
// [36] main::$5 = main::rst#1 << 4 -- vbuaa=vbuxx_rol_4
|
|
txa
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
// [37] *BORDER_COLOR = 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
|
|
// [39] if(main::rst#1!=$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: {
|
|
// [41] call gfx_init_screen0
|
|
// [45] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
|
|
gfx_init_screen0_from_gfx_init:
|
|
jsr gfx_init_screen0
|
|
// [42] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
|
|
__b1_from_gfx_init:
|
|
jmp __b1
|
|
// gfx_init::@1
|
|
__b1:
|
|
// [43] call gfx_init_plane_charset8
|
|
// [59] 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:
|
|
// [44] 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 = 8
|
|
.label ch = 6
|
|
.label cy = 9
|
|
// [46] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
|
|
__b1_from_gfx_init_screen0:
|
|
// [46] phi gfx_init_screen0::ch#3 = SCREEN [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta.z ch
|
|
lda #>SCREEN
|
|
sta.z ch+1
|
|
// [46] phi gfx_init_screen0::cy#4 = 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cy
|
|
jmp __b1
|
|
// [46] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
|
|
__b1_from___b3:
|
|
// [46] phi gfx_init_screen0::ch#3 = gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy
|
|
// [46] phi gfx_init_screen0::cy#4 = gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy
|
|
jmp __b1
|
|
// gfx_init_screen0::@1
|
|
__b1:
|
|
// [47] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
|
|
__b2_from___b1:
|
|
// [47] phi gfx_init_screen0::ch#2 = gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy
|
|
// [47] phi gfx_init_screen0::cx#2 = 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1
|
|
ldx #0
|
|
jmp __b2
|
|
// [47] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
|
|
__b2_from___b2:
|
|
// [47] phi gfx_init_screen0::ch#2 = gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy
|
|
// [47] phi gfx_init_screen0::cx#2 = gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy
|
|
jmp __b2
|
|
// gfx_init_screen0::@2
|
|
__b2:
|
|
// [48] gfx_init_screen0::$0 = gfx_init_screen0::cy#4 & $f -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$f
|
|
and.z cy
|
|
// [49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4 -- vbuz1=vbuaa_rol_4
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __1
|
|
// [50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #$f
|
|
// [51] gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa
|
|
ora.z __1
|
|
// [52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (ch),y
|
|
// [53] gfx_init_screen0::ch#1 = ++ gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1
|
|
inc.z ch
|
|
bne !+
|
|
inc.z ch+1
|
|
!:
|
|
// [54] gfx_init_screen0::cx#1 = ++ gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [55] if(gfx_init_screen0::cx#1!=$28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$28
|
|
bne __b2_from___b2
|
|
jmp __b3
|
|
// gfx_init_screen0::@3
|
|
__b3:
|
|
// [56] gfx_init_screen0::cy#1 = ++ gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1
|
|
inc.z cy
|
|
// [57] if(gfx_init_screen0::cy#1!=$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:
|
|
// [58] 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 = 6
|
|
.label gfxa = 3
|
|
.label col = 5
|
|
.label cr = 8
|
|
.label ch = 9
|
|
// [60] call dtvSetCpuBankSegment1
|
|
// [84] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from_gfx_init_plane_charset8:
|
|
// [84] phi dtvSetCpuBankSegment1::cpuBankIdx#2 = 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:
|
|
// [61] *PROCPORT = PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_CHARROM
|
|
sta.z PROCPORT
|
|
// [62] 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:
|
|
// [62] phi gfx_init_plane_charset8::ch#8 = 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z ch
|
|
// [62] phi gfx_init_plane_charset8::col#6 = 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z col
|
|
// [62] phi gfx_init_plane_charset8::gfxa#6 = (char *) 16384 [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
|
|
// [62] phi gfx_init_plane_charset8::chargen#3 = CHARGEN+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
|
|
// [62] 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:
|
|
// [62] phi gfx_init_plane_charset8::ch#8 = gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::col#6 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::gfxa#6 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::chargen#3 = 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:
|
|
// [63] 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:
|
|
// [63] phi gfx_init_plane_charset8::cr#6 = 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cr
|
|
// [63] phi gfx_init_plane_charset8::col#5 = gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::gfxa#5 = gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::chargen#2 = gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
jmp __b2
|
|
// [63] 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:
|
|
// [63] phi gfx_init_plane_charset8::cr#6 = gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::col#5 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::gfxa#5 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::chargen#2 = 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:
|
|
// [64] gfx_init_plane_charset8::bits#0 = *gfx_init_plane_charset8::chargen#2 -- vbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (chargen),y
|
|
sta.z bits
|
|
// [65] gfx_init_plane_charset8::chargen#1 = ++ gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1
|
|
inc.z chargen
|
|
bne !+
|
|
inc.z chargen+1
|
|
!:
|
|
// [66] 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:
|
|
// [66] phi gfx_init_plane_charset8::cp#2 = 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [66] phi gfx_init_plane_charset8::col#2 = gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::bits#2 = gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
jmp __b3
|
|
// [66] 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:
|
|
// [66] phi gfx_init_plane_charset8::cp#2 = gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::col#2 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::bits#2 = 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:
|
|
// [67] gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80 -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$80
|
|
and.z bits
|
|
// [68] if(gfx_init_plane_charset8::$2==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:
|
|
// [69] gfx_init_plane_charset8::c#3 = gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1
|
|
lda.z col
|
|
// [70] 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:
|
|
// [70] phi gfx_init_plane_charset8::c#2 = gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy
|
|
jmp __b4
|
|
// [70] 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:
|
|
// [70] phi gfx_init_plane_charset8::c#2 = 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:
|
|
// [71] *gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (gfxa),y
|
|
// [72] gfx_init_plane_charset8::gfxa#1 = ++ gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1
|
|
inc.z gfxa
|
|
bne !+
|
|
inc.z gfxa+1
|
|
!:
|
|
// [73] gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::bits#2 << 1 -- vbuz1=vbuz1_rol_1
|
|
asl.z bits
|
|
// [74] gfx_init_plane_charset8::col#1 = ++ gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1
|
|
inc.z col
|
|
// [75] gfx_init_plane_charset8::cp#1 = ++ gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [76] if(gfx_init_plane_charset8::cp#1!=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:
|
|
// [77] gfx_init_plane_charset8::cr#1 = ++ gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1
|
|
inc.z cr
|
|
// [78] if(gfx_init_plane_charset8::cr#1!=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:
|
|
// [79] gfx_init_plane_charset8::ch#1 = ++ gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1
|
|
inc.z ch
|
|
// [80] if(gfx_init_plane_charset8::ch#1!=0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1
|
|
lda.z ch
|
|
bne __b1_from___b7
|
|
jmp __b8
|
|
// gfx_init_plane_charset8::@8
|
|
__b8:
|
|
// [81] *PROCPORT = PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta.z PROCPORT
|
|
// [82] call dtvSetCpuBankSegment1
|
|
// Reset CPU BANK segment to $4000
|
|
// [84] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
|
|
dtvSetCpuBankSegment1_from___b8:
|
|
// [84] phi dtvSetCpuBankSegment1::cpuBankIdx#2 = (char)$4000/$4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #$4000/$4000
|
|
jsr dtvSetCpuBankSegment1
|
|
jmp __breturn
|
|
// gfx_init_plane_charset8::@return
|
|
__breturn:
|
|
// [83] 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
|
|
// void dtvSetCpuBankSegment1(__register(A) char cpuBankIdx)
|
|
dtvSetCpuBankSegment1: {
|
|
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
|
|
.label cpuBank = $ff
|
|
// [85] *dtvSetCpuBankSegment1::cpuBank = dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
|
|
sta.z cpuBank
|
|
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
.byte $32, $dd
|
|
lda.z $ff
|
|
.byte $32, 0
|
|
jmp __breturn
|
|
// dtvSetCpuBankSegment1::@return
|
|
__breturn:
|
|
// [87] return
|
|
rts
|
|
}
|
|
// File Data
|
|
|
|
ASSEMBLER OPTIMIZATIONS
|
|
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 __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
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
|
|
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 __b2_from___b2 with __b2
|
|
Replacing label __b1_from___b3 with __b1
|
|
Replacing label __b3_from___b4 with __b3
|
|
Replacing label __b2_from___b6 with __b2
|
|
Replacing label __b1_from___b7 with __b1
|
|
Removing instruction __b1_from___b1:
|
|
Removing instruction __b1_from_gfx_init:
|
|
Removing instruction gfx_init_plane_charset8_from___b1:
|
|
Removing instruction __b1_from___b3:
|
|
Removing instruction __b2_from___b1:
|
|
Removing instruction __b2_from___b2:
|
|
Removing instruction __b1_from___b7:
|
|
Removing instruction __b2_from___b1:
|
|
Removing instruction __b2_from___b6:
|
|
Removing instruction __b3_from___b4:
|
|
Succesful ASM optimization Pass5RedundantLabelElimination
|
|
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 __b1_from_gfx_init_screen0:
|
|
Removing instruction __b3:
|
|
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:
|
|
Succesful ASM optimization Pass5UnusedLabelElimination
|
|
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 __b1
|
|
Removing instruction jmp __b2
|
|
Removing instruction jmp __b3
|
|
Succesful ASM optimization Pass5NextJumpElimination
|
|
|
|
FINAL SYMBOL TABLE
|
|
__constant char * const BORDER_COLOR = (char *) 53280
|
|
__constant char * const CHARGEN = (char *) 53248
|
|
__constant char * const CHARSET8 = (char *) 32768
|
|
__constant struct MOS6526_CIA * const CIA2 = (struct MOS6526_CIA *) 56576
|
|
__constant const char DTV_BADLINE_OFF = $20
|
|
__constant const char DTV_CHUNKY = $40
|
|
__constant char * const DTV_CONTROL = (char *) 53308
|
|
__constant char * const DTV_FEATURE = (char *) 53311
|
|
__constant const char DTV_FEATURE_ENABLE = 1
|
|
__constant const char DTV_HIGHCOLOR = 4
|
|
__constant const char DTV_LINEAR = 1
|
|
__constant char * const DTV_PALETTE = (char *) 53760
|
|
__constant char * const DTV_PLANEA_MODULO_HI = (char *) 53305
|
|
__constant char * const DTV_PLANEA_MODULO_LO = (char *) 53304
|
|
__constant char * const DTV_PLANEA_START_HI = (char *) 53317
|
|
__constant char * const DTV_PLANEA_START_LO = (char *) 53306
|
|
__constant char * const DTV_PLANEA_START_MI = (char *) 53307
|
|
__constant char * const DTV_PLANEA_STEP = (char *) 53318
|
|
__constant char * const DTV_PLANEB_MODULO_HI = (char *) 53320
|
|
__constant char * const DTV_PLANEB_MODULO_LO = (char *) 53319
|
|
__constant char * const DTV_PLANEB_START_HI = (char *) 53323
|
|
__constant char * const DTV_PLANEB_START_LO = (char *) 53321
|
|
__constant char * const DTV_PLANEB_START_MI = (char *) 53322
|
|
__constant char * const DTV_PLANEB_STEP = (char *) 53324
|
|
__constant char OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR = 2
|
|
__constant char * const PROCPORT = (char *) 1
|
|
__constant char * const PROCPORT_DDR = (char *) 0
|
|
__constant const char PROCPORT_DDR_MEMORY_MASK = 7
|
|
__constant const char PROCPORT_RAM_CHARROM = 1
|
|
__constant const char PROCPORT_RAM_IO = 5
|
|
__constant char * const RASTER = (char *) 53266
|
|
__constant char * const SCREEN = (char *) 31744
|
|
__constant char * const VICII_CONTROL1 = (char *) 53265
|
|
__constant char * const VICII_CONTROL2 = (char *) 53270
|
|
__constant const char VICII_CSEL = 8
|
|
__constant const char VICII_DEN = $10
|
|
__constant const char VICII_ECM = $40
|
|
__constant const char VICII_MCM = $10
|
|
__constant char * const VICII_MEMORY = (char *) 53272
|
|
__constant const char VICII_RSEL = 8
|
|
void dtvSetCpuBankSegment1(char cpuBankIdx)
|
|
__constant char *dtvSetCpuBankSegment1::cpuBank = (char *) 255
|
|
char dtvSetCpuBankSegment1::cpuBankIdx
|
|
char dtvSetCpuBankSegment1::cpuBankIdx#2 // reg byte a 1001.0
|
|
void gfx_init()
|
|
void gfx_init_plane_charset8()
|
|
char gfx_init_plane_charset8::$2 // reg byte a 200002.0
|
|
char gfx_init_plane_charset8::bits
|
|
char gfx_init_plane_charset8::bits#0 // bits zp[1]:2 10001.0
|
|
char gfx_init_plane_charset8::bits#1 // bits zp[1]:2 50000.5
|
|
char gfx_init_plane_charset8::bits#2 // bits zp[1]:2 44286.28571428572
|
|
char gfx_init_plane_charset8::c
|
|
char gfx_init_plane_charset8::c#2 // reg byte a 200002.0
|
|
char gfx_init_plane_charset8::c#3 // reg byte a 200002.0
|
|
char gfx_init_plane_charset8::ch
|
|
char gfx_init_plane_charset8::ch#1 // ch zp[1]:9 1501.5
|
|
char gfx_init_plane_charset8::ch#8 // ch zp[1]:9 117.76470588235294
|
|
char *gfx_init_plane_charset8::chargen
|
|
char *gfx_init_plane_charset8::chargen#1 // chargen zp[2]:6 1312.6875
|
|
char *gfx_init_plane_charset8::chargen#2 // chargen zp[2]:6 15502.0
|
|
char *gfx_init_plane_charset8::chargen#3 // chargen zp[2]:6 2002.0
|
|
char gfx_init_plane_charset8::col
|
|
char gfx_init_plane_charset8::col#1 // col zp[1]:5 30143.428571428572
|
|
char gfx_init_plane_charset8::col#2 // col zp[1]:5 38750.5
|
|
char gfx_init_plane_charset8::col#5 // col zp[1]:5 7001.0
|
|
char gfx_init_plane_charset8::col#6 // col zp[1]:5 2002.0
|
|
char gfx_init_plane_charset8::cp
|
|
char gfx_init_plane_charset8::cp#1 // reg byte x 150001.5
|
|
char gfx_init_plane_charset8::cp#2 // reg byte x 22222.444444444445
|
|
char gfx_init_plane_charset8::cr
|
|
char gfx_init_plane_charset8::cr#1 // cr zp[1]:8 15001.5
|
|
char gfx_init_plane_charset8::cr#6 // cr zp[1]:8 1428.7142857142858
|
|
char *gfx_init_plane_charset8::gfxa
|
|
char *gfx_init_plane_charset8::gfxa#1 // gfxa zp[2]:3 23444.88888888889
|
|
char *gfx_init_plane_charset8::gfxa#2 // gfxa zp[2]:3 51667.33333333333
|
|
char *gfx_init_plane_charset8::gfxa#5 // gfxa zp[2]:3 7001.0
|
|
char *gfx_init_plane_charset8::gfxa#6 // gfxa zp[2]:3 2002.0
|
|
char gfx_init_plane_charset8::gfxbCpuBank
|
|
__constant char gfx_init_plane_charset8::gfxbCpuBank#0 = (char)CHARSET8/$4000 // gfxbCpuBank
|
|
void gfx_init_screen0()
|
|
char gfx_init_screen0::$0 // reg byte a 20002.0
|
|
char gfx_init_screen0::$1 // zp[1]:8 10001.0
|
|
char gfx_init_screen0::$2 // reg byte a 20002.0
|
|
char gfx_init_screen0::$3 // reg byte a 20002.0
|
|
char *gfx_init_screen0::ch
|
|
char *gfx_init_screen0::ch#1 // ch zp[2]:6 4200.6
|
|
char *gfx_init_screen0::ch#2 // ch zp[2]:6 5167.333333333333
|
|
char *gfx_init_screen0::ch#3 // ch zp[2]:6 2002.0
|
|
char gfx_init_screen0::cx
|
|
char gfx_init_screen0::cx#1 // reg byte x 15001.5
|
|
char gfx_init_screen0::cx#2 // reg byte x 4286.142857142857
|
|
char gfx_init_screen0::cy
|
|
char gfx_init_screen0::cy#1 // cy zp[1]:9 1501.5
|
|
char gfx_init_screen0::cy#4 // cy zp[1]:9 1200.3
|
|
void main()
|
|
char main::$3 // reg byte a 202.0
|
|
char main::$4 // reg byte a 202.0
|
|
char main::$5 // reg byte a 202.0
|
|
char main::j
|
|
char main::j#1 // reg byte x 16.5
|
|
char main::j#2 // reg byte x 22.0
|
|
char main::rst
|
|
char main::rst#1 // reg byte x 57.714285714285715
|
|
|
|
reg byte x [ main::j#2 main::j#1 ]
|
|
reg byte x [ gfx_init_screen0::cx#2 gfx_init_screen0::cx#1 ]
|
|
zp[1]:9 [ gfx_init_plane_charset8::ch#8 gfx_init_plane_charset8::ch#1 gfx_init_screen0::cy#4 gfx_init_screen0::cy#1 ]
|
|
zp[2]:6 [ gfx_init_plane_charset8::chargen#2 gfx_init_plane_charset8::chargen#3 gfx_init_plane_charset8::chargen#1 gfx_init_screen0::ch#2 gfx_init_screen0::ch#3 gfx_init_screen0::ch#1 ]
|
|
zp[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 ]
|
|
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_screen0::$0 ]
|
|
zp[1]:8 [ 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 ]
|
|
reg byte a [ gfx_init_plane_charset8::$2 ]
|
|
|
|
|
|
FINAL ASSEMBLER
|
|
Score: 75350
|
|
|
|
// File Comments
|
|
// C64DTV 8bpp charmode stretcher
|
|
/// @file
|
|
/// C64 DTV version 2 Registers and Constants
|
|
///
|
|
/// Sources
|
|
/// (J) https://www.c64-wiki.com/wiki/C64DTV_Programming_Guide
|
|
/// (H) http://dtvhacking.cbm8bit.com/dtv_wiki/images/d/d9/Dtv_registers_full.txt
|
|
// Upstart
|
|
// Commodore 64 PRG executable file
|
|
.file [name="c64dtv-8bppcharstretch.prg", type="prg", segments="Program"]
|
|
.segmentdef Program [segments="Basic, Code, Data"]
|
|
.segmentdef Basic [start=$0801]
|
|
.segmentdef Code [start=$80d]
|
|
.segmentdef Data [startAfter="Code"]
|
|
.segment Basic
|
|
:BasicUpstart(main)
|
|
// Global Constants & labels
|
|
/// $D011 Control Register #1 Bit#6: ECM Turn Extended Color Mode on/off
|
|
.const VICII_ECM = $40
|
|
/// $D011 Control Register #1 Bit#4: DEN Switch VIC-II output on/off
|
|
.const VICII_DEN = $10
|
|
/// $D011 Control Register #1 Bit#3: RSEL Switch betweem 25 or 24 visible rows
|
|
/// RSEL| Display window height | First line | Last line
|
|
/// ----+--------------------------+-------------+----------
|
|
/// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6)
|
|
/// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa)
|
|
.const VICII_RSEL = 8
|
|
/// $D016 Control register #2 Bit#4: MCM Turn Multicolor Mode on/off
|
|
.const VICII_MCM = $10
|
|
/// $D016 Control register #2 Bit#3: CSEL Switch betweem 40 or 38 visible columns
|
|
/// CSEL| Display window width | First X coo. | Last X coo.
|
|
/// ----+--------------------------+--------------+------------
|
|
/// 0 | 38 characters/304 pixels | 31 ($1f) | 334 ($14e)
|
|
/// 1 | 40 characters/320 pixels | 24 ($18) | 343 ($157)
|
|
.const VICII_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
|
|
/// $D012 RASTER Raster counter
|
|
.label RASTER = $d012
|
|
/// $D020 Border Color
|
|
.label BORDER_COLOR = $d020
|
|
/// $D011 Control Register #1
|
|
/// - Bit#0-#2: YSCROLL Screen Soft Scroll Vertical
|
|
/// - Bit#3: RSEL Switch betweem 25 or 24 visible rows
|
|
/// RSEL| Display window height | First line | Last line
|
|
/// ----+--------------------------+-------------+----------
|
|
/// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6)
|
|
/// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa)
|
|
/// - Bit#4: DEN Switch VIC-II output on/off
|
|
/// - Bit#5: BMM Turn Bitmap Mode on/off
|
|
/// - Bit#6: ECM Turn Extended Color Mode on/off
|
|
/// - Bit#7: RST8 9th Bit for $D012 Rasterline counter
|
|
/// Initial Value: %10011011
|
|
.label VICII_CONTROL1 = $d011
|
|
/// $D016 Control register 2
|
|
/// - Bit#0-#2: XSCROLL Screen Soft Scroll Horizontal
|
|
/// - Bit#3: CSEL Switch betweem 40 or 38 visible columns
|
|
/// CSEL| Display window width | First X coo. | Last X coo.
|
|
/// ----+--------------------------+--------------+------------
|
|
/// 0 | 38 characters/304 pixels | 31 ($1f) | 334 ($14e)
|
|
/// 1 | 40 characters/320 pixels | 24 ($18) | 343 ($157)
|
|
/// - Bit#4: MCM Turn Multicolor Mode on/off
|
|
/// - Bit#5-#7: not used
|
|
/// Initial Value: %00001000
|
|
.label VICII_CONTROL2 = $d016
|
|
/// $D018 VIC-II base addresses
|
|
/// - Bit#0: not used
|
|
/// - Bit#1-#3: CB Address Bits 11-13 of the Character Set (*2048)
|
|
/// - Bit#4-#7: VM Address Bits 10-13 of the Screen RAM (*1024)
|
|
/// Initial Value: %00010100
|
|
.label VICII_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
|
|
.segment Code
|
|
// main
|
|
main: {
|
|
// asm
|
|
// asm { sei }
|
|
sei
|
|
// *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
|
// [1] *PROCPORT_DDR = 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.z PROCPORT_DDR
|
|
// *PROCPORT = PROCPORT_RAM_IO
|
|
// [2] *PROCPORT = PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta.z PROCPORT
|
|
// gfx_init()
|
|
// [3] call gfx_init
|
|
// [40] phi from main to gfx_init [phi:main->gfx_init]
|
|
jsr gfx_init
|
|
// main::@6
|
|
// *DTV_FEATURE = DTV_FEATURE_ENABLE
|
|
// [4] *DTV_FEATURE = 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
|
|
// [5] *DTV_CONTROL = DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF -- _deref_pbuc1=vbuc2
|
|
// 8BPP Pixel Cell Mode
|
|
lda #DTV_HIGHCOLOR|DTV_LINEAR|DTV_CHUNKY|DTV_BADLINE_OFF
|
|
sta DTV_CONTROL
|
|
// *VICII_CONTROL1 = VICII_DEN | VICII_ECM | VICII_RSEL | 3
|
|
// [6] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 -- _deref_pbuc1=vbuc2
|
|
lda #VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
sta VICII_CONTROL1
|
|
// *VICII_CONTROL2 = VICII_MCM | VICII_CSEL
|
|
// [7] *VICII_CONTROL2 = VICII_MCM|VICII_CSEL -- _deref_pbuc1=vbuc2
|
|
lda #VICII_MCM|VICII_CSEL
|
|
sta VICII_CONTROL2
|
|
// *DTV_PLANEA_START_LO = BYTE0(SCREEN)
|
|
// [8] *DTV_PLANEA_START_LO = 0 -- _deref_pbuc1=vbuc2
|
|
// Plane A: SCREEN
|
|
lda #0
|
|
sta DTV_PLANEA_START_LO
|
|
// *DTV_PLANEA_START_MI = BYTE1(SCREEN)
|
|
// [9] *DTV_PLANEA_START_MI = byte1 SCREEN -- _deref_pbuc1=vbuc2
|
|
lda #>SCREEN
|
|
sta DTV_PLANEA_START_MI
|
|
// *DTV_PLANEA_START_HI = 0
|
|
// [10] *DTV_PLANEA_START_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_START_HI
|
|
// *DTV_PLANEA_STEP = 1
|
|
// [11] *DTV_PLANEA_STEP = 1 -- _deref_pbuc1=vbuc2
|
|
lda #1
|
|
sta DTV_PLANEA_STEP
|
|
// *DTV_PLANEA_MODULO_LO = 0
|
|
// [12] *DTV_PLANEA_MODULO_LO = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEA_MODULO_LO
|
|
// *DTV_PLANEA_MODULO_HI = 0
|
|
// [13] *DTV_PLANEA_MODULO_HI = 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEA_MODULO_HI
|
|
// *DTV_PLANEB_START_LO = BYTE0(CHARSET8)
|
|
// [14] *DTV_PLANEB_START_LO = 0 -- _deref_pbuc1=vbuc2
|
|
// Plane B: CHARSET8
|
|
sta DTV_PLANEB_START_LO
|
|
// *DTV_PLANEB_START_MI = BYTE1(CHARSET8)
|
|
// [15] *DTV_PLANEB_START_MI = byte1 CHARSET8 -- _deref_pbuc1=vbuc2
|
|
lda #>CHARSET8
|
|
sta DTV_PLANEB_START_MI
|
|
// *DTV_PLANEB_START_HI = 0
|
|
// [16] *DTV_PLANEB_START_HI = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta DTV_PLANEB_START_HI
|
|
// *DTV_PLANEB_STEP = 0
|
|
// [17] *DTV_PLANEB_STEP = 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_STEP
|
|
// *DTV_PLANEB_MODULO_LO = 0
|
|
// [18] *DTV_PLANEB_MODULO_LO = 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_MODULO_LO
|
|
// *DTV_PLANEB_MODULO_HI = 0
|
|
// [19] *DTV_PLANEB_MODULO_HI = 0 -- _deref_pbuc1=vbuc2
|
|
sta DTV_PLANEB_MODULO_HI
|
|
// CIA2->PORT_A_DDR = %00000011
|
|
// [20] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 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)
|
|
// [21] *((char *)CIA2) = 3^(char)(unsigned int)SCREEN/$4000 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank bits to output - all others to input
|
|
lda #3^SCREEN/$4000
|
|
sta CIA2
|
|
// *VICII_MEMORY = (byte)((((word)SCREEN)&$3fff)/$40) | ((BYTE1(((word)SCREEN)&$3fff))/4)
|
|
// [22] *VICII_MEMORY = (char)(unsigned int)SCREEN&$3fff/$40|byte1 (unsigned int)SCREEN&$3fff/4 -- _deref_pbuc1=vbuc2
|
|
// Set VIC Bank
|
|
// VIC memory
|
|
lda #(SCREEN&$3fff)/$40|(>SCREEN&$3fff)/4
|
|
sta VICII_MEMORY
|
|
// [23] phi from main::@6 to main::@1 [phi:main::@6->main::@1]
|
|
// [23] phi main::j#2 = 0 [phi:main::@6->main::@1#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// DTV Palette - Grey Tones
|
|
// [23] phi from main::@1 to main::@1 [phi:main::@1->main::@1]
|
|
// [23] phi main::j#2 = main::j#1 [phi:main::@1->main::@1#0] -- register_copy
|
|
// main::@1
|
|
__b1:
|
|
// DTV_PALETTE[j] = j
|
|
// [24] DTV_PALETTE[main::j#2] = main::j#2 -- pbuc1_derefidx_vbuxx=vbuxx
|
|
txa
|
|
sta DTV_PALETTE,x
|
|
// for(byte j : 0..$f)
|
|
// [25] main::j#1 = ++ main::j#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [26] if(main::j#1!=$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
|
|
// *VICII_CONTROL1 = VICII_DEN | VICII_ECM | VICII_RSEL | 3
|
|
// [28] *VICII_CONTROL1 = VICII_DEN|VICII_ECM|VICII_RSEL|3 -- _deref_pbuc1=vbuc2
|
|
lda #VICII_DEN|VICII_ECM|VICII_RSEL|3
|
|
sta VICII_CONTROL1
|
|
// *BORDER_COLOR = 0
|
|
// [29] *BORDER_COLOR = 0 -- _deref_pbuc1=vbuc2
|
|
lda #0
|
|
sta BORDER_COLOR
|
|
// main::@3
|
|
__b3:
|
|
// while(*RASTER!=rst)
|
|
// [30] if(*RASTER!=$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
|
|
// [32] main::rst#1 = *RASTER -- vbuxx=_deref_pbuc1
|
|
ldx RASTER
|
|
// rst&7
|
|
// [33] main::$3 = main::rst#1 & 7 -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #7
|
|
// VICII_DEN | VICII_ECM | VICII_RSEL | (rst&7)
|
|
// [34] main::$4 = VICII_DEN|VICII_ECM|VICII_RSEL | main::$3 -- vbuaa=vbuc1_bor_vbuaa
|
|
ora #VICII_DEN|VICII_ECM|VICII_RSEL
|
|
// *VICII_CONTROL1 = VICII_DEN | VICII_ECM | VICII_RSEL | (rst&7)
|
|
// [35] *VICII_CONTROL1 = main::$4 -- _deref_pbuc1=vbuaa
|
|
sta VICII_CONTROL1
|
|
// rst*$10
|
|
// [36] main::$5 = main::rst#1 << 4 -- vbuaa=vbuxx_rol_4
|
|
txa
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
// *BORDER_COLOR = rst*$10
|
|
// [37] *BORDER_COLOR = 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)
|
|
// [39] if(main::rst#1!=$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()
|
|
// [41] call gfx_init_screen0
|
|
// [45] phi from gfx_init to gfx_init_screen0 [phi:gfx_init->gfx_init_screen0]
|
|
jsr gfx_init_screen0
|
|
// [42] phi from gfx_init to gfx_init::@1 [phi:gfx_init->gfx_init::@1]
|
|
// gfx_init::@1
|
|
// gfx_init_plane_charset8()
|
|
// [43] call gfx_init_plane_charset8
|
|
// [59] 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
|
|
// }
|
|
// [44] 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 = 8
|
|
.label ch = 6
|
|
.label cy = 9
|
|
// [46] phi from gfx_init_screen0 to gfx_init_screen0::@1 [phi:gfx_init_screen0->gfx_init_screen0::@1]
|
|
// [46] phi gfx_init_screen0::ch#3 = SCREEN [phi:gfx_init_screen0->gfx_init_screen0::@1#0] -- pbuz1=pbuc1
|
|
lda #<SCREEN
|
|
sta.z ch
|
|
lda #>SCREEN
|
|
sta.z ch+1
|
|
// [46] phi gfx_init_screen0::cy#4 = 0 [phi:gfx_init_screen0->gfx_init_screen0::@1#1] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cy
|
|
// [46] phi from gfx_init_screen0::@3 to gfx_init_screen0::@1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1]
|
|
// [46] phi gfx_init_screen0::ch#3 = gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#0] -- register_copy
|
|
// [46] phi gfx_init_screen0::cy#4 = gfx_init_screen0::cy#1 [phi:gfx_init_screen0::@3->gfx_init_screen0::@1#1] -- register_copy
|
|
// gfx_init_screen0::@1
|
|
__b1:
|
|
// [47] phi from gfx_init_screen0::@1 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2]
|
|
// [47] phi gfx_init_screen0::ch#2 = gfx_init_screen0::ch#3 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#0] -- register_copy
|
|
// [47] phi gfx_init_screen0::cx#2 = 0 [phi:gfx_init_screen0::@1->gfx_init_screen0::@2#1] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [47] phi from gfx_init_screen0::@2 to gfx_init_screen0::@2 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2]
|
|
// [47] phi gfx_init_screen0::ch#2 = gfx_init_screen0::ch#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#0] -- register_copy
|
|
// [47] phi gfx_init_screen0::cx#2 = gfx_init_screen0::cx#1 [phi:gfx_init_screen0::@2->gfx_init_screen0::@2#1] -- register_copy
|
|
// gfx_init_screen0::@2
|
|
__b2:
|
|
// cy&$f
|
|
// [48] gfx_init_screen0::$0 = gfx_init_screen0::cy#4 & $f -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$f
|
|
and.z cy
|
|
// (cy&$f)*$10
|
|
// [49] gfx_init_screen0::$1 = gfx_init_screen0::$0 << 4 -- vbuz1=vbuaa_rol_4
|
|
asl
|
|
asl
|
|
asl
|
|
asl
|
|
sta.z __1
|
|
// cx&$f
|
|
// [50] gfx_init_screen0::$2 = gfx_init_screen0::cx#2 & $f -- vbuaa=vbuxx_band_vbuc1
|
|
txa
|
|
and #$f
|
|
// (cy&$f)*$10|(cx&$f)
|
|
// [51] gfx_init_screen0::$3 = gfx_init_screen0::$1 | gfx_init_screen0::$2 -- vbuaa=vbuz1_bor_vbuaa
|
|
ora.z __1
|
|
// *ch++ = (cy&$f)*$10|(cx&$f)
|
|
// [52] *gfx_init_screen0::ch#2 = gfx_init_screen0::$3 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (ch),y
|
|
// *ch++ = (cy&$f)*$10|(cx&$f);
|
|
// [53] gfx_init_screen0::ch#1 = ++ gfx_init_screen0::ch#2 -- pbuz1=_inc_pbuz1
|
|
inc.z ch
|
|
bne !+
|
|
inc.z ch+1
|
|
!:
|
|
// for(byte cx: 0..39)
|
|
// [54] gfx_init_screen0::cx#1 = ++ gfx_init_screen0::cx#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [55] if(gfx_init_screen0::cx#1!=$28) goto gfx_init_screen0::@2 -- vbuxx_neq_vbuc1_then_la1
|
|
cpx #$28
|
|
bne __b2
|
|
// gfx_init_screen0::@3
|
|
// for(byte cy: 0..24 )
|
|
// [56] gfx_init_screen0::cy#1 = ++ gfx_init_screen0::cy#4 -- vbuz1=_inc_vbuz1
|
|
inc.z cy
|
|
// [57] if(gfx_init_screen0::cy#1!=$19) goto gfx_init_screen0::@1 -- vbuz1_neq_vbuc1_then_la1
|
|
lda #$19
|
|
cmp.z cy
|
|
bne __b1
|
|
// gfx_init_screen0::@return
|
|
// }
|
|
// [58] 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 = 6
|
|
.label gfxa = 3
|
|
.label col = 5
|
|
.label cr = 8
|
|
.label ch = 9
|
|
// dtvSetCpuBankSegment1(gfxbCpuBank++)
|
|
// [60] call dtvSetCpuBankSegment1
|
|
// [84] phi from gfx_init_plane_charset8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8->dtvSetCpuBankSegment1]
|
|
// [84] phi dtvSetCpuBankSegment1::cpuBankIdx#2 = 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
|
|
// [61] *PROCPORT = PROCPORT_RAM_CHARROM -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_CHARROM
|
|
sta.z PROCPORT
|
|
// [62] phi from gfx_init_plane_charset8::@9 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1]
|
|
// [62] phi gfx_init_plane_charset8::ch#8 = 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z ch
|
|
// [62] phi gfx_init_plane_charset8::col#6 = 0 [phi:gfx_init_plane_charset8::@9->gfx_init_plane_charset8::@1#1] -- vbuz1=vbuc1
|
|
sta.z col
|
|
// [62] phi gfx_init_plane_charset8::gfxa#6 = (char *) 16384 [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
|
|
// [62] phi gfx_init_plane_charset8::chargen#3 = CHARGEN+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
|
|
// [62] phi from gfx_init_plane_charset8::@7 to gfx_init_plane_charset8::@1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1]
|
|
// [62] phi gfx_init_plane_charset8::ch#8 = gfx_init_plane_charset8::ch#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#0] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::col#6 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#1] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::gfxa#6 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@7->gfx_init_plane_charset8::@1#2] -- register_copy
|
|
// [62] phi gfx_init_plane_charset8::chargen#3 = 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:
|
|
// [63] phi from gfx_init_plane_charset8::@1 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2]
|
|
// [63] phi gfx_init_plane_charset8::cr#6 = 0 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#0] -- vbuz1=vbuc1
|
|
lda #0
|
|
sta.z cr
|
|
// [63] phi gfx_init_plane_charset8::col#5 = gfx_init_plane_charset8::col#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::gfxa#5 = gfx_init_plane_charset8::gfxa#6 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::chargen#2 = gfx_init_plane_charset8::chargen#3 [phi:gfx_init_plane_charset8::@1->gfx_init_plane_charset8::@2#3] -- register_copy
|
|
// [63] phi from gfx_init_plane_charset8::@6 to gfx_init_plane_charset8::@2 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2]
|
|
// [63] phi gfx_init_plane_charset8::cr#6 = gfx_init_plane_charset8::cr#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#0] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::col#5 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#1] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::gfxa#5 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@6->gfx_init_plane_charset8::@2#2] -- register_copy
|
|
// [63] phi gfx_init_plane_charset8::chargen#2 = 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:
|
|
// byte bits = *chargen++
|
|
// [64] gfx_init_plane_charset8::bits#0 = *gfx_init_plane_charset8::chargen#2 -- vbuz1=_deref_pbuz2
|
|
ldy #0
|
|
lda (chargen),y
|
|
sta.z bits
|
|
// [65] gfx_init_plane_charset8::chargen#1 = ++ gfx_init_plane_charset8::chargen#2 -- pbuz1=_inc_pbuz1
|
|
inc.z chargen
|
|
bne !+
|
|
inc.z chargen+1
|
|
!:
|
|
// [66] phi from gfx_init_plane_charset8::@2 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3]
|
|
// [66] phi gfx_init_plane_charset8::cp#2 = 0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#0] -- vbuxx=vbuc1
|
|
ldx #0
|
|
// [66] phi gfx_init_plane_charset8::col#2 = gfx_init_plane_charset8::col#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::gfxa#5 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::bits#2 = gfx_init_plane_charset8::bits#0 [phi:gfx_init_plane_charset8::@2->gfx_init_plane_charset8::@3#3] -- register_copy
|
|
// [66] phi from gfx_init_plane_charset8::@4 to gfx_init_plane_charset8::@3 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3]
|
|
// [66] phi gfx_init_plane_charset8::cp#2 = gfx_init_plane_charset8::cp#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#0] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::col#2 = gfx_init_plane_charset8::col#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#1] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::gfxa#1 [phi:gfx_init_plane_charset8::@4->gfx_init_plane_charset8::@3#2] -- register_copy
|
|
// [66] phi gfx_init_plane_charset8::bits#2 = 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
|
|
// [67] gfx_init_plane_charset8::$2 = gfx_init_plane_charset8::bits#2 & $80 -- vbuaa=vbuz1_band_vbuc1
|
|
lda #$80
|
|
and.z bits
|
|
// if((bits & $80) != 0)
|
|
// [68] if(gfx_init_plane_charset8::$2==0) goto gfx_init_plane_charset8::@4 -- vbuaa_eq_0_then_la1
|
|
cmp #0
|
|
beq __b5
|
|
// gfx_init_plane_charset8::@5
|
|
// [69] gfx_init_plane_charset8::c#3 = gfx_init_plane_charset8::col#2 -- vbuaa=vbuz1
|
|
lda.z col
|
|
// [70] phi from gfx_init_plane_charset8::@5 to gfx_init_plane_charset8::@4 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4]
|
|
// [70] phi gfx_init_plane_charset8::c#2 = gfx_init_plane_charset8::c#3 [phi:gfx_init_plane_charset8::@5->gfx_init_plane_charset8::@4#0] -- register_copy
|
|
jmp __b4
|
|
// [70] 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:
|
|
// [70] phi gfx_init_plane_charset8::c#2 = 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
|
|
// [71] *gfx_init_plane_charset8::gfxa#2 = gfx_init_plane_charset8::c#2 -- _deref_pbuz1=vbuaa
|
|
ldy #0
|
|
sta (gfxa),y
|
|
// *gfxa++ = c;
|
|
// [72] gfx_init_plane_charset8::gfxa#1 = ++ gfx_init_plane_charset8::gfxa#2 -- pbuz1=_inc_pbuz1
|
|
inc.z gfxa
|
|
bne !+
|
|
inc.z gfxa+1
|
|
!:
|
|
// bits = bits*2
|
|
// [73] gfx_init_plane_charset8::bits#1 = gfx_init_plane_charset8::bits#2 << 1 -- vbuz1=vbuz1_rol_1
|
|
asl.z bits
|
|
// col++;
|
|
// [74] gfx_init_plane_charset8::col#1 = ++ gfx_init_plane_charset8::col#2 -- vbuz1=_inc_vbuz1
|
|
inc.z col
|
|
// for ( byte cp : 0..7)
|
|
// [75] gfx_init_plane_charset8::cp#1 = ++ gfx_init_plane_charset8::cp#2 -- vbuxx=_inc_vbuxx
|
|
inx
|
|
// [76] if(gfx_init_plane_charset8::cp#1!=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)
|
|
// [77] gfx_init_plane_charset8::cr#1 = ++ gfx_init_plane_charset8::cr#6 -- vbuz1=_inc_vbuz1
|
|
inc.z cr
|
|
// [78] if(gfx_init_plane_charset8::cr#1!=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)
|
|
// [79] gfx_init_plane_charset8::ch#1 = ++ gfx_init_plane_charset8::ch#8 -- vbuz1=_inc_vbuz1
|
|
inc.z ch
|
|
// [80] if(gfx_init_plane_charset8::ch#1!=0) goto gfx_init_plane_charset8::@1 -- vbuz1_neq_0_then_la1
|
|
lda.z ch
|
|
bne __b1
|
|
// gfx_init_plane_charset8::@8
|
|
// *PROCPORT = PROCPORT_RAM_IO
|
|
// [81] *PROCPORT = PROCPORT_RAM_IO -- _deref_pbuc1=vbuc2
|
|
lda #PROCPORT_RAM_IO
|
|
sta.z PROCPORT
|
|
// dtvSetCpuBankSegment1((byte)($4000/$4000))
|
|
// [82] call dtvSetCpuBankSegment1
|
|
// Reset CPU BANK segment to $4000
|
|
// [84] phi from gfx_init_plane_charset8::@8 to dtvSetCpuBankSegment1 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1]
|
|
// [84] phi dtvSetCpuBankSegment1::cpuBankIdx#2 = (char)$4000/$4000 [phi:gfx_init_plane_charset8::@8->dtvSetCpuBankSegment1#0] -- vbuaa=vbuc1
|
|
lda #$4000/$4000
|
|
jsr dtvSetCpuBankSegment1
|
|
// gfx_init_plane_charset8::@return
|
|
// }
|
|
// [83] 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
|
|
// void dtvSetCpuBankSegment1(__register(A) char cpuBankIdx)
|
|
dtvSetCpuBankSegment1: {
|
|
// Move CPU BANK 1 SEGMENT ($4000-$7fff)
|
|
.label cpuBank = $ff
|
|
// *cpuBank = cpuBankIdx
|
|
// [85] *dtvSetCpuBankSegment1::cpuBank = dtvSetCpuBankSegment1::cpuBankIdx#2 -- _deref_pbuc1=vbuaa
|
|
sta.z cpuBank
|
|
// asm
|
|
// asm { .byte$32,$dd lda$ff .byte$32,$00 }
|
|
.byte $32, $dd
|
|
lda.z $ff
|
|
.byte $32, 0
|
|
// dtvSetCpuBankSegment1::@return
|
|
// }
|
|
// [87] return
|
|
rts
|
|
}
|
|
// File Data
|
|
|