]> 4ch.mooo.com Git - 16.git/commitdiff
quit works with input system now and added debug mem thingy for p16 code
authorsparky4 <sparky4@cock.li>
Fri, 16 Sep 2016 17:56:57 +0000 (12:56 -0500)
committersparky4 <sparky4@cock.li>
Fri, 16 Sep 2016 17:56:57 +0000 (12:56 -0500)
DEBUG.16B
MMDUMP.16B
bcexmm.exe
bcexmm.prj
src/exmmtest.c
src/lib/16_lib.c
src/lib/16_lib.h
src/lib/16_mm.c
src/lib/16_mm.h
src/vrstest.c

index 546573cb6951109cb3bf1aa6b804f95cbe215df2..97df5039d6364171d962ab82c2930a61d97797f5 100755 (executable)
--- a/DEBUG.16B
+++ b/DEBUG.16B
@@ -1,9 +1,9 @@
-\e[0mSeg:0      Size:2982       Owner:0x6574\r
+\e[0mSeg:0      Size:3016       Owner:0x2065\r
 \e[41;31m++++++++++++++++++++++++++++++++++++++\e[0m\e[42;32m0\r
-\e[0m\e[0mSeg:ba6        Size:256        Owner:0xcf7a\r
+\e[0m\e[0mSeg:bc8        Size:256        Owner:0xcf79\r
 \e[44;34m++++\e[0m\e[42;32m\r
-\e[0m\e[0mSeg:ca6        Size:273        Owner:0xfde\r
-\e[44;34m++++\e[0m\e[42;32m000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r
+\e[0m\e[0mSeg:cc8        Size:273        Owner:0xfde\r
+\e[44;34m+++++\e[0m\e[42;32m0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r
 \e[0m\e[0mSeg:9fde       Size:28706      Owner:0x0\r
 \e[41;31m\e[0m\e[42;32m\r
 \e[0m\e[0mSeg:9ffe       Size:16386      Owner:0x0\r
index 2e06a768004248e1dfe1dac64e3bcd8b81c4e4bf..5bad126273a3882136631318e8e68b81cdb942a7 100755 (executable)
Binary files a/MMDUMP.16B and b/MMDUMP.16B differ
index 8939ee24d4a862ff508cd956b80ec814c4741cd3..a86e8183762894315e6a60343929f1191e77a859 100755 (executable)
Binary files a/bcexmm.exe and b/bcexmm.exe differ
index 9b9bba0d439e54533f988453065514e50b5a4b39..e5ab4e6fe8291cf9cf99e35c77b293b2a4f426bd 100755 (executable)
Binary files a/bcexmm.prj and b/bcexmm.prj differ
index d6a44fc613d8511c42158cf3caa38ba9d4f5f80b..1bd9671f2ffe15017ac32c68bc5fddfa42d1f0b0 100755 (executable)
@@ -132,7 +132,7 @@ for(w=0;w<2;w++)
        //printf("red = locked\n");\r
        printf("press any key to continue!\n");\r
        getch();\r
-       MM_ShowMemory(&gvar, &gvar.mm);\r
+       MM_ShowMemory(&gvar);\r
        MM_DumpData(&gvar.mm);\r
        MM_Report_(&gvar);\r
        if(baka) printf("\nyay!\n");\r
index 67251d4384b32c1aabd98ec8e454f607f2aeba1d..46489c7015125477829ab7a23eb05069360d0be5 100755 (executable)
 \r
 //===========================================================================\r
 \r
+/*\r
+==================\r
+=\r
+= DebugMemory\r
+=\r
+==================\r
+*/\r
+\r
+void DebugMemory (global_game_variables_t *gvar)\r
+{\r
+       /*VW_FixRefreshBuffer ();\r
+       US_CenterWindow (16,7);\r
+\r
+       US_CPrint ("Memory Usage");\r
+       US_CPrint ("------------");\r
+       US_Print ("Total     :");\r
+       US_PrintUnsigned (mminfo.mainmem/1024);\r
+       US_Print ("k\nFree      :");\r
+       US_PrintUnsigned (MM_UnusedMemory()/1024);\r
+       US_Print ("k\nWith purge:");\r
+       US_PrintUnsigned (MM_TotalFree()/1024);\r
+       US_Print ("k\n");\r
+       VW_UpdateScreen();*/\r
+       IN_Ack ();\r
+       MM_ShowMemory (gvar);\r
+}\r
+\r
 /*\r
 ==========================\r
 =\r
index 9b3df181b949cd3dc8e711c80771d0db730581f5..5529ec6250feba88722796c88fa90f0ade6844bb 100755 (executable)
 #define        __16_LIB__\r
 \r
 #include "src/lib/16_head.h"\r
+#include "src/lib/16_mm.h"\r
 #include "src/lib/16_in.h"\r
 \r
+void DebugMemory (global_game_variables_t *gvar);\r
 void Quit (char *error);\r
 \r
 #endif\r
index a8a5a4674e069eec28c39a52e46ac86219e2785f..d14479d5e1b2075efe44aa738813cdb74ea7f8bb 100755 (executable)
@@ -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);
index 48c64353a8f52e5a7bdf9fe8bd2104fdfd1c223f..33e1e526cfb55f87c27e0120ec225a42f96d77a8 100755 (executable)
@@ -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);
index 11bfc670cfd023b950912fee976d5a6aa0125ff4..1c8a15aa96201e1a6bdb038cef52905e67c6fe72 100755 (executable)
@@ -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);