From: sparky4 Date: Fri, 6 Jan 2017 18:57:27 +0000 (-0600) Subject: makefile polished!! it seems everything works reletively ok X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=285987ea5f697bbd8dbd273a39345f892fa0caa9;p=16.git makefile polished!! it seems everything works reletively ok --- diff --git a/DEBUG.16W b/DEBUG.16W new file mode 100755 index 00000000..b916628d --- /dev/null +++ b/DEBUG.16W @@ -0,0 +1,210 @@ +Seg:0 Size:9685 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 +Seg:26ce Size:44 Owner:0x0 ++ +Seg:26fa Size:256 Owner:0x1660 +++++ +Seg:27fa Size:256 Owner:0x1452 ++++++ +Seg:28fa Size:256 Owner:0x1454 +++++ +Seg:29fa Size:256 Owner:0x1456 +++++ +Seg:2afa Size:256 Owner:0x1458 +++++ +Seg:2bfa Size:256 Owner:0x145a +++++ +Seg:2cfa Size:256 Owner:0x145c ++++++ +Seg:2dfa Size:256 Owner:0x145e +++++ +Seg:2efa Size:256 Owner:0x1460 +++++ +Seg:2ffa Size:256 Owner:0x1462 +++++ +Seg:30fa Size:256 Owner:0x1464 +++++ +Seg:31fa Size:256 Owner:0x1466 ++++++ +Seg:32fa Size:256 Owner:0x1468 +++++ +Seg:33fa Size:256 Owner:0x146a +++++ +Seg:34fa Size:256 Owner:0x146c +++++ +Seg:35fa Size:256 Owner:0x146e +++++ +Seg:36fa Size:256 Owner:0x1470 ++++++ +Seg:37fa Size:256 Owner:0x1472 +++++ +Seg:38fa Size:256 Owner:0x1474 +++++ +Seg:39fa Size:256 Owner:0x1476 +++++ +Seg:3afa Size:256 Owner:0x1478 +++++ +Seg:3bfa Size:256 Owner:0x147a ++++++ +Seg:3cfa Size:256 Owner:0x147c +++++ +Seg:3dfa Size:256 Owner:0x147e +++++ +Seg:3efa Size:256 Owner:0x1480 +++++ +Seg:3ffa Size:256 Owner:0x1482 +++++ +Seg:40fa Size:256 Owner:0x1484 ++++++ +Seg:41fa Size:256 Owner:0x1486 +++++ +Seg:42fa Size:256 Owner:0x1488 +++++ +Seg:43fa Size:256 Owner:0x148a +++++ +Seg:44fa Size:256 Owner:0x148c +++++ +Seg:45fa Size:256 Owner:0x148e ++++++ +Seg:46fa Size:256 Owner:0x1490 +++++ +Seg:47fa Size:256 Owner:0x1492 +++++ +Seg:48fa Size:256 Owner:0x1494 +++++ +Seg:49fa Size:256 Owner:0x1496 +++++ +Seg:4afa Size:256 Owner:0x1498 ++++++ +Seg:4bfa Size:256 Owner:0x149a +++++ +Seg:4cfa Size:256 Owner:0x149c +++++ +Seg:4dfa Size:256 Owner:0x149e +++++ +Seg:4efa Size:256 Owner:0x14a0 +++++ +Seg:4ffa Size:256 Owner:0x14a2 ++++++ +Seg:50fa Size:256 Owner:0x14a4 +++++ +Seg:51fa Size:256 Owner:0x14a6 +++++ +Seg:52fa Size:256 Owner:0x14a8 +++++ +Seg:53fa Size:256 Owner:0x14aa +++++ +Seg:54fa Size:256 Owner:0x14ac ++++++ +Seg:55fa Size:256 Owner:0x14ae +++++ +Seg:56fa Size:256 Owner:0x14b0 +++++ +Seg:57fa Size:256 Owner:0x14b2 +++++ +Seg:58fa Size:256 Owner:0x14b4 +++++ +Seg:59fa Size:256 Owner:0x14b6 ++++++ +Seg:5afa Size:256 Owner:0x14b8 +++++ +Seg:5bfa Size:256 Owner:0x14ba +++++ +Seg:5cfa Size:256 Owner:0x14bc +++++ +Seg:5dfa Size:256 Owner:0x14be +++++ +Seg:5efa Size:256 Owner:0x14c0 ++++++ +Seg:5ffa Size:256 Owner:0x14c2 +++++ +Seg:60fa Size:256 Owner:0x14c4 +++++ +Seg:61fa Size:256 Owner:0x14c6 +++++ +Seg:62fa Size:256 Owner:0x14c8 +++++ +Seg:63fa Size:256 Owner:0x14ca ++++++ +Seg:64fa Size:256 Owner:0x14cc +++++ +Seg:65fa Size:256 Owner:0x14ce +++++ +Seg:66fa Size:256 Owner:0x14d0 +++++ +Seg:67fa Size:256 Owner:0x14d2 +++++ +Seg:68fa Size:256 Owner:0x14d4 ++++++ +Seg:69fa Size:256 Owner:0x14d6 +++++ +Seg:6afa Size:256 Owner:0x14d8 +++++ +Seg:6bfa Size:256 Owner:0x14da +++++ +Seg:6cfa Size:256 Owner:0x14dc +++++ +Seg:6dfa Size:256 Owner:0x14de ++++++ +Seg:6efa Size:256 Owner:0x14e0 +++++ +Seg:6ffa Size:256 Owner:0x14e2 +++++ +Seg:70fa Size:256 Owner:0x14e4 +++++ +Seg:71fa Size:256 Owner:0x14e6 +++++ +Seg:72fa Size:256 Owner:0x14e8 ++++++ +Seg:73fa Size:256 Owner:0x14ea +++++ +Seg:74fa Size:256 Owner:0x14ec +++++ +Seg:75fa Size:256 Owner:0x14ee +++++ +Seg:76fa Size:256 Owner:0x14f0 +++++ +Seg:77fa Size:256 Owner:0x14f2 ++++++ +Seg:78fa Size:256 Owner:0x14f4 +++++ +Seg:79fa Size:256 Owner:0x14f6 +++++ +Seg:7afa Size:256 Owner:0x14f8 +++++ +Seg:7bfa Size:256 Owner:0x14fa +++++ +Seg:7cfa Size:256 Owner:0x14fc ++++++ +Seg:7dfa Size:256 Owner:0x14fe +++++ +Seg:7efa Size:256 Owner:0x1500 +++++ +Seg:7ffa Size:256 Owner:0x1502 +++++ +Seg:80fa Size:256 Owner:0x1504 +++++ +Seg:81fa Size:256 Owner:0x1506 ++++++ +Seg:82fa Size:256 Owner:0x1508 +++++ +Seg:83fa Size:256 Owner:0x150a +++++ +Seg:84fa Size:256 Owner:0x150c +++++ +Seg:85fa Size:256 Owner:0x150e +++++ +Seg:86fa Size:256 Owner:0x1510 ++++++ +Seg:87fa Size:256 Owner:0x1512 +++++ +Seg:88fa Size:256 Owner:0x1514 +++++ +Seg:89fa Size:256 Owner:0x1516 +++++ +Seg:8afa Size:256 Owner:0x1518 +++++ +Seg:8bfa Size:401 Owner:0xec1c +++++++ +Seg:b6fa Size:18693 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W new file mode 100755 index 00000000..37db2a7f --- /dev/null +++ b/HEAP.16W @@ -0,0 +1,69 @@ + + == default == + + USED block at 26f00016 of size 136 + FREE block at 26f0009e of size 68 + USED block at 26f000e2 of size 50 + USED block at 26f00114 of size 50 + USED block at 26f00146 of size 50 + USED block at 26f00178 of size 50 + USED block at 26f001aa of size 50 + USED block at 26f001dc of size 50 + USED block at 26f0020e of size 50 + USED block at 26f00240 of size 50 + USED block at 26f00272 of size 50 + USED block at 26f002a4 of size 50 + USED block at 26f002d6 of size 50 + USED block at 26f00308 of size 50 + FREE block at 26f0033a of size 14 + USED block at 26f00348 of size 20 + FREE block at 26f0035c of size 7328 +OK - end of heap + + == near == + + USED block at 16efec66 of size 12 + USED block at 16efec72 of size 330 + USED block at 16efedbc of size 52 + USED block at 16efedf0 of size 20 + USED block at 16efee04 of size 20 + USED block at 16efee18 of size 20 + USED block at 16efee2c of size 20 + USED block at 16efee40 of size 20 + USED block at 16efee54 of size 4520 +OK - end of heap + + == far == + + USED block at 26f00016 of size 136 + USED block at 26f0009e of size 68 + USED block at 26f000e2 of size 50 + USED block at 26f00114 of size 50 + USED block at 26f00146 of size 50 + USED block at 26f00178 of size 50 + USED block at 26f001aa of size 50 + USED block at 26f001dc of size 50 + USED block at 26f0020e of size 50 + USED block at 26f00240 of size 50 + USED block at 26f00272 of size 50 + USED block at 26f002a4 of size 50 + USED block at 26f002d6 of size 50 + USED block at 26f00308 of size 50 + USED block at 26f0033a of size 14 + USED block at 26f00348 of size 20 + USED block at 26f0035c of size 7328 +OK - end of heap + +Memory Type Total Used Free +---------------- -------- -------- -------- +Default 8166 756 7410 +Near 5014 494 4520 +Far 8166 756 7410 +---------------- -------- -------- -------- +coreleft = 4518 +farcoreleft = 36334 +GetFreeSize = 31836 +GetNearFreeSize = 4520 +GetFarFreeSize = 31836 +memavl = 4518 +stackavail = 31539 diff --git a/MMDUMP.16W b/MMDUMP.16W new file mode 100755 index 00000000..fba9a1a1 Binary files /dev/null and b/MMDUMP.16W differ diff --git a/src/0.c b/src/0.c index c0f21537..f34cda63 100755 --- a/src/0.c +++ b/src/0.c @@ -146,7 +146,7 @@ int main(int argc,char **argv) { h = vrl_header->height + overdraw + y - ry; w = (x + vrl_header->width + (overdraw*2) + 3/*round up*/ - rx) & (~3); if ((rx+w) > gvar.video.page[0].width) w = gvar.video.page[0].width-rx; - if ((ry+h) > gvar.video.page[0].height) h = (gvar.video.page[0].height)-ry; + if ((ry+h) > gvar.video.page[0].height) h = gvar.video.page[0].height-ry; /* block copy pattern to where we will draw the sprite */ vga_setup_wm1_block_copy(); diff --git a/src/lib/16_sprit.c b/src/lib/16_sprit.c index 3bfd3f1c..c11ff638 100755 --- a/src/lib/16_sprit.c +++ b/src/lib/16_sprit.c @@ -98,7 +98,7 @@ void print_anim_ids(struct sprite *spri) } -void animate_spri(struct sprite *spri, global_game_variables_t *gvar) +void animate_spri(struct sprite *spri, global_game_variables_t *gv) { int i; // Events go here @@ -107,9 +107,10 @@ void animate_spri(struct sprite *spri, global_game_variables_t *gvar) i = get_vrl_by_id(spri->spritesheet, spri->curr_spri_id, spri->sprite_vrl_cont); if(i < 0) { - Quit (gvar, "Error retriving required sprite"); + Quit (gv, "Error retriving required sprite"); } - draw_vrl1_vgax_modex( spri->x, spri->y, + 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), spri->sprite_vrl_cont->vrl_header, spri->sprite_vrl_cont->line_offsets, spri->sprite_vrl_cont->buffer + sizeof(struct vrl1_vgax_header), spri->sprite_vrl_cont->data_size); diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 53e45abd..15f8931e 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -295,17 +295,18 @@ void modexHiganbanaPageSetup(video_t *video) //setup the buffersize video->page[0].dy=video->page[0].dx= - video->page[1].dx=video->page[1].dy=16; + video->page[1].dx=video->page[1].dy=TILEWH; // 1 tile size buffer video->page[2].dx=video->page[2].dy= - video->page[3].dx=video->page[3].dy=0; + video->page[3].dx=video->page[3].dy=0; // cache pages are buffer wwww } +// +// move page to appropriate part and show it +// void modexShowPage(page_t *page) { - word high_address; - word low_address; - word offset; - byte crtcOffset; + word high_address, low_address, offset; +// byte crtcOffset; /* calculate offset */ offset = (word) page->data; @@ -313,20 +314,20 @@ modexShowPage(page_t *page) { offset += page->dx >> 2; /* calculate crtcOffset according to virtual width */ - crtcOffset = page->width >> 3; +// crtcOffset = page->width >> 3; high_address = HIGH_ADDRESS | (offset & 0xff00); low_address = LOW_ADDRESS | (offset << 8); /* wait for appropriate timing and then program CRTC */ - //while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); +//+=+= while ((inp(INPUT_STATUS_1) & DISPLAY_ENABLE)); outpw(CRTC_INDEX, high_address); outpw(CRTC_INDEX, low_address); - outp(CRTC_INDEX, 0x13); - outp(CRTC_DATA, crtcOffset); +// outp(CRTC_INDEX, 0x13); +// outp(CRTC_DATA, crtcOffset); - /* wait for one retrace */ - //while (!(inp(INPUT_STATUS_1) & VRETRACE)); + /* wait for one retrace */ +//+=+= while (!(inp(INPUT_STATUS_1) & VRETRACE)); /* do PEL panning here */ outp(AC_INDEX, 0x33); diff --git a/src/scroll.c b/src/scroll.c index d3faba1a..22dde47a 100755 --- a/src/scroll.c +++ b/src/scroll.c @@ -266,8 +266,11 @@ void main(int argc, char *argv[]) }*/ //9 - if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } - //if(IN_KeyDown(11)){ modexPalOverscan(15); } +#ifdef FADE + if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } +#endif + if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r + if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync! } diff --git a/src/zcroll.c b/src/zcroll.c index 024e5ff0..e1b3c557 100755 --- a/src/zcroll.c +++ b/src/zcroll.c @@ -70,11 +70,11 @@ void main(int argc, char *argv[]) player[0].ent->spri->spritesheet = malloc(sizeof(struct vrs_container)); // create the map - fprintf(stderr, "testing map load~ "); +// fprintf(stderr, "testing map load~ "); loadmap("data/test.map", &map); chkmap(&map, 0); - printf("chkmap ok "); - fprintf(stderr, "yay map loaded~~\n"); +// printf("chkmap ok "); +// fprintf(stderr, "yay map loaded~~\n"); // data read_vrs(&gvar, "data/spri/chikyuu.vrs", player[0].ent->spri->spritesheet); @@ -114,7 +114,7 @@ void main(int argc, char *argv[]) mv[i].video = &gvar.video; mv[i].pan = &pan; } - player[0].ent->spri->x = player[0].ent->spri->y = 20; + player[0].ent->spri->x = player[0].ent->spri->y = TILEWH; // set up paging //TODO: LOAD map data and position the map in the middle of the screen if smaller then screen @@ -139,7 +139,7 @@ void main(int argc, char *argv[]) modexFadeOn(4, dpal); #endif } - //animate_spri((player[0].ent->spri), &gvar); + animate_spri((player[0].ent->spri), &gvar); modexShowPage(mv[0].page);//!(gvar.video.p) shinku_fps_indicator_page = 0; // we're on page 1 now, shinku(). follow along please or it will not be visible. @@ -225,8 +225,9 @@ void main(int argc, char *argv[]) //9 #ifdef FADE if(IN_KeyDown(10)){ modexPalOverscan(rand()%56); modexPalUpdate1(dpal); IN_UserInput(1,1); } - //if(IN_KeyDown(11)){ modexPalOverscan(15); } #endif + if(IN_KeyDown(sc_R)){ modexPalOverscan(rand()%56); } //r + if((player[0].q==1) && !(player[0].x%TILEWH==0 && player[0].y%TILEWH==0)) break; //incase things go out of sync! player[0].hp = 0; }