From: sparky4 Date: Mon, 9 Jan 2017 18:33:21 +0000 (-0600) Subject: added stuff to help me study 0.exe it is a complex program wwww what is getting to... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c5148c2ac713930d130030bf4b116701f2d9c66e;p=16.git added stuff to help me study 0.exe it is a complex program wwww what is getting to me is the preservation of the bg and how it is done and where is it wwww --- diff --git a/DEBUG.16W b/DEBUG.16W new file mode 100755 index 00000000..d75bc1a2 --- /dev/null +++ b/DEBUG.16W @@ -0,0 +1,210 @@ +Seg:0 Size:9707 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 +Seg:26e4 Size:44 Owner:0x0 ++ +Seg:2710 Size:256 Owner:0x1660 +++++ +Seg:2810 Size:256 Owner:0x1452 +++++ +Seg:2910 Size:256 Owner:0x1454 +++++ +Seg:2a10 Size:256 Owner:0x1456 +++++ +Seg:2b10 Size:256 Owner:0x1458 +++++ +Seg:2c10 Size:256 Owner:0x145a +++++ +Seg:2d10 Size:256 Owner:0x145c +++++ +Seg:2e10 Size:256 Owner:0x145e +++++ +Seg:2f10 Size:256 Owner:0x1460 +++++ +Seg:3010 Size:256 Owner:0x1462 +++++ +Seg:3110 Size:256 Owner:0x1464 +++++ +Seg:3210 Size:256 Owner:0x1466 +++++ +Seg:3310 Size:256 Owner:0x1468 +++++ +Seg:3410 Size:256 Owner:0x146a +++++ +Seg:3510 Size:256 Owner:0x146c +++++ +Seg:3610 Size:256 Owner:0x146e +++++ +Seg:3710 Size:256 Owner:0x1470 +++++ +Seg:3810 Size:256 Owner:0x1472 +++++ +Seg:3910 Size:256 Owner:0x1474 +++++ +Seg:3a10 Size:256 Owner:0x1476 +++++ +Seg:3b10 Size:256 Owner:0x1478 +++++ +Seg:3c10 Size:256 Owner:0x147a +++++ +Seg:3d10 Size:256 Owner:0x147c +++++ +Seg:3e10 Size:256 Owner:0x147e +++++ +Seg:3f10 Size:256 Owner:0x1480 +++++ +Seg:4010 Size:256 Owner:0x1482 +++++ +Seg:4110 Size:256 Owner:0x1484 +++++ +Seg:4210 Size:256 Owner:0x1486 +++++ +Seg:4310 Size:256 Owner:0x1488 +++++ +Seg:4410 Size:256 Owner:0x148a +++++ +Seg:4510 Size:256 Owner:0x148c +++++ +Seg:4610 Size:256 Owner:0x148e +++++ +Seg:4710 Size:256 Owner:0x1490 +++++ +Seg:4810 Size:256 Owner:0x1492 +++++ +Seg:4910 Size:256 Owner:0x1494 +++++ +Seg:4a10 Size:256 Owner:0x1496 +++++ +Seg:4b10 Size:256 Owner:0x1498 +++++ +Seg:4c10 Size:256 Owner:0x149a +++++ +Seg:4d10 Size:256 Owner:0x149c +++++ +Seg:4e10 Size:256 Owner:0x149e +++++ +Seg:4f10 Size:256 Owner:0x14a0 +++++ +Seg:5010 Size:256 Owner:0x14a2 +++++ +Seg:5110 Size:256 Owner:0x14a4 +++++ +Seg:5210 Size:256 Owner:0x14a6 +++++ +Seg:5310 Size:256 Owner:0x14a8 +++++ +Seg:5410 Size:256 Owner:0x14aa +++++ +Seg:5510 Size:256 Owner:0x14ac +++++ +Seg:5610 Size:256 Owner:0x14ae +++++ +Seg:5710 Size:256 Owner:0x14b0 +++++ +Seg:5810 Size:256 Owner:0x14b2 +++++ +Seg:5910 Size:256 Owner:0x14b4 +++++ +Seg:5a10 Size:256 Owner:0x14b6 +++++ +Seg:5b10 Size:256 Owner:0x14b8 +++++ +Seg:5c10 Size:256 Owner:0x14ba +++++ +Seg:5d10 Size:256 Owner:0x14bc +++++ +Seg:5e10 Size:256 Owner:0x14be +++++ +Seg:5f10 Size:256 Owner:0x14c0 +++++ +Seg:6010 Size:256 Owner:0x14c2 +++++ +Seg:6110 Size:256 Owner:0x14c4 +++++ +Seg:6210 Size:256 Owner:0x14c6 +++++ +Seg:6310 Size:256 Owner:0x14c8 +++++ +Seg:6410 Size:256 Owner:0x14ca +++++ +Seg:6510 Size:256 Owner:0x14cc +++++ +Seg:6610 Size:256 Owner:0x14ce +++++ +Seg:6710 Size:256 Owner:0x14d0 +++++ +Seg:6810 Size:256 Owner:0x14d2 +++++ +Seg:6910 Size:256 Owner:0x14d4 +++++ +Seg:6a10 Size:256 Owner:0x14d6 +++++ +Seg:6b10 Size:256 Owner:0x14d8 +++++ +Seg:6c10 Size:256 Owner:0x14da +++++ +Seg:6d10 Size:256 Owner:0x14dc +++++ +Seg:6e10 Size:256 Owner:0x14de +++++ +Seg:6f10 Size:256 Owner:0x14e0 +++++ +Seg:7010 Size:256 Owner:0x14e2 +++++ +Seg:7110 Size:256 Owner:0x14e4 +++++ +Seg:7210 Size:256 Owner:0x14e6 +++++ +Seg:7310 Size:256 Owner:0x14e8 +++++ +Seg:7410 Size:256 Owner:0x14ea +++++ +Seg:7510 Size:256 Owner:0x14ec +++++ +Seg:7610 Size:256 Owner:0x14ee +++++ +Seg:7710 Size:256 Owner:0x14f0 +++++ +Seg:7810 Size:256 Owner:0x14f2 +++++ +Seg:7910 Size:256 Owner:0x14f4 +++++ +Seg:7a10 Size:256 Owner:0x14f6 +++++ +Seg:7b10 Size:256 Owner:0x14f8 +++++ +Seg:7c10 Size:256 Owner:0x14fa +++++ +Seg:7d10 Size:256 Owner:0x14fc +++++ +Seg:7e10 Size:256 Owner:0x14fe +++++ +Seg:7f10 Size:256 Owner:0x1500 +++++ +Seg:8010 Size:256 Owner:0x1502 +++++ +Seg:8110 Size:256 Owner:0x1504 +++++ +Seg:8210 Size:256 Owner:0x1506 +++++ +Seg:8310 Size:256 Owner:0x1508 +++++ +Seg:8410 Size:256 Owner:0x150a +++++ +Seg:8510 Size:256 Owner:0x150c +++++ +Seg:8610 Size:256 Owner:0x150e +++++ +Seg:8710 Size:256 Owner:0x1510 +++++ +Seg:8810 Size:256 Owner:0x1512 +++++ +Seg:8910 Size:256 Owner:0x1514 +++++ +Seg:8a10 Size:256 Owner:0x1516 +++++ +Seg:8b10 Size:256 Owner:0x1518 +++++ +Seg:8c10 Size:401 Owner:0xec1c +++++++ +Seg:b710 Size:18671 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W new file mode 100755 index 00000000..809c76d2 --- /dev/null +++ b/HEAP.16W @@ -0,0 +1,69 @@ + + == default == + + USED block at 27060016 of size 136 + FREE block at 2706009e of size 68 + USED block at 270600e2 of size 50 + USED block at 27060114 of size 50 + USED block at 27060146 of size 50 + USED block at 27060178 of size 50 + USED block at 270601aa of size 50 + USED block at 270601dc of size 50 + USED block at 2706020e of size 50 + USED block at 27060240 of size 50 + USED block at 27060272 of size 50 + USED block at 270602a4 of size 50 + USED block at 270602d6 of size 50 + USED block at 27060308 of size 50 + FREE block at 2706033a of size 14 + USED block at 27060348 of size 20 + FREE block at 2706035c of size 7328 +OK - end of heap + + == near == + + USED block at 1705ec66 of size 12 + USED block at 1705ec72 of size 330 + USED block at 1705edbc of size 52 + USED block at 1705edf0 of size 20 + USED block at 1705ee04 of size 20 + USED block at 1705ee18 of size 20 + USED block at 1705ee2c of size 20 + USED block at 1705ee40 of size 20 + USED block at 1705ee54 of size 4520 +OK - end of heap + + == far == + + USED block at 27060016 of size 136 + USED block at 2706009e of size 68 + USED block at 270600e2 of size 50 + USED block at 27060114 of size 50 + USED block at 27060146 of size 50 + USED block at 27060178 of size 50 + USED block at 270601aa of size 50 + USED block at 270601dc of size 50 + USED block at 2706020e of size 50 + USED block at 27060240 of size 50 + USED block at 27060272 of size 50 + USED block at 270602a4 of size 50 + USED block at 270602d6 of size 50 + USED block at 27060308 of size 50 + USED block at 2706033a of size 14 + USED block at 27060348 of size 20 + USED block at 2706035c 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..9811f983 Binary files /dev/null and b/MMDUMP.16W differ diff --git a/src/0.c b/src/0.c index 635a4f3e..4a315f19 100755 --- a/src/0.c +++ b/src/0.c @@ -75,6 +75,8 @@ int main(int argc,char **argv) } VGAmodeX(1, 1, &gvar); + modexPalUpdate0(palette); + /* load color palette */ fd = open(bakapee2,O_RDONLY|O_BINARY); if (fd >= 0) { @@ -128,7 +130,7 @@ int main(int argc,char **argv) TESTBG; #endif - DRAWCORNERBOXES; + //DRAWCORNERBOXES; /* make distinctive pattern offscreen, render sprite, copy onscreen. * this time, we render the distinctive pattern to another offscreen location and just copy. @@ -153,7 +155,7 @@ int main(int argc,char **argv) #else TESTBG; #endif - DRAWCORNERBOXES; + //DRAWCORNERBOXES; /* starting coords. note: this technique is limited to x coordinates of multiple of 4 */ x = -(gvar.video.page[0].dx); @@ -180,7 +182,7 @@ int main(int argc,char **argv) player[0].q = 1; player[0].d = 2; x=y=0; xdir=ydir=1; - TESTBG; + //TESTBG; DRAWCORNERBOXES; } //R FUNCTIONKEYFUNCTIONS0EXE; diff --git a/src/lib/scroll16.c b/src/lib/scroll16.c index c30c8ac5..112610c9 100755 --- a/src/lib/scroll16.c +++ b/src/lib/scroll16.c @@ -306,7 +306,7 @@ void panVmemManual(map_view_t *pip, player_t *player, word pn) //down movement case 4: - if(pip[pip[0].pan->pn].ty >= 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th < pip[pip[0].pan->pn].page->tilesh+pip[pip[1].pan->pn].page->tilesh+pip[pip[2].pan->pn].page->tilesh+pip[pip[3].pan->pn].page->tilesh) + if(pip[pip[0].pan->pn].ty >= 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th < pip[pip[0].pan->pn].page->tilesh+pip[pip[1].pan->pn].page->tilesh)//+pip[pip[2].pan->pn].page->tilesh+pip[pip[3].pan->pn].page->tilesh) { if(player[pn].q<=player[pn].spt) { @@ -319,7 +319,7 @@ void panVmemManual(map_view_t *pip, player_t *player, word pn) //up movement case 0: - if(pip[pip[0].pan->pn].ty > 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th <= pip[pip[0].pan->pn].page->tilesh+pip[pip[1].pan->pn].page->tilesh+pip[pip[2].pan->pn].page->tilesh+pip[pip[3].pan->pn].page->tilesh) + if(pip[pip[0].pan->pn].ty > 0 && pip[pip[0].pan->pn].ty+pip[pip[0].pan->pn].page->th <= pip[pip[0].pan->pn].page->tilesh+pip[pip[1].pan->pn].page->tilesh)//+pip[pip[2].pan->pn].page->tilesh+pip[pip[3].pan->pn].page->tilesh) { if(player[pn].q<=player[pn].spt) { diff --git a/src/test.c b/src/test.c index 363047f2..332f211a 100755 --- a/src/test.c +++ b/src/test.c @@ -28,12 +28,12 @@ static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */ player_t player[MaxPlayers]; -map_view_t mv[4]; pan_t pan; void main(int argc, char *argv[]) { static global_game_variables_t gvar; + map_view_t mv[4]; int i, j; word startclk, endclk; word k; @@ -125,18 +125,18 @@ void main(int argc, char *argv[]) modexClearRegion(&gvar.video.page[0], 32, 32, gvar.video.page[0].sw-32, gvar.video.page[0].sh-32, 42); modexClearRegion(&gvar.video.page[0], 48, 48, gvar.video.page[0].sw-64, gvar.video.page[0].sh-64, 128); modexCopyPageRegion(&gvar.video.page[1], &gvar.video.page[0], 0, 0, 0, 0, gvar.video.page[0].width, gvar.video.page[0].height); - modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); - modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); + //modexClearRegion(&gvar.video.page[2], 0, 0, gvar.video.page[2].sw, gvar.video.page[2].sh, 47); + //modexClearRegion(&gvar.video.page[3], 0, 0, gvar.video.page[3].sw, gvar.video.page[3].sh, 45); /* fade in */ modexFadeOn(1, pal2); - i=0,k=0,j=0,pan.pn=1; + i=0,k=0,j=0,pan.pn=0; startclk = *clockw; while(!IN_KeyDown(sc_Escape)) { IN_ReadControl(0,&player); - panpagemanual(mv, player, 0); + panPageManual(mv, player, 0); /*if(i<5){ switch (k) diff --git a/src/tesuto.h b/src/tesuto.h index 09aca18b..8aa2119e 100755 --- a/src/tesuto.h +++ b/src/tesuto.h @@ -35,27 +35,27 @@ #define DRAWOTHERCORNERBOX_TOPLEFT \ DCBO, 0, 0, 16, 16, 0); \ -DCBO, 16, 16, 16, 16, 2); \ -DCBI, 0, 0, 16, 16, 0); \ -DCBI, 16, 16, 16, 16, 2); +DCBO, 16, 16, 16, 16, 1); \ +DCBI, 0, 0, 16, 16, 8); \ +DCBI, 16, 16, 16, 16, 9); #define DRAWOTHERCORNERBOX_TOPRIGHT \ -DCBO, OW, 0, 16, 16, 0); \ -DCBO, OE, 16, 16, 16, 2); \ -DCBI, IW, 0, 16, 16, 0); \ -DCBI, IE, 16, 16, 16, 2); +DCBO, OW, 0, 16, 16, 2); \ +DCBO, OE, 16, 16, 16, 3); \ +DCBI, IW, 0, 16, 16, 10); \ +DCBI, IE, 16, 16, 16, 11); #define DRAWOTHERCORNERBOX_BOTTOMLEFT \ -DCBO, 0, OH, 16, 16, 0); \ -DCBO, 16, OJ, 16, 16, 2); \ -DCBI, 0, IH, 16, 16, 0); \ -DCBI, 16, IJ, 16, 16, 2); +DCBO, 0, OH, 16, 16, 4); \ +DCBO, 16, OJ, 16, 16, 5); \ +DCBI, 0, IH, 16, 16, 12); \ +DCBI, 16, IJ, 16, 16, 13); #define DRAWOTHERCORNERBOX_BOTTOMRIGHT \ -DCBO, OE, OJ, 16, 16, 2); \ -DCBO, OW, OH, 16, 16, 0); \ -DCBI, IE, IJ, 16, 16, 2);\ -DCBI, IW, IH, 16, 16, 0); +DCBO, OE, OJ, 16, 16, 6); \ +DCBO, OW, OH, 16, 16, 7); \ +DCBI, IE, IJ, 16, 16, 14);\ +DCBI, IW, IH, 16, 16, 15); #define DRAWCORNERBOXES \ DRAWOTHERCORNERBOX_TOPLEFT; \ diff --git a/test.exe b/test.exe deleted file mode 100755 index 559da1ae..00000000 Binary files a/test.exe and /dev/null differ