]> 4ch.mooo.com Git - 16.git/commitdiff
pm mm and ca i am working on pm started wwww
authorsparky4 <sparky4@cock.li>
Thu, 15 Sep 2016 15:52:30 +0000 (10:52 -0500)
committersparky4 <sparky4@cock.li>
Thu, 15 Sep 2016 15:52:30 +0000 (10:52 -0500)
13 files changed:
bcexmm.dsk
bcexmm.exe
bcexmm.prj
makefile
pm.use
src/exmmtest.c
src/lib/16_head.c
src/lib/16_head.h
src/lib/16_mm.c
src/lib/16_mm.h
src/lib/16_pm.c
src/lib/16_pm.h
src/lib/typdefst.h

index 9d1c2ae5dac26efd4b845a894173c649cc46b58c..115d6b994d2d69428d3381c954644d065babb4e3 100755 (executable)
Binary files a/bcexmm.dsk and b/bcexmm.dsk differ
index d4ca4af8941a6d2e8f1b3552122810b957b51599..b0c69877343329517c174e3d05a2959544c08036 100755 (executable)
Binary files a/bcexmm.exe and b/bcexmm.exe differ
index 6a7ef6315f8aa11cdcd50480cf8f75c87940f4a6..8ea92c50e953a811ce892d6391feba6c4563ef26 100755 (executable)
Binary files a/bcexmm.prj and b/bcexmm.prj differ
index 229299188fa596d3f1093cf0218c8f4713d60888..41c581785c27ad0f04cd76e0f5e4b21ed564ed22 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -91,7 +91,7 @@ UPXQ=-qqq
 S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#54096#60000
 Z_FLAGS=-zk0 -zc -zp8 -zm
 O_FLAGS=-obmilr -oe=24 -out -oh -ei -onac -ol+ -ok##x
-T_FLAGS=-bt=dos -mh -0 -fpi87 -fo=.$(OBJ) -d1
+T_FLAGS=-bt=dos -mh -0 -fpi87 -fo=.$(OBJ) -d1 -e=256
 
 CPPFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1
 !ifeq DEBUGSERIAL 1
@@ -288,6 +288,7 @@ mapread.$(OBJ):   $(SRCLIB)/mapread.c $(SRCLIB)/mapread.h
 16_timer.$(OBJ):  $(SRCLIB)/16_timer.c $(SRCLIB)/16_timer.h
 16_in.$(OBJ):     $(SRCLIB)/16_in.c $(SRCLIB)/16_in.h
 16_mm.$(OBJ):     $(SRCLIB)/16_mm.c $(SRCLIB)/16_mm.h
+16_pm.$(OBJ):     $(SRCLIB)/16_pm.c $(SRCLIB)/16_pm.h
 16_ca.$(OBJ):     $(SRCLIB)/16_ca.c $(SRCLIB)/16_ca.h
 16_dbg.$(OBJ):    $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h
 midi.$(OBJ):      $(SRCLIB)/midi.c $(SRCLIB)/midi.h
diff --git a/pm.use b/pm.use
index e96744a7b1984be42a04c0720f6aa27db34c8a8d..a255a3a3a60237ca64ebd8f8e9d667576c466bb0 100755 (executable)
--- a/pm.use
+++ b/pm.use
@@ -66,7 +66,7 @@
 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:   PM_UnlockMainMem();\r
-Binary file 16/wf3d8086/obj/wolf3d.exe matches
+Binary file 16/wf3d8086/obj/wolf3d.exe matches\r
 16/wf3d8086/obj/wolf3d.map: 1A268H 1B44AH 011E3H ID_PM_TEXT         CODE\r
 16/wf3d8086/obj/wolf3d.map: 1A26:0008 11E3 C=CODE   S=ID_PM_TEXT     G=(none)  M=ID_PM.C    ACBP=28\r
 16/wf3d8086/obj/wolf3d.map: 1A26:02F3       _PM_CheckMainMem\r
@@ -145,438 +145,128 @@ Binary file 16/wf3d8086/obj/wolf3d.exe matches
 16/wf3d8086/wolf3d.map: 1912:114B       _PM_Shutdown\r
 16/wf3d8086/wolfhack.c:        src = PM_GetPage(0);\r
 16/wf3d8086/wolfhack.c:        src = PM_GetPage(1);\r
