From: sparky4 Date: Thu, 6 Jul 2017 18:03:22 +0000 (-0500) Subject: before showmem workings X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=e646dd0bd9df6a064b2c7192eb675c2a4191c3b8;p=16.git before showmem workings --- diff --git a/makefile b/makefile index 6b4a2fea..06c0f45d 100755 --- a/makefile +++ b/makefile @@ -227,7 +227,8 @@ UTILEXEC = & palettel.exe & palllist.exe & palbomb.exe & - palettec.exe + palettec.exe & + ps.exe !ifdef __LINUX__ SPRIUTILEXEC = & pcx2vrl & diff --git a/ps.exe b/ps.exe deleted file mode 100755 index 832bb5d0..00000000 Binary files a/ps.exe and /dev/null differ diff --git a/src/lib/16_head.c b/src/lib/16_head.c index 1af19534..b371d109 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -198,3 +198,15 @@ void print_mem(void const *vp, size_t n) putchar('\n'); printf("\nstruct size is %zu bytes\n", n); }; + +//from: https://groups.google.com/forum/#!topic/comp.lang.asm.x86/QtuVXl43nDo +void hres (void) +{ + __asm { + mov ax,3 + int 10h + mov ax,1112h + xor bx,bx + int 10h + } +} diff --git a/src/lib/16_head.h b/src/lib/16_head.h index a92a21b5..8c5d5381 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -196,6 +196,7 @@ void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used int US_CheckParm(char *parm,char **strings); byte dirchar(byte in); void print_mem(void const *vp, size_t n); +void hres (void); #define PRINT_OPAQUE_STRUCT(p) print_mem((p), sizeof(*(p))) diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index a5903b0c..f3af11cc 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1413,12 +1413,8 @@ reset: { printf("\nend==%d\n\n", end); strcat(scratch, "MM_ShowMemory: Memory block order currupted!\n"); - strcat(scratch, "End's Size: "); - ultoa (end,str,10); - strcat (scratch,str); - strcat(scratch, "\nscan->start's Size: "); - ultoa (scan->start,str,10); - strcat (scratch,str); + strcat(scratch, "End's Size: "); ultoa (end,str,10); strcat (scratch,str); + strcat(scratch, "\nscan->start's Size: "); ultoa (scan->start,str,10); strcat (scratch,str); write(gvar->handle.debughandle,scratch,strlen(scratch)); Quit (gvar, "MM_ShowMemory: Memory block order currupted!"); } diff --git a/src/lib/doslib b/src/lib/doslib index 4a5b0a9a..cff67cda 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 4a5b0a9ac65c61b586956cb4ba103c12b3679ad4 +Subproject commit cff67cda35b51eb48c9fc4481034bda2d7ed7786 diff --git a/src/lib/scroll16.h b/src/lib/scroll16.h index 3c7bc559..f7db2a7a 100755 --- a/src/lib/scroll16.h +++ b/src/lib/scroll16.h @@ -42,7 +42,8 @@ #define SPRITE //#define TILERENDER -//0000#define SHOWFPS +//0000 +#define SHOWFPS //#define OLDWALKSHOWPAGESTUFF diff --git a/src/ps.c b/src/ps.c index d8e906ab..645006fc 100755 --- a/src/ps.c +++ b/src/ps.c @@ -4,6 +4,7 @@ void main() { static global_game_variables_t gvar; + hres(); printf("video:\n"); PRINT_OPAQUE_STRUCT(&gvar.video); printf("ca:\n");