mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-06-03 07:29:37 +00:00
565 lines
31 KiB
INI
565 lines
31 KiB
INI
|
|
void __start()
|
|
__start: scope:[__start] from
|
|
[0] phi()
|
|
to:__start::__init1
|
|
__start::__init1: scope:[__start] from __start
|
|
[1] phi()
|
|
[2] call malloc
|
|
to:__start::@2
|
|
__start::@2: scope:[__start] from __start::__init1
|
|
[3] SCREEN_COPY#0 = (void*)malloc::mem#0
|
|
[4] call malloc
|
|
to:__start::@3
|
|
__start::@3: scope:[__start] from __start::@2
|
|
[5] SCREEN_DIST#0 = (void*)malloc::mem#0
|
|
to:__start::@1
|
|
__start::@1: scope:[__start] from __start::@3
|
|
[6] phi()
|
|
[7] call main
|
|
to:__start::@return
|
|
__start::@return: scope:[__start] from __start::@1
|
|
[8] return
|
|
to:@return
|
|
|
|
__interrupt(hardware_clobber) void irqBottom()
|
|
irqBottom: scope:[irqBottom] from
|
|
[9] phi()
|
|
to:irqBottom::@1
|
|
irqBottom::@1: scope:[irqBottom] from irqBottom
|
|
[10] phi()
|
|
[11] call processChars
|
|
to:irqBottom::@2
|
|
irqBottom::@2: scope:[irqBottom] from irqBottom::@1
|
|
[12] *RASTER = RASTER_IRQ_TOP
|
|
[13] *HARDWARE_IRQ = &irqTop
|
|
[14] *IRQ_STATUS = IRQ_RASTER
|
|
to:irqBottom::@return
|
|
irqBottom::@return: scope:[irqBottom] from irqBottom::@2
|
|
[15] return
|
|
to:@return
|
|
|
|
__interrupt(hardware_clobber) void irqTop()
|
|
irqTop: scope:[irqTop] from
|
|
[16] phi()
|
|
to:irqTop::@1
|
|
irqTop::@1: scope:[irqTop] from irqTop
|
|
[17] *RASTER = RASTER_IRQ_MIDDLE
|
|
[18] *HARDWARE_IRQ = &irqBottom
|
|
[19] *IRQ_STATUS = IRQ_RASTER
|
|
to:irqTop::@return
|
|
irqTop::@return: scope:[irqTop] from irqTop::@1
|
|
[20] return
|
|
to:@return
|
|
|
|
void* malloc(word malloc::size)
|
|
malloc: scope:[malloc] from __start::@2 __start::__init1
|
|
[21] heap_head#6 = phi( __start::@2/heap_head#0, __start::__init1/HEAP_TOP )
|
|
[22] malloc::mem#0 = heap_head#6 - $3e8
|
|
[23] heap_head#0 = malloc::mem#0
|
|
to:malloc::@return
|
|
malloc::@return: scope:[malloc] from malloc
|
|
[24] return
|
|
to:@return
|
|
|
|
void main()
|
|
main: scope:[main] from __start::@1
|
|
[25] init_angle_screen::screen#0 = (byte*)SCREEN_DIST#0
|
|
[26] call init_angle_screen
|
|
to:main::@9
|
|
main::@9: scope:[main] from main
|
|
[27] main::dst#0 = (byte*)SCREEN_COPY#0
|
|
to:main::@1
|
|
main::@1: scope:[main] from main::@2 main::@9
|
|
[28] main::dst#2 = phi( main::@9/main::dst#0, main::@2/main::dst#1 )
|
|
[28] main::src#2 = phi( main::@9/SCREEN, main::@2/main::src#1 )
|
|
[29] if(main::src#2!=SCREEN+$3e8) goto main::@2
|
|
to:main::@3
|
|
main::@3: scope:[main] from main::@1 main::@3
|
|
[30] main::i#2 = phi( main::@1/0, main::@3/main::i#1 )
|
|
[31] main::$11 = main::i#2 << 1
|
|
[32] main::$12 = main::$11 + main::i#2
|
|
[33] main::$13 = main::$12 << 1
|
|
[34] main::$14 = main::$13 + main::i#2
|
|
[35] main::$10 = main::$14 << 1
|
|
[36] PROCESSING[main::$10] = memcpy(*(&$0), struct ProcessingSprite, SIZEOF_STRUCT_PROCESSINGSPRITE)
|
|
[37] main::i#1 = ++ main::i#2
|
|
[38] if(main::i#1!=NUM_PROCESSING-1+1) goto main::@3
|
|
to:main::@4
|
|
main::@4: scope:[main] from main::@3
|
|
[39] phi()
|
|
[40] call initSprites
|
|
to:main::@10
|
|
main::@10: scope:[main] from main::@4
|
|
[41] phi()
|
|
[42] call setupRasterIrq
|
|
to:main::@5
|
|
main::@5: scope:[main] from main::@10 main::@6
|
|
[43] phi()
|
|
[44] call getCharToProcess
|
|
[45] getCharToProcess::return_x#0 = getCharToProcess::return_x#1
|
|
[46] getCharToProcess::return_y#0 = getCharToProcess::return_y#1
|
|
[47] getCharToProcess::return_dist#0 = getCharToProcess::return_dist#1
|
|
to:main::@11
|
|
main::@11: scope:[main] from main::@5
|
|
[48] main::center_x#0 = getCharToProcess::return_x#0
|
|
[49] main::center_y#0 = getCharToProcess::return_y#0
|
|
[50] main::center_dist#0 = getCharToProcess::return_dist#0
|
|
[51] if(main::center_dist#0!=NOT_FOUND) goto main::@6
|
|
to:main::@7
|
|
main::@7: scope:[main] from main::@11
|
|
[52] *(SCREEN+$3e7) = '.'
|
|
to:main::@8
|
|
main::@8: scope:[main] from main::@7 main::@8
|
|
[53] *(COLS+$3e7) = ++ *(COLS+$3e7)
|
|
to:main::@8
|
|
main::@6: scope:[main] from main::@11
|
|
[54] startProcessing::center_x#0 = main::center_x#0
|
|
[55] startProcessing::center_y#0 = main::center_y#0
|
|
[56] call startProcessing
|
|
to:main::@5
|
|
main::@2: scope:[main] from main::@1
|
|
[57] *main::dst#2 = *main::src#2
|
|
[58] main::src#1 = ++ main::src#2
|
|
[59] main::dst#1 = ++ main::dst#2
|
|
to:main::@1
|
|
|
|
void processChars()
|
|
processChars: scope:[processChars] from irqBottom::@1
|
|
[60] phi()
|
|
to:processChars::@1
|
|
processChars::@1: scope:[processChars] from processChars processChars::@2
|
|
[61] processChars::numActive#10 = phi( processChars/0, processChars::@2/processChars::numActive#3 )
|
|
[61] processChars::i#10 = phi( processChars/0, processChars::@2/processChars::i#1 )
|
|
[62] processChars::$13 = processChars::i#10 << 1
|
|
[63] processChars::$87 = processChars::$13 + processChars::i#10
|
|
[64] processChars::$88 = processChars::$87 << 1
|
|
[65] processChars::$89 = processChars::$88 + processChars::i#10
|
|
[66] processChars::$28 = processChars::$89 << 1
|
|
[67] processChars::processing#0 = PROCESSING + processChars::$28
|
|
[68] processChars::bitmask#0 = 1 << ((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_ID]
|
|
[69] if(((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_STATUS]==STATUS_FREE) goto processChars::@2
|
|
to:processChars::@10
|
|
processChars::@10: scope:[processChars] from processChars::@1
|
|
[70] if(((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_STATUS]!=STATUS_NEW) goto processChars::@3
|
|
to:processChars::@11
|
|
processChars::@11: scope:[processChars] from processChars::@10
|
|
[71] *(((byte**)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR]) = ' '
|
|
[72] *SPRITES_ENABLE = *SPRITES_ENABLE | processChars::bitmask#0
|
|
[73] SPRITES_COLOR[((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_ID]] = ((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_COL]
|
|
[74] (SCREEN+OFFSET_SPRITE_PTRS)[((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_ID]] = ((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_PTR]
|
|
[75] ((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_STATUS] = STATUS_PROCESSING
|
|
to:processChars::@3
|
|
processChars::@3: scope:[processChars] from processChars::@10 processChars::@11
|
|
[76] processChars::xpos#0 = *((word*)processChars::processing#0) >> 4
|
|
[77] processChars::$9 = > processChars::xpos#0
|
|
[78] if(0!=processChars::$9) goto processChars::@4
|
|
to:processChars::@8
|
|
processChars::@8: scope:[processChars] from processChars::@3
|
|
[79] processChars::$10 = $ff ^ processChars::bitmask#0
|
|
[80] *SPRITES_XMSB = *SPRITES_XMSB & processChars::$10
|
|
to:processChars::@5
|
|
processChars::@5: scope:[processChars] from processChars::@4 processChars::@8
|
|
[81] SPRITES_XPOS[processChars::$13] = (byte)processChars::xpos#0
|
|
[82] processChars::$12 = ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_Y] >> 4
|
|
[83] processChars::ypos#0 = (byte)processChars::$12
|
|
[84] SPRITES_YPOS[processChars::$13] = processChars::ypos#0
|
|
[85] if(*((word*)processChars::processing#0)<XPOS_LEFTMOST) goto processChars::@6
|
|
to:processChars::@14
|
|
processChars::@14: scope:[processChars] from processChars::@5
|
|
[86] if(*((word*)processChars::processing#0)>XPOS_RIGHTMOST) goto processChars::@6
|
|
to:processChars::@13
|
|
processChars::@13: scope:[processChars] from processChars::@14
|
|
[87] if(((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_Y]<YPOS_TOPMOST) goto processChars::@6
|
|
to:processChars::@12
|
|
processChars::@12: scope:[processChars] from processChars::@13
|
|
[88] if(((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_Y]>YPOS_BOTTOMMOST) goto processChars::@6
|
|
to:processChars::@9
|
|
processChars::@9: scope:[processChars] from processChars::@12
|
|
[89] processChars::$21 = processChars::xpos#0 >> 3
|
|
[90] processChars::$73 = (byte)processChars::$21
|
|
[91] processChars::xchar#0 = processChars::$73 - BORDER_XPOS_LEFT/8
|
|
[92] processChars::$29 = processChars::xchar#0 << 1
|
|
[93] ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VX] = ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VX] + VXSIN[processChars::$29]
|
|
[94] *((word*)processChars::processing#0) = *((word*)processChars::processing#0) + ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VX]
|
|
[95] processChars::$79 = processChars::ypos#0 >> 3
|
|
[96] processChars::ychar#0 = processChars::$79 - BORDER_YPOS_TOP/8
|
|
[97] processChars::$30 = processChars::ychar#0 << 1
|
|
[98] ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VY] = ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VY] + VYSIN[processChars::$30]
|
|
[99] ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_Y] = ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_Y] + ((word*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_VY]
|
|
to:processChars::@7
|
|
processChars::@7: scope:[processChars] from processChars::@6 processChars::@9
|
|
[100] processChars::numActive#1 = ++ processChars::numActive#10
|
|
to:processChars::@2
|
|
processChars::@2: scope:[processChars] from processChars::@1 processChars::@7
|
|
[101] processChars::numActive#3 = phi( processChars::@1/processChars::numActive#10, processChars::@7/processChars::numActive#1 )
|
|
[102] processChars::i#1 = ++ processChars::i#10
|
|
[103] if(processChars::i#1!=NUM_PROCESSING-1+1) goto processChars::@1
|
|
to:processChars::@return
|
|
processChars::@return: scope:[processChars] from processChars::@2
|
|
[104] return
|
|
to:@return
|
|
processChars::@6: scope:[processChars] from processChars::@12 processChars::@13 processChars::@14 processChars::@5
|
|
[105] ((byte*)processChars::processing#0)[OFFSET_STRUCT_PROCESSINGSPRITE_STATUS] = STATUS_FREE
|
|
[106] processChars::$25 = $ff ^ processChars::bitmask#0
|
|
[107] *SPRITES_ENABLE = *SPRITES_ENABLE & processChars::$25
|
|
to:processChars::@7
|
|
processChars::@4: scope:[processChars] from processChars::@3
|
|
[108] *SPRITES_XMSB = *SPRITES_XMSB | processChars::bitmask#0
|
|
to:processChars::@5
|
|
|
|
void init_angle_screen(byte* init_angle_screen::screen)
|
|
init_angle_screen: scope:[init_angle_screen] from main
|
|
[109] init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0 + (word)$28*$c
|
|
[110] init_angle_screen::screen_topline#7 = init_angle_screen::screen_bottomline#0
|
|
to:init_angle_screen::@1
|
|
init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4
|
|
[111] init_angle_screen::screen_bottomline#6 = phi( init_angle_screen/init_angle_screen::screen_bottomline#0, init_angle_screen::@4/init_angle_screen::screen_bottomline#1 )
|
|
[111] init_angle_screen::screen_topline#6 = phi( init_angle_screen/init_angle_screen::screen_topline#7, init_angle_screen::@4/init_angle_screen::screen_topline#1 )
|
|
[111] init_angle_screen::y#5 = phi( init_angle_screen/0, init_angle_screen::@4/init_angle_screen::y#1 )
|
|
to:init_angle_screen::@2
|
|
init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5
|
|
[112] init_angle_screen::xb#2 = phi( init_angle_screen::@1/$27, init_angle_screen::@5/init_angle_screen::xb#1 )
|
|
[112] init_angle_screen::x#2 = phi( init_angle_screen::@1/0, init_angle_screen::@5/init_angle_screen::x#1 )
|
|
[113] if(init_angle_screen::x#2<$13+1) goto init_angle_screen::@3
|
|
to:init_angle_screen::@4
|
|
init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2
|
|
[114] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28
|
|
[115] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28
|
|
[116] init_angle_screen::y#1 = ++ init_angle_screen::y#5
|
|
[117] if(init_angle_screen::y#1!=$d) goto init_angle_screen::@1
|
|
to:init_angle_screen::@return
|
|
init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4
|
|
[118] return
|
|
to:@return
|
|
init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2
|
|
[119] init_angle_screen::$3 = init_angle_screen::x#2 << 1
|
|
[120] init_angle_screen::$4 = $27 - init_angle_screen::$3
|
|
[121] init_angle_screen::xw#0 = init_angle_screen::$4 w= 0
|
|
[122] init_angle_screen::$5 = init_angle_screen::y#5 << 1
|
|
[123] init_angle_screen::yw#0 = init_angle_screen::$5 w= 0
|
|
[124] atan2_16::x#0 = (signed word)init_angle_screen::xw#0
|
|
[125] atan2_16::y#0 = (signed word)init_angle_screen::yw#0
|
|
[126] call atan2_16
|
|
[127] atan2_16::return#2 = atan2_16::return#0
|
|
to:init_angle_screen::@5
|
|
init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3
|
|
[128] init_angle_screen::angle_w#0 = atan2_16::return#2
|
|
[129] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80
|
|
[130] init_angle_screen::ang_w#0 = > init_angle_screen::$7
|
|
[131] init_angle_screen::screen_bottomline#6[init_angle_screen::xb#2] = init_angle_screen::ang_w#0
|
|
[132] init_angle_screen::$9 = - init_angle_screen::ang_w#0
|
|
[133] init_angle_screen::screen_topline#6[init_angle_screen::xb#2] = init_angle_screen::$9
|
|
[134] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0
|
|
[135] init_angle_screen::screen_topline#6[init_angle_screen::x#2] = init_angle_screen::$10
|
|
[136] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0
|
|
[137] init_angle_screen::screen_bottomline#6[init_angle_screen::x#2] = init_angle_screen::$11
|
|
[138] init_angle_screen::x#1 = ++ init_angle_screen::x#2
|
|
[139] init_angle_screen::xb#1 = -- init_angle_screen::xb#2
|
|
to:init_angle_screen::@2
|
|
|
|
void initSprites()
|
|
initSprites: scope:[initSprites] from main::@4
|
|
[140] phi()
|
|
to:initSprites::@1
|
|
initSprites::@1: scope:[initSprites] from initSprites initSprites::@2
|
|
[141] initSprites::sp#2 = phi( initSprites/SPRITE_DATA, initSprites::@2/initSprites::sp#1 )
|
|
[142] if(initSprites::sp#2<SPRITE_DATA+NUM_PROCESSING*$40) goto initSprites::@2
|
|
to:initSprites::@3
|
|
initSprites::@3: scope:[initSprites] from initSprites::@1 initSprites::@3
|
|
[143] initSprites::i#2 = phi( initSprites::@1/0, initSprites::@3/initSprites::i#1 )
|
|
[144] SPRITES_COLOR[initSprites::i#2] = LIGHT_BLUE
|
|
[145] initSprites::i#1 = ++ initSprites::i#2
|
|
[146] if(initSprites::i#1!=8) goto initSprites::@3
|
|
to:initSprites::@4
|
|
initSprites::@4: scope:[initSprites] from initSprites::@3
|
|
[147] *SPRITES_MC = 0
|
|
[148] *SPRITES_EXPAND_X = 0
|
|
[149] *SPRITES_EXPAND_Y = 0
|
|
to:initSprites::@return
|
|
initSprites::@return: scope:[initSprites] from initSprites::@4
|
|
[150] return
|
|
to:@return
|
|
initSprites::@2: scope:[initSprites] from initSprites::@1
|
|
[151] *initSprites::sp#2 = 0
|
|
[152] initSprites::sp#1 = ++ initSprites::sp#2
|
|
to:initSprites::@1
|
|
|
|
void setupRasterIrq(word setupRasterIrq::raster , void()* setupRasterIrq::irqRoutine)
|
|
setupRasterIrq: scope:[setupRasterIrq] from main::@10
|
|
asm { sei }
|
|
[154] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
|
[155] *PROCPORT = PROCPORT_RAM_IO
|
|
[156] *((byte*)CIA1+OFFSET_STRUCT_MOS6526_CIA_INTERRUPT) = CIA_INTERRUPT_CLEAR
|
|
to:setupRasterIrq::@1
|
|
setupRasterIrq::@1: scope:[setupRasterIrq] from setupRasterIrq
|
|
[157] *VICII_CONTROL = *VICII_CONTROL & $7f
|
|
to:setupRasterIrq::@2
|
|
setupRasterIrq::@2: scope:[setupRasterIrq] from setupRasterIrq::@1
|
|
[158] *RASTER = <RASTER_IRQ_TOP
|
|
[159] *IRQ_ENABLE = IRQ_RASTER
|
|
[160] *HARDWARE_IRQ = setupRasterIrq::irqRoutine#0
|
|
asm { cli }
|
|
to:setupRasterIrq::@return
|
|
setupRasterIrq::@return: scope:[setupRasterIrq] from setupRasterIrq::@2
|
|
[162] return
|
|
to:@return
|
|
|
|
struct ProcessingChar getCharToProcess()
|
|
getCharToProcess: scope:[getCharToProcess] from main::@5
|
|
[163] getCharToProcess::screen_line#0 = (byte*)SCREEN_COPY#0
|
|
[164] getCharToProcess::dist_line#0 = (byte*)SCREEN_DIST#0
|
|
to:getCharToProcess::@1
|
|
getCharToProcess::@1: scope:[getCharToProcess] from getCharToProcess getCharToProcess::@9
|
|
[165] getCharToProcess::closest_y#9 = phi( getCharToProcess/0, getCharToProcess::@9/getCharToProcess::return_y#1 )
|
|
[165] getCharToProcess::closest_x#9 = phi( getCharToProcess/0, getCharToProcess::@9/getCharToProcess::return_x#1 )
|
|
[165] getCharToProcess::y#7 = phi( getCharToProcess/0, getCharToProcess::@9/getCharToProcess::y#1 )
|
|
[165] getCharToProcess::closest_dist#8 = phi( getCharToProcess/NOT_FOUND, getCharToProcess::@9/getCharToProcess::closest_dist#10 )
|
|
[165] getCharToProcess::dist_line#6 = phi( getCharToProcess/getCharToProcess::dist_line#0, getCharToProcess::@9/getCharToProcess::dist_line#1 )
|
|
[165] getCharToProcess::screen_line#4 = phi( getCharToProcess/getCharToProcess::screen_line#0, getCharToProcess::@9/getCharToProcess::screen_line#1 )
|
|
to:getCharToProcess::@2
|
|
getCharToProcess::@2: scope:[getCharToProcess] from getCharToProcess::@1 getCharToProcess::@10
|
|
[166] getCharToProcess::closest_y#7 = phi( getCharToProcess::@1/getCharToProcess::closest_y#9, getCharToProcess::@10/getCharToProcess::return_y#1 )
|
|
[166] getCharToProcess::closest_x#7 = phi( getCharToProcess::@1/getCharToProcess::closest_x#9, getCharToProcess::@10/getCharToProcess::return_x#1 )
|
|
[166] getCharToProcess::closest_dist#2 = phi( getCharToProcess::@1/getCharToProcess::closest_dist#8, getCharToProcess::@10/getCharToProcess::closest_dist#12 )
|
|
[166] getCharToProcess::x#2 = phi( getCharToProcess::@1/0, getCharToProcess::@10/getCharToProcess::x#1 )
|
|
[167] if(getCharToProcess::screen_line#4[getCharToProcess::x#2]==' ') goto getCharToProcess::@11
|
|
to:getCharToProcess::@4
|
|
getCharToProcess::@4: scope:[getCharToProcess] from getCharToProcess::@2
|
|
[168] getCharToProcess::dist#0 = getCharToProcess::dist_line#6[getCharToProcess::x#2]
|
|
[169] if(getCharToProcess::dist#0>=getCharToProcess::closest_dist#2) goto getCharToProcess::@12
|
|
to:getCharToProcess::@5
|
|
getCharToProcess::@5: scope:[getCharToProcess] from getCharToProcess::@4
|
|
[170] getCharToProcess::return_x#7 = getCharToProcess::x#2
|
|
[171] getCharToProcess::return_y#7 = getCharToProcess::y#7
|
|
to:getCharToProcess::@3
|
|
getCharToProcess::@3: scope:[getCharToProcess] from getCharToProcess::@11 getCharToProcess::@12 getCharToProcess::@5
|
|
[172] getCharToProcess::return_y#1 = phi( getCharToProcess::@11/getCharToProcess::closest_y#7, getCharToProcess::@12/getCharToProcess::closest_y#7, getCharToProcess::@5/getCharToProcess::return_y#7 )
|
|
[172] getCharToProcess::return_x#1 = phi( getCharToProcess::@11/getCharToProcess::closest_x#7, getCharToProcess::@12/getCharToProcess::closest_x#7, getCharToProcess::@5/getCharToProcess::return_x#7 )
|
|
[172] getCharToProcess::return_dist#1 = phi( getCharToProcess::@11/getCharToProcess::return_dist#5, getCharToProcess::@12/getCharToProcess::return_dist#6, getCharToProcess::@5/getCharToProcess::dist#0 )
|
|
[173] getCharToProcess::x#1 = ++ getCharToProcess::x#2
|
|
[174] if(getCharToProcess::x#1!=$28) goto getCharToProcess::@10
|
|
to:getCharToProcess::@6
|
|
getCharToProcess::@6: scope:[getCharToProcess] from getCharToProcess::@3
|
|
[175] getCharToProcess::screen_line#1 = getCharToProcess::screen_line#4 + $28
|
|
[176] getCharToProcess::dist_line#1 = getCharToProcess::dist_line#6 + $28
|
|
[177] getCharToProcess::y#1 = ++ getCharToProcess::y#7
|
|
[178] if(getCharToProcess::y#1!=$19) goto getCharToProcess::@9
|
|
to:getCharToProcess::@7
|
|
getCharToProcess::@7: scope:[getCharToProcess] from getCharToProcess::@6
|
|
[179] if(getCharToProcess::return_dist#1==NOT_FOUND) goto getCharToProcess::@return
|
|
to:getCharToProcess::@8
|
|
getCharToProcess::@8: scope:[getCharToProcess] from getCharToProcess::@7
|
|
[180] getCharToProcess::$11 = (word)getCharToProcess::return_y#1
|
|
[181] getCharToProcess::$12 = getCharToProcess::$11 << 2
|
|
[182] getCharToProcess::$13 = getCharToProcess::$12 + getCharToProcess::$11
|
|
[183] getCharToProcess::$8 = getCharToProcess::$13 << 3
|
|
[184] getCharToProcess::$9 = (byte*)SCREEN_COPY#0 + getCharToProcess::$8
|
|
[185] getCharToProcess::$9[getCharToProcess::return_x#1] = ' '
|
|
to:getCharToProcess::@return
|
|
getCharToProcess::@return: scope:[getCharToProcess] from getCharToProcess::@7 getCharToProcess::@8
|
|
[186] return
|
|
to:@return
|
|
getCharToProcess::@9: scope:[getCharToProcess] from getCharToProcess::@6
|
|
[187] getCharToProcess::closest_dist#10 = getCharToProcess::return_dist#1
|
|
to:getCharToProcess::@1
|
|
getCharToProcess::@10: scope:[getCharToProcess] from getCharToProcess::@3
|
|
[188] getCharToProcess::closest_dist#12 = getCharToProcess::return_dist#1
|
|
to:getCharToProcess::@2
|
|
getCharToProcess::@12: scope:[getCharToProcess] from getCharToProcess::@4
|
|
[189] getCharToProcess::return_dist#6 = getCharToProcess::closest_dist#2
|
|
to:getCharToProcess::@3
|
|
getCharToProcess::@11: scope:[getCharToProcess] from getCharToProcess::@2
|
|
[190] getCharToProcess::return_dist#5 = getCharToProcess::closest_dist#2
|
|
to:getCharToProcess::@3
|
|
|
|
void startProcessing(byte startProcessing::center_x , byte startProcessing::center_y , byte startProcessing::center_dist)
|
|
startProcessing: scope:[startProcessing] from main::@6
|
|
[191] phi()
|
|
to:startProcessing::@1
|
|
startProcessing::@1: scope:[startProcessing] from startProcessing startProcessing::@8
|
|
[192] startProcessing::freeIdx#6 = phi( startProcessing/$ff, startProcessing::@8/startProcessing::freeIdx#7 )
|
|
to:startProcessing::@2
|
|
startProcessing::@2: scope:[startProcessing] from startProcessing::@1 startProcessing::@3
|
|
[193] startProcessing::i#2 = phi( startProcessing::@1/0, startProcessing::@3/startProcessing::i#1 )
|
|
[194] startProcessing::$28 = startProcessing::i#2 << 1
|
|
[195] startProcessing::$29 = startProcessing::$28 + startProcessing::i#2
|
|
[196] startProcessing::$30 = startProcessing::$29 << 1
|
|
[197] startProcessing::$31 = startProcessing::$30 + startProcessing::i#2
|
|
[198] startProcessing::$21 = startProcessing::$31 << 1
|
|
[199] if(((byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)[startProcessing::$21]!=STATUS_FREE) goto startProcessing::@3
|
|
to:startProcessing::@4
|
|
startProcessing::@4: scope:[startProcessing] from startProcessing::@2 startProcessing::@9
|
|
[200] startProcessing::freeIdx#2 = phi( startProcessing::@9/startProcessing::freeIdx#8, startProcessing::@2/startProcessing::i#2 )
|
|
[201] if(startProcessing::freeIdx#2==$ff) goto startProcessing::@8
|
|
to:startProcessing::@5
|
|
startProcessing::@5: scope:[startProcessing] from startProcessing::@4
|
|
[202] startProcessing::$23 = (word)startProcessing::center_y#0
|
|
[203] startProcessing::$33 = startProcessing::$23 << 2
|
|
[204] startProcessing::$34 = startProcessing::$33 + startProcessing::$23
|
|
[205] startProcessing::$0 = startProcessing::$34 << 3
|
|
[206] startProcessing::offset#0 = startProcessing::$0 + startProcessing::center_x#0
|
|
[207] startProcessing::colPtr#0 = COLS + startProcessing::offset#0
|
|
[208] startProcessing::spriteCol#0 = *startProcessing::colPtr#0
|
|
[209] startProcessing::screenPtr#0 = SCREEN + startProcessing::offset#0
|
|
[210] startProcessing::$24 = (word)startProcessing::freeIdx#2
|
|
[211] startProcessing::$4 = startProcessing::$24 << 6
|
|
[212] startProcessing::spriteData#0 = SPRITE_DATA + startProcessing::$4
|
|
[213] startProcessing::ch#0 = *startProcessing::screenPtr#0
|
|
[214] startProcessing::$25 = (word)startProcessing::ch#0
|
|
[215] startProcessing::$6 = startProcessing::$25 << 3
|
|
[216] startProcessing::chargenData#0 = CHARGEN + startProcessing::$6
|
|
asm { sei }
|
|
[218] *PROCPORT = PROCPORT_RAM_CHARROM
|
|
to:startProcessing::@6
|
|
startProcessing::@6: scope:[startProcessing] from startProcessing::@5 startProcessing::@6
|
|
[219] startProcessing::i1#2 = phi( startProcessing::@5/0, startProcessing::@6/startProcessing::i1#1 )
|
|
[219] startProcessing::spriteData#2 = phi( startProcessing::@5/startProcessing::spriteData#0, startProcessing::@6/startProcessing::spriteData#1 )
|
|
[219] startProcessing::chargenData#2 = phi( startProcessing::@5/startProcessing::chargenData#0, startProcessing::@6/startProcessing::chargenData#1 )
|
|
[220] *startProcessing::spriteData#2 = *startProcessing::chargenData#2
|
|
[221] startProcessing::spriteData#1 = startProcessing::spriteData#2 + 3
|
|
[222] startProcessing::chargenData#1 = ++ startProcessing::chargenData#2
|
|
[223] startProcessing::i1#1 = ++ startProcessing::i1#2
|
|
[224] if(startProcessing::i1#1!=8) goto startProcessing::@6
|
|
to:startProcessing::@7
|
|
startProcessing::@7: scope:[startProcessing] from startProcessing::@6
|
|
[225] *PROCPORT = PROCPORT_RAM_IO
|
|
asm { cli }
|
|
[227] startProcessing::$26 = (word)startProcessing::center_x#0
|
|
[228] startProcessing::$8 = startProcessing::$26 << 3
|
|
[229] startProcessing::$9 = BORDER_XPOS_LEFT + startProcessing::$8
|
|
[230] startProcessing::spriteX#0 = startProcessing::$9 << 4
|
|
[231] startProcessing::$27 = (word)startProcessing::center_y#0
|
|
[232] startProcessing::$11 = startProcessing::$27 << 3
|
|
[233] startProcessing::$12 = BORDER_YPOS_TOP + startProcessing::$11
|
|
[234] startProcessing::spriteY#0 = startProcessing::$12 << 4
|
|
[235] startProcessing::spritePtr#0 = (byte)SPRITE_DATA/$40 + startProcessing::freeIdx#2
|
|
[236] startProcessing::$15 = startProcessing::freeIdx#2 << 3
|
|
[237] startProcessing::$36 = startProcessing::freeIdx#2 << 1
|
|
[238] startProcessing::$37 = startProcessing::$36 + startProcessing::freeIdx#2
|
|
[239] startProcessing::$38 = startProcessing::$37 << 1
|
|
[240] startProcessing::$39 = startProcessing::$38 + startProcessing::freeIdx#2
|
|
[241] startProcessing::$22 = startProcessing::$39 << 1
|
|
[242] ((word*)PROCESSING)[startProcessing::$22] = startProcessing::spriteX#0
|
|
[243] ((word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_Y)[startProcessing::$22] = startProcessing::spriteY#0
|
|
[244] ((word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VX)[startProcessing::$22] = (word)startProcessing::$15
|
|
[245] ((word*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_VY)[startProcessing::$22] = $3c
|
|
[246] ((byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_ID)[startProcessing::$22] = startProcessing::freeIdx#2
|
|
[247] ((byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_PTR)[startProcessing::$22] = startProcessing::spritePtr#0
|
|
[248] ((byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_COL)[startProcessing::$22] = startProcessing::spriteCol#0
|
|
[249] ((byte*)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_STATUS)[startProcessing::$22] = STATUS_NEW
|
|
[250] ((byte**)PROCESSING+OFFSET_STRUCT_PROCESSINGSPRITE_SCREENPTR)[startProcessing::$22] = startProcessing::screenPtr#0
|
|
to:startProcessing::@return
|
|
startProcessing::@return: scope:[startProcessing] from startProcessing::@7
|
|
[251] return
|
|
to:@return
|
|
startProcessing::@8: scope:[startProcessing] from startProcessing::@4
|
|
[252] startProcessing::freeIdx#7 = startProcessing::freeIdx#2
|
|
to:startProcessing::@1
|
|
startProcessing::@3: scope:[startProcessing] from startProcessing::@2
|
|
[253] startProcessing::i#1 = ++ startProcessing::i#2
|
|
[254] if(startProcessing::i#1!=NUM_PROCESSING-1+1) goto startProcessing::@2
|
|
to:startProcessing::@9
|
|
startProcessing::@9: scope:[startProcessing] from startProcessing::@3
|
|
[255] startProcessing::freeIdx#8 = startProcessing::freeIdx#6
|
|
to:startProcessing::@4
|
|
|
|
word atan2_16(signed word atan2_16::x , signed word atan2_16::y)
|
|
atan2_16: scope:[atan2_16] from init_angle_screen::@3
|
|
[256] if(atan2_16::y#0>=0) goto atan2_16::@1
|
|
to:atan2_16::@2
|
|
atan2_16::@2: scope:[atan2_16] from atan2_16
|
|
[257] atan2_16::$2 = - atan2_16::y#0
|
|
to:atan2_16::@3
|
|
atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2
|
|
[258] atan2_16::yi#0 = phi( atan2_16::@1/atan2_16::yi#16, atan2_16::@2/atan2_16::$2 )
|
|
[259] if(atan2_16::x#0>=0) goto atan2_16::@4
|
|
to:atan2_16::@5
|
|
atan2_16::@5: scope:[atan2_16] from atan2_16::@3
|
|
[260] atan2_16::$7 = - atan2_16::x#0
|
|
to:atan2_16::@6
|
|
atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5
|
|
[261] atan2_16::xi#0 = phi( atan2_16::@4/atan2_16::xi#13, atan2_16::@5/atan2_16::$7 )
|
|
to:atan2_16::@10
|
|
atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6
|
|
[262] atan2_16::angle#12 = phi( atan2_16::@19/atan2_16::angle#13, atan2_16::@6/0 )
|
|
[262] atan2_16::i#2 = phi( atan2_16::@19/atan2_16::i#1, atan2_16::@6/0 )
|
|
[262] atan2_16::xi#3 = phi( atan2_16::@19/atan2_16::xi#8, atan2_16::@6/atan2_16::xi#0 )
|
|
[262] atan2_16::yi#3 = phi( atan2_16::@19/atan2_16::yi#8, atan2_16::@6/atan2_16::yi#0 )
|
|
[263] if(atan2_16::yi#3!=0) goto atan2_16::@11
|
|
to:atan2_16::@12
|
|
atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19
|
|
[264] atan2_16::angle#6 = phi( atan2_16::@10/atan2_16::angle#12, atan2_16::@19/atan2_16::angle#13 )
|
|
[265] atan2_16::angle#1 = atan2_16::angle#6 >> 1
|
|
[266] if(atan2_16::x#0>=0) goto atan2_16::@7
|
|
to:atan2_16::@21
|
|
atan2_16::@21: scope:[atan2_16] from atan2_16::@12
|
|
[267] atan2_16::angle#4 = $8000 - atan2_16::angle#1
|
|
to:atan2_16::@7
|
|
atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21
|
|
[268] atan2_16::angle#11 = phi( atan2_16::@12/atan2_16::angle#1, atan2_16::@21/atan2_16::angle#4 )
|
|
[269] if(atan2_16::y#0>=0) goto atan2_16::@8
|
|
to:atan2_16::@9
|
|
atan2_16::@9: scope:[atan2_16] from atan2_16::@7
|
|
[270] atan2_16::angle#5 = - atan2_16::angle#11
|
|
to:atan2_16::@8
|
|
atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9
|
|
[271] atan2_16::return#0 = phi( atan2_16::@7/atan2_16::angle#11, atan2_16::@9/atan2_16::angle#5 )
|
|
to:atan2_16::@return
|
|
atan2_16::@return: scope:[atan2_16] from atan2_16::@8
|
|
[272] return
|
|
to:@return
|
|
atan2_16::@11: scope:[atan2_16] from atan2_16::@10
|
|
[273] atan2_16::shift#5 = atan2_16::i#2
|
|
[274] atan2_16::xd#10 = atan2_16::xi#3
|
|
[275] atan2_16::yd#10 = atan2_16::yi#3
|
|
to:atan2_16::@13
|
|
atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14
|
|
[276] atan2_16::yd#3 = phi( atan2_16::@11/atan2_16::yd#10, atan2_16::@14/atan2_16::yd#1 )
|
|
[276] atan2_16::xd#3 = phi( atan2_16::@11/atan2_16::xd#10, atan2_16::@14/atan2_16::xd#1 )
|
|
[276] atan2_16::shift#2 = phi( atan2_16::@11/atan2_16::shift#5, atan2_16::@14/atan2_16::shift#1 )
|
|
[277] if(atan2_16::shift#2>=2) goto atan2_16::@14
|
|
to:atan2_16::@15
|
|
atan2_16::@15: scope:[atan2_16] from atan2_16::@13
|
|
[278] if(0==atan2_16::shift#2) goto atan2_16::@17
|
|
to:atan2_16::@16
|
|
atan2_16::@16: scope:[atan2_16] from atan2_16::@15
|
|
[279] atan2_16::xd#2 = atan2_16::xd#3 >> 1
|
|
[280] atan2_16::yd#2 = atan2_16::yd#3 >> 1
|
|
to:atan2_16::@17
|
|
atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16
|
|
[281] atan2_16::xd#5 = phi( atan2_16::@15/atan2_16::xd#3, atan2_16::@16/atan2_16::xd#2 )
|
|
[281] atan2_16::yd#5 = phi( atan2_16::@15/atan2_16::yd#3, atan2_16::@16/atan2_16::yd#2 )
|
|
[282] if(atan2_16::yi#3>=0) goto atan2_16::@18
|
|
to:atan2_16::@20
|
|
atan2_16::@20: scope:[atan2_16] from atan2_16::@17
|
|
[283] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5
|
|
[284] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5
|
|
[285] atan2_16::$23 = atan2_16::i#2 << 1
|
|
[286] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23]
|
|
to:atan2_16::@19
|
|
atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20
|
|
[287] atan2_16::xi#8 = phi( atan2_16::@18/atan2_16::xi#1, atan2_16::@20/atan2_16::xi#2 )
|
|
[287] atan2_16::angle#13 = phi( atan2_16::@18/atan2_16::angle#2, atan2_16::@20/atan2_16::angle#3 )
|
|
[287] atan2_16::yi#8 = phi( atan2_16::@18/atan2_16::yi#1, atan2_16::@20/atan2_16::yi#2 )
|
|
[288] atan2_16::i#1 = ++ atan2_16::i#2
|
|
[289] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12
|
|
to:atan2_16::@10
|
|
atan2_16::@18: scope:[atan2_16] from atan2_16::@17
|
|
[290] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5
|
|
[291] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5
|
|
[292] atan2_16::$22 = atan2_16::i#2 << 1
|
|
[293] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22]
|
|
to:atan2_16::@19
|
|
atan2_16::@14: scope:[atan2_16] from atan2_16::@13
|
|
[294] atan2_16::xd#1 = atan2_16::xd#3 >> 2
|
|
[295] atan2_16::yd#1 = atan2_16::yd#3 >> 2
|
|
[296] atan2_16::shift#1 = atan2_16::shift#2 - 2
|
|
to:atan2_16::@13
|
|
atan2_16::@4: scope:[atan2_16] from atan2_16::@3
|
|
[297] atan2_16::xi#13 = atan2_16::x#0
|
|
to:atan2_16::@6
|
|
atan2_16::@1: scope:[atan2_16] from atan2_16
|
|
[298] atan2_16::yi#16 = atan2_16::y#0
|
|
to:atan2_16::@3
|