-16/wolf3d/WOLFSRC/CONTIGSC.C:  shape = PM_GetSpritePage (shapenum);
-16/wolf3d/WOLFSRC/CONTIGSC.C:  shape = PM_GetSpritePage (shapenum);
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_SetMainMemPurge() - Sets the purge level for all allocated main memory
-16/wolf3d/WOLFSRC/ID_PM.C://           blocks. This shouldn't be called directly - the PM_LockMainMem() and
-16/wolf3d/WOLFSRC/ID_PM.C://           PM_UnlockMainMem() macros should be used instead.
-16/wolf3d/WOLFSRC/ID_PM.C:PM_SetMainMemPurge(int level)
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_CheckMainMem() - If something besides the Page Mgr makes requests of
-16/wolf3d/WOLFSRC/ID_PM.C://   This routine now calls PM_LockMainMem() to make sure that any allocation
-16/wolf3d/WOLFSRC/ID_PM.C://           of the other blocks. Because PM_LockMainMem() is called,
-16/wolf3d/WOLFSRC/ID_PM.C://           PM_UnlockMainMem() needs to be called before any other part of the
-16/wolf3d/WOLFSRC/ID_PM.C:PM_CheckMainMem(void)
-16/wolf3d/WOLFSRC/ID_PM.C:     PM_LockMainMem();
-16/wolf3d/WOLFSRC/ID_PM.C://           necessary to make requests of the Memory Mgr, PM_UnlockMainMem()
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_SetupMainMem: Not enough main memory");
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_GetPageAddress() - Returns the address of a given page
-16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPageAddress(int pagenum)
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length);
-16/wolf3d/WOLFSRC/ID_PM.C:     addr = PM_GetPageAddress(orig);
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_GetPage() - Returns the address of the page, loading it if necessary
-16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPage(int pagenum)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_GetPage: Invalid page request");
-16/wolf3d/WOLFSRC/ID_PM.C:     if (!(result = PM_GetPageAddress(pagenum)))
-16/wolf3d/WOLFSRC/ID_PM.C:                     result = PM_GetPageAddress(pagenum);
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_SetPageLock() - Sets the lock type on a given page
-16/wolf3d/WOLFSRC/ID_PM.C:PM_SetPageLock(int pagenum,PMLockType lock)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_SetPageLock: Locking/unlocking non-sound page");
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_Preload() - Loads as many pages as possible into all types of memory.
-16/wolf3d/WOLFSRC/ID_PM.C:PM_Preload(boolean (*update)(word current,word total))
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit ("PM_Preload: Pages>=ChunksInFile");
-16/wolf3d/WOLFSRC/ID_PM.C:             PM_GetPage(page);
-16/wolf3d/WOLFSRC/ID_PM.C:             addr = PM_GetPage(oogypage);
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PM_Preload: XMS buffer failed");
-16/wolf3d/WOLFSRC/ID_PM.C:                             Quit ("PM_Preload: Pages>=ChunksInFile");
-16/wolf3d/WOLFSRC/ID_PM.C:                             Quit("PM_Preload: Exceeded XMS pages");
-16/wolf3d/WOLFSRC/ID_PM.C:                             Quit("PM_Preload: Page too long");
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_NextFrame() - Increments the frame counter and adjusts the thrash
-16/wolf3d/WOLFSRC/ID_PM.C:PM_NextFrame(void)
-16/wolf3d/WOLFSRC/ID_PM.C:                     sprintf(buf,"PM_NextFrame: Page %d is locked",i);
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_Reset() - Sets up caching structures
-16/wolf3d/WOLFSRC/ID_PM.C:PM_Reset(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_Startup() - Start up the Page Mgr
-16/wolf3d/WOLFSRC/ID_PM.C:PM_Startup(void)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_Startup: No main or EMS");
-16/wolf3d/WOLFSRC/ID_PM.C:     PM_Reset();
-16/wolf3d/WOLFSRC/ID_PM.C://   PM_Shutdown() - Shut down the Page Mgr
-16/wolf3d/WOLFSRC/ID_PM.C:PM_Shutdown(void)
-16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_GetSoundPage(v)      PM_GetPage(PMSoundStart + (v))
-16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_GetSpritePage(v)     PM_GetPage(PMSpriteStart + (v))
-16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_LockMainMem()        PM_SetMainMemPurge(0)
-16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_UnlockMainMem()      PM_SetMainMemPurge(3)
-16/wolf3d/WOLFSRC/ID_PM.H:extern       void    PM_Startup(void),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Shutdown(void),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Reset(void),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Preload(boolean (*update)(word current,word total)),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_NextFrame(void),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_SetPageLock(int pagenum,PMLockType lock),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_SetMainPurge(int level),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_CheckMainMem(void);
-16/wolf3d/WOLFSRC/ID_PM.H:extern       memptr  PM_GetPageAddress(int pagenum),
-16/wolf3d/WOLFSRC/ID_PM.H:                             PM_GetPage(int pagenum);                // Use this one to cache page
-16/wolf3d/WOLFSRC/ID_PM.H:void PM_SetMainMemPurge(int level);
-16/wolf3d/WOLFSRC/ID_SD.C:     addr = PM_GetSoundPage(page);
-16/wolf3d/WOLFSRC/ID_SD.C:     PM_SetPageLock(PMSoundStart + page,pml_Locked);
-16/wolf3d/WOLFSRC/ID_SD.C:             PM_SetPageLock(i + PMSoundStart,pml_Unlocked);
-16/wolf3d/WOLFSRC/ID_SD.C:     PM_UnlockMainMem();
-16/wolf3d/WOLFSRC/ID_SD.C:     PM_CheckMainMem();
-16/wolf3d/WOLFSRC/ID_SD.C:     p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0);
-16/wolf3d/WOLFSRC/ID_SD.C:     PM_UnlockMainMem();
-16/wolf3d/WOLFSRC/OLDSCALE.C:  shape = PM_GetSpritePage (shapenum);
-16/wolf3d/WOLFSRC/OLDSCALE.C:  shape = PM_GetSpritePage (shapenum);
-16/wolf3d/WOLFSRC/WL_ACT2.C:   PM_UnlockMainMem ();
-16/wolf3d/WOLFSRC/WL_ACT2.C:   PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_DEBUG.C:          addr = PM_GetPageAddress(i);
-16/wolf3d/WOLFSRC/WL_DEBUG.C:                          PM_GetPage(j);
-16/wolf3d/WOLFSRC/WL_DEBUG.C:                  PM_GetPage(i);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
-16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
-16/wolf3d/WOLFSRC/WL_DRAW.C:   PM_NextFrame();
-16/wolf3d/WOLFSRC/WL_GAME.C:   PM_UnlockMainMem();
-16/wolf3d/WOLFSRC/WL_GAME.C:   PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_GAME.C:   PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_GAME.C:           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_GAME.C:                   PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_INTER.C:  PM_Preload (PreloadUpdate);
-16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_Shutdown ();
-16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_Startup ();
-16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_UnlockMainMem ();
-16/wolf3d/WOLFSRC/WL_MENU.C:                           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_MENU.C:                           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_PLAY.C:    PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_PLAY.C:    PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();
-16/wolf3d/WOLFSRC/WL_SCALE.C:  shape = PM_GetSpritePage (shapenum);
-16/wolf3d/WOLFSRC/WL_SCALE.C:  shape = PM_GetSpritePage (shapenum);
-Binary file 16/wolf3d/WOLFSRC/WOLF3D.EXE matches
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 19127H 1A286H 01160H ID_PM_TEXT         CODE
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0007 1160 C=CODE   S=ID_PM_TEXT     G=(none)  M=ID_PM.C    ACBP=28
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF       _PM_CheckMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71       _PM_GetPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF       _PM_GetPageAddress
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA       _PM_NextFrame
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60       _PM_Preload
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle  _PM_Reset
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8       _PM_SetMainMemPurge
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31       _PM_SetPageLock
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B       _PM_Shutdown
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0       _PM_Startup
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8       _PM_SetMainMemPurge
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF       _PM_CheckMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF       _PM_GetPageAddress
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71       _PM_GetPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31       _PM_SetPageLock
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60       _PM_Preload
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA       _PM_NextFrame
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle  _PM_Reset
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0       _PM_Startup
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B       _PM_Shutdown
-16/wolf3d/WOLFSRC/WOLFHACK.C:  src = PM_GetPage(0);
-16/wolf3d/WOLFSRC/WOLFHACK.C:  src = PM_GetPage(1);
-16/wf3d8086/id_pm.c:// PML_MapEMS() - Maps a logical page to a physical page\r
-16/wf3d8086/id_pm.c:PML_MapEMS(word logical,word physical)\r
-16/wf3d8086/id_pm.c:           Quit("PML_MapEMS: Page mapping failed");\r
-16/wf3d8086/id_pm.c:// PML_StartupEMS() - Sets up EMS for Page Mgr's use\r
-16/wf3d8086/id_pm.c:PML_StartupEMS(void)\r
-16/wf3d8086/id_pm.c:// PML_ShutdownEMS() - If EMS was used, deallocate it\r
-16/wf3d8086/id_pm.c:PML_ShutdownEMS(void)\r
-16/wf3d8086/id_pm.c:                   Quit ("PML_ShutdownEMS: Error freeing EMS");\r
-16/wf3d8086/id_pm.c:// PML_StartupXMS() - Starts up XMS for the Page Mgr's use\r
-16/wf3d8086/id_pm.c:PML_StartupXMS(void)\r
-16/wf3d8086/id_pm.c:// PML_XMSCopy() - Copies a main/EMS page to or from XMS\r
-16/wf3d8086/id_pm.c:PML_XMSCopy(boolean toxms,byte far *addr,word xmspage,word length)\r
-16/wf3d8086/id_pm.c:           Quit("PML_XMSCopy: zero address");\r
-16/wf3d8086/id_pm.c:           Quit("PML_XMSCopy: Error on copy");\r
-16/wf3d8086/id_pm.c:#define    PML_CopyToXMS(s,t,l)    PML_XMSCopy(true,(s),(t),(l))\r
-16/wf3d8086/id_pm.c:#define    PML_CopyFromXMS(t,s,l)  PML_XMSCopy(false,(t),(s),(l))\r
-16/wf3d8086/id_pm.c:// PML_CopyToXMS() - Copies the specified number of bytes from the real mode\r
-16/wf3d8086/id_pm.c:PML_CopyToXMS(byte far *source,int targetpage,word length)\r
-16/wf3d8086/id_pm.c:   PML_XMSCopy(true,source,targetpage,length);\r
-16/wf3d8086/id_pm.c:// PML_CopyFromXMS() - Copies the specified number of bytes from an XMS\r
-16/wf3d8086/id_pm.c:PML_CopyFromXMS(byte far *target,int sourcepage,word length)\r
-16/wf3d8086/id_pm.c:   PML_XMSCopy(false,target,sourcepage,length);\r
-16/wf3d8086/id_pm.c:// PML_ShutdownXMS()\r
-16/wf3d8086/id_pm.c:PML_ShutdownXMS(void)\r
-16/wf3d8086/id_pm.c:                   Quit("PML_ShutdownXMS: Error freeing XMS");\r
-16/wf3d8086/id_pm.c:// PML_StartupMainMem() - Allocates as much main memory as is possible for\r
-16/wf3d8086/id_pm.c:PML_StartupMainMem(void)\r
-16/wf3d8086/id_pm.c:// PML_ShutdownMainMem() - Frees all of the main memory blocks used by the\r
-16/wf3d8086/id_pm.c:PML_ShutdownMainMem(void)\r
-16/wf3d8086/id_pm.c:// PML_ReadFromFile() - Reads some data in from the page file\r
-16/wf3d8086/id_pm.c:PML_ReadFromFile(byte far *buf,long offset,word length)\r
-16/wf3d8086/id_pm.c:           Quit("PML_ReadFromFile: Null pointer");\r
-16/wf3d8086/id_pm.c:           Quit("PML_ReadFromFile: Zero offset");\r
-16/wf3d8086/id_pm.c:           Quit("PML_ReadFromFile: Seek failed");\r
-16/wf3d8086/id_pm.c:           Quit("PML_ReadFromFile: Read failed");\r
-16/wf3d8086/id_pm.c:// PML_OpenPageFile() - Opens the page file and sets up the page info\r
-16/wf3d8086/id_pm.c:PML_OpenPageFile(void)\r
-16/wf3d8086/id_pm.c:           Quit("PML_OpenPageFile: Unable to open page file");\r
-16/wf3d8086/id_pm.c:           Quit("PML_OpenPageFile: Offset read failed");\r
-16/wf3d8086/id_pm.c:           Quit("PML_OpenPageFile: Length read failed");\r
-16/wf3d8086/id_pm.c://  PML_ClosePageFile() - Closes the page file\r
-16/wf3d8086/id_pm.c:PML_ClosePageFile(void)\r
-16/wf3d8086/id_pm.c:// PML_GetEMSAddress()\r
-16/wf3d8086/id_pm.c:PML_GetEMSAddress(int page,PMLockType lock)\r
-16/wf3d8086/id_pm.c:           PML_MapEMS(page / PMEMSSubPage,emspage);\r
-16/wf3d8086/id_pm.c:           Quit("PML_GetEMSAddress: EMS find failed");\r
-16/wf3d8086/id_pm.c:PML_GetEMSAddress(int page,PMLockType lock)\r
-16/wf3d8086/id_pm.c:   PML_MapEMS(page / PMEMSSubPage,emspage);\r
-16/wf3d8086/id_pm.c:           return(PML_GetEMSAddress(page->emsPage,page->locked));\r
-16/wf3d8086/id_pm.c:// PML_GiveLRUPage() - Returns the page # of the least recently used\r
-16/wf3d8086/id_pm.c:PML_GiveLRUPage(boolean mainonly)\r
-16/wf3d8086/id_pm.c:           Quit("PML_GiveLRUPage: LRU Search failed");\r
-16/wf3d8086/id_pm.c:// PML_GiveLRUXMSPage() - Returns the page # of the least recently used\r
-16/wf3d8086/id_pm.c:PML_GiveLRUXMSPage(void)\r
-16/wf3d8086/id_pm.c:// PML_PutPageInXMS() - If page isn't in XMS, find LRU XMS page and replace\r
-16/wf3d8086/id_pm.c:PML_PutPageInXMS(int pagenum)\r
-16/wf3d8086/id_pm.c:           usexms = PML_GiveLRUXMSPage();\r
-16/wf3d8086/id_pm.c:                   Quit("PML_PutPageInXMS: No XMS LRU");\r
-16/wf3d8086/id_pm.c:   PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length);\r
-16/wf3d8086/id_pm.c:// PML_TransferPageSpace() - A page is being replaced, so give the new page\r
-16/wf3d8086/id_pm.c:PML_TransferPageSpace(int orig,int new)\r
-16/wf3d8086/id_pm.c:           Quit("PML_TransferPageSpace: Identity replacement");\r
-16/wf3d8086/id_pm.c:           Quit("PML_TransferPageSpace: Killing locked page");\r
-16/wf3d8086/id_pm.c:           Quit("PML_TransferPageSpace: Reusing non-existent page");\r
-16/wf3d8086/id_pm.c:   PML_PutPageInXMS(orig);\r
-16/wf3d8086/id_pm.c:           Quit("PML_TransferPageSpace: Zero replacement");\r
-16/wf3d8086/id_pm.c:// PML_GetAPageBuffer() - A page buffer is needed. Either get it from the\r
-16/wf3d8086/id_pm.c://         main/EMS free pool, or use PML_GiveLRUPage() to find which page to\r
-16/wf3d8086/id_pm.c://         will be looked at by PML_GiveLRUPage().\r
-16/wf3d8086/id_pm.c:PML_GetAPageBuffer(int pagenum,boolean mainonly)\r
-16/wf3d8086/id_pm.c:           addr = PML_GetEMSAddress(page->emsPage,page->locked);\r
-16/wf3d8086/id_pm.c:                   Quit("PML_GetPageBuffer: MainPagesAvail lied");\r
-16/wf3d8086/id_pm.c:                   Quit("PML_GetPageBuffer: Purged main block");\r
-16/wf3d8086/id_pm.c:           addr = PML_TransferPageSpace(PML_GiveLRUPage(mainonly),pagenum);\r
-16/wf3d8086/id_pm.c:           Quit("PML_GetPageBuffer: Search failed");\r
-16/wf3d8086/id_pm.c:// PML_GetPageFromXMS() - If page is in XMS, find LRU main/EMS page and\r
-16/wf3d8086/id_pm.c:PML_GetPageFromXMS(int pagenum,boolean mainonly)\r
-16/wf3d8086/id_pm.c:           checkaddr = PML_GetAPageBuffer(pagenum,mainonly);\r
-16/wf3d8086/id_pm.c:                   Quit("PML_GetPageFromXMS: Non segment pointer");\r
-16/wf3d8086/id_pm.c:           PML_CopyFromXMS(addr,page->xmsPage,page->length);\r
-16/wf3d8086/id_pm.c:// PML_LoadPage() - A page is not in main/EMS memory, and it's not in XMS.\r
-16/wf3d8086/id_pm.c:PML_LoadPage(int pagenum,boolean mainonly)\r
-16/wf3d8086/id_pm.c:   addr = PML_GetAPageBuffer(pagenum,mainonly);\r
-16/wf3d8086/id_pm.c:   PML_ReadFromFile(addr,page->offset,page->length);\r
-16/wf3d8086/id_pm.c:           if (!(result = PML_GetPageFromXMS(pagenum,mainonly)))\r
-16/wf3d8086/id_pm.c:                   PML_LoadPage(pagenum,mainonly);\r
-16/wf3d8086/id_pm.c:                   PML_ReadFromFile((byte far *)addr,p->offset,p->length);\r
-16/wf3d8086/id_pm.c:                   PML_CopyToXMS((byte far *)addr,p->xmsPage,p->length);\r
-16/wf3d8086/id_pm.c:           PML_ReadFromFile((byte far *)addr,p->offset,p->length);\r
-16/wf3d8086/id_pm.c:   PML_OpenPageFile();\r
-16/wf3d8086/id_pm.c:           PML_StartupEMS();\r
-16/wf3d8086/id_pm.c:           PML_StartupXMS();\r
-16/wf3d8086/id_pm.c:           PML_StartupMainMem();\r
-16/wf3d8086/id_pm.c:   PML_ShutdownXMS();\r
-16/wf3d8086/id_pm.c:   PML_ShutdownEMS();\r
-16/wf3d8086/id_pm.c:   PML_ClosePageFile();\r
-16/wf3d8086/id_pm.c:   PML_ShutdownMainMem();\r
-Binary file 16/wf3d8086/obj/wolf3d.exe matches
-16/wf3d8086/obj/wolf3d.map: 1A26:06F7 idle  _PML_ClosePageFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0AFB idle  _PML_GetAPageBuffer\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0731 idle  _PML_GetEMSAddress\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0C08 idle  _PML_GetPageFromXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0866 idle  _PML_GiveLRUPage\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0907 idle  _PML_GiveLRUXMSPage\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0C8C idle  _PML_LoadPage\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0008 idle  _PML_MapEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0510 idle  _PML_OpenPageFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0979 idle  _PML_PutPageInXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0490 idle  _PML_ReadFromFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0160 idle  _PML_ShutdownEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0469 idle  _PML_ShutdownMainMem\r
-16/wf3d8086/obj/wolf3d.map: 1A26:02A4 idle  _PML_ShutdownXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:002B idle  _PML_StartupEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:03EC idle  _PML_StartupMainMem\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0184 idle  _PML_StartupXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0A28 idle  _PML_TransferPageSpace\r
-16/wf3d8086/obj/wolf3d.map: 1A26:01F7 idle  _PML_XMSCopy\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0008 idle  _PML_MapEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:002B idle  _PML_StartupEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0160 idle  _PML_ShutdownEMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0184 idle  _PML_StartupXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:01F7 idle  _PML_XMSCopy\r
-16/wf3d8086/obj/wolf3d.map: 1A26:02A4 idle  _PML_ShutdownXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:03EC idle  _PML_StartupMainMem\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0469 idle  _PML_ShutdownMainMem\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0490 idle  _PML_ReadFromFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0510 idle  _PML_OpenPageFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:06F7 idle  _PML_ClosePageFile\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0731 idle  _PML_GetEMSAddress\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0866 idle  _PML_GiveLRUPage\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0907 idle  _PML_GiveLRUXMSPage\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0979 idle  _PML_PutPageInXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0A28 idle  _PML_TransferPageSpace\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0AFB idle  _PML_GetAPageBuffer\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0C08 idle  _PML_GetPageFromXMS\r
-16/wf3d8086/obj/wolf3d.map: 1A26:0C8C idle  _PML_LoadPage\r
-16/wf3d8086/wolf3d.map: 1912:06B1 idle  _PML_ClosePageFile\r
-16/wf3d8086/wolf3d.map: 1912:0A96 idle  _PML_GetAPageBuffer\r
-16/wf3d8086/wolf3d.map: 1912:06E8 idle  _PML_GetEMSAddress\r
-16/wf3d8086/wolf3d.map: 1912:0BA0 idle  _PML_GetPageFromXMS\r
-16/wf3d8086/wolf3d.map: 1912:0812 idle  _PML_GiveLRUPage\r
-16/wf3d8086/wolf3d.map: 1912:08B0 idle  _PML_GiveLRUXMSPage\r
-16/wf3d8086/wolf3d.map: 1912:0C21 idle  _PML_LoadPage\r
-16/wf3d8086/wolf3d.map: 1912:0007 idle  _PML_MapEMS\r
-16/wf3d8086/wolf3d.map: 1912:04E8 idle  _PML_OpenPageFile\r
-16/wf3d8086/wolf3d.map: 1912:0920 idle  _PML_PutPageInXMS\r
-16/wf3d8086/wolf3d.map: 1912:046E idle  _PML_ReadFromFile\r
-16/wf3d8086/wolf3d.map: 1912:0155 idle  _PML_ShutdownEMS\r
-16/wf3d8086/wolf3d.map: 1912:0447 idle  _PML_ShutdownMainMem\r
-16/wf3d8086/wolf3d.map: 1912:0293 idle  _PML_ShutdownXMS\r
-16/wf3d8086/wolf3d.map: 1912:0029 idle  _PML_StartupEMS\r
-16/wf3d8086/wolf3d.map: 1912:03D0 idle  _PML_StartupMainMem\r
-16/wf3d8086/wolf3d.map: 1912:0178 idle  _PML_StartupXMS\r
-16/wf3d8086/wolf3d.map: 1912:09C9 idle  _PML_TransferPageSpace\r
-16/wf3d8086/wolf3d.map: 1912:01EA idle  _PML_XMSCopy\r
-16/wf3d8086/wolf3d.map: 1912:0007 idle  _PML_MapEMS\r
-16/wf3d8086/wolf3d.map: 1912:0029 idle  _PML_StartupEMS\r
-16/wf3d8086/wolf3d.map: 1912:0155 idle  _PML_ShutdownEMS\r
-16/wf3d8086/wolf3d.map: 1912:0178 idle  _PML_StartupXMS\r
-16/wf3d8086/wolf3d.map: 1912:01EA idle  _PML_XMSCopy\r
-16/wf3d8086/wolf3d.map: 1912:0293 idle  _PML_ShutdownXMS\r
-16/wf3d8086/wolf3d.map: 1912:03D0 idle  _PML_StartupMainMem\r
-16/wf3d8086/wolf3d.map: 1912:0447 idle  _PML_ShutdownMainMem\r
-16/wf3d8086/wolf3d.map: 1912:046E idle  _PML_ReadFromFile\r
-16/wf3d8086/wolf3d.map: 1912:04E8 idle  _PML_OpenPageFile\r
-16/wf3d8086/wolf3d.map: 1912:06B1 idle  _PML_ClosePageFile\r
-16/wf3d8086/wolf3d.map: 1912:06E8 idle  _PML_GetEMSAddress\r
-16/wf3d8086/wolf3d.map: 1912:0812 idle  _PML_GiveLRUPage\r
-16/wf3d8086/wolf3d.map: 1912:08B0 idle  _PML_GiveLRUXMSPage\r
-16/wf3d8086/wolf3d.map: 1912:0920 idle  _PML_PutPageInXMS\r
-16/wf3d8086/wolf3d.map: 1912:09C9 idle  _PML_TransferPageSpace\r
-16/wf3d8086/wolf3d.map: 1912:0A96 idle  _PML_GetAPageBuffer\r
-16/wf3d8086/wolf3d.map: 1912:0BA0 idle  _PML_GetPageFromXMS\r
-16/wf3d8086/wolf3d.map: 1912:0C21 idle  _PML_LoadPage\r
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_MapEMS() - Maps a logical page to a physical page
-16/wolf3d/WOLFSRC/ID_PM.C:PML_MapEMS(word logical,word physical)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_MapEMS: Page mapping failed");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_StartupEMS() - Sets up EMS for Page Mgr's use
-16/wolf3d/WOLFSRC/ID_PM.C:PML_StartupEMS(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_ShutdownEMS() - If EMS was used, deallocate it
-16/wolf3d/WOLFSRC/ID_PM.C:PML_ShutdownEMS(void)
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit ("PML_ShutdownEMS: Error freeing EMS");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_StartupXMS() - Starts up XMS for the Page Mgr's use
-16/wolf3d/WOLFSRC/ID_PM.C:PML_StartupXMS(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_XMSCopy() - Copies a main/EMS page to or from XMS
-16/wolf3d/WOLFSRC/ID_PM.C:PML_XMSCopy(boolean toxms,byte far *addr,word xmspage,word length)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_XMSCopy: zero address");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_XMSCopy: Error on copy");
-16/wolf3d/WOLFSRC/ID_PM.C:#define      PML_CopyToXMS(s,t,l)    PML_XMSCopy(true,(s),(t),(l))
-16/wolf3d/WOLFSRC/ID_PM.C:#define      PML_CopyFromXMS(t,s,l)  PML_XMSCopy(false,(t),(s),(l))
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_CopyToXMS() - Copies the specified number of bytes from the real mode
-16/wolf3d/WOLFSRC/ID_PM.C:PML_CopyToXMS(byte far *source,int targetpage,word length)
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_XMSCopy(true,source,targetpage,length);
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_CopyFromXMS() - Copies the specified number of bytes from an XMS
-16/wolf3d/WOLFSRC/ID_PM.C:PML_CopyFromXMS(byte far *target,int sourcepage,word length)
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_XMSCopy(false,target,sourcepage,length);
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_ShutdownXMS()
-16/wolf3d/WOLFSRC/ID_PM.C:PML_ShutdownXMS(void)
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PML_ShutdownXMS: Error freeing XMS");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_StartupMainMem() - Allocates as much main memory as is possible for
-16/wolf3d/WOLFSRC/ID_PM.C:PML_StartupMainMem(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_ShutdownMainMem() - Frees all of the main memory blocks used by the
-16/wolf3d/WOLFSRC/ID_PM.C:PML_ShutdownMainMem(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_ReadFromFile() - Reads some data in from the page file
-16/wolf3d/WOLFSRC/ID_PM.C:PML_ReadFromFile(byte far *buf,long offset,word length)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_ReadFromFile: Null pointer");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_ReadFromFile: Zero offset");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_ReadFromFile: Seek failed");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_ReadFromFile: Read failed");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_OpenPageFile() - Opens the page file and sets up the page info
-16/wolf3d/WOLFSRC/ID_PM.C:PML_OpenPageFile(void)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_OpenPageFile: Unable to open page file");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_OpenPageFile: Offset read failed");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_OpenPageFile: Length read failed");
-16/wolf3d/WOLFSRC/ID_PM.C://  PML_ClosePageFile() - Closes the page file
-16/wolf3d/WOLFSRC/ID_PM.C:PML_ClosePageFile(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_GetEMSAddress()
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GetEMSAddress(int page,PMLockType lock)
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_MapEMS(page / PMEMSSubPage,emspage);
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_GetEMSAddress: EMS find failed");
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GetEMSAddress(int page,PMLockType lock)
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_MapEMS(page / PMEMSSubPage,emspage);
-16/wolf3d/WOLFSRC/ID_PM.C:             return(PML_GetEMSAddress(page->emsPage,page->locked));
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_GiveLRUPage() - Returns the page # of the least recently used
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GiveLRUPage(boolean mainonly)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_GiveLRUPage: LRU Search failed");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_GiveLRUXMSPage() - Returns the page # of the least recently used
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GiveLRUXMSPage(void)
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_PutPageInXMS() - If page isn't in XMS, find LRU XMS page and replace
-16/wolf3d/WOLFSRC/ID_PM.C:PML_PutPageInXMS(int pagenum)
-16/wolf3d/WOLFSRC/ID_PM.C:             usexms = PML_GiveLRUXMSPage();
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PML_PutPageInXMS: No XMS LRU");
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length);
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_TransferPageSpace() - A page is being replaced, so give the new page
-16/wolf3d/WOLFSRC/ID_PM.C:PML_TransferPageSpace(int orig,int new)
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_TransferPageSpace: Identity replacement");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_TransferPageSpace: Killing locked page");
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_TransferPageSpace: Reusing non-existent page");
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_PutPageInXMS(orig);
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_TransferPageSpace: Zero replacement");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_GetAPageBuffer() - A page buffer is needed. Either get it from the
-16/wolf3d/WOLFSRC/ID_PM.C://           main/EMS free pool, or use PML_GiveLRUPage() to find which page to
-16/wolf3d/WOLFSRC/ID_PM.C://           will be looked at by PML_GiveLRUPage().
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GetAPageBuffer(int pagenum,boolean mainonly)
-16/wolf3d/WOLFSRC/ID_PM.C:             addr = PML_GetEMSAddress(page->emsPage,page->locked);
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PML_GetPageBuffer: MainPagesAvail lied");
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PML_GetPageBuffer: Purged main block");
-16/wolf3d/WOLFSRC/ID_PM.C:             addr = PML_TransferPageSpace(PML_GiveLRUPage(mainonly),pagenum);
-16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PML_GetPageBuffer: Search failed");
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_GetPageFromXMS() - If page is in XMS, find LRU main/EMS page and
-16/wolf3d/WOLFSRC/ID_PM.C:PML_GetPageFromXMS(int pagenum,boolean mainonly)
-16/wolf3d/WOLFSRC/ID_PM.C:             checkaddr = PML_GetAPageBuffer(pagenum,mainonly);
-16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PML_GetPageFromXMS: Non segment pointer");
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_CopyFromXMS(addr,page->xmsPage,page->length);
-16/wolf3d/WOLFSRC/ID_PM.C://   PML_LoadPage() - A page is not in main/EMS memory, and it's not in XMS.
-16/wolf3d/WOLFSRC/ID_PM.C:PML_LoadPage(int pagenum,boolean mainonly)
-16/wolf3d/WOLFSRC/ID_PM.C:     addr = PML_GetAPageBuffer(pagenum,mainonly);
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_ReadFromFile(addr,page->offset,page->length);
-16/wolf3d/WOLFSRC/ID_PM.C:             if (!(result = PML_GetPageFromXMS(pagenum,mainonly)))
-16/wolf3d/WOLFSRC/ID_PM.C:                     PML_LoadPage(pagenum,mainonly);
-16/wolf3d/WOLFSRC/ID_PM.C:                     PML_ReadFromFile((byte far *)addr,p->offset,p->length);
-16/wolf3d/WOLFSRC/ID_PM.C:                     PML_CopyToXMS((byte far *)addr,p->xmsPage,p->length);
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_ReadFromFile((byte far *)addr,p->offset,p->length);
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_OpenPageFile();
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_StartupEMS();
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_StartupXMS();
-16/wolf3d/WOLFSRC/ID_PM.C:             PML_StartupMainMem();
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_ShutdownXMS();
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_ShutdownEMS();
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_ClosePageFile();
-16/wolf3d/WOLFSRC/ID_PM.C:     PML_ShutdownMainMem();
-Binary file 16/wolf3d/WOLFSRC/WOLF3D.EXE matches
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:06B1 idle  _PML_ClosePageFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0A96 idle  _PML_GetAPageBuffer
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:06E8 idle  _PML_GetEMSAddress
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0BA0 idle  _PML_GetPageFromXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0812 idle  _PML_GiveLRUPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:08B0 idle  _PML_GiveLRUXMSPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C21 idle  _PML_LoadPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0007 idle  _PML_MapEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:04E8 idle  _PML_OpenPageFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0920 idle  _PML_PutPageInXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:046E idle  _PML_ReadFromFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0155 idle  _PML_ShutdownEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0447 idle  _PML_ShutdownMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0293 idle  _PML_ShutdownXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0029 idle  _PML_StartupEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:03D0 idle  _PML_StartupMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0178 idle  _PML_StartupXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:09C9 idle  _PML_TransferPageSpace
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:01EA idle  _PML_XMSCopy
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0007 idle  _PML_MapEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0029 idle  _PML_StartupEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0155 idle  _PML_ShutdownEMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0178 idle  _PML_StartupXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:01EA idle  _PML_XMSCopy
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0293 idle  _PML_ShutdownXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:03D0 idle  _PML_StartupMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0447 idle  _PML_ShutdownMainMem
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:046E idle  _PML_ReadFromFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:04E8 idle  _PML_OpenPageFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:06B1 idle  _PML_ClosePageFile
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:06E8 idle  _PML_GetEMSAddress
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0812 idle  _PML_GiveLRUPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:08B0 idle  _PML_GiveLRUXMSPage
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0920 idle  _PML_PutPageInXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:09C9 idle  _PML_TransferPageSpace
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0A96 idle  _PML_GetAPageBuffer
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0BA0 idle  _PML_GetPageFromXMS
-16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C21 idle  _PML_LoadPage
+16/wolf3d/WOLFSRC/CONTIGSC.C:  shape = PM_GetSpritePage (shapenum);\r
+16/wolf3d/WOLFSRC/CONTIGSC.C:  shape = PM_GetSpritePage (shapenum);\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_SetMainMemPurge() - Sets the purge level for all allocated main memory\r
+16/wolf3d/WOLFSRC/ID_PM.C://           blocks. This shouldn't be called directly - the PM_LockMainMem() and\r
+16/wolf3d/WOLFSRC/ID_PM.C://           PM_UnlockMainMem() macros should be used instead.\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_SetMainMemPurge(int level)\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_CheckMainMem() - If something besides the Page Mgr makes requests of\r
+16/wolf3d/WOLFSRC/ID_PM.C://   This routine now calls PM_LockMainMem() to make sure that any allocation\r
+16/wolf3d/WOLFSRC/ID_PM.C://           of the other blocks. Because PM_LockMainMem() is called,\r
+16/wolf3d/WOLFSRC/ID_PM.C://           PM_UnlockMainMem() needs to be called before any other part of the\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_CheckMainMem(void)\r
+16/wolf3d/WOLFSRC/ID_PM.C:     PM_LockMainMem();\r
+16/wolf3d/WOLFSRC/ID_PM.C://           necessary to make requests of the Memory Mgr, PM_UnlockMainMem()\r
+16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_SetupMainMem: Not enough main memory");\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_GetPageAddress() - Returns the address of a given page\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPageAddress(int pagenum)\r
+16/wolf3d/WOLFSRC/ID_PM.C:     PML_CopyToXMS(PM_GetPageAddress(pagenum),page->xmsPage,page->length);\r
+16/wolf3d/WOLFSRC/ID_PM.C:     addr = PM_GetPageAddress(orig);\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_GetPage() - Returns the address of the page, loading it if necessary\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_GetPage(int pagenum)\r
+16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_GetPage: Invalid page request");\r
+16/wolf3d/WOLFSRC/ID_PM.C:     if (!(result = PM_GetPageAddress(pagenum)))\r
+16/wolf3d/WOLFSRC/ID_PM.C:                     result = PM_GetPageAddress(pagenum);\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_SetPageLock() - Sets the lock type on a given page\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_SetPageLock(int pagenum,PMLockType lock)\r
+16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_SetPageLock: Locking/unlocking non-sound page");\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_Preload() - Loads as many pages as possible into all types of memory.\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_Preload(boolean (*update)(word current,word total))\r
+16/wolf3d/WOLFSRC/ID_PM.C:                     Quit ("PM_Preload: Pages>=ChunksInFile");\r
+16/wolf3d/WOLFSRC/ID_PM.C:             PM_GetPage(page);\r
+16/wolf3d/WOLFSRC/ID_PM.C:             addr = PM_GetPage(oogypage);\r
+16/wolf3d/WOLFSRC/ID_PM.C:                     Quit("PM_Preload: XMS buffer failed");\r
+16/wolf3d/WOLFSRC/ID_PM.C:                             Quit ("PM_Preload: Pages>=ChunksInFile");\r
+16/wolf3d/WOLFSRC/ID_PM.C:                             Quit("PM_Preload: Exceeded XMS pages");\r
+16/wolf3d/WOLFSRC/ID_PM.C:                             Quit("PM_Preload: Page too long");\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_NextFrame() - Increments the frame counter and adjusts the thrash\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_NextFrame(void)\r
+16/wolf3d/WOLFSRC/ID_PM.C:                     sprintf(buf,"PM_NextFrame: Page %d is locked",i);\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_Reset() - Sets up caching structures\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_Reset(void)\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_Startup() - Start up the Page Mgr\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_Startup(void)\r
+16/wolf3d/WOLFSRC/ID_PM.C:             Quit("PM_Startup: No main or EMS");\r
+16/wolf3d/WOLFSRC/ID_PM.C:     PM_Reset();\r
+16/wolf3d/WOLFSRC/ID_PM.C://   PM_Shutdown() - Shut down the Page Mgr\r
+16/wolf3d/WOLFSRC/ID_PM.C:PM_Shutdown(void)\r
+16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_GetSoundPage(v)      PM_GetPage(PMSoundStart + (v))\r
+16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_GetSpritePage(v)     PM_GetPage(PMSpriteStart + (v))\r
+16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_LockMainMem()        PM_SetMainMemPurge(0)\r
+16/wolf3d/WOLFSRC/ID_PM.H:#define      PM_UnlockMainMem()      PM_SetMainMemPurge(3)\r
+16/wolf3d/WOLFSRC/ID_PM.H:extern       void    PM_Startup(void),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Shutdown(void),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Reset(void),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_Preload(boolean (*update)(word current,word total)),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_NextFrame(void),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_SetPageLock(int pagenum,PMLockType lock),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_SetMainPurge(int level),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_CheckMainMem(void);\r
+16/wolf3d/WOLFSRC/ID_PM.H:extern       memptr  PM_GetPageAddress(int pagenum),\r
+16/wolf3d/WOLFSRC/ID_PM.H:                             PM_GetPage(int pagenum);                // Use this one to cache page\r
+16/wolf3d/WOLFSRC/ID_PM.H:void PM_SetMainMemPurge(int level);\r
+16/wolf3d/WOLFSRC/ID_SD.C:     addr = PM_GetSoundPage(page);\r
+16/wolf3d/WOLFSRC/ID_SD.C:     PM_SetPageLock(PMSoundStart + page,pml_Locked);\r
+16/wolf3d/WOLFSRC/ID_SD.C:             PM_SetPageLock(i + PMSoundStart,pml_Unlocked);\r
+16/wolf3d/WOLFSRC/ID_SD.C:     PM_UnlockMainMem();\r
+16/wolf3d/WOLFSRC/ID_SD.C:     PM_CheckMainMem();\r
+16/wolf3d/WOLFSRC/ID_SD.C:     p = (word far *)MK_FP(PM_GetPage(ChunksInFile - 1),0);\r
+16/wolf3d/WOLFSRC/ID_SD.C:     PM_UnlockMainMem();\r
+16/wolf3d/WOLFSRC/OLDSCALE.C:  shape = PM_GetSpritePage (shapenum);\r
+16/wolf3d/WOLFSRC/OLDSCALE.C:  shape = PM_GetSpritePage (shapenum);\r
+16/wolf3d/WOLFSRC/WL_ACT2.C:   PM_UnlockMainMem ();\r
+16/wolf3d/WOLFSRC/WL_ACT2.C:   PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_DEBUG.C:          addr = PM_GetPageAddress(i);\r
+16/wolf3d/WOLFSRC/WL_DEBUG.C:                          PM_GetPage(j);\r
+16/wolf3d/WOLFSRC/WL_DEBUG.C:                  PM_GetPage(i);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(doorpage+1);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:           *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);\r
+16/wolf3d/WOLFSRC/WL_DRAW.C:   PM_NextFrame();\r
+16/wolf3d/WOLFSRC/WL_GAME.C:   PM_UnlockMainMem();\r
+16/wolf3d/WOLFSRC/WL_GAME.C:   PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_GAME.C:   PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_GAME.C:           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_GAME.C:                   PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_INTER.C:  PM_Preload (PreloadUpdate);\r
+16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_Shutdown ();\r
+16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_Startup ();\r
+16/wolf3d/WOLFSRC/WL_MAIN.C:   PM_UnlockMainMem ();\r
+16/wolf3d/WOLFSRC/WL_MENU.C:                           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_MENU.C:                           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_PLAY.C:    PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_PLAY.C:    PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_PLAY.C:           PM_CheckMainMem ();\r
+16/wolf3d/WOLFSRC/WL_SCALE.C:  shape = PM_GetSpritePage (shapenum);\r
+16/wolf3d/WOLFSRC/WL_SCALE.C:  shape = PM_GetSpritePage (shapenum);\r
+Binary file 16/wolf3d/WOLFSRC/WOLF3D.EXE matches\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 19127H 1A286H 01160H ID_PM_TEXT         CODE\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0007 1160 C=CODE   S=ID_PM_TEXT     G=(none)  M=ID_PM.C    ACBP=28\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF       _PM_CheckMainMem\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71       _PM_GetPage\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF       _PM_GetPageAddress\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA       _PM_NextFrame\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60       _PM_Preload\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle  _PM_Reset\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8       _PM_SetMainMemPurge\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31       _PM_SetPageLock\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B       _PM_Shutdown\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0       _PM_Startup\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02B8       _PM_SetMainMemPurge\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:02DF       _PM_CheckMainMem\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:07BF       _PM_GetPageAddress\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0C71       _PM_GetPage\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D31       _PM_SetPageLock\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0D60       _PM_Preload\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:0FBA       _PM_NextFrame\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:1034 idle  _PM_Reset\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:10A0       _PM_Startup\r
+16/wolf3d/WOLFSRC/WOLF3D.MAP: 1912:114B       _PM_Shutdown\r
+16/wolf3d/WOLFSRC/WOLFHACK.C:  src = PM_GetPage(0);\r
+16/wolf3d/WOLFSRC/WOLFHACK.C:  src = PM_GetPage(1);\r
index 02fafeb6aa1b63db68c9d010b2154a99d75b0afc..06835abf44815fd4e07e4114759f1aaacfedc5cb 100755 (executable)
@@ -133,7 +133,7 @@ for(w=0;w<2;w++)
        getch();\r
        MM_ShowMemory(&gvar, &gvar.mm);\r
        MM_DumpData(&gvar.mm);\r
