+-------------------------------------------------------------------------------\r
+ ./qwolf.sh start\r
+-------------------------------------------------------------------------------\r
+==== 16/wf3d8086 ====\r
16/wf3d8086/contigsc.c: shape = PM_GetSpritePage (shapenum);\r
16/wf3d8086/contigsc.c: shape = PM_GetSpritePage (shapenum);\r
\r
16/wf3d8086/id_sd.c: addr = PM_GetSoundPage(page);\r
16/wf3d8086/id_sd.c: PM_SetPageLock(PMSoundStart + page,pml_Locked);\r
16/wf3d8086/id_sd.c: PM_SetPageLock(i + PMSoundStart,pml_Unlocked);\r
+16/wf3d8086/id_sd.c: DigiNextLen = (DigiLeft >= PMPageSize)? PMPageSize : (DigiLeft % PMPageSize);\r
+16/wf3d8086/id_sd.c: DigiLastEnd = DigiPage + ((DigiLeft + (PMPageSize - 1)) / PMPageSize);\r
+16/wf3d8086/id_sd.c: len = (DigiLeft >= PMPageSize)? PMPageSize : (DigiLeft % PMPageSize);\r
16/wf3d8086/id_sd.c: PM_UnlockMainMem();\r
+16/wf3d8086/id_sd.c: MM_GetPtr(&list,PMPageSize);\r
16/wf3d8086/id_sd.c: PM_CheckMainMem();\r
16/wf3d8086/id_sd.c: p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0);\r
+16/wf3d8086/id_sd.c: _fmemcpy((void far *)list,(void far *)p,PMPageSize);\r
+16/wf3d8086/id_sd.c: pg = PMSoundStart;\r
+16/wf3d8086/id_sd.c: for (i = 0;i < PMPageSize / (sizeof(word) * 2);i++,p += 2)\r
+16/wf3d8086/id_sd.c: pg += (p[1] + (PMPageSize - 1)) / PMPageSize;\r
16/wf3d8086/id_sd.c: PM_UnlockMainMem();\r
\r
16/wf3d8086/wl_act2.c: PM_UnlockMainMem ();\r
16/wf3d8086/wl_act2.c: PM_CheckMainMem ();\r
\r
+16/wf3d8086/wl_debug.c: page = &PMPages[i];\r
+16/wf3d8086/wl_debug.c: if (i < PMSpriteStart)\r
+16/wf3d8086/wl_debug.c: else if (i < PMSoundStart)\r
16/wf3d8086/wl_debug.c: addr = PM_GetPageAddress(i);\r
+16/wf3d8086/wl_debug.c: if (i < PMSpriteStart)\r
+16/wf3d8086/wl_debug.c: else if (i < PMSoundStart)\r
+16/wf3d8086/wl_debug.c: SimpleScaleShape (160, i-PMSpriteStart, 64);\r
+16/wf3d8086/wl_debug.c: k += (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
+16/wf3d8086/wl_debug.c: k = (DigiList[(j * 2) + 1] + (PMPageSize - 1)) / PMPageSize;\r
+16/wf3d8086/wl_debug.c: (i >= PMSoundStart + DigiList[j * 2])\r
+16/wf3d8086/wl_debug.c: && (i < PMSoundStart + DigiList[j * 2] + k)\r
+16/wf3d8086/wl_debug.c: US_PrintUnsigned(i - PMSoundStart - DigiList[j * 2]);\r
+16/wf3d8086/wl_debug.c: i = PMSpriteStart;\r
+16/wf3d8086/wl_debug.c: i = PMSoundStart;\r
16/wf3d8086/wl_debug.c: PM_GetPage(j);\r
16/wf3d8086/wl_debug.c: PM_GetPage(i);\r
\r
+16/wf3d8086/wl_draw.c:#define DOORWALL (PMSpriteStart-8)\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage);\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1);\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
16/wf3d8086/wl_draw.c: *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
-\r
16/wf3d8086/wl_draw.c: PM_NextFrame();\r
\r
16/wf3d8086/wl_game.c: PM_UnlockMainMem();\r
16/wf3d8086/wl_main.c: PM_Startup ();\r
16/wf3d8086/wl_main.c: PM_UnlockMainMem ();\r
\r
+16/wf3d8086/wl_menu.c: StartCPMusic(MENUSONG);\r
16/wf3d8086/wl_menu.c: PM_CheckMainMem ();\r
+16/wf3d8086/wl_menu.c: StartCPMusic(MENUSONG);\r
16/wf3d8086/wl_menu.c: PM_CheckMainMem ();\r
\r
16/wf3d8086/wl_play.c: PM_CheckMainMem ();\r
\r
16/wf3d8086/wolfhack.c: src = PM_GetPage(0);\r
16/wf3d8086/wolfhack.c: src = PM_GetPage(1);\r
+=============== ./qwolf.sh end ===============\r
IN_ClearKey(scan);\r
switch (scan)\r
{\r
- case sc_Space:\r
- MM_ShowMemory(&gvar);\r
- break;\r
+// case sc_Space:\r
+// MM_ShowMemory(&gvar);\r
+// break;\r
//#ifdef __WATCOMC__\r
case sc_O:\r
VL_modexPalScramble(&gvar.video.palette); modexpdump(&gvar.video.page);\r
=====================\r
*/\r
\r
-#define MMSMPANVID\r
+#ifdef __WATCOMC__\r
+//#define MMSMPANVID\r
+#define MMSMSCANINFO\r
+#endif\r
\r
void MM_ShowMemory (global_game_variables_t *gvar)\r
{\r
mmblocktype far *scan;\r
- unsigned color,temp,x,y ,w,width;\r
+ unsigned color,temp,x,y ,w,q,width;\r
sdword end,owner;\r
- byte scratch[160],scratch0[4096],str[16];\r
+ byte scratch[160],scratch0[4096],str[16];\r
+ mmshowmemoryinfo_t scaninfo[MAXBLOCKS];\r
\r
if(!gvar->video.page[0].width) gvar->video.page[0].sw = gvar->video.page[0].width = 320; //to prevent division by 0\r
//-- VL_SetLineWidth(40, gvar);\r
\r
end = -1; w = 0;\r
\r
- width = gvar->video.page[0].width;\r
+ width = gvar->video.page[0].width; q = 0;\r
\r
CA_OpenDebug (gvar);\r
while (scan)\r
{\r
+ scaninfo[q].scan = scan;\r
strcpy(scratch, AARESET);\r
if(scan->attributes & PURGEBITS)\r
{\r
end = scan->length-1;\r
y = scan->start/width;\r
x = scan->start%width;\r
+ scaninfo[q].x = x;\r
+ scaninfo[q].y = y;\r
VW_Hlin(x,x+end,y,color,gvar);\r
VL_Plot(x,y,5,gvar);\r
for(w=(scan->start)/80;w<=end/80;w++)\r
//fprintf(stdout, "%s", scratch);\r
\r
scan = scan->next;\r
+ q++;\r
//if(color!=6) IN_Ack(gvar);\r
}\r
\r
gvar->video.page[0].dx = odx;\r
gvar->video.page[0].dy = ody;\r
}\r
-#else\r
- IN_Ack(gvar);\r
#endif\r
+#ifdef MMSMSCANINFO\r
+ {\r
+ unsigned maxq = q;\r
+ boolean done;\r
+ ScanCode scancode;\r
+ int xpos,ypos;\r
+ word qq, ccolor = 3;\r
+ IN_Ack(gvar);\r
+// VL_ClearVideo (8);\r
+ for (qq = 0,done = false;!done;)\r
+ {\r
+ if(scaninfo[qq].scan->attributes & PURGEBITS)\r
+ {\r
+ ccolor = 6; // dark purple = purgable\r
+ }else{\r
+ ccolor = 2; // medium blue = non purgable\r
+ }\r
+ if(scaninfo[qq].scan->attributes & LOCKBIT)\r
+ {\r
+ ccolor = 1; // red = locked\r
+ }\r
+/*typedef struct mmblockstruct{\r
+ word start,length;\r
+ unsigned attributes;\r
+ memptr *useptr; // pointer to the segment start\r
+ struct mmblockstruct far *next;\r
+} mmblocktype;*/\r
+ //modexprint(page, x, y, t, tlsw, color, bgcolor, vidsw, const byte *str);\r
+#define MMSMPRINTMEMINFO modexprint(&(gvar->video.page[0]), xpos, ypos, 1, 0, ccolor, 8, gvar->video.VL_Started, global_temp_status_text); ypos+=8;\r
+ VL_ShowPage(&gvar->video.page[0], 1, 0);\r
+ if(!gvar->video.VL_Started) clrscr();\r
+ sprintf(global_temp_status_text, "block #%04u", qq); MMSMPRINTMEMINFO\r
+// sprintf(global_temp_status_text, "%Fp", scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "%04x", (unsigned)scaninfo[qq].scan->useptr); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "size: %05u", (unsigned)scan->length); MMSMPRINTMEMINFO\r
+ sprintf(global_temp_status_text, "free: %05u", (unsigned)(scaninfo[qq].scan->next->start-scaninfo[qq].scan->start)); MMSMPRINTMEMINFO\r
+ //if (scan->next && scan->next->start > end+1) free\r
+ xpos = 16;\r
+ ypos = 16;//(gvar->video.page[0].sh-(32));//8*4\r
+ while (!(scancode = gvar->in.inst->LastScan)){}\r
+\r
+ IN_ClearKey(scancode);\r
+ switch (scancode)\r
+ {\r
+ case sc_LeftArrow:\r
+ if(qq>0) qq--;\r
+ else qq = maxq;\r
+ break;\r
+ case sc_RightArrow:\r
+ if(qq<maxq) qq++;\r
+ else qq = 0;\r
+ break;\r
+ case sc_Escape:\r
+ done = true;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+#endif\r
+\r
+ IN_Ack(gvar);\r
\r
gvar->video.BOFS = (byte __far *)temp;\r
}\r
struct mmblockstruct far *next;\r
} mmblocktype;\r
\r
+typedef struct mmshowmemoryinfo\r
+{\r
+ word x,y;\r
+ mmblocktype far *scan;\r
+} mmshowmemoryinfo_t;\r
+\r
typedef struct\r
{\r
dword nearheap,farheap,EMSmem,XMSmem,mainmem;\r
}\r
}\r
\r
-void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word col, word bgcol, boolean sw, const byte *str)\r
+void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str)\r
{\r
word s, o, w;\r
word x_draw;\r
word addrr;\r
byte c;\r
\r
- switch(sw)\r
+ switch(vidsw)\r
{\r
case 0:\r
printf("%s\n", str);\r
// no need for inline assembly!\r
// NTS: It might even be faster to just let the modexDrawChar point directly at ROM font than to copy per char! --J.C.\r
_fmemcpy(romFontsData.l,MK_FP(s,o+(w*c))/*ROM font location*/,w/*char size*/);\r
- modexDrawChar(page, x_draw/*for mode X planar use*/, t, col, bgcol, addrr);\r
+ modexDrawChar(page, x_draw/*for mode X planar use*/, t, color, bgcolor, addrr);\r
x_draw += 8; /* track X for edge of screen */\r
addrr += 2; /* move 8 pixels over (2 x 4 planar pixels per byte) */\r
}\r
#endif\r
\r
void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, word col, word bgcol, word addr);\r
-void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word col, word bgcol, boolean sw, const byte *str);\r
+void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word color, word bgcolor, boolean vidsw, const byte *str);\r
void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str);\r
void VL_modexPrintTextBox(global_game_variables_t *gvar);\r
void modexpdump(page_t *pee);\r