From: sparky4 Date: Sat, 1 Jul 2017 00:16:30 +0000 (-0500) Subject: 16_ca needs huge amounts of work and I should remember what needs to be done soon... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=0df3c2d5e81ce6a2f1d498b3107e1fd223e7af80;p=16.git 16_ca needs huge amounts of work and I should remember what needs to be done soon[going to port rest of code to borland c some time so we can use the core components of id engine here ][going to add 16_us.c eventually but the debug system and CA_ PM_ and MM_ usage is priority now]older zcroll renamed to xcroll][zcroll is now the pre menu game loop system with PROPER data usage with CAMMPM] added 1st scroll back [i work on CA] palette debug show values added wwww and i need to know how to see vrs/vrl imaage data palette index numbers [i am trying to find out how the hell you get the index number values of VRL/VRS] [CA_CacheMap added seems to be used in start a new game] what is mapsegs? bcexmm reports normally again... it acts funny with a unsigned long being assigned coreleft()'s value[vrldbg.exe added for a dirivative of vrldbg thanks johncampbell321\!] i did some small things here and there. and shrinked the stack. and fixed some little warnings... i may move to model medium like wolf3d --- diff --git a/DEBUG.16W b/DEBUG.16W deleted file mode 100755 index c18d8eff..00000000 --- a/DEBUG.16W +++ /dev/null @@ -1,209 +0,0 @@ -Seg:0 Size:8351 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Seg:209f Size:256 Owner:0x5dfc -0 -Seg:21cd Size:76 Owner:0x0 -0 -Seg:2219 Size:256 Owner:0x1c32 -0 -Seg:2319 Size:256 Owner:0x1c34 -0 -Seg:2419 Size:256 Owner:0x1c36 -0 -Seg:2519 Size:256 Owner:0x1c38 -0 -Seg:2619 Size:256 Owner:0x1c3a -0 -Seg:2719 Size:256 Owner:0x1c3c -0 -Seg:2819 Size:256 Owner:0x1c3e -0 -Seg:2919 Size:256 Owner:0x1c40 -0 -Seg:2a19 Size:256 Owner:0x1c42 -0 -Seg:2b19 Size:256 Owner:0x1c44 -0 -Seg:2c19 Size:256 Owner:0x1c46 -0 -Seg:2d19 Size:256 Owner:0x1c48 -0 -Seg:2e19 Size:256 Owner:0x1c4a -0 -Seg:2f19 Size:256 Owner:0x1c4c -0 -Seg:3019 Size:256 Owner:0x1c4e -0 -Seg:3119 Size:256 Owner:0x1c50 -0 -Seg:3219 Size:256 Owner:0x1c52 -0 -Seg:3319 Size:256 Owner:0x1c54 -0 -Seg:3419 Size:256 Owner:0x1c56 -0 -Seg:3519 Size:256 Owner:0x1c58 -0 -Seg:3619 Size:256 Owner:0x1c5a -0 -Seg:3719 Size:256 Owner:0x1c5c -0 -Seg:3819 Size:256 Owner:0x1c5e -0 -Seg:3919 Size:256 Owner:0x1c60 -0 -Seg:3a19 Size:256 Owner:0x1c62 -0 -Seg:3b19 Size:256 Owner:0x1c64 -0 -Seg:3c19 Size:256 Owner:0x1c66 -0 -Seg:3d19 Size:256 Owner:0x1c68 -0 -Seg:3e19 Size:256 Owner:0x1c6a -0 -Seg:3f19 Size:256 Owner:0x1c6c -0 -Seg:4019 Size:256 Owner:0x1c6e -0 -Seg:4119 Size:256 Owner:0x1c70 -0 -Seg:4219 Size:256 Owner:0x1c72 -0 -Seg:4319 Size:256 Owner:0x1c74 -0 -Seg:4419 Size:256 Owner:0x1c76 -0 -Seg:4519 Size:256 Owner:0x1c78 -0 -Seg:4619 Size:256 Owner:0x1c7a -0 -Seg:4719 Size:256 Owner:0x1c7c -0 -Seg:4819 Size:256 Owner:0x1c7e -0 -Seg:4919 Size:256 Owner:0x1c80 -0 -Seg:4a19 Size:256 Owner:0x1c82 -0 -Seg:4b19 Size:256 Owner:0x1c84 -0 -Seg:4c19 Size:256 Owner:0x1c86 -0 -Seg:4d19 Size:256 Owner:0x1c88 -0 -Seg:4e19 Size:256 Owner:0x1c8a -0 -Seg:4f19 Size:256 Owner:0x1c8c -0 -Seg:5019 Size:256 Owner:0x1c8e -0 -Seg:5119 Size:256 Owner:0x1c90 -0 -Seg:5219 Size:256 Owner:0x1c92 -0 -Seg:5319 Size:256 Owner:0x1c94 -0 -Seg:5419 Size:256 Owner:0x1c96 -0 -Seg:5519 Size:256 Owner:0x1c98 -0 -Seg:5619 Size:256 Owner:0x1c9a -0 -Seg:5719 Size:256 Owner:0x1c9c -0 -Seg:5819 Size:256 Owner:0x1c9e -0 -Seg:5919 Size:256 Owner:0x1ca0 -0 -Seg:5a19 Size:256 Owner:0x1ca2 -0 -Seg:5b19 Size:256 Owner:0x1ca4 -0 -Seg:5c19 Size:256 Owner:0x1ca6 -0 -Seg:5d19 Size:256 Owner:0x1ca8 -0 -Seg:5e19 Size:256 Owner:0x1caa -0 -Seg:5f19 Size:256 Owner:0x1cac -0 -Seg:6019 Size:256 Owner:0x1cae -0 -Seg:6119 Size:256 Owner:0x1cb0 -0 -Seg:6219 Size:256 Owner:0x1cb2 -0 -Seg:6319 Size:256 Owner:0x1cb4 -0 -Seg:6419 Size:256 Owner:0x1cb6 -0 -Seg:6519 Size:256 Owner:0x1cb8 -0 -Seg:6619 Size:256 Owner:0x1cba -0 -Seg:6719 Size:256 Owner:0x1cbc -0 -Seg:6819 Size:256 Owner:0x1cbe -0 -Seg:6919 Size:256 Owner:0x1cc0 -0 -Seg:6a19 Size:256 Owner:0x1cc2 -0 -Seg:6b19 Size:256 Owner:0x1cc4 -0 -Seg:6c19 Size:256 Owner:0x1cc6 -0 -Seg:6d19 Size:256 Owner:0x1cc8 -0 -Seg:6e19 Size:256 Owner:0x1cca -0 -Seg:6f19 Size:256 Owner:0x1ccc -0 -Seg:7019 Size:256 Owner:0x1cce -0 -Seg:7119 Size:256 Owner:0x1cd0 -0 -Seg:7219 Size:256 Owner:0x1cd2 -0 -Seg:7319 Size:256 Owner:0x1cd4 -0 -Seg:7419 Size:256 Owner:0x1cd6 -0 -Seg:7519 Size:256 Owner:0x1cd8 -0 -Seg:7619 Size:256 Owner:0x1cda -0 -Seg:7719 Size:256 Owner:0x1cdc -0 -Seg:7819 Size:256 Owner:0x1cde -0 -Seg:7919 Size:256 Owner:0x1ce0 -0 -Seg:7a19 Size:256 Owner:0x1ce2 -0 -Seg:7b19 Size:256 Owner:0x1ce4 -0 -Seg:7c19 Size:256 Owner:0x1ce6 -0 -Seg:7d19 Size:256 Owner:0x1ce8 -0 -Seg:7e19 Size:256 Owner:0x1cea -0 -Seg:7f19 Size:256 Owner:0x1cec -0 -Seg:8019 Size:256 Owner:0x1cee -0 -Seg:8119 Size:256 Owner:0x1cf0 -0 -Seg:8219 Size:256 Owner:0x1cf2 -0 -Seg:8319 Size:256 Owner:0x1cf4 -0 -Seg:8419 Size:256 Owner:0x1cf6 -0 -Seg:8519 Size:256 Owner:0x1cf8 -0 -Seg:8619 Size:273 Owner:0x5dfc -00000000000000000000000000000000000000000000000000000000000000000000000000 -Seg:9e04 Size:25083 Owner:0x0 - \ No newline at end of file diff --git a/HEAP.16W b/HEAP.16W deleted file mode 100755 index f2513717..00000000 --- a/HEAP.16W +++ /dev/null @@ -1,39 +0,0 @@ - - == near == - - USED block at 120e:e726 of size 12 - USED block at 120e:e732 of size 322 - USED block at 120e:e874 of size 52 - USED block at 120e:e8a8 of size 20 - USED block at 120e:e8bc of size 20 - USED block at 120e:e8d0 of size 20 - USED block at 120e:e8e4 of size 20 - USED block at 120e:e8f8 of size 20 - FREE block at 120e:e90c of size 5872 -OK - end of heap - - == far == - - USED block at 220f:0016 of size 136 - FREE block at 220f:009e of size 48840 - USED block at 220f:bf66 of size 20 - FREE block at 220f:bf7a of size 16514 - FREE block at 3210:0016 of size 65510 - FREE block at 4211:0016 of size 65510 - FREE block at 5212:0016 of size 65510 - FREE block at 6213:0016 of size 65510 - FREE block at 7214:0016 of size 65510 - FREE block at 8215:0016 of size 65510 - FREE block at 9216:0016 of size 49174 -OK - end of heap - -Memory Type Total Used Free ----------------- -------- -------- -------- -Near 6358 486 5872 -Far 48992 156 48836 ----------------- -------- -------- -------- -HC_coreleft = 5870 -HC_farcoreleft = 513440 -coreleft = 5870 -farcoreleft = 513440 -stackavail = 31495 diff --git a/MMDUMP.16W b/MMDUMP.16W deleted file mode 100755 index 87b2a62f..00000000 Binary files a/MMDUMP.16W and /dev/null differ diff --git a/bcexmm.exe b/bcexmm.exe index 546da27f..183a0a7b 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/makefile b/makefile index 82edd300..6b4a2fea 100755 --- a/makefile +++ b/makefile @@ -36,7 +36,7 @@ # serial output is plain text ASCII. DEBUGSERIAL=1 -DELLOGFILE=0 +DELLOGFILE=1 #192x144 #wwww will add these @@ -115,7 +115,7 @@ WCLQ=-zq UPXQ=-qqq # symbolic debug for wsample/wprof/wd -D_FLAGS=-d2#1+ +D_FLAGS=-d1#+ # stacksize STKSIZ=32768 @@ -125,11 +125,11 @@ STKSIZ=32768 # compile flags # S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k$(STKSIZ) -Z_FLAGS=-zk0 -zc#### -zp4 -ei#### -zm +Z_FLAGS=-zk0 -zc#### -zp4 -ei# -zm O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 $(D_FLAGS) -fo=.$(OBJ)## -e=65536 -DBUGFLAGS=$(D_FLAGS) -fm=$^&.meh -fd=$^& +DBUGFLAGS=-fm=$^&.meh -fd=$^& $(D_FLAGS) CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 -DSTACKSIZE=$(STKSIZ) !ifeq DEBUGSERIAL 1 CPPFLAGS += -DDEBUGSERIAL @@ -287,7 +287,6 @@ fonttest.exe: fonttest.$(OBJ) gfx.lib #fonttes0.exe: fonttes0.$(OBJ) $(16LIB) fontgfx.exe: fontgfx.$(OBJ) gfx.lib $(DOSLIB) inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib -#inntest.exe: inntest.$(OBJ) $(16LIBNOINOBJS) 16_in_1.$(OBJ) $(DOSLIB) gfx.lib sountest.exe: sountest.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib imfplay.exe: imfplay.$(OBJ) $(16LIB) $(DOSLIB) gfx.lib vrldbg.exe: vrldbg.$(OBJ) #gfx.lib $(DOSLIB) @@ -298,12 +297,12 @@ palettec.exe: palettec.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) palettel.exe: palettel.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) palbomb.exe: palbomb.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) palllist.exe: palllist.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) ll.$(OBJ) -pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIB) +pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIB) #planrpcx.exe: planrpcx.$(OBJ) gfx.lib maptest.exe: maptest.$(OBJ) 16_map.$(OBJ) 16_head.$(OBJ) gfx.lib $(DOSLIB) $(16LIB) -fmemtest.exe: fmemtest.$(OBJ) -exmmtest.exe: exmmtest.$(OBJ) 16_pm.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_mm.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ) 16_vl_1.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_dbg.$(OBJ) - #$(16LIB) gfx.lib $(DOSLIB) +fmemtest.exe: fmemtest.$(OBJ) +exmmtest.exe: exmmtest.$(OBJ) $(16LIB) gfx.lib $(DOSLIB) + #16_pm.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_mm.$(OBJ) 16_hc.$(OBJ) kitten.$(OBJ) 16_vl_1.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_dbg.$(OBJ) vgmtest.exe: vgmtest.$(OBJ) vgmsnd.lib $(16LIB) $(DOSLIB) gfx.lib db.exe: db.$(OBJ) diff --git a/src/exmmtest.h b/src/exmmtest.h index 3666dfd1..aa63cd4f 100755 --- a/src/exmmtest.h +++ b/src/exmmtest.h @@ -51,7 +51,7 @@ #define NOVID #endif #ifdef __WATCOMC__ -#define NOVID +//#define NOVID //#define SCROLLLOAD #endif diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index ab870cbb..6c3858e3 100755 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -52,10 +52,10 @@ long HC_Newfarcoreleft() #endif //from: https://stackoverflow.com/questions/14386856/c-check-available-ram -void __near* HC_LargestFreeBlock(size_t* Size) +void NPTR* HC_LargestFreeBlock(size_t* Size) { size_t s0, s1; - void __near* p; + void NPTR* p; s0 = ~(size_t)0 ^ (~(size_t)0 >> 1); while (s0 && (p = _nmalloc(s0)) == NULL) diff --git a/src/lib/16_hc.h b/src/lib/16_hc.h index 36b95841..2b77b538 100755 --- a/src/lib/16_hc.h +++ b/src/lib/16_hc.h @@ -34,23 +34,20 @@ typedef struct heapusage int heap_status; } hc_use_t; -#ifdef __BORLANDC__ -#if 0 -/*typedef */struct _heapinfo -{ - int _far *_pentry; //- heap entry pointer - size_t _size; //- size of heap entry - int _useflag; //- entry in use return value -};// _heapinfo_t; +#ifdef __WATCOMC__ +#define NPTR __near #endif +#ifdef __BORLANDC__ +#define NPTR + #define _HEAPBADBEGIN 2 /* heap header is corrupted */ #define _HEAPBADNODE 3 /* heap entry is corrupted */ #define _HEAPBADPTR 5 /* invalid heap entry pointer (_heapwalk) */ #endif //long HC_Newfarcoreleft(); -void __near* HC_LargestFreeBlock(size_t* Size); +void NPTR* HC_LargestFreeBlock(size_t* Size); size_t HC_coreleft(void); void far* HC_LargestFarFreeBlock(dword* Size); unsigned long HC_farcoreleft(void); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 544d280a..a5903b0c 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -1357,13 +1357,20 @@ extern char global_temp_status_text2[512]; ===================== */ + void MM_ShowMemory (global_game_variables_t *gvar) { mmblocktype far *scan; - unsigned color,temp,x,y ,w,q,width; + unsigned color,temp,x,y ,w,width; sdword end,owner; byte scratch[160],scratch0[4096],str[16]; +#ifdef MMSMSCANINFO mmshowmemoryinfo_t scaninfo[MAXBLOCKS]; + byte scratch1[4]; + unsigned xpos,ypos, oldq,q,maxq; + boolean done,restarted; + ScanCode scancode; +#endif if(!gvar->video.page[0].width) gvar->video.page[0].sw = gvar->video.page[0].width = 320; //to prevent division by 0 //-- VL_SetLineWidth(40, gvar); @@ -1371,16 +1378,23 @@ void MM_ShowMemory (global_game_variables_t *gvar) //gvar->video.ofs.bufferofs = gvar->video.ofs.displayofs; temp = BDOFSCONV gvar->video.BOFS; gvar->video.BOFS = gvar->video.DOFS; +#ifdef MMSMSCANINFO + oldq = 0; restarted = false; +reset: + q = 0; +#endif scan = gvar->mm.mmhead; end = -1; w = 0; - width = gvar->video.page[0].width; q = 0; + width = gvar->video.page[0].width; CA_OpenDebug (gvar); while (scan) { +#ifdef MMSMSCANINFO scaninfo[q].scan = scan; +#endif strcpy(scratch, AARESET); if(scan->attributes & PURGEBITS) { @@ -1411,8 +1425,18 @@ void MM_ShowMemory (global_game_variables_t *gvar) end = scan->length-1; y = scan->start/width; x = scan->start%width; - scaninfo[q].x = x; - scaninfo[q].y = y; +#ifdef MMSMSCANINFO + if(restarted){ + y += gvar->video.page[0].dy; + x += gvar->video.page[0].dx; + } +#if 0 + else{ + scaninfo[q].y = y; + scaninfo[q].x = x; + } +#endif +#endif VW_Hlin(x,x+end,y,color,gvar); VL_Plot(x,y,5,gvar); //++==++==optional strcat(scratch0, AARESET); strcat(scratch0, AAGREY); strcat(scratch0,"_"); @@ -1477,19 +1501,22 @@ void MM_ShowMemory (global_game_variables_t *gvar) //0000fprintf(stdout, "[%u]\n", q); scan = scan->next; +#ifdef MMSMSCANINFO q++; -//if(color!=6) IN_Ack(gvar); +#endif +//0000if(q==1 && gvar->video.VL_Started && color!=6) IN_Ack(gvar); } CA_CloseDebug (gvar); -#ifdef MMSMPANVID +#if 0 +//def MMSMPANVID { int dx,dy,odx,ody; odx = gvar->video.page[0].dx; ody = gvar->video.page[0].dy; dx = dy = 0; - while(!gvar->in.inst->Keyboard[sc_Escape]) + while(!gvar->in.inst->Keyboard[sc_Escape] && !gvar->in.inst->Keyboard[sc_Space]) { if(gvar->in.inst->Keyboard[sc_UpArrow]) { @@ -1521,16 +1548,156 @@ void MM_ShowMemory (global_game_variables_t *gvar) } #endif #ifdef MMSMSCANINFO - MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar); +//#define MMSMSCANINFOXYPOSNEW +//{ + maxq = q; + if(restarted) q = oldq; + else q = 0; + restarted = false; + + IN_Ack(gvar); +// VL_ClearVideo (8); + for (done = false;!done;) + { + if(scaninfo[q].scan->attributes & PURGEBITS) + { + color = 6; // dark purple = purgable + strcpy(scratch1, AAMAGENTA); // dark purple = purgable + //printf("%s", AAMAGENTA); + }else{ + color = 2; // medium blue = non purgable + strcpy(scratch1, AABLUE); // medium blue = non purgable + //printf("%s", AABLUE); + } + if(scaninfo[q].scan->attributes & LOCKBIT) + { + color = 1; // red = locked + strcpy(scratch1, AARED); // red = locked + //printf("%s", AARED); + } + end = scaninfo[q].scan->length-1; +//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str); +#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, color, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; +#ifdef __WATCOMC__ + if(gvar->video.VL_Started) + { + VL_ShowPage(&gvar->video.page[0], 1, 0); + modexClearRegion(&gvar->video.page[0], 0, 0, gvar->video.page[0].width, gvar->video.page[0].height, 8); + }else +#endif + clrscr(); + sprintf(global_temp_status_text, "block #%04u", q); MMSMPRINTMEMINFO +// sprintf(global_temp_status_text, "%Fp", scaninfo[q].scan->useptr); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "start: %04x", (unsigned)scaninfo[q].scan->start); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "useptr: %04x", (unsigned)scaninfo[q].scan->useptr); MMSMPRINTMEMINFO + sprintf(global_temp_status_text, "size: %05u", (unsigned)scaninfo[q].scan->length); MMSMPRINTMEMINFO + if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) + { + sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[q].scan->next->start-scaninfo[q].scan->start)); MMSMPRINTMEMINFO + }else ypos+=8; + if(gvar->video.VL_Started) + { + y = scaninfo[q].scan->start/width; + x = scaninfo[q].scan->start%width; +#ifndef MMSMSCANINFOXYPOSNEW + y = ypos; + x = xpos; +#else + //y = scaninfo[q].y; + //x = scaninfo[q].x; + y += gvar->video.page[0].dy; + x += gvar->video.page[0].dx; +#endif + VW_Hlin(x,x+end,y,color,gvar); + VL_Plot(x,y,5,gvar); + } + else + { + printf("%s", scratch1); + printf("%s", AAGREY); printf("_"); + if(scaninfo[q].scan->length<64000) + for(w=(scaninfo[q].scan->start)/80;w<=end/80;w++) + { + //strcat(scratch1, "+"); + printf("+"); + } + } + + + if (scaninfo[q].scan->next && scaninfo[q].scan->next->start > end+1) if(!gvar->video.VL_Started) + { + //strcat(scratch1, AARESET); + printf("%s", AARESET); + //strcat(scratch1,AAGREEN); + printf("%s", AAGREEN); + for(w=(end+1)/80;w<=((scaninfo[q].scan->next->start-scaninfo[q].scan->start)/80);w++) + { + //strcat(scratch1,"0"); + printf("0"); + } + }else VW_Hlin(x+end+1,x+(scaninfo[q].scan->next->start-scaninfo[q].scan->start),y,3,gvar); // black = free//now green + + + if(gvar->video.VL_Started) + { + //if (scan->next && scan->next->start > end+1) free + xpos = gvar->video.page[0].dx; + ypos = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4 + } + else + { + //printf("%s\n", scratch1); + printf("%s", AARESET); + printf("\n"); + } + + + while (!(scancode = gvar->in.inst->LastScan)){} + + IN_ClearKey(scancode); + switch (scancode) + { + case sc_LeftArrow: + if(q>0) q--; + else q = maxq; + break; + case sc_RightArrow: + if(q10) q-=10; + else q = maxq; + break; + case sc_DownArrow: + if(qmm.mmhead; +// x = gvar->video.page[0].dx; +// y = gvar->video.page[0].dy;//(gvar->video.page[0].sh-(32));//8*4 + oldq = q; + restarted = true; + goto reset; + break; + case sc_Escape: + done = true; + break; + } + } +//} +// MM_ShowMemoryDetail (x, y, w, q, end, &scaninfo, gvar); #endif - if(gvar->video.VL_Started) IN_Ack(gvar); +//?? if(gvar->video.VL_Started) IN_Ack(gvar); gvar->video.BOFS = (byte __far *)temp; } -#ifdef MMSMSCANINFO +#if 0 +//def MMSMSCANINFO void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar) { byte scratch1[4]; @@ -1560,13 +1727,7 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword //printf("%s", AARED); } end = scaninfo[q].scan->length-1; -/*typedef struct mmblockstruct{ - word start,length; - unsigned attributes; - memptr *useptr; // pointer to the segment start - struct mmblockstruct far *next; -} mmblocktype;*/ - //modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str); +//modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str); #define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 1, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8; #ifdef __WATCOMC__ if(gvar->video.VL_Started) @@ -1632,7 +1793,7 @@ void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword printf("\n"); } //0000printf("%s", AABLACK); fprintf(stdout, "q=%u maxq=%u\n", q, maxq); printf("%s", AARESET); -fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax +//fprintf(stdout, ""); //this is a HAX to make it decrement and increment properly when it is at 0 and qmax while (!(scancode = gvar->in.inst->LastScan)){} IN_ClearKey(scancode); diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 8f499423..d401adde 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -201,7 +201,7 @@ void MM_SetPurge (memptr *baseptr, int purge, global_game_variables_t *gvar); void MM_SetLock (memptr *baseptr, boolean locked, global_game_variables_t *gvar); void MM_SortMem (global_game_variables_t *gvar); void MM_ShowMemory (global_game_variables_t *gvar); -void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar); +//void MM_ShowMemoryDetail (unsigned x, unsigned y, unsigned w, unsigned q, sdword end, mmshowmemoryinfo_t *scaninfo, global_game_variables_t *gvar); void MM_DumpData (global_game_variables_t *gvar); dword MM_UnusedMemory (global_game_variables_t *gvar); dword MM_TotalFree (global_game_variables_t *gvar); diff --git a/src/lib/16_tdef.h b/src/lib/16_tdef.h index 2d3e6067..bb886801 100755 --- a/src/lib/16_tdef.h +++ b/src/lib/16_tdef.h @@ -496,7 +496,7 @@ typedef struct mmblockstruct typedef struct mmshowmemoryinfo { - word x,y; +// unsigned x,y; mmblocktype far *scan; } mmshowmemoryinfo_t; diff --git a/src/lib/16_vl.c b/src/lib/16_vl.c index 106f7192..1f5754d9 100755 --- a/src/lib/16_vl.c +++ b/src/lib/16_vl.c @@ -545,6 +545,9 @@ void modexHiganbanaPageSetup(global_game_variables_t *gvar) gvar->video.page[1].dx=gvar->video.page[1].dy=TILEWH; // 1 tile size buffer gvar->video.page[2].dx=gvar->video.page[2].dy= gvar->video.page[3].dx=gvar->video.page[3].dy=0; // cache pages are buffer wwww + + gvar->video.page[0].tlx=gvar->mv[0].tx*TILEWH; + gvar->video.page[0].tly=gvar->mv[0].ty*TILEWH; } // diff --git a/src/lib/doslib b/src/lib/doslib index 9105fb6b..4a5b0a9a 160000 --- a/src/lib/doslib +++ b/src/lib/doslib @@ -1 +1 @@ -Subproject commit 9105fb6b1a87976bbcd38521732564c87bebb9a7 +Subproject commit 4a5b0a9ac65c61b586956cb4ba103c12b3679ad4