-       MM_Report(&gvar);\r
+       MM_Report_(&gvar);\r
        if(baka) printf("\nyay!\n");\r
        else printf("\npoo!\n");\r
        printf("press any key to continue!\n");\r
index 027693d501664062130bc257985efb7fb0ae715d..69f69db2c06d757abd653fcc690895f74cc2fd4b 100755 (executable)
@@ -95,6 +95,8 @@ US_CheckParm(char *parm,char **strings)
        return(-1);\r
 }\r
 \r
+//===========================================================================\r
+\r
 /*\r
 ==========================\r
 =\r
@@ -103,60 +105,58 @@ US_CheckParm(char *parm,char **strings)
 ==========================\r
 */\r
 \r
-/*void Quit(char *error, ...)\r
+void Quit (char *error)\r
 {\r
-       short exit_code=0;\r
-       unsigned        finscreen;\r
-\r
-       va_list ap;\r
-\r
-       va_start(ap,error);\r
+       unsigned        finscreen;\r
+       memptr  screen;\r
+       union REGS in, out;\r
 \r
-#ifndef CATALOG\r
-       if (!error)\r
+       //ClearMemory ();\r
+       if (!*error)\r
+       {\r
+        //WriteConfig ();\r
+       }\r
+       else\r
        {\r
-               CA_SetAllPurge ();\r
-               CA_CacheGrChunk (PIRACY);\r
-               finscreen = (unsigned)grsegs[PIRACY];\r
+        //CA_CacheGrChunk (ERRORSCREEN);\r
+        //screen = grsegs[ERRORSCREEN];\r
        }\r
-#endif\r
 \r
        //ShutdownId ();\r
+       //IN_Shutdown();\r
+       //modexLeave();\r
+       in.h.ah = 0x00;\r
+       in.h.al = 0x3;\r
+       int86(0x10, &in, &out);\r
 \r
        if (error && *error)\r
        {\r
-               vprintf(error,ap);\r
-               exit_code = 1;\r
+         movedata ((unsigned)screen,7,0xb800,0,7*160);\r
+         //gotoxy (10,4);\r
+         puts(error);\r
+         //gotoxy (1,8);\r
+         exit(1);\r
        }\r
-#ifndef CATALOG\r
        else\r
-       if (!NoWait)\r
+       if (!error || !(*error))\r
        {\r
-               movedata (finscreen,0,0xb800,0,4000);\r
-               bioskey (0);\r
+               //clrscr();\r
+               //#ifndef JAPAN\r
+               movedata ((unsigned)screen,7,0xb800,0,4000);\r
+               //gotoxy(1,24);\r
+               //#endif\r
+//asm  mov     bh,0\r
+//asm  mov     dh,23   // row\r
+//asm  mov     dl,0    // collumn\r
+//asm  mov ah,2\r
+//asm  int     0x10\r
        }\r
-#endif\r
 \r
-       va_end(ap);\r
+       exit(0);\r
+}\r
 \r
-#ifndef CATALOG\r
-       if (!error)\r
-       {\r
-               _argc = 2;\r
-               _argv[1] = "LAST.SHL";\r
-               _argv[2] = "ENDSCN.SCN";\r
-               _argv[3] = NULL;\r
-               if (execv("LOADSCN.EXE", _argv) == -1)\r
-               {\r
-                       clrscr();\r
-                       puts("Couldn't find executable LOADSCN.EXE.\n");\r
-                       exit(1);\r
-               }\r
-       }\r
-#endif\r
+//===========================================================================\r
 \r
-       exit(exit_code);\r
-}*/\r
 \r
 byte dirchar(byte in)\r
 {\r
index 74822da2d4db5b2b87d315b21ad67ac9076e1b20..e804410f4ea99ab50628bcb2c32cc7d3edda65b5 100755 (executable)
@@ -176,6 +176,7 @@ void wait(clock_t wait);
 long int filesize(FILE *fp);\r
 void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free);\r
 int US_CheckParm(char *parm,char **strings);\r
