From: sparky4 Date: Fri, 13 Jan 2017 18:43:47 +0000 (-0600) Subject: made palllist.exe as an experiment for me to make a palette system i want for p16... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=fab51bd6334f4a24b1730c27d34f03ef7bad9944;p=16.git made palllist.exe as an experiment for me to make a palette system i want for p16 i am now way too tired to work on p16 for today wwww i also made animate-sprite be useable on wider than screen res wwww --- diff --git a/DEBUG.16W b/DEBUG.16W index 2e59990f..1a1bf2cc 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:9965 Owner:0x0 +Seg:0 Size:9969 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:27b5 Size:44 Owner:0x0 +Seg:27b9 Size:44 Owner:0x0 + -Seg:27e1 Size:256 Owner:0x1964 +Seg:27e5 Size:256 Owner:0x1964 ++++ -Seg:28e1 Size:256 Owner:0x1756 +Seg:28e5 Size:256 Owner:0x1756 +++++ -Seg:29e1 Size:256 Owner:0x1758 +Seg:29e5 Size:256 Owner:0x1758 ++++ -Seg:2ae1 Size:256 Owner:0x175a +Seg:2ae5 Size:256 Owner:0x175a ++++ -Seg:2be1 Size:256 Owner:0x175c +Seg:2be5 Size:256 Owner:0x175c ++++ -Seg:2ce1 Size:256 Owner:0x175e +Seg:2ce5 Size:256 Owner:0x175e ++++ -Seg:2de1 Size:256 Owner:0x1760 +Seg:2de5 Size:256 Owner:0x1760 +++++ -Seg:2ee1 Size:256 Owner:0x1762 +Seg:2ee5 Size:256 Owner:0x1762 ++++ -Seg:2fe1 Size:256 Owner:0x1764 +Seg:2fe5 Size:256 Owner:0x1764 ++++ -Seg:30e1 Size:256 Owner:0x1766 +Seg:30e5 Size:256 Owner:0x1766 ++++ -Seg:31e1 Size:256 Owner:0x1768 +Seg:31e5 Size:256 Owner:0x1768 ++++ -Seg:32e1 Size:256 Owner:0x176a +Seg:32e5 Size:256 Owner:0x176a +++++ -Seg:33e1 Size:256 Owner:0x176c +Seg:33e5 Size:256 Owner:0x176c ++++ -Seg:34e1 Size:256 Owner:0x176e +Seg:34e5 Size:256 Owner:0x176e ++++ -Seg:35e1 Size:256 Owner:0x1770 +Seg:35e5 Size:256 Owner:0x1770 ++++ -Seg:36e1 Size:256 Owner:0x1772 +Seg:36e5 Size:256 Owner:0x1772 ++++ -Seg:37e1 Size:256 Owner:0x1774 +Seg:37e5 Size:256 Owner:0x1774 +++++ -Seg:38e1 Size:256 Owner:0x1776 +Seg:38e5 Size:256 Owner:0x1776 ++++ -Seg:39e1 Size:256 Owner:0x1778 +Seg:39e5 Size:256 Owner:0x1778 ++++ -Seg:3ae1 Size:256 Owner:0x177a +Seg:3ae5 Size:256 Owner:0x177a ++++ -Seg:3be1 Size:256 Owner:0x177c +Seg:3be5 Size:256 Owner:0x177c ++++ -Seg:3ce1 Size:256 Owner:0x177e +Seg:3ce5 Size:256 Owner:0x177e +++++ -Seg:3de1 Size:256 Owner:0x1780 +Seg:3de5 Size:256 Owner:0x1780 ++++ -Seg:3ee1 Size:256 Owner:0x1782 +Seg:3ee5 Size:256 Owner:0x1782 ++++ -Seg:3fe1 Size:256 Owner:0x1784 +Seg:3fe5 Size:256 Owner:0x1784 ++++ -Seg:40e1 Size:256 Owner:0x1786 +Seg:40e5 Size:256 Owner:0x1786 ++++ -Seg:41e1 Size:256 Owner:0x1788 +Seg:41e5 Size:256 Owner:0x1788 +++++ -Seg:42e1 Size:256 Owner:0x178a +Seg:42e5 Size:256 Owner:0x178a ++++ -Seg:43e1 Size:256 Owner:0x178c +Seg:43e5 Size:256 Owner:0x178c ++++ -Seg:44e1 Size:256 Owner:0x178e +Seg:44e5 Size:256 Owner:0x178e ++++ -Seg:45e1 Size:256 Owner:0x1790 +Seg:45e5 Size:256 Owner:0x1790 ++++ -Seg:46e1 Size:256 Owner:0x1792 +Seg:46e5 Size:256 Owner:0x1792 +++++ -Seg:47e1 Size:256 Owner:0x1794 +Seg:47e5 Size:256 Owner:0x1794 ++++ -Seg:48e1 Size:256 Owner:0x1796 +Seg:48e5 Size:256 Owner:0x1796 ++++ -Seg:49e1 Size:256 Owner:0x1798 +Seg:49e5 Size:256 Owner:0x1798 ++++ -Seg:4ae1 Size:256 Owner:0x179a +Seg:4ae5 Size:256 Owner:0x179a ++++ -Seg:4be1 Size:256 Owner:0x179c +Seg:4be5 Size:256 Owner:0x179c +++++ -Seg:4ce1 Size:256 Owner:0x179e +Seg:4ce5 Size:256 Owner:0x179e ++++ -Seg:4de1 Size:256 Owner:0x17a0 +Seg:4de5 Size:256 Owner:0x17a0 ++++ -Seg:4ee1 Size:256 Owner:0x17a2 +Seg:4ee5 Size:256 Owner:0x17a2 ++++ -Seg:4fe1 Size:256 Owner:0x17a4 +Seg:4fe5 Size:256 Owner:0x17a4 ++++ -Seg:50e1 Size:256 Owner:0x17a6 +Seg:50e5 Size:256 Owner:0x17a6 +++++ -Seg:51e1 Size:256 Owner:0x17a8 +Seg:51e5 Size:256 Owner:0x17a8 ++++ -Seg:52e1 Size:256 Owner:0x17aa +Seg:52e5 Size:256 Owner:0x17aa ++++ -Seg:53e1 Size:256 Owner:0x17ac +Seg:53e5 Size:256 Owner:0x17ac ++++ -Seg:54e1 Size:256 Owner:0x17ae +Seg:54e5 Size:256 Owner:0x17ae ++++ -Seg:55e1 Size:256 Owner:0x17b0 +Seg:55e5 Size:256 Owner:0x17b0 +++++ -Seg:56e1 Size:256 Owner:0x17b2 +Seg:56e5 Size:256 Owner:0x17b2 ++++ -Seg:57e1 Size:256 Owner:0x17b4 +Seg:57e5 Size:256 Owner:0x17b4 ++++ -Seg:58e1 Size:256 Owner:0x17b6 +Seg:58e5 Size:256 Owner:0x17b6 ++++ -Seg:59e1 Size:256 Owner:0x17b8 +Seg:59e5 Size:256 Owner:0x17b8 ++++ -Seg:5ae1 Size:256 Owner:0x17ba +Seg:5ae5 Size:256 Owner:0x17ba +++++ -Seg:5be1 Size:256 Owner:0x17bc +Seg:5be5 Size:256 Owner:0x17bc ++++ -Seg:5ce1 Size:256 Owner:0x17be +Seg:5ce5 Size:256 Owner:0x17be ++++ -Seg:5de1 Size:256 Owner:0x17c0 +Seg:5de5 Size:256 Owner:0x17c0 ++++ -Seg:5ee1 Size:256 Owner:0x17c2 +Seg:5ee5 Size:256 Owner:0x17c2 ++++ -Seg:5fe1 Size:256 Owner:0x17c4 +Seg:5fe5 Size:256 Owner:0x17c4 +++++ -Seg:60e1 Size:256 Owner:0x17c6 +Seg:60e5 Size:256 Owner:0x17c6 ++++ -Seg:61e1 Size:256 Owner:0x17c8 +Seg:61e5 Size:256 Owner:0x17c8 ++++ -Seg:62e1 Size:256 Owner:0x17ca +Seg:62e5 Size:256 Owner:0x17ca ++++ -Seg:63e1 Size:256 Owner:0x17cc +Seg:63e5 Size:256 Owner:0x17cc ++++ -Seg:64e1 Size:256 Owner:0x17ce +Seg:64e5 Size:256 Owner:0x17ce +++++ -Seg:65e1 Size:256 Owner:0x17d0 +Seg:65e5 Size:256 Owner:0x17d0 ++++ -Seg:66e1 Size:256 Owner:0x17d2 +Seg:66e5 Size:256 Owner:0x17d2 ++++ -Seg:67e1 Size:256 Owner:0x17d4 +Seg:67e5 Size:256 Owner:0x17d4 ++++ -Seg:68e1 Size:256 Owner:0x17d6 +Seg:68e5 Size:256 Owner:0x17d6 ++++ -Seg:69e1 Size:256 Owner:0x17d8 +Seg:69e5 Size:256 Owner:0x17d8 +++++ -Seg:6ae1 Size:256 Owner:0x17da +Seg:6ae5 Size:256 Owner:0x17da ++++ -Seg:6be1 Size:256 Owner:0x17dc +Seg:6be5 Size:256 Owner:0x17dc ++++ -Seg:6ce1 Size:256 Owner:0x17de +Seg:6ce5 Size:256 Owner:0x17de ++++ -Seg:6de1 Size:256 Owner:0x17e0 +Seg:6de5 Size:256 Owner:0x17e0 ++++ -Seg:6ee1 Size:256 Owner:0x17e2 +Seg:6ee5 Size:256 Owner:0x17e2 +++++ -Seg:6fe1 Size:256 Owner:0x17e4 +Seg:6fe5 Size:256 Owner:0x17e4 ++++ -Seg:70e1 Size:256 Owner:0x17e6 +Seg:70e5 Size:256 Owner:0x17e6 ++++ -Seg:71e1 Size:256 Owner:0x17e8 +Seg:71e5 Size:256 Owner:0x17e8 ++++ -Seg:72e1 Size:256 Owner:0x17ea +Seg:72e5 Size:256 Owner:0x17ea ++++ -Seg:73e1 Size:256 Owner:0x17ec +Seg:73e5 Size:256 Owner:0x17ec +++++ -Seg:74e1 Size:256 Owner:0x17ee +Seg:74e5 Size:256 Owner:0x17ee ++++ -Seg:75e1 Size:256 Owner:0x17f0 +Seg:75e5 Size:256 Owner:0x17f0 ++++ -Seg:76e1 Size:256 Owner:0x17f2 +Seg:76e5 Size:256 Owner:0x17f2 ++++ -Seg:77e1 Size:256 Owner:0x17f4 +Seg:77e5 Size:256 Owner:0x17f4 ++++ -Seg:78e1 Size:256 Owner:0x17f6 +Seg:78e5 Size:256 Owner:0x17f6 +++++ -Seg:79e1 Size:256 Owner:0x17f8 +Seg:79e5 Size:256 Owner:0x17f8 ++++ -Seg:7ae1 Size:256 Owner:0x17fa +Seg:7ae5 Size:256 Owner:0x17fa ++++ -Seg:7be1 Size:256 Owner:0x17fc +Seg:7be5 Size:256 Owner:0x17fc ++++ -Seg:7ce1 Size:256 Owner:0x17fe +Seg:7ce5 Size:256 Owner:0x17fe ++++ -Seg:7de1 Size:256 Owner:0x1800 +Seg:7de5 Size:256 Owner:0x1800 +++++ -Seg:7ee1 Size:256 Owner:0x1802 +Seg:7ee5 Size:256 Owner:0x1802 ++++ -Seg:7fe1 Size:256 Owner:0x1804 +Seg:7fe5 Size:256 Owner:0x1804 ++++ -Seg:80e1 Size:256 Owner:0x1806 +Seg:80e5 Size:256 Owner:0x1806 ++++ -Seg:81e1 Size:256 Owner:0x1808 +Seg:81e5 Size:256 Owner:0x1808 ++++ -Seg:82e1 Size:256 Owner:0x180a +Seg:82e5 Size:256 Owner:0x180a +++++ -Seg:83e1 Size:256 Owner:0x180c +Seg:83e5 Size:256 Owner:0x180c ++++ -Seg:84e1 Size:256 Owner:0x180e +Seg:84e5 Size:256 Owner:0x180e ++++ -Seg:85e1 Size:256 Owner:0x1810 +Seg:85e5 Size:256 Owner:0x1810 ++++ -Seg:86e1 Size:256 Owner:0x1812 +Seg:86e5 Size:256 Owner:0x1812 ++++ -Seg:87e1 Size:256 Owner:0x1814 +Seg:87e5 Size:256 Owner:0x1814 +++++ -Seg:88e1 Size:256 Owner:0x1816 +Seg:88e5 Size:256 Owner:0x1816 ++++ -Seg:89e1 Size:256 Owner:0x1818 +Seg:89e5 Size:256 Owner:0x1818 ++++ -Seg:8ae1 Size:256 Owner:0x181a +Seg:8ae5 Size:256 Owner:0x181a ++++ -Seg:8be1 Size:256 Owner:0x181c +Seg:8be5 Size:256 Owner:0x181c ++++ -Seg:8ce1 Size:401 Owner:0xef32 +Seg:8ce5 Size:401 Owner:0xef32 ++++++ -Seg:b7e1 Size:18462 Owner:0x0 +Seg:b7e5 Size:18458 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index 7de92de0..6e8d41a3 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,57 +1,57 @@ == default == - USED block at 27d70016 of size 136 - FREE block at 27d7009e of size 68 - USED block at 27d700e2 of size 50 - USED block at 27d70114 of size 50 - USED block at 27d70146 of size 50 - USED block at 27d70178 of size 50 - USED block at 27d701aa of size 50 - USED block at 27d701dc of size 50 - USED block at 27d7020e of size 50 - USED block at 27d70240 of size 50 - USED block at 27d70272 of size 50 - USED block at 27d702a4 of size 50 - USED block at 27d702d6 of size 50 - USED block at 27d70308 of size 50 - FREE block at 27d7033a of size 14 - USED block at 27d70348 of size 20 - FREE block at 27d7035c of size 7328 + USED block at 27db0016 of size 136 + FREE block at 27db009e of size 68 + USED block at 27db00e2 of size 50 + USED block at 27db0114 of size 50 + USED block at 27db0146 of size 50 + USED block at 27db0178 of size 50 + USED block at 27db01aa of size 50 + USED block at 27db01dc of size 50 + USED block at 27db020e of size 50 + USED block at 27db0240 of size 50 + USED block at 27db0272 of size 50 + USED block at 27db02a4 of size 50 + USED block at 27db02d6 of size 50 + USED block at 27db0308 of size 50 + FREE block at 27db033a of size 14 + USED block at 27db0348 of size 20 + FREE block at 27db035c of size 7328 OK - end of heap == near == - USED block at 17d6ef76 of size 12 - USED block at 17d6ef82 of size 330 - USED block at 17d6f0cc of size 52 - USED block at 17d6f100 of size 20 - USED block at 17d6f114 of size 20 - USED block at 17d6f128 of size 20 - USED block at 17d6f13c of size 20 - USED block at 17d6f150 of size 20 - USED block at 17d6f164 of size 3736 + USED block at 17daef76 of size 12 + USED block at 17daef82 of size 330 + USED block at 17daf0cc of size 52 + USED block at 17daf100 of size 20 + USED block at 17daf114 of size 20 + USED block at 17daf128 of size 20 + USED block at 17daf13c of size 20 + USED block at 17daf150 of size 20 + USED block at 17daf164 of size 3736 OK - end of heap == far == - USED block at 27d70016 of size 136 - USED block at 27d7009e of size 68 - USED block at 27d700e2 of size 50 - USED block at 27d70114 of size 50 - USED block at 27d70146 of size 50 - USED block at 27d70178 of size 50 - USED block at 27d701aa of size 50 - USED block at 27d701dc of size 50 - USED block at 27d7020e of size 50 - USED block at 27d70240 of size 50 - USED block at 27d70272 of size 50 - USED block at 27d702a4 of size 50 - USED block at 27d702d6 of size 50 - USED block at 27d70308 of size 50 - USED block at 27d7033a of size 14 - USED block at 27d70348 of size 20 - USED block at 27d7035c of size 7328 + USED block at 27db0016 of size 136 + USED block at 27db009e of size 68 + USED block at 27db00e2 of size 50 + USED block at 27db0114 of size 50 + USED block at 27db0146 of size 50 + USED block at 27db0178 of size 50 + USED block at 27db01aa of size 50 + USED block at 27db01dc of size 50 + USED block at 27db020e of size 50 + USED block at 27db0240 of size 50 + USED block at 27db0272 of size 50 + USED block at 27db02a4 of size 50 + USED block at 27db02d6 of size 50 + USED block at 27db0308 of size 50 + USED block at 27db033a of size 14 + USED block at 27db0348 of size 20 + USED block at 27db035c of size 7328 OK - end of heap Memory Type Total Used Free diff --git a/MMDUMP.16W b/MMDUMP.16W index c09f9c3d..35ca44ef 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index 5aad1893..e498250a 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -103,26 +103,29 @@ void animate_spri(struct sprite *spri, global_game_variables_t *gv) int i; // Events go here + + /* replace VGA stride with our own and mem ptr. then sprite rendering at this stage is just (0,0) */ + vga_state.vga_draw_stride_limit = (gv->video.page[0].width + 3/*round up*/ - spri->x) >> 2; + // Draw sprite i = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont); if(i < 0) { Quit (gv, "Error retriving required sprite"); } -// draw_vrl1_vgax_modex(x-rx,y-ry,vrl_header,vrl_lineoffs,buffer+sizeof(*vrl_header),bufsz-sizeof(*vrl_header)); + draw_vrl1_vgax_modex( - spri->x,// - spri->sprite_vrl_cont->vrl_header->width-28, - spri->y,// - spri->sprite_vrl_cont->vrl_header->height*2 -(gv->video.page[0].sh/2), - //vrl_header, + spri->x-gv->video.page[0].dx, + spri->y-gv->video.page[0].dy, spri->sprite_vrl_cont->vrl_header, - //vrl_lineoffs, spri->sprite_vrl_cont->line_offsets, - //buffer+sizeof(*vrl_header), spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header), - //bufsz-sizeof(*vrl_header)); spri->sprite_vrl_cont->data_size ); + /* restore stride */ + vga_state.vga_draw_stride_limit = vga_state.vga_draw_stride = gv->video.page[0].stridew; + // Depending on delay, update indices switch(spri->delay){ // Delay = 0 means that sprite should loop. Nothing to change here diff --git a/src/vrstest.c b/src/vrstest.c index 55067804..73f04f42 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -97,8 +97,8 @@ void main() { return; } - spri.x = 16; - spri.y = 100; + spri.x = 160; + spri.y = 120; // Uncomment to see broken sprites /* sega = mm.bufferseg; @@ -106,7 +106,7 @@ void main() VGAmodeX(1, 1, &gvar); modexHiganbanaPageSetup(&gvar.video); - VL_ShowPage(&gvar.video.page[0], 0, 1); + VL_ShowPage(&gvar.video.page[0], 0, 0); /* non sprite comparison */ start = *clockw; @@ -120,7 +120,7 @@ void main() /*modexLoadPalFile("data/spri/chikyuu.pal", &pal); modexPalUpdate1(pal);*/ for (i = 0; i < 5; i++){ - spri.delay = 1; animate_spri(&spri, &gvar); spri.x += 20; /*sleep(1);*/ } + spri.delay = 1; animate_spri(&spri, &gvar); spri.x += 16; /*sleep(1);*/ } VL_LoadPalFile("data/spri/chikyuu.pal", &palette); while(!IN_KeyDown(sc_Escape))