From: sparky4 Date: Fri, 16 Sep 2016 17:56:57 +0000 (-0500) Subject: quit works with input system now and added debug mem thingy for p16 code X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=c5a5d3be15dc4c1de46f86cec8dd5a161563b1b9;p=16.git quit works with input system now and added debug mem thingy for p16 code --- diff --git a/DEBUG.16B b/DEBUG.16B index 546573cb..97df5039 100755 --- a/DEBUG.16B +++ b/DEBUG.16B @@ -1,9 +1,9 @@ -Seg:0 Size:2982 Owner:0x6574 +Seg:0 Size:3016 Owner:0x2065 ++++++++++++++++++++++++++++++++++++++0 -Seg:ba6 Size:256 Owner:0xcf7a +Seg:bc8 Size:256 Owner:0xcf79 ++++ -Seg:ca6 Size:273 Owner:0xfde -++++000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +Seg:cc8 Size:273 Owner:0xfde ++++++0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Seg:9fde Size:28706 Owner:0x0  Seg:9ffe Size:16386 Owner:0x0 diff --git a/MMDUMP.16B b/MMDUMP.16B index 2e06a768..5bad1262 100755 Binary files a/MMDUMP.16B and b/MMDUMP.16B differ diff --git a/bcexmm.exe b/bcexmm.exe index 8939ee24..a86e8183 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 9b9bba0d..e5ab4e6f 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/src/exmmtest.c b/src/exmmtest.c index d6a44fc6..1bd9671f 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -132,7 +132,7 @@ for(w=0;w<2;w++) //printf("red = locked\n"); printf("press any key to continue!\n"); getch(); - MM_ShowMemory(&gvar, &gvar.mm); + MM_ShowMemory(&gvar); MM_DumpData(&gvar.mm); MM_Report_(&gvar); if(baka) printf("\nyay!\n"); diff --git a/src/lib/16_lib.c b/src/lib/16_lib.c index 67251d43..46489c70 100755 --- a/src/lib/16_lib.c +++ b/src/lib/16_lib.c @@ -27,6 +27,33 @@ //=========================================================================== +/* +================== += += DebugMemory += +================== +*/ + +void DebugMemory (global_game_variables_t *gvar) +{ + /*VW_FixRefreshBuffer (); + US_CenterWindow (16,7); + + US_CPrint ("Memory Usage"); + US_CPrint ("------------"); + US_Print ("Total :"); + US_PrintUnsigned (mminfo.mainmem/1024); + US_Print ("k\nFree :"); + US_PrintUnsigned (MM_UnusedMemory()/1024); + US_Print ("k\nWith purge:"); + US_PrintUnsigned (MM_TotalFree()/1024); + US_Print ("k\n"); + VW_UpdateScreen();*/ + IN_Ack (); + MM_ShowMemory (gvar); +} + /* ========================== = diff --git a/src/lib/16_lib.h b/src/lib/16_lib.h index 9b3df181..5529ec62 100755 --- a/src/lib/16_lib.h +++ b/src/lib/16_lib.h @@ -24,8 +24,10 @@ #define __16_LIB__ #include "src/lib/16_head.h" +#include "src/lib/16_mm.h" #include "src/lib/16_in.h" +void DebugMemory (global_game_variables_t *gvar); void Quit (char *error); #endif diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index a8a5a467..d14479d5 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1297,7 +1297,7 @@ void MM_SortMem(mminfo_t *mm) ===================== */ -void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) +void MM_ShowMemory(global_game_variables_t *gvar) { //huge mmblocktype huge *scan; mmblocktype far *scan; @@ -1313,7 +1313,7 @@ void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm) //++++mh temp = bufferofs; //++++mh bufferofs = 0; //**** VW_SetScreen (0,0); - scan = mm->mmhead; + scan = gvar->mm.mmhead; end = -1; CA_OpenDebug (gvar); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 48c64353..33e1e526 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -193,7 +193,7 @@ void MM_FreePtr(memptr *baseptr, mminfo_t *mm); void MM_SetPurge(memptr *baseptr, int purge, mminfo_t *mm); void MM_SetLock(memptr *baseptr, boolean locked, mminfo_t *mm); void MM_SortMem(mminfo_t *mm); -void MM_ShowMemory(global_game_variables_t *gvar,/*page_t *page, */mminfo_t *mm); +void MM_ShowMemory(global_game_variables_t *gvar);//,/*page_t *page, */mminfo_t *mm); void MM_DumpData(mminfo_t *mm); dword MM_UnusedMemory(mminfo_t *mm); dword MM_TotalFree(mminfo_t *mm); diff --git a/src/vrstest.c b/src/vrstest.c index 11bfc670..1c8a15aa 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -152,7 +152,7 @@ void main() { } } VGAmodeX(0, 1, &gvar); - MM_ShowMemory(&gvar, &gvar.mm); + MM_ShowMemory(&gvar); MM_DumpData(&gvar.mm); free(spri.sprite_vrl_cont); MM_FreePtr(&bigbuffer, &gvar.mm);