+void Quit (char *error);\r
 byte dirchar(byte in);\r
 \r
 #endif/*_LIBHEAD_H_*/\r
index add7707e00435baa7ec00aeff435932b5a90ef57..a8a5a4674e069eec28c39a52e46ac86219e2785f 100755 (executable)
@@ -284,7 +284,8 @@ void MML_ShutdownEMS(mminfo_t *mm)
 #ifdef __WATCOMC__
        }
 #endif
-       if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!\n");    //++++ add something
+       if(errorflag==true)
+               Quit("MML_ShutdownEMS: Error freeing EMS!\n");  //++++ add something
 }
 
 /*
@@ -1123,8 +1124,8 @@ void MM_SetPurge(memptr *baseptr, int purge, mminfo_t *mm)
                        mm->mmrover = mm->mmhead;
                else if(mm->mmrover == start)
                {
-                       printf("MM_SetPurge: Block not found!");
-                       return;
+                       Quit("MM_SetPurge: Block not found!");
+                       //return;
                }
 
        } while(1);
@@ -1163,8 +1164,8 @@ void MM_SetLock(memptr *baseptr, boolean locked, mminfo_t *mm)
                        mm->mmrover = mm->mmhead;
                else if(mm->mmrover == start)
                {
-                       printf("MM_SetLock: Block not found!");
-                       return;
+                       Quit("MM_SetLock: Block not found!");
+                       //return;
                }
 
        } while(1);
@@ -1596,7 +1597,7 @@ dword MM_TotalFree(mminfo_t *mm)
 =====================
 */
 
