mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-02-20 15:29:10 +00:00
Added 1536 dots.
This commit is contained in:
parent
74c45f000a
commit
700397f67d
@ -682,6 +682,11 @@ public class TestProgramsFast extends TestPrograms {
|
||||
compileAndCompare("examples/cx16/cx16-rasterbars.c");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMega65Camelot1536Dots() throws IOException {
|
||||
compileAndCompare("examples/mega65/camelot-1536dots.c");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMega65BankedMusic() throws IOException {
|
||||
compileAndCompare("examples/mega65/banked-music.c");
|
||||
|
@ -28,11 +28,11 @@ void lpoke(__zp unsigned long addr, char val) {
|
||||
}
|
||||
|
||||
// Address of the screen
|
||||
char * const SCREEN = 0xc800;
|
||||
char * const SCREEN = (char*)0xc800;
|
||||
// // Absolute address of graphics buffer 1
|
||||
char * const GRAPHICS1 = 0xa000;
|
||||
char * const GRAPHICS1 = (char*)0xa000;
|
||||
// // Absolute address of graphics buffer 2
|
||||
char * const GRAPHICS2 = 0x7000;
|
||||
char * const GRAPHICS2 = (char*)0x7000;
|
||||
|
||||
// SID tune at an absolute address
|
||||
__address(0x5000) char MUSIC[] = kickasm(resource "Thaw_5000.sid") {{
|
||||
@ -44,7 +44,7 @@ typedef void (*PROC_PTR)(void);
|
||||
// Pointer to the music init routine
|
||||
PROC_PTR const musicInit = (PROC_PTR) MUSIC;
|
||||
// Pointer to the music play routine
|
||||
PROC_PTR const = (PROC_PTR) MUSIC+3;
|
||||
PROC_PTR const musicPlay = (PROC_PTR) MUSIC+3;
|
||||
|
||||
|
||||
__align(0x40) char SPRITES[0xc0] = kickasm(resource "camelot-sprites.png") {{
|
||||
|
1068
src/test/ref/examples/mega65/camelot-1536dots.asm
Normal file
1068
src/test/ref/examples/mega65/camelot-1536dots.asm
Normal file
File diff suppressed because it is too large
Load Diff
354
src/test/ref/examples/mega65/camelot-1536dots.cfg
Normal file
354
src/test/ref/examples/mega65/camelot-1536dots.cfg
Normal file
@ -0,0 +1,354 @@
|
||||
|
||||
void __start()
|
||||
__start: scope:[__start] from
|
||||
[0] phi()
|
||||
to:__start::__init1
|
||||
__start::__init1: scope:[__start] from __start
|
||||
[1] buffer = 0
|
||||
[2] graphics_render = GRAPHICS1
|
||||
[3] sin_x1_idx = 0
|
||||
[4] sin_x2_idx = 0
|
||||
[5] sin_y1_idx = 0
|
||||
[6] sin_y2_idx = 0
|
||||
to:__start::@1
|
||||
__start::@1: scope:[__start] from __start::__init1
|
||||
[7] phi()
|
||||
[8] call main
|
||||
to:__start::@return
|
||||
__start::@return: scope:[__start] from __start::@1
|
||||
[9] return
|
||||
to:@return
|
||||
|
||||
void main()
|
||||
main: scope:[main] from __start::@1
|
||||
[10] phi()
|
||||
to:main::SEI1
|
||||
main::SEI1: scope:[main] from main
|
||||
asm { sei }
|
||||
to:main::@6
|
||||
main::@6: scope:[main] from main::SEI1
|
||||
[12] phi()
|
||||
[13] call memoryRemap
|
||||
to:main::@10
|
||||
main::@10: scope:[main] from main::@6
|
||||
[14] *PROCPORT_DDR = PROCPORT_DDR_MEMORY_MASK
|
||||
[15] *PROCPORT = PROCPORT_RAM_IO
|
||||
[16] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_KEY) = VICIV_KEY_M65_A
|
||||
[17] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_KEY) = VICIV_KEY_M65_B
|
||||
[18] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLA) = 0
|
||||
[19] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLB) = *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLB) | VICIV_FAST
|
||||
[20] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLC) = *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLC) | VICIV_VFAST
|
||||
[21] call graphics_mode
|
||||
to:main::@11
|
||||
main::@11: scope:[main] from main::@10
|
||||
[22] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_LOLO) = byte0 SPRITE_PTRS
|
||||
[23] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_LOHI) = byte1 SPRITE_PTRS
|
||||
[24] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_HILO) = VICIV_SPRPTR16
|
||||
to:main::toSpritePtr1
|
||||
main::toSpritePtr1: scope:[main] from main::@11
|
||||
[25] phi()
|
||||
to:main::@7
|
||||
main::@7: scope:[main] from main::toSpritePtr1
|
||||
[26] *SPRITE_PTRS = main::toSpritePtr1_return#0
|
||||
to:main::toSpritePtr2
|
||||
main::toSpritePtr2: scope:[main] from main::@7
|
||||
[27] phi()
|
||||
to:main::@8
|
||||
main::@8: scope:[main] from main::toSpritePtr2
|
||||
[28] *(SPRITE_PTRS+1*SIZEOF_UNSIGNED_INT) = main::toSpritePtr2_return#0
|
||||
to:main::toSpritePtr3
|
||||
main::toSpritePtr3: scope:[main] from main::@8
|
||||
[29] phi()
|
||||
to:main::@9
|
||||
main::@9: scope:[main] from main::toSpritePtr3
|
||||
[30] *(SPRITE_PTRS+2*SIZEOF_UNSIGNED_INT) = main::toSpritePtr3_return#0
|
||||
[31] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SPRITES_ENABLE) = 7
|
||||
[32] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SPRITES_PRIORITY) = $ff
|
||||
[33] *SPRITES_COLOR = DARK_GREY
|
||||
[34] *(SPRITES_COLOR+1) = DARK_GREY
|
||||
[35] *(SPRITES_COLOR+2) = DARK_GREY
|
||||
[36] *SPRITES_YPOS = $e3
|
||||
[37] *(SPRITES_YPOS+2) = $e3
|
||||
[38] *(SPRITES_YPOS+4) = $e3
|
||||
[39] *SPRITES_XPOS = $2e
|
||||
[40] *(SPRITES_XPOS+2) = $2e+$18
|
||||
[41] *(SPRITES_XPOS+4) = $19
|
||||
[42] *SPRITES_XMSB = 3
|
||||
[43] call init_plot
|
||||
to:main::@12
|
||||
main::@12: scope:[main] from main::@9
|
||||
asm { lda#0 }
|
||||
[45] callexecute *musicInit
|
||||
to:main::@1
|
||||
main::@1: scope:[main] from main::@1 main::@12 main::@14
|
||||
[46] if(*((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_RASTER)!=$e3) goto main::@1
|
||||
to:main::@2
|
||||
main::@2: scope:[main] from main::@1
|
||||
[47] buffer = buffer ^ 1
|
||||
[48] if(buffer==0) goto main::@4
|
||||
to:main::@3
|
||||
main::@3: scope:[main] from main::@2
|
||||
[49] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO) = 0
|
||||
[50] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOHI) = byte1 GRAPHICS2
|
||||
[51] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_HILO) = 0
|
||||
[52] graphics_render = GRAPHICS1
|
||||
to:main::@5
|
||||
main::@5: scope:[main] from main::@3 main::@4
|
||||
[53] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_BORDER_COLOR) = BLUE
|
||||
[54] memset_dma::dest#0 = (void *)graphics_render
|
||||
[55] call memset_dma
|
||||
to:main::@13
|
||||
main::@13: scope:[main] from main::@5
|
||||
[56] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_BORDER_COLOR) = PURPLE
|
||||
[57] call render_dots
|
||||
to:main::@14
|
||||
main::@14: scope:[main] from main::@13
|
||||
[58] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_BORDER_COLOR) = BLACK
|
||||
[59] callexecute *musicPlay
|
||||
to:main::@1
|
||||
main::@4: scope:[main] from main::@2
|
||||
[60] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO) = 0
|
||||
[61] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOHI) = byte1 GRAPHICS1
|
||||
[62] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_HILO) = 0
|
||||
[63] graphics_render = GRAPHICS2
|
||||
to:main::@5
|
||||
|
||||
void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
|
||||
memoryRemap: scope:[memoryRemap] from main::@6
|
||||
[64] memoryRemap::aVal = 0
|
||||
[65] memoryRemap::xVal = 0
|
||||
[66] memoryRemap::yVal = 0
|
||||
[67] memoryRemap::zVal = 0
|
||||
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
|
||||
to:memoryRemap::@return
|
||||
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
|
||||
[69] return
|
||||
to:@return
|
||||
|
||||
void graphics_mode()
|
||||
graphics_mode: scope:[graphics_mode] from main::@10
|
||||
[70] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLC) = VICIV_CHR16|VICIV_VFAST
|
||||
[71] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CONTROLB) = VICIV_FAST
|
||||
[72] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARSTEP_LO) = $50
|
||||
[73] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARSTEP_HI) = 0
|
||||
[74] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHRCOUNT) = $28
|
||||
[75] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOLO) = 0
|
||||
[76] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOHI) = byte1 SCREEN
|
||||
[77] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_HILO) = 0
|
||||
[78] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO) = 0
|
||||
[79] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOHI) = byte1 GRAPHICS1
|
||||
[80] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_HILO) = 0
|
||||
to:graphics_mode::@1
|
||||
graphics_mode::@1: scope:[graphics_mode] from graphics_mode graphics_mode::@5
|
||||
[81] graphics_mode::screen#5 = phi( graphics_mode/(unsigned int *)SCREEN, graphics_mode::@5/graphics_mode::screen#1 )
|
||||
[81] graphics_mode::ch#2 = phi( graphics_mode/0, graphics_mode::@5/graphics_mode::ch#1 )
|
||||
[81] graphics_mode::y#2 = phi( graphics_mode/0, graphics_mode::@5/graphics_mode::y#1 )
|
||||
[82] if(graphics_mode::y#2<$19) goto graphics_mode::@2
|
||||
to:graphics_mode::@6
|
||||
graphics_mode::@6: scope:[graphics_mode] from graphics_mode::@1 graphics_mode::@10
|
||||
[83] graphics_mode::cols#3 = phi( graphics_mode::@10/graphics_mode::cols#2, graphics_mode::@1/$ff80000 )
|
||||
[83] graphics_mode::i#2 = phi( graphics_mode::@10/graphics_mode::i#1, graphics_mode::@1/0 )
|
||||
[84] if(graphics_mode::i#2<$3e8) goto graphics_mode::@7
|
||||
to:graphics_mode::@8
|
||||
graphics_mode::@8: scope:[graphics_mode] from graphics_mode::@6
|
||||
[85] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_BORDER_COLOR) = 0
|
||||
[86] *((char *)VICIV+OFFSET_STRUCT_MEGA65_VICIV_BG_COLOR) = 0
|
||||
[87] call memset_dma
|
||||
to:graphics_mode::@11
|
||||
graphics_mode::@11: scope:[graphics_mode] from graphics_mode::@8
|
||||
[88] phi()
|
||||
[89] call memset_dma
|
||||
to:graphics_mode::@return
|
||||
graphics_mode::@return: scope:[graphics_mode] from graphics_mode::@11
|
||||
[90] return
|
||||
to:@return
|
||||
graphics_mode::@7: scope:[graphics_mode] from graphics_mode::@6
|
||||
[91] lpoke::addr = graphics_mode::cols#3
|
||||
[92] lpoke::val = 0
|
||||
[93] call lpoke
|
||||
to:graphics_mode::@9
|
||||
graphics_mode::@9: scope:[graphics_mode] from graphics_mode::@7
|
||||
[94] graphics_mode::cols#1 = ++ graphics_mode::cols#3
|
||||
[95] lpoke::addr = graphics_mode::cols#1
|
||||
[96] lpoke::val = WHITE
|
||||
[97] call lpoke
|
||||
to:graphics_mode::@10
|
||||
graphics_mode::@10: scope:[graphics_mode] from graphics_mode::@9
|
||||
[98] graphics_mode::cols#2 = ++ graphics_mode::cols#1
|
||||
[99] graphics_mode::i#1 = ++ graphics_mode::i#2
|
||||
to:graphics_mode::@6
|
||||
graphics_mode::@2: scope:[graphics_mode] from graphics_mode::@1
|
||||
[100] graphics_mode::ch_x#4 = graphics_mode::ch#2
|
||||
to:graphics_mode::@3
|
||||
graphics_mode::@3: scope:[graphics_mode] from graphics_mode::@2 graphics_mode::@4
|
||||
[101] graphics_mode::ch_x#2 = phi( graphics_mode::@2/graphics_mode::ch_x#4, graphics_mode::@4/graphics_mode::ch_x#1 )
|
||||
[101] graphics_mode::x#2 = phi( graphics_mode::@2/0, graphics_mode::@4/graphics_mode::x#1 )
|
||||
[102] if(graphics_mode::x#2<$28) goto graphics_mode::@4
|
||||
to:graphics_mode::@5
|
||||
graphics_mode::@5: scope:[graphics_mode] from graphics_mode::@3
|
||||
[103] graphics_mode::screen#1 = graphics_mode::screen#5 + $28*SIZEOF_UNSIGNED_INT
|
||||
[104] graphics_mode::ch#1 = ++ graphics_mode::ch#2
|
||||
[105] graphics_mode::y#1 = ++ graphics_mode::y#2
|
||||
to:graphics_mode::@1
|
||||
graphics_mode::@4: scope:[graphics_mode] from graphics_mode::@3
|
||||
[106] graphics_mode::$8 = graphics_mode::x#2 << 1
|
||||
[107] graphics_mode::screen#5[graphics_mode::$8] = graphics_mode::ch_x#2
|
||||
[108] graphics_mode::ch_x#1 = graphics_mode::ch_x#2 + $19
|
||||
[109] graphics_mode::x#1 = ++ graphics_mode::x#2
|
||||
to:graphics_mode::@3
|
||||
|
||||
void init_plot()
|
||||
init_plot: scope:[init_plot] from main::@9
|
||||
[110] phi()
|
||||
to:init_plot::@1
|
||||
init_plot::@1: scope:[init_plot] from init_plot init_plot::@3
|
||||
[111] init_plot::gfx#2 = phi( init_plot/0, init_plot::@3/init_plot::gfx#5 )
|
||||
[111] init_plot::i#2 = phi( init_plot/0, init_plot::@3/init_plot::i#1 )
|
||||
[112] if(init_plot::i#2<$140) goto init_plot::@2
|
||||
to:init_plot::@return
|
||||
init_plot::@return: scope:[init_plot] from init_plot::@1
|
||||
[113] return
|
||||
to:@return
|
||||
init_plot::@2: scope:[init_plot] from init_plot::@1
|
||||
[114] init_plot::$4 = init_plot::i#2 << 1
|
||||
[115] init_plot::$5 = GFX_OFFSET + init_plot::$4
|
||||
[116] *init_plot::$5 = init_plot::gfx#2
|
||||
[117] init_plot::$1 = init_plot::i#2 & 7
|
||||
[118] if(init_plot::$1!=7) goto init_plot::@3
|
||||
to:init_plot::@4
|
||||
init_plot::@4: scope:[init_plot] from init_plot::@2
|
||||
[119] init_plot::gfx#1 = init_plot::gfx#2 + $c8
|
||||
to:init_plot::@3
|
||||
init_plot::@3: scope:[init_plot] from init_plot::@2 init_plot::@4
|
||||
[120] init_plot::gfx#5 = phi( init_plot::@2/init_plot::gfx#2, init_plot::@4/init_plot::gfx#1 )
|
||||
[121] init_plot::i#1 = ++ init_plot::i#2
|
||||
to:init_plot::@1
|
||||
|
||||
void memset_dma(void *dest , char fill , unsigned int num)
|
||||
memset_dma: scope:[memset_dma] from graphics_mode::@11 graphics_mode::@8 main::@5
|
||||
[122] memset_dma::dest#3 = phi( graphics_mode::@11/(void *)GRAPHICS2, graphics_mode::@8/(void *)GRAPHICS1, main::@5/memset_dma::dest#0 )
|
||||
[123] memset_dma::dmaMode#0 = *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B)
|
||||
[124] *((unsigned int *)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_COUNT) = (unsigned int)$28*$19*8
|
||||
[125] *((char **)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_SRC) = (char *)0
|
||||
[126] *((char **)&memset_dma_command+OFFSET_STRUCT_DMA_LIST_F018B_DEST) = (char *)memset_dma::dest#3
|
||||
[127] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = 1
|
||||
[128] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMB) = 0
|
||||
[129] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRBANK) = 0
|
||||
[130] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_ADDRMSB) = byte1 &memset_dma_command
|
||||
[131] *((char *)DMA) = byte0 &memset_dma_command
|
||||
[132] *((char *)DMA+OFFSET_STRUCT_F018_DMAGIC_EN018B) = memset_dma::dmaMode#0
|
||||
to:memset_dma::@return
|
||||
memset_dma::@return: scope:[memset_dma] from memset_dma
|
||||
[133] return
|
||||
to:@return
|
||||
|
||||
void render_dots()
|
||||
render_dots: scope:[render_dots] from main::@13
|
||||
[134] render_dots::idx_x1#0 = sin_x1_idx
|
||||
[135] sin_x1_idx = sin_x1_idx + 1
|
||||
[136] if(sin_x1_idx<=SINX1_SIZE) goto render_dots::@1
|
||||
to:render_dots::@4
|
||||
render_dots::@4: scope:[render_dots] from render_dots
|
||||
[137] sin_x1_idx = sin_x1_idx - SINX1_SIZE
|
||||
to:render_dots::@1
|
||||
render_dots::@1: scope:[render_dots] from render_dots render_dots::@4
|
||||
[138] render_dots::idx_x2#0 = sin_x2_idx
|
||||
[139] sin_x2_idx = sin_x2_idx - 1
|
||||
[140] if(sin_x2_idx<=SINX2_SIZE) goto render_dots::@2
|
||||
to:render_dots::@5
|
||||
render_dots::@5: scope:[render_dots] from render_dots::@1
|
||||
[141] sin_x2_idx = sin_x2_idx + SINX2_SIZE
|
||||
to:render_dots::@2
|
||||
render_dots::@2: scope:[render_dots] from render_dots::@1 render_dots::@5
|
||||
[142] render_dots::idx_y1#0 = sin_y1_idx
|
||||
[143] sin_y1_idx = sin_y1_idx - 1
|
||||
[144] if(sin_y1_idx<=SINY1_SIZE) goto render_dots::@3
|
||||
to:render_dots::@6
|
||||
render_dots::@6: scope:[render_dots] from render_dots::@2
|
||||
[145] sin_y1_idx = sin_y1_idx + SINY1_SIZE
|
||||
to:render_dots::@3
|
||||
render_dots::@3: scope:[render_dots] from render_dots::@2 render_dots::@6
|
||||
[146] render_dots::idx_y2#0 = sin_y2_idx
|
||||
[147] sin_y2_idx = sin_y2_idx + 1
|
||||
[148] if(sin_y2_idx<=SINY2_SIZE) goto render_dots::@8
|
||||
to:render_dots::@7
|
||||
render_dots::@7: scope:[render_dots] from render_dots::@3
|
||||
[149] sin_y2_idx = sin_y2_idx - SINY2_SIZE
|
||||
to:render_dots::@8
|
||||
render_dots::@8: scope:[render_dots] from render_dots::@13 render_dots::@3 render_dots::@7
|
||||
[150] render_dots::idx_y2#11 = phi( render_dots::@13/render_dots::idx_y2#9, render_dots::@3/render_dots::idx_y2#0, render_dots::@7/render_dots::idx_y2#0 )
|
||||
[150] render_dots::idx_y1#11 = phi( render_dots::@13/render_dots::idx_y1#15, render_dots::@3/render_dots::idx_y1#0, render_dots::@7/render_dots::idx_y1#0 )
|
||||
[150] render_dots::idx_x2#3 = phi( render_dots::@13/render_dots::idx_x2#13, render_dots::@3/render_dots::idx_x2#0, render_dots::@7/render_dots::idx_x2#0 )
|
||||
[150] render_dots::idx_x1#3 = phi( render_dots::@13/render_dots::idx_x1#11, render_dots::@3/render_dots::idx_x1#0, render_dots::@7/render_dots::idx_x1#0 )
|
||||
[150] render_dots::i#10 = phi( render_dots::@13/render_dots::i#1, render_dots::@3/0, render_dots::@7/0 )
|
||||
[151] if(render_dots::i#10<$600) goto render_dots::@9
|
||||
to:render_dots::@return
|
||||
render_dots::@return: scope:[render_dots] from render_dots::@8
|
||||
[152] return
|
||||
to:@return
|
||||
render_dots::@9: scope:[render_dots] from render_dots::@8
|
||||
[153] render_dots::$20 = render_dots::idx_x1#3 << 1
|
||||
[154] render_dots::$21 = render_dots::idx_x2#3 << 1
|
||||
[155] render_dots::$22 = SINX1 + render_dots::$20
|
||||
[156] render_dots::$23 = SINX2 + render_dots::$21
|
||||
[157] plot::x#0 = *render_dots::$22 + *render_dots::$23
|
||||
[158] render_dots::$24 = SINY1 + render_dots::idx_y1#11
|
||||
[159] render_dots::$25 = SINY2 + render_dots::idx_y2#11
|
||||
[160] plot::y#0 = *render_dots::$24 + *render_dots::$25
|
||||
[161] call plot
|
||||
to:render_dots::@18
|
||||
render_dots::@18: scope:[render_dots] from render_dots::@9
|
||||
[162] render_dots::idx_x1#1 = render_dots::idx_x1#3 - $b
|
||||
[163] if(render_dots::idx_x1#1<=SINX1_SIZE) goto render_dots::@10
|
||||
to:render_dots::@14
|
||||
render_dots::@14: scope:[render_dots] from render_dots::@18
|
||||
[164] render_dots::idx_x1#2 = render_dots::idx_x1#1 + SINX1_SIZE
|
||||
to:render_dots::@10
|
||||
render_dots::@10: scope:[render_dots] from render_dots::@14 render_dots::@18
|
||||
[165] render_dots::idx_x1#11 = phi( render_dots::@14/render_dots::idx_x1#2, render_dots::@18/render_dots::idx_x1#1 )
|
||||
[166] render_dots::idx_x2#1 = render_dots::idx_x2#3 + 3
|
||||
[167] if(render_dots::idx_x2#1<=SINX2_SIZE) goto render_dots::@11
|
||||
to:render_dots::@15
|
||||
render_dots::@15: scope:[render_dots] from render_dots::@10
|
||||
[168] render_dots::idx_x2#2 = render_dots::idx_x2#1 - SINX2_SIZE
|
||||
to:render_dots::@11
|
||||
render_dots::@11: scope:[render_dots] from render_dots::@10 render_dots::@15
|
||||
[169] render_dots::idx_x2#13 = phi( render_dots::@10/render_dots::idx_x2#1, render_dots::@15/render_dots::idx_x2#2 )
|
||||
[170] render_dots::idx_y1#1 = render_dots::idx_y1#11 + 9
|
||||
[171] if(render_dots::idx_y1#1<=SINY1_SIZE) goto render_dots::@12
|
||||
to:render_dots::@16
|
||||
render_dots::@16: scope:[render_dots] from render_dots::@11
|
||||
[172] render_dots::idx_y1#2 = render_dots::idx_y1#1 - SINY1_SIZE
|
||||
to:render_dots::@12
|
||||
render_dots::@12: scope:[render_dots] from render_dots::@11 render_dots::@16
|
||||
[173] render_dots::idx_y1#15 = phi( render_dots::@11/render_dots::idx_y1#1, render_dots::@16/render_dots::idx_y1#2 )
|
||||
[174] render_dots::idx_y2#1 = render_dots::idx_y2#11 - 5
|
||||
[175] if(render_dots::idx_y2#1<=SINY2_SIZE) goto render_dots::@13
|
||||
to:render_dots::@17
|
||||
render_dots::@17: scope:[render_dots] from render_dots::@12
|
||||
[176] render_dots::idx_y2#2 = render_dots::idx_y2#1 + SINY2_SIZE
|
||||
to:render_dots::@13
|
||||
render_dots::@13: scope:[render_dots] from render_dots::@12 render_dots::@17
|
||||
[177] render_dots::idx_y2#9 = phi( render_dots::@12/render_dots::idx_y2#1, render_dots::@17/render_dots::idx_y2#2 )
|
||||
[178] render_dots::i#1 = ++ render_dots::i#10
|
||||
to:render_dots::@8
|
||||
|
||||
void lpoke(volatile unsigned long addr , volatile char val)
|
||||
lpoke: scope:[lpoke] from graphics_mode::@7 graphics_mode::@9
|
||||
asm { ldz#0 ldaval sta((addr)),z }
|
||||
to:lpoke::@return
|
||||
lpoke::@return: scope:[lpoke] from lpoke
|
||||
[180] return
|
||||
to:@return
|
||||
|
||||
void plot(unsigned int x , char y)
|
||||
plot: scope:[plot] from render_dots::@9
|
||||
[181] plot::$3 = plot::x#0 << 1
|
||||
[182] plot::$4 = GFX_OFFSET + plot::$3
|
||||
[183] plot::$0 = graphics_render + *plot::$4
|
||||
[184] plot::$2 = plot::x#0 & 7
|
||||
[185] plot::$0[plot::y#0] = plot::$0[plot::y#0] | GFX_BIT[plot::$2]
|
||||
to:plot::@return
|
||||
plot::@return: scope:[plot] from plot
|
||||
[186] return
|
||||
to:@return
|
5925
src/test/ref/examples/mega65/camelot-1536dots.log
Normal file
5925
src/test/ref/examples/mega65/camelot-1536dots.log
Normal file
File diff suppressed because it is too large
Load Diff
235
src/test/ref/examples/mega65/camelot-1536dots.sym
Normal file
235
src/test/ref/examples/mega65/camelot-1536dots.sym
Normal file
@ -0,0 +1,235 @@
|
||||
__constant const char BLACK = 0
|
||||
__constant const char BLUE = 6
|
||||
__constant const char DARK_GREY = $b
|
||||
__constant struct F018_DMAGIC * const DMA = (struct F018_DMAGIC *) 55040
|
||||
__constant const char DMA_COMMAND_FILL = 3
|
||||
__constant char GFX_BIT[8] = { $80, $40, $20, $10, 8, 4, 2, 1 }
|
||||
__constant unsigned int GFX_OFFSET[$140] = { fill( $140, 0) }
|
||||
__constant char * const GRAPHICS1 = (char *) 40960
|
||||
__constant char * const GRAPHICS2 = (char *) 28672
|
||||
__constant char MUSIC[] = kickasm {{ .const music = LoadSid("Thaw_5000.sid")
|
||||
.fill music.size, music.getData(i)
|
||||
}}
|
||||
__constant char OFFSET_STRUCT_DMA_LIST_F018B_COUNT = 1
|
||||
__constant char OFFSET_STRUCT_DMA_LIST_F018B_DEST = 6
|
||||
__constant char OFFSET_STRUCT_DMA_LIST_F018B_SRC = 3
|
||||
__constant char OFFSET_STRUCT_F018_DMAGIC_ADDRBANK = 2
|
||||
__constant char OFFSET_STRUCT_F018_DMAGIC_ADDRMB = 4
|
||||
__constant char OFFSET_STRUCT_F018_DMAGIC_ADDRMSB = 1
|
||||
__constant char OFFSET_STRUCT_F018_DMAGIC_EN018B = 3
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_BG_COLOR = $21
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_BORDER_COLOR = $20
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_HILO = $6a
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOHI = $69
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHARPTR_LOLO = $68
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHARSTEP_HI = $59
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHARSTEP_LO = $58
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CHRCOUNT = $5e
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CONTROLA = $30
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CONTROLB = $31
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_CONTROLC = $54
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_KEY = $2f
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_RASTER = $12
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_HILO = $62
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOHI = $61
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SCRNPTR_LOLO = $60
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SPRITES_ENABLE = $15
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SPRITES_PRIORITY = $1b
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_HILO = $6e
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_LOHI = $6d
|
||||
__constant char OFFSET_STRUCT_MEGA65_VICIV_SPRPTRADR_LOLO = $6c
|
||||
__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_IO = 5
|
||||
__constant const char PURPLE = 4
|
||||
__constant char * const SCREEN = (char *) 51200
|
||||
__constant unsigned int SINX1[SINX1_SIZE+$100] = kickasm {{ .fillword 1613+256, round(98+98*sin(toRadians(360*i/1613)))
|
||||
}}
|
||||
__constant const unsigned int SINX1_SIZE = $64d
|
||||
__constant unsigned int SINX2[SINX2_SIZE+$100] = kickasm {{ .fillword 547+256, round(60+60*sin(toRadians(360*i/547)))
|
||||
}}
|
||||
__constant const unsigned int SINX2_SIZE = $223
|
||||
__constant char SINY1[SINY1_SIZE+$100] = kickasm {{ .fill 733+256, round(66.5+66.5*sin(toRadians(360*i/733)))
|
||||
}}
|
||||
__constant const unsigned int SINY1_SIZE = $2dd
|
||||
__constant char SINY2[SINY2_SIZE+$100] = kickasm {{ .fill 317+256, round(33+33*sin(toRadians(360*i/317)))
|
||||
}}
|
||||
__constant const unsigned int SINY2_SIZE = $13d
|
||||
__constant char SIZEOF_UNSIGNED_INT = 2
|
||||
__constant char SPRITES[$c0] = kickasm {{ .var pic = LoadPicture("camelot-sprites.png", List().add($000000, $ffffff))
|
||||
.for (var s=0; s<3; s++) {
|
||||
.for (var y=0; y<21; y++) {
|
||||
.for (var x=0;x<3; x++) {
|
||||
.byte pic.getSinglecolorByte(s*3+x,y)
|
||||
}
|
||||
}
|
||||
.byte 0
|
||||
}
|
||||
}}
|
||||
__constant char * const SPRITES_COLOR = (char *) 53287
|
||||
__constant char * const SPRITES_XMSB = (char *) 53264
|
||||
__constant char * const SPRITES_XPOS = (char *) 53248
|
||||
__constant char * const SPRITES_YPOS = (char *) 53249
|
||||
__constant unsigned int SPRITE_PTRS[8] = { fill( 8, 0) }
|
||||
__constant struct MEGA65_VICIV * const VICIV = (struct MEGA65_VICIV *) 53248
|
||||
__constant const char VICIV_CHR16 = 1
|
||||
__constant const char VICIV_FAST = $40
|
||||
__constant const char VICIV_KEY_M65_A = $47
|
||||
__constant const char VICIV_KEY_M65_B = $53
|
||||
__constant const char VICIV_SPRPTR16 = $80
|
||||
__constant const char VICIV_VFAST = $40
|
||||
__constant const char WHITE = 1
|
||||
void __start()
|
||||
__loadstore volatile char buffer // zp[1]:42 76.25
|
||||
void graphics_mode()
|
||||
char graphics_mode::$8 // reg byte a 20002.0
|
||||
unsigned int graphics_mode::ch
|
||||
unsigned int graphics_mode::ch#1 // ch zp[2]:4 1001.0
|
||||
unsigned int graphics_mode::ch#2 // ch zp[2]:4 300.29999999999995
|
||||
unsigned int graphics_mode::ch_x
|
||||
unsigned int graphics_mode::ch_x#1 // ch_x zp[2]:10 10001.0
|
||||
unsigned int graphics_mode::ch_x#2 // ch_x zp[2]:10 7751.0
|
||||
unsigned int graphics_mode::ch_x#4 // ch_x zp[2]:10 2002.0
|
||||
unsigned long graphics_mode::cols
|
||||
unsigned long graphics_mode::cols#1 // cols zp[4]:24 750.75
|
||||
unsigned long graphics_mode::cols#2 // cols zp[4]:24 1001.0
|
||||
unsigned long graphics_mode::cols#3 // cols zp[4]:24 600.5999999999999
|
||||
unsigned int graphics_mode::i
|
||||
unsigned int graphics_mode::i#1 // i zp[2]:16 2002.0
|
||||
unsigned int graphics_mode::i#2 // i zp[2]:16 300.29999999999995
|
||||
unsigned int *graphics_mode::screen
|
||||
unsigned int *graphics_mode::screen#1 // screen zp[2]:6 667.3333333333334
|
||||
unsigned int *graphics_mode::screen#5 // screen zp[2]:6 1333.6666666666665
|
||||
char graphics_mode::x
|
||||
char graphics_mode::x#1 // reg byte z 20002.0
|
||||
char graphics_mode::x#2 // reg byte z 8000.8
|
||||
char graphics_mode::y
|
||||
char graphics_mode::y#1 // reg byte x 2002.0
|
||||
char graphics_mode::y#2 // reg byte x 273.0
|
||||
__loadstore char * volatile graphics_render // zp[2]:22 17860.803571428572
|
||||
void init_plot()
|
||||
char init_plot::$1 // reg byte a 2002.0
|
||||
unsigned int init_plot::$4 // zp[2]:8 2002.0
|
||||
unsigned int *init_plot::$5 // zp[2]:8 2002.0
|
||||
unsigned int init_plot::gfx
|
||||
unsigned int init_plot::gfx#1 // gfx zp[2]:6 2002.0
|
||||
unsigned int init_plot::gfx#2 // gfx zp[2]:6 572.0
|
||||
unsigned int init_plot::gfx#5 // gfx zp[2]:6 1501.5
|
||||
unsigned int init_plot::i
|
||||
unsigned int init_plot::i#1 // i zp[2]:4 2002.0
|
||||
unsigned int init_plot::i#2 // i zp[2]:4 556.1111111111111
|
||||
void lpoke(volatile unsigned long addr , volatile char val)
|
||||
__loadstore volatile unsigned long lpoke::addr // zp[4]:29 500.5
|
||||
__loadstore volatile char lpoke::val // zp[1]:28 1001.0
|
||||
void main()
|
||||
char main::toSpritePtr1_return
|
||||
__constant char main::toSpritePtr1_return#0 = (char)(unsigned int)main::toSpritePtr1_sprite#0/$40 // toSpritePtr1_return
|
||||
char *main::toSpritePtr1_sprite
|
||||
__constant char *main::toSpritePtr1_sprite#0 = SPRITES+$40 // toSpritePtr1_sprite
|
||||
char main::toSpritePtr2_return
|
||||
__constant char main::toSpritePtr2_return#0 = (char)(unsigned int)main::toSpritePtr2_sprite#0/$40 // toSpritePtr2_return
|
||||
char *main::toSpritePtr2_sprite
|
||||
__constant char *main::toSpritePtr2_sprite#0 = SPRITES+$80 // toSpritePtr2_sprite
|
||||
char main::toSpritePtr3_return
|
||||
__constant char main::toSpritePtr3_return#0 = (char)(unsigned int)SPRITES/$40 // toSpritePtr3_return
|
||||
char *main::toSpritePtr3_sprite
|
||||
void memoryRemap(char remapBlocks , unsigned int lowerPageOffset , unsigned int upperPageOffset)
|
||||
__loadstore volatile char memoryRemap::aVal // zp[1]:45 25.25
|
||||
unsigned int memoryRemap::lowerPageOffset
|
||||
char memoryRemap::remapBlocks
|
||||
unsigned int memoryRemap::upperPageOffset
|
||||
__loadstore volatile char memoryRemap::xVal // zp[1]:44 33.666666666666664
|
||||
__loadstore volatile char memoryRemap::yVal // zp[1]:43 50.5
|
||||
__loadstore volatile char memoryRemap::zVal // zp[1]:41 101.0
|
||||
void memset_dma(void *dest , char fill , unsigned int num)
|
||||
void *memset_dma::dest
|
||||
void *memset_dma::dest#0 // dest zp[2]:12 202.0
|
||||
void *memset_dma::dest#3 // dest zp[2]:12 25.25
|
||||
char memset_dma::dmaMode
|
||||
char memset_dma::dmaMode#0 // reg byte x 222.44444444444446
|
||||
char memset_dma::fill
|
||||
unsigned int memset_dma::num
|
||||
__loadstore volatile struct DMA_LIST_F018B memset_dma_command = { command: DMA_COMMAND_FILL, count: 0, src: 0, src_bank: 0, dest: 0, dest_bank: 0, sub_command: 0, modulo: 0 } // mem[12]
|
||||
__constant void (* const musicInit)() = (void (*)())MUSIC
|
||||
__constant void (* const musicPlay)() = (void (*)())MUSIC+3
|
||||
void plot(unsigned int x , char y)
|
||||
char *plot::$0 // zp[2]:2 1500001.5
|
||||
char plot::$2 // reg byte a 2000002.0
|
||||
unsigned int plot::$3 // zp[2]:2 2000002.0
|
||||
unsigned int *plot::$4 // zp[2]:2 2000002.0
|
||||
char *plot::gfx
|
||||
unsigned int plot::x
|
||||
unsigned int plot::x#0 // x zp[2]:6 300000.4285714285
|
||||
char plot::y
|
||||
char plot::y#0 // reg byte z 420000.60000000003
|
||||
void render_dots()
|
||||
unsigned int render_dots::$20 // zp[2]:6 100001.0
|
||||
unsigned int render_dots::$21 // zp[2]:14 100001.0
|
||||
unsigned int *render_dots::$22 // zp[2]:6 100001.0
|
||||
unsigned int *render_dots::$23 // zp[2]:14 200002.0
|
||||
char *render_dots::$24 // zp[2]:20 100001.0
|
||||
char *render_dots::$25 // zp[2]:18 200002.0
|
||||
unsigned int render_dots::i
|
||||
unsigned int render_dots::i#1 // i zp[2]:16 200002.0
|
||||
unsigned int render_dots::i#10 // i zp[2]:16 11111.222222222223
|
||||
unsigned int render_dots::idx_x1
|
||||
unsigned int render_dots::idx_x1#0 // idx_x1 zp[2]:10 187.6875
|
||||
unsigned int render_dots::idx_x1#1 // idx_x1 zp[2]:10 200002.0
|
||||
unsigned int render_dots::idx_x1#11 // idx_x1 zp[2]:10 21428.785714285714
|
||||
unsigned int render_dots::idx_x1#2 // idx_x1 zp[2]:10 200002.0
|
||||
unsigned int render_dots::idx_x1#3 // idx_x1 zp[2]:10 27455.0
|
||||
unsigned int render_dots::idx_x2
|
||||
unsigned int render_dots::idx_x2#0 // idx_x2 zp[2]:12 250.25
|
||||
unsigned int render_dots::idx_x2#1 // idx_x2 zp[2]:12 200002.0
|
||||
unsigned int render_dots::idx_x2#13 // idx_x2 zp[2]:12 30000.300000000003
|
||||
unsigned int render_dots::idx_x2#2 // idx_x2 zp[2]:12 200002.0
|
||||
unsigned int render_dots::idx_x2#3 // idx_x2 zp[2]:12 20133.666666666668
|
||||
unsigned int render_dots::idx_y1
|
||||
unsigned int render_dots::idx_y1#0 // idx_y1 zp[2]:8 375.375
|
||||
unsigned int render_dots::idx_y1#1 // idx_y1 zp[2]:8 200002.0
|
||||
unsigned int render_dots::idx_y1#11 // idx_y1 zp[2]:8 15895.0
|
||||
unsigned int render_dots::idx_y1#15 // idx_y1 zp[2]:8 50000.5
|
||||
unsigned int render_dots::idx_y1#2 // idx_y1 zp[2]:8 200002.0
|
||||
unsigned int render_dots::idx_y2
|
||||
unsigned int render_dots::idx_y2#0 // idx_y2 zp[2]:4 750.75
|
||||
unsigned int render_dots::idx_y2#1 // idx_y2 zp[2]:4 200002.0
|
||||
unsigned int render_dots::idx_y2#11 // idx_y2 zp[2]:4 13130.652173913044
|
||||
unsigned int render_dots::idx_y2#2 // idx_y2 zp[2]:4 200002.0
|
||||
unsigned int render_dots::idx_y2#9 // idx_y2 zp[2]:4 150001.5
|
||||
__loadstore volatile unsigned int sin_x1_idx // zp[2]:33 300.40000000000003
|
||||
__loadstore volatile unsigned int sin_x2_idx // zp[2]:35 250.33333333333337
|
||||
__loadstore volatile unsigned int sin_y1_idx // zp[2]:37 214.57142857142856
|
||||
__loadstore volatile unsigned int sin_y2_idx // zp[2]:39 187.75
|
||||
|
||||
reg byte x [ graphics_mode::y#2 graphics_mode::y#1 ]
|
||||
zp[4]:24 [ graphics_mode::cols#3 graphics_mode::cols#2 graphics_mode::cols#1 ]
|
||||
reg byte z [ graphics_mode::x#2 graphics_mode::x#1 ]
|
||||
zp[2]:16 [ render_dots::i#10 render_dots::i#1 graphics_mode::i#2 graphics_mode::i#1 ]
|
||||
zp[2]:10 [ render_dots::idx_x1#3 render_dots::idx_x1#11 render_dots::idx_x1#0 render_dots::idx_x1#2 render_dots::idx_x1#1 graphics_mode::ch_x#2 graphics_mode::ch_x#4 graphics_mode::ch_x#1 ]
|
||||
zp[2]:12 [ render_dots::idx_x2#3 render_dots::idx_x2#13 render_dots::idx_x2#0 render_dots::idx_x2#1 render_dots::idx_x2#2 memset_dma::dest#3 memset_dma::dest#0 ]
|
||||
zp[2]:4 [ render_dots::idx_y2#11 render_dots::idx_y2#9 render_dots::idx_y2#0 render_dots::idx_y2#1 render_dots::idx_y2#2 init_plot::i#2 init_plot::i#1 graphics_mode::ch#2 graphics_mode::ch#1 ]
|
||||
zp[1]:42 [ buffer ]
|
||||
zp[2]:22 [ graphics_render ]
|
||||
zp[2]:33 [ sin_x1_idx ]
|
||||
zp[2]:35 [ sin_x2_idx ]
|
||||
zp[2]:37 [ sin_y1_idx ]
|
||||
zp[2]:39 [ sin_y2_idx ]
|
||||
zp[1]:45 [ memoryRemap::aVal ]
|
||||
zp[1]:44 [ memoryRemap::xVal ]
|
||||
zp[1]:43 [ memoryRemap::yVal ]
|
||||
zp[1]:41 [ memoryRemap::zVal ]
|
||||
zp[4]:29 [ lpoke::addr ]
|
||||
zp[1]:28 [ lpoke::val ]
|
||||
reg byte a [ graphics_mode::$8 ]
|
||||
zp[2]:8 [ init_plot::$4 init_plot::$5 render_dots::idx_y1#11 render_dots::idx_y1#15 render_dots::idx_y1#0 render_dots::idx_y1#1 render_dots::idx_y1#2 ]
|
||||
reg byte a [ init_plot::$1 ]
|
||||
reg byte x [ memset_dma::dmaMode#0 ]
|
||||
zp[2]:6 [ render_dots::$20 render_dots::$22 plot::x#0 init_plot::gfx#2 init_plot::gfx#5 init_plot::gfx#1 graphics_mode::screen#5 graphics_mode::screen#1 ]
|
||||
zp[2]:14 [ render_dots::$21 render_dots::$23 ]
|
||||
zp[2]:20 [ render_dots::$24 ]
|
||||
zp[2]:18 [ render_dots::$25 ]
|
||||
reg byte z [ plot::y#0 ]
|
||||
zp[2]:2 [ plot::$3 plot::$4 plot::$0 ]
|
||||
reg byte a [ plot::$2 ]
|
||||
mem[12] [ memset_dma_command ]
|
Loading…
x
Reference in New Issue
Block a user