From: sparky4 Date: Sun, 9 Aug 2015 15:47:00 +0000 (-0500) Subject: Signed-off-by: sparky4 X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=commitdiff_plain;h=54e82e70b7b402a7aa8e08cf99844c10bc9e89c3 Signed-off-by: sparky4 --- diff --git a/16.exe b/16.exe index 3d3f2797..e078acbd 100644 Binary files a/16.exe and b/16.exe differ diff --git a/DEBUG.16 b/DEBUG.16 index f02d76dc..e132c9f5 100644 --- a/DEBUG.16 +++ b/DEBUG.16 @@ -1,12 +1,12 @@ -Seg:0 Size:5538 Owner:0xe000 -+_ -Seg:15a2 Size:256 Owner:0x3506 -+_ -Seg:16a2 Size:273 Owner:0x857a -+_0 -Seg:1cf2 Size:49 Owner:0x159f -+_0 -Seg:ad23 Size:13021 Owner:0x169f -+_ -Seg:e000 Size:4294909951 Owner:0xc483 -+_ +Seg:0 Size:5200 Owner:0x0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_ +Seg:1450 Size:256 Owner:0x3506 +++++_ +Seg:1550 Size:273 Owner:0x857a +++++_ +Seg:1bb9 Size:49 Owner:0x1fe6 +++_ +Seg:abea Size:13334 Owner:0x8586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_ +Seg:e000 Size:8191 Owner:0x3b4 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_ diff --git a/HEAP.16 b/HEAP.16 index a2a1a674..50a3d6e7 100644 --- a/HEAP.16 +++ b/HEAP.16 @@ -1,11 +1,11 @@ == default == - USED block at 1d140016 of size 136 - USED block at 1d14009e of size 66 - FREE block at 1d1400e0 of size 18 - USED block at 1d1400f2 of size 20 - FREE block at 1d140106 of size 7926 + USED block at 1bdb0016 of size 136 + USED block at 1bdb009e of size 66 + FREE block at 1bdb00e0 of size 18 + USED block at 1bdb00f2 of size 20 + FREE block at 1bdb0106 of size 7926 OK - end of heap == near == @@ -33,13 +33,13 @@ OK - end of heap Memory Type Total Used Free ---------------- -------- -------- -------- Default 8166 222 7944 -Near 31318 834 30484 +Near 31318 436 30882 Far 8166 222 7944 ---------------- -------- -------- -------- -coreleft = 30482 -farcoreleft = 38230 -GetFreeSize = 7768 -GetNearFreeSize = 30484 -GetFarFreeSize = 7768 -memavl = 30482 -stackavail = 11023 +coreleft = 30880 +farcoreleft = 46820 +GetFreeSize = 15960 +GetNearFreeSize = 30882 +GetFarFreeSize = 15960 +memavl = 30880 +stackavail = 11025 diff --git a/MMDUMP.16 b/MMDUMP.16 index 66f20d27..8c1d8566 100644 Binary files a/MMDUMP.16 and b/MMDUMP.16 differ diff --git a/bakapi.exe b/bakapi.exe index 4975fc13..2ec159ad 100644 Binary files a/bakapi.exe and b/bakapi.exe differ diff --git a/exmmtest.exe b/exmmtest.exe index 57975191..f596c725 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/fontgfx.exe b/fontgfx.exe index cd80b9da..2cdab7e3 100644 Binary files a/fontgfx.exe and b/fontgfx.exe differ diff --git a/maptest.exe b/maptest.exe index 6d95e77e..f1ae80fd 100644 Binary files a/maptest.exe and b/maptest.exe differ diff --git a/palettec.exe b/palettec.exe index 45763678..47c0141c 100644 Binary files a/palettec.exe and b/palettec.exe differ diff --git a/pcxtest.exe b/pcxtest.exe index d39c22f0..c5c7023f 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/scroll.exe b/scroll.exe index de253902..7a3fb305 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index cc5a894c..ca385529 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -350,6 +350,7 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) } } mmi->EMSmem = (i)*0x4000lu; + printf(" mmi->EMSmem=%lu\n", mmi->EMSmem); return 0; } @@ -595,6 +596,7 @@ void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm) //++++emsver stuff! if(segm>1/*extra>0xfffflu*/) { + scan->blob=segm; /*__asm { push ds @@ -604,7 +606,7 @@ void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm) }*/ -//MML_UseSpace(?segstart?, ?length?, mm); + //MML_UseSpace(segstart, seglength, mm); /*__asm { @@ -1306,7 +1308,8 @@ void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) //modexprint(&page, chx, chy, 1, 0, 24, "\nMM_ShowMemory: Memory block order currupted!\n"); break; } - end = scan->start+(word)scan->length-1; + for(;scan->length>0xfffflu;scan->length-=0xfffflu); + end = scan->start+(scan->length)-1; //++++ chy = scan->start/320; //++++ chx = scan->start%320; //modexhlin(page, scan->start, (unsigned)end, chy, color); @@ -1315,13 +1318,12 @@ void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) //++++ modexClearRegion(page, chx, chy, 4, 4, color); //} //++++ VW_Hlin(scan->start,(unsigned)end,0,color); -// for(w=0;w>=(word)scan->length/80;w++) -// { -// printf("+ %lu\n", w); - //ultoa (w,str,10); - //strcat (scratch0,str); + for(w=(scan->start)/80;w<=end/80;w++) + { + //printf("+ %u %lu\n", w, scan->length); + //if(w==48) getch(); strcat(scratch0, "+"); -// } + } strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_"); //++++ VW_Plot(scan->start,0,15); //++++ modexClearRegion(page, chx, chy, 4, 4, 15); @@ -1329,14 +1331,15 @@ void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) if(scan->next->start > end+1) { strcat(scratch0, AARESET); - //ultoa (w,str,10); - //strcat (scratch0,str); strcat(scratch0,AAGREEN); -// for(w=(scan->next->start)/80;w>=(word)((scan->length+1)/80);w++) -// { -// printf("0 %lu\n", w); + for(w=(scan->next->start)/80;w<=((scan->length+1)/80);w++) + { + //printf("0 %u %u %lu\n", scan->next->start, w, scan->length); strcat(scratch0,"0"); -// } + } + }else{ + printf("start=%x next=%x end+1=%x\n", scan->start, scan->next->start, end+1); + //getch(); } strcat(scratch0, AARESET); strcat(scratch0,"\n"); @@ -1355,7 +1358,7 @@ void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) ultoa (scan->start,str,16); strcat (scratch,str); strcat (scratch,"\tSize:"); - ultoa ((dword)scan->length,str,10); + ultoa ((word)scan->length,str,10); strcat (scratch,str); strcat (scratch,"\tOwner:0x"); owner = (unsigned)scan->useptr; @@ -1535,7 +1538,7 @@ void MM_Report(/*page_t *page, */mminfo_t *mm, mminfotype *mmi) printf("UnusedMemory=%lu\n", MM_UnusedMemory(mm)); printf("TotalFree=%lu\n", MM_TotalFree(mm)); //mmi->nearheap+mmi->farheap+ - printf("TotalUsed=%lu\n", mmi->mainmem+mmi->EMSmem+mmi->XMSmem);//+); + printf("TotalUsed=%lu\n", mmi->mainmem+mmi->EMSmem+mmi->XMSmem+mmi->XMSmem); // printf("\n"); // printf("UnusedMemory=%lu kb\n", MM_UnusedMemory()/10248); // printf("TotalFree=%lu kb\n", MM_TotalFree()/10248); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index e67d2fcf..ab35ce60 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -132,6 +132,7 @@ typedef struct mmblockstruct { //word start,length; word start; dword length; + word blob; //fore data larger than 64k unsigned attributes; memptr *useptr; // pointer to the segment start struct mmblockstruct huge *next; diff --git a/test.exe b/test.exe index e14a2a44..8a6d8338 100644 Binary files a/test.exe and b/test.exe differ diff --git a/test2.exe b/test2.exe index 618ccf2c..de349da6 100644 Binary files a/test2.exe and b/test2.exe differ diff --git a/tsthimem.exe b/tsthimem.exe index 282bd13e..8a00b50c 100644 Binary files a/tsthimem.exe and b/tsthimem.exe differ