-void MM_Report(global_game_variables_t *gvar)
+void MM_Report_(global_game_variables_t *gvar)
 {
        printf("========================================\n");
        printf("                MM_Report\n");
index 3b1eac3d5510c83d39ea53f6c64abaa4baabbb56..6d4e8ec03f6b93e7fb0c2cc2243d9fe5d0f1cc23 100755 (executable)
@@ -196,7 +196,7 @@ 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);
-void MM_Report(global_game_variables_t *gvar);
+void MM_Report_(global_game_variables_t *gvar);
 static void MM_EMSerr(byte *stri, byte err);
 void MM_BombOnError(boolean bomb, mminfo_t *mm);
 //void MM_GetNewBlock(mminfo_t *mm);
index bc9ba74c759fc091e2442664689cc7aa8658e32e..7d112a9e9ff57909965d8fbe461963e4c6994fd7 100755 (executable)
@@ -6,7 +6,7 @@
 \r
 #include "src/lib/16_pm.h"\r
 #pragma hdrstop\r
-\r
+/*\r
 //     Main Mem specific variables\r
        boolean                 MainPresent;\r
        memptr                  MainMemPages[PMMaxMainMem];\r
@@ -22,7 +22,7 @@
 //     XMS specific variables\r
        boolean                 XMSPresent;\r
        word                    XMSAvail,XMSPagesAvail,XMSHandle;\r
-       longword                XMSDriver;\r
+       dword           XMSDriver;\r
        int                             XMSProtectPage = -1;\r
 \r
 //     File specific variables\r
@@ -42,7 +42,7 @@
        long                    PMFrameCount;\r
        PageListStruct  far *PMPages,\r
                                        _seg *PMSegPages;\r
-\r
+*/\r
 static char            *ParmStrings[] = {"nomain","noems","noxms",nil};\r
 \r
 /////////////////////////////////////////////////////////////////////////////\r
@@ -56,19 +56,22 @@ static      char            *ParmStrings[] = {"nomain","noems","noxms",nil};
 //\r
 void\r
 PML_MapEMS(word logical,word physical)\r
-{
+{\r
        union REGS CPURegs;\r
        CPURegs.h.al = physical;\r
        CPURegs.x.bx = logical;\r
        CPURegs.x.dx = EMSHandle;\r
        CPURegs.h.ah = EMS_MAPPAGE;\r
-       __asm
-       {
-               int     EMS_INT
+       __asm\r
+       {\r
+               int     EMS_INT\r
        }\r
 \r
        if(CPURegs.h.ah)\r
-               printf("PML_MapEMS: Page mapping failed\n");\r
+       {\r
+               Quit("PML_MapEMS: Page mapping failed\n");\r
+               return;\r
+       }\r
 }\r
 \r
 //\r
@@ -85,62 +88,63 @@ PML_MapEMS(word logical,word physical)
 boolean\r
 PML_StartupEMS(void)\r
 {\r
+       union REGS CPURegs;\r
        int             i;\r
        long    size;\r
 \r
        EMSPresent = false;                     // Assume that we'll fail\r
        EMSAvail = 0;\r
 \r
-       _DX = (word)EMMDriverName;\r
-       _AX = 0x3d00;\r
+       CPURegs.x.dx = (word)EMMDriverName;\r
+       CPURegs.x.ax = 0x3d00;\r
        geninterrupt(0x21);                     // try to open EMMXXXX0 device\r
 asm    jnc     gothandle\r
        goto error;\r
 \r
 gothandle:\r
-       _BX = _AX;\r
-       _AX = 0x4400;\r
+       CPURegs.x.bx = CPURegs.x.ax;\r
+       CPURegs.x.ax = 0x4400;\r
        geninterrupt(0x21);                     // get device info\r
 asm    jnc     gotinfo;\r
        goto error;\r
 \r
 gotinfo:\r
 asm    and     dx,0x80\r
-       if (!_DX)\r
+       if (!CPURegs.x.dx)\r
                goto error;\r
 \r
-       _AX = 0x4407;\r
+       CPURegs.x.ax = 0x4407;\r
        geninterrupt(0x21);                     // get status\r
 asm    jc      error\r
-       if (!_AL)\r
+       if (!CPURegs.l.al)\r
                goto error;\r
 \r
-       _AH = 0x3e;\r
+       CPURegs.h.ah = 0x3e;\r
        geninterrupt(0x21);                     // close handle\r
 \r
-       _AH = EMS_STATUS;\r
+       CPURegs.h.ah = EMS_STATUS;\r
        geninterrupt(EMS_INT);\r
-       if (_AH)\r
+       if (CPURegs.h.ah)\r
                goto error;                             // make sure EMS hardware is present\r
 \r
-       _AH = EMS_VERSION;\r
+       CPURegs.h.ah = EMS_VERSION;\r
        geninterrupt(EMS_INT);\r
-       if (_AH || (_AL < 0x32))        // only work on EMS 3.2 or greater (silly, but...)\r
+       if (CPURegs.h.ah || (CPURegs.l.al < 0x32))      // only work on EMS 3.2 or greater (silly, but...)\r
                goto error;\r
 \r
-       _AH = EMS_GETFRAME;\r
+       CPURegs.h.ah = EMS_GETFRAME;\r
        geninterrupt(EMS_INT);\r
-       if (_AH)\r
+       if (CPURegs.h.ah)\r
                goto error;                             // find the page frame address\r
-       EMSPageFrame = _BX;\r
+       EMSPageFrame = CPURegs.x.bx;\r
 \r
-       _AH = EMS_GETPAGES;\r
+       CPURegs.h.ah = EMS_GETPAGES;\r
        geninterrupt(EMS_INT);\r
-       if (_AH)\r
+       if (CPURegs.h.ah)\r
                goto error;\r
-       if (_BX < 2)\r
+       if (CPURegs.x.bx < 2)\r
                goto error;             // Require at least 2 pages (32k)\r
-       EMSAvail = _BX;\r
+       EMSAvail = CPURegs.x.bx;\r
 \r
        // Don't hog all available EMS\r
        size = EMSAvail * (long)EMSPageSize;\r
@@ -150,12 +154,12 @@ asm       jc      error
                EMSAvail = size / EMSPageSize;\r
        }\r
 \r
-       _AH = EMS_ALLOCPAGES;\r
-       _BX = EMSAvail;\r
+       CPURegs.h.ah = EMSCPURegs.l.alLOCPAGES;\r
+       CPURegs.x.bx = EMSAvail;\r
        geninterrupt(EMS_INT);\r
-       if (_AH)\r
+       if (CPURegs.h.ah)\r
                goto error;\r
-       EMSHandle = _DX;\r
+       EMSHandle = CPURegs.x.dx;\r
 \r
        mminfo.EMSmem += EMSAvail * (long)EMSPageSize;\r
 \r
@@ -177,11 +181,16 @@ PML_ShutdownEMS(void)
 {\r
        if (EMSPresent)\r
        {\r
-       asm     mov     ah,EMS_FREEPAGES\r
-       asm     mov     dx,[EMSHandle]\r
-       asm     int     EMS_INT\r
-               if (_AH)\r
-                       printf("PML_ShutdownEMS: Error freeing EMS\n");\r
+               __asm {\r
+                       mov     ah,EMS_FREEPAGES\r
+                       mov     dx,[EMSHandle]\r
+                       int     EMS_INT\r
+               }\r
+               if (CPURegs.h.ah)\r
+               {\r
+                       Quit("PML_ShutdownEMS: Error freeing EMS\n");\r
+                       //return;\r
+               }\r
        }\r
 }\r
 \r
@@ -205,7 +214,7 @@ PML_StartupXMS(void)
 \r
 asm    mov     ax,0x4300\r
 asm    int     XMS_INT                                         // Check for presence of XMS driver\r
-       if (_AL != 0x80)\r
+       if (CPURegs.l.al != 0x80)\r
                goto error;\r
 \r
 \r
@@ -215,19 +224,19 @@ asm       mov     [WORD PTR XMSDriver],bx
 asm    mov     [WORD PTR XMSDriver+2],es               // function pointer to XMS driver\r
 \r
        XMS_CALL(XMS_QUERYFREE);                        // Find out how much XMS is available\r
-       XMSAvail = _AX;\r
-       if (!_AX)                               // AJR: bugfix 10/8/92\r
+       XMSAvail = CPURegs.x.ax;\r
+       if (!CPURegs.x.ax)                              // AJR: bugfix 10/8/92\r
                goto error;\r
 \r
        XMSAvail &= ~(PMPageSizeKB - 1);        // Round off to nearest page size\r
        if (XMSAvail < (PMPageSizeKB * 2))      // Need at least 2 pages\r
                goto error;\r
 \r
-       _DX = XMSAvail;\r
-       XMS_CALL(XMS_ALLOC);                            // And do the allocation\r
-       XMSHandle = _DX;\r
+       CPURegs.x.dx = XMSAvail;\r
+       XMS_CALL(XMSCPURegs.l.alLOC);                           // And do the allocation\r
+       XMSHandle = CPURegs.x.dx;\r
 \r
-       if (!_AX)                               // AJR: bugfix 10/8/92\r
+       if (!CPURegs.x.ax)                              // AJR: bugfix 10/8/92\r
        {\r
                XMSAvail = 0;\r
                goto error;\r
@@ -250,17 +259,20 @@ PML_XMSCopy(boolean toxms,byte far *addr,word xmspage,word length)
        dword   xoffset;\r
        struct\r
        {\r
-               longword        length;\r
+               dword   length;\r
                word            source_handle;\r
-               longword        source_offset;\r
+               dword   source_offset;\r
                word            target_handle;\r
-               longword        target_offset;\r
+               dword   target_offset;\r
        } copy;\r
 \r
        if (!addr)\r
-               printf("PML_XMSCopy: zero address\n");\r
+       {\r
+               Quit("PML_XMSCopy: zero address\n");\r
+               //return;\r
+       }\r
 \r
-       xoffset = (longword)xmspage * PMPageSize;\r
+       xoffset = (dword)xmspage * PMPageSize;\r
 \r
        copy.length = (length + 1) & ~1;\r
        copy.source_handle = toxms? 0 : XMSHandle;\r
@@ -269,11 +281,14 @@ PML_XMSCopy(boolean toxms,byte far *addr,word xmspage,word length)
        copy.target_offset = toxms? xoffset : (long)addr;\r
 \r
 asm    push si\r
-       _SI = (word)&copy;\r
+       CPURegs.i.si = (word)&copy;\r
        XMS_CALL(XMS_MOVE);\r
 asm    pop     si\r
-       if (!_AX)\r
+       if (!CPURegs.x.ax)\r
+       {\r
                Quit("PML_XMSCopy: Error on copy");\r
+               //return;\r
+       }\r
 }\r
 \r
 #if 1\r
@@ -309,10 +324,13 @@ PML_ShutdownXMS(void)
 {\r
        if (XMSPresent)\r
        {\r
-               _DX = XMSHandle;\r
+               CPURegs.x.dx = XMSHandle;\r
                XMS_CALL(XMS_FREE);\r
-               if (_BL)\r
+               if (CPURegs.l.bl)\r
+               {\r
                        Quit("PML_ShutdownXMS: Error freeing XMS");\r
+                       //return;\r
+               }\r
        }\r
 }\r
 \r
@@ -440,7 +458,10 @@ PML_StartupMainMem(void)
        if (mmerror)\r
                mmerror = false;\r
        if (MainPagesAvail < PMMinMainMem)\r
+       {\r
                Quit("PM_SetupMainMem: Not enough main memory");\r
+               //return;\r
+       }\r
        MainPresent = true;\r
 }\r
 \r
@@ -473,13 +494,24 @@ void
 PML_ReadFromFile(byte far *buf,long offset,word length)\r
 {\r
        if (!buf)\r
+       {\r
                Quit("PML_ReadFromFile: Null pointer");\r
+               //return;\r
+       }\r
        if (!offset)\r
+       {\r
                Quit("PML_ReadFromFile: Zero offset");\r
+               //return;\r
+       }\r
        if (lseek(PageFile,offset,SEEK_SET) != offset)\r
+       {\r
                Quit("PML_ReadFromFile: Seek failed");\r
+               //return;\r
+       }\r
        if (!CA_FarRead(PageFile,buf,length))\r
                Quit("PML_ReadFromFile: Read failed");\r
+               //return;\r
+       }\r
 }\r
 \r
 //\r
@@ -490,14 +522,17 @@ PML_OpenPageFile(void)
 {\r
        int                             i;\r
        long                    size;\r
-       void                    _seg *buf;\r
-       longword                far *offsetptr;\r
+                               __SEGA *buf;\r
+       dword           far *offsetptr;\r
        word                    far *lengthptr;\r
        PageListStruct  far *page;\r
 \r
        PageFile = open(PageFileName,O_RDONLY + O_BINARY);\r
        if (PageFile == -1)\r
+       {\r
                Quit("PML_OpenPageFile: Unable to open page file");\r
+               //return;\r
+       }\r
 \r
        // Read in header variables\r
        read(PageFile,&ChunksInFile,sizeof(ChunksInFile));\r
@@ -512,11 +547,14 @@ PML_OpenPageFile(void)
        _fmemset(PMPages,0,sizeof(PageListStruct) * PMNumBlocks);\r
 \r
        // Read in the chunk offsets\r
-       size = sizeof(longword) * ChunksInFile;\r
+       size = sizeof(dword) * ChunksInFile;\r
        MM_GetPtr(&buf,size);\r
        if (!CA_FarRead(PageFile,(byte far *)buf,size))\r
+       {\r
                Quit("PML_OpenPageFile: Offset read failed");\r
-       offsetptr = (longword far *)buf;\r
+               //return;\r
+       }\r
+       offsetptr = (dword far *)buf;\r
        for (i = 0,page = PMPages;i < ChunksInFile;i++,page++)\r
                page->offset = *offsetptr++;\r
        MM_FreePtr(&buf);\r
@@ -525,7 +563,10 @@ PML_OpenPageFile(void)
        size = sizeof(word) * ChunksInFile;\r
        MM_GetPtr(&buf,size);\r
        if (!CA_FarRead(PageFile,(byte far *)buf,size))\r
+       {\r
                Quit("PML_OpenPageFile: Length read failed");\r
+               //return;\r
+       }\r
        lengthptr = (word far *)buf;\r
        for (i = 0,page = PMPages;i < ChunksInFile;i++,page++)\r
                page->length = *lengthptr++;\r
@@ -543,7 +584,7 @@ PML_ClosePageFile(void)
        if (PMSegPages)\r
        {\r
                MM_SetLock(&(memptr)PMSegPages,false);\r
-               MM_FreePtr(&(void _seg *)PMSegPages);\r
+               MM_FreePtr(&(__SEGA *)PMSegPages);\r
        }\r
 }\r
 \r
@@ -560,7 +601,7 @@ PML_ClosePageFile(void)
 //             to map our page in. If normal page, use EMS physical page 3, else\r
 //             use the physical page specified by the lock type\r
 //\r
-#if 1\r
+#ifdef __DEBUG__\r
 #pragma argsused       // DEBUG - remove lock parameter\r
 memptr\r
 PML_GetEMSAddress(int page,PMLockType lock)\r
@@ -585,7 +626,7 @@ PML_GetEMSAddress(int page,PMLockType lock)
        // If page isn't already mapped in, find LRU EMS frame, and use it\r
        if (emspage == -1)\r
        {\r
-               longword last = MAXLONG;\r
+               dword last = MAXLONG;\r
                for (i = 0;i < EMSFrameCount;i++)\r
                {\r
                        if (EMSList[i].lastHit < last)\r
@@ -1175,10 +1216,10 @@ PM_Startup(void)
        if (!noxms)\r
                PML_StartupXMS();\r
 \r
-       if (nomain && !EMSPresent)
+       if (nomain && !EMSPresent)\r
        {\r
-               printf("PM_Startup: No main or EMS\n");
-               return;
+               Quit("PM_Startup: No main or EMS\n");\r
+               //return;\r
        }\r
        else\r
                PML_StartupMainMem();\r
index 54f1600b4133d117dec8fd6506d67d90c2f4ebf6..f8b62c40513adec987c2cd4184db701afb94f24c 100755 (executable)
@@ -7,7 +7,7 @@
 #include "src/lib/16_hc.h"\r
 #include "src/lib/16_mm.h"\r
 \r
-//     NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024\r
+/*//   NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024\r
 #define        EMSPageSize             16384\r
 #define        EMSPageSizeSeg  (EMSPageSize >> 4)\r
 #define        EMSPageSizeKB   (EMSPageSize >> 10)\r
@@ -38,7 +38,7 @@ typedef       enum
 \r
 typedef        struct\r
                {\r
-                       longword        offset;         // Offset of chunk into file\r
+                       dword   offset;         // Offset of chunk into file\r
                        word            length;         // Length of the chunk\r
 \r
                        int                     xmsPage;        // If in XMS, (xmsPage * PMPageSize) gives offset into XMS handle\r
@@ -47,13 +47,13 @@ typedef     struct
                        int                     emsPage;        // If in EMS, logical page/offset into page\r
                        int                     mainPage;       // If in Main, index into handle array\r
 \r
-                       longword        lastHit;        // Last frame number of hit\r
+                       dword   lastHit;        // Last frame number of hit\r
                } PageListStruct;\r
 \r
 typedef        struct\r
                {\r
                        int                     baseEMSPage;    // Base EMS page for this phys frame\r
-                       longword        lastHit;                // Last frame number of hit\r
+                       dword   lastHit;                // Last frame number of hit\r
                } EMSListStruct;\r
 \r
 extern boolean                 XMSPresent,EMSPresent;\r
@@ -61,7 +61,7 @@ extern        word                    XMSPagesAvail,EMSPagesAvail;
 \r
 extern word                    ChunksInFile,\r
                                                PMSpriteStart,PMSoundStart;\r
-extern PageListStruct  far *PMPages;\r
+extern PageListStruct  far *PMPages;*///moved to src/lib/typdefst.h\r
 \r
 #define        PM_GetSoundPage(v)      PM_GetPage(PMSoundStart + (v))\r
 #define        PM_GetSpritePage(v)     PM_GetPage(PMSpriteStart + (v))\r
index fdf96a278d241d0c9228e3aad7e1a489f4e2e993..137b00b6e2e316e1e183bb1672e9b2edda97a118 100755 (executable)
@@ -135,6 +135,12 @@ typedef struct
        //0000word startclk; float clk, tickclk;        //timer\r
 } video_t;\r
 \r
+//from 16_mm\r
+//==========================================================================\r
+\r
+#define MAXBLOCKS              1024\r
+#define MAXUMBS                12\r
+\r
 typedef struct mmblockstruct\r
 {\r
        word    start,length;\r
@@ -146,12 +152,6 @@ typedef struct mmblockstruct
        struct mmblockstruct far *next;\r
 } mmblocktype;\r
 \r
-//from 16_mm\r
-//==========================================================================\r
-\r
-#define MAXBLOCKS              1024\r
-#define MAXUMBS                12\r
-\r
 typedef struct\r
 {\r
        dword   nearheap,farheap,EMSmem,XMSmem,mainmem;\r
@@ -180,6 +180,116 @@ typedef struct
 \r
 //==========================================================================\r
 \r
+\r
+//from 16_pm\r
+//==========================================================================\r
+\r
+//     NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024\r
+#define        EMSPageSize             16384\r
+#define        EMSPageSizeSeg  (EMSPageSize >> 4)\r
+#define        EMSPageSizeKB   (EMSPageSize >> 10)\r
+#define        EMSFrameCount   4\r
+#define        PMPageSize              4096\r
+#define        PMPageSizeSeg   (PMPageSize >> 4)\r
+#define        PMPageSizeKB    (PMPageSize >> 10)\r
+#define        PMEMSSubPage    (EMSPageSize / PMPageSize)\r
+\r
+#define        PMMinMainMem    10                      // Min acceptable # of pages from main\r
+#define        PMMaxMainMem    100                     // Max number of pages in main memory\r
+\r
+#define        PMThrashThreshold       1       // Number of page thrashes before panic mode\r
+#define        PMUnThrashThreshold     5       // Number of non-thrashing frames before leaving panic mode\r
+\r
+typedef        enum\r
+               {\r
+                       pml_Unlocked,\r
+                       pml_Locked\r
+               } PMLockType;\r
+\r
+typedef        enum\r
+               {\r
+                       pmba_Unused = 0,\r
+                       pmba_Used = 1,\r
+                       pmba_Allocated = 2\r
+               } PMBlockAttr;\r
+\r
+typedef        struct\r
+               {\r
+                       dword   offset;         // Offset of chunk into file\r
+                       word            length;         // Length of the chunk\r
+\r
+                       int                     xmsPage;        // If in XMS, (xmsPage * PMPageSize) gives offset into XMS handle\r
+\r
+                       PMLockType      locked;         // If set, this page can't be purged\r
+                       int                     emsPage;        // If in EMS, logical page/offset into page\r
+                       int                     mainPage;       // If in Main, index into handle array\r
+\r
+                       dword   lastHit;        // Last frame number of hit\r
+               } PageListStruct;\r
+\r
+typedef        struct\r
+               {\r
+                       int                     baseEMSPage;    // Base EMS page for this phys frame\r
+                       dword   lastHit;                // Last frame number of hit\r
+               } EMSListStruct;\r
+\r
+//     Main Mem specific variables\r
+typedef struct\r
+{\r
+       boolean                 MainPresent;\r
+       memptr                  MainMemPages[PMMaxMainMem];\r
+       PMBlockAttr             MainMemUsed[PMMaxMainMem];\r
+       int                             MainPagesAvail;\r
+} pm_mmi_t;\r
+\r
+//     EMS specific variables\r
+typedef struct\r
+{\r
+       boolean                 EMSPresent;\r
+       word                    EMSAvail,EMSPagesAvail,EMSHandle,\r
+                                       EMSPageFrame,EMSPhysicalPage;\r
+       EMSListStruct   EMSList[EMSFrameCount];\r
+} pm_emmi_t;\r
+\r
+//     XMS specific variables\r
+typedef struct\r
+{\r
+       boolean                 XMSPresent;\r
+       word                    XMSAvail,XMSPagesAvail,XMSHandle;\r
+       dword           XMSDriver;\r
+       int                             XMSProtectPage;// = -1;\r
+} pm_xmmi_t;\r
+\r
+//     File specific variables\r
+typedef struct\r
+{\r
+       char                    PageFileName[13];// = {"VSWAP."};\r
+       int                             PageFile;// = -1;\r
+       word                    ChunksInFile;\r
+       word                    PMSpriteStart,PMSoundStart;\r
+} pm_fi_t;\r
+\r
+//     General usage variables\r
+typedef struct\r
+{\r
+       boolean                 PMStarted,\r
+                                       PMPanicMode,\r
+                                       PMThrashing;\r
+       word                    XMSPagesUsed,\r
+                                       EMSPagesUsed,\r
+                                       MainPagesUsed,\r
+                                       PMNumBlocks;\r
+       long                    PMFrameCount;\r
+       PageListStruct  far *PMPages;\r
+       __SEGA *PMSegPages;\r
+       pm_mmi_t        mm;\r
+       pm_emmi_t       emm;\r
+       pm_xmmi_t       xmm;\r
+       pm_fi_t fi;\r
+} pm_t;\r
+\r
+//==========================================================================\r
+\r
 //from 16_ca\r
 //==========================================================================\r
 \r
@@ -221,6 +331,7 @@ typedef struct
 {\r
        video_t video;  // video settings variable\r
        ca_t            ca;     // ca stuff\r
+       pm_t            pm;     // pm stuff\r
        byte *pee;              // message for fps\r
        loghandle_t handle;     //handles for file logging\r
        kurokku_t kurokku;      //clock struct\r