From: sparky4 Date: Mon, 19 Dec 2016 19:42:29 +0000 (-0600) Subject: i am sticking to lardge memory model for speed www X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=27bd01e545402d34009004552885daeac58932af;p=16.git i am sticking to lardge memory model for speed www --- diff --git a/16.upx b/16.upx new file mode 100755 index 00000000..e69de29b diff --git a/DEBUG.16W b/DEBUG.16W index 49e642d1..ea1ab687 100755 --- a/DEBUG.16W +++ b/DEBUG.16W @@ -1,210 +1,210 @@ -Seg:0 Size:10119 Owner:0x0 +Seg:0 Size:10104 Owner:0x0 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++0000 -Seg:2880 Size:36 Owner:0x0 -++ -Seg:28a4 Size:256 Owner:0x1650 -++++ -Seg:29a4 Size:256 Owner:0x1442 +Seg:2871 Size:44 Owner:0x0 ++ +Seg:289d Size:256 Owner:0x1650 ++++++ +Seg:299d Size:256 Owner:0x1442 ++++ -Seg:2aa4 Size:256 Owner:0x1444 +Seg:2a9d Size:256 Owner:0x1444 ++++ -Seg:2ba4 Size:256 Owner:0x1446 +Seg:2b9d Size:256 Owner:0x1446 ++++ -Seg:2ca4 Size:256 Owner:0x1448 +Seg:2c9d Size:256 Owner:0x1448 +++++ +Seg:2d9d Size:256 Owner:0x144a +++++ -Seg:2da4 Size:256 Owner:0x144a +Seg:2e9d Size:256 Owner:0x144c ++++ -Seg:2ea4 Size:256 Owner:0x144c +Seg:2f9d Size:256 Owner:0x144e ++++ -Seg:2fa4 Size:256 Owner:0x144e +Seg:309d Size:256 Owner:0x1450 ++++ -Seg:30a4 Size:256 Owner:0x1450 +Seg:319d Size:256 Owner:0x1452 ++++ -Seg:31a4 Size:256 Owner:0x1452 +Seg:329d Size:256 Owner:0x1454 +++++ -Seg:32a4 Size:256 Owner:0x1454 +Seg:339d Size:256 Owner:0x1456 ++++ -Seg:33a4 Size:256 Owner:0x1456 +Seg:349d Size:256 Owner:0x1458 ++++ -Seg:34a4 Size:256 Owner:0x1458 +Seg:359d Size:256 Owner:0x145a ++++ -Seg:35a4 Size:256 Owner:0x145a +Seg:369d Size:256 Owner:0x145c ++++ -Seg:36a4 Size:256 Owner:0x145c +Seg:379d Size:256 Owner:0x145e +++++ -Seg:37a4 Size:256 Owner:0x145e +Seg:389d Size:256 Owner:0x1460 ++++ -Seg:38a4 Size:256 Owner:0x1460 +Seg:399d Size:256 Owner:0x1462 ++++ -Seg:39a4 Size:256 Owner:0x1462 +Seg:3a9d Size:256 Owner:0x1464 ++++ -Seg:3aa4 Size:256 Owner:0x1464 +Seg:3b9d Size:256 Owner:0x1466 ++++ -Seg:3ba4 Size:256 Owner:0x1466 +Seg:3c9d Size:256 Owner:0x1468 +++++ -Seg:3ca4 Size:256 Owner:0x1468 +Seg:3d9d Size:256 Owner:0x146a ++++ -Seg:3da4 Size:256 Owner:0x146a +Seg:3e9d Size:256 Owner:0x146c ++++ -Seg:3ea4 Size:256 Owner:0x146c +Seg:3f9d Size:256 Owner:0x146e ++++ -Seg:3fa4 Size:256 Owner:0x146e +Seg:409d Size:256 Owner:0x1470 ++++ -Seg:40a4 Size:256 Owner:0x1470 +Seg:419d Size:256 Owner:0x1472 +++++ -Seg:41a4 Size:256 Owner:0x1472 +Seg:429d Size:256 Owner:0x1474 ++++ -Seg:42a4 Size:256 Owner:0x1474 +Seg:439d Size:256 Owner:0x1476 ++++ -Seg:43a4 Size:256 Owner:0x1476 +Seg:449d Size:256 Owner:0x1478 ++++ -Seg:44a4 Size:256 Owner:0x1478 +Seg:459d Size:256 Owner:0x147a ++++ -Seg:45a4 Size:256 Owner:0x147a +Seg:469d Size:256 Owner:0x147c +++++ -Seg:46a4 Size:256 Owner:0x147c +Seg:479d Size:256 Owner:0x147e ++++ -Seg:47a4 Size:256 Owner:0x147e +Seg:489d Size:256 Owner:0x1480 ++++ -Seg:48a4 Size:256 Owner:0x1480 +Seg:499d Size:256 Owner:0x1482 ++++ -Seg:49a4 Size:256 Owner:0x1482 +Seg:4a9d Size:256 Owner:0x1484 ++++ -Seg:4aa4 Size:256 Owner:0x1484 +Seg:4b9d Size:256 Owner:0x1486 +++++ -Seg:4ba4 Size:256 Owner:0x1486 +Seg:4c9d Size:256 Owner:0x1488 ++++ -Seg:4ca4 Size:256 Owner:0x1488 +Seg:4d9d Size:256 Owner:0x148a ++++ -Seg:4da4 Size:256 Owner:0x148a +Seg:4e9d Size:256 Owner:0x148c ++++ -Seg:4ea4 Size:256 Owner:0x148c +Seg:4f9d Size:256 Owner:0x148e ++++ -Seg:4fa4 Size:256 Owner:0x148e +Seg:509d Size:256 Owner:0x1490 +++++ -Seg:50a4 Size:256 Owner:0x1490 +Seg:519d Size:256 Owner:0x1492 ++++ -Seg:51a4 Size:256 Owner:0x1492 +Seg:529d Size:256 Owner:0x1494 ++++ -Seg:52a4 Size:256 Owner:0x1494 +Seg:539d Size:256 Owner:0x1496 ++++ -Seg:53a4 Size:256 Owner:0x1496 +Seg:549d Size:256 Owner:0x1498 ++++ -Seg:54a4 Size:256 Owner:0x1498 +Seg:559d Size:256 Owner:0x149a +++++ -Seg:55a4 Size:256 Owner:0x149a +Seg:569d Size:256 Owner:0x149c ++++ -Seg:56a4 Size:256 Owner:0x149c +Seg:579d Size:256 Owner:0x149e ++++ -Seg:57a4 Size:256 Owner:0x149e +Seg:589d Size:256 Owner:0x14a0 ++++ -Seg:58a4 Size:256 Owner:0x14a0 +Seg:599d Size:256 Owner:0x14a2 ++++ -Seg:59a4 Size:256 Owner:0x14a2 +Seg:5a9d Size:256 Owner:0x14a4 +++++ -Seg:5aa4 Size:256 Owner:0x14a4 +Seg:5b9d Size:256 Owner:0x14a6 ++++ -Seg:5ba4 Size:256 Owner:0x14a6 +Seg:5c9d Size:256 Owner:0x14a8 ++++ -Seg:5ca4 Size:256 Owner:0x14a8 +Seg:5d9d Size:256 Owner:0x14aa ++++ -Seg:5da4 Size:256 Owner:0x14aa +Seg:5e9d Size:256 Owner:0x14ac ++++ -Seg:5ea4 Size:256 Owner:0x14ac +Seg:5f9d Size:256 Owner:0x14ae +++++ -Seg:5fa4 Size:256 Owner:0x14ae +Seg:609d Size:256 Owner:0x14b0 ++++ -Seg:60a4 Size:256 Owner:0x14b0 +Seg:619d Size:256 Owner:0x14b2 ++++ -Seg:61a4 Size:256 Owner:0x14b2 +Seg:629d Size:256 Owner:0x14b4 ++++ -Seg:62a4 Size:256 Owner:0x14b4 +Seg:639d Size:256 Owner:0x14b6 ++++ -Seg:63a4 Size:256 Owner:0x14b6 +Seg:649d Size:256 Owner:0x14b8 +++++ -Seg:64a4 Size:256 Owner:0x14b8 +Seg:659d Size:256 Owner:0x14ba ++++ -Seg:65a4 Size:256 Owner:0x14ba +Seg:669d Size:256 Owner:0x14bc ++++ -Seg:66a4 Size:256 Owner:0x14bc +Seg:679d Size:256 Owner:0x14be ++++ -Seg:67a4 Size:256 Owner:0x14be +Seg:689d Size:256 Owner:0x14c0 ++++ -Seg:68a4 Size:256 Owner:0x14c0 +Seg:699d Size:256 Owner:0x14c2 +++++ -Seg:69a4 Size:256 Owner:0x14c2 +Seg:6a9d Size:256 Owner:0x14c4 ++++ -Seg:6aa4 Size:256 Owner:0x14c4 +Seg:6b9d Size:256 Owner:0x14c6 ++++ -Seg:6ba4 Size:256 Owner:0x14c6 +Seg:6c9d Size:256 Owner:0x14c8 ++++ -Seg:6ca4 Size:256 Owner:0x14c8 +Seg:6d9d Size:256 Owner:0x14ca ++++ -Seg:6da4 Size:256 Owner:0x14ca +Seg:6e9d Size:256 Owner:0x14cc +++++ -Seg:6ea4 Size:256 Owner:0x14cc +Seg:6f9d Size:256 Owner:0x14ce ++++ -Seg:6fa4 Size:256 Owner:0x14ce +Seg:709d Size:256 Owner:0x14d0 ++++ -Seg:70a4 Size:256 Owner:0x14d0 +Seg:719d Size:256 Owner:0x14d2 ++++ -Seg:71a4 Size:256 Owner:0x14d2 +Seg:729d Size:256 Owner:0x14d4 ++++ -Seg:72a4 Size:256 Owner:0x14d4 +Seg:739d Size:256 Owner:0x14d6 +++++ -Seg:73a4 Size:256 Owner:0x14d6 +Seg:749d Size:256 Owner:0x14d8 ++++ -Seg:74a4 Size:256 Owner:0x14d8 +Seg:759d Size:256 Owner:0x14da ++++ -Seg:75a4 Size:256 Owner:0x14da +Seg:769d Size:256 Owner:0x14dc ++++ -Seg:76a4 Size:256 Owner:0x14dc +Seg:779d Size:256 Owner:0x14de ++++ -Seg:77a4 Size:256 Owner:0x14de +Seg:789d Size:256 Owner:0x14e0 +++++ -Seg:78a4 Size:256 Owner:0x14e0 +Seg:799d Size:256 Owner:0x14e2 ++++ -Seg:79a4 Size:256 Owner:0x14e2 +Seg:7a9d Size:256 Owner:0x14e4 ++++ -Seg:7aa4 Size:256 Owner:0x14e4 +Seg:7b9d Size:256 Owner:0x14e6 ++++ -Seg:7ba4 Size:256 Owner:0x14e6 +Seg:7c9d Size:256 Owner:0x14e8 ++++ -Seg:7ca4 Size:256 Owner:0x14e8 +Seg:7d9d Size:256 Owner:0x14ea +++++ -Seg:7da4 Size:256 Owner:0x14ea +Seg:7e9d Size:256 Owner:0x14ec ++++ -Seg:7ea4 Size:256 Owner:0x14ec +Seg:7f9d Size:256 Owner:0x14ee ++++ -Seg:7fa4 Size:256 Owner:0x14ee +Seg:809d Size:256 Owner:0x14f0 ++++ -Seg:80a4 Size:256 Owner:0x14f0 +Seg:819d Size:256 Owner:0x14f2 ++++ -Seg:81a4 Size:256 Owner:0x14f2 +Seg:829d Size:256 Owner:0x14f4 +++++ -Seg:82a4 Size:256 Owner:0x14f4 +Seg:839d Size:256 Owner:0x14f6 ++++ -Seg:83a4 Size:256 Owner:0x14f6 +Seg:849d Size:256 Owner:0x14f8 ++++ -Seg:84a4 Size:256 Owner:0x14f8 +Seg:859d Size:256 Owner:0x14fa ++++ -Seg:85a4 Size:256 Owner:0x14fa +Seg:869d Size:256 Owner:0x14fc ++++ -Seg:86a4 Size:256 Owner:0x14fc +Seg:879d Size:256 Owner:0x14fe +++++ -Seg:87a4 Size:256 Owner:0x14fe +Seg:889d Size:256 Owner:0x1500 ++++ -Seg:88a4 Size:256 Owner:0x1500 +Seg:899d Size:256 Owner:0x1502 ++++ -Seg:89a4 Size:256 Owner:0x1502 +Seg:8a9d Size:256 Owner:0x1504 ++++ -Seg:8aa4 Size:256 Owner:0x1504 +Seg:8b9d Size:256 Owner:0x1506 ++++ -Seg:8ba4 Size:256 Owner:0x1506 +Seg:8c9d Size:256 Owner:0x1508 +++++ -Seg:8ca4 Size:256 Owner:0x1508 -++++ -Seg:8da4 Size:401 Owner:0xec16 +Seg:8d9d Size:401 Owner:0xec10 ++++++ -Seg:b864 Size:18331 Owner:0x0 -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file +Seg:b85d Size:18338 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W index d0093cdc..7225b8c0 100755 --- a/HEAP.16W +++ b/HEAP.16W @@ -1,71 +1,69 @@ == default == - FREE block at 28a20016 of size 18 - USED block at 28a20028 of size 50 - USED block at 28a2005a of size 50 - USED block at 28a2008c of size 50 - USED block at 28a200be of size 50 - USED block at 28a200f0 of size 50 - USED block at 28a20122 of size 50 - USED block at 28a20154 of size 50 - USED block at 28a20186 of size 50 - USED block at 28a201b8 of size 50 - USED block at 28a201ea of size 50 - USED block at 28a2021c of size 50 - USED block at 28a2024e of size 50 - USED block at 28a20280 of size 50 - FREE block at 28a202b2 of size 14 - USED block at 28a202c0 of size 770 - USED block at 28a205c2 of size 254 - FREE block at 28a206c0 of size 14948 -ERROR - bad node in heap + USED block at 28930016 of size 136 + FREE block at 2893009e of size 68 + USED block at 289300e2 of size 50 + USED block at 28930114 of size 50 + USED block at 28930146 of size 50 + USED block at 28930178 of size 50 + USED block at 289301aa of size 50 + USED block at 289301dc of size 50 + USED block at 2893020e of size 50 + USED block at 28930240 of size 50 + USED block at 28930272 of size 50 + USED block at 289302a4 of size 50 + USED block at 289302d6 of size 50 + USED block at 28930308 of size 50 + FREE block at 2893033a of size 14 + USED block at 28930348 of size 20 + FREE block at 2893035c of size 7328 +OK - end of heap == near == - FREE block at 18a1ec66 of size 12 - FREE block at 18a1ec72 of size 330 - FREE block at 18a1edbc of size 52 - FREE block at 18a1edf0 of size 20 - FREE block at 18a1ee04 of size 20 - FREE block at 18a1ee18 of size 20 - FREE block at 18a1ee2c of size 20 - FREE block at 18a1ee40 of size 20 - FREE block at 18a1ee54 of size 4520 + USED block at 1892ec66 of size 12 + USED block at 1892ec72 of size 330 + USED block at 1892edbc of size 52 + USED block at 1892edf0 of size 20 + USED block at 1892ee04 of size 20 + USED block at 1892ee18 of size 20 + USED block at 1892ee2c of size 20 + USED block at 1892ee40 of size 20 + USED block at 1892ee54 of size 4520 OK - end of heap == far == - FREE block at 28a20016 of size 18 - FREE block at 28a20028 of size 50 - FREE block at 28a2005a of size 50 - FREE block at 28a2008c of size 50 - FREE block at 28a200be of size 50 - FREE block at 28a200f0 of size 50 - FREE block at 28a20122 of size 50 - FREE block at 28a20154 of size 50 - FREE block at 28a20186 of size 50 - FREE block at 28a201b8 of size 50 - FREE block at 28a201ea of size 50 - FREE block at 28a2021c of size 50 - FREE block at 28a2024e of size 50 - FREE block at 28a20280 of size 50 - FREE block at 28a202b2 of size 14 - FREE block at 28a202c0 of size 770 - FREE block at 28a205c2 of size 254 - FREE block at 28a206c0 of size 14948 -ERROR - bad node in heap + USED block at 28930016 of size 136 + USED block at 2893009e of size 68 + USED block at 289300e2 of size 50 + USED block at 28930114 of size 50 + USED block at 28930146 of size 50 + USED block at 28930178 of size 50 + USED block at 289301aa of size 50 + USED block at 289301dc of size 50 + USED block at 2893020e of size 50 + USED block at 28930240 of size 50 + USED block at 28930272 of size 50 + USED block at 289302a4 of size 50 + USED block at 289302d6 of size 50 + USED block at 28930308 of size 50 + USED block at 2893033a of size 14 + USED block at 28930348 of size 20 + USED block at 2893035c of size 7328 +OK - end of heap Memory Type Total Used Free ---------------- -------- -------- -------- -Default 16654 1674 14980 +Default 8166 756 7410 Near 5014 494 4520 -Far 16654 1674 14980 +Far 8166 756 7410 ---------------- -------- -------- -------- coreleft = 4518 -farcoreleft = 27336 -GetFreeSize = 14980 +farcoreleft = 28156 +GetFreeSize = 23660 GetNearFreeSize = 4520 -GetFarFreeSize = 14980 +GetFarFreeSize = 23660 memavl = 4518 -stackavail = 31529 +stackavail = 31527 diff --git a/MMDUMP.16W b/MMDUMP.16W index ba4520d7..88afe680 100755 Binary files a/MMDUMP.16W and b/MMDUMP.16W differ diff --git a/src/lib/16_tail.c b/src/lib/16_tail.c index 767ebfcc..b64d2ff5 100755 --- a/src/lib/16_tail.c +++ b/src/lib/16_tail.c @@ -289,7 +289,7 @@ void DebugMemory_(global_game_variables_t *gvar, boolean q) printf("With purge:"); if(q) printf(" "); printf("%uk\n", MM_TotalFree(gvar)/1024); if(q) printf("------------\n"); #ifdef __WATCOMC__ - IN_Ack (); + //IN_Ack (); #endif if(q) MM_ShowMemory (gvar); } diff --git a/src/vrstest.c b/src/vrstest.c index d00f627b..d0c8e7e2 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -49,39 +49,10 @@ void main() { uint32_t vrl_size; int num_of_vrl; struct vrl1_vgax_header huge *curr_vrl; - //word w=0; - - gvar.mm.mmstarted=0; -#ifdef __DEBUG_PM__ - dbg_debugpm=1; -#endif - // DOSLIB: check our environment - probe_dos(); - - // DOSLIB: what CPU are we using? - // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS. - // So this code by itself shouldn't care too much what CPU it's running on. Except that other - // parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for - // the CPU to carry out tasks. --J.C. - cpu_probe(); - - // DOSLIB: check for VGA - if (!probe_vga()) { - printf("VGA probe failed\n"); - return; - } - // hardware must be VGA or higher! - if (!(vga_state.vga_flags & VGA_IS_VGA)) { - printf("This program requires VGA or higher graphics hardware\n"); - return; - } + word w=0; - //gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]); + Startup16(&gvar); - MM_Startup(&gvar); - PM_Startup(&gvar); - PM_UnlockMainMem(&gvar); - CA_Startup(&gvar); // What should be done by read_vrs: //sega = (mm.bufferseg); if(CA_LoadFile("data/spri/chikyuu.vrs", &bigbuffer, &gvar)) baka=1; else baka=0; @@ -144,14 +115,14 @@ void main() { t2 = (*clockw-start)/18.2; - modexLoadPalFile("data/spri/chikyuu.pal", &pal); - modexPalUpdate1(pal); + /*modexLoadPalFile("data/spri/chikyuu.pal", &pal); + modexPalUpdate1(pal);*/ for (i = 0; i < 5; i++){ spri.delay = 1; animate_spri(&spri); spri.x += 20; /*sleep(1);*/ } - while(!kbhit()) + while(!IN_KeyDown(sc_Escape)) { - /*switch(w) + switch(w) { case 1024: modexPalUpdate0(pal); @@ -159,18 +130,17 @@ void main() { default: w++; break; - }*/ + } } VGAmodeX(0, 1, &gvar); MM_ShowMemory(&gvar); MM_DumpData(&gvar); MM_Report_(&gvar); + Shutdown16(&gvar); free(spri.sprite_vrl_cont); + free(vrl_line_offsets); MM_FreePtr(&bigbuffer, &gvar); //MM_FreePtr(&((void __based(sega)*)spri.spritesheet->buffer), &mm); - PM_Shutdown(&gvar); - CA_Shutdown(&gvar); - MM_Shutdown(&gvar); //printf("CPU to VGA: %f\n", t1); //printf("VGA to VGA: %f\n", t2); heapdump(&